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

Scope Model and Data Ownership

  • projectId: isolation boundary
  • threadId: conversation boundary
  • boardId: board workspace scope (idea/strategy)
  • mapId: map workspace scope (maps)
  • dashboardId: analytics workspace scope
  • shareSessionId: shared-access boundary
  • agentId: mode/tool policy boundary
erDiagram
  PROJECT ||--o{ THREAD : contains
  THREAD ||--o{ MESSAGE : has
  THREAD ||--o{ SCOPE_MAP : maps_to
  SCOPE_MAP }o--|| BOARD : optional
  SCOPE_MAP }o--|| MAP : optional
  SCOPE_MAP }o--|| DASHBOARD : optional
  THREAD ||--o{ SHARE_SESSION : optional

  PROJECT {
    uuid project_id
  }
  THREAD {
    uuid thread_id
    uuid project_id
    string agent_id
  }
  MESSAGE {
    uuid message_id
    uuid thread_id
  }
  SCOPE_MAP {
    uuid thread_id
    uuid board_id
    uuid map_id
    uuid dashboard_id
  }
  BOARD {
    uuid board_id
  }
  MAP {
    uuid map_id
  }
  DASHBOARD {
    uuid dashboard_id
  }
  SHARE_SESSION {
    uuid share_session_id
    uuid thread_id
  }
โหมดWorkspaceCanonical scopeก่อนส่งแชตต้องมีอะไรหมายเหตุ
generalchat-onlythreadIdthreadไม่มี dedicated canvas
ideaidea-canvasboardIdboard + threadproposal/HITL เข้ม
strategystrategy-canvasboardIdboard + threadframework item lifecycle
mapsmap-canvasmapIdmap + threadrealtime room map-first
analyticsanalyze-canvasdashboardIddashboard readiness + threaddataset/template gate
ส่วนข้อมูลOwner หลักจุดเขียนหลัก
Chat threads/messageschat APIs + client lifecycle/api/chat/* และ chat persistence paths
Scope mappingBFF chat/scope serviceskobi_scope_threads synchronization
Canvas nodes/edgescanvas/maps/dashboard services/api/canvas/*, /api/maps/*, /api/dashboard/*
Decision/HITL metadataaction + resume flow/api/ai/resume + decision telemetry paths
Realtime docs (maps)maps realtime pipeline`/api/maps/realtime/token
  1. สำหรับ workspace APIs ต้องมี scope สำคัญที่ถูกต้อง (boardId หรือ mapId หรือ dashboardId) ตาม endpoint
  2. Thread/message/history ต้อง reject ทันทีเมื่อ scope mismatch กับ thread metadata
  3. ต้อง canonicalize URL/state ให้ scope ครบเมื่อ recover context ได้
  4. ต้องไม่ปล่อยให้ client ส่ง metadata นอก allowlist ผ่าน AI proxy