Files
LWLT-AIBOT/schemas/agent_parse_result.schema.json
2026-08-25 10:33:29 +08:00

67 lines
2.2 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://local.lwltapi/schemas/agent_parse_result.schema.json",
"title": "LTJT Agent Parse Result",
"description": "The exact JSON envelope emitted by the input-parsing Agent. Runtime, transport and execution metadata are intentionally excluded.",
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": ["status", "blockers", "operation"],
"properties": {
"status": { "const": "agent_parse_passed" },
"blockers": { "type": "array", "maxItems": 0 },
"operation": { "$ref": "./agent_operation.schema.json" }
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["status", "blockers", "operation", "missing_fields", "questions", "captured_facts", "reply"],
"properties": {
"status": { "const": "agent_parse_needs_input" },
"blockers": { "type": "array", "maxItems": 0 },
"operation": { "type": "null" },
"missing_fields": {
"type": "array",
"uniqueItems": true,
"items": { "type": "string", "minLength": 1 }
},
"questions": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["field", "prompt"],
"properties": {
"field": { "type": "string", "minLength": 1 },
"prompt": { "type": "string", "minLength": 1 }
}
}
},
"captured_facts": { "type": "object" },
"reply": { "type": "string", "minLength": 1 }
},
"anyOf": [
{ "properties": { "missing_fields": { "minItems": 1 } } },
{ "properties": { "questions": { "minItems": 1 } } }
]
},
{
"type": "object",
"additionalProperties": false,
"required": ["status", "blockers", "operation", "reply"],
"properties": {
"status": { "const": "agent_parse_blocked" },
"blockers": {
"type": "array",
"minItems": 1,
"items": { "type": "string", "minLength": 1 }
},
"operation": { "type": "null" },
"reply": { "type": "string", "minLength": 1 }
}
}
]
}