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

Mode Execution Model

หมายเหตุ: ไฟล์นี้แทนบทเดิมที่เคยอธิบาย MCP โดย baseline ปัจจุบันโฟกัส mode execution ภายใน kobi-ai

flowchart LR
  M[agent manifests] --> R[registerBuiltinModes]
  C[canvas registry] --> K[KobiProvider init]
  R --> K
  K --> MM[modeManager.initialize]
  MM --> AS[active mode state]
  AS --> DL[DynamicCanvasLoader]
  DL --> WS[workspace component]
  • analyze -> analytics
  • analyze-canvas -> analytics
  • map -> maps

สิ่งนี้ช่วยให้ deep-link และ legacy route ยังคงทำงานได้ระหว่างช่วง migration

ModeWorkspace IDScope modelจุดพิเศษ runtime
generalchat-onlythread-firstไม่มี dedicated workspace
ideaidea-canvasboard-firstproposal/HITL และ node stage lifecycle
strategystrategy-canvasboard-firstframework item lifecycle + hidden fingerprints
mapsmap-canvasmap-firstrealtime room + geospatial nodes
analyticsanalyze-canvasdashboard-firstreadiness gate (dataset/template)
flowchart TB
  A[enter /chat or /chat/:threadId] --> B[load route state]
  B --> C{thread metadata exists?}
  C -- yes --> D[useUnifiedChatAgentSync switches mode]
  C -- no --> E[use activeModeId or shareAgentId]
  D --> F[resolve workspace scope]
  E --> F
  F --> G[bootstrap thread/canvas props]
  G --> H[render ChatPane + Workspace]
  1. เพิ่ม mode ใหม่ต้องผูกให้ครบ: manifest + workspace alias + policy + scope handling
  2. ห้าม hardcode mode-specific behavior กระจายในหลาย component
  3. ต้องคง canonical scope key ของ mode ให้ครบทุก endpoint ที่เกี่ยวข้อง