Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions asyncapi.agent-plane.patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# additive AsyncAPI patch fragment for the core agent-plane schema family
channels:
srcos.v2.session.events:
publish:
message:
name: SessionEvent
payload: { $ref: './schemas/EventEnvelope.json' }
srcos.v2.execution.events:
publish:
message:
name: ExecutionEvent
payload: { $ref: './schemas/EventEnvelope.json' }
srcos.v2.skill.events:
publish:
message:
name: SkillEvent
payload: { $ref: './schemas/EventEnvelope.json' }
srcos.v2.memory.events:
publish:
message:
name: MemoryEvent
payload: { $ref: './schemas/EventEnvelope.json' }
srcos.v2.receipt.events:
publish:
message:
name: ReceiptEvent
payload: { $ref: './schemas/EventEnvelope.json' }
56 changes: 56 additions & 0 deletions openapi.agent-plane.patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# additive OpenAPI patch fragment for the core agent-plane schema family
paths:
/v2/sessions:
post:
operationId: upsertAgentSession
requestBody:
required: true
content:
application/json:
schema: { $ref: './schemas/AgentSession.json' }
responses:
'200': { description: ok }
/v2/execution/decide:
post:
operationId: decideExecution
requestBody:
required: true
content:
application/json:
schema: { $ref: './schemas/ExecutionDecision.json' }
responses:
'200':
description: execution decision
content:
application/json:
schema: { $ref: './schemas/ExecutionDecision.json' }
/v2/skills:
post:
operationId: upsertSkillManifest
requestBody:
required: true
content:
application/json:
schema: { $ref: './schemas/SkillManifest.json' }
responses:
'200': { description: ok }
/v2/memory:
post:
operationId: upsertMemoryEntry
requestBody:
required: true
content:
application/json:
schema: { $ref: './schemas/MemoryEntry.json' }
responses:
'200': { description: ok }
/v2/receipts/session:
post:
operationId: recordSessionReceipt
requestBody:
required: true
content:
application/json:
schema: { $ref: './schemas/SessionReceipt.json' }
responses:
'200': { description: ok }
157 changes: 157 additions & 0 deletions schemas/AgentSession.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.srcos.ai/v2/AgentSession.json",
"title": "AgentSession",
"type": "object",
"additionalProperties": false,
"required": [
"id",
"type",
"specVersion",
"role",
"status",
"mode",
"workspaceRef",
"substrate",
"surface",
"skillRefs",
"memoryRefs",
"decisionRefs",
"time"
],
"properties": {
"id": {
"type": "string",
"pattern": "^urn:srcos:session:"
},
"type": {
"const": "AgentSession"
},
"specVersion": {
"type": "string"
},
"parentSessionRef": {
"type": [
"string",
"null"
],
"pattern": "^urn:srcos:session:"
},
"role": {
"enum": [
"main",
"explorer",
"planner",
"executor",
"reviewer",
"auditor",
"reverser",
"custom"
]
},
"status": {
"enum": [
"created",
"waiting",
"running",
"paused",
"completed",
"failed",
"canceled",
"merged",
"reversed"
]
},
"mode": {
"enum": [
"plan",
"ask",
"execute",
"review"
]
},
"workspaceRef": {
"type": "string"
},
"worktreeRef": {
"type": [
"string",
"null"
]
},
"substrate": {
"enum": [
"local",
"remote-local",
"cloud",
"background",
"event-pushed",
"ci"
]
},
"surface": {
"$ref": "ExecutionSurface.json"
},
"provider": {
"type": [
"string",
"null"
]
},
"skillRefs": {
"type": "array",
"items": {
"type": "string",
"pattern": "^urn:srcos:skill:"
}
},
"memoryRefs": {
"type": "array",
"items": {
"type": "string",
"pattern": "^urn:srcos:memory:"
}
},
"transcriptRef": {
"type": [
"string",
"null"
],
"pattern": "^urn:srcos:transcript:"
},
"decisionRefs": {
"type": "array",
"items": {
"type": "string",
"pattern": "^urn:srcos:exec-decision:"
}
},
"telemetryRefs": {
"type": "array",
"items": {
"type": "string",
"pattern": "^urn:srcos:telemetry:"
}
},
"time": {
"type": "object",
"additionalProperties": false,
"required": [
"startedAt"
],
"properties": {
"startedAt": {
"type": "string",
"format": "date-time"
},
"endedAt": {
"type": [
"string",
"null"
],
"format": "date-time"
}
}
}
}
}
87 changes: 87 additions & 0 deletions schemas/ExecutionDecision.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.srcos.ai/v2/ExecutionDecision.json",
"title": "ExecutionDecision",
"type": "object",
"additionalProperties": false,
"required": [
"id",
"type",
"specVersion",
"sessionRef",
"decision",
"reason",
"issuedAt",
"decisionHash"
],
"properties": {
"id": {
"type": "string",
"pattern": "^urn:srcos:exec-decision:"
},
"type": {
"const": "ExecutionDecision"
},
"specVersion": {
"type": "string"
},
"sessionRef": {
"type": "string",
"pattern": "^urn:srcos:session:"
},
"toolRequestRef": {
"type": [
"string",
"null"
],
"pattern": "^urn:srcos:tool:"
},
"decision": {
"enum": [
"allow",
"deny",
"ask",
"defer",
"rewrite"
]
},
"reason": {
"type": "string"
},
"updatedInput": {
"type": [
"object",
"null"
],
"additionalProperties": true
},
"policyRef": {
"type": [
"string",
"null"
],
"pattern": "^urn:srcos:policy:"
},
"obligations": {
"type": "array",
"items": {
"type": "string"
}
},
"issuedAt": {
"type": "string",
"format": "date-time"
},
"expiresAt": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"decisionHash": {
"type": "string",
"pattern": "^sha256:"
}
}
}
Loading