2026-07-21 11:05:57 +08:00
|
|
|
|
{
|
|
|
|
|
|
"$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": {
|
2026-08-11 00:54:05 +08:00
|
|
|
|
"interfaceVersion": { "description": "跨层契约版本", "type": "string", "const": "1.0", "default": "1.0" },
|
2026-07-21 11:05:57 +08:00
|
|
|
|
"blockId": { "description": "块唯一 ID", "type": "string" },
|
|
|
|
|
|
"type": {
|
|
|
|
|
|
"description": "块类型(M2 子集;后续按 §6.2 扩展 gantt/due-board 等)",
|
|
|
|
|
|
"type": "string",
|
2026-07-28 02:12:46 +08:00
|
|
|
|
"enum": [
|
|
|
|
|
|
"text", "confirm-card", "evidence", "scenario-cards", "report",
|
|
|
|
|
|
"flex-schedule", "flex-capacity", "flex-due", "flex-compare",
|
|
|
|
|
|
"plan-trace", "conflict-center", "kpi-dashboard", "compare-table",
|
2026-08-11 00:54:05 +08:00
|
|
|
|
"guidance", "readiness", "clarify", "wizard", "folder-pack", "project-analyze", "drawing-analysis"
|
2026-07-28 02:12:46 +08:00
|
|
|
|
]
|
2026-07-21 11:05:57 +08:00
|
|
|
|
},
|
|
|
|
|
|
"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" } }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|