Mode Execution Model
Mode Execution Model
หัวข้อที่มีชื่อว่า “Mode Execution Model”หมายเหตุ: ไฟล์นี้แทนบทเดิมที่เคยอธิบาย MCP โดย baseline ปัจจุบันโฟกัส mode execution ภายใน
kobi-ai
Mode Bootstrap Pipeline
หัวข้อที่มีชื่อว่า “Mode Bootstrap Pipeline”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]
Alias Normalization
หัวข้อที่มีชื่อว่า “Alias Normalization”analyze->analyticsanalyze-canvas->analyticsmap->maps
สิ่งนี้ช่วยให้ deep-link และ legacy route ยังคงทำงานได้ระหว่างช่วง migration
Mode Behavior Matrix
หัวข้อที่มีชื่อว่า “Mode Behavior Matrix”| Mode | Workspace ID | Scope model | จุดพิเศษ runtime |
|---|---|---|---|
general | chat-only | thread-first | ไม่มี dedicated workspace |
idea | idea-canvas | board-first | proposal/HITL และ node stage lifecycle |
strategy | strategy-canvas | board-first | framework item lifecycle + hidden fingerprints |
maps | map-canvas | map-first | realtime room + geospatial nodes |
analytics | analyze-canvas | dashboard-first | readiness gate (dataset/template) |
Runtime Mode Selection (Deep-Link Aware)
หัวข้อที่มีชื่อว่า “Runtime Mode Selection (Deep-Link Aware)”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]
Engineering Guidance
หัวข้อที่มีชื่อว่า “Engineering Guidance”- เพิ่ม mode ใหม่ต้องผูกให้ครบ: manifest + workspace alias + policy + scope handling
- ห้าม hardcode mode-specific behavior กระจายในหลาย component
- ต้องคง canonical scope key ของ mode ให้ครบทุก endpoint ที่เกี่ยวข้อง