主题
runtime-session
Generated reference page for
spec/v1/schemas/commands/runtime-session.json.
Metadata
- Type: JSON Schema
- Source:
spec/v1/schemas/commands/runtime-session.json - Raw: View Raw
Summary
- Schema ID: https://agent-service.spec/v1/schemas/commands/runtime-session.json
- Defs: 17
- Properties: 0
- Required: 0
Source
json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://agent-service.spec/v1/schemas/commands/runtime-session.json",
"$defs": {
"RuntimeCapability": {
"type": "string",
"enum": [
"secrets.read",
"kv.read",
"kv.write",
"checkpoint.save",
"checkpoint.load",
"subtasks.run",
"stream.resume"
]
},
"RuntimeAttachRequest": {
"type": "object",
"additionalProperties": false,
"required": ["runId", "runtimeInstanceId", "protocolVersion"],
"properties": {
"runId": {
"$ref": "../common/identity.json#/$defs/runId"
},
"attemptId": {
"$ref": "../common/identity.json#/$defs/attemptId"
},
"runtimeInstanceId": {
"$ref": "../common/identity.json#/$defs/opaqueId"
},
"protocolVersion": {
"type": "string"
},
"reconnect": {
"type": "boolean",
"default": false
},
"connectionEpoch": {
"type": "integer",
"minimum": 0
},
"capabilities": {
"type": "array",
"items": {
"$ref": "#/$defs/RuntimeCapability"
}
}
}
},
"RuntimeAttachResponse": {
"type": "object",
"additionalProperties": false,
"required": ["sessionId", "runId", "heartbeatIntervalMs", "leaseExpiresAt"],
"properties": {
"sessionId": {
"$ref": "../common/identity.json#/$defs/sessionId"
},
"runId": {
"$ref": "../common/identity.json#/$defs/runId"
},
"heartbeatIntervalMs": {
"type": "integer",
"minimum": 1000
},
"leaseExpiresAt": {
"$ref": "../common/identity.json#/$defs/timestamp"
},
"configVersion": {
"type": "string"
}
}
},
"HeartbeatCommand": {
"type": "object",
"additionalProperties": false,
"required": ["sessionId", "runId"],
"properties": {
"sessionId": {
"$ref": "../common/identity.json#/$defs/sessionId"
},
"runId": {
"$ref": "../common/identity.json#/$defs/runId"
},
"runtimeInstanceId": {
"$ref": "../common/identity.json#/$defs/opaqueId"
},
"metadata": {
"type": "object",
"additionalProperties": true
}
}
},
"HeartbeatResponse": {
"type": "object",
"additionalProperties": false,
"required": ["accepted", "nextHeartbeatDueAt"],
"properties": {
"accepted": {
"type": "boolean"
},
"nextHeartbeatDueAt": {
"$ref": "../common/identity.json#/$defs/timestamp"
}
}
},
"RecoverConnectionsCommand": {
"type": "object",
"additionalProperties": false,
"required": ["sessionId", "mainRunId"],
"properties": {
"sessionId": {
"$ref": "../common/identity.json#/$defs/sessionId"
},
"mainRunId": {
"$ref": "../common/identity.json#/$defs/runId"
},
"subRunIds": {
"type": "array",
"items": {
"$ref": "../common/identity.json#/$defs/runId"
}
},
"connectionEpoch": {
"type": "integer",
"minimum": 0
}
}
},
"RecoverConnectionsResponse": {
"type": "object",
"additionalProperties": false,
"required": ["accepted"],
"properties": {
"accepted": {
"type": "boolean"
}
}
},
"GetSecretsCommand": {
"type": "object",
"additionalProperties": false,
"required": ["sessionId", "runId"],
"properties": {
"sessionId": {
"$ref": "../common/identity.json#/$defs/sessionId"
},
"runId": {
"$ref": "../common/identity.json#/$defs/runId"
},
"names": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"GetSecretsResponse": {
"type": "object",
"additionalProperties": false,
"required": ["secrets"],
"properties": {
"secrets": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"GetConfigCommand": {
"type": "object",
"additionalProperties": false,
"required": ["sessionId", "runId"],
"properties": {
"sessionId": {
"$ref": "../common/identity.json#/$defs/sessionId"
},
"runId": {
"$ref": "../common/identity.json#/$defs/runId"
}
}
},
"GetConfigResponse": {
"type": "object",
"additionalProperties": false,
"required": ["config"],
"properties": {
"config": {
"type": "object",
"additionalProperties": true
}
}
},
"GetKVCommand": {
"type": "object",
"additionalProperties": false,
"required": ["sessionId", "runId", "keys"],
"properties": {
"sessionId": {
"$ref": "../common/identity.json#/$defs/sessionId"
},
"runId": {
"$ref": "../common/identity.json#/$defs/runId"
},
"keys": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"GetKVResponse": {
"type": "object",
"additionalProperties": false,
"required": ["kv"],
"properties": {
"kv": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"SetKVCommand": {
"type": "object",
"additionalProperties": false,
"required": ["sessionId", "runId", "kv"],
"properties": {
"sessionId": {
"$ref": "../common/identity.json#/$defs/sessionId"
},
"runId": {
"$ref": "../common/identity.json#/$defs/runId"
},
"kv": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"SetKVResponse": {
"type": "object",
"additionalProperties": false,
"required": ["accepted"],
"properties": {
"accepted": {
"type": "boolean"
}
}
},
"PublishOutputEventsRequest": {
"type": "object",
"additionalProperties": false,
"required": ["sessionId", "runId", "events"],
"properties": {
"sessionId": {
"$ref": "../common/identity.json#/$defs/sessionId"
},
"runId": {
"$ref": "../common/identity.json#/$defs/runId"
},
"events": {
"type": "array",
"items": {
"$ref": "../events/output-event.json#/$defs/OutputEvent"
}
}
}
},
"PublishOutputEventsResponse": {
"type": "object",
"additionalProperties": false,
"required": ["accepted"],
"properties": {
"accepted": {
"type": "boolean"
}
}
}
}
}