3405 lines
72 KiB
JSON
3405 lines
72 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://example.invalid/mosaic/chat-01/draft-2",
|
|
"title": "CHAT-01 draft contracts, not an implemented API",
|
|
"description": "Closed proposal shapes. Stateful authorization, runtime compatibility, privacy and effect proof require separate enforcement. No credentials or arbitrary paths.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/$defs/binding"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/grant"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/connection"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/clientRequest"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/request"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/receipt"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/entry"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/event"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/cursor"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/page"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/catalogueItem"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/upload"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/draft"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/queueItem"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/approval"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/confirmation"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/stop"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/frozenPayload"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/nativeDecision"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/cohortProof"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/effectReport"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/turnProof"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/draftListing"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/clientView"
|
|
}
|
|
],
|
|
"$defs": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
},
|
|
"digest": {
|
|
"type": "string",
|
|
"pattern": "^[a-f0-9]{64}$"
|
|
},
|
|
"time": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?Z$"
|
|
},
|
|
"generation": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"maxItems": 100,
|
|
"uniqueItems": true
|
|
},
|
|
"target": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"conversation": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"branch": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"execution": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"controllerGeneration": {
|
|
"$ref": "#/$defs/generation"
|
|
}
|
|
},
|
|
"required": [
|
|
"conversation",
|
|
"branch",
|
|
"execution",
|
|
"controllerGeneration"
|
|
]
|
|
},
|
|
"scope": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"host": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"seat": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"project": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"workspace": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"conversation": {
|
|
"$ref": "#/$defs/id"
|
|
}
|
|
},
|
|
"required": [
|
|
"host",
|
|
"seat",
|
|
"project",
|
|
"workspace",
|
|
"conversation"
|
|
]
|
|
},
|
|
"capabilities": {
|
|
"type": "array",
|
|
"items": {
|
|
"enum": [
|
|
"observe",
|
|
"send",
|
|
"take-control",
|
|
"approve",
|
|
"interrupt",
|
|
"force-stop",
|
|
"recover",
|
|
"recover-control",
|
|
"draft",
|
|
"upload",
|
|
"confirm"
|
|
]
|
|
},
|
|
"maxItems": 11,
|
|
"uniqueItems": true
|
|
},
|
|
"binding": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "binding"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"scope": {
|
|
"$ref": "#/$defs/scope"
|
|
},
|
|
"harness": {
|
|
"enum": [
|
|
"pi",
|
|
"claude-code"
|
|
]
|
|
},
|
|
"nativeSession": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"branch": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"execution": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"engineDigest": {
|
|
"$ref": "#/$defs/digest"
|
|
},
|
|
"configDigest": {
|
|
"$ref": "#/$defs/digest"
|
|
},
|
|
"policyRevision": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"sourceRootRef": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"snapshotDigest": {
|
|
"$ref": "#/$defs/digest"
|
|
},
|
|
"cohortRef": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"controllerGeneration": {
|
|
"$ref": "#/$defs/generation"
|
|
},
|
|
"controllerConnection": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"state": {
|
|
"enum": [
|
|
"reserved",
|
|
"active",
|
|
"stopping",
|
|
"uncertain",
|
|
"stopped"
|
|
]
|
|
},
|
|
"admission": {
|
|
"enum": [
|
|
"closed",
|
|
"open"
|
|
]
|
|
},
|
|
"createdAt": {
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
"stop": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"scope",
|
|
"harness",
|
|
"nativeSession",
|
|
"branch",
|
|
"execution",
|
|
"engineDigest",
|
|
"configDigest",
|
|
"policyRevision",
|
|
"sourceRootRef",
|
|
"snapshotDigest",
|
|
"cohortRef",
|
|
"controllerGeneration",
|
|
"controllerConnection",
|
|
"state",
|
|
"admission",
|
|
"createdAt",
|
|
"stop"
|
|
]
|
|
},
|
|
"grant": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "grant"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"revision": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"actor": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"scope": {
|
|
"$ref": "#/$defs/scope"
|
|
},
|
|
"capabilities": {
|
|
"$ref": "#/$defs/capabilities"
|
|
},
|
|
"state": {
|
|
"enum": [
|
|
"active",
|
|
"revoked"
|
|
]
|
|
},
|
|
"expiresAt": {
|
|
"$ref": "#/$defs/time"
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"revision",
|
|
"actor",
|
|
"scope",
|
|
"capabilities",
|
|
"state",
|
|
"expiresAt"
|
|
]
|
|
},
|
|
"connection": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "connection"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"actor": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"grant": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"grantRevision": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"conversation": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"mode": {
|
|
"enum": [
|
|
"observer",
|
|
"controller"
|
|
]
|
|
},
|
|
"transport": {
|
|
"enum": [
|
|
"local-browser",
|
|
"local-terminal",
|
|
"private-host"
|
|
]
|
|
},
|
|
"state": {
|
|
"enum": [
|
|
"connected",
|
|
"disconnected",
|
|
"revoked"
|
|
]
|
|
},
|
|
"authenticatedChannelRef": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"createdAt": {
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
"generation": {
|
|
"$ref": "#/$defs/generation"
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"actor",
|
|
"grant",
|
|
"grantRevision",
|
|
"conversation",
|
|
"mode",
|
|
"transport",
|
|
"state",
|
|
"authenticatedChannelRef",
|
|
"createdAt",
|
|
"generation"
|
|
]
|
|
},
|
|
"command": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "observe"
|
|
},
|
|
"cursor": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"limit": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 100
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"cursor",
|
|
"limit"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "prompt"
|
|
},
|
|
"draft": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"draftRevision": {
|
|
"$ref": "#/$defs/generation"
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"draft",
|
|
"draftRevision"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "takeover"
|
|
}
|
|
},
|
|
"required": [
|
|
"operation"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "edit-queued"
|
|
},
|
|
"item": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"revision": {
|
|
"$ref": "#/$defs/generation"
|
|
},
|
|
"draft": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"draftRevision": {
|
|
"$ref": "#/$defs/generation"
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"item",
|
|
"revision",
|
|
"draft",
|
|
"draftRevision"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "cancel-queued"
|
|
},
|
|
"item": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"revision": {
|
|
"$ref": "#/$defs/generation"
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"item",
|
|
"revision"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "approval"
|
|
},
|
|
"approval": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"choice": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"intentDigest": {
|
|
"$ref": "#/$defs/digest"
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"approval",
|
|
"choice",
|
|
"intentDigest"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "interrupt"
|
|
}
|
|
},
|
|
"required": [
|
|
"operation"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "force-stop"
|
|
},
|
|
"confirmation": {
|
|
"$ref": "#/$defs/id"
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"confirmation"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "recover"
|
|
},
|
|
"stop": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"confirmation": {
|
|
"$ref": "#/$defs/id"
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"stop",
|
|
"confirmation"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "acquire-recovery-control"
|
|
},
|
|
"confirmation": {
|
|
"$ref": "#/$defs/id"
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"confirmation"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "list-drafts"
|
|
},
|
|
"cursor": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"limit": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 100
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"cursor",
|
|
"limit"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "create-draft"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"minLength": 0,
|
|
"maxLength": 262144
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"text"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "update-draft"
|
|
},
|
|
"draft": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"revision": {
|
|
"$ref": "#/$defs/generation"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"minLength": 0,
|
|
"maxLength": 262144
|
|
},
|
|
"attachments": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"maxItems": 10,
|
|
"uniqueItems": true
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"draft",
|
|
"revision",
|
|
"text",
|
|
"attachments"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "discard-draft"
|
|
},
|
|
"draft": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"revision": {
|
|
"$ref": "#/$defs/generation"
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"draft",
|
|
"revision"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "begin-upload"
|
|
},
|
|
"filename": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 255
|
|
},
|
|
"mimeType": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 127
|
|
},
|
|
"size": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 20971520
|
|
},
|
|
"digest": {
|
|
"$ref": "#/$defs/digest"
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"filename",
|
|
"mimeType",
|
|
"size",
|
|
"digest"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "append-upload"
|
|
},
|
|
"upload": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"revision": {
|
|
"$ref": "#/$defs/generation"
|
|
},
|
|
"offset": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 20971520
|
|
},
|
|
"dataBase64": {
|
|
"type": "string",
|
|
"minLength": 4,
|
|
"maxLength": 349528,
|
|
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"upload",
|
|
"revision",
|
|
"offset",
|
|
"dataBase64"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "complete-upload"
|
|
},
|
|
"upload": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"revision": {
|
|
"$ref": "#/$defs/generation"
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"upload",
|
|
"revision"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "discard-upload"
|
|
},
|
|
"upload": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"revision": {
|
|
"$ref": "#/$defs/generation"
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"upload",
|
|
"revision"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "issue-confirmation"
|
|
},
|
|
"operationToConfirm": {
|
|
"enum": [
|
|
"force-stop",
|
|
"recover",
|
|
"acquire-recovery-control"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"operationToConfirm"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"const": "answer-confirmation"
|
|
},
|
|
"confirmation": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"answer": {
|
|
"enum": [
|
|
"confirm",
|
|
"cancel"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"confirmation",
|
|
"answer"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"clientRequest": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "clientRequest"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"connection": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"target": {
|
|
"$ref": "#/$defs/target"
|
|
},
|
|
"command": {
|
|
"$ref": "#/$defs/command"
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"connection",
|
|
"target",
|
|
"command"
|
|
]
|
|
},
|
|
"request": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "request"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"clientRequest": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"connection": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"actor": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"grant": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"grantRevision": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"target": {
|
|
"$ref": "#/$defs/target"
|
|
},
|
|
"operationDigest": {
|
|
"$ref": "#/$defs/digest"
|
|
},
|
|
"command": {
|
|
"$ref": "#/$defs/command"
|
|
},
|
|
"admittedAt": {
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
"frozenPayload": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"clientRequest",
|
|
"connection",
|
|
"actor",
|
|
"grant",
|
|
"grantRevision",
|
|
"target",
|
|
"operationDigest",
|
|
"command",
|
|
"admittedAt",
|
|
"frozenPayload"
|
|
]
|
|
},
|
|
"receipt": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "receipt"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"request": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"target": {
|
|
"$ref": "#/$defs/target"
|
|
},
|
|
"state": {
|
|
"enum": [
|
|
"admitted",
|
|
"queued",
|
|
"dispatched",
|
|
"acknowledged",
|
|
"working",
|
|
"finished",
|
|
"failed",
|
|
"rejected",
|
|
"delivery-unknown",
|
|
"recovered-as-draft",
|
|
"recovery-failed",
|
|
"dispatch-refused"
|
|
]
|
|
},
|
|
"revision": {
|
|
"$ref": "#/$defs/generation"
|
|
},
|
|
"reasonCode": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"event": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"createdAt": {
|
|
"$ref": "#/$defs/time"
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"request",
|
|
"target",
|
|
"state",
|
|
"revision",
|
|
"reasonCode",
|
|
"event",
|
|
"createdAt"
|
|
]
|
|
},
|
|
"contentBlock": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"const": "text"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"minLength": 0,
|
|
"maxLength": 262144
|
|
},
|
|
"block": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"fragment": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"lastFragment": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"text",
|
|
"block",
|
|
"fragment",
|
|
"lastFragment"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"const": "thinking"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"minLength": 0,
|
|
"maxLength": 262144
|
|
},
|
|
"visibility": {
|
|
"enum": [
|
|
"permitted-visible",
|
|
"unavailable"
|
|
]
|
|
},
|
|
"block": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"fragment": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"lastFragment": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"text",
|
|
"visibility",
|
|
"block",
|
|
"fragment",
|
|
"lastFragment"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"visibility": {
|
|
"const": "unavailable"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"text": {
|
|
"const": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"const": "tool-call"
|
|
},
|
|
"call": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"name": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"argumentsText": {
|
|
"type": "string",
|
|
"minLength": 0,
|
|
"maxLength": 262144
|
|
},
|
|
"block": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"fragment": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"lastFragment": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"call",
|
|
"name",
|
|
"argumentsText",
|
|
"block",
|
|
"fragment",
|
|
"lastFragment"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"const": "tool-result"
|
|
},
|
|
"call": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"minLength": 0,
|
|
"maxLength": 262144
|
|
},
|
|
"isError": {
|
|
"type": "boolean"
|
|
},
|
|
"block": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"fragment": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"lastFragment": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"call",
|
|
"text",
|
|
"isError",
|
|
"block",
|
|
"fragment",
|
|
"lastFragment"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"const": "attachment"
|
|
},
|
|
"attachment": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"block": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"fragment": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"lastFragment": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"attachment",
|
|
"block",
|
|
"fragment",
|
|
"lastFragment"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"const": "compaction"
|
|
},
|
|
"summary": {
|
|
"type": "string",
|
|
"minLength": 0,
|
|
"maxLength": 262144
|
|
},
|
|
"nativeEntry": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"block": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"fragment": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"lastFragment": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"summary",
|
|
"nativeEntry",
|
|
"block",
|
|
"fragment",
|
|
"lastFragment"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"entry": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "entry"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"conversation": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"branch": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"parent": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"execution": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"nativeEntry": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"role": {
|
|
"enum": [
|
|
"user",
|
|
"assistant",
|
|
"tool",
|
|
"compaction",
|
|
"notice"
|
|
]
|
|
},
|
|
"request": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"content": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/contentBlock"
|
|
},
|
|
"maxItems": 64
|
|
},
|
|
"part": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"lastPart": {
|
|
"type": "boolean"
|
|
},
|
|
"createdAt": {
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
"message": {
|
|
"$ref": "#/$defs/id"
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"conversation",
|
|
"branch",
|
|
"parent",
|
|
"execution",
|
|
"nativeEntry",
|
|
"role",
|
|
"request",
|
|
"content",
|
|
"part",
|
|
"lastPart",
|
|
"createdAt",
|
|
"message"
|
|
]
|
|
},
|
|
"event": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "event"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"target": {
|
|
"$ref": "#/$defs/target"
|
|
},
|
|
"sequence": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"streamEpoch": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"request": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"entry": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"message-start",
|
|
"text-delta",
|
|
"thinking-delta",
|
|
"tool-start",
|
|
"tool-update",
|
|
"tool-end",
|
|
"message-end",
|
|
"queue-changed",
|
|
"approval-pending",
|
|
"approval-resolved",
|
|
"control-transferred",
|
|
"run-settled",
|
|
"disconnected",
|
|
"reconciled",
|
|
"stopping",
|
|
"stopped",
|
|
"uncertain"
|
|
]
|
|
},
|
|
"contentIndex": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 63
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"updateMode": {
|
|
"enum": [
|
|
"append",
|
|
"replace",
|
|
"none"
|
|
]
|
|
},
|
|
"content": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/contentBlock"
|
|
},
|
|
"maxItems": 64
|
|
},
|
|
"visibility": {
|
|
"enum": [
|
|
"permitted-visible",
|
|
"unavailable"
|
|
]
|
|
},
|
|
"createdAt": {
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
"stop": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"message": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"part": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 9007199254740991
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"lastPart": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"role": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"user",
|
|
"assistant",
|
|
"tool",
|
|
"compaction",
|
|
"notice"
|
|
]
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"target",
|
|
"sequence",
|
|
"streamEpoch",
|
|
"request",
|
|
"entry",
|
|
"type",
|
|
"contentIndex",
|
|
"updateMode",
|
|
"content",
|
|
"visibility",
|
|
"createdAt",
|
|
"stop",
|
|
"message",
|
|
"part",
|
|
"lastPart",
|
|
"role"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"visibility": {
|
|
"const": "unavailable"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"content": {
|
|
"maxItems": 0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"message-start",
|
|
"text-delta",
|
|
"thinking-delta",
|
|
"tool-start",
|
|
"tool-update",
|
|
"tool-end",
|
|
"message-end"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"message": {
|
|
"$ref": "#/$defs/id"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"type": {
|
|
"const": "message-end"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"part": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"lastPart": {
|
|
"type": "boolean"
|
|
},
|
|
"entry": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"updateMode": {
|
|
"const": "replace"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"message-start",
|
|
"text-delta",
|
|
"thinking-delta",
|
|
"tool-start",
|
|
"tool-update",
|
|
"tool-end",
|
|
"message-end"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"role": {
|
|
"enum": [
|
|
"user",
|
|
"assistant",
|
|
"tool",
|
|
"compaction",
|
|
"notice"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"cursor": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "cursor"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"conversation": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"branch": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"snapshotDigest": {
|
|
"$ref": "#/$defs/digest"
|
|
},
|
|
"sourceEpoch": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"lastEntry": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"expiresAt": {
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
"actor": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"purpose": {
|
|
"enum": [
|
|
"history",
|
|
"drafts"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"conversation",
|
|
"branch",
|
|
"snapshotDigest",
|
|
"sourceEpoch",
|
|
"lastEntry",
|
|
"expiresAt",
|
|
"actor",
|
|
"purpose"
|
|
]
|
|
},
|
|
"page": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "page"
|
|
},
|
|
"conversation": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"branch": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"snapshotDigest": {
|
|
"$ref": "#/$defs/digest"
|
|
},
|
|
"sourceEpoch": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"entries": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/entry"
|
|
},
|
|
"maxItems": 100
|
|
},
|
|
"nextCursor": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"hasMore": {
|
|
"type": "boolean"
|
|
},
|
|
"readOnly": {
|
|
"type": "boolean"
|
|
},
|
|
"streamEpoch": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"throughSequence": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"conversation",
|
|
"branch",
|
|
"snapshotDigest",
|
|
"sourceEpoch",
|
|
"entries",
|
|
"nextCursor",
|
|
"hasMore",
|
|
"readOnly",
|
|
"streamEpoch",
|
|
"throughSequence"
|
|
]
|
|
},
|
|
"catalogueItem": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "catalogueItem"
|
|
},
|
|
"conversation": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"scope": {
|
|
"$ref": "#/$defs/scope"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"minLength": 0,
|
|
"maxLength": 200
|
|
},
|
|
"harness": {
|
|
"enum": [
|
|
"pi",
|
|
"claude-code"
|
|
]
|
|
},
|
|
"branch": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"history": {
|
|
"type": "boolean"
|
|
},
|
|
"readOnly": {
|
|
"type": "boolean"
|
|
},
|
|
"conversationCreatedAt": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"engineStartedAt": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"lastActivityAt": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"controlMode": {
|
|
"enum": [
|
|
"observer",
|
|
"controller",
|
|
"unavailable"
|
|
]
|
|
},
|
|
"availability": {
|
|
"enum": [
|
|
"available",
|
|
"unverified",
|
|
"denied",
|
|
"offline",
|
|
"error"
|
|
]
|
|
},
|
|
"currentView": {
|
|
"$ref": "#/$defs/clientView"
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"conversation",
|
|
"scope",
|
|
"title",
|
|
"harness",
|
|
"branch",
|
|
"history",
|
|
"readOnly",
|
|
"conversationCreatedAt",
|
|
"engineStartedAt",
|
|
"lastActivityAt",
|
|
"controlMode",
|
|
"availability",
|
|
"currentView"
|
|
]
|
|
},
|
|
"upload": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "upload"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"actor": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"conversation": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"revision": {
|
|
"$ref": "#/$defs/generation"
|
|
},
|
|
"filename": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 255
|
|
},
|
|
"mimeType": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 127
|
|
},
|
|
"size": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 20971520
|
|
},
|
|
"digest": {
|
|
"$ref": "#/$defs/digest"
|
|
},
|
|
"state": {
|
|
"enum": [
|
|
"receiving",
|
|
"staged",
|
|
"transferring",
|
|
"delivered",
|
|
"sent",
|
|
"rejected",
|
|
"discarded"
|
|
]
|
|
},
|
|
"privateBlobRef": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"recipientScope": {
|
|
"$ref": "#/$defs/scope"
|
|
},
|
|
"transferAck": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"createdAt": {
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
"receivedBytes": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 20971520
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"actor",
|
|
"conversation",
|
|
"revision",
|
|
"filename",
|
|
"mimeType",
|
|
"size",
|
|
"digest",
|
|
"state",
|
|
"privateBlobRef",
|
|
"recipientScope",
|
|
"transferAck",
|
|
"createdAt",
|
|
"receivedBytes"
|
|
]
|
|
},
|
|
"draft": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "draft"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"actor": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"conversation": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"branch": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"revision": {
|
|
"$ref": "#/$defs/generation"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"minLength": 0,
|
|
"maxLength": 262144
|
|
},
|
|
"attachments": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"maxItems": 10,
|
|
"uniqueItems": true
|
|
},
|
|
"state": {
|
|
"enum": [
|
|
"unsent",
|
|
"submitted",
|
|
"discarded"
|
|
]
|
|
},
|
|
"recoveredFrom": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"createdAt": {
|
|
"$ref": "#/$defs/time"
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"actor",
|
|
"conversation",
|
|
"branch",
|
|
"revision",
|
|
"text",
|
|
"attachments",
|
|
"state",
|
|
"recoveredFrom",
|
|
"createdAt"
|
|
]
|
|
},
|
|
"queueItem": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "queueItem"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"request": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"actor": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"target": {
|
|
"$ref": "#/$defs/target"
|
|
},
|
|
"revision": {
|
|
"$ref": "#/$defs/generation"
|
|
},
|
|
"draft": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"payloadDigest": {
|
|
"$ref": "#/$defs/digest"
|
|
},
|
|
"state": {
|
|
"enum": [
|
|
"queued",
|
|
"dispatched",
|
|
"acknowledged",
|
|
"working",
|
|
"finished",
|
|
"failed",
|
|
"delivery-unknown",
|
|
"recovered-as-draft",
|
|
"recovery-failed",
|
|
"dispatch-refused"
|
|
]
|
|
},
|
|
"nativeRequest": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"recoveredDraft": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"createdAt": {
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
"frozenPayload": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"policyRevision": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"grantRevision": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"failureReason": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"request",
|
|
"actor",
|
|
"target",
|
|
"revision",
|
|
"draft",
|
|
"payloadDigest",
|
|
"state",
|
|
"nativeRequest",
|
|
"recoveredDraft",
|
|
"createdAt",
|
|
"frozenPayload",
|
|
"policyRevision",
|
|
"grantRevision",
|
|
"failureReason"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"state": {
|
|
"enum": [
|
|
"recovery-failed",
|
|
"dispatch-refused"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"failureReason": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"recoveredDraft": {
|
|
"const": null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"approvalChoice": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 500
|
|
},
|
|
"nativeChoice": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"effect": {
|
|
"enum": [
|
|
"deny",
|
|
"allow-once",
|
|
"permission-change",
|
|
"cancel"
|
|
]
|
|
},
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"disabledReason": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"cancelSafety": {
|
|
"enum": [
|
|
"not-cancel",
|
|
"unverified",
|
|
"proven-non-allow"
|
|
]
|
|
},
|
|
"mappingEvidence": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"label",
|
|
"nativeChoice",
|
|
"effect",
|
|
"enabled",
|
|
"disabledReason",
|
|
"cancelSafety",
|
|
"mappingEvidence"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"effect": {
|
|
"const": "permission-change"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"enabled": {
|
|
"const": false
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"effect": {
|
|
"const": "cancel"
|
|
},
|
|
"enabled": {
|
|
"const": true
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"cancelSafety": {
|
|
"const": "proven-non-allow"
|
|
},
|
|
"mappingEvidence": {
|
|
"$ref": "#/$defs/id"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"approval": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "approval"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"target": {
|
|
"$ref": "#/$defs/target"
|
|
},
|
|
"nativeRequest": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"toolCall": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"tool": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"intentDigest": {
|
|
"$ref": "#/$defs/digest"
|
|
},
|
|
"policyRevision": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"choices": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/approvalChoice"
|
|
},
|
|
"maxItems": 32
|
|
},
|
|
"state": {
|
|
"enum": [
|
|
"pending",
|
|
"superseded",
|
|
"resolved",
|
|
"expired",
|
|
"cancelled",
|
|
"uncertain",
|
|
"resolved-natively"
|
|
]
|
|
},
|
|
"deadline": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"chosen": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"createdAt": {
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
"decision": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"resolvedBy": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"dialogForm": {
|
|
"enum": [
|
|
"permission",
|
|
"confirm",
|
|
"select",
|
|
"input",
|
|
"editor"
|
|
]
|
|
},
|
|
"intentDisplay": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"text": {
|
|
"type": "string",
|
|
"maxLength": 262144
|
|
},
|
|
"visibility": {
|
|
"enum": [
|
|
"available",
|
|
"unavailable"
|
|
]
|
|
},
|
|
"complete": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"text",
|
|
"visibility",
|
|
"complete"
|
|
]
|
|
},
|
|
"unsupportedReason": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"target",
|
|
"nativeRequest",
|
|
"toolCall",
|
|
"tool",
|
|
"intentDigest",
|
|
"policyRevision",
|
|
"choices",
|
|
"state",
|
|
"deadline",
|
|
"chosen",
|
|
"createdAt",
|
|
"decision",
|
|
"resolvedBy",
|
|
"dialogForm",
|
|
"intentDisplay",
|
|
"unsupportedReason"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"dialogForm": {
|
|
"not": {
|
|
"const": "permission"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"unsupportedReason": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"choices": {
|
|
"items": {
|
|
"properties": {
|
|
"enabled": {
|
|
"const": false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"intentDisplay": {
|
|
"properties": {
|
|
"visibility": {
|
|
"const": "unavailable"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"intentDisplay": {
|
|
"properties": {
|
|
"text": {
|
|
"const": ""
|
|
},
|
|
"complete": {
|
|
"const": false
|
|
}
|
|
}
|
|
},
|
|
"choices": {
|
|
"items": {
|
|
"properties": {
|
|
"enabled": {
|
|
"const": false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"confirmation": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "confirmation"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"actor": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"connection": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"target": {
|
|
"$ref": "#/$defs/target"
|
|
},
|
|
"operation": {
|
|
"enum": [
|
|
"force-stop",
|
|
"recover",
|
|
"acquire-recovery-control"
|
|
]
|
|
},
|
|
"intentDigest": {
|
|
"$ref": "#/$defs/digest"
|
|
},
|
|
"expiresAt": {
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
"state": {
|
|
"enum": [
|
|
"pending",
|
|
"confirmed",
|
|
"consumed",
|
|
"expired",
|
|
"cancelled"
|
|
]
|
|
},
|
|
"connectionGeneration": {
|
|
"$ref": "#/$defs/generation"
|
|
},
|
|
"stop": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"actor",
|
|
"connection",
|
|
"target",
|
|
"operation",
|
|
"intentDigest",
|
|
"expiresAt",
|
|
"state",
|
|
"connectionGeneration",
|
|
"stop"
|
|
]
|
|
},
|
|
"stop": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "stop"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"request": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"target": {
|
|
"$ref": "#/$defs/target"
|
|
},
|
|
"mode": {
|
|
"enum": [
|
|
"interrupt",
|
|
"force-stop",
|
|
"revocation"
|
|
]
|
|
},
|
|
"state": {
|
|
"enum": [
|
|
"requested",
|
|
"fenced",
|
|
"cancelling",
|
|
"stopping",
|
|
"uncertain",
|
|
"turn-interrupted",
|
|
"stopped",
|
|
"superseded",
|
|
"control-reconciled"
|
|
]
|
|
},
|
|
"queueDrafts": {
|
|
"$ref": "#/$defs/ids"
|
|
},
|
|
"cohortRef": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"supervisorEvidence": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"effectsEvidence": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"externalEffects": {
|
|
"enum": [
|
|
"none",
|
|
"completed",
|
|
"uncertain"
|
|
]
|
|
},
|
|
"createdAt": {
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
"nativeQueue": {
|
|
"enum": [
|
|
"pending",
|
|
"cleared",
|
|
"unknown"
|
|
]
|
|
},
|
|
"approvalDisposition": {
|
|
"enum": [
|
|
"pending",
|
|
"cancelled",
|
|
"resolved",
|
|
"uncertain"
|
|
]
|
|
},
|
|
"turnEvidence": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"supersedes": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"queueFailures": {
|
|
"$ref": "#/$defs/ids"
|
|
},
|
|
"revokedConnection": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"request",
|
|
"target",
|
|
"mode",
|
|
"state",
|
|
"queueDrafts",
|
|
"cohortRef",
|
|
"supervisorEvidence",
|
|
"effectsEvidence",
|
|
"externalEffects",
|
|
"createdAt",
|
|
"nativeQueue",
|
|
"approvalDisposition",
|
|
"turnEvidence",
|
|
"supersedes",
|
|
"queueFailures",
|
|
"revokedConnection"
|
|
]
|
|
},
|
|
"frozenPayload": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "frozenPayload"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"actor": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"conversation": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"branch": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"draft": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"draftRevision": {
|
|
"$ref": "#/$defs/generation"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"minLength": 0,
|
|
"maxLength": 262144
|
|
},
|
|
"uploads": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/upload"
|
|
},
|
|
"maxItems": 10
|
|
},
|
|
"digest": {
|
|
"$ref": "#/$defs/digest"
|
|
},
|
|
"createdAt": {
|
|
"$ref": "#/$defs/time"
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"actor",
|
|
"conversation",
|
|
"branch",
|
|
"draft",
|
|
"draftRevision",
|
|
"text",
|
|
"uploads",
|
|
"digest",
|
|
"createdAt"
|
|
]
|
|
},
|
|
"nativeDecision": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "nativeDecision"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"conversation": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"branch": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"execution": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"nativeRequest": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"toolCall": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"intentDigest": {
|
|
"$ref": "#/$defs/digest"
|
|
},
|
|
"policyRevision": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"state": {
|
|
"enum": [
|
|
"pending",
|
|
"resolved",
|
|
"expired",
|
|
"cancelled",
|
|
"uncertain",
|
|
"resolved-natively"
|
|
]
|
|
},
|
|
"chosen": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"resolvedBy": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"nativeEvidence": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"conversation",
|
|
"branch",
|
|
"execution",
|
|
"nativeRequest",
|
|
"toolCall",
|
|
"intentDigest",
|
|
"policyRevision",
|
|
"state",
|
|
"chosen",
|
|
"resolvedBy",
|
|
"nativeEvidence"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"state": {
|
|
"const": "resolved-natively"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"nativeEvidence": {
|
|
"$ref": "#/$defs/id"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"cohortMember": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"pid": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 2147483647
|
|
},
|
|
"boot": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"startTicks": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"terminatedAt": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"pid",
|
|
"boot",
|
|
"startTicks",
|
|
"terminatedAt"
|
|
]
|
|
},
|
|
"cohortProof": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "cohortProof"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"authority": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"conversation": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"execution": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"cohortRef": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"membershipEpoch": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"membershipComplete": {
|
|
"type": "boolean"
|
|
},
|
|
"members": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/cohortMember"
|
|
},
|
|
"maxItems": 4096
|
|
},
|
|
"observedAt": {
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
"verificationDigest": {
|
|
"$ref": "#/$defs/digest"
|
|
},
|
|
"stop": {
|
|
"$ref": "#/$defs/id"
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"authority",
|
|
"conversation",
|
|
"execution",
|
|
"cohortRef",
|
|
"membershipEpoch",
|
|
"membershipComplete",
|
|
"members",
|
|
"observedAt",
|
|
"verificationDigest",
|
|
"stop"
|
|
]
|
|
},
|
|
"effectReport": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "effectReport"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"authority": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"conversation": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"execution": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"cohortRef": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"invocations": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"disposition": {
|
|
"enum": [
|
|
"completed",
|
|
"uncertain",
|
|
"not-started",
|
|
"pending"
|
|
]
|
|
},
|
|
"evidence": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"disposition",
|
|
"evidence"
|
|
]
|
|
},
|
|
"maxItems": 4096
|
|
},
|
|
"observedAt": {
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
"verificationDigest": {
|
|
"$ref": "#/$defs/digest"
|
|
},
|
|
"stop": {
|
|
"$ref": "#/$defs/id"
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"authority",
|
|
"conversation",
|
|
"execution",
|
|
"cohortRef",
|
|
"invocations",
|
|
"observedAt",
|
|
"verificationDigest",
|
|
"stop"
|
|
]
|
|
},
|
|
"turnProof": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "turnProof"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"authority": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"conversation": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"execution": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"stop": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"cohortRef": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"nativeQueue": {
|
|
"enum": [
|
|
"cleared",
|
|
"unknown"
|
|
]
|
|
},
|
|
"nativePending": {
|
|
"$ref": "#/$defs/ids"
|
|
},
|
|
"turnState": {
|
|
"enum": [
|
|
"interrupted",
|
|
"unknown",
|
|
"input-reconciled"
|
|
]
|
|
},
|
|
"approvalDisposition": {
|
|
"enum": [
|
|
"cancelled",
|
|
"resolved",
|
|
"uncertain",
|
|
"pending-reprojected"
|
|
]
|
|
},
|
|
"effectsEvidence": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"observedAt": {
|
|
"$ref": "#/$defs/time"
|
|
},
|
|
"verificationDigest": {
|
|
"$ref": "#/$defs/digest"
|
|
},
|
|
"decisionOutcomes": {
|
|
"type": "array",
|
|
"maxItems": 32,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"decision": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"state": {
|
|
"enum": [
|
|
"cancelled",
|
|
"resolved-natively"
|
|
]
|
|
},
|
|
"chosen": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"nativeEvidence": {
|
|
"$ref": "#/$defs/id"
|
|
}
|
|
},
|
|
"required": [
|
|
"decision",
|
|
"state",
|
|
"chosen",
|
|
"nativeEvidence"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"authority",
|
|
"conversation",
|
|
"execution",
|
|
"stop",
|
|
"cohortRef",
|
|
"nativeQueue",
|
|
"nativePending",
|
|
"turnState",
|
|
"approvalDisposition",
|
|
"effectsEvidence",
|
|
"observedAt",
|
|
"verificationDigest",
|
|
"decisionOutcomes"
|
|
]
|
|
},
|
|
"draftListing": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "draftListing"
|
|
},
|
|
"actor": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"conversation": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"snapshotRevision": {
|
|
"$ref": "#/$defs/generation"
|
|
},
|
|
"drafts": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/draft"
|
|
},
|
|
"maxItems": 100
|
|
},
|
|
"uploads": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/upload"
|
|
},
|
|
"maxItems": 100
|
|
},
|
|
"nextCursor": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"actor",
|
|
"conversation",
|
|
"snapshotRevision",
|
|
"drafts",
|
|
"uploads",
|
|
"nextCursor"
|
|
]
|
|
},
|
|
"clientView": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"const": 2
|
|
},
|
|
"kind": {
|
|
"const": "clientView"
|
|
},
|
|
"id": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"connection": {
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
"revision": {
|
|
"$ref": "#/$defs/generation"
|
|
},
|
|
"target": {
|
|
"$ref": "#/$defs/target"
|
|
},
|
|
"controlMode": {
|
|
"enum": [
|
|
"observer",
|
|
"controller"
|
|
]
|
|
},
|
|
"operations": {
|
|
"type": "array",
|
|
"maxItems": 20,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {
|
|
"enum": [
|
|
"observe",
|
|
"prompt",
|
|
"takeover",
|
|
"edit-queued",
|
|
"cancel-queued",
|
|
"approval",
|
|
"interrupt",
|
|
"force-stop",
|
|
"recover",
|
|
"acquire-recovery-control",
|
|
"list-drafts",
|
|
"create-draft",
|
|
"update-draft",
|
|
"discard-draft",
|
|
"begin-upload",
|
|
"append-upload",
|
|
"complete-upload",
|
|
"discard-upload",
|
|
"issue-confirmation",
|
|
"answer-confirmation"
|
|
]
|
|
},
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"reason": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/id"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"operation",
|
|
"enabled",
|
|
"reason"
|
|
]
|
|
}
|
|
},
|
|
"limits": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"attachments": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 10
|
|
},
|
|
"fileBytes": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 20971520
|
|
},
|
|
"messageBytes": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 104857600
|
|
},
|
|
"verified": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"attachments",
|
|
"fileBytes",
|
|
"messageBytes",
|
|
"verified"
|
|
]
|
|
},
|
|
"createdAt": {
|
|
"$ref": "#/$defs/time"
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"kind",
|
|
"id",
|
|
"connection",
|
|
"revision",
|
|
"target",
|
|
"controlMode",
|
|
"operations",
|
|
"limits",
|
|
"createdAt"
|
|
]
|
|
}
|
|
}
|
|
}
|