ข้ามไปยังเนื้อหา

Mode Tool/Node Capability Contract

flowchart LR
  A["Agent manifest"] --> B["Resolve tool ids"]
  B --> C["Tool policy"]
  C --> D["Node registry"]
  D --> E["Workspace renderer"]
  E --> F["Action proposals"]
  F --> G["Human decision"]
  G --> H["Persisted nodes"]

จุดสำคัญคือ contract นี้ทำให้ “สิ่งที่ agent ขอได้” ตรงกับ “สิ่งที่ workspace เก็บและแสดงได้”

ModeNode types หลักTool behavior
general(ไม่มี workspace nodes โดยตรง)chat-centric tools
ideaidea, research_result, concept, master_vision, frame, action_plan, action_task, documentproposal-heavy + HITL
strategystrategy_itemframework-based proposal + HITL
mapslocation, heat_zone, air_quality, route_path, point_cluster, area_zonegeospatial actions + realtime apply
analyticsdashboard/widget context objectsdataset/template-driven actions
sequenceDiagram
  participant AI as AI stream
  participant UI as Chat UI
  participant HITL as Decision layer
  participant WS as Workspace store
  participant API as Workspace API

  AI-->>UI: tool actions and metadata
  UI->>HITL: submit decision
  HITL->>API: apply decision by scope
  API-->>WS: persisted node change
  WS-->>UI: refresh workspace state
  1. เพิ่ม/แก้ manifest capability (toolIds, workspaceId)
  2. ผูก toolPolicy ให้ tool เชื่อม node type ที่ถูกต้อง
  3. ยืนยัน validation ใน nodeRegistry ว่ารับ schema ที่ tool ส่งจริง
  4. ทดสอบ cycle: action proposal -> approve/reject -> resume -> persisted render
  5. เพิ่ม integration tests สำหรับโหมดที่ได้รับผลกระทบ