Developer Overview
Developer Overview
หัวข้อที่มีชื่อว่า “Developer Overview”KOBI now runs as a coordinated multi-service system with explicit trust boundaries.
Runtime Map
หัวข้อที่มีชื่อว่า “Runtime Map”flowchart LR
subgraph UI[Browser in kobi-ai]
CHAT[Chat UI]
CANVAS[Canvas UI]
FILES[File Upload UI]
end
subgraph BFF[kobi-ai Next.js API]
AIAPI["/api/ai/*"]
CAPI["/api/canvas/*"]
ICAPI["/api/internal/canvas/context"]
end
subgraph ENG[kobi-agent-service]
GRAPH[LangGraph Runtime]
SSE[SSE Streaming]
HITL[Interrupt and Resume]
end
subgraph MCP[kobi-mcp-server]
TOOLS[Tool Registry]
RES[Resource Registry]
end
subgraph DB[Supabase]
THREADS[kobi_chat_threads]
MSG[kobi_chat_messages]
CANVASN[kobi_canvas_nodes]
CANVASE[kobi_canvas_edges]
DOCS[kobi_documents]
end
CHAT --> AIAPI
CANVAS --> CAPI
FILES --> AIAPI
CHAT --> THREADS
CHAT --> MSG
AIAPI --> ENG
CAPI --> DB
ICAPI --> DB
ENG --> MCP
MCP --> DB
ENG --> SSE
ENG --> HITL
Important Current-State Notes
หัวข้อที่มีชื่อว่า “Important Current-State Notes”- Browser chat thread/message persistence is currently direct Supabase client access (
kobi_chat_threads,kobi_chat_messages) with user scope checks. - AI inference calls still use BFF (
/api/ai/chat,/api/ai/stream,/api/ai/resume) and never call engine directly from browser. - BFF enforces request/metadata allowlists and forwards only normalized payload to engine.
- Engine validates internal contract headers and claims, then runs workflow + tool execution.
- MCP enforces tool-level auth/scope/gating and mutation context for side-effect tools.