@chorus-aidlc/chorus 0.13.1 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +321 -320
- package/.next/standalone/.next/app-path-routes-manifest.json +37 -37
- package/.next/standalone/.next/build-manifest.json +5 -5
- package/.next/standalone/.next/prerender-manifest.json +27 -27
- package/.next/standalone/.next/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin/companies/new.html +1 -1
- package/.next/standalone/.next/server/app/admin/companies/new.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin/companies.html +1 -1
- package/.next/standalone/.next/server/app/admin/companies.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin.html +1 -1
- package/.next/standalone/.next/server/app/admin.rsc +2 -2
- package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent-connections/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent-connections/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/comments/route.js +1 -1
- package/.next/standalone/.next/server/app/api/comments/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/control/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon/execution-state/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/executions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon/executions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon/pending-turns/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/resume/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon/resume/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/transcript/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/transcript/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon/transcript/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon/turn-advance/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js +1 -1
- package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/events/notifications/route.js +1 -1
- package/.next/standalone/.next/server/app/api/events/notifications/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/events/route.js +1 -1
- package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/conversational/route.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/conversational/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/conversational/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mcp/route.js +2 -2
- package/.next/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/me/assignments/route.js +1 -1
- package/.next/standalone/.next/server/app/api/me/assignments/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mentionables/route.js +1 -1
- package/.next/standalone/.next/server/app/api/mentionables/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/preferences/route.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/preferences/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/read-all/route.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/read-all/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/route.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/session/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +2 -2
- package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/admin.html +1 -1
- package/.next/standalone/.next/server/app/login/admin.rsc +2 -2
- package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/callback.html +1 -1
- package/.next/standalone/.next/server/app/login/callback.rsc +2 -2
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/pick-workspace.html +1 -1
- package/.next/standalone/.next/server/app/login/pick-workspace.rsc +2 -2
- package/.next/standalone/.next/server/app/login.html +1 -1
- package/.next/standalone/.next/server/app/login.rsc +2 -2
- package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding.html +1 -1
- package/.next/standalone/.next/server/app/onboarding.rsc +2 -2
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects.html +1 -1
- package/.next/standalone/.next/server/app/projects.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +2 -2
- package/.next/standalone/.next/server/app-paths-manifest.json +37 -37
- package/.next/standalone/.next/server/chunks/1463.js +1 -0
- package/.next/standalone/.next/server/chunks/2618.js +1 -1
- package/.next/standalone/.next/server/chunks/2961.js +1 -1
- package/.next/standalone/.next/server/chunks/3219.js +1 -1
- package/.next/standalone/.next/server/chunks/4827.js +1 -1
- package/.next/standalone/.next/server/chunks/5011.js +1 -0
- package/.next/standalone/.next/server/chunks/5631.js +1 -0
- package/.next/standalone/.next/server/chunks/6113.js +1 -1
- package/.next/standalone/.next/server/chunks/6817.js +1 -1
- package/.next/standalone/.next/server/chunks/7160.js +1 -1
- package/.next/standalone/.next/server/chunks/7368.js +1 -1
- package/.next/standalone/.next/server/chunks/7578.js +1 -1
- package/.next/standalone/.next/server/chunks/8448.js +1 -1
- package/.next/standalone/.next/server/chunks/8577.js +1 -1
- package/.next/standalone/.next/server/chunks/920.js +1 -1
- package/.next/standalone/.next/server/chunks/{5095.js → 9855.js} +2 -2
- package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/.next/server/middleware-manifest.json +1 -1
- package/.next/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/225-7b0507c29df705f1.js +1 -0
- package/.next/standalone/.next/static/chunks/38366.62260b57e5f4b09d.js +1 -0
- package/.next/standalone/.next/static/chunks/{4860.7844c573cb3914f3.js → 4860.18e9c1a01636e309.js} +1 -1
- package/.next/standalone/.next/static/chunks/63820-551bca4e19d0119c.js +1 -0
- package/.next/standalone/.next/static/chunks/{80350-8ac8d602965bb4df.js → 80350-20c953d484f262ff.js} +1 -1
- package/.next/standalone/.next/static/chunks/96752-ad15cc38599f12e2.js +1 -0
- package/.next/standalone/.next/static/chunks/{99373.6f0ec031fb759d88.js → 99373.c4a36dcd46ec841e.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-b2db3da2d7945904.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/page-b3b2b2ba3d60893e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/{page-9f0ebba7e855b2f9.js → page-0aff1fa7a814188c.js} +1 -1
- package/.next/standalone/.next/static/chunks/{webpack-fe12dfe2e0d0e4f3.js → webpack-3551a4c7f9bfe638.js} +1 -1
- package/.next/standalone/.next/static/css/a80bf83b9122bfc5.css +1 -0
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +1 -1
- package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +9 -1
- package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +3 -1
- package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +1 -1
- package/.next/standalone/public/skill/brainstorm-chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/code-reviewer-chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/develop-chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/idea-chorus/SKILL.md +9 -1
- package/.next/standalone/public/skill/proposal-chorus/SKILL.md +3 -1
- package/.next/standalone/public/skill/proposal-reviewer-chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/quick-dev-chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/review-chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/task-reviewer-chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/yolo-chorus/SKILL.md +1 -1
- package/package.json +1 -1
- package/prisma/migrations/20260707104706_add_idea_is_container/migration.sql +2 -0
- package/prisma/schema.prisma +1 -0
- package/.next/standalone/.next/server/chunks/1114.js +0 -1
- package/.next/standalone/.next/server/chunks/8497.js +0 -1
- package/.next/standalone/.next/server/chunks/8895.js +0 -1
- package/.next/standalone/.next/static/chunks/225-8a41a800021f3d11.js +0 -1
- package/.next/standalone/.next/static/chunks/58262-395c00e04f610a32.js +0 -1
- package/.next/standalone/.next/static/chunks/78966.075119c3a72135ed.js +0 -1
- package/.next/standalone/.next/static/chunks/94528-ed3f03485480f5e5.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-f72f17eb58614d2b.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/page-3238e0b5474c60f6.js +0 -1
- package/.next/standalone/.next/static/css/3f3ae2bdc9e55259.css +0 -1
- /package/.next/standalone/.next/static/{eORNzMShbzkJbNfQT8MbW → CIg9Mtv4fKIeKqPY5Rczv}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{eORNzMShbzkJbNfQT8MbW → CIg9Mtv4fKIeKqPY5Rczv}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=2618,exports.ids=[2618],exports.modules={18818:(a,b,c)=>{c.d(b,{D1:()=>d,m3:()=>k});var d={};c.r(d),c.d(d,{Fj:()=>j});var e=c(76760),f=c(73136),g=c(26849);let h={previewFeatures:[],clientVersion:"7.3.0",engineVersion:"9d6ad21cbbceab97458517b147a6a09ff43aa735",activeProvider:"postgresql",inlineSchema:'// prisma/schema.prisma\n\ngenerator client {\n provider = "prisma-client"\n output = "../src/generated/prisma"\n}\n\ndatasource db {\n provider = "postgresql"\n relationMode = "prisma" // Relations managed by Prisma, no DB-level foreign key constraints\n}\n\n// Tenant\nmodel Company {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n name String\n // Email domain matching (used to identify Company during login)\n emailDomains String[] @default([]) // e.g., ["example.com", "example.org"]\n // OIDC configuration (per-Company login, PKCE only, no Client Secret)\n oidcIssuer String? // OIDC Provider URL\n oidcClientId String? // Client ID\n oidcEnabled Boolean @default(false)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n users User[]\n agents Agent[]\n apiKeys ApiKey[]\n projects Project[]\n ideas Idea[]\n documents Document[]\n tasks Task[]\n proposals Proposal[]\n activities Activity[]\n comments Comment[]\n sessions AgentSession[]\n daemonConnections DaemonConnection[]\n agentInstances AgentInstance[]\n}\n\n// User (human, OIDC login)\nmodel User {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n oidcSub String // OIDC subject\n email String?\n name String?\n avatarUrl String?\n createdAt DateTime @default(now())\n\n ownedAgents Agent[]\n\n @@unique([companyUuid, oidcSub])\n @@index([companyUuid])\n}\n\n// Agent (e.g., Claude Code)\nmodel Agent {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n name String\n roles String[] @default(["developer"]) // pm | developer (multi-select)\n permissions String[] @default([]) // Custom permission bits (resource:action); merged with role presets at auth time\n // Agent persona definition (Zero Context Injection)\n persona String? // Custom persona description (brief)\n systemPrompt String? // Full system prompt (optional, overrides default template)\n ownerUuid String? // User\'s UUID\n owner User? @relation(fields: [ownerUuid], references: [uuid])\n lastActiveAt DateTime?\n createdAt DateTime @default(now())\n\n apiKeys ApiKey[]\n sessions AgentSession[]\n daemonConnections DaemonConnection[]\n daemonExecutions DaemonExecution[]\n daemonSessions DaemonSession[]\n agentInstances AgentInstance[]\n\n @@index([companyUuid])\n @@index([ownerUuid])\n}\n\n// AgentInstance — a durable, addressable (agent, host, cwd) actor. Created by\n// upsert when a daemon first reports a (host, cwd); it holds ONLY identity, never\n// liveness. The stable pointer that assignment (assigneeType="agent_instance") and\n// mention markup resolve to: DaemonConnection.uuid churns on every reconnect, but\n// the (agent, host, cwd) triple is stable, so this row\'s uuid is the durable handle.\n// Liveness for an instance is read through its linked DaemonConnection\n// (effectiveStatus / STALE_THRESHOLD_MS), never stored here — that is a connection\n// property (see add-agent-instance-addressing design \xa7"Data model"). host defaults\n// to "" (unknown host) and cwd is nullable (unknown path), mirroring the\n// DaemonConnection sentinels so a connection\'s identity maps 1:1 to an instance key.\nmodel AgentInstance {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n agentUuid String\n agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)\n host String @default("") // "" = unknown-host (matches DaemonConnection.host sentinel)\n cwd String? // null = unknown-path (matches DaemonConnection.cwd sentinel)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // Connections that have served this instance (current + historical). Liveness is\n // derived from these, never duplicated onto the instance row.\n connections DaemonConnection[]\n\n @@unique([companyUuid, agentUuid, host, cwd])\n @@index([companyUuid])\n @@index([agentUuid])\n}\n\n// API Key (independently managed, supports rotation and revocation)\nmodel ApiKey {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n agentUuid String // Agent\'s UUID\n agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)\n keyHash String @unique // API Key stored as hash\n keyPrefix String // Key prefix for display (e.g., "cho_xxx...")\n name String? // Optional descriptive name\n lastUsed DateTime?\n expiresAt DateTime?\n revokedAt DateTime?\n createdAt DateTime @default(now())\n\n @@index([companyUuid])\n @@index([agentUuid])\n}\n\n// Project Group (single-level grouping of projects)\nmodel ProjectGroup {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n name String\n description String? @default("")\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([companyUuid])\n}\n\n// Project\nmodel Project {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n name String\n description String?\n groupUuid String? // nullable FK → ProjectGroup.uuid\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n ideas Idea[]\n documents Document[]\n tasks Task[]\n proposals Proposal[]\n activities Activity[]\n\n @@index([companyUuid])\n @@index([groupUuid])\n}\n\n// Idea (raw human input)\nmodel Idea {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n projectUuid String\n project Project @relation(fields: [projectUuid], references: [uuid], onDelete: Cascade)\n title String\n content String? // Text content\n attachments Json? // Attachment list [{type, url, name}]\n // Status and assignment (ARCHITECTURE.md \xa77.3)\n status String @default("open") // open | elaborating | elaborated (3-state model; post-elaboration status derived from Proposal+Task)\n assigneeType String? // user | agent\n assigneeUuid String? // User or Agent UUID (polymorphic)\n assignedAt DateTime? // Assignment timestamp\n assignedByUuid String? // User UUID (human assignment)\n // Elaboration (AI-DLC Stage 3 — structured requirements clarification)\n elaborationDepth String? // "minimal" | "standard" | "comprehensive"\n elaborationStatus String? // "pending_answers" | "validating" | "resolved"\n // Lineage (single-parent forest — weak read-only relation, see openspec change add-idea-lineage)\n parentUuid String? // Single parent Idea UUID (nullable = top-level). One undifferentiated edge; semantics by context.\n parent Idea? @relation("IdeaLineage", fields: [parentUuid], references: [uuid], onDelete: Restrict, onUpdate: Restrict)\n children Idea[] @relation("IdeaLineage")\n createdByUuid String // User UUID\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([companyUuid])\n @@index([projectUuid])\n @@index([status])\n @@index([assigneeUuid])\n @@index([parentUuid])\n}\n\n// Document (PRD, tech design, etc. — Proposal output)\nmodel Document {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n projectUuid String\n project Project @relation(fields: [projectUuid], references: [uuid], onDelete: Cascade)\n type String // prd | tech_design | adr | ...\n title String\n content String? // Markdown content\n version Int @default(1)\n proposalUuid String? // Source Proposal UUID (traceable)\n createdByUuid String // User or Agent UUID\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([companyUuid])\n @@index([projectUuid])\n @@index([proposalUuid])\n}\n\n// Task (Proposal output or manually created)\nmodel Task {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n projectUuid String\n project Project @relation(fields: [projectUuid], references: [uuid], onDelete: Cascade)\n title String\n description String?\n // Status and assignment (ARCHITECTURE.md \xa77.2)\n status String @default("open") // open | assigned | in_progress | to_verify | done | closed\n priority String @default("medium") // low | medium | high\n storyPoints Float? // Effort estimate (unit: Agent hours)\n acceptanceCriteria String? // Acceptance criteria (Markdown)\n // Polymorphic assignee: user | agent | agent_instance. A pinned assignment is\n // assigneeType="agent_instance" with assigneeUuid = AgentInstance.uuid (the\n // durable (agent, host, cwd) actor); an un-pinned agent assignment is\n // assigneeType="agent". The legacy targetHost/targetCwd pin columns were removed\n // by add-agent-instance-addressing — the wake\'s pinned place now comes from the\n // task\'s own agent_instance assignment (override) or, for the same agent, the\n // root idea\'s instance (notification-turn.ts resolvePinnedTarget).\n assigneeType String? // user | agent | agent_instance\n assigneeUuid String? // User / Agent / AgentInstance UUID (polymorphic)\n assignedAt DateTime? // Assignment timestamp\n assignedByUuid String? // User UUID (human assignment)\n proposalUuid String? // Source Proposal UUID (traceable, optional)\n createdByUuid String // User or Agent UUID\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n // Task dependencies (DAG)\n dependsOn TaskDependency[] @relation("taskDependencies")\n dependedBy TaskDependency[] @relation("taskDependedBy")\n // Session checkins\n sessionCheckins SessionTaskCheckin[]\n // Structured acceptance criteria (independent table)\n acceptanceCriteriaItems AcceptanceCriterion[]\n\n @@index([companyUuid])\n @@index([projectUuid])\n @@index([proposalUuid])\n @@index([assigneeUuid])\n @@index([status])\n}\n\n// Task dependency (DAG edge)\nmodel TaskDependency {\n id Int @id @default(autoincrement())\n taskUuid String\n dependsOnUuid String\n task Task @relation("taskDependencies", fields: [taskUuid], references: [uuid], onDelete: Cascade)\n dependsOn Task @relation("taskDependedBy", fields: [dependsOnUuid], references: [uuid], onDelete: Cascade)\n createdAt DateTime @default(now())\n\n @@unique([taskUuid, dependsOnUuid])\n @@index([taskUuid])\n @@index([dependsOnUuid])\n}\n\n// Acceptance Criterion (independent table — per-row atomic updates, no concurrent write conflicts)\nmodel AcceptanceCriterion {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n taskUuid String\n task Task @relation(fields: [taskUuid], references: [uuid], onDelete: Cascade)\n description String\n required Boolean @default(true)\n // Dev self-check (developer fills during work)\n devStatus String @default("pending") // pending | passed | failed\n devEvidence String?\n devMarkedByType String? // "user" | "agent"\n devMarkedBy String? // UUID of marker\n devMarkedAt DateTime?\n // Admin verification (admin/user fills during verify)\n status String @default("pending") // pending | passed | failed\n evidence String?\n markedByType String? // "user" | "agent"\n markedBy String? // UUID of marker\n markedAt DateTime?\n sortOrder Int @default(0)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([taskUuid])\n}\n\n// Proposal (container model: created by Agent/human, approved by human, contains document drafts and task drafts)\nmodel Proposal {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n projectUuid String\n project Project @relation(fields: [projectUuid], references: [uuid], onDelete: Cascade)\n title String\n description String?\n\n // Input source (what the Proposal is based on)\n inputType String // idea | document\n inputUuids Json // Array of UUID strings\n\n // Container contents (can include both documents and tasks)\n documentDrafts Json? // Document draft list [{type, title, content}]\n taskDrafts Json? // Task draft list [{title, description, storyPoints, priority, acceptanceCriteria}]\n\n // Status and approval\n status String @default("draft") // draft | pending | approved | rejected | revised\n createdByUuid String // Agent or User UUID\n createdByType String @default("agent") // agent | user\n reviewedByUuid String? // User UUID\n reviewNote String? // Review note\n reviewedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([companyUuid])\n @@index([projectUuid])\n @@index([status])\n}\n\n// Comment (can comment on Idea, Proposal, Task, Document)\nmodel Comment {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n targetType String // idea | proposal | task | document\n targetUuid String // UUID of target entity (idea/proposal/task/document)\n content String\n authorType String // user | agent\n authorUuid String // User or Agent UUID\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([companyUuid])\n @@index([targetType, targetUuid])\n}\n\n// Activity stream (project-level) — generic design\nmodel Activity {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n projectUuid String\n project Project @relation(fields: [projectUuid], references: [uuid], onDelete: Cascade)\n // Target entity (generic design)\n targetType String // idea | task | proposal | document\n targetUuid String // Target entity UUID\n // Action info\n actorType String // user | agent\n actorUuid String // Actor UUID\n action String // created | assigned | released | status_changed | submitted | approved | rejected | comment_added\n value Json? // Action result value (e.g., new status, assignment target info)\n // Session attribution (denormalized to avoid joins)\n sessionUuid String?\n sessionName String?\n createdAt DateTime @default(now())\n\n @@index([companyUuid])\n @@index([projectUuid])\n @@index([targetType, targetUuid])\n @@index([createdAt])\n}\n\n// Agent Session (sub-session for swarm mode observability)\nmodel AgentSession {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n agentUuid String\n agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)\n name String\n description String?\n status String @default("active") // active | closed\n lastActiveAt DateTime @default(now())\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n taskCheckins SessionTaskCheckin[]\n\n @@index([companyUuid])\n @@index([agentUuid])\n @@index([status])\n @@index([lastActiveAt])\n}\n\n// Session-Task checkin relation (many-to-many)\nmodel SessionTaskCheckin {\n id Int @id @default(autoincrement())\n sessionUuid String\n session AgentSession @relation(fields: [sessionUuid], references: [uuid], onDelete: Cascade)\n taskUuid String\n task Task @relation(fields: [taskUuid], references: [uuid], onDelete: Cascade)\n checkinAt DateTime @default(now())\n checkoutAt DateTime?\n\n @@unique([sessionUuid, taskUuid])\n @@index([sessionUuid])\n @@index([taskUuid])\n}\n\n// Daemon SSE connection registry — one row per long-lived daemon SSE connection.\n// Mirrors AgentSession conventions (Int PK + uuid public id, application-level\n// company/agent relations, indexed status/liveness columns).\nmodel DaemonConnection {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n agentUuid String\n agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)\n\n clientType String // claude_code | openclaw | browser | other\n clientVersion String? // self-reported, untrusted, display-only\n // Self-reported hostname (display-only). Non-null with "" default: a @@unique\n // over a nullable column is broken for dedup because connectors treat each\n // null as distinct (Prisma docs), which would let reconnects accumulate rows.\n // Defaulting to "" makes (agentUuid, clientType, host) a deterministic upsert key.\n host String @default("")\n // Self-reported working directory this connection serves (display + identity).\n // Nullable per the ratified migration decision (DEC/Q6=a): rows that exist at\n // migration time get cwd=NULL as a sentinel and are backfilled on the next\n // handshake — no forced backfill script. NOTE: unlike `host` (which defaults\n // to "" to stay a deterministic dedup key), `cwd` is left nullable here.\n // Postgres treats NULL as distinct in a UNIQUE index, so two\n // (agentUuid, clientType, host, NULL) rows do NOT dedup; that is accepted for\n // the migration era (old daemons are single-cwd, so independent null rows\n // match the HARD-1 "behave exactly as today" requirement). Verified\n // empirically (psql) + against Prisma docs. The real cwd self-report, the\n // cwd-aware dedup, and the "reuse the migrated null row on reconnect"\n // compatibility path all live in T2 — not this task. Because Prisma types a\n // nullable column as non-null inside the compound-unique `where` input (NULL\n // cannot be targeted there), T1\'s still-untouched registerConnection() upsert\n // pins cwd to the "" sentinel to preserve today\'s deterministic dedup; T2\n // reconciles the ""-vs-NULL sentinel when it wires real cwd self-report.\n cwd String?\n startedAt DateTime? // self-reported daemon process start time\n\n // The durable AgentInstance this connection currently serves (same\n // (agentUuid, host, cwd) identity). Nullable: rows existing at migration time\n // have no instance yet and get linked on the next handshake (the "rebuild on\n // reconnect" path — no backfill). SetNull (app-level, relationMode=prisma) so\n // deleting an instance never deletes its connection history.\n agentInstanceUuid String?\n agentInstance AgentInstance? @relation(fields: [agentInstanceUuid], references: [uuid], onDelete: SetNull)\n\n status String @default("online") // online | offline\n connectedAt DateTime @default(now())\n lastSeenAt DateTime @default(now())\n disconnectedAt DateTime?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([agentUuid, clientType, host, cwd])\n @@index([companyUuid])\n @@index([agentUuid])\n @@index([status])\n @@index([lastSeenAt])\n @@index([agentInstanceUuid])\n}\n\n// Daemon execution state — one row per (connection, resource) the daemon is\n// running or has queued. The "resource" is whatever entity the wake-triggering\n// notification pointed at: a task, an idea (e.g. an @-mention or elaboration\n// under an idea), a proposal, or a document. Every wake the daemon performs is\n// reported, so the UI can show "this daemon is processing <resource>" regardless\n// of which resource caused it — not only task dispatches.\n//\n// Fed by the snapshot-reconcile ingest path; rows are retained as history\n// (status -> "ended") rather than deleted, so a connection that goes offline\n// still leaves a queryable trail. References DaemonConnection and the target\n// entity by uuid (relationMode = "prisma"); only the `agent` relation is modeled\n// with a DB-level back-relation so the cascade convention matches\n// DaemonConnection/ApiKey (delete an agent -> its execution rows go too).\nmodel DaemonExecution {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n agentUuid String\n agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)\n // → DaemonConnection.uuid (weak ref, no DB FK — the row outlives the\n // connection as history).\n connectionUuid String\n // The wake-triggering resource: entityType is "task" | "idea" | "proposal" |\n // "document"; entityUuid is that entity\'s uuid (weak ref, no DB FK).\n entityType String\n entityUuid String\n // → Idea.uuid; the root-idea lineage anchor for grouping/labeling. Null when\n // the wake has no idea ancestor (e.g. a standalone/quick task).\n rootIdeaUuid String?\n\n // running | queued | ended | interrupted\n // `interrupted` is a STICKY status: when a wake\'s subprocess is stopped (by a\n // user-requested interrupt or an unexpected crash) the row is marked\n // `interrupted` and snapshot-reconcile will NOT auto-downgrade it to `ended`\n // when the (now-gone) entity drops out of the daemon\'s next snapshot — so the\n // UI keeps showing an "interrupted, resumable" row. It is cleared only when a\n // resume re-dispatch transitions the entity back to running/queued.\n status String // running | queued | ended | interrupted\n // Discriminator for the `interrupted` status: `user` = an authorized\n // user-requested interrupt (manually resumable); `crash` = an unexpected\n // subprocess exit (auto-recovered via reconnect-backfill). Only set while\n // status == interrupted; cleared to null on any transition out of it. This\n // lives on the execution row (not Task) because the daemon executes idea /\n // proposal / document wakes too — interruption is an execution-lifecycle fact,\n // keyed by the same connection+entity the row already tracks.\n interruptedReason String? // null | user | crash\n startedAt DateTime? // set when/once the row is running; null while queued\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // A resource appears at most once per connection: re-dispatch updates the\n // existing row (queued -> running -> ended) rather than inserting a duplicate.\n @@unique([connectionUuid, entityType, entityUuid])\n @@index([connectionUuid, status])\n @@index([companyUuid, agentUuid])\n}\n\n// Daemon persistent conversation — one row per (agentUuid, sessionId) Claude\n// session. Distinct from DaemonExecution (the live running/queued snapshot):\n// this is the DURABLE conversation layer. Its identity and history survive the\n// holding connection going offline and the daemon restarting; it is never\n// deleted merely because a connection dropped. A turn references its execution\n// row by uuid (weak ref) but does not alter execution-state reconcile semantics.\n// Only the `agent` relation is modeled with a DB-level back-relation so the\n// cascade convention matches DaemonConnection/DaemonExecution/ApiKey.\nmodel DaemonSession {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n agentUuid String\n agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)\n // Stable business key: the directIdeaUuid for an idea-anchored session, or a\n // server-generated uuid for an ad-hoc session. Unique per agent.\n sessionId String\n directIdeaUuid String? // null ⇒ ad-hoc (no idea lineage)\n // → DaemonConnection.uuid (weak ref, no DB FK). The connection/cwd that owns\n // the on-disk Claude transcript. Fixed at creation; continuation is only ever\n // routed here, because `claude --resume <sessionId>` is cwd/machine-bound.\n originConnectionUuid String\n status String @default("active") // active | ended\n title String?\n lastTurnAt DateTime @default(now())\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n turns DaemonSessionTurn[]\n\n @@unique([agentUuid, sessionId])\n @@index([companyUuid, agentUuid])\n @@index([originConnectionUuid])\n}\n\n// One turn (wake) on a DaemonSession. Every wake — autonomous (task_assigned /\n// mentioned / elaboration / resume) or human (human_instruction) — is exactly one\n// turn, distinguished only by `trigger`. Turn creation + status transitions are\n// the SSE chokepoint for the conversation\'s live updates.\nmodel DaemonSessionTurn {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n sessionUuid String\n session DaemonSession @relation(fields: [sessionUuid], references: [uuid], onDelete: Cascade)\n seq Int // monotonic per session\n trigger String // task_assigned | mentioned | elaboration | elaboration_verified | start_development | yolo_requested | resume | human_instruction\n promptText String? // free-text body for human_instruction; null otherwise (canonical source)\n status String @default("pending") // pending | running | ended | interrupted\n // Discriminator for the `interrupted` status: `user` = user-requested interrupt,\n // `crash` = subprocess exited dirty, `shutdown` = daemon graceful shutdown killed\n // the wake, `offline` = server-side reconcile of a turn whose origin connection\n // went stale. Non-null iff status == interrupted. Unlike DaemonExecution\'s sticky\n // `interrupted` (resumable), a turn\'s `interrupted` is TERMINAL — it is durable\n // conversation history, never resumed or auto-retried.\n interruptedReason String?\n // Weak ref to the live DaemonExecution row this turn corresponds to (no DB FK;\n // execution rows are reconciled/transient).\n executionUuid String?\n startedAt DateTime?\n endedAt DateTime?\n createdAt DateTime @default(now())\n messages DaemonTranscriptMessage[]\n\n @@unique([sessionUuid, seq])\n @@index([sessionUuid, status])\n}\n\n// A single user/assistant transcript message on a turn. Tool-call, tool-result,\n// and thinking content are NOT stored. Its own table (not JSON on the turn) so\n// append + per-message rolling-window trim are clean row operations rather than\n// read-modify-write of a JSON blob under concurrent appends.\nmodel DaemonTranscriptMessage {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n turnUuid String\n turn DaemonSessionTurn @relation(fields: [turnUuid], references: [uuid], onDelete: Cascade)\n role String // user | assistant (tool/thinking NOT stored)\n text String @db.Text\n seq Int // order within turn; used for rolling-window trim\n createdAt DateTime @default(now())\n\n @@index([turnUuid, seq])\n}\n\n// Notification\nmodel Notification {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n projectUuid String\n // Recipient (polymorphic: user | agent)\n recipientType String // user | agent\n recipientUuid String\n // Related entity\n entityType String // task | idea | proposal | document | comment\n entityUuid String\n entityTitle String // Denormalized to avoid joins\n projectName String // Denormalized for project badge UI\n // Action info\n action String // assigned | status_changed | verified | reopened | submitted | approved | rejected | claimed | comment_added\n message String // Human-readable message\n // Denormalized write-once copy of a human_instruction turn\'s promptText\n // (DaemonSessionTurn.promptText is canonical). Display/transport only — lets the\n // daemon read the instruction body in the chorus_get_notifications call it already\n // makes, with no extra round-trip. Null for every non-instruction notification.\n instructionText String?\n actorType String // user | agent\n actorUuid String\n actorName String // Denormalized to avoid joins\n // Status\n readAt DateTime?\n archivedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([recipientType, recipientUuid, readAt])\n @@index([companyUuid, recipientUuid])\n @@index([entityType, entityUuid])\n @@index([projectUuid])\n}\n\n// Notification preferences\nmodel NotificationPreference {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n ownerType String // user | agent\n ownerUuid String\n // Toggle for each notification type (all enabled by default)\n taskAssigned Boolean @default(true)\n taskStatusChanged Boolean @default(true)\n taskVerified Boolean @default(true)\n taskReopened Boolean @default(true)\n proposalSubmitted Boolean @default(true)\n proposalApproved Boolean @default(true)\n proposalRejected Boolean @default(true)\n ideaClaimed Boolean @default(true)\n commentAdded Boolean @default(true)\n elaborationRequested Boolean @default(true)\n elaborationAnswered Boolean @default(true)\n mentioned Boolean @default(true)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([ownerType, ownerUuid])\n @@index([companyUuid])\n}\n\n// Mention (tracks @mentions in comments, tasks, ideas)\nmodel Mention {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n // Source: where the mention occurred\n sourceType String // comment | task | idea\n sourceUuid String // UUID of the comment, task, or idea\n // Target: who was mentioned\n mentionedType String // user | agent\n mentionedUuid String\n // Actor: who wrote the mention\n actorType String // user | agent\n actorUuid String\n createdAt DateTime @default(now())\n\n @@index([companyUuid])\n @@index([mentionedType, mentionedUuid])\n @@index([sourceType, sourceUuid])\n}\n\n// Elaboration Round (AI-DLC Stage 3 — structured requirements clarification)\nmodel ElaborationRound {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n ideaUuid String\n roundNumber Int\n status String @default("pending_answers") // pending_answers | answered | validated (needs_followup retained for legacy rows only — no longer written)\n isAppended Boolean @default(false) // true when created after the Idea was first resolved\n createdByType String // agent | user\n createdByUuid String\n validatedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n questions ElaborationQuestion[]\n\n @@index([ideaUuid])\n @@index([companyUuid])\n}\n\n// Elaboration Question (individual Q&A item within a round)\nmodel ElaborationQuestion {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n roundUuid String\n round ElaborationRound @relation(fields: [roundUuid], references: [uuid], onDelete: Cascade)\n questionId String // Round-scoped ID: "q1", "q2", etc.\n text String\n category String // functional | non_functional | business_context | technical_context | user_scenario | scope\n options Json // [{id, label, description?}] — 2-5 options\n required Boolean @default(true)\n // Answer (null = unanswered)\n selectedOptionId String?\n customText String?\n answeredAt DateTime?\n answeredByType String? // user | agent\n answeredByUuid String?\n // Validation issue (null = no issue)\n issueType String? // contradiction | ambiguity | incomplete\n issueDescription String?\n\n @@unique([roundUuid, questionId])\n @@index([roundUuid])\n}\n',runtimeDataModel:{models:{},enums:{},types:{}}};async function i(a){let{Buffer:b}=await Promise.resolve().then(c.t.bind(c,4573,23)),d=b.from(a,"base64");return new WebAssembly.Module(d)}h.runtimeDataModel=JSON.parse('{"models":{"Company":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"emailDomains","kind":"scalar","type":"String"},{"name":"oidcIssuer","kind":"scalar","type":"String"},{"name":"oidcClientId","kind":"scalar","type":"String"},{"name":"oidcEnabled","kind":"scalar","type":"Boolean"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"},{"name":"users","kind":"object","type":"User","relationName":"CompanyToUser"},{"name":"agents","kind":"object","type":"Agent","relationName":"AgentToCompany"},{"name":"apiKeys","kind":"object","type":"ApiKey","relationName":"ApiKeyToCompany"},{"name":"projects","kind":"object","type":"Project","relationName":"CompanyToProject"},{"name":"ideas","kind":"object","type":"Idea","relationName":"CompanyToIdea"},{"name":"documents","kind":"object","type":"Document","relationName":"CompanyToDocument"},{"name":"tasks","kind":"object","type":"Task","relationName":"CompanyToTask"},{"name":"proposals","kind":"object","type":"Proposal","relationName":"CompanyToProposal"},{"name":"activities","kind":"object","type":"Activity","relationName":"ActivityToCompany"},{"name":"comments","kind":"object","type":"Comment","relationName":"CommentToCompany"},{"name":"sessions","kind":"object","type":"AgentSession","relationName":"AgentSessionToCompany"},{"name":"daemonConnections","kind":"object","type":"DaemonConnection","relationName":"CompanyToDaemonConnection"},{"name":"agentInstances","kind":"object","type":"AgentInstance","relationName":"AgentInstanceToCompany"}],"dbName":null},"User":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"CompanyToUser"},{"name":"oidcSub","kind":"scalar","type":"String"},{"name":"email","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"avatarUrl","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"ownedAgents","kind":"object","type":"Agent","relationName":"AgentToUser"}],"dbName":null},"Agent":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"AgentToCompany"},{"name":"name","kind":"scalar","type":"String"},{"name":"roles","kind":"scalar","type":"String"},{"name":"permissions","kind":"scalar","type":"String"},{"name":"persona","kind":"scalar","type":"String"},{"name":"systemPrompt","kind":"scalar","type":"String"},{"name":"ownerUuid","kind":"scalar","type":"String"},{"name":"owner","kind":"object","type":"User","relationName":"AgentToUser"},{"name":"lastActiveAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"apiKeys","kind":"object","type":"ApiKey","relationName":"AgentToApiKey"},{"name":"sessions","kind":"object","type":"AgentSession","relationName":"AgentToAgentSession"},{"name":"daemonConnections","kind":"object","type":"DaemonConnection","relationName":"AgentToDaemonConnection"},{"name":"daemonExecutions","kind":"object","type":"DaemonExecution","relationName":"AgentToDaemonExecution"},{"name":"daemonSessions","kind":"object","type":"DaemonSession","relationName":"AgentToDaemonSession"},{"name":"agentInstances","kind":"object","type":"AgentInstance","relationName":"AgentToAgentInstance"}],"dbName":null},"AgentInstance":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"AgentInstanceToCompany"},{"name":"agentUuid","kind":"scalar","type":"String"},{"name":"agent","kind":"object","type":"Agent","relationName":"AgentToAgentInstance"},{"name":"host","kind":"scalar","type":"String"},{"name":"cwd","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"},{"name":"connections","kind":"object","type":"DaemonConnection","relationName":"AgentInstanceToDaemonConnection"}],"dbName":null},"ApiKey":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"ApiKeyToCompany"},{"name":"agentUuid","kind":"scalar","type":"String"},{"name":"agent","kind":"object","type":"Agent","relationName":"AgentToApiKey"},{"name":"keyHash","kind":"scalar","type":"String"},{"name":"keyPrefix","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"lastUsed","kind":"scalar","type":"DateTime"},{"name":"expiresAt","kind":"scalar","type":"DateTime"},{"name":"revokedAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"}],"dbName":null},"ProjectGroup":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"Project":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"CompanyToProject"},{"name":"name","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"groupUuid","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"},{"name":"ideas","kind":"object","type":"Idea","relationName":"IdeaToProject"},{"name":"documents","kind":"object","type":"Document","relationName":"DocumentToProject"},{"name":"tasks","kind":"object","type":"Task","relationName":"ProjectToTask"},{"name":"proposals","kind":"object","type":"Proposal","relationName":"ProjectToProposal"},{"name":"activities","kind":"object","type":"Activity","relationName":"ActivityToProject"}],"dbName":null},"Idea":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"CompanyToIdea"},{"name":"projectUuid","kind":"scalar","type":"String"},{"name":"project","kind":"object","type":"Project","relationName":"IdeaToProject"},{"name":"title","kind":"scalar","type":"String"},{"name":"content","kind":"scalar","type":"String"},{"name":"attachments","kind":"scalar","type":"Json"},{"name":"status","kind":"scalar","type":"String"},{"name":"assigneeType","kind":"scalar","type":"String"},{"name":"assigneeUuid","kind":"scalar","type":"String"},{"name":"assignedAt","kind":"scalar","type":"DateTime"},{"name":"assignedByUuid","kind":"scalar","type":"String"},{"name":"elaborationDepth","kind":"scalar","type":"String"},{"name":"elaborationStatus","kind":"scalar","type":"String"},{"name":"parentUuid","kind":"scalar","type":"String"},{"name":"parent","kind":"object","type":"Idea","relationName":"IdeaLineage"},{"name":"children","kind":"object","type":"Idea","relationName":"IdeaLineage"},{"name":"createdByUuid","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"Document":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"CompanyToDocument"},{"name":"projectUuid","kind":"scalar","type":"String"},{"name":"project","kind":"object","type":"Project","relationName":"DocumentToProject"},{"name":"type","kind":"scalar","type":"String"},{"name":"title","kind":"scalar","type":"String"},{"name":"content","kind":"scalar","type":"String"},{"name":"version","kind":"scalar","type":"Int"},{"name":"proposalUuid","kind":"scalar","type":"String"},{"name":"createdByUuid","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"Task":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"CompanyToTask"},{"name":"projectUuid","kind":"scalar","type":"String"},{"name":"project","kind":"object","type":"Project","relationName":"ProjectToTask"},{"name":"title","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"status","kind":"scalar","type":"String"},{"name":"priority","kind":"scalar","type":"String"},{"name":"storyPoints","kind":"scalar","type":"Float"},{"name":"acceptanceCriteria","kind":"scalar","type":"String"},{"name":"assigneeType","kind":"scalar","type":"String"},{"name":"assigneeUuid","kind":"scalar","type":"String"},{"name":"assignedAt","kind":"scalar","type":"DateTime"},{"name":"assignedByUuid","kind":"scalar","type":"String"},{"name":"proposalUuid","kind":"scalar","type":"String"},{"name":"createdByUuid","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"},{"name":"dependsOn","kind":"object","type":"TaskDependency","relationName":"taskDependencies"},{"name":"dependedBy","kind":"object","type":"TaskDependency","relationName":"taskDependedBy"},{"name":"sessionCheckins","kind":"object","type":"SessionTaskCheckin","relationName":"SessionTaskCheckinToTask"},{"name":"acceptanceCriteriaItems","kind":"object","type":"AcceptanceCriterion","relationName":"AcceptanceCriterionToTask"}],"dbName":null},"TaskDependency":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"taskUuid","kind":"scalar","type":"String"},{"name":"dependsOnUuid","kind":"scalar","type":"String"},{"name":"task","kind":"object","type":"Task","relationName":"taskDependencies"},{"name":"dependsOn","kind":"object","type":"Task","relationName":"taskDependedBy"},{"name":"createdAt","kind":"scalar","type":"DateTime"}],"dbName":null},"AcceptanceCriterion":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"taskUuid","kind":"scalar","type":"String"},{"name":"task","kind":"object","type":"Task","relationName":"AcceptanceCriterionToTask"},{"name":"description","kind":"scalar","type":"String"},{"name":"required","kind":"scalar","type":"Boolean"},{"name":"devStatus","kind":"scalar","type":"String"},{"name":"devEvidence","kind":"scalar","type":"String"},{"name":"devMarkedByType","kind":"scalar","type":"String"},{"name":"devMarkedBy","kind":"scalar","type":"String"},{"name":"devMarkedAt","kind":"scalar","type":"DateTime"},{"name":"status","kind":"scalar","type":"String"},{"name":"evidence","kind":"scalar","type":"String"},{"name":"markedByType","kind":"scalar","type":"String"},{"name":"markedBy","kind":"scalar","type":"String"},{"name":"markedAt","kind":"scalar","type":"DateTime"},{"name":"sortOrder","kind":"scalar","type":"Int"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"Proposal":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"CompanyToProposal"},{"name":"projectUuid","kind":"scalar","type":"String"},{"name":"project","kind":"object","type":"Project","relationName":"ProjectToProposal"},{"name":"title","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"inputType","kind":"scalar","type":"String"},{"name":"inputUuids","kind":"scalar","type":"Json"},{"name":"documentDrafts","kind":"scalar","type":"Json"},{"name":"taskDrafts","kind":"scalar","type":"Json"},{"name":"status","kind":"scalar","type":"String"},{"name":"createdByUuid","kind":"scalar","type":"String"},{"name":"createdByType","kind":"scalar","type":"String"},{"name":"reviewedByUuid","kind":"scalar","type":"String"},{"name":"reviewNote","kind":"scalar","type":"String"},{"name":"reviewedAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"Comment":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"CommentToCompany"},{"name":"targetType","kind":"scalar","type":"String"},{"name":"targetUuid","kind":"scalar","type":"String"},{"name":"content","kind":"scalar","type":"String"},{"name":"authorType","kind":"scalar","type":"String"},{"name":"authorUuid","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"Activity":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"ActivityToCompany"},{"name":"projectUuid","kind":"scalar","type":"String"},{"name":"project","kind":"object","type":"Project","relationName":"ActivityToProject"},{"name":"targetType","kind":"scalar","type":"String"},{"name":"targetUuid","kind":"scalar","type":"String"},{"name":"actorType","kind":"scalar","type":"String"},{"name":"actorUuid","kind":"scalar","type":"String"},{"name":"action","kind":"scalar","type":"String"},{"name":"value","kind":"scalar","type":"Json"},{"name":"sessionUuid","kind":"scalar","type":"String"},{"name":"sessionName","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"}],"dbName":null},"AgentSession":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"AgentSessionToCompany"},{"name":"agentUuid","kind":"scalar","type":"String"},{"name":"agent","kind":"object","type":"Agent","relationName":"AgentToAgentSession"},{"name":"name","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"status","kind":"scalar","type":"String"},{"name":"lastActiveAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"},{"name":"taskCheckins","kind":"object","type":"SessionTaskCheckin","relationName":"AgentSessionToSessionTaskCheckin"}],"dbName":null},"SessionTaskCheckin":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"sessionUuid","kind":"scalar","type":"String"},{"name":"session","kind":"object","type":"AgentSession","relationName":"AgentSessionToSessionTaskCheckin"},{"name":"taskUuid","kind":"scalar","type":"String"},{"name":"task","kind":"object","type":"Task","relationName":"SessionTaskCheckinToTask"},{"name":"checkinAt","kind":"scalar","type":"DateTime"},{"name":"checkoutAt","kind":"scalar","type":"DateTime"}],"dbName":null},"DaemonConnection":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"CompanyToDaemonConnection"},{"name":"agentUuid","kind":"scalar","type":"String"},{"name":"agent","kind":"object","type":"Agent","relationName":"AgentToDaemonConnection"},{"name":"clientType","kind":"scalar","type":"String"},{"name":"clientVersion","kind":"scalar","type":"String"},{"name":"host","kind":"scalar","type":"String"},{"name":"cwd","kind":"scalar","type":"String"},{"name":"startedAt","kind":"scalar","type":"DateTime"},{"name":"agentInstanceUuid","kind":"scalar","type":"String"},{"name":"agentInstance","kind":"object","type":"AgentInstance","relationName":"AgentInstanceToDaemonConnection"},{"name":"status","kind":"scalar","type":"String"},{"name":"connectedAt","kind":"scalar","type":"DateTime"},{"name":"lastSeenAt","kind":"scalar","type":"DateTime"},{"name":"disconnectedAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"DaemonExecution":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"agentUuid","kind":"scalar","type":"String"},{"name":"agent","kind":"object","type":"Agent","relationName":"AgentToDaemonExecution"},{"name":"connectionUuid","kind":"scalar","type":"String"},{"name":"entityType","kind":"scalar","type":"String"},{"name":"entityUuid","kind":"scalar","type":"String"},{"name":"rootIdeaUuid","kind":"scalar","type":"String"},{"name":"status","kind":"scalar","type":"String"},{"name":"interruptedReason","kind":"scalar","type":"String"},{"name":"startedAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"DaemonSession":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"agentUuid","kind":"scalar","type":"String"},{"name":"agent","kind":"object","type":"Agent","relationName":"AgentToDaemonSession"},{"name":"sessionId","kind":"scalar","type":"String"},{"name":"directIdeaUuid","kind":"scalar","type":"String"},{"name":"originConnectionUuid","kind":"scalar","type":"String"},{"name":"status","kind":"scalar","type":"String"},{"name":"title","kind":"scalar","type":"String"},{"name":"lastTurnAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"},{"name":"turns","kind":"object","type":"DaemonSessionTurn","relationName":"DaemonSessionToDaemonSessionTurn"}],"dbName":null},"DaemonSessionTurn":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"sessionUuid","kind":"scalar","type":"String"},{"name":"session","kind":"object","type":"DaemonSession","relationName":"DaemonSessionToDaemonSessionTurn"},{"name":"seq","kind":"scalar","type":"Int"},{"name":"trigger","kind":"scalar","type":"String"},{"name":"promptText","kind":"scalar","type":"String"},{"name":"status","kind":"scalar","type":"String"},{"name":"interruptedReason","kind":"scalar","type":"String"},{"name":"executionUuid","kind":"scalar","type":"String"},{"name":"startedAt","kind":"scalar","type":"DateTime"},{"name":"endedAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"messages","kind":"object","type":"DaemonTranscriptMessage","relationName":"DaemonSessionTurnToDaemonTranscriptMessage"}],"dbName":null},"DaemonTranscriptMessage":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"turnUuid","kind":"scalar","type":"String"},{"name":"turn","kind":"object","type":"DaemonSessionTurn","relationName":"DaemonSessionTurnToDaemonTranscriptMessage"},{"name":"role","kind":"scalar","type":"String"},{"name":"text","kind":"scalar","type":"String"},{"name":"seq","kind":"scalar","type":"Int"},{"name":"createdAt","kind":"scalar","type":"DateTime"}],"dbName":null},"Notification":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"projectUuid","kind":"scalar","type":"String"},{"name":"recipientType","kind":"scalar","type":"String"},{"name":"recipientUuid","kind":"scalar","type":"String"},{"name":"entityType","kind":"scalar","type":"String"},{"name":"entityUuid","kind":"scalar","type":"String"},{"name":"entityTitle","kind":"scalar","type":"String"},{"name":"projectName","kind":"scalar","type":"String"},{"name":"action","kind":"scalar","type":"String"},{"name":"message","kind":"scalar","type":"String"},{"name":"instructionText","kind":"scalar","type":"String"},{"name":"actorType","kind":"scalar","type":"String"},{"name":"actorUuid","kind":"scalar","type":"String"},{"name":"actorName","kind":"scalar","type":"String"},{"name":"readAt","kind":"scalar","type":"DateTime"},{"name":"archivedAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"NotificationPreference":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"ownerType","kind":"scalar","type":"String"},{"name":"ownerUuid","kind":"scalar","type":"String"},{"name":"taskAssigned","kind":"scalar","type":"Boolean"},{"name":"taskStatusChanged","kind":"scalar","type":"Boolean"},{"name":"taskVerified","kind":"scalar","type":"Boolean"},{"name":"taskReopened","kind":"scalar","type":"Boolean"},{"name":"proposalSubmitted","kind":"scalar","type":"Boolean"},{"name":"proposalApproved","kind":"scalar","type":"Boolean"},{"name":"proposalRejected","kind":"scalar","type":"Boolean"},{"name":"ideaClaimed","kind":"scalar","type":"Boolean"},{"name":"commentAdded","kind":"scalar","type":"Boolean"},{"name":"elaborationRequested","kind":"scalar","type":"Boolean"},{"name":"elaborationAnswered","kind":"scalar","type":"Boolean"},{"name":"mentioned","kind":"scalar","type":"Boolean"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"Mention":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"sourceType","kind":"scalar","type":"String"},{"name":"sourceUuid","kind":"scalar","type":"String"},{"name":"mentionedType","kind":"scalar","type":"String"},{"name":"mentionedUuid","kind":"scalar","type":"String"},{"name":"actorType","kind":"scalar","type":"String"},{"name":"actorUuid","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"}],"dbName":null},"ElaborationRound":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"ideaUuid","kind":"scalar","type":"String"},{"name":"roundNumber","kind":"scalar","type":"Int"},{"name":"status","kind":"scalar","type":"String"},{"name":"isAppended","kind":"scalar","type":"Boolean"},{"name":"createdByType","kind":"scalar","type":"String"},{"name":"createdByUuid","kind":"scalar","type":"String"},{"name":"validatedAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"},{"name":"questions","kind":"object","type":"ElaborationQuestion","relationName":"ElaborationQuestionToElaborationRound"}],"dbName":null},"ElaborationQuestion":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"roundUuid","kind":"scalar","type":"String"},{"name":"round","kind":"object","type":"ElaborationRound","relationName":"ElaborationQuestionToElaborationRound"},{"name":"questionId","kind":"scalar","type":"String"},{"name":"text","kind":"scalar","type":"String"},{"name":"category","kind":"scalar","type":"String"},{"name":"options","kind":"scalar","type":"Json"},{"name":"required","kind":"scalar","type":"Boolean"},{"name":"selectedOptionId","kind":"scalar","type":"String"},{"name":"customText","kind":"scalar","type":"String"},{"name":"answeredAt","kind":"scalar","type":"DateTime"},{"name":"answeredByType","kind":"scalar","type":"String"},{"name":"answeredByUuid","kind":"scalar","type":"String"},{"name":"issueType","kind":"scalar","type":"String"},{"name":"issueDescription","kind":"scalar","type":"String"}],"dbName":null}},"enums":{},"types":{}}'),h.compilerWasm={getRuntime:async()=>await Promise.resolve().then(c.bind(c,75811)),getQueryCompilerWasmModule:async()=>{let{wasm:a}=await Promise.resolve().then(c.bind(c,44865));return await i(a)},importName:"./query_compiler_fast_bg.js"},g.PrismaClientKnownRequestError,g.PrismaClientUnknownRequestError,g.PrismaClientRustPanicError,g.PrismaClientInitializationError,g.PrismaClientValidationError,g.sqltag,g.empty,g.join,g.raw,g.Sql,g.Decimal,g.Extensions.getExtensionContext,g.NullTypes.DbNull,g.NullTypes.JsonNull,g.NullTypes.AnyNull,g.DbNull;let j=g.JsonNull;g.AnyNull,g.makeStrictEnum({ReadUncommitted:"ReadUncommitted",ReadCommitted:"ReadCommitted",RepeatableRead:"RepeatableRead",Serializable:"Serializable"}),g.Extensions.defineExtension,globalThis.__dirname=require("path").dirname(__filename);let k=g.getPrismaClient(h)},52618:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{z:()=>r});var e=c(18818),f=c(59833),g=c(64939),h=c(65582),i=a([g,f]);[g,f]=i.then?(await i)():i;let j=process.env.DATABASE_URL||(process.env.DB_HOST?`postgresql://${process.env.DB_USERNAME}:${encodeURIComponent(process.env.DB_PASSWORD||"")}@${process.env.DB_HOST}:${process.env.DB_PORT||"5432"}/${process.env.DB_NAME||"chorus"}`:void 0),k=globalThis,l="1"===process.env.CHORUS_USE_PGLITE,m=k.pool??new g.default.Pool({connectionString:j,...l?{max:1}:{},...process.env.DB_HOST?{ssl:{rejectUnauthorized:!1}}:{}});k.pool||m.on("error",a=>{h.default.child({module:"pg-pool"}).warn({err:a.message},"Idle connection evicted")});let n=new f.M(m),o=h.default.child({module:"prisma"}),p=k.prisma??new e.m3({adapter:n,log:[{emit:"event",level:"error"}]}),q=h.default.child({module:"pg-pool"}),r=p.$extends({query:{async $allOperations({args:a,query:b}){let c;for(let d=0;d<=3;d++)try{return await b(a)}catch(a){if(a instanceof Error&&("code"in a&&"P1017"===a.code||a.message.includes("Connection terminated")||a.message.includes("Server has closed the connection"))&&d<3){q.warn("Stale connection evicted (attempt %d/%d)",d+1,3),c=a;continue}throw a}throw c}}});k.prisma||"function"!=typeof p.$on||(p.$on("query",a=>{o.debug({duration:a.duration},a.query)}),p.$on("warn",a=>{o.warn(a.message)}),p.$on("error",a=>{o.error(a.message)})),d()}catch(a){d(a)}})},65582:(a,b,c)=>{c.d(b,{default:()=>f,q:()=>g});var d=c(74552);let e=c.n(d)()({level:process.env.LOG_LEVEL||"info",base:{service:"chorus"},...{}}),f=e;function g(a){return e.child(a)}}};
|
|
1
|
+
"use strict";exports.id=2618,exports.ids=[2618],exports.modules={18818:(a,b,c)=>{c.d(b,{D1:()=>d,m3:()=>k});var d={};c.r(d),c.d(d,{Fj:()=>j});var e=c(76760),f=c(73136),g=c(26849);let h={previewFeatures:[],clientVersion:"7.3.0",engineVersion:"9d6ad21cbbceab97458517b147a6a09ff43aa735",activeProvider:"postgresql",inlineSchema:'// prisma/schema.prisma\n\ngenerator client {\n provider = "prisma-client"\n output = "../src/generated/prisma"\n}\n\ndatasource db {\n provider = "postgresql"\n relationMode = "prisma" // Relations managed by Prisma, no DB-level foreign key constraints\n}\n\n// Tenant\nmodel Company {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n name String\n // Email domain matching (used to identify Company during login)\n emailDomains String[] @default([]) // e.g., ["example.com", "example.org"]\n // OIDC configuration (per-Company login, PKCE only, no Client Secret)\n oidcIssuer String? // OIDC Provider URL\n oidcClientId String? // Client ID\n oidcEnabled Boolean @default(false)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n users User[]\n agents Agent[]\n apiKeys ApiKey[]\n projects Project[]\n ideas Idea[]\n documents Document[]\n tasks Task[]\n proposals Proposal[]\n activities Activity[]\n comments Comment[]\n sessions AgentSession[]\n daemonConnections DaemonConnection[]\n agentInstances AgentInstance[]\n}\n\n// User (human, OIDC login)\nmodel User {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n oidcSub String // OIDC subject\n email String?\n name String?\n avatarUrl String?\n createdAt DateTime @default(now())\n\n ownedAgents Agent[]\n\n @@unique([companyUuid, oidcSub])\n @@index([companyUuid])\n}\n\n// Agent (e.g., Claude Code)\nmodel Agent {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n name String\n roles String[] @default(["developer"]) // pm | developer (multi-select)\n permissions String[] @default([]) // Custom permission bits (resource:action); merged with role presets at auth time\n // Agent persona definition (Zero Context Injection)\n persona String? // Custom persona description (brief)\n systemPrompt String? // Full system prompt (optional, overrides default template)\n ownerUuid String? // User\'s UUID\n owner User? @relation(fields: [ownerUuid], references: [uuid])\n lastActiveAt DateTime?\n createdAt DateTime @default(now())\n\n apiKeys ApiKey[]\n sessions AgentSession[]\n daemonConnections DaemonConnection[]\n daemonExecutions DaemonExecution[]\n daemonSessions DaemonSession[]\n agentInstances AgentInstance[]\n\n @@index([companyUuid])\n @@index([ownerUuid])\n}\n\n// AgentInstance — a durable, addressable (agent, host, cwd) actor. Created by\n// upsert when a daemon first reports a (host, cwd); it holds ONLY identity, never\n// liveness. The stable pointer that assignment (assigneeType="agent_instance") and\n// mention markup resolve to: DaemonConnection.uuid churns on every reconnect, but\n// the (agent, host, cwd) triple is stable, so this row\'s uuid is the durable handle.\n// Liveness for an instance is read through its linked DaemonConnection\n// (effectiveStatus / STALE_THRESHOLD_MS), never stored here — that is a connection\n// property (see add-agent-instance-addressing design \xa7"Data model"). host defaults\n// to "" (unknown host) and cwd is nullable (unknown path), mirroring the\n// DaemonConnection sentinels so a connection\'s identity maps 1:1 to an instance key.\nmodel AgentInstance {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n agentUuid String\n agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)\n host String @default("") // "" = unknown-host (matches DaemonConnection.host sentinel)\n cwd String? // null = unknown-path (matches DaemonConnection.cwd sentinel)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // Connections that have served this instance (current + historical). Liveness is\n // derived from these, never duplicated onto the instance row.\n connections DaemonConnection[]\n\n @@unique([companyUuid, agentUuid, host, cwd])\n @@index([companyUuid])\n @@index([agentUuid])\n}\n\n// API Key (independently managed, supports rotation and revocation)\nmodel ApiKey {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n agentUuid String // Agent\'s UUID\n agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)\n keyHash String @unique // API Key stored as hash\n keyPrefix String // Key prefix for display (e.g., "cho_xxx...")\n name String? // Optional descriptive name\n lastUsed DateTime?\n expiresAt DateTime?\n revokedAt DateTime?\n createdAt DateTime @default(now())\n\n @@index([companyUuid])\n @@index([agentUuid])\n}\n\n// Project Group (single-level grouping of projects)\nmodel ProjectGroup {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n name String\n description String? @default("")\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([companyUuid])\n}\n\n// Project\nmodel Project {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n name String\n description String?\n groupUuid String? // nullable FK → ProjectGroup.uuid\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n ideas Idea[]\n documents Document[]\n tasks Task[]\n proposals Proposal[]\n activities Activity[]\n\n @@index([companyUuid])\n @@index([groupUuid])\n}\n\n// Idea (raw human input)\nmodel Idea {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n projectUuid String\n project Project @relation(fields: [projectUuid], references: [uuid], onDelete: Cascade)\n title String\n content String? // Text content\n attachments Json? // Attachment list [{type, url, name}]\n // Status and assignment (ARCHITECTURE.md \xa77.3)\n status String @default("open") // open | elaborating | elaborated (3-state model; post-elaboration status derived from Proposal+Task)\n assigneeType String? // user | agent\n assigneeUuid String? // User or Agent UUID (polymorphic)\n assignedAt DateTime? // Assignment timestamp\n assignedByUuid String? // User UUID (human assignment)\n // Elaboration (AI-DLC Stage 3 — structured requirements clarification)\n elaborationDepth String? // "minimal" | "standard" | "comprehensive"\n elaborationStatus String? // "pending_answers" | "validating" | "resolved"\n // Lineage (single-parent forest — weak read-only relation, see openspec change add-idea-lineage)\n parentUuid String? // Single parent Idea UUID (nullable = top-level). One undifferentiated edge; semantics by context.\n parent Idea? @relation("IdeaLineage", fields: [parentUuid], references: [uuid], onDelete: Restrict, onUpdate: Restrict)\n children Idea[] @relation("IdeaLineage")\n isContainer Boolean @default(false) // Container idea: groups derived children; may elaborate but MUST NOT create a proposal. Orthogonal to parentUuid.\n createdByUuid String // User UUID\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([companyUuid])\n @@index([projectUuid])\n @@index([status])\n @@index([assigneeUuid])\n @@index([parentUuid])\n}\n\n// Document (PRD, tech design, etc. — Proposal output)\nmodel Document {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n projectUuid String\n project Project @relation(fields: [projectUuid], references: [uuid], onDelete: Cascade)\n type String // prd | tech_design | adr | ...\n title String\n content String? // Markdown content\n version Int @default(1)\n proposalUuid String? // Source Proposal UUID (traceable)\n createdByUuid String // User or Agent UUID\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([companyUuid])\n @@index([projectUuid])\n @@index([proposalUuid])\n}\n\n// Task (Proposal output or manually created)\nmodel Task {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n projectUuid String\n project Project @relation(fields: [projectUuid], references: [uuid], onDelete: Cascade)\n title String\n description String?\n // Status and assignment (ARCHITECTURE.md \xa77.2)\n status String @default("open") // open | assigned | in_progress | to_verify | done | closed\n priority String @default("medium") // low | medium | high\n storyPoints Float? // Effort estimate (unit: Agent hours)\n acceptanceCriteria String? // Acceptance criteria (Markdown)\n // Polymorphic assignee: user | agent | agent_instance. A pinned assignment is\n // assigneeType="agent_instance" with assigneeUuid = AgentInstance.uuid (the\n // durable (agent, host, cwd) actor); an un-pinned agent assignment is\n // assigneeType="agent". The legacy targetHost/targetCwd pin columns were removed\n // by add-agent-instance-addressing — the wake\'s pinned place now comes from the\n // task\'s own agent_instance assignment (override) or, for the same agent, the\n // root idea\'s instance (notification-turn.ts resolvePinnedTarget).\n assigneeType String? // user | agent | agent_instance\n assigneeUuid String? // User / Agent / AgentInstance UUID (polymorphic)\n assignedAt DateTime? // Assignment timestamp\n assignedByUuid String? // User UUID (human assignment)\n proposalUuid String? // Source Proposal UUID (traceable, optional)\n createdByUuid String // User or Agent UUID\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n // Task dependencies (DAG)\n dependsOn TaskDependency[] @relation("taskDependencies")\n dependedBy TaskDependency[] @relation("taskDependedBy")\n // Session checkins\n sessionCheckins SessionTaskCheckin[]\n // Structured acceptance criteria (independent table)\n acceptanceCriteriaItems AcceptanceCriterion[]\n\n @@index([companyUuid])\n @@index([projectUuid])\n @@index([proposalUuid])\n @@index([assigneeUuid])\n @@index([status])\n}\n\n// Task dependency (DAG edge)\nmodel TaskDependency {\n id Int @id @default(autoincrement())\n taskUuid String\n dependsOnUuid String\n task Task @relation("taskDependencies", fields: [taskUuid], references: [uuid], onDelete: Cascade)\n dependsOn Task @relation("taskDependedBy", fields: [dependsOnUuid], references: [uuid], onDelete: Cascade)\n createdAt DateTime @default(now())\n\n @@unique([taskUuid, dependsOnUuid])\n @@index([taskUuid])\n @@index([dependsOnUuid])\n}\n\n// Acceptance Criterion (independent table — per-row atomic updates, no concurrent write conflicts)\nmodel AcceptanceCriterion {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n taskUuid String\n task Task @relation(fields: [taskUuid], references: [uuid], onDelete: Cascade)\n description String\n required Boolean @default(true)\n // Dev self-check (developer fills during work)\n devStatus String @default("pending") // pending | passed | failed\n devEvidence String?\n devMarkedByType String? // "user" | "agent"\n devMarkedBy String? // UUID of marker\n devMarkedAt DateTime?\n // Admin verification (admin/user fills during verify)\n status String @default("pending") // pending | passed | failed\n evidence String?\n markedByType String? // "user" | "agent"\n markedBy String? // UUID of marker\n markedAt DateTime?\n sortOrder Int @default(0)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([taskUuid])\n}\n\n// Proposal (container model: created by Agent/human, approved by human, contains document drafts and task drafts)\nmodel Proposal {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n projectUuid String\n project Project @relation(fields: [projectUuid], references: [uuid], onDelete: Cascade)\n title String\n description String?\n\n // Input source (what the Proposal is based on)\n inputType String // idea | document\n inputUuids Json // Array of UUID strings\n\n // Container contents (can include both documents and tasks)\n documentDrafts Json? // Document draft list [{type, title, content}]\n taskDrafts Json? // Task draft list [{title, description, storyPoints, priority, acceptanceCriteria}]\n\n // Status and approval\n status String @default("draft") // draft | pending | approved | rejected | revised\n createdByUuid String // Agent or User UUID\n createdByType String @default("agent") // agent | user\n reviewedByUuid String? // User UUID\n reviewNote String? // Review note\n reviewedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([companyUuid])\n @@index([projectUuid])\n @@index([status])\n}\n\n// Comment (can comment on Idea, Proposal, Task, Document)\nmodel Comment {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n targetType String // idea | proposal | task | document\n targetUuid String // UUID of target entity (idea/proposal/task/document)\n content String\n authorType String // user | agent\n authorUuid String // User or Agent UUID\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([companyUuid])\n @@index([targetType, targetUuid])\n}\n\n// Activity stream (project-level) — generic design\nmodel Activity {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n projectUuid String\n project Project @relation(fields: [projectUuid], references: [uuid], onDelete: Cascade)\n // Target entity (generic design)\n targetType String // idea | task | proposal | document\n targetUuid String // Target entity UUID\n // Action info\n actorType String // user | agent\n actorUuid String // Actor UUID\n action String // created | assigned | released | status_changed | submitted | approved | rejected | comment_added\n value Json? // Action result value (e.g., new status, assignment target info)\n // Session attribution (denormalized to avoid joins)\n sessionUuid String?\n sessionName String?\n createdAt DateTime @default(now())\n\n @@index([companyUuid])\n @@index([projectUuid])\n @@index([targetType, targetUuid])\n @@index([createdAt])\n}\n\n// Agent Session (sub-session for swarm mode observability)\nmodel AgentSession {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n agentUuid String\n agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)\n name String\n description String?\n status String @default("active") // active | closed\n lastActiveAt DateTime @default(now())\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n taskCheckins SessionTaskCheckin[]\n\n @@index([companyUuid])\n @@index([agentUuid])\n @@index([status])\n @@index([lastActiveAt])\n}\n\n// Session-Task checkin relation (many-to-many)\nmodel SessionTaskCheckin {\n id Int @id @default(autoincrement())\n sessionUuid String\n session AgentSession @relation(fields: [sessionUuid], references: [uuid], onDelete: Cascade)\n taskUuid String\n task Task @relation(fields: [taskUuid], references: [uuid], onDelete: Cascade)\n checkinAt DateTime @default(now())\n checkoutAt DateTime?\n\n @@unique([sessionUuid, taskUuid])\n @@index([sessionUuid])\n @@index([taskUuid])\n}\n\n// Daemon SSE connection registry — one row per long-lived daemon SSE connection.\n// Mirrors AgentSession conventions (Int PK + uuid public id, application-level\n// company/agent relations, indexed status/liveness columns).\nmodel DaemonConnection {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n company Company @relation(fields: [companyUuid], references: [uuid])\n agentUuid String\n agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)\n\n clientType String // claude_code | openclaw | browser | other\n clientVersion String? // self-reported, untrusted, display-only\n // Self-reported hostname (display-only). Non-null with "" default: a @@unique\n // over a nullable column is broken for dedup because connectors treat each\n // null as distinct (Prisma docs), which would let reconnects accumulate rows.\n // Defaulting to "" makes (agentUuid, clientType, host) a deterministic upsert key.\n host String @default("")\n // Self-reported working directory this connection serves (display + identity).\n // Nullable per the ratified migration decision (DEC/Q6=a): rows that exist at\n // migration time get cwd=NULL as a sentinel and are backfilled on the next\n // handshake — no forced backfill script. NOTE: unlike `host` (which defaults\n // to "" to stay a deterministic dedup key), `cwd` is left nullable here.\n // Postgres treats NULL as distinct in a UNIQUE index, so two\n // (agentUuid, clientType, host, NULL) rows do NOT dedup; that is accepted for\n // the migration era (old daemons are single-cwd, so independent null rows\n // match the HARD-1 "behave exactly as today" requirement). Verified\n // empirically (psql) + against Prisma docs. The real cwd self-report, the\n // cwd-aware dedup, and the "reuse the migrated null row on reconnect"\n // compatibility path all live in T2 — not this task. Because Prisma types a\n // nullable column as non-null inside the compound-unique `where` input (NULL\n // cannot be targeted there), T1\'s still-untouched registerConnection() upsert\n // pins cwd to the "" sentinel to preserve today\'s deterministic dedup; T2\n // reconciles the ""-vs-NULL sentinel when it wires real cwd self-report.\n cwd String?\n startedAt DateTime? // self-reported daemon process start time\n\n // The durable AgentInstance this connection currently serves (same\n // (agentUuid, host, cwd) identity). Nullable: rows existing at migration time\n // have no instance yet and get linked on the next handshake (the "rebuild on\n // reconnect" path — no backfill). SetNull (app-level, relationMode=prisma) so\n // deleting an instance never deletes its connection history.\n agentInstanceUuid String?\n agentInstance AgentInstance? @relation(fields: [agentInstanceUuid], references: [uuid], onDelete: SetNull)\n\n status String @default("online") // online | offline\n connectedAt DateTime @default(now())\n lastSeenAt DateTime @default(now())\n disconnectedAt DateTime?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([agentUuid, clientType, host, cwd])\n @@index([companyUuid])\n @@index([agentUuid])\n @@index([status])\n @@index([lastSeenAt])\n @@index([agentInstanceUuid])\n}\n\n// Daemon execution state — one row per (connection, resource) the daemon is\n// running or has queued. The "resource" is whatever entity the wake-triggering\n// notification pointed at: a task, an idea (e.g. an @-mention or elaboration\n// under an idea), a proposal, or a document. Every wake the daemon performs is\n// reported, so the UI can show "this daemon is processing <resource>" regardless\n// of which resource caused it — not only task dispatches.\n//\n// Fed by the snapshot-reconcile ingest path; rows are retained as history\n// (status -> "ended") rather than deleted, so a connection that goes offline\n// still leaves a queryable trail. References DaemonConnection and the target\n// entity by uuid (relationMode = "prisma"); only the `agent` relation is modeled\n// with a DB-level back-relation so the cascade convention matches\n// DaemonConnection/ApiKey (delete an agent -> its execution rows go too).\nmodel DaemonExecution {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n agentUuid String\n agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)\n // → DaemonConnection.uuid (weak ref, no DB FK — the row outlives the\n // connection as history).\n connectionUuid String\n // The wake-triggering resource: entityType is "task" | "idea" | "proposal" |\n // "document"; entityUuid is that entity\'s uuid (weak ref, no DB FK).\n entityType String\n entityUuid String\n // → Idea.uuid; the root-idea lineage anchor for grouping/labeling. Null when\n // the wake has no idea ancestor (e.g. a standalone/quick task).\n rootIdeaUuid String?\n\n // running | queued | ended | interrupted\n // `interrupted` is a STICKY status: when a wake\'s subprocess is stopped (by a\n // user-requested interrupt or an unexpected crash) the row is marked\n // `interrupted` and snapshot-reconcile will NOT auto-downgrade it to `ended`\n // when the (now-gone) entity drops out of the daemon\'s next snapshot — so the\n // UI keeps showing an "interrupted, resumable" row. It is cleared only when a\n // resume re-dispatch transitions the entity back to running/queued.\n status String // running | queued | ended | interrupted\n // Discriminator for the `interrupted` status: `user` = an authorized\n // user-requested interrupt (manually resumable); `crash` = an unexpected\n // subprocess exit (auto-recovered via reconnect-backfill). Only set while\n // status == interrupted; cleared to null on any transition out of it. This\n // lives on the execution row (not Task) because the daemon executes idea /\n // proposal / document wakes too — interruption is an execution-lifecycle fact,\n // keyed by the same connection+entity the row already tracks.\n interruptedReason String? // null | user | crash\n startedAt DateTime? // set when/once the row is running; null while queued\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // A resource appears at most once per connection: re-dispatch updates the\n // existing row (queued -> running -> ended) rather than inserting a duplicate.\n @@unique([connectionUuid, entityType, entityUuid])\n @@index([connectionUuid, status])\n @@index([companyUuid, agentUuid])\n}\n\n// Daemon persistent conversation — one row per (agentUuid, sessionId) Claude\n// session. Distinct from DaemonExecution (the live running/queued snapshot):\n// this is the DURABLE conversation layer. Its identity and history survive the\n// holding connection going offline and the daemon restarting; it is never\n// deleted merely because a connection dropped. A turn references its execution\n// row by uuid (weak ref) but does not alter execution-state reconcile semantics.\n// Only the `agent` relation is modeled with a DB-level back-relation so the\n// cascade convention matches DaemonConnection/DaemonExecution/ApiKey.\nmodel DaemonSession {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n agentUuid String\n agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)\n // Stable business key: the directIdeaUuid for an idea-anchored session, or a\n // server-generated uuid for an ad-hoc session. Unique per agent.\n sessionId String\n directIdeaUuid String? // null ⇒ ad-hoc (no idea lineage)\n // → DaemonConnection.uuid (weak ref, no DB FK). The connection/cwd that owns\n // the on-disk Claude transcript. Fixed at creation; continuation is only ever\n // routed here, because `claude --resume <sessionId>` is cwd/machine-bound.\n originConnectionUuid String\n status String @default("active") // active | ended\n title String?\n lastTurnAt DateTime @default(now())\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n turns DaemonSessionTurn[]\n\n @@unique([agentUuid, sessionId])\n @@index([companyUuid, agentUuid])\n @@index([originConnectionUuid])\n}\n\n// One turn (wake) on a DaemonSession. Every wake — autonomous (task_assigned /\n// mentioned / elaboration / resume) or human (human_instruction) — is exactly one\n// turn, distinguished only by `trigger`. Turn creation + status transitions are\n// the SSE chokepoint for the conversation\'s live updates.\nmodel DaemonSessionTurn {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n sessionUuid String\n session DaemonSession @relation(fields: [sessionUuid], references: [uuid], onDelete: Cascade)\n seq Int // monotonic per session\n trigger String // task_assigned | mentioned | elaboration | elaboration_verified | start_development | yolo_requested | resume | human_instruction\n promptText String? // free-text body for human_instruction; null otherwise (canonical source)\n status String @default("pending") // pending | running | ended | interrupted\n // Discriminator for the `interrupted` status: `user` = user-requested interrupt,\n // `crash` = subprocess exited dirty, `shutdown` = daemon graceful shutdown killed\n // the wake, `offline` = server-side reconcile of a turn whose origin connection\n // went stale. Non-null iff status == interrupted. Unlike DaemonExecution\'s sticky\n // `interrupted` (resumable), a turn\'s `interrupted` is TERMINAL — it is durable\n // conversation history, never resumed or auto-retried.\n interruptedReason String?\n // Weak ref to the live DaemonExecution row this turn corresponds to (no DB FK;\n // execution rows are reconciled/transient).\n executionUuid String?\n startedAt DateTime?\n endedAt DateTime?\n createdAt DateTime @default(now())\n messages DaemonTranscriptMessage[]\n\n @@unique([sessionUuid, seq])\n @@index([sessionUuid, status])\n}\n\n// A single user/assistant transcript message on a turn. Tool-call, tool-result,\n// and thinking content are NOT stored. Its own table (not JSON on the turn) so\n// append + per-message rolling-window trim are clean row operations rather than\n// read-modify-write of a JSON blob under concurrent appends.\nmodel DaemonTranscriptMessage {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n turnUuid String\n turn DaemonSessionTurn @relation(fields: [turnUuid], references: [uuid], onDelete: Cascade)\n role String // user | assistant (tool/thinking NOT stored)\n text String @db.Text\n seq Int // order within turn; used for rolling-window trim\n createdAt DateTime @default(now())\n\n @@index([turnUuid, seq])\n}\n\n// Notification\nmodel Notification {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n projectUuid String\n // Recipient (polymorphic: user | agent)\n recipientType String // user | agent\n recipientUuid String\n // Related entity\n entityType String // task | idea | proposal | document | comment\n entityUuid String\n entityTitle String // Denormalized to avoid joins\n projectName String // Denormalized for project badge UI\n // Action info\n action String // assigned | status_changed | verified | reopened | submitted | approved | rejected | claimed | comment_added\n message String // Human-readable message\n // Denormalized write-once copy of a human_instruction turn\'s promptText\n // (DaemonSessionTurn.promptText is canonical). Display/transport only — lets the\n // daemon read the instruction body in the chorus_get_notifications call it already\n // makes, with no extra round-trip. Null for every non-instruction notification.\n instructionText String?\n actorType String // user | agent\n actorUuid String\n actorName String // Denormalized to avoid joins\n // Status\n readAt DateTime?\n archivedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([recipientType, recipientUuid, readAt])\n @@index([companyUuid, recipientUuid])\n @@index([entityType, entityUuid])\n @@index([projectUuid])\n}\n\n// Notification preferences\nmodel NotificationPreference {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n ownerType String // user | agent\n ownerUuid String\n // Toggle for each notification type (all enabled by default)\n taskAssigned Boolean @default(true)\n taskStatusChanged Boolean @default(true)\n taskVerified Boolean @default(true)\n taskReopened Boolean @default(true)\n proposalSubmitted Boolean @default(true)\n proposalApproved Boolean @default(true)\n proposalRejected Boolean @default(true)\n ideaClaimed Boolean @default(true)\n commentAdded Boolean @default(true)\n elaborationRequested Boolean @default(true)\n elaborationAnswered Boolean @default(true)\n mentioned Boolean @default(true)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([ownerType, ownerUuid])\n @@index([companyUuid])\n}\n\n// Mention (tracks @mentions in comments, tasks, ideas)\nmodel Mention {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n // Source: where the mention occurred\n sourceType String // comment | task | idea\n sourceUuid String // UUID of the comment, task, or idea\n // Target: who was mentioned\n mentionedType String // user | agent\n mentionedUuid String\n // Actor: who wrote the mention\n actorType String // user | agent\n actorUuid String\n createdAt DateTime @default(now())\n\n @@index([companyUuid])\n @@index([mentionedType, mentionedUuid])\n @@index([sourceType, sourceUuid])\n}\n\n// Elaboration Round (AI-DLC Stage 3 — structured requirements clarification)\nmodel ElaborationRound {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n companyUuid String\n ideaUuid String\n roundNumber Int\n status String @default("pending_answers") // pending_answers | answered | validated (needs_followup retained for legacy rows only — no longer written)\n isAppended Boolean @default(false) // true when created after the Idea was first resolved\n createdByType String // agent | user\n createdByUuid String\n validatedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n questions ElaborationQuestion[]\n\n @@index([ideaUuid])\n @@index([companyUuid])\n}\n\n// Elaboration Question (individual Q&A item within a round)\nmodel ElaborationQuestion {\n id Int @id @default(autoincrement())\n uuid String @unique @default(uuid())\n roundUuid String\n round ElaborationRound @relation(fields: [roundUuid], references: [uuid], onDelete: Cascade)\n questionId String // Round-scoped ID: "q1", "q2", etc.\n text String\n category String // functional | non_functional | business_context | technical_context | user_scenario | scope\n options Json // [{id, label, description?}] — 2-5 options\n required Boolean @default(true)\n // Answer (null = unanswered)\n selectedOptionId String?\n customText String?\n answeredAt DateTime?\n answeredByType String? // user | agent\n answeredByUuid String?\n // Validation issue (null = no issue)\n issueType String? // contradiction | ambiguity | incomplete\n issueDescription String?\n\n @@unique([roundUuid, questionId])\n @@index([roundUuid])\n}\n',runtimeDataModel:{models:{},enums:{},types:{}}};async function i(a){let{Buffer:b}=await Promise.resolve().then(c.t.bind(c,4573,23)),d=b.from(a,"base64");return new WebAssembly.Module(d)}h.runtimeDataModel=JSON.parse('{"models":{"Company":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"emailDomains","kind":"scalar","type":"String"},{"name":"oidcIssuer","kind":"scalar","type":"String"},{"name":"oidcClientId","kind":"scalar","type":"String"},{"name":"oidcEnabled","kind":"scalar","type":"Boolean"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"},{"name":"users","kind":"object","type":"User","relationName":"CompanyToUser"},{"name":"agents","kind":"object","type":"Agent","relationName":"AgentToCompany"},{"name":"apiKeys","kind":"object","type":"ApiKey","relationName":"ApiKeyToCompany"},{"name":"projects","kind":"object","type":"Project","relationName":"CompanyToProject"},{"name":"ideas","kind":"object","type":"Idea","relationName":"CompanyToIdea"},{"name":"documents","kind":"object","type":"Document","relationName":"CompanyToDocument"},{"name":"tasks","kind":"object","type":"Task","relationName":"CompanyToTask"},{"name":"proposals","kind":"object","type":"Proposal","relationName":"CompanyToProposal"},{"name":"activities","kind":"object","type":"Activity","relationName":"ActivityToCompany"},{"name":"comments","kind":"object","type":"Comment","relationName":"CommentToCompany"},{"name":"sessions","kind":"object","type":"AgentSession","relationName":"AgentSessionToCompany"},{"name":"daemonConnections","kind":"object","type":"DaemonConnection","relationName":"CompanyToDaemonConnection"},{"name":"agentInstances","kind":"object","type":"AgentInstance","relationName":"AgentInstanceToCompany"}],"dbName":null},"User":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"CompanyToUser"},{"name":"oidcSub","kind":"scalar","type":"String"},{"name":"email","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"avatarUrl","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"ownedAgents","kind":"object","type":"Agent","relationName":"AgentToUser"}],"dbName":null},"Agent":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"AgentToCompany"},{"name":"name","kind":"scalar","type":"String"},{"name":"roles","kind":"scalar","type":"String"},{"name":"permissions","kind":"scalar","type":"String"},{"name":"persona","kind":"scalar","type":"String"},{"name":"systemPrompt","kind":"scalar","type":"String"},{"name":"ownerUuid","kind":"scalar","type":"String"},{"name":"owner","kind":"object","type":"User","relationName":"AgentToUser"},{"name":"lastActiveAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"apiKeys","kind":"object","type":"ApiKey","relationName":"AgentToApiKey"},{"name":"sessions","kind":"object","type":"AgentSession","relationName":"AgentToAgentSession"},{"name":"daemonConnections","kind":"object","type":"DaemonConnection","relationName":"AgentToDaemonConnection"},{"name":"daemonExecutions","kind":"object","type":"DaemonExecution","relationName":"AgentToDaemonExecution"},{"name":"daemonSessions","kind":"object","type":"DaemonSession","relationName":"AgentToDaemonSession"},{"name":"agentInstances","kind":"object","type":"AgentInstance","relationName":"AgentToAgentInstance"}],"dbName":null},"AgentInstance":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"AgentInstanceToCompany"},{"name":"agentUuid","kind":"scalar","type":"String"},{"name":"agent","kind":"object","type":"Agent","relationName":"AgentToAgentInstance"},{"name":"host","kind":"scalar","type":"String"},{"name":"cwd","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"},{"name":"connections","kind":"object","type":"DaemonConnection","relationName":"AgentInstanceToDaemonConnection"}],"dbName":null},"ApiKey":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"ApiKeyToCompany"},{"name":"agentUuid","kind":"scalar","type":"String"},{"name":"agent","kind":"object","type":"Agent","relationName":"AgentToApiKey"},{"name":"keyHash","kind":"scalar","type":"String"},{"name":"keyPrefix","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"lastUsed","kind":"scalar","type":"DateTime"},{"name":"expiresAt","kind":"scalar","type":"DateTime"},{"name":"revokedAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"}],"dbName":null},"ProjectGroup":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"Project":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"CompanyToProject"},{"name":"name","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"groupUuid","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"},{"name":"ideas","kind":"object","type":"Idea","relationName":"IdeaToProject"},{"name":"documents","kind":"object","type":"Document","relationName":"DocumentToProject"},{"name":"tasks","kind":"object","type":"Task","relationName":"ProjectToTask"},{"name":"proposals","kind":"object","type":"Proposal","relationName":"ProjectToProposal"},{"name":"activities","kind":"object","type":"Activity","relationName":"ActivityToProject"}],"dbName":null},"Idea":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"CompanyToIdea"},{"name":"projectUuid","kind":"scalar","type":"String"},{"name":"project","kind":"object","type":"Project","relationName":"IdeaToProject"},{"name":"title","kind":"scalar","type":"String"},{"name":"content","kind":"scalar","type":"String"},{"name":"attachments","kind":"scalar","type":"Json"},{"name":"status","kind":"scalar","type":"String"},{"name":"assigneeType","kind":"scalar","type":"String"},{"name":"assigneeUuid","kind":"scalar","type":"String"},{"name":"assignedAt","kind":"scalar","type":"DateTime"},{"name":"assignedByUuid","kind":"scalar","type":"String"},{"name":"elaborationDepth","kind":"scalar","type":"String"},{"name":"elaborationStatus","kind":"scalar","type":"String"},{"name":"parentUuid","kind":"scalar","type":"String"},{"name":"parent","kind":"object","type":"Idea","relationName":"IdeaLineage"},{"name":"children","kind":"object","type":"Idea","relationName":"IdeaLineage"},{"name":"isContainer","kind":"scalar","type":"Boolean"},{"name":"createdByUuid","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"Document":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"CompanyToDocument"},{"name":"projectUuid","kind":"scalar","type":"String"},{"name":"project","kind":"object","type":"Project","relationName":"DocumentToProject"},{"name":"type","kind":"scalar","type":"String"},{"name":"title","kind":"scalar","type":"String"},{"name":"content","kind":"scalar","type":"String"},{"name":"version","kind":"scalar","type":"Int"},{"name":"proposalUuid","kind":"scalar","type":"String"},{"name":"createdByUuid","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"Task":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"CompanyToTask"},{"name":"projectUuid","kind":"scalar","type":"String"},{"name":"project","kind":"object","type":"Project","relationName":"ProjectToTask"},{"name":"title","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"status","kind":"scalar","type":"String"},{"name":"priority","kind":"scalar","type":"String"},{"name":"storyPoints","kind":"scalar","type":"Float"},{"name":"acceptanceCriteria","kind":"scalar","type":"String"},{"name":"assigneeType","kind":"scalar","type":"String"},{"name":"assigneeUuid","kind":"scalar","type":"String"},{"name":"assignedAt","kind":"scalar","type":"DateTime"},{"name":"assignedByUuid","kind":"scalar","type":"String"},{"name":"proposalUuid","kind":"scalar","type":"String"},{"name":"createdByUuid","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"},{"name":"dependsOn","kind":"object","type":"TaskDependency","relationName":"taskDependencies"},{"name":"dependedBy","kind":"object","type":"TaskDependency","relationName":"taskDependedBy"},{"name":"sessionCheckins","kind":"object","type":"SessionTaskCheckin","relationName":"SessionTaskCheckinToTask"},{"name":"acceptanceCriteriaItems","kind":"object","type":"AcceptanceCriterion","relationName":"AcceptanceCriterionToTask"}],"dbName":null},"TaskDependency":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"taskUuid","kind":"scalar","type":"String"},{"name":"dependsOnUuid","kind":"scalar","type":"String"},{"name":"task","kind":"object","type":"Task","relationName":"taskDependencies"},{"name":"dependsOn","kind":"object","type":"Task","relationName":"taskDependedBy"},{"name":"createdAt","kind":"scalar","type":"DateTime"}],"dbName":null},"AcceptanceCriterion":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"taskUuid","kind":"scalar","type":"String"},{"name":"task","kind":"object","type":"Task","relationName":"AcceptanceCriterionToTask"},{"name":"description","kind":"scalar","type":"String"},{"name":"required","kind":"scalar","type":"Boolean"},{"name":"devStatus","kind":"scalar","type":"String"},{"name":"devEvidence","kind":"scalar","type":"String"},{"name":"devMarkedByType","kind":"scalar","type":"String"},{"name":"devMarkedBy","kind":"scalar","type":"String"},{"name":"devMarkedAt","kind":"scalar","type":"DateTime"},{"name":"status","kind":"scalar","type":"String"},{"name":"evidence","kind":"scalar","type":"String"},{"name":"markedByType","kind":"scalar","type":"String"},{"name":"markedBy","kind":"scalar","type":"String"},{"name":"markedAt","kind":"scalar","type":"DateTime"},{"name":"sortOrder","kind":"scalar","type":"Int"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"Proposal":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"CompanyToProposal"},{"name":"projectUuid","kind":"scalar","type":"String"},{"name":"project","kind":"object","type":"Project","relationName":"ProjectToProposal"},{"name":"title","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"inputType","kind":"scalar","type":"String"},{"name":"inputUuids","kind":"scalar","type":"Json"},{"name":"documentDrafts","kind":"scalar","type":"Json"},{"name":"taskDrafts","kind":"scalar","type":"Json"},{"name":"status","kind":"scalar","type":"String"},{"name":"createdByUuid","kind":"scalar","type":"String"},{"name":"createdByType","kind":"scalar","type":"String"},{"name":"reviewedByUuid","kind":"scalar","type":"String"},{"name":"reviewNote","kind":"scalar","type":"String"},{"name":"reviewedAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"Comment":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"CommentToCompany"},{"name":"targetType","kind":"scalar","type":"String"},{"name":"targetUuid","kind":"scalar","type":"String"},{"name":"content","kind":"scalar","type":"String"},{"name":"authorType","kind":"scalar","type":"String"},{"name":"authorUuid","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"Activity":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"ActivityToCompany"},{"name":"projectUuid","kind":"scalar","type":"String"},{"name":"project","kind":"object","type":"Project","relationName":"ActivityToProject"},{"name":"targetType","kind":"scalar","type":"String"},{"name":"targetUuid","kind":"scalar","type":"String"},{"name":"actorType","kind":"scalar","type":"String"},{"name":"actorUuid","kind":"scalar","type":"String"},{"name":"action","kind":"scalar","type":"String"},{"name":"value","kind":"scalar","type":"Json"},{"name":"sessionUuid","kind":"scalar","type":"String"},{"name":"sessionName","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"}],"dbName":null},"AgentSession":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"AgentSessionToCompany"},{"name":"agentUuid","kind":"scalar","type":"String"},{"name":"agent","kind":"object","type":"Agent","relationName":"AgentToAgentSession"},{"name":"name","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"status","kind":"scalar","type":"String"},{"name":"lastActiveAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"},{"name":"taskCheckins","kind":"object","type":"SessionTaskCheckin","relationName":"AgentSessionToSessionTaskCheckin"}],"dbName":null},"SessionTaskCheckin":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"sessionUuid","kind":"scalar","type":"String"},{"name":"session","kind":"object","type":"AgentSession","relationName":"AgentSessionToSessionTaskCheckin"},{"name":"taskUuid","kind":"scalar","type":"String"},{"name":"task","kind":"object","type":"Task","relationName":"SessionTaskCheckinToTask"},{"name":"checkinAt","kind":"scalar","type":"DateTime"},{"name":"checkoutAt","kind":"scalar","type":"DateTime"}],"dbName":null},"DaemonConnection":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"company","kind":"object","type":"Company","relationName":"CompanyToDaemonConnection"},{"name":"agentUuid","kind":"scalar","type":"String"},{"name":"agent","kind":"object","type":"Agent","relationName":"AgentToDaemonConnection"},{"name":"clientType","kind":"scalar","type":"String"},{"name":"clientVersion","kind":"scalar","type":"String"},{"name":"host","kind":"scalar","type":"String"},{"name":"cwd","kind":"scalar","type":"String"},{"name":"startedAt","kind":"scalar","type":"DateTime"},{"name":"agentInstanceUuid","kind":"scalar","type":"String"},{"name":"agentInstance","kind":"object","type":"AgentInstance","relationName":"AgentInstanceToDaemonConnection"},{"name":"status","kind":"scalar","type":"String"},{"name":"connectedAt","kind":"scalar","type":"DateTime"},{"name":"lastSeenAt","kind":"scalar","type":"DateTime"},{"name":"disconnectedAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"DaemonExecution":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"agentUuid","kind":"scalar","type":"String"},{"name":"agent","kind":"object","type":"Agent","relationName":"AgentToDaemonExecution"},{"name":"connectionUuid","kind":"scalar","type":"String"},{"name":"entityType","kind":"scalar","type":"String"},{"name":"entityUuid","kind":"scalar","type":"String"},{"name":"rootIdeaUuid","kind":"scalar","type":"String"},{"name":"status","kind":"scalar","type":"String"},{"name":"interruptedReason","kind":"scalar","type":"String"},{"name":"startedAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"DaemonSession":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"agentUuid","kind":"scalar","type":"String"},{"name":"agent","kind":"object","type":"Agent","relationName":"AgentToDaemonSession"},{"name":"sessionId","kind":"scalar","type":"String"},{"name":"directIdeaUuid","kind":"scalar","type":"String"},{"name":"originConnectionUuid","kind":"scalar","type":"String"},{"name":"status","kind":"scalar","type":"String"},{"name":"title","kind":"scalar","type":"String"},{"name":"lastTurnAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"},{"name":"turns","kind":"object","type":"DaemonSessionTurn","relationName":"DaemonSessionToDaemonSessionTurn"}],"dbName":null},"DaemonSessionTurn":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"sessionUuid","kind":"scalar","type":"String"},{"name":"session","kind":"object","type":"DaemonSession","relationName":"DaemonSessionToDaemonSessionTurn"},{"name":"seq","kind":"scalar","type":"Int"},{"name":"trigger","kind":"scalar","type":"String"},{"name":"promptText","kind":"scalar","type":"String"},{"name":"status","kind":"scalar","type":"String"},{"name":"interruptedReason","kind":"scalar","type":"String"},{"name":"executionUuid","kind":"scalar","type":"String"},{"name":"startedAt","kind":"scalar","type":"DateTime"},{"name":"endedAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"messages","kind":"object","type":"DaemonTranscriptMessage","relationName":"DaemonSessionTurnToDaemonTranscriptMessage"}],"dbName":null},"DaemonTranscriptMessage":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"turnUuid","kind":"scalar","type":"String"},{"name":"turn","kind":"object","type":"DaemonSessionTurn","relationName":"DaemonSessionTurnToDaemonTranscriptMessage"},{"name":"role","kind":"scalar","type":"String"},{"name":"text","kind":"scalar","type":"String"},{"name":"seq","kind":"scalar","type":"Int"},{"name":"createdAt","kind":"scalar","type":"DateTime"}],"dbName":null},"Notification":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"projectUuid","kind":"scalar","type":"String"},{"name":"recipientType","kind":"scalar","type":"String"},{"name":"recipientUuid","kind":"scalar","type":"String"},{"name":"entityType","kind":"scalar","type":"String"},{"name":"entityUuid","kind":"scalar","type":"String"},{"name":"entityTitle","kind":"scalar","type":"String"},{"name":"projectName","kind":"scalar","type":"String"},{"name":"action","kind":"scalar","type":"String"},{"name":"message","kind":"scalar","type":"String"},{"name":"instructionText","kind":"scalar","type":"String"},{"name":"actorType","kind":"scalar","type":"String"},{"name":"actorUuid","kind":"scalar","type":"String"},{"name":"actorName","kind":"scalar","type":"String"},{"name":"readAt","kind":"scalar","type":"DateTime"},{"name":"archivedAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"NotificationPreference":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"ownerType","kind":"scalar","type":"String"},{"name":"ownerUuid","kind":"scalar","type":"String"},{"name":"taskAssigned","kind":"scalar","type":"Boolean"},{"name":"taskStatusChanged","kind":"scalar","type":"Boolean"},{"name":"taskVerified","kind":"scalar","type":"Boolean"},{"name":"taskReopened","kind":"scalar","type":"Boolean"},{"name":"proposalSubmitted","kind":"scalar","type":"Boolean"},{"name":"proposalApproved","kind":"scalar","type":"Boolean"},{"name":"proposalRejected","kind":"scalar","type":"Boolean"},{"name":"ideaClaimed","kind":"scalar","type":"Boolean"},{"name":"commentAdded","kind":"scalar","type":"Boolean"},{"name":"elaborationRequested","kind":"scalar","type":"Boolean"},{"name":"elaborationAnswered","kind":"scalar","type":"Boolean"},{"name":"mentioned","kind":"scalar","type":"Boolean"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"}],"dbName":null},"Mention":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"sourceType","kind":"scalar","type":"String"},{"name":"sourceUuid","kind":"scalar","type":"String"},{"name":"mentionedType","kind":"scalar","type":"String"},{"name":"mentionedUuid","kind":"scalar","type":"String"},{"name":"actorType","kind":"scalar","type":"String"},{"name":"actorUuid","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime"}],"dbName":null},"ElaborationRound":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"companyUuid","kind":"scalar","type":"String"},{"name":"ideaUuid","kind":"scalar","type":"String"},{"name":"roundNumber","kind":"scalar","type":"Int"},{"name":"status","kind":"scalar","type":"String"},{"name":"isAppended","kind":"scalar","type":"Boolean"},{"name":"createdByType","kind":"scalar","type":"String"},{"name":"createdByUuid","kind":"scalar","type":"String"},{"name":"validatedAt","kind":"scalar","type":"DateTime"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"},{"name":"questions","kind":"object","type":"ElaborationQuestion","relationName":"ElaborationQuestionToElaborationRound"}],"dbName":null},"ElaborationQuestion":{"fields":[{"name":"id","kind":"scalar","type":"Int"},{"name":"uuid","kind":"scalar","type":"String"},{"name":"roundUuid","kind":"scalar","type":"String"},{"name":"round","kind":"object","type":"ElaborationRound","relationName":"ElaborationQuestionToElaborationRound"},{"name":"questionId","kind":"scalar","type":"String"},{"name":"text","kind":"scalar","type":"String"},{"name":"category","kind":"scalar","type":"String"},{"name":"options","kind":"scalar","type":"Json"},{"name":"required","kind":"scalar","type":"Boolean"},{"name":"selectedOptionId","kind":"scalar","type":"String"},{"name":"customText","kind":"scalar","type":"String"},{"name":"answeredAt","kind":"scalar","type":"DateTime"},{"name":"answeredByType","kind":"scalar","type":"String"},{"name":"answeredByUuid","kind":"scalar","type":"String"},{"name":"issueType","kind":"scalar","type":"String"},{"name":"issueDescription","kind":"scalar","type":"String"}],"dbName":null}},"enums":{},"types":{}}'),h.compilerWasm={getRuntime:async()=>await Promise.resolve().then(c.bind(c,75811)),getQueryCompilerWasmModule:async()=>{let{wasm:a}=await Promise.resolve().then(c.bind(c,44865));return await i(a)},importName:"./query_compiler_fast_bg.js"},g.PrismaClientKnownRequestError,g.PrismaClientUnknownRequestError,g.PrismaClientRustPanicError,g.PrismaClientInitializationError,g.PrismaClientValidationError,g.sqltag,g.empty,g.join,g.raw,g.Sql,g.Decimal,g.Extensions.getExtensionContext,g.NullTypes.DbNull,g.NullTypes.JsonNull,g.NullTypes.AnyNull,g.DbNull;let j=g.JsonNull;g.AnyNull,g.makeStrictEnum({ReadUncommitted:"ReadUncommitted",ReadCommitted:"ReadCommitted",RepeatableRead:"RepeatableRead",Serializable:"Serializable"}),g.Extensions.defineExtension,globalThis.__dirname=require("path").dirname(__filename);let k=g.getPrismaClient(h)},52618:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{z:()=>r});var e=c(18818),f=c(59833),g=c(64939),h=c(65582),i=a([g,f]);[g,f]=i.then?(await i)():i;let j=process.env.DATABASE_URL||(process.env.DB_HOST?`postgresql://${process.env.DB_USERNAME}:${encodeURIComponent(process.env.DB_PASSWORD||"")}@${process.env.DB_HOST}:${process.env.DB_PORT||"5432"}/${process.env.DB_NAME||"chorus"}`:void 0),k=globalThis,l="1"===process.env.CHORUS_USE_PGLITE,m=k.pool??new g.default.Pool({connectionString:j,...l?{max:1}:{},...process.env.DB_HOST?{ssl:{rejectUnauthorized:!1}}:{}});k.pool||m.on("error",a=>{h.default.child({module:"pg-pool"}).warn({err:a.message},"Idle connection evicted")});let n=new f.M(m),o=h.default.child({module:"prisma"}),p=k.prisma??new e.m3({adapter:n,log:[{emit:"event",level:"error"}]}),q=h.default.child({module:"pg-pool"}),r=p.$extends({query:{async $allOperations({args:a,query:b}){let c;for(let d=0;d<=3;d++)try{return await b(a)}catch(a){if(a instanceof Error&&("code"in a&&"P1017"===a.code||a.message.includes("Connection terminated")||a.message.includes("Server has closed the connection"))&&d<3){q.warn("Stale connection evicted (attempt %d/%d)",d+1,3),c=a;continue}throw a}throw c}}});k.prisma||"function"!=typeof p.$on||(p.$on("query",a=>{o.debug({duration:a.duration},a.query)}),p.$on("warn",a=>{o.warn(a.message)}),p.$on("error",a=>{o.error(a.message)})),d()}catch(a){d(a)}})},65582:(a,b,c)=>{c.d(b,{default:()=>f,q:()=>g});var d=c(74552);let e=c.n(d)()({level:process.env.LOG_LEVEL||"info",base:{service:"chorus"},...{}}),f=e;function g(a){return e.child(a)}}};
|