aps-agent/shared/schemas/ui_block.schema.json

39 lines
1.8 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "aps://shared/ui_block",
"title": "UIBlock",
"description": "UI 块:后端/LLM 与前端之间的渲染契约(plan.md §6.2)。M1 实现 text 与 confirm-card 两种。",
"type": "object",
"required": ["blockId", "type", "props"],
"properties": {
"interfaceVersion": { "description": "跨层契约版本", "type": "string", "const": "1.0", "default": "1.0" },
"blockId": { "description": "块唯一 ID", "type": "string" },
"type": {
"description": "块类型(M2 子集;后续按 §6.2 扩展 gantt/due-board 等)",
"type": "string",
"enum": [
"text", "confirm-card", "evidence", "scenario-cards", "report",
"flex-schedule", "flex-capacity", "flex-due", "flex-compare",
"plan-trace", "conflict-center", "kpi-dashboard", "compare-table",
"guidance", "readiness", "clarify", "wizard", "folder-pack", "project-analyze", "drawing-analysis"
]
},
"props": { "description": "该块的数据载荷", "type": "object" },
"actions": {
"description": "块内可触发的动作(回传给后端)",
"type": "array",
"items": {
"type": "object",
"required": ["actionId", "label", "power"],
"properties": {
"actionId": { "description": "动作 ID", "type": "string" },
"label": { "description": "按钮文案", "type": "string" },
"power": { "description": "权力等级(P2/P3 须过门禁)", "type": "string", "enum": ["P0", "P1", "P2", "P3"] },
"payload": { "description": "携带参数", "type": "object" }
}
}
},
"evidenceRefs": { "description": "关联证据 ID 列表", "type": "array", "items": { "type": "string" } }
}
}