54 lines
2.1 KiB
JSON
54 lines
2.1 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://paperclip.dev/schemas/prp/v2/command.schema.json",
|
|
"title": "PRP v2 runner command",
|
|
"type": "object",
|
|
"required": ["schema", "commandId", "controllerSeq", "type", "issuedAt", "payload"],
|
|
"properties": {
|
|
"schema": { "const": "paperclip.prp.command.v2" },
|
|
"commandId": { "type": "string", "minLength": 1, "maxLength": 160 },
|
|
"controllerSeq": { "type": "integer", "minimum": 1 },
|
|
"type": {
|
|
"enum": [
|
|
"run.prepare", "run.attach", "session.open", "turn.start", "turn.steer", "turn.interrupt", "turn.stop",
|
|
"request.resolve", "interaction.receipt", "semantic_tool.result", "session.snapshot", "session.close",
|
|
"session.budget.increase", "session.destroy", "run.cancel", "runner.drain", "runner.suspend", "runner.shutdown",
|
|
"session.goal.get", "session.goal.set", "session.goal.clear"
|
|
]
|
|
},
|
|
"issuedAt": { "type": "string", "format": "date-time" },
|
|
"deadlineAt": { "type": "string", "format": "date-time" },
|
|
"precondition": {
|
|
"type": "object",
|
|
"properties": {
|
|
"runnerState": { "type": "array", "items": { "type": "string" } },
|
|
"runState": { "type": "array", "items": { "type": "string" } },
|
|
"sessionState": { "type": "array", "items": { "type": "string" } },
|
|
"activeTurnId": { "type": ["string", "null"] }
|
|
},
|
|
"additionalProperties": true
|
|
},
|
|
"payload": { "type": "object", "additionalProperties": true }
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": { "properties": { "type": { "const": "session.goal.set" } } },
|
|
"then": {
|
|
"properties": {
|
|
"payload": {
|
|
"type": "object",
|
|
"properties": {
|
|
"requestId": { "type": "string", "minLength": 1, "maxLength": 160 },
|
|
"objective": { "type": "string", "minLength": 1, "maxLength": 4000 },
|
|
"status": { "enum": ["active", "paused"] },
|
|
"tokenBudget": { "type": ["integer", "null"], "minimum": 1 }
|
|
},
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"additionalProperties": true
|
|
}
|