@chorus-aidlc/chorus 0.10.0 → 0.11.1
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 +457 -340
- package/.next/standalone/.next/app-path-routes-manifest.json +39 -25
- package/.next/standalone/.next/build-manifest.json +5 -5
- package/.next/standalone/.next/prerender-manifest.json +30 -30
- package/.next/standalone/.next/routes-manifest.json +25 -0
- package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js.nft.json +1 -1
- 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.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js.nft.json +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.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js.nft.json +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 +2 -2
- 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 +2 -2
- 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]/proposals/[proposalUuid]/page.js +2 -3
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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.js +3 -3
- package/.next/standalone/.next/server/app/(dashboard)/projects/page.js.nft.json +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.js +2 -8
- package/.next/standalone/.next/server/app/(dashboard)/settings/page.js.nft.json +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 +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +5 -5
- package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route.js +1 -1
- 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.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.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.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 +1 -0
- package/.next/standalone/.next/server/app/api/agent-connections/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/agent-connections/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/agents/[uuid]/route.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.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.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.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.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.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.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.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.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.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/refresh/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/refresh/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/session/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/session/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/sync-token/route.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.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon/control/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/daemon/control/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/daemon/execution-state/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon/executions/route.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon/executions/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/daemon/executions/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/daemon/pending-turns/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon/resume/route.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon/resume/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/daemon/resume/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon/transcript/route.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon/transcript/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/daemon/transcript/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/daemon/turn-advance/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon-sessions/route.js +1 -0
- package/.next/standalone/.next/server/app/api/daemon-sessions/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/documents/[uuid]/route.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 -0
- package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/events/notifications/route.js +6 -2
- 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 +7 -3
- 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.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/mcp/route.js +5 -41
- 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.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.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.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.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.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.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.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.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.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]/route.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.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.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.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.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.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.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.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.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/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 +5 -5
- 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 +5 -5
- package/.next/standalone/.next/server/app/login/callback/page.js +2 -2
- package/.next/standalone/.next/server/app/login/callback/page.js.nft.json +1 -1
- 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 +5 -5
- 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 +5 -5
- package/.next/standalone/.next/server/app/login/silent-refresh/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/silent-refresh.html +1 -1
- package/.next/standalone/.next/server/app/login/silent-refresh.rsc +5 -5
- package/.next/standalone/.next/server/app/login.html +1 -1
- package/.next/standalone/.next/server/app/login.rsc +5 -5
- package/.next/standalone/.next/server/app/onboarding/page.js +2 -2
- package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
- 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 +6 -6
- 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 +7 -7
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +7 -7
- package/.next/standalone/.next/server/app-paths-manifest.json +39 -25
- package/.next/standalone/.next/server/chunks/1064.js +1 -0
- package/.next/standalone/.next/server/chunks/1596.js +13 -0
- package/.next/standalone/.next/server/chunks/2213.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 +2 -0
- package/.next/standalone/.next/server/chunks/3371.js +1 -0
- package/.next/standalone/.next/server/chunks/3419.js +1 -0
- package/.next/standalone/.next/server/chunks/369.js +1 -0
- package/.next/standalone/.next/server/chunks/4638.js +1 -0
- package/.next/standalone/.next/server/chunks/4711.js +530 -0
- package/.next/standalone/.next/server/chunks/5039.js +1 -0
- package/.next/standalone/.next/server/chunks/5300.js +1 -1
- package/.next/standalone/.next/server/chunks/{4913.js → 5631.js} +1 -1
- package/.next/standalone/.next/server/chunks/6044.js +1 -1
- package/.next/standalone/.next/server/chunks/6113.js +1 -1
- package/.next/standalone/.next/server/chunks/6207.js +1 -1
- package/.next/standalone/.next/server/chunks/6461.js +1 -0
- package/.next/standalone/.next/server/chunks/6712.js +1 -0
- package/.next/standalone/.next/server/chunks/7002.js +1 -1
- package/.next/standalone/.next/server/chunks/7063.js +1 -1
- package/.next/standalone/.next/server/chunks/7258.js +37 -0
- package/.next/standalone/.next/server/chunks/7368.js +1 -1
- package/.next/standalone/.next/server/chunks/7578.js +2 -2
- package/.next/standalone/.next/server/chunks/7867.js +1 -0
- package/.next/standalone/.next/server/chunks/7897.js +1 -0
- package/.next/standalone/.next/server/chunks/8012.js +1 -0
- package/.next/standalone/.next/server/chunks/8245.js +31 -0
- package/.next/standalone/.next/server/chunks/8322.js +1 -1
- package/.next/standalone/.next/server/chunks/9015.js +1 -1
- package/.next/standalone/.next/server/chunks/920.js +1 -1
- package/.next/standalone/.next/server/chunks/937.js +16 -2
- package/.next/standalone/.next/server/chunks/9629.js +1 -0
- package/.next/standalone/.next/server/chunks/9725.js +1 -0
- package/.next/standalone/.next/server/instrumentation.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/.next/server/next-font-manifest.js +1 -1
- package/.next/standalone/.next/server/next-font-manifest.json +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/pages-manifest.json +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/server/src/middleware.js +1 -1
- package/.next/standalone/.next/static/GQvpOux3M9CaxkMjL9GAI/_buildManifest.js +1 -0
- package/.next/standalone/.next/static/chunks/1217-323cc20b73ebfde9.js +1 -0
- package/.next/standalone/.next/static/chunks/{11207-8f4b154804f5a66f.js → 15183-5734d279b26e9414.js} +2 -2
- package/.next/standalone/.next/static/chunks/1879-7a8b283283218df2.js +1 -0
- package/.next/standalone/.next/static/chunks/19276-50b367d7b93d5f34.js +1 -0
- package/.next/standalone/.next/static/chunks/23466-e1176a6d814f4897.js +1 -0
- package/.next/standalone/.next/static/chunks/38040-a8687f86dd8e9d67.js +1 -0
- package/.next/standalone/.next/static/chunks/4860.8bdb37c964f92e48.js +1 -0
- package/.next/standalone/.next/static/chunks/58245-b2ea112ace9624d2.js +1 -0
- package/.next/standalone/.next/static/chunks/59296-783831c43aa0162e.js +1 -0
- package/.next/standalone/.next/static/chunks/60648-36ccbee4ce232d52.js +1 -0
- package/.next/standalone/.next/static/chunks/60694-68232120903209df.js +1 -0
- package/.next/standalone/.next/static/chunks/64648-ece4e2a59672cf63.js +1 -0
- package/.next/standalone/.next/static/chunks/{94655-1c75e0590a66215e.js → 66969-12f0b22c51f5a410.js} +1 -1
- package/.next/standalone/.next/static/chunks/70536-b8bf71098ae11f07.js +1 -0
- package/.next/standalone/.next/static/chunks/71350-88c2649fc693c1e8.js +1 -0
- package/.next/standalone/.next/static/chunks/78389-b32edc6bd5c570a9.js +1 -0
- package/.next/standalone/.next/static/chunks/78584-eb2fa8cf2f266329.js +1 -0
- package/.next/standalone/.next/static/chunks/78917-150ed14a99844aab.js +1 -0
- package/.next/standalone/.next/static/chunks/8574-b9739eb8d054c793.js +1 -0
- package/.next/standalone/.next/static/chunks/99373.12370329b9ab6beb.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-0a28456fea4ce95a.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/project-groups/[uuid]/page-a79969c5c9aadacd.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-a28f0eaa6f4ac94a.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-ef82b871895245ea.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-2c9bcbd11ddb8661.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-630b168598513ce8.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-99639479cc98965f.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-335f2450e44a0fba.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page-4a191d69b2b6e880.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/page-0faebb478be4c85d.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/{page-f198303c176c6e02.js → page-583e58d4d689d38b.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-2e8fcb72687100df.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/admin/companies/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/admin/companies/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/admin/login/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/admin/session/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agent-connections/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/sessions/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/api-keys/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/api-keys/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/check-default/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/company-oidc/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/default-login/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/identify/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/logout/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/me/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/refresh/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/session/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/sync-token/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/comments/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon/control/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon/execution-state/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon/executions/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon/pending-turns/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon/report-interrupt/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon/resume/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon/transcript/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon/turn-advance/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/instruction/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/ad-hoc/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/documents/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/entities/[type]/[uuid]/root-idea/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/events/notifications/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/events/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/health/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/claim/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/preview/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/parent/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/release/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mcp/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/me/assignments/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mentionables/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/archive/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/read/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/notifications/preferences/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/notifications/read-all/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/notifications/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/notifications/unread-count/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/dashboard/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/project-groups/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/activity/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/available/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/documents/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/group/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/tracker/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/summary/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/stats/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/dependencies/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/approve/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/close/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/reject/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/revoke/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/search/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/sessions/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/claim/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/release/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/sessions/route-4bc556c2fc8f3d24.js +1 -0
- package/.next/standalone/.next/static/chunks/app/layout-9963339572e2e64e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/onboarding/page-e9a69a0c537c704f.js +1 -0
- package/.next/standalone/.next/static/chunks/{webpack-5bb5740df10ed622.js → webpack-039590181c63871d.js} +1 -1
- package/.next/standalone/.next/static/css/1d9aaac01758b297.css +1 -0
- package/.next/standalone/.next/static/css/{84edd78de243cde6.css → b496025c9cd768cc.css} +1 -1
- package/.next/standalone/.next/static/media/013b72fa676f92e0-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/2b5b02fc7e511755-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/65f03d54ccadf4a8-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/7d4881bb7e1bf84d-s.p.woff2 +0 -0
- package/.next/standalone/.next/static/media/b9408752a0c24fb9-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/e038a29029a234f2-s.woff2 +0 -0
- package/.next/standalone/package.json +3 -1
- package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +13 -1
- package/.next/standalone/public/chorus-plugin/agents/code-reviewer.md +167 -0
- package/.next/standalone/public/chorus-plugin/bin/on-post-verify-task.sh +97 -17
- package/.next/standalone/public/chorus-plugin/bin/tests/test-on-post-verify-task.sh +191 -1
- package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +7 -4
- package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +3 -1
- package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +2 -1
- package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +12 -3
- package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +40 -1
- package/.next/standalone/public/skill/brainstorm-chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/chorus/SKILL.md +16 -11
- package/.next/standalone/public/skill/code-reviewer-chorus/SKILL.md +225 -0
- package/.next/standalone/public/skill/develop-chorus/SKILL.md +3 -1
- package/.next/standalone/public/skill/idea-chorus/SKILL.md +2 -1
- package/.next/standalone/public/skill/package.json +3 -1
- package/.next/standalone/public/skill/proposal-chorus/SKILL.md +1 -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 +12 -1
- package/.next/standalone/public/skill/task-reviewer-chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/yolo-chorus/SKILL.md +35 -1
- package/README.md +29 -0
- package/README.zh.md +29 -0
- package/chorus.mjs +120 -16
- package/cli/backfill.mjs +190 -0
- package/cli/chorus-client.mjs +154 -0
- package/cli/claude-spawner.mjs +415 -0
- package/cli/client-args.mjs +146 -0
- package/cli/control-handler.mjs +180 -0
- package/cli/credentials.mjs +155 -0
- package/cli/daemon-agent.mjs +38 -0
- package/cli/daemon-banner.mjs +80 -0
- package/cli/daemon-config.mjs +84 -0
- package/cli/daemon-lifecycle.mjs +191 -0
- package/cli/daemon-permission-mode.mjs +68 -0
- package/cli/daemon-rest-client.mjs +272 -0
- package/cli/daemon.mjs +572 -0
- package/cli/event-router.mjs +248 -0
- package/cli/interrupt-reporter.mjs +87 -0
- package/cli/lineage.mjs +155 -0
- package/cli/login.mjs +151 -0
- package/cli/mcp-config.mjs +58 -0
- package/cli/process-killer.mjs +205 -0
- package/cli/prompts.mjs +273 -0
- package/cli/sse-listener.mjs +258 -0
- package/cli/turn-reporter.mjs +75 -0
- package/cli/upload-hooks.mjs +400 -0
- package/cli/wake-queue.mjs +121 -0
- package/cli/waker.mjs +475 -0
- package/package.json +3 -1
- package/prisma/migrations/20260615082309_add_daemon_connection/migration.sql +37 -0
- package/prisma/migrations/20260616152622_add_daemon_task_execution/migration.sql +28 -0
- package/prisma/migrations/20260617013334_generalize_daemon_execution_to_any_resource/migration.sql +38 -0
- package/prisma/migrations/20260618022828_add_daemon_execution_interrupted/migration.sql +2 -0
- package/prisma/migrations/20260619055322_daemon_session_conversation/migration.sql +77 -0
- package/prisma/schema.prisma +366 -188
- package/.next/standalone/.next/server/chunks/1059.js +0 -1
- package/.next/standalone/.next/server/chunks/1165.js +0 -1
- package/.next/standalone/.next/server/chunks/1615.js +0 -31
- package/.next/standalone/.next/server/chunks/162.js +0 -16
- package/.next/standalone/.next/server/chunks/179.js +0 -158
- package/.next/standalone/.next/server/chunks/1871.js +0 -1
- package/.next/standalone/.next/server/chunks/2909.js +0 -98
- package/.next/standalone/.next/server/chunks/324.js +0 -1
- package/.next/standalone/.next/server/chunks/3555.js +0 -1
- package/.next/standalone/.next/server/chunks/4090.js +0 -13
- package/.next/standalone/.next/server/chunks/4343.js +0 -1
- package/.next/standalone/.next/server/chunks/4879.js +0 -1
- package/.next/standalone/.next/server/chunks/5541.js +0 -1
- package/.next/standalone/.next/server/chunks/5561.js +0 -7
- package/.next/standalone/.next/server/chunks/6643.js +0 -1
- package/.next/standalone/.next/server/chunks/6767.js +0 -1
- package/.next/standalone/.next/server/chunks/7228.js +0 -2
- package/.next/standalone/.next/server/chunks/7462.js +0 -255
- package/.next/standalone/.next/server/chunks/7859.js +0 -1
- package/.next/standalone/.next/server/chunks/8277.js +0 -1
- package/.next/standalone/.next/server/chunks/8637.js +0 -1
- package/.next/standalone/.next/server/chunks/896.js +0 -1
- package/.next/standalone/.next/server/chunks/9269.js +0 -1
- package/.next/standalone/.next/server/chunks/9615.js +0 -1
- package/.next/standalone/.next/static/AKJHlhCKd44_-khht8nN0/_buildManifest.js +0 -1
- package/.next/standalone/.next/static/chunks/20051-c242544dafd3a690.js +0 -1
- package/.next/standalone/.next/static/chunks/21932-bce5ba937d1603e1.js +0 -1
- package/.next/standalone/.next/static/chunks/23095-5bf481236249fdd8.js +0 -1
- package/.next/standalone/.next/static/chunks/23466-842c126491b753bc.js +0 -1
- package/.next/standalone/.next/static/chunks/45436-c5427023f3f386a1.js +0 -1
- package/.next/standalone/.next/static/chunks/4860.e071c0b9e32bd75f.js +0 -1
- package/.next/standalone/.next/static/chunks/49852-5337f139a2f87c46.js +0 -1
- package/.next/standalone/.next/static/chunks/52206-7c1b0c695c8035eb.js +0 -1
- package/.next/standalone/.next/static/chunks/55469-ed5ff019ff71ef59.js +0 -1
- package/.next/standalone/.next/static/chunks/59296-50e66102d44d9677.js +0 -1
- package/.next/standalone/.next/static/chunks/60524-9811b38c62fed16e.js +0 -1
- package/.next/standalone/.next/static/chunks/68855-5c15991e7cf8dc8a.js +0 -1
- package/.next/standalone/.next/static/chunks/70093-0ff6fd59445b5cb9.js +0 -1
- package/.next/standalone/.next/static/chunks/74030-3a6a6b75e47f5b96.js +0 -1
- package/.next/standalone/.next/static/chunks/78917-ff0fda86a96cfa60.js +0 -1
- package/.next/standalone/.next/static/chunks/95627-8d9f6d2d88f7a641.js +0 -1
- package/.next/standalone/.next/static/chunks/99373.4c336ea9ad07311e.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-5915ccd1a77ebcf8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/project-groups/[uuid]/page-94d102d945410b55.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-56c45b910f914895.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-2e000a7010d1e9ea.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-75e42d130404ca2b.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-d7747749ae6192d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-26488809d26e1daa.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-8f91ed174c14d5f0.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page-fcc9baa42e6de4d4.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/page-5233748464280e9d.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-ab87cbb18d0ee538.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/admin/companies/[uuid]/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/admin/companies/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/admin/login/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/admin/session/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/sessions/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agents/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/api-keys/[uuid]/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/api-keys/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/check-default/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/company-oidc/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/default-login/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/identify/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/logout/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/me/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/refresh/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/session/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/sync-token/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/comments/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/documents/[uuid]/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/events/notifications/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/events/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/health/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/claim/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/preview/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/parent/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/release/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/mcp/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/me/assignments/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/mentionables/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/archive/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/read/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/notifications/preferences/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/notifications/read-all/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/notifications/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/notifications/unread-count/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/dashboard/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/project-groups/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/activity/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/available/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/documents/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/group/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/tracker/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/summary/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/stats/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/dependencies/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/approve/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/close/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/reject/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/revoke/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/search/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/sessions/[uuid]/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/claim/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/release/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/sessions/route-cd9411c54c8f5b35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/layout-482dee7dace72c88.js +0 -1
- package/.next/standalone/.next/static/chunks/app/onboarding/page-d9dbd817391b462b.js +0 -1
- package/.next/standalone/.next/static/css/4279f38594ac772a.css +0 -1
- package/.next/standalone/.next/static/media/0f1bdadaf30e2d5f-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/2c34d62a75506231-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/601f5c280d60caca-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/a115172161b307bb-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/d100b2a099e34044-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/f5271587012faf78-s.p.woff2 +0 -0
- /package/.next/standalone/.next/static/{AKJHlhCKd44_-khht8nN0 → GQvpOux3M9CaxkMjL9GAI}/_ssgManifest.js +0 -0
package/cli/daemon.mjs
ADDED
|
@@ -0,0 +1,572 @@
|
|
|
1
|
+
// cli/daemon.mjs
|
|
2
|
+
// `chorus daemon` — the assembled client daemon. Wires together:
|
|
3
|
+
// CredentialResolver → ChorusClient (MCP) + SseListener (+ reconnect backfill)
|
|
4
|
+
// → EventRouter → WakeQueue → Waker (LineageResolver + ClaudeSpawner)
|
|
5
|
+
// On a task_assigned (and other wake actions) it spawns a local headless Claude
|
|
6
|
+
// Code, serialized per DIRECT idea, that acts via the chorus_* MCP tools. The
|
|
7
|
+
// Claude session id is the dispatched entity's direct idea uuid (deterministic,
|
|
8
|
+
// so a human can `claude --resume <idea-uuid>`); new-vs-resume is decided by
|
|
9
|
+
// probing the on-disk transcript — there is no persisted session-id map.
|
|
10
|
+
//
|
|
11
|
+
// Connection / session / transcript reporting to the server is intentionally
|
|
12
|
+
// NOT done here — the no-op UploadHooks reserve those seams for the derived
|
|
13
|
+
// observability idea.
|
|
14
|
+
|
|
15
|
+
import { resolveCredentials } from "./credentials.mjs";
|
|
16
|
+
import { prompt, writeLoginFile } from "./login.mjs";
|
|
17
|
+
import {
|
|
18
|
+
resolvePermissionMode,
|
|
19
|
+
yoloWarningLine,
|
|
20
|
+
} from "./daemon-permission-mode.mjs";
|
|
21
|
+
import { resolveAgentType } from "./daemon-agent.mjs";
|
|
22
|
+
import { formatBanner } from "./daemon-banner.mjs";
|
|
23
|
+
import { ChorusClient, validateAndFetchIdentity } from "./chorus-client.mjs";
|
|
24
|
+
import { SseListener } from "./sse-listener.mjs";
|
|
25
|
+
import { createBackfill } from "./backfill.mjs";
|
|
26
|
+
import { EventRouter } from "./event-router.mjs";
|
|
27
|
+
import { WakeQueue } from "./wake-queue.mjs";
|
|
28
|
+
import { Waker } from "./waker.mjs";
|
|
29
|
+
import { LineageResolver } from "./lineage.mjs";
|
|
30
|
+
import { ClaudeSpawner, resolveClaudePath } from "./claude-spawner.mjs";
|
|
31
|
+
import {
|
|
32
|
+
createExecutionUploadHooks,
|
|
33
|
+
createTranscriptUploadHooks,
|
|
34
|
+
mergeUploadHooks,
|
|
35
|
+
} from "./upload-hooks.mjs";
|
|
36
|
+
import { WAKE_ACTIONS } from "./prompts.mjs";
|
|
37
|
+
import { createInterruptReporter } from "./interrupt-reporter.mjs";
|
|
38
|
+
import { createTurnReporter } from "./turn-reporter.mjs";
|
|
39
|
+
import { createControlHandler } from "./control-handler.mjs";
|
|
40
|
+
import { resolveSigintTimeoutMs } from "./daemon-config.mjs";
|
|
41
|
+
import {
|
|
42
|
+
startBackground,
|
|
43
|
+
stopDaemon,
|
|
44
|
+
isRunning,
|
|
45
|
+
readLog,
|
|
46
|
+
} from "./daemon-lifecycle.mjs";
|
|
47
|
+
import { readFileSync } from "node:fs";
|
|
48
|
+
import { dirname, join } from "node:path";
|
|
49
|
+
import { fileURLToPath } from "node:url";
|
|
50
|
+
|
|
51
|
+
/** Env marker set on the detached child so it skips the interactive preflight. */
|
|
52
|
+
export const DETACHED_ENV = "CHORUS_DAEMON_DETACHED";
|
|
53
|
+
|
|
54
|
+
/** Read the chorus CLI version from package.json (best-effort; "?" on failure). */
|
|
55
|
+
function readVersion() {
|
|
56
|
+
try {
|
|
57
|
+
const root = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
58
|
+
return JSON.parse(readFileSync(join(root, "package.json"), "utf8")).version ?? "?";
|
|
59
|
+
} catch {
|
|
60
|
+
return "?";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function defaultLogger() {
|
|
65
|
+
return {
|
|
66
|
+
info: (m) => process.stdout.write(`${m}\n`),
|
|
67
|
+
warn: (m) => process.stderr.write(`${m}\n`),
|
|
68
|
+
error: (m) => process.stderr.write(`${m}\n`),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Build the fully-wired daemon without starting it. Returned object exposes
|
|
74
|
+
* `start()` / `stop()` and the internal pieces (for integration tests).
|
|
75
|
+
*
|
|
76
|
+
* @param {{ url: string, apiKey: string }} creds
|
|
77
|
+
* @param {{
|
|
78
|
+
* logger?: any,
|
|
79
|
+
* mcpClient?: any,
|
|
80
|
+
* lineage?: any,
|
|
81
|
+
* fetchImpl?: typeof fetch,
|
|
82
|
+
* sseListener?: any,
|
|
83
|
+
* spawner?: any,
|
|
84
|
+
* cwd?: string,
|
|
85
|
+
* hooks?: any,
|
|
86
|
+
* makeSseListener?: (opts: any) => any,
|
|
87
|
+
* maxConcurrency?: number,
|
|
88
|
+
* permissionMode?: "chorus"|"yolo",
|
|
89
|
+
* reportInterrupt?: (entityType: string, entityUuid: string, reason: "user"|"crash") => Promise<void>,
|
|
90
|
+
* advanceTurn?: (params: { sessionId: string, status: "running"|"ended", entityType?: string|null, entityUuid?: string|null }) => Promise<void>,
|
|
91
|
+
* sigintTimeoutMs?: number,
|
|
92
|
+
* }} [deps]
|
|
93
|
+
*/
|
|
94
|
+
export function buildDaemon(creds, deps = {}) {
|
|
95
|
+
const logger = deps.logger ?? defaultLogger();
|
|
96
|
+
const permissionMode = deps.permissionMode ?? "chorus";
|
|
97
|
+
// Per-wake verbose logging (daemon-startup-output), threaded into the Waker.
|
|
98
|
+
// agentType is currently display-only (banner/logs) — the spawn path is
|
|
99
|
+
// claude-code regardless (daemon-agent-selection reserves the slot only).
|
|
100
|
+
const verbose = deps.verbose ?? false;
|
|
101
|
+
// Escalation window for the interrupt killer (子3). Pre-resolved by runDaemon via
|
|
102
|
+
// the layered resolver; falls back to the resolver's default here when not given,
|
|
103
|
+
// so a daemon built directly (integration tests) still gets a sane value.
|
|
104
|
+
const sigintTimeoutMs = deps.sigintTimeoutMs ?? resolveSigintTimeoutMs();
|
|
105
|
+
// Interrupt reporter (子3): REST POST with the daemon's Bearer key (zero new deps),
|
|
106
|
+
// injectable for tests. The waker calls it on an interrupted/crashed exit.
|
|
107
|
+
// connectionState holds the connection uuid learned from the SSE handshake;
|
|
108
|
+
// declared here so the reporter (which needs it to address the execution row)
|
|
109
|
+
// can read it lazily. It is assigned by onConnectionId below.
|
|
110
|
+
/** @type {{ connectionUuid: string|null }} */
|
|
111
|
+
const connectionState = { connectionUuid: null };
|
|
112
|
+
const reportInterrupt =
|
|
113
|
+
deps.reportInterrupt ??
|
|
114
|
+
createInterruptReporter({
|
|
115
|
+
url: creds.url,
|
|
116
|
+
apiKey: creds.apiKey,
|
|
117
|
+
getConnectionUuid: () => connectionState.connectionUuid,
|
|
118
|
+
logger,
|
|
119
|
+
fetchImpl: deps.fetchImpl,
|
|
120
|
+
});
|
|
121
|
+
// Turn-lifecycle reporter (子1 — daemon-session-conversation): REST POST with the
|
|
122
|
+
// daemon's Bearer key (zero new deps), injectable for tests. The waker calls it on a
|
|
123
|
+
// wake's spawn (→ running) and exit (→ ended) to advance the server-side
|
|
124
|
+
// DaemonSessionTurn the notification chokepoint created. Reads the connectionUuid
|
|
125
|
+
// lazily from the same box the SSE handshake fills.
|
|
126
|
+
const advanceTurn =
|
|
127
|
+
deps.advanceTurn ??
|
|
128
|
+
createTurnReporter({
|
|
129
|
+
url: creds.url,
|
|
130
|
+
apiKey: creds.apiKey,
|
|
131
|
+
getConnectionUuid: () => connectionState.connectionUuid,
|
|
132
|
+
logger,
|
|
133
|
+
fetchImpl: deps.fetchImpl,
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
const mcpClient =
|
|
137
|
+
deps.mcpClient ?? new ChorusClient({ url: creds.url, apiKey: creds.apiKey, logger });
|
|
138
|
+
// Lineage resolution is a plain REST call (Bearer agent key) per notification —
|
|
139
|
+
// it does not go through the MCP client. (deps.fetchImpl is injectable for tests.)
|
|
140
|
+
const lineage =
|
|
141
|
+
deps.lineage ??
|
|
142
|
+
new LineageResolver({ url: creds.url, apiKey: creds.apiKey, logger, fetchImpl: deps.fetchImpl });
|
|
143
|
+
const spawner = deps.spawner ?? new ClaudeSpawner({ logger, permissionMode });
|
|
144
|
+
const queue = new WakeQueue({ maxConcurrency: deps.maxConcurrency ?? 4, logger });
|
|
145
|
+
|
|
146
|
+
// `connectionState` (declared above, next to the reporter) is the mutable box the
|
|
147
|
+
// SSE handshake fills with this daemon's `connection_registered` uuid; the upload
|
|
148
|
+
// hooks, the reporter, and the control handler all read it lazily so construction
|
|
149
|
+
// order doesn't matter. `waker` is assigned just below; the snapshot closure reads
|
|
150
|
+
// it lazily so the hooks can predate it.
|
|
151
|
+
/** @type {Waker|undefined} */
|
|
152
|
+
let waker;
|
|
153
|
+
|
|
154
|
+
// Execution-state upload hooks: POST the WakeQueue/waker-derived snapshot to
|
|
155
|
+
// the server on each lifecycle transition. `getSnapshot` reads the waker's
|
|
156
|
+
// per-task registry (which reuses the already-resolved root-idea lineage).
|
|
157
|
+
// Fire-and-forget; failures logged + non-fatal (see upload-hooks.mjs). The
|
|
158
|
+
// hooks share the daemon's existing creds + zero new deps (global fetch).
|
|
159
|
+
// Transcript upload hooks (子1 — daemon-session-conversation): the waker's
|
|
160
|
+
// stream-json consumer (onMessage) and pre-spawn (onSessionStart) feed these,
|
|
161
|
+
// which keep only user/assistant text and batch-POST it to /api/daemon/transcript
|
|
162
|
+
// for the current turn (resolved server-side by the session business key the waker
|
|
163
|
+
// already anchors on). Same zero-dep, fire-and-forget, warn-not-throw contract as
|
|
164
|
+
// the execution hooks; no connectionUuid needed (the agent key + sessionId suffice).
|
|
165
|
+
// The two hook sets are MERGED into the single object the waker takes:
|
|
166
|
+
// onSessionStart/onTranscriptMessage fan out to the transcript hooks,
|
|
167
|
+
// onExecutionChange to the execution hooks.
|
|
168
|
+
const hooks =
|
|
169
|
+
deps.hooks ??
|
|
170
|
+
mergeUploadHooks(
|
|
171
|
+
createExecutionUploadHooks({
|
|
172
|
+
url: creds.url,
|
|
173
|
+
apiKey: creds.apiKey,
|
|
174
|
+
getConnectionUuid: () => connectionState.connectionUuid,
|
|
175
|
+
getSnapshot: () => waker?.buildExecutionSnapshot() ?? [],
|
|
176
|
+
logger,
|
|
177
|
+
fetchImpl: deps.fetchImpl,
|
|
178
|
+
}),
|
|
179
|
+
createTranscriptUploadHooks({
|
|
180
|
+
url: creds.url,
|
|
181
|
+
apiKey: creds.apiKey,
|
|
182
|
+
logger,
|
|
183
|
+
fetchImpl: deps.fetchImpl,
|
|
184
|
+
}),
|
|
185
|
+
{ logger }
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
// One dedup set shared by the router (live SSE path) and the reconnect
|
|
189
|
+
// backfill, so a notification handled live is never re-woken on reconnect.
|
|
190
|
+
const seen = new Set();
|
|
191
|
+
// cwd: the daemon spawns all wakes in one working directory; the waker uses it
|
|
192
|
+
// BOTH to probe the transcript (new-vs-resume) and to spawn, so they never diverge.
|
|
193
|
+
waker = new Waker({ creds, lineage, spawner, cwd: deps.cwd ?? process.cwd(), hooks, logger, reportInterrupt, advanceTurn, verbose });
|
|
194
|
+
const router = new EventRouter({ mcpClient, waker, queue, wakeActions: WAKE_ACTIONS, seen, logger });
|
|
195
|
+
|
|
196
|
+
// Reverse control channel (子3): the control handler verifies a control event
|
|
197
|
+
// against this daemon's own connectionUuid + the running child for the target
|
|
198
|
+
// entity (q1=a double-check), then interrupts the subprocess. It reads the
|
|
199
|
+
// connectionUuid lazily from the same mutable box the SSE handshake fills, so it
|
|
200
|
+
// works regardless of construction order.
|
|
201
|
+
// Resume re-dispatch (子3): a `command:"resume"` control event re-runs the wake
|
|
202
|
+
// for the target entity. It reuses the SAME router/queue path as a normal wake,
|
|
203
|
+
// so serialization-per-direct-idea holds and the spawner's on-disk transcript
|
|
204
|
+
// probe naturally selects `claude --resume` (the session already exists). The
|
|
205
|
+
// synthetic event mirrors the `new_notification` shape the router expects; we
|
|
206
|
+
// fetch the real notification detail lazily inside the router via MCP, so a
|
|
207
|
+
// minimal `{ action: "resource_resumed", entityType, entityUuid }` is enough to
|
|
208
|
+
// re-key and re-spawn. Because resume rides the control channel (not a persisted
|
|
209
|
+
// notification), there is no notificationUuid — the router tolerates a synthetic
|
|
210
|
+
// resume dispatch via the dedicated entrypoint below.
|
|
211
|
+
const redispatchResume = (entityType, entityUuid) => {
|
|
212
|
+
router.dispatchResume?.({ entityType, entityUuid });
|
|
213
|
+
};
|
|
214
|
+
// Origin-only live delivery (子2 — daemon-instruction-injection): a `deliver_turn`
|
|
215
|
+
// control event means the server pinged THIS connection that a SPECIFIC new pending
|
|
216
|
+
// `human_instruction` turn (`turnUuid`) awaits. The control handler forwards that uuid
|
|
217
|
+
// to the connection-scoped pending-turns sweep (exposed as `backfill.pendingTurnsOnly`)
|
|
218
|
+
// so ONLY that one turn is dispatched — never a connection-wide sweep that would also
|
|
219
|
+
// run every other still-pending turn. It shares the same `seen` set as reconnect
|
|
220
|
+
// backfill (a turn runs at most once). Read lazily so it tolerates the construction
|
|
221
|
+
// order (backfill is assigned just after).
|
|
222
|
+
const deliverTurn = (turnUuid) => backfill?.pendingTurnsOnly?.(turnUuid);
|
|
223
|
+
const onControl = createControlHandler({
|
|
224
|
+
waker,
|
|
225
|
+
getConnectionUuid: () => connectionState.connectionUuid,
|
|
226
|
+
sigintTimeoutMs,
|
|
227
|
+
redispatchResume,
|
|
228
|
+
deliverTurn,
|
|
229
|
+
logger,
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
// Reconnect backfill re-dispatches notifications missed during a gap, through
|
|
233
|
+
// the SAME router/queue (so serialization holds) and the SAME seen set (so
|
|
234
|
+
// already-handled notifications are skipped). The router marks seen at
|
|
235
|
+
// dispatch; backfill's own pre-check is a cheap early-out.
|
|
236
|
+
// `deliverTurn` (defined above) closes over `backfill` but only invokes it lazily,
|
|
237
|
+
// so a `const` initialized here is safe despite the earlier lexical reference.
|
|
238
|
+
const backfill = createBackfill({
|
|
239
|
+
mcpClient,
|
|
240
|
+
dispatch: (event) => router.dispatch(event),
|
|
241
|
+
seen,
|
|
242
|
+
logger,
|
|
243
|
+
// 子1 — pending-turn backfill: re-derive unstarted turns from the turn table (NOT
|
|
244
|
+
// notifications) for this connection's origin-pinned sessions, so a lost delivery
|
|
245
|
+
// ping never loses an instruction. Shares the same router (dispatchPendingTurn) +
|
|
246
|
+
// seen set so a turn handled live (or by an earlier backfill) is not re-run. Reads
|
|
247
|
+
// the connectionUuid lazily from the SSE-handshake box.
|
|
248
|
+
url: creds.url,
|
|
249
|
+
apiKey: creds.apiKey,
|
|
250
|
+
getConnectionUuid: () => connectionState.connectionUuid,
|
|
251
|
+
dispatchPendingTurn: (turn) => router.dispatchPendingTurn?.(turn),
|
|
252
|
+
fetchImpl: deps.fetchImpl,
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
const sseListener =
|
|
256
|
+
deps.sseListener ??
|
|
257
|
+
(deps.makeSseListener ?? ((o) => new SseListener(o)))({
|
|
258
|
+
url: creds.url,
|
|
259
|
+
apiKey: creds.apiKey,
|
|
260
|
+
onEvent: (event) => router.dispatch(event),
|
|
261
|
+
// Capture the connectionUuid the server reports for this stream so the
|
|
262
|
+
// execution-state upload hooks can attribute snapshots to it.
|
|
263
|
+
onConnectionId: (connectionUuid) => {
|
|
264
|
+
connectionState.connectionUuid = connectionUuid;
|
|
265
|
+
logger.info(`[Chorus] registered as connection ${connectionUuid}`);
|
|
266
|
+
},
|
|
267
|
+
// Reverse control channel: a `type:"control"` event is forked here, NEVER to
|
|
268
|
+
// onEvent/router/queue — so it can never spawn a wake (子3).
|
|
269
|
+
onControl,
|
|
270
|
+
onReconnect: backfill,
|
|
271
|
+
logger,
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
return {
|
|
275
|
+
mcpClient,
|
|
276
|
+
lineage,
|
|
277
|
+
spawner,
|
|
278
|
+
queue,
|
|
279
|
+
waker,
|
|
280
|
+
router,
|
|
281
|
+
sseListener,
|
|
282
|
+
async start() {
|
|
283
|
+
await hooks.onConnect?.({ host: creds.url });
|
|
284
|
+
await sseListener.connect();
|
|
285
|
+
},
|
|
286
|
+
async stop() {
|
|
287
|
+
sseListener.disconnect?.();
|
|
288
|
+
await mcpClient.disconnect?.();
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Entry point for `chorus daemon`. Resolves credentials, validates them
|
|
295
|
+
* (echoing the agent identity), and runs the daemon until terminated.
|
|
296
|
+
*
|
|
297
|
+
* @param {{ url?: string, apiKey?: string, yolo?: boolean, sigintTimeout?: number|string }} flags
|
|
298
|
+
* @param {{
|
|
299
|
+
* resolve?: typeof resolveCredentials,
|
|
300
|
+
* validate?: typeof validateAndFetchIdentity,
|
|
301
|
+
* build?: typeof buildDaemon,
|
|
302
|
+
* log?: (m: string) => void,
|
|
303
|
+
* errLog?: (m: string) => void,
|
|
304
|
+
* waitForever?: () => Promise<void>,
|
|
305
|
+
* env?: Record<string, string|undefined>,
|
|
306
|
+
* }} [deps]
|
|
307
|
+
* @returns {Promise<number>}
|
|
308
|
+
*/
|
|
309
|
+
export async function runDaemon(flags = {}, deps = {}) {
|
|
310
|
+
const resolve = deps.resolve ?? resolveCredentials;
|
|
311
|
+
const validate = deps.validate ?? validateAndFetchIdentity;
|
|
312
|
+
const build = deps.build ?? buildDaemon;
|
|
313
|
+
const log = deps.log ?? ((m) => process.stdout.write(`${m}\n`));
|
|
314
|
+
const errLog = deps.errLog ?? ((m) => process.stderr.write(`${m}\n`));
|
|
315
|
+
const env = deps.env ?? process.env;
|
|
316
|
+
// TTY detection + IO seams (injectable for tests). Default to the real stdin
|
|
317
|
+
// TTY flag and the real prompt / ack helpers.
|
|
318
|
+
const isTTY = deps.isTTY ?? Boolean(process.stdin.isTTY);
|
|
319
|
+
const askPrompt = deps.prompt ?? prompt;
|
|
320
|
+
const writeCreds = deps.writeLoginFile ?? writeLoginFile;
|
|
321
|
+
const version = deps.version ?? readVersion();
|
|
322
|
+
const findClaude = deps.resolveClaudePath ?? resolveClaudePath;
|
|
323
|
+
const verbose = flags.verbose === true || env.CHORUS_VERBOSE === "1";
|
|
324
|
+
|
|
325
|
+
// Resolve the agent backend (default claude-code). An unknown --agent /
|
|
326
|
+
// CHORUS_AGENT is a hard error — no silent fallback (daemon-agent-selection).
|
|
327
|
+
const agentResult = resolveAgentType(flags, env);
|
|
328
|
+
if (!agentResult.ok) {
|
|
329
|
+
errLog(`[Chorus] ${agentResult.error}`);
|
|
330
|
+
return 1;
|
|
331
|
+
}
|
|
332
|
+
const agentType = agentResult.agent;
|
|
333
|
+
|
|
334
|
+
// Lifecycle subcommands (stop/status/restart/logs) operate on the pidfile/logfile
|
|
335
|
+
// managed by the `-d` path — they never start the long-lived foreground daemon.
|
|
336
|
+
// `run` falls through to the normal startup below. Injectable lifecycle for tests.
|
|
337
|
+
const lifecycle = deps.lifecycle ?? { startBackground, stopDaemon, isRunning, readLog };
|
|
338
|
+
// The preflight dep bundle — built from the same seams runDaemon resolved, so
|
|
339
|
+
// the detach/restart paths run the SAME (injectable) preflight, not the real
|
|
340
|
+
// implementations. Threaded into startDetached so tests can drive it offline.
|
|
341
|
+
const pfDeps = { flags, env, isTTY, resolve, validate, writeCreds, askPrompt, log, errLog };
|
|
342
|
+
|
|
343
|
+
const action = flags.action ?? "run";
|
|
344
|
+
if (action !== "run") {
|
|
345
|
+
return handleLifecycleAction(action, { log, errLog, lifecycle, pfDeps });
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
// `-d` / --detach: complete any interactive preflight in THIS foreground process
|
|
349
|
+
// (which holds the TTY), then spawn the daemon detached and return. The detached
|
|
350
|
+
// child re-enters runDaemon with the DETACHED_ENV marker set, so it skips the
|
|
351
|
+
// preflight prompts. A child run (marker present) falls through to normal startup.
|
|
352
|
+
const isDetachedChild = env[DETACHED_ENV] === "1";
|
|
353
|
+
if (flags.detach && !isDetachedChild) {
|
|
354
|
+
return startDetached({ log, errLog, lifecycle, pfDeps });
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// SIGINT-escalation window for the interrupt killer (子3) — layered:
|
|
358
|
+
// --sigint-timeout flag > CHORUS_DAEMON_SIGINT_TIMEOUT env > ~/.chorus/daemon.json > 10000.
|
|
359
|
+
const sigintTimeoutMs = resolveSigintTimeoutMs({ sigintTimeout: flags.sigintTimeout }, { env });
|
|
360
|
+
|
|
361
|
+
// Foreground preflight: resolve/complete credentials + resolve the permission
|
|
362
|
+
// posture (confirming yolo on a TTY). Reuses the same pfDeps bundle the detach
|
|
363
|
+
// path uses. Returns a numeric exit code on failure, or
|
|
364
|
+
// { creds, identity, permissionMode } on success.
|
|
365
|
+
const pf = await preflight(pfDeps);
|
|
366
|
+
if (typeof pf === "number") return pf;
|
|
367
|
+
const { creds, identity, permissionMode } = pf;
|
|
368
|
+
|
|
369
|
+
// Detect the claude executable (non-fatal): the daemon still subscribes when
|
|
370
|
+
// it's missing; a wake surfaces the error visibly when one arrives. The
|
|
371
|
+
// resolved path (or absence) is shown in the banner below.
|
|
372
|
+
const claudePath = findClaude();
|
|
373
|
+
|
|
374
|
+
// Boxed startup banner — one screen replacing the scattered [Chorus] lines.
|
|
375
|
+
log(
|
|
376
|
+
formatBanner(
|
|
377
|
+
{
|
|
378
|
+
version,
|
|
379
|
+
url: creds.url,
|
|
380
|
+
agentName: identity.name,
|
|
381
|
+
agentUuid: identity.uuid,
|
|
382
|
+
permissionMode,
|
|
383
|
+
credentialSource: creds.source,
|
|
384
|
+
agentType,
|
|
385
|
+
claudePath,
|
|
386
|
+
connection: "connecting…",
|
|
387
|
+
},
|
|
388
|
+
{ isTTY: isTTY && Boolean(process.stdout.isTTY) }
|
|
389
|
+
)
|
|
390
|
+
);
|
|
391
|
+
// The yolo posture is loud even when the banner scrolls past — keep the one-line
|
|
392
|
+
// ⚠ warning on stderr (it also names --chorus-only as the reclaim switch).
|
|
393
|
+
if (permissionMode === "yolo") {
|
|
394
|
+
errLog(`[Chorus] ${yoloWarningLine()}`);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
const daemon = build(creds, {
|
|
398
|
+
logger: { info: log, warn: errLog, error: errLog },
|
|
399
|
+
permissionMode,
|
|
400
|
+
agentType,
|
|
401
|
+
verbose,
|
|
402
|
+
sigintTimeoutMs,
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
// Graceful shutdown on signals.
|
|
406
|
+
const shutdown = () => {
|
|
407
|
+
log("[Chorus] shutting down daemon...");
|
|
408
|
+
Promise.resolve(daemon.stop()).finally(() => process.exit(0));
|
|
409
|
+
};
|
|
410
|
+
process.on("SIGINT", shutdown);
|
|
411
|
+
process.on("SIGTERM", shutdown);
|
|
412
|
+
|
|
413
|
+
log(`[Chorus] daemon starting — subscribing to ${creds.url}/api/events/notifications`);
|
|
414
|
+
await daemon.start();
|
|
415
|
+
log("[Chorus] daemon running. Waiting for task dispatches (Ctrl+C to stop).");
|
|
416
|
+
|
|
417
|
+
// Keep the process alive for the long-lived SSE subscription.
|
|
418
|
+
await (deps.waitForever ?? (() => new Promise(() => {})))();
|
|
419
|
+
return 0;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Foreground preflight shared by the normal and `-d` startup paths: resolve or
|
|
424
|
+
* interactively complete credentials, validate identity, and resolve the
|
|
425
|
+
* permission posture (confirming + persisting the yolo ack on a TTY). All the
|
|
426
|
+
* interactive IO lives here so it always runs in a real terminal before any
|
|
427
|
+
* detach. Returns a numeric exit code on failure, or
|
|
428
|
+
* { creds, identity, permissionMode } on success.
|
|
429
|
+
* @returns {Promise<number | { creds: any, identity: any, permissionMode: "yolo"|"chorus" }>}
|
|
430
|
+
*/
|
|
431
|
+
export async function preflight(ctx) {
|
|
432
|
+
const { flags, env, isTTY, resolve, validate, writeCreds, askPrompt, log, errLog } = ctx;
|
|
433
|
+
|
|
434
|
+
let creds;
|
|
435
|
+
// `identity` may be pre-filled by interactive completion (it validates as part
|
|
436
|
+
// of completing), so the main validate step is skipped when it's already set.
|
|
437
|
+
let identity = null;
|
|
438
|
+
try {
|
|
439
|
+
creds = resolve(flags);
|
|
440
|
+
} catch (err) {
|
|
441
|
+
// No resolvable credentials. On a TTY, complete them interactively (reusing
|
|
442
|
+
// the `chorus login` masked-prompt → validate → 0600 persist flow). On a
|
|
443
|
+
// non-TTY (systemd / nohup / CI / detached child), preserve the hard error +
|
|
444
|
+
// multi-source hint — never block on a prompt no one can answer.
|
|
445
|
+
if (!isTTY) {
|
|
446
|
+
errLog(err instanceof Error ? err.message : String(err));
|
|
447
|
+
return 1;
|
|
448
|
+
}
|
|
449
|
+
log("[Chorus] no credentials found — completing them interactively (saved for next time).");
|
|
450
|
+
let url = await askPrompt("Chorus URL: ");
|
|
451
|
+
let apiKey = await askPrompt("Chorus API key (cho_...): ", { mask: true });
|
|
452
|
+
url = (url || "").trim();
|
|
453
|
+
apiKey = (apiKey || "").trim();
|
|
454
|
+
if (!url || !apiKey) {
|
|
455
|
+
errLog("[Chorus] both a URL and an API key are required — aborting.");
|
|
456
|
+
return 1;
|
|
457
|
+
}
|
|
458
|
+
try {
|
|
459
|
+
identity = await validate({ url, apiKey });
|
|
460
|
+
} catch (verr) {
|
|
461
|
+
errLog(`[Chorus] credential validation failed: ${verr instanceof Error ? verr.message : String(verr)}`);
|
|
462
|
+
errLog("[Chorus] credentials were NOT saved.");
|
|
463
|
+
return 1;
|
|
464
|
+
}
|
|
465
|
+
writeCreds({ url, apiKey, agentUuid: identity.uuid, agentName: identity.name });
|
|
466
|
+
creds = { url, apiKey, source: "interactive" };
|
|
467
|
+
}
|
|
468
|
+
log(`[Chorus] credentials resolved from: ${creds.source}`);
|
|
469
|
+
|
|
470
|
+
if (!identity) {
|
|
471
|
+
try {
|
|
472
|
+
identity = await validate({ url: creds.url, apiKey: creds.apiKey });
|
|
473
|
+
} catch (err) {
|
|
474
|
+
errLog(`[Chorus] credential validation failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
475
|
+
return 1;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
log(`[Chorus] authenticated as ${identity.name} (${identity.uuid})`);
|
|
479
|
+
|
|
480
|
+
// Permission posture: default yolo. --chorus-only reclaims the restricted posture.
|
|
481
|
+
const decision = resolvePermissionMode(flags, env, { isTTY, hasAck: false });
|
|
482
|
+
|
|
483
|
+
return { creds, identity, permissionMode: decision.mode };
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Dispatch a daemon lifecycle subcommand (stop/status/restart/logs) against the
|
|
488
|
+
* pidfile/logfile-managed background daemon. Each reports clearly when nothing
|
|
489
|
+
* is running (no silent failure). `restart` performs stop-then-detached-start.
|
|
490
|
+
* @returns {Promise<number>} exit code
|
|
491
|
+
*/
|
|
492
|
+
export async function handleLifecycleAction(action, { log, errLog, lifecycle, pfDeps }) {
|
|
493
|
+
if (action === "status") {
|
|
494
|
+
const s = lifecycle.isRunning();
|
|
495
|
+
if (s.running) log(`[Chorus] daemon is running (pid ${s.pid}).`);
|
|
496
|
+
else if (s.stale) log(`[Chorus] daemon is NOT running (stale pidfile for pid ${s.pid}).`);
|
|
497
|
+
else log("[Chorus] daemon is not running.");
|
|
498
|
+
return 0;
|
|
499
|
+
}
|
|
500
|
+
if (action === "logs") {
|
|
501
|
+
const r = lifecycle.readLog();
|
|
502
|
+
if (!r.ok) {
|
|
503
|
+
errLog(`[Chorus] ${r.message}`);
|
|
504
|
+
return 1;
|
|
505
|
+
}
|
|
506
|
+
log(r.content);
|
|
507
|
+
return 0;
|
|
508
|
+
}
|
|
509
|
+
if (action === "stop") {
|
|
510
|
+
const r = lifecycle.stopDaemon();
|
|
511
|
+
(r.stopped ? log : errLog)(`[Chorus] ${r.message}`);
|
|
512
|
+
return r.stopped ? 0 : 1;
|
|
513
|
+
}
|
|
514
|
+
if (action === "restart") {
|
|
515
|
+
const r = lifecycle.stopDaemon();
|
|
516
|
+
log(`[Chorus] ${r.message}`);
|
|
517
|
+
// Start a fresh detached instance regardless of whether one was running.
|
|
518
|
+
return startDetached({ log, errLog, lifecycle, pfDeps, skipPreflight: true });
|
|
519
|
+
}
|
|
520
|
+
errLog(`[Chorus] unknown daemon action: ${action}`);
|
|
521
|
+
return 1;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* `-d` / --detach: run the foreground preflight (in this TTY), then spawn the
|
|
526
|
+
* daemon detached (re-exec self without `-d`, with the DETACHED_ENV marker so
|
|
527
|
+
* the child skips the preflight), write the pidfile, and return. Refuses to
|
|
528
|
+
* double-start when a live daemon is already recorded.
|
|
529
|
+
*
|
|
530
|
+
* `skipPreflight` (used by restart) bypasses the interactive preflight — restart
|
|
531
|
+
* runs non-interactively against already-persisted credentials/ack.
|
|
532
|
+
* @returns {Promise<number>} exit code
|
|
533
|
+
*/
|
|
534
|
+
export async function startDetached(ctx) {
|
|
535
|
+
const { log, errLog, lifecycle, pfDeps, skipPreflight } = ctx;
|
|
536
|
+
const env = pfDeps.env ?? process.env;
|
|
537
|
+
|
|
538
|
+
// Refuse to double-start before doing any interactive work.
|
|
539
|
+
const status = lifecycle.isRunning();
|
|
540
|
+
if (status.running) {
|
|
541
|
+
errLog(`[Chorus] a daemon is already running (pid ${status.pid}). Use 'chorus daemon stop' first.`);
|
|
542
|
+
return 1;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
if (!skipPreflight) {
|
|
546
|
+
// Run the SAME (injectable) preflight as the foreground path, in THIS TTY,
|
|
547
|
+
// before detaching — so credential completion + the yolo y/N confirm happen
|
|
548
|
+
// where a human can answer them.
|
|
549
|
+
const pf = await preflight(pfDeps);
|
|
550
|
+
if (typeof pf === "number") return pf; // preflight failed (e.g. declined yolo)
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
// Re-exec this same chorus entry without `-d` (so the child runs the daemon),
|
|
554
|
+
// marking it DETACHED so it skips the interactive preflight.
|
|
555
|
+
const nodePath = process.execPath;
|
|
556
|
+
const scriptArgs = process.argv.slice(1).filter((a) => a !== "-d" && a !== "--detach");
|
|
557
|
+
const result = lifecycle.startBackground({
|
|
558
|
+
nodePath,
|
|
559
|
+
args: scriptArgs,
|
|
560
|
+
env: { ...env, [DETACHED_ENV]: "1" },
|
|
561
|
+
cwd: process.cwd(),
|
|
562
|
+
});
|
|
563
|
+
|
|
564
|
+
if (result.alreadyRunning) {
|
|
565
|
+
errLog(`[Chorus] a daemon is already running (pid ${result.pid}).`);
|
|
566
|
+
return 1;
|
|
567
|
+
}
|
|
568
|
+
log(`[Chorus] daemon started in background (pid ${result.pid}).`);
|
|
569
|
+
log(`[Chorus] logs: chorus daemon logs (${result.logFile})`);
|
|
570
|
+
log(`[Chorus] stop: chorus daemon stop`);
|
|
571
|
+
return 0;
|
|
572
|
+
}
|