{
"$defs": {
"AgentMessageDeltaParams": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "number"
},
"delta": {
"type": "string"
},
"itemId": {
"type": "string"
},
"payload": {
"additionalProperties": true,
"type": "object"
},
"status": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
},
"type": {
"type": "string"
},
"updatedAt": {
"type": "number"
}
},
"required": [
"itemId",
"threadId",
"turnId",
"type",
"status",
"payload",
"createdAt",
"updatedAt",
"delta"
],
"type": "object"
},
"AppItem": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "number"
},
"itemId": {
"type": "string"
},
"payload": {
"additionalProperties": true,
"type": "object"
},
"status": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
},
"type": {
"type": "string"
},
"updatedAt": {
"type": "number"
}
},
"required": [
"itemId",
"threadId",
"turnId",
"type",
"status",
"payload",
"createdAt",
"updatedAt"
],
"type": "object"
},
"AppThread": {
"additionalProperties": false,
"properties": {
"agentKey": {
"type": "string"
},
"archivedAt": {
"type": [
"number",
"null"
]
},
"createdAt": {
"type": "number"
},
"cwd": {
"type": [
"string",
"null"
]
},
"metadata": {
"additionalProperties": true,
"type": "object"
},
"status": {
"type": "string"
},
"threadId": {
"type": "string"
},
"updatedAt": {
"type": "number"
}
},
"required": [
"threadId",
"agentKey",
"cwd",
"createdAt",
"updatedAt",
"archivedAt",
"status",
"metadata"
],
"type": "object"
},
"AppTurn": {
"additionalProperties": false,
"properties": {
"completedAt": {
"type": [
"number",
"null"
]
},
"input": {
"items": {
"$ref": "#/$defs/InputItem"
},
"type": "array"
},
"result": {
"additionalProperties": true,
"type": "object"
},
"runId": {
"type": [
"string",
"null"
]
},
"startedAt": {
"type": "number"
},
"status": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"turnId",
"threadId",
"runId",
"status",
"startedAt",
"completedAt",
"input",
"result"
],
"type": "object"
},
"ApprovalDecision": {
"enum": [
"allow",
"allow_session",
"deny",
"timeout"
],
"type": "string"
},
"ApprovalRequestParams": {
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": true,
"type": "object"
},
"preview": {
"type": "string"
},
"requestId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"toolCallId": {
"type": "string"
},
"toolName": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"requestId",
"threadId",
"turnId",
"toolCallId",
"toolName",
"preview",
"arguments"
],
"type": "object"
},
"ApprovalResolveParams": {
"additionalProperties": false,
"properties": {
"decision": {
"enum": [
"allow",
"allow_session",
"deny",
"timeout"
],
"type": "string"
},
"metadata": {
"additionalProperties": true,
"type": "object"
},
"reason": {
"type": "string"
},
"requestId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"requestId",
"threadId",
"turnId",
"decision"
],
"type": "object"
},
"ApprovalResolveResponse": {
"additionalProperties": false,
"properties": {},
"type": "object"
},
"ClientCapabilities": {
"additionalProperties": false,
"properties": {
"experimentalApi": {
"type": "boolean"
},
"optOutNotificationMethods": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"ClientInfo": {
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"title": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"EmptyParams": {
"additionalProperties": false,
"properties": {},
"type": "object"
},
"InitializeParams": {
"additionalProperties": false,
"properties": {
"capabilities": {
"$ref": "#/$defs/ClientCapabilities"
},
"clientInfo": {
"$ref": "#/$defs/ClientInfo"
}
},
"required": [
"clientInfo"
],
"type": "object"
},
"InitializeResponse": {
"additionalProperties": false,
"properties": {
"capabilities": {
"$ref": "#/$defs/ServerCapabilities"
},
"protocolVersion": {
"const": "v1"
},
"userAgent": {
"type": "string"
}
},
"required": [
"userAgent",
"protocolVersion",
"capabilities"
],
"type": "object"
},
"InputItem": {
"additionalProperties": true,
"properties": {},
"type": "object"
},
"ModelListParams": {
"additionalProperties": false,
"properties": {
"agentKey": {
"type": "string"
},
"provider": {
"type": "string"
}
},
"type": "object"
},
"ModelListResponse": {
"additionalProperties": false,
"properties": {
"models": {
"items": {
"$ref": "#/$defs/ModelSummary"
},
"type": "array"
}
},
"required": [
"models"
],
"type": "object"
},
"ModelSummary": {
"additionalProperties": false,
"properties": {
"contextLength": {
"minimum": 0,
"type": "integer"
},
"displayName": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"additionalProperties": true,
"type": "object"
},
"provider": {
"type": "string"
},
"supportsTools": {
"type": "boolean"
}
},
"required": [
"id",
"supportsTools"
],
"type": "object"
},
"SchemaExportResponse": {
"additionalProperties": false,
"properties": {
"jsonSchema": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"typescript": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"required": [
"jsonSchema",
"typescript"
],
"type": "object"
},
"ServerCapabilities": {
"additionalProperties": false,
"properties": {
"approvalResolve": {
"type": "boolean"
},
"modelList": {
"type": "boolean"
},
"notificationOptOut": {
"type": "boolean"
},
"schemaExport": {
"type": "boolean"
},
"threadLifecycle": {
"type": "boolean"
}
},
"required": [
"modelList",
"threadLifecycle",
"notificationOptOut",
"schemaExport",
"approvalResolve"
],
"type": "object"
},
"ThreadArchiveResponse": {
"additionalProperties": false,
"properties": {
"archived": {
"type": "boolean"
},
"threadId": {
"type": "string"
}
},
"required": [
"threadId",
"archived"
],
"type": "object"
},
"ThreadArchivedParams": {
"additionalProperties": false,
"properties": {
"archived": {
"type": "boolean"
},
"threadId": {
"type": "string"
}
},
"required": [
"threadId",
"archived"
],
"type": "object"
},
"ThreadClosedParams": {
"additionalProperties": false,
"properties": {
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"type": "object"
},
"ThreadIdParams": {
"additionalProperties": false,
"properties": {
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"type": "object"
},
"ThreadListParams": {
"additionalProperties": false,
"properties": {
"archived": {
"type": "boolean"
},
"includeArchived": {
"type": "boolean"
},
"limit": {
"minimum": 0,
"type": "integer"
},
"offset": {
"minimum": 0,
"type": "integer"
}
},
"type": "object"
},
"ThreadListResponse": {
"additionalProperties": false,
"properties": {
"threads": {
"items": {
"$ref": "#/$defs/AppThread"
},
"type": "array"
}
},
"required": [
"threads"
],
"type": "object"
},
"ThreadReadParams": {
"additionalProperties": false,
"properties": {
"afterItemId": {
"type": "string"
},
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"type": "object"
},
"ThreadResumeParams": {
"additionalProperties": false,
"properties": {
"subscribe": {
"type": "boolean"
},
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"type": "object"
},
"ThreadSnapshotResponse": {
"additionalProperties": false,
"properties": {
"items": {
"items": {
"$ref": "#/$defs/AppItem"
},
"type": "array"
},
"thread": {
"$ref": "#/$defs/AppThread"
},
"turns": {
"items": {
"$ref": "#/$defs/AppTurn"
},
"type": "array"
}
},
"required": [
"thread",
"turns",
"items"
],
"type": "object"
},
"ThreadStartParams": {
"additionalProperties": false,
"properties": {
"agentKey": {
"type": "string"
},
"cwd": {
"type": "string"
},
"metadata": {
"additionalProperties": true,
"type": "object"
}
},
"type": "object"
},
"ThreadStartResponse": {
"additionalProperties": false,
"properties": {
"agentKey": {
"type": "string"
},
"cwd": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string"
},
"threadId": {
"type": "string"
}
},
"required": [
"threadId",
"agentKey",
"cwd",
"status"
],
"type": "object"
},
"ThreadStartedParams": {
"additionalProperties": false,
"properties": {
"agentKey": {
"type": "string"
},
"cwd": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string"
},
"threadId": {
"type": "string"
}
},
"required": [
"threadId",
"agentKey",
"cwd",
"status"
],
"type": "object"
},
"ThreadStatusChangedParams": {
"additionalProperties": false,
"properties": {
"status": {
"type": "string"
},
"threadId": {
"type": "string"
}
},
"required": [
"threadId",
"status"
],
"type": "object"
},
"ThreadUnsubscribeResponse": {
"additionalProperties": false,
"properties": {
"closed": {
"type": "boolean"
},
"subscribed": {
"type": "boolean"
},
"threadId": {
"type": "string"
}
},
"required": [
"threadId",
"subscribed",
"closed"
],
"type": "object"
},
"ToolCallDeltaParams": {
"additionalProperties": false,
"properties": {
"createdAt": {
"type": "number"
},
"delta": {},
"itemId": {
"type": "string"
},
"payload": {
"additionalProperties": true,
"type": "object"
},
"status": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
},
"type": {
"type": "string"
},
"updatedAt": {
"type": "number"
}
},
"required": [
"itemId",
"threadId",
"turnId",
"type",
"status",
"payload",
"createdAt",
"updatedAt",
"delta"
],
"type": "object"
},
"TurnCompletedParams": {
"additionalProperties": false,
"properties": {
"budgetExhaustion": {
"additionalProperties": true,
"type": "object"
},
"budgetUsage": {
"additionalProperties": true,
"type": "object"
},
"completionReason": {
"type": "string"
},
"completionToolName": {
"type": "string"
},
"error": {
"type": "string"
},
"finalOutput": {},
"partialOutput": {
"type": "string"
},
"runId": {
"type": "string"
},
"status": {
"type": "string"
},
"threadId": {
"type": "string"
},
"tokenUsage": {
"additionalProperties": true,
"type": "object"
},
"turnId": {
"type": "string"
},
"checkpoint": {
"$ref": "#/$defs/CheckpointSummary"
},
"interruption": {
"$ref": "#/$defs/InterruptionSummary"
}
},
"required": [
"threadId",
"turnId",
"status"
],
"type": "object"
},
"TurnFollowUpParams": {
"additionalProperties": false,
"properties": {
"expectedTurnId": {
"type": "string"
},
"input": {
"items": {
"$ref": "#/$defs/InputItem"
},
"type": "array"
},
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"type": "object"
},
"TurnInterruptParams": {
"additionalProperties": false,
"properties": {
"expectedTurnId": {
"type": "string"
},
"reason": {
"type": "string"
},
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"type": "object"
},
"TurnInterruptResponse": {
"additionalProperties": false,
"properties": {
"cancelled": {
"type": "boolean"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"threadId",
"turnId",
"cancelled"
],
"type": "object"
},
"TurnQueueResponse": {
"additionalProperties": false,
"properties": {
"queued": {
"type": "boolean"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"threadId",
"turnId",
"queued"
],
"type": "object"
},
"TurnStartParams": {
"additionalProperties": false,
"properties": {
"input": {
"items": {
"$ref": "#/$defs/InputItem"
},
"type": "array"
},
"metadata": {
"additionalProperties": true,
"type": "object"
},
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"type": "object"
},
"TurnStartResponse": {
"additionalProperties": false,
"properties": {
"status": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"threadId",
"turnId",
"status"
],
"type": "object"
},
"TurnStartedParams": {
"additionalProperties": false,
"properties": {
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
},
"runId": {
"type": "string"
},
"status": {
"type": "string"
}
},
"required": [
"threadId",
"turnId"
],
"type": "object"
},
"TurnSteerParams": {
"additionalProperties": false,
"properties": {
"expectedTurnId": {
"type": "string"
},
"input": {
"items": {
"$ref": "#/$defs/InputItem"
},
"type": "array"
},
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"type": "object"
},
"WarningParams": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
},
"CheckpointSummary": {
"additionalProperties": false,
"properties": {
"cycleIndex": {
"format": "uint64",
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"key": {
"type": "string"
},
"resumeAttempt": {
"format": "uint64",
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"status": {
"enum": [
"pending",
"running",
"wait_user",
"completed",
"failed",
"max_cycles",
"reconciliation_required"
],
"type": "string"
},
"terminalAcknowledged": {
"type": "boolean"
}
},
"required": [
"key",
"resumeAttempt",
"cycleIndex",
"status",
"terminalAcknowledged"
],
"type": "object"
},
"InterruptionSummary": {
"additionalProperties": false,
"properties": {
"cycleIndex": {
"format": "uint64",
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"idempotencySupport": {
"enum": [
"supported",
"unsupported",
"unknown"
],
"type": "string"
},
"operationId": {
"type": "string"
},
"operationKind": {
"enum": [
"model",
"tool"
],
"type": "string"
},
"reason": {
"type": "string"
},
"risk": {
"type": "string"
}
},
"required": [
"reason",
"operationId",
"operationKind",
"cycleIndex",
"risk",
"idempotencySupport"
],
"type": "object"
},
"TurnResumeParams": {
"additionalProperties": false,
"properties": {
"checkpointKey": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"threadId",
"turnId",
"checkpointKey"
],
"type": "object"
},
"TurnResumeResponse": {
"additionalProperties": false,
"properties": {
"checkpoint": {
"$ref": "#/$defs/CheckpointSummary"
},
"completionReason": {
"type": "string"
},
"completionToolName": {
"type": "string"
},
"error": {
"type": "string"
},
"finalOutput": {
"type": "string"
},
"interruption": {
"$ref": "#/$defs/InterruptionSummary"
},
"partialOutput": {
"type": "string"
},
"runId": {
"type": "string"
},
"status": {
"$ref": "#/$defs/TurnStatus"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"threadId",
"turnId",
"runId",
"status"
],
"type": "object"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"additionalProperties": false,
"properties": {
"jsonrpc": {
"const": "2.0",
"type": "string"
},
"method": {
"const": "thread/started"
},
"params": {
"$ref": "#/$defs/ThreadStartedParams"
}
},
"required": [
"jsonrpc",
"method",
"params"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"jsonrpc": {
"const": "2.0",
"type": "string"
},
"method": {
"const": "thread/status/changed"
},
"params": {
"$ref": "#/$defs/ThreadStatusChangedParams"
}
},
"required": [
"jsonrpc",
"method",
"params"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"jsonrpc": {
"const": "2.0",
"type": "string"
},
"method": {
"const": "thread/archived"
},
"params": {
"$ref": "#/$defs/ThreadArchivedParams"
}
},
"required": [
"jsonrpc",
"method",
"params"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"jsonrpc": {
"const": "2.0",
"type": "string"
},
"method": {
"const": "thread/closed"
},
"params": {
"$ref": "#/$defs/ThreadClosedParams"
}
},
"required": [
"jsonrpc",
"method",
"params"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"jsonrpc": {
"const": "2.0",
"type": "string"
},
"method": {
"const": "turn/started"
},
"params": {
"$ref": "#/$defs/TurnStartedParams"
}
},
"required": [
"jsonrpc",
"method",
"params"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"jsonrpc": {
"const": "2.0",
"type": "string"
},
"method": {
"const": "item/started"
},
"params": {
"$ref": "#/$defs/AppItem"
}
},
"required": [
"jsonrpc",
"method",
"params"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"jsonrpc": {
"const": "2.0",
"type": "string"
},
"method": {
"const": "item/agentMessage/delta"
},
"params": {
"$ref": "#/$defs/AgentMessageDeltaParams"
}
},
"required": [
"jsonrpc",
"method",
"params"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"jsonrpc": {
"const": "2.0",
"type": "string"
},
"method": {
"const": "item/toolCall/delta"
},
"params": {
"$ref": "#/$defs/ToolCallDeltaParams"
}
},
"required": [
"jsonrpc",
"method",
"params"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"jsonrpc": {
"const": "2.0",
"type": "string"
},
"method": {
"const": "item/completed"
},
"params": {
"$ref": "#/$defs/AppItem"
}
},
"required": [
"jsonrpc",
"method",
"params"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"jsonrpc": {
"const": "2.0",
"type": "string"
},
"method": {
"const": "approval/requested"
},
"params": {
"$ref": "#/$defs/ApprovalRequestParams"
}
},
"required": [
"jsonrpc",
"method",
"params"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"jsonrpc": {
"const": "2.0",
"type": "string"
},
"method": {
"const": "approval/resolved"
},
"params": {
"$ref": "#/$defs/ApprovalResolveParams"
}
},
"required": [
"jsonrpc",
"method",
"params"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"jsonrpc": {
"const": "2.0",
"type": "string"
},
"method": {
"const": "error/warning"
},
"params": {
"$ref": "#/$defs/WarningParams"
}
},
"required": [
"jsonrpc",
"method",
"params"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"jsonrpc": {
"const": "2.0",
"type": "string"
},
"method": {
"const": "turn/completed"
},
"params": {
"$ref": "#/$defs/TurnCompletedParams"
}
},
"required": [
"jsonrpc",
"method",
"params"
],
"type": "object"
}
],
"title": "ServerNotification"
}