@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
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
// cli/chorus-client.mjs
|
|
2
|
+
// Minimal MCP client for the Chorus CLI daemon's OWN calls into the server
|
|
3
|
+
// (login validation, notification backfill, lineage resolution). Reuses
|
|
4
|
+
// @modelcontextprotocol/sdk, already a top-level dependency — adds no new dep
|
|
5
|
+
// (CLAUDE.md pitfall #9). Plain ESM port of packages/openclaw-plugin/src/mcp-client.ts.
|
|
6
|
+
//
|
|
7
|
+
// This is the daemon's client to Chorus; it is NOT how the spawned Claude Code
|
|
8
|
+
// gets its chorus_* tools (that's wired via --mcp-config in the spawner task).
|
|
9
|
+
|
|
10
|
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
11
|
+
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
12
|
+
|
|
13
|
+
const NOOP_LOGGER = { info() {}, warn() {}, error() {} };
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @typedef {Object} ChorusClientOptions
|
|
17
|
+
* @property {string} url Chorus base URL.
|
|
18
|
+
* @property {string} apiKey `cho_` API key.
|
|
19
|
+
* @property {{info(m:string):void,warn(m:string):void,error(m:string):void}} [logger]
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
export class ChorusClient {
|
|
23
|
+
/** @param {ChorusClientOptions} opts */
|
|
24
|
+
constructor(opts) {
|
|
25
|
+
this.url = opts.url;
|
|
26
|
+
this.apiKey = opts.apiKey;
|
|
27
|
+
this.logger = opts.logger ?? NOOP_LOGGER;
|
|
28
|
+
/** @type {Client | null} */
|
|
29
|
+
this.client = null;
|
|
30
|
+
/** @type {StreamableHTTPClientTransport | null} */
|
|
31
|
+
this.transport = null;
|
|
32
|
+
this.status = "disconnected";
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Lazily establish the MCP connection. */
|
|
36
|
+
async connect() {
|
|
37
|
+
if (this.status === "connected" && this.client) return;
|
|
38
|
+
this.status = "connecting";
|
|
39
|
+
try {
|
|
40
|
+
this.transport = new StreamableHTTPClientTransport(new URL("/api/mcp", this.url), {
|
|
41
|
+
requestInit: { headers: { Authorization: `Bearer ${this.apiKey}` } },
|
|
42
|
+
});
|
|
43
|
+
this.client = new Client({ name: "chorus-cli-daemon", version: "0.1.0" });
|
|
44
|
+
await this.client.connect(this.transport);
|
|
45
|
+
this.status = "connected";
|
|
46
|
+
} catch (err) {
|
|
47
|
+
this.status = "disconnected";
|
|
48
|
+
this.client = null;
|
|
49
|
+
this.transport = null;
|
|
50
|
+
throw err;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Call an MCP tool, returning the first text content block parsed as JSON
|
|
56
|
+
* (or the raw text if not JSON). Lazy-connects; retries once on a stateless
|
|
57
|
+
* 404 / session-expired error.
|
|
58
|
+
* @param {string} name
|
|
59
|
+
* @param {Record<string, unknown>} [args]
|
|
60
|
+
* @returns {Promise<unknown>}
|
|
61
|
+
*/
|
|
62
|
+
async callTool(name, args = {}) {
|
|
63
|
+
if (!this.client || this.status !== "connected") await this.connect();
|
|
64
|
+
try {
|
|
65
|
+
return await this.#doCallTool(name, args);
|
|
66
|
+
} catch (err) {
|
|
67
|
+
if (this.#isSessionExpired(err)) {
|
|
68
|
+
this.logger.warn("MCP session expired, reconnecting...");
|
|
69
|
+
this.status = "reconnecting";
|
|
70
|
+
this.client = null;
|
|
71
|
+
this.transport = null;
|
|
72
|
+
await this.connect();
|
|
73
|
+
return await this.#doCallTool(name, args);
|
|
74
|
+
}
|
|
75
|
+
throw err;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async disconnect() {
|
|
80
|
+
if (this.client) {
|
|
81
|
+
try {
|
|
82
|
+
await this.client.close();
|
|
83
|
+
} catch {
|
|
84
|
+
// ignore
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
this.client = null;
|
|
88
|
+
this.transport = null;
|
|
89
|
+
this.status = "disconnected";
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** @param {string} name @param {Record<string, unknown>} args */
|
|
93
|
+
async #doCallTool(name, args) {
|
|
94
|
+
if (!this.client) throw new Error("MCP client not connected");
|
|
95
|
+
const result = await this.client.callTool({ name, arguments: args });
|
|
96
|
+
const blocks = /** @type {Array<{type:string,text?:string}>} */ (result.content ?? []);
|
|
97
|
+
if (result.isError) {
|
|
98
|
+
const text = blocks.filter((c) => c.type === "text").map((c) => c.text).join("\n");
|
|
99
|
+
// Tool-LEVEL error (e.g. "Task not found"): the call reached the server
|
|
100
|
+
// and the tool ran — this is NOT a transport/session failure. Tag it so
|
|
101
|
+
// #isSessionExpired won't mistake its text (which may contain "not found")
|
|
102
|
+
// for a stateless-404 and trigger a pointless reconnect + retry.
|
|
103
|
+
const err = new Error(`Chorus MCP tool error (${name}): ${text}`);
|
|
104
|
+
/** @type {any} */ (err).isToolError = true;
|
|
105
|
+
throw err;
|
|
106
|
+
}
|
|
107
|
+
const textBlock = blocks.find((c) => c.type === "text");
|
|
108
|
+
if (!textBlock?.text) return null;
|
|
109
|
+
try {
|
|
110
|
+
return JSON.parse(textBlock.text);
|
|
111
|
+
} catch {
|
|
112
|
+
return textBlock.text;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** @param {unknown} err */
|
|
117
|
+
#isSessionExpired(err) {
|
|
118
|
+
if (!(err instanceof Error)) return false;
|
|
119
|
+
// A tool-level error reached the server and ran — never a session/transport
|
|
120
|
+
// issue, so don't reconnect+retry on it (it'd fail identically).
|
|
121
|
+
if (/** @type {any} */ (err).isToolError) return false;
|
|
122
|
+
const m = err.message.toLowerCase();
|
|
123
|
+
// Stateless-404 / lost-transport signals only. "not found" is intentionally
|
|
124
|
+
// NOT matched on its own (too broad — collides with entity-not-found tool
|
|
125
|
+
// text); a transport 404 still contains "404".
|
|
126
|
+
return m.includes("404") || m.includes("session");
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Validate a url + apiKey pair by calling `chorus_checkin` and reading the
|
|
132
|
+
* authenticated agent identity. Returns the identity on success; throws on
|
|
133
|
+
* failure (bad key, unreachable server, unexpected shape).
|
|
134
|
+
*
|
|
135
|
+
* @param {{ url: string, apiKey: string }} creds
|
|
136
|
+
* @param {{ makeClient?: (o: ChorusClientOptions) => ChorusClient }} [deps]
|
|
137
|
+
* @returns {Promise<{ uuid: string, name: string }>}
|
|
138
|
+
*/
|
|
139
|
+
export async function validateAndFetchIdentity(creds, deps = {}) {
|
|
140
|
+
const makeClient = deps.makeClient ?? ((o) => new ChorusClient(o));
|
|
141
|
+
const client = makeClient({ url: creds.url, apiKey: creds.apiKey });
|
|
142
|
+
try {
|
|
143
|
+
const result = /** @type {{ agent?: { uuid?: string, name?: string } }} */ (
|
|
144
|
+
await client.callTool("chorus_checkin", {})
|
|
145
|
+
);
|
|
146
|
+
const agent = result?.agent;
|
|
147
|
+
if (!agent || typeof agent.uuid !== "string") {
|
|
148
|
+
throw new Error("Unexpected chorus_checkin response — no agent identity returned");
|
|
149
|
+
}
|
|
150
|
+
return { uuid: agent.uuid, name: typeof agent.name === "string" ? agent.name : agent.uuid };
|
|
151
|
+
} finally {
|
|
152
|
+
await client.disconnect();
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
// cli/claude-spawner.mjs
|
|
2
|
+
// Cross-platform headless Claude Code spawner. This is the load-bearing
|
|
3
|
+
// engineering point of the daemon: parsing stream-json is plain JS and
|
|
4
|
+
// platform-neutral; the real work is spawning, and it is all Windows.
|
|
5
|
+
//
|
|
6
|
+
// Verified against Claude Code CLI 2.1.177:
|
|
7
|
+
// • `-p/--print` + `--output-format stream-json` emits NDJSON (one JSON object
|
|
8
|
+
// per line); every line carries `session_id`.
|
|
9
|
+
// • `--session-id <uuid>` sets the session id for a fresh run, and
|
|
10
|
+
// `--resume <uuid>` continues it. So we GENERATE the session id client-side
|
|
11
|
+
// and pass it in, rather than scraping it from the init event — the id is
|
|
12
|
+
// authoritative on our side. We still read `session_id` from the stream as
|
|
13
|
+
// confirmation.
|
|
14
|
+
// • `--mcp-config <file>` loads MCP servers from a JSON file.
|
|
15
|
+
//
|
|
16
|
+
// The flag list lives in ONE place (buildArgs) so a CLI flag change is a
|
|
17
|
+
// single-line edit.
|
|
18
|
+
//
|
|
19
|
+
// HEADLESS SIGNAL (add-daemon-headless-interaction-guard): wake() spawns the child
|
|
20
|
+
// with CHORUS_DAEMON_HEADLESS=1 merged over the inherited env — a machine-checkable
|
|
21
|
+
// marker that this is a daemon-woken, no-human-at-the-terminal run. buildArgs is
|
|
22
|
+
// deliberately NOT changed (no --append-system-prompt): the headless behavior rule is
|
|
23
|
+
// carried per-turn by the wake-prompt preamble in prompts.mjs, not at the system level.
|
|
24
|
+
|
|
25
|
+
import { spawn } from "node:child_process";
|
|
26
|
+
import { existsSync, statSync } from "node:fs";
|
|
27
|
+
import { homedir } from "node:os";
|
|
28
|
+
import { win32 as pathWin32, posix as pathPosix, join as pathJoin } from "node:path";
|
|
29
|
+
|
|
30
|
+
const NOOP_LOGGER = { info() {}, warn() {}, error() {} };
|
|
31
|
+
|
|
32
|
+
/** Matches a canonical lowercase UUID (any version). Chorus idea uuids are v4. */
|
|
33
|
+
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* True iff `id` is a well-formed, lowercase UUID. The daemon anchors the Claude
|
|
37
|
+
* session id on a Chorus idea uuid (already lowercase v4); we validate before
|
|
38
|
+
* spawn as a cheap guardrail so a malformed id surfaces visibly instead of
|
|
39
|
+
* failing opaquely inside claude (no-silent-errors).
|
|
40
|
+
* @param {unknown} id
|
|
41
|
+
* @returns {boolean}
|
|
42
|
+
*/
|
|
43
|
+
export function isValidSessionId(id) {
|
|
44
|
+
return typeof id === "string" && UUID_RE.test(id);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Claude Code's transcript directory for a working directory. Verified against the
|
|
49
|
+
* live install: claude escapes the ABSOLUTE cwd by replacing both `/` and `.` with
|
|
50
|
+
* `-` (e.g. `/home/u/dev/ai-pm` → `-home-u-dev-ai-pm`,
|
|
51
|
+
* `/home/u/.cfg/x` → `-home-u--cfg-x`). On Windows the separators/drive differ, so
|
|
52
|
+
* we escape backslashes and colons too; the rule there is best-effort and must be
|
|
53
|
+
* re-verified against a Windows claude before claiming Windows resume support.
|
|
54
|
+
* @param {string} cwd Absolute working directory.
|
|
55
|
+
* @param {NodeJS.Platform} [platform]
|
|
56
|
+
* @returns {string}
|
|
57
|
+
*/
|
|
58
|
+
export function escapeCwd(cwd, platform = process.platform) {
|
|
59
|
+
// Replace path separators and dots with `-`. On POSIX that's `/` and `.`; on
|
|
60
|
+
// Windows also `\` and the drive-colon. Collapsing both `/` and `.` is what
|
|
61
|
+
// produces the verified double-dash on a leading-dot segment.
|
|
62
|
+
const re = platform === "win32" ? /[\\/.:]/g : /[/.]/g;
|
|
63
|
+
return cwd.replace(re, "-");
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The on-disk transcript path for a session id under a given cwd:
|
|
68
|
+
* <configDir>/projects/<cwd-escaped>/<sessionId>.jsonl
|
|
69
|
+
* `<configDir>` honors CLAUDE_CONFIG_DIR (falling back to ~/.claude), matching
|
|
70
|
+
* Claude Code. Used to decide --session-id (absent) vs --resume (present).
|
|
71
|
+
* @param {string} sessionId @param {string} cwd
|
|
72
|
+
* @param {{ env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, home?: string }} [deps]
|
|
73
|
+
* @returns {string}
|
|
74
|
+
*/
|
|
75
|
+
export function transcriptPath(sessionId, cwd, deps = {}) {
|
|
76
|
+
const env = deps.env ?? process.env;
|
|
77
|
+
const platform = deps.platform ?? process.platform;
|
|
78
|
+
const configDir = env.CLAUDE_CONFIG_DIR || pathJoin(deps.home ?? homedir(), ".claude");
|
|
79
|
+
return pathJoin(configDir, "projects", escapeCwd(cwd, platform), `${sessionId}.jsonl`);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Decide whether a wake for `sessionId` in `cwd` is a NEW session (`--session-id`)
|
|
84
|
+
* or a RESUME (`--resume`), by probing whether the transcript file already exists.
|
|
85
|
+
* The disk is the source of truth `claude --resume` itself consults, so the probe
|
|
86
|
+
* is stateless and survives daemon restarts. This layout is Claude Code-specific.
|
|
87
|
+
* @param {string} sessionId @param {string} cwd
|
|
88
|
+
* @param {{ env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, home?: string, exists?: (p: string) => boolean }} [deps]
|
|
89
|
+
* @returns {boolean} true → new session; false → resume an existing one.
|
|
90
|
+
*/
|
|
91
|
+
export function isNewSession(sessionId, cwd, deps = {}) {
|
|
92
|
+
const exists = deps.exists ?? existsSync;
|
|
93
|
+
return !exists(transcriptPath(sessionId, cwd, deps));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Resolve the real `claude` executable path WITHOUT a shell. On Windows the bin
|
|
98
|
+
* is `claude.cmd` (npm shim); `spawn("claude")` without `shell:true` throws
|
|
99
|
+
* ENOENT because it won't resolve `.cmd`. We walk PATH for the platform's
|
|
100
|
+
* candidate names and return the first that exists. `shell:true` is avoided
|
|
101
|
+
* deliberately — it re-introduces the escaping/injection surface.
|
|
102
|
+
*
|
|
103
|
+
* @param {{ env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, isFile?: (p: string) => boolean }} [deps]
|
|
104
|
+
* @returns {string | null}
|
|
105
|
+
*/
|
|
106
|
+
export function resolveClaudePath(deps = {}) {
|
|
107
|
+
const env = deps.env ?? process.env;
|
|
108
|
+
const platform = deps.platform ?? process.platform;
|
|
109
|
+
const isFile =
|
|
110
|
+
deps.isFile ??
|
|
111
|
+
((p) => {
|
|
112
|
+
// isFile (not just exists): a directory named `claude` on PATH would
|
|
113
|
+
// otherwise be "found" and then fail at spawn time.
|
|
114
|
+
try {
|
|
115
|
+
return statSync(p).isFile();
|
|
116
|
+
} catch {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
// An explicit override always wins (set by the daemon if the user configured it).
|
|
122
|
+
if (env.CHORUS_CLAUDE_PATH && isFile(env.CHORUS_CLAUDE_PATH)) {
|
|
123
|
+
return env.CHORUS_CLAUDE_PATH;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Use platform-correct path semantics so the resolver is testable for
|
|
127
|
+
// Windows from a POSIX host (`;` delimiter + `\` join vs `:` + `/`).
|
|
128
|
+
const isWin = platform === "win32";
|
|
129
|
+
const p = isWin ? pathWin32 : pathPosix;
|
|
130
|
+
const names = isWin ? ["claude.cmd", "claude.exe", "claude"] : ["claude"];
|
|
131
|
+
const pathVar = env.PATH || env.Path || "";
|
|
132
|
+
const dirs = pathVar.split(p.delimiter).filter(Boolean);
|
|
133
|
+
for (const dir of dirs) {
|
|
134
|
+
for (const name of names) {
|
|
135
|
+
const candidate = p.join(dir, name);
|
|
136
|
+
if (isFile(candidate)) return candidate;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The MCP server name the daemon writes into --mcp-config (see mcp-config.mjs).
|
|
144
|
+
* Claude namespaces its tools as `mcp__<serverName>__<tool>`, so this drives the
|
|
145
|
+
* default allowlist below. Keep in sync with mcp-config.mjs's `mcpServers` key.
|
|
146
|
+
*/
|
|
147
|
+
export const CHORUS_MCP_SERVER_NAME = "chorus";
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Permission posture for the spawned headless Claude. Headless `claude -p`
|
|
151
|
+
* auto-DENIES any tool that isn't pre-approved (there's no interactive prompt to
|
|
152
|
+
* answer), so without one of these the woken agent can't call a single chorus_*
|
|
153
|
+
* tool and exits having done nothing. Verified against Claude Code 2.1.177.
|
|
154
|
+
*
|
|
155
|
+
* - "chorus" (default): `--allowedTools "mcp__chorus__*"` — the woken agent may
|
|
156
|
+
* use Chorus MCP tools (comment, claim, report, status) but NOT Bash / file
|
|
157
|
+
* edits. Safe default: covers comment/assign/elaboration wakes out of the box,
|
|
158
|
+
* minimal blast radius.
|
|
159
|
+
* - "yolo": `--dangerously-skip-permissions` — full autonomy (Bash, file writes,
|
|
160
|
+
* everything). Needed for real code-writing AI-DLC work. Dangerous: the woken
|
|
161
|
+
* agent gets a full shell under the daemon's key, with a prompt that embeds
|
|
162
|
+
* server-supplied strings. Use only in a trusted/sandboxed environment.
|
|
163
|
+
* @typedef {"chorus"|"yolo"} PermissionMode
|
|
164
|
+
*/
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Build the argv for a headless run. Prompt is NEVER here — it goes over stdin.
|
|
168
|
+
* @param {{ sessionId: string, isNew: boolean, mcpConfigPath?: string, permissionMode?: PermissionMode }} o
|
|
169
|
+
* @returns {string[]}
|
|
170
|
+
*/
|
|
171
|
+
export function buildArgs({ sessionId, isNew, mcpConfigPath, permissionMode = "chorus" }) {
|
|
172
|
+
const args = ["-p", "--output-format", "stream-json", "--verbose"];
|
|
173
|
+
if (isNew) args.push("--session-id", sessionId);
|
|
174
|
+
else args.push("--resume", sessionId);
|
|
175
|
+
if (mcpConfigPath) args.push("--mcp-config", mcpConfigPath);
|
|
176
|
+
if (permissionMode === "yolo") {
|
|
177
|
+
args.push("--dangerously-skip-permissions");
|
|
178
|
+
} else {
|
|
179
|
+
// Default: allow only this daemon's Chorus MCP tools through, nothing else.
|
|
180
|
+
args.push("--allowedTools", `mcp__${CHORUS_MCP_SERVER_NAME}__*`);
|
|
181
|
+
}
|
|
182
|
+
return args;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Resolve the actual command + argv to spawn, given the resolved claude path
|
|
187
|
+
* and the headless args. On Windows a `.cmd`/`.bat` shim is NOT a PE executable,
|
|
188
|
+
* so `CreateProcess` (i.e. spawn with shell:false) cannot run it directly — it
|
|
189
|
+
* must be invoked through `cmd.exe /d /s /c <path> ...args`. We keep shell:false
|
|
190
|
+
* and pass argv as an array (no string concatenation), so there is no shell
|
|
191
|
+
* word-splitting / injection surface. On POSIX, and for a real `.exe`, we spawn
|
|
192
|
+
* the path directly.
|
|
193
|
+
*
|
|
194
|
+
* @param {string} claudePath
|
|
195
|
+
* @param {string[]} args
|
|
196
|
+
* @param {NodeJS.Platform} [platform]
|
|
197
|
+
* @param {NodeJS.ProcessEnv} [env]
|
|
198
|
+
* @returns {{ command: string, argv: string[] }}
|
|
199
|
+
*/
|
|
200
|
+
export function resolveSpawnCommand(claudePath, args, platform = process.platform, env = process.env) {
|
|
201
|
+
const isWin = platform === "win32";
|
|
202
|
+
const lower = claudePath.toLowerCase();
|
|
203
|
+
if (isWin && (lower.endsWith(".cmd") || lower.endsWith(".bat"))) {
|
|
204
|
+
const comspec = env.ComSpec || env.COMSPEC || "cmd.exe";
|
|
205
|
+
// /d skip AutoRun, /s treat everything after /c literally, /c run then exit.
|
|
206
|
+
return { command: comspec, argv: ["/d", "/s", "/c", claudePath, ...args] };
|
|
207
|
+
}
|
|
208
|
+
return { command: claudePath, argv: args };
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Parse a chunk of NDJSON, appending to a line buffer. Strips trailing CR
|
|
213
|
+
* (Windows \r\n) and ignores blank lines. Returns parsed objects; malformed
|
|
214
|
+
* lines are reported to `onWarn` and skipped (never throw).
|
|
215
|
+
*
|
|
216
|
+
* @param {string} buffer Carry-over from previous chunk.
|
|
217
|
+
* @param {string} chunk
|
|
218
|
+
* @param {(obj: any) => void} onObject
|
|
219
|
+
* @param {(msg: string) => void} [onWarn]
|
|
220
|
+
* @returns {string} New carry-over buffer (incomplete trailing line).
|
|
221
|
+
*/
|
|
222
|
+
export function parseNdjsonChunk(buffer, chunk, onObject, onWarn = () => {}) {
|
|
223
|
+
buffer += chunk;
|
|
224
|
+
let nl;
|
|
225
|
+
while ((nl = buffer.indexOf("\n")) !== -1) {
|
|
226
|
+
const line = buffer.slice(0, nl).replace(/\r$/, "");
|
|
227
|
+
buffer = buffer.slice(nl + 1);
|
|
228
|
+
if (!line.trim()) continue;
|
|
229
|
+
try {
|
|
230
|
+
onObject(JSON.parse(line));
|
|
231
|
+
} catch (err) {
|
|
232
|
+
onWarn(`stream-json parse error: ${err} — line: ${line}`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
return buffer;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @typedef {Object} ClaudeSpawnerOptions
|
|
240
|
+
* @property {string} [claudePath] Resolved claude path (resolved lazily if omitted).
|
|
241
|
+
* @property {(o: object) => { stdin: any, stdout: any, stderr: any, on: Function, kill?: Function }} [spawnImpl]
|
|
242
|
+
* @property {{info(m:string):void,warn(m:string):void,error(m:string):void}} [logger]
|
|
243
|
+
* @property {PermissionMode} [permissionMode] How much the woken Claude may do (default "chorus").
|
|
244
|
+
* @property {NodeJS.Platform} [platform] Injectable for tests; gates `detached` (POSIX-only).
|
|
245
|
+
*/
|
|
246
|
+
|
|
247
|
+
export class ClaudeSpawner {
|
|
248
|
+
/** @param {ClaudeSpawnerOptions} [opts] */
|
|
249
|
+
constructor(opts = {}) {
|
|
250
|
+
this.claudePath = opts.claudePath ?? null;
|
|
251
|
+
this.spawnImpl = opts.spawnImpl ?? spawn;
|
|
252
|
+
this.logger = opts.logger ?? NOOP_LOGGER;
|
|
253
|
+
this.permissionMode = opts.permissionMode ?? "chorus";
|
|
254
|
+
// POSIX spawns `detached: true` (process-group leader) so the interrupt path
|
|
255
|
+
// can group-kill the tree; Windows does not. Injectable so a POSIX test host
|
|
256
|
+
// can exercise the Windows branch and vice versa.
|
|
257
|
+
this.platform = opts.platform ?? process.platform;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Spawn a headless Claude run. Resolves when the subprocess exits. The prompt
|
|
262
|
+
* is written to stdin (never argv) — this is what keeps long prompts off the
|
|
263
|
+
* Windows command line and out of shell escaping/injection.
|
|
264
|
+
*
|
|
265
|
+
* The session id is supplied by the caller (the daemon passes the dispatched
|
|
266
|
+
* entity's DIRECT idea uuid, so the session is human-resumable by idea uuid) and
|
|
267
|
+
* MUST be a well-formed lowercase UUID — an invalid id is refused with a visible
|
|
268
|
+
* log and NO spawn (no-silent-errors). `isNew` (decided by the caller via a disk
|
|
269
|
+
* probe — see isNewSession) selects --session-id (new) vs --resume (continue).
|
|
270
|
+
* `cwd` is the spawn working directory; it MUST match the cwd the caller probed,
|
|
271
|
+
* since claude scopes transcripts (and --resume) to it.
|
|
272
|
+
*
|
|
273
|
+
* @param {{ prompt: string, sessionId: string, isNew: boolean, mcpConfigPath?: string,
|
|
274
|
+
* cwd?: string, onMessage?: (obj: any) => void,
|
|
275
|
+
* onChild?: (child: import("node:child_process").ChildProcess) => void }} params
|
|
276
|
+
* `onChild` (子3) hands the live ChildProcess to the caller the moment it spawns,
|
|
277
|
+
* so the waker can store the handle in its execution registry for the interrupt
|
|
278
|
+
* path BEFORE this promise resolves. It is invoked once, synchronously, only on a
|
|
279
|
+
* successful spawn; a spawn failure never calls it.
|
|
280
|
+
* @returns {Promise<{ sessionId: string, exitCode: number|null, isNew: boolean }>}
|
|
281
|
+
*/
|
|
282
|
+
async wake({ prompt, sessionId, isNew, mcpConfigPath, cwd, onMessage, onChild }) {
|
|
283
|
+
const id = sessionId;
|
|
284
|
+
|
|
285
|
+
// Pre-validate the session id BEFORE locating claude or spawning: a malformed
|
|
286
|
+
// id (not a lowercase UUID) is refused visibly with no subprocess started.
|
|
287
|
+
if (!isValidSessionId(id)) {
|
|
288
|
+
this.logger.error(
|
|
289
|
+
`[Chorus] refusing to spawn: session id is not a valid lowercase UUID: ${id}`
|
|
290
|
+
);
|
|
291
|
+
return { sessionId: typeof id === "string" ? id : "", exitCode: null, isNew: Boolean(isNew) };
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
const claudePath = this.claudePath ?? resolveClaudePath();
|
|
295
|
+
if (!claudePath) {
|
|
296
|
+
// No crash — surface visibly and resolve with a failure result.
|
|
297
|
+
this.logger.error("[Chorus] cannot locate the `claude` executable on PATH; skipping wake");
|
|
298
|
+
return { sessionId: id, exitCode: null, isNew };
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
const args = buildArgs({ sessionId: id, isNew, mcpConfigPath, permissionMode: this.permissionMode });
|
|
302
|
+
// On Windows, a .cmd/.bat shim must be run via cmd.exe /c (CreateProcess
|
|
303
|
+
// can't exec a script directly). resolveSpawnCommand keeps shell:false and
|
|
304
|
+
// passes argv as an array — no shell injection surface either way.
|
|
305
|
+
const { command, argv } = resolveSpawnCommand(claudePath, args);
|
|
306
|
+
|
|
307
|
+
// POSIX: spawn `detached: true` so the child becomes a PROCESS GROUP LEADER
|
|
308
|
+
// (its pgid === its pid). The interrupt path then signals the whole group via
|
|
309
|
+
// `process.kill(-pid, sig)` so a forceful kill reaches grandchildren Claude may
|
|
310
|
+
// have spawned (子3 — daemon-interrupt-resume). This changes ONLY the process
|
|
311
|
+
// group: stdin/stdout/stderr stay piped exactly as before (stdio is unchanged),
|
|
312
|
+
// so prompt delivery over stdin and NDJSON stdout parsing are unaffected. We do
|
|
313
|
+
// NOT call `subprocess.unref()` — the daemon must stay attached to read the
|
|
314
|
+
// stream and observe the exit. On Windows `detached` is NOT used: taskkill /T
|
|
315
|
+
// walks the tree by pid, and detached there only spawns a new console window.
|
|
316
|
+
const detached = (this.platform ?? process.platform) !== "win32";
|
|
317
|
+
|
|
318
|
+
return new Promise((resolve) => {
|
|
319
|
+
let child;
|
|
320
|
+
try {
|
|
321
|
+
child = this.spawnImpl(command, argv, {
|
|
322
|
+
cwd: cwd ?? process.cwd(),
|
|
323
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
324
|
+
// Mark the child as a headless daemon-woken session (add-daemon-headless-
|
|
325
|
+
// interaction-guard). Merged OVER the inherited env so PATH, the Bedrock /
|
|
326
|
+
// credential vars, CLAUDE_CONFIG_DIR, etc. all survive — only this one var is
|
|
327
|
+
// added. It is a machine-checkable signal (the wake prompt also states it in
|
|
328
|
+
// text); this change only LAYS IT DOWN — no code here reads it back. Set
|
|
329
|
+
// unconditionally: the spawner only ever runs headless daemon wakes, so both
|
|
330
|
+
// "chorus" and "yolo" permission modes get it.
|
|
331
|
+
env: { ...process.env, CHORUS_DAEMON_HEADLESS: "1" },
|
|
332
|
+
// No shell:true — command is either the real executable or cmd.exe
|
|
333
|
+
// with the script as an argv element. Avoids shell word-splitting /
|
|
334
|
+
// injection; .cmd is handled explicitly via cmd.exe above.
|
|
335
|
+
shell: false,
|
|
336
|
+
detached,
|
|
337
|
+
windowsHide: true,
|
|
338
|
+
});
|
|
339
|
+
} catch (err) {
|
|
340
|
+
this.logger.error(`[Chorus] failed to spawn claude: ${err}`);
|
|
341
|
+
resolve({ sessionId: id, exitCode: null, isNew });
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// Hand the live child to the caller (子3) so the waker can register the handle
|
|
346
|
+
// for the interrupt path before this promise resolves. Never let a throwing
|
|
347
|
+
// callback escape into the spawn path.
|
|
348
|
+
if (onChild) {
|
|
349
|
+
try {
|
|
350
|
+
onChild(child);
|
|
351
|
+
} catch (err) {
|
|
352
|
+
this.logger.warn(`[Chorus] onChild handler threw: ${err}`);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
let stdoutBuf = "";
|
|
357
|
+
let observedSessionId = id;
|
|
358
|
+
|
|
359
|
+
child.stdout?.setEncoding?.("utf8");
|
|
360
|
+
child.stdout?.on("data", (chunk) => {
|
|
361
|
+
stdoutBuf = parseNdjsonChunk(
|
|
362
|
+
stdoutBuf,
|
|
363
|
+
String(chunk),
|
|
364
|
+
(obj) => {
|
|
365
|
+
if (obj && typeof obj.session_id === "string") observedSessionId = obj.session_id;
|
|
366
|
+
if (onMessage) {
|
|
367
|
+
try {
|
|
368
|
+
onMessage(obj);
|
|
369
|
+
} catch (err) {
|
|
370
|
+
this.logger.warn(`[Chorus] onMessage handler threw: ${err}`);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
(msg) => this.logger.warn(`[Chorus] ${msg}`)
|
|
375
|
+
);
|
|
376
|
+
});
|
|
377
|
+
|
|
378
|
+
child.stderr?.setEncoding?.("utf8");
|
|
379
|
+
child.stderr?.on("data", (chunk) => {
|
|
380
|
+
const text = String(chunk).trim();
|
|
381
|
+
if (text) this.logger.warn(`[Chorus] claude stderr: ${text}`);
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
child.on("error", (err) => {
|
|
385
|
+
// e.g. ENOENT if the resolved path vanished — log, don't throw.
|
|
386
|
+
this.logger.error(`[Chorus] claude process error: ${err}`);
|
|
387
|
+
resolve({ sessionId: observedSessionId, exitCode: null, isNew });
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
child.on("close", (code) => {
|
|
391
|
+
if (code !== 0) {
|
|
392
|
+
this.logger.warn(`[Chorus] claude exited with code ${code}`);
|
|
393
|
+
}
|
|
394
|
+
resolve({ sessionId: observedSessionId, exitCode: code, isNew });
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
// Guard against an ASYNC stdin error (EPIPE): if claude exits/closes
|
|
398
|
+
// stdin before the prompt finishes flushing, the writable emits an
|
|
399
|
+
// 'error' event. Without this listener it becomes an uncaughtException
|
|
400
|
+
// and crashes the daemon — violating "one failed wake does not kill the
|
|
401
|
+
// daemon". The try/catch below only catches a synchronous throw.
|
|
402
|
+
child.stdin?.on?.("error", (err) => {
|
|
403
|
+
this.logger.warn(`[Chorus] claude stdin error (ignored): ${err}`);
|
|
404
|
+
});
|
|
405
|
+
|
|
406
|
+
// Feed the prompt over stdin, then close it so the model runs.
|
|
407
|
+
try {
|
|
408
|
+
child.stdin?.write(prompt);
|
|
409
|
+
child.stdin?.end();
|
|
410
|
+
} catch (err) {
|
|
411
|
+
this.logger.warn(`[Chorus] failed writing prompt to claude stdin: ${err}`);
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
}
|