@chorus-aidlc/chorus 0.12.0 → 0.13.0
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 +440 -392
- package/.next/standalone/.next/app-path-routes-manifest.json +45 -43
- package/.next/standalone/.next/build-manifest.json +5 -5
- package/.next/standalone/.next/prerender-manifest.json +48 -48
- package/.next/standalone/.next/react-loadable-manifest.json +33 -27
- package/.next/standalone/.next/routes-manifest.json +16 -0
- package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js +1 -1
- 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]/graph/page.js +2 -0
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/page.js +1 -1
- 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 -2
- 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 +2 -2
- package/.next/standalone/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin/companies/new.html +1 -1
- package/.next/standalone/.next/server/app/admin/companies/new.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin/companies.html +1 -1
- package/.next/standalone/.next/server/app/admin/companies.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin.html +1 -1
- package/.next/standalone/.next/server/app/admin.rsc +2 -2
- package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent-connections/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/refresh/route_client-reference-manifest.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_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/control/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/execution-state/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/executions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/pending-turns/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/resume/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/transcript/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/turn-advance/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/events/notifications/route.js +6 -4
- 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 -5
- package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +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_client-reference-manifest.js +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_client-reference-manifest.js +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/keepalive/route_client-reference-manifest.js +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_client-reference-manifest.js +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_client-reference-manifest.js +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_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js +1 -0
- package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +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_client-reference-manifest.js +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_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +3 -3
- package/.next/standalone/.next/server/app/login/admin/page.js +2 -2
- package/.next/standalone/.next/server/app/login/admin/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/admin.html +1 -1
- package/.next/standalone/.next/server/app/login/admin.rsc +2 -2
- package/.next/standalone/.next/server/app/login/callback/page.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 +2 -2
- package/.next/standalone/.next/server/app/login/page.js +2 -2
- package/.next/standalone/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/pick-workspace.html +1 -1
- package/.next/standalone/.next/server/app/login/pick-workspace.rsc +2 -2
- package/.next/standalone/.next/server/app/login/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 +2 -2
- package/.next/standalone/.next/server/app/login.html +1 -1
- package/.next/standalone/.next/server/app/login.rsc +3 -3
- 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 +3 -3
- package/.next/standalone/.next/server/app/page.js +2 -2
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- 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 +4 -4
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +4 -4
- package/.next/standalone/.next/server/app-paths-manifest.json +45 -43
- package/.next/standalone/.next/server/chunks/1113.js +2 -2
- package/.next/standalone/.next/server/chunks/1337.js +1 -1
- package/.next/standalone/.next/server/chunks/1463.js +1 -1
- package/.next/standalone/.next/server/chunks/1559.js +13 -0
- package/.next/standalone/.next/server/chunks/178.js +31 -0
- package/.next/standalone/.next/server/chunks/2315.js +1 -1
- package/.next/standalone/.next/server/chunks/2364.js +2 -2
- package/.next/standalone/.next/server/chunks/2631.js +2 -2
- package/.next/standalone/.next/server/chunks/282.js +1 -1
- package/.next/standalone/.next/server/chunks/2961.js +1 -1
- package/.next/standalone/.next/server/chunks/298.js +1 -0
- package/.next/standalone/.next/server/chunks/3197.js +3 -0
- package/.next/standalone/.next/server/chunks/3217.js +1 -1
- package/.next/standalone/.next/server/chunks/3219.js +1 -1
- package/.next/standalone/.next/server/chunks/3373.js +1 -0
- package/.next/standalone/.next/server/chunks/3680.js +1 -1
- package/.next/standalone/.next/server/chunks/4157.js +1 -1
- package/.next/standalone/.next/server/chunks/4193.js +1 -1
- package/.next/standalone/.next/server/chunks/4375.js +2 -2
- package/.next/standalone/.next/server/chunks/4615.js +1 -1
- package/.next/standalone/.next/server/chunks/5011.js +1 -0
- package/.next/standalone/.next/server/chunks/5090.js +1 -1
- package/.next/standalone/.next/server/chunks/5217.js +1 -1
- package/.next/standalone/.next/server/chunks/5319.js +1 -1
- package/.next/standalone/.next/server/chunks/5453.js +1 -1
- package/.next/standalone/.next/server/chunks/5511.js +1 -1
- package/.next/standalone/.next/server/chunks/5957.js +1 -0
- 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/679.js +1 -0
- package/.next/standalone/.next/server/chunks/6813.js +1 -0
- package/.next/standalone/.next/server/chunks/7160.js +1 -1
- package/.next/standalone/.next/server/chunks/7217.js +1 -1
- package/.next/standalone/.next/server/chunks/7368.js +1 -1
- package/.next/standalone/.next/server/chunks/7421.js +1 -0
- package/.next/standalone/.next/server/chunks/7515.js +1 -1
- package/.next/standalone/.next/server/chunks/7912.js +1 -0
- package/.next/standalone/.next/server/chunks/796.js +6 -6
- package/.next/standalone/.next/server/chunks/8431.js +1 -1
- package/.next/standalone/.next/server/chunks/8812.js +1 -1
- package/.next/standalone/.next/server/chunks/8821.js +1 -0
- package/.next/standalone/.next/server/chunks/903.js +1 -1
- package/.next/standalone/.next/server/chunks/920.js +1 -1
- package/.next/standalone/.next/server/chunks/9273.js +1 -0
- package/.next/standalone/.next/server/chunks/937.js +1 -1
- package/.next/standalone/.next/server/chunks/9849.js +2 -2
- package/.next/standalone/.next/server/chunks/9855.js +6 -0
- 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/middleware-react-loadable-manifest.js +1 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/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/static/chunks/10919-7f63b2801a92b8c6.js +1 -0
- package/.next/standalone/.next/static/chunks/{16551-68896c0ca7966ebf.js → 16551-d129ae0de4a04d69.js} +5 -5
- package/.next/standalone/.next/static/chunks/1891-d4a9e756fefba3a9.js +1 -0
- package/.next/standalone/.next/static/chunks/22190.149dd0799cbcba06.js +1 -0
- package/.next/standalone/.next/static/chunks/{2351.35085ef2663aaa44.js → 2351.a2908f154b03857c.js} +1 -1
- package/.next/standalone/.next/static/chunks/{29047.664290ff8a84b205.js → 29047.65b677c7f3e6459f.js} +1 -1
- package/.next/standalone/.next/static/chunks/2987-c15f09093b821b24.js +1 -0
- package/.next/standalone/.next/static/chunks/{30682.c8fc49d63bf75772.js → 30682.b12a9bef588e7b03.js} +1 -1
- package/.next/standalone/.next/static/chunks/31467.9f8adfa602f97fcf.js +115 -0
- package/.next/standalone/.next/static/chunks/{33665.20ed9144405f8b21.js → 33665.804ece4d6c6e4eca.js} +3 -3
- package/.next/standalone/.next/static/chunks/34520.1a6c6a7c421b0ff3.js +1 -0
- package/.next/standalone/.next/static/chunks/36493-5326c14a7240edc8.js +1 -0
- package/.next/standalone/.next/static/chunks/43741-aeea04ab873ac4e9.js +1 -0
- package/.next/standalone/.next/static/chunks/{47066.7848777fc81f5714.js → 47066.214cf62dd898ea16.js} +1 -1
- package/.next/standalone/.next/static/chunks/4860.c3c83713d1f163a5.js +1 -0
- package/.next/standalone/.next/static/chunks/48782.4ca261e8e23a8983.js +24 -0
- package/.next/standalone/.next/static/chunks/49852-5337f139a2f87c46.js +1 -0
- package/.next/standalone/.next/static/chunks/49965-fa11628d5ac8fbbe.js +1 -0
- package/.next/standalone/.next/static/chunks/56812-a6fe5225adc0b2ff.js +1 -0
- package/.next/standalone/.next/static/chunks/58699.364d357d33fcb52f.js +80 -0
- package/.next/standalone/.next/static/chunks/61963.fd130ba09dd25e2e.js +23 -0
- package/.next/standalone/.next/static/chunks/64894-71b047ae8ef2f3d8.js +1 -0
- package/.next/standalone/.next/static/chunks/65317.ab0c5ecb4164b291.js +148 -0
- package/.next/standalone/.next/static/chunks/{69477.4b854e377a3860cc.js → 69477.5b79cd575f93298f.js} +1 -1
- package/.next/standalone/.next/static/chunks/{69763.37d07a3035805bc7.js → 69763.003df47b4ee38644.js} +1 -1
- package/.next/standalone/.next/static/chunks/7317.8e3ce1ce083425d8.js +5 -0
- package/.next/standalone/.next/static/chunks/73506.b9c053e2335b6084.js +1 -0
- package/.next/standalone/.next/static/chunks/78966.075119c3a72135ed.js +1 -0
- package/.next/standalone/.next/static/chunks/79806.21f1d23ca273000d.js +4 -0
- package/.next/standalone/.next/static/chunks/85947.c813bf8bc6e1d675.js +90 -0
- package/.next/standalone/.next/static/chunks/8796-69e708cb8603d8b4.js +1 -0
- package/.next/standalone/.next/static/chunks/91666-3fd4f3512a53ff20.js +1 -0
- package/.next/standalone/.next/static/chunks/91709.ed3bfd285c518df1.js +287 -0
- package/.next/standalone/.next/static/chunks/94400.0d371a4d306a614b.js +1 -0
- package/.next/standalone/.next/static/chunks/96028.cdbf36dca753e70f.js +215 -0
- package/.next/standalone/.next/static/chunks/{96132.3bac072bb2743fb5.js → 96132.ab9b9433c7b2fa1c.js} +1 -1
- package/.next/standalone/.next/static/chunks/97263-018d631416efa5cd.js +1 -0
- package/.next/standalone/.next/static/chunks/97868-55f18a05fe483d85.js +1 -0
- package/.next/standalone/.next/static/chunks/99373.2b68fce200cc323e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-6061b60d52262d3c.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/project-groups/[uuid]/page-78ab05c72bcd04fd.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/{page-f1b0daea9f947caf.js → page-31ae6abada6e6a64.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-478cce81afbfc145.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-494b80e61b485870.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/{page-6620b9d7a2cc766f.js → page-7ebb779f0db4c58b.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/page-bfbfc5005de2be13.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-fbb4dd4124525f97.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-164fe175720b24a1.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-2742c745a90f843f.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/{page-d5c3dde34d6291a8.js → page-f2313bf05387b39b.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/{page-0da08d8b425acb6a.js → page-955e8fd8d7b0b7c8.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/{page-fec019d974ef8d4e.js → page-0bc22273214e522f.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/{page-44014947a679f91c.js → page-960ab78b5055780c.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/admin/companies/[uuid]/{route-f1b0daea9f947caf.js → route-31ae6abada6e6a64.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/admin/companies/{route-f1b0daea9f947caf.js → route-31ae6abada6e6a64.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/admin/login/{route-f1b0daea9f947caf.js → route-31ae6abada6e6a64.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/admin/session/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agent-connections/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/sessions/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/api-keys/[uuid]/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/api-keys/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/check-default/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/company-oidc/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/default-login/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/identify/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/logout/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/me/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/refresh/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/session/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/sync-token/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/comments/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon/control/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon/execution-state/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon/executions/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon/pending-turns/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon/report-interrupt/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon/resume/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon/transcript/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon/turn-advance/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/instruction/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/repoint/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/ad-hoc/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/documents/[uuid]/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/entities/[type]/[uuid]/root-idea/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/events/notifications/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/events/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/health/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/claim/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/preview/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/parent/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/release/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/keepalive/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mcp/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/me/assignments/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mentionables/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/archive/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/read/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/notifications/preferences/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/notifications/read-all/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/notifications/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/notifications/unread-count/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/dashboard/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/project-groups/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/activity/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/available/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/documents/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/group/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/tracker/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/summary/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/resource-graph/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/stats/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/dependencies/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/approve/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/close/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/reject/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/revoke/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/search/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/sessions/[uuid]/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/claim/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/release/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/sessions/route-31ae6abada6e6a64.js +1 -0
- package/.next/standalone/.next/static/chunks/app/login/page-d2513f477211dd6f.js +1 -0
- package/.next/standalone/.next/static/chunks/app/onboarding/{page-9a41067d4c5d29d7.js → page-500aded75bf11ed6.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/page-075afd218994d377.js +1 -0
- package/.next/standalone/.next/static/chunks/{f57f1d5e.71d2022a2e2d95ba.js → f57f1d5e.c345ce68aa5052a7.js} +1 -1
- package/.next/standalone/.next/static/chunks/{fcc64ffe-de8d357e657bd162.js → fcc64ffe-2c36a6b45f81782c.js} +3 -3
- package/.next/standalone/.next/static/chunks/webpack-7483083a976ed3d7.js +1 -0
- package/.next/standalone/.next/static/css/ed6baccd62b81c4e.css +1 -0
- package/.next/standalone/package.json +3 -1
- package/README.md +10 -2
- package/README.zh.md +10 -2
- package/chorus.mjs +118 -34
- package/cli/client-args.mjs +1 -1
- package/cli/codex-session-map.mjs +117 -0
- package/cli/codex-spawner.mjs +312 -0
- package/cli/daemon-agent.mjs +32 -6
- package/cli/daemon-banner.mjs +43 -5
- package/cli/daemon.mjs +133 -14
- package/cli/embedded-db.mjs +234 -0
- package/cli/login.mjs +77 -34
- package/cli/spawner-select.mjs +30 -0
- package/cli/sse-listener.mjs +29 -1
- package/cli/upload-hooks.mjs +73 -8
- package/package.json +3 -1
- package/.next/standalone/.next/server/chunks/1596.js +0 -13
- package/.next/standalone/.next/server/chunks/2622.js +0 -1
- package/.next/standalone/.next/server/chunks/3371.js +0 -1
- package/.next/standalone/.next/server/chunks/345.js +0 -1
- package/.next/standalone/.next/server/chunks/4872.js +0 -1
- package/.next/standalone/.next/server/chunks/4958.js +0 -1
- package/.next/standalone/.next/server/chunks/5581.js +0 -1
- package/.next/standalone/.next/server/chunks/6096.js +0 -3
- package/.next/standalone/.next/server/chunks/7063.js +0 -6
- package/.next/standalone/.next/server/chunks/7427.js +0 -1
- package/.next/standalone/.next/server/chunks/7897.js +0 -1
- package/.next/standalone/.next/server/chunks/8245.js +0 -31
- package/.next/standalone/.next/server/chunks/9161.js +0 -1
- package/.next/standalone/.next/static/chunks/22190.ee4e8f3ac0189d87.js +0 -1
- package/.next/standalone/.next/static/chunks/2280-f48bf99ea9d88ece.js +0 -1
- package/.next/standalone/.next/static/chunks/31467.2013df596c751e6e.js +0 -115
- package/.next/standalone/.next/static/chunks/32497-886aa4d3d7bf4967.js +0 -1
- package/.next/standalone/.next/static/chunks/34520.34ba1239c9b5a275.js +0 -1
- package/.next/standalone/.next/static/chunks/40867-04cc0d00205eaf9b.js +0 -1
- package/.next/standalone/.next/static/chunks/42111-1935df3b0dab2095.js +0 -1
- package/.next/standalone/.next/static/chunks/4860.f4242c493fcf182d.js +0 -1
- package/.next/standalone/.next/static/chunks/48782.5b60e8a0f22f6da1.js +0 -24
- package/.next/standalone/.next/static/chunks/54637-71d281d649ea3a17.js +0 -1
- package/.next/standalone/.next/static/chunks/58245-b2ea112ace9624d2.js +0 -1
- package/.next/standalone/.next/static/chunks/58699.fa3b8ce67889f23b.js +0 -80
- package/.next/standalone/.next/static/chunks/61963.18e80afc0dac41e3.js +0 -23
- package/.next/standalone/.next/static/chunks/6239-d78e6f830ce0a7f8.js +0 -1
- package/.next/standalone/.next/static/chunks/65317.7179d4bc41c8075a.js +0 -148
- package/.next/standalone/.next/static/chunks/7317.1a06bc56028637f6.js +0 -5
- package/.next/standalone/.next/static/chunks/73506.7423a313220e1769.js +0 -1
- package/.next/standalone/.next/static/chunks/78917-2b959ab0a7f610b4.js +0 -1
- package/.next/standalone/.next/static/chunks/79806.d210b93e41d4d7ff.js +0 -4
- package/.next/standalone/.next/static/chunks/85947.cf4ac5dd618283ee.js +0 -90
- package/.next/standalone/.next/static/chunks/88561-0b14e1564419f215.js +0 -1
- package/.next/standalone/.next/static/chunks/89035-faf398b7bbc7d2ed.js +0 -1
- package/.next/standalone/.next/static/chunks/91709.f7c8eff0c3692bd6.js +0 -287
- package/.next/standalone/.next/static/chunks/94400.30696ed643217da2.js +0 -1
- package/.next/standalone/.next/static/chunks/96028.427c0bd44fa35314.js +0 -215
- package/.next/standalone/.next/static/chunks/97868-9406a4014b667c2d.js +0 -1
- package/.next/standalone/.next/static/chunks/99373.880b43de1fa6411f.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-f04d5fa070f15acd.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/project-groups/[uuid]/page-2944c6c9bc48a7d6.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-c4271886ef004611.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-7a8b60de97bfbd29.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-0a55289b2bc510c2.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-99639479cc98965f.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-5d09141beb5d6aee.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/admin/session/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agent-connections/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/sessions/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agents/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/api-keys/[uuid]/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/api-keys/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/check-default/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/company-oidc/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/default-login/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/identify/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/logout/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/me/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/refresh/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/session/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/sync-token/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/comments/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/daemon/control/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/daemon/execution-state/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/daemon/executions/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/daemon/pending-turns/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/daemon/report-interrupt/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/daemon/resume/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/daemon/transcript/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/daemon/turn-advance/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/instruction/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/repoint/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/ad-hoc/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/documents/[uuid]/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/entities/[type]/[uuid]/root-idea/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/events/notifications/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/events/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/health/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/claim/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/preview/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/parent/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/release/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/keepalive/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/mcp/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/me/assignments/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/mentionables/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/archive/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/read/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/notifications/preferences/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/notifications/read-all/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/notifications/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/notifications/unread-count/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/dashboard/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/project-groups/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/activity/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/available/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/documents/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/group/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/tracker/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/summary/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/stats/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/dependencies/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/approve/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/close/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/reject/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/revoke/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/search/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/sessions/[uuid]/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/claim/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/release/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/sessions/route-f1b0daea9f947caf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/login/page-e7493d55573a52f1.js +0 -1
- package/.next/standalone/.next/static/chunks/app/page-8b4baa950c78ffe7.js +0 -1
- package/.next/standalone/.next/static/chunks/webpack-1556cfd11f7e90d1.js +0 -1
- package/.next/standalone/.next/static/css/6e8fd46b062fd4fc.css +0 -1
- /package/.next/standalone/.next/static/{v1yRpXkt1wNBkZMTE3tiz → W3KEB0tOAICVtfAUfR_M9}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{v1yRpXkt1wNBkZMTE3tiz → W3KEB0tOAICVtfAUfR_M9}/_ssgManifest.js +0 -0
package/cli/daemon.mjs
CHANGED
|
@@ -18,8 +18,8 @@ import {
|
|
|
18
18
|
resolvePermissionMode,
|
|
19
19
|
yoloWarningLine,
|
|
20
20
|
} from "./daemon-permission-mode.mjs";
|
|
21
|
-
import { resolveAgentType } from "./daemon-agent.mjs";
|
|
22
|
-
import { formatBanner } from "./daemon-banner.mjs";
|
|
21
|
+
import { resolveAgentType, backendClientType } from "./daemon-agent.mjs";
|
|
22
|
+
import { formatBanner, agentNotFoundWarningLine } from "./daemon-banner.mjs";
|
|
23
23
|
import { ChorusClient, validateAndFetchIdentity } from "./chorus-client.mjs";
|
|
24
24
|
import { SseListener } from "./sse-listener.mjs";
|
|
25
25
|
import { createBackfill } from "./backfill.mjs";
|
|
@@ -27,7 +27,9 @@ import { EventRouter } from "./event-router.mjs";
|
|
|
27
27
|
import { WakeQueue } from "./wake-queue.mjs";
|
|
28
28
|
import { Waker } from "./waker.mjs";
|
|
29
29
|
import { LineageResolver } from "./lineage.mjs";
|
|
30
|
-
import {
|
|
30
|
+
import { resolveClaudePath } from "./claude-spawner.mjs";
|
|
31
|
+
import { resolveCodexPath } from "./codex-spawner.mjs";
|
|
32
|
+
import { selectSpawner } from "./spawner-select.mjs";
|
|
31
33
|
import {
|
|
32
34
|
createExecutionUploadHooks,
|
|
33
35
|
createTranscriptUploadHooks,
|
|
@@ -95,9 +97,12 @@ function defaultLogger() {
|
|
|
95
97
|
export function buildDaemon(creds, deps = {}) {
|
|
96
98
|
const logger = deps.logger ?? defaultLogger();
|
|
97
99
|
const permissionMode = deps.permissionMode ?? "chorus";
|
|
100
|
+
// The resolved agent backend selects which spawner the daemon injects
|
|
101
|
+
// (add-daemon-codex-backend). Defaults to claude-code, matching the prior
|
|
102
|
+
// hard-wired ClaudeSpawner. The spawn path below is backend-agnostic — it only
|
|
103
|
+
// ever calls the shared wake(...) contract.
|
|
104
|
+
const agentType = deps.agentType ?? "claude-code";
|
|
98
105
|
// Per-wake verbose logging (daemon-startup-output), threaded into the Waker.
|
|
99
|
-
// agentType is currently display-only (banner/logs) — the spawn path is
|
|
100
|
-
// claude-code regardless (daemon-agent-selection reserves the slot only).
|
|
101
106
|
const verbose = deps.verbose ?? false;
|
|
102
107
|
// Escalation window for the interrupt killer (子3). Pre-resolved by runDaemon via
|
|
103
108
|
// the layered resolver; falls back to the resolver's default here when not given,
|
|
@@ -112,7 +117,11 @@ export function buildDaemon(creds, deps = {}) {
|
|
|
112
117
|
const lineage =
|
|
113
118
|
deps.lineage ??
|
|
114
119
|
new LineageResolver({ url: creds.url, apiKey: creds.apiKey, logger, fetchImpl: deps.fetchImpl });
|
|
115
|
-
|
|
120
|
+
// Inject the spawner for the resolved backend. claude-code → ClaudeSpawner
|
|
121
|
+
// (construction byte-identical to before); codex → CodexSpawner. `creds` are
|
|
122
|
+
// passed through so the Codex backend can export the daemon key into the woken
|
|
123
|
+
// process env (the Claude backend ignores creds — it gets its key via --mcp-config).
|
|
124
|
+
const spawner = deps.spawner ?? selectSpawner(agentType, { logger, permissionMode, creds });
|
|
116
125
|
// The WakeQueue serializes per DIRECT idea (keyFor's key). It is shared across all
|
|
117
126
|
// path-connections: serialization-per-idea still holds, and maxConcurrency caps the
|
|
118
127
|
// whole process's in-flight wakes rather than per-cwd — the right global budget.
|
|
@@ -131,6 +140,40 @@ export function buildDaemon(creds, deps = {}) {
|
|
|
131
140
|
? deps.cwds
|
|
132
141
|
: [deps.cwd];
|
|
133
142
|
|
|
143
|
+
// ===== All-conflict exit latch (add-daemon-connection-conflict-skip, Q3) =====
|
|
144
|
+
// Each declared connection resolves to exactly one terminal outcome: REGISTERED
|
|
145
|
+
// (saw connection_registered → onConnectionId) or CONFLICTED (saw
|
|
146
|
+
// connection_conflict → onConflict). When EVERY declared connection has resolved
|
|
147
|
+
// AND none registered (≥1 conflicted, 0 survived), the daemon has nothing to serve,
|
|
148
|
+
// so we settle `allConflict` — runDaemon races this against waitForever and returns
|
|
149
|
+
// a non-zero exit. The latch is evaluated only after all connections resolve (R5):
|
|
150
|
+
// a path still mid-handshake leaves `resolved < total`, so a partial conflict never
|
|
151
|
+
// triggers the exit. A connection that registers (even after some conflicted) flips
|
|
152
|
+
// `anyRegistered`, so the exit never fires while at least one path serves.
|
|
153
|
+
const totalConnections = cwdSet.length;
|
|
154
|
+
let resolvedConnections = 0;
|
|
155
|
+
let anyRegistered = false;
|
|
156
|
+
let settleAllConflict; // resolver, wired into the promise below
|
|
157
|
+
// A promise that settles ONLY in the all-paths-conflicted case. It never rejects and
|
|
158
|
+
// never settles otherwise (a serving daemon simply keeps waiting on waitForever).
|
|
159
|
+
const allConflict = new Promise((resolve) => {
|
|
160
|
+
settleAllConflict = resolve;
|
|
161
|
+
});
|
|
162
|
+
// Record one connection's terminal outcome and, once all have resolved, decide whether
|
|
163
|
+
// the whole daemon should exit. Idempotent per connection BY CONSTRUCTION: the guard
|
|
164
|
+
// lives here (flips the connection's own `outcome.resolved`) so a reconnect's repeated
|
|
165
|
+
// connection_registered — or any future caller — can never double-count, no matter the
|
|
166
|
+
// call site. The first terminal signal for a connection wins; later ones are no-ops.
|
|
167
|
+
function recordConnectionOutcome(outcome, registered) {
|
|
168
|
+
if (outcome.resolved) return;
|
|
169
|
+
outcome.resolved = true;
|
|
170
|
+
resolvedConnections += 1;
|
|
171
|
+
if (registered) anyRegistered = true;
|
|
172
|
+
if (resolvedConnections === totalConnections && !anyRegistered) {
|
|
173
|
+
settleAllConflict();
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
134
177
|
/**
|
|
135
178
|
* Build ONE independent path-connection bound to `cwd` (one SSE stream → one
|
|
136
179
|
* DaemonConnection row, keyed by that cwd server-side). All per-connection state —
|
|
@@ -149,6 +192,13 @@ export function buildDaemon(creds, deps = {}) {
|
|
|
149
192
|
/** @type {{ connectionUuid: string|null }} */
|
|
150
193
|
const connectionState = { connectionUuid: null };
|
|
151
194
|
|
|
195
|
+
// Per-connection terminal-outcome bookkeeping (add-daemon-connection-conflict-skip).
|
|
196
|
+
// `resolved` guards recordConnectionOutcome against double-counting a reconnect's
|
|
197
|
+
// repeated connection_registered. `skipped` marks a cwd surrendered to a live
|
|
198
|
+
// different-process daemon — purely informational (the listener is torn down, so it
|
|
199
|
+
// simply never reconnects), kept on the returned object for inspection/tests.
|
|
200
|
+
const outcome = { resolved: false, skipped: false };
|
|
201
|
+
|
|
152
202
|
// Interrupt reporter (子3): REST POST with the daemon's Bearer key. Injectable for
|
|
153
203
|
// tests (shared across connections when injected — tests use a single connection).
|
|
154
204
|
const reportInterrupt =
|
|
@@ -273,6 +323,9 @@ export function buildDaemon(creds, deps = {}) {
|
|
|
273
323
|
makeSse({
|
|
274
324
|
url: creds.url,
|
|
275
325
|
apiKey: creds.apiKey,
|
|
326
|
+
// Self-report the SELECTED backend so the connection registry + presence UI
|
|
327
|
+
// label a codex daemon as `codex` (not the hardcoded `claude_code`).
|
|
328
|
+
clientType: backendClientType(agentType),
|
|
276
329
|
// The working directory THIS connection serves (T3). `undefined` ⇒ the listener
|
|
277
330
|
// reports its process cwd (single-path / HARD-1). It is just the served path.
|
|
278
331
|
cwd,
|
|
@@ -283,13 +336,37 @@ export function buildDaemon(creds, deps = {}) {
|
|
|
283
336
|
`[Chorus] registered as connection ${connectionUuid}` +
|
|
284
337
|
(cwd ? ` (cwd=${cwd})` : "")
|
|
285
338
|
);
|
|
339
|
+
// Terminal outcome: this path registered. recordConnectionOutcome is idempotent
|
|
340
|
+
// per connection, so a reconnect's repeated connection_registered counts once.
|
|
341
|
+
recordConnectionOutcome(outcome, true);
|
|
342
|
+
},
|
|
343
|
+
// Connection conflict (add-daemon-connection-conflict-skip, Q3/Q4): the server
|
|
344
|
+
// refused to register THIS cwd because a live different-process daemon already
|
|
345
|
+
// holds the same (agent, host, cwd). Warn prominently, tear the listener down
|
|
346
|
+
// (disconnect clears the reconnect timer + aborts), and mark the path skipped —
|
|
347
|
+
// it is never reconnected/re-probed for the process lifetime. Takeover happens
|
|
348
|
+
// only on the NEXT daemon start/restart. Independent closures mean skipping this
|
|
349
|
+
// path never disturbs another connection's dispatch/control.
|
|
350
|
+
onConflict: (event) => {
|
|
351
|
+
const conflictCwd = (event && event.cwd) ?? cwd ?? process.cwd();
|
|
352
|
+
const conflictHost = (event && event.host) || "this host";
|
|
353
|
+
logger.warn(
|
|
354
|
+
`[Chorus] ⚠ connection conflict: a live daemon already serves ` +
|
|
355
|
+
`(host=${conflictHost}, cwd=${conflictCwd}) — skipping this path. ` +
|
|
356
|
+
`Stop the other daemon (or wait for it to go offline) and restart to take it over.`
|
|
357
|
+
);
|
|
358
|
+
outcome.skipped = true;
|
|
359
|
+
// Tear down THIS path's listener: no reconnect, no re-probe (Q4).
|
|
360
|
+
sseListener.disconnect?.();
|
|
361
|
+
// Terminal outcome: this path conflicted (idempotent — counts once).
|
|
362
|
+
recordConnectionOutcome(outcome, false);
|
|
286
363
|
},
|
|
287
364
|
onControl,
|
|
288
365
|
onReconnect: backfill,
|
|
289
366
|
logger,
|
|
290
367
|
});
|
|
291
368
|
|
|
292
|
-
return { cwd, connectionState, waker, router, backfill, sseListener, hooks };
|
|
369
|
+
return { cwd, connectionState, waker, router, backfill, sseListener, hooks, outcome };
|
|
293
370
|
}
|
|
294
371
|
|
|
295
372
|
// Build one connection per declared cwd. The order is the declaration order; the
|
|
@@ -309,6 +386,10 @@ export function buildDaemon(creds, deps = {}) {
|
|
|
309
386
|
router: primary.router,
|
|
310
387
|
sseListener: primary.sseListener,
|
|
311
388
|
connections,
|
|
389
|
+
// Settles ONLY when every declared connection resolved and none registered
|
|
390
|
+
// (all paths already served by a live daemon — Q3). runDaemon races this against
|
|
391
|
+
// waitForever to exit non-zero. Never settles for a serving daemon.
|
|
392
|
+
allConflict,
|
|
312
393
|
async start() {
|
|
313
394
|
// Connect every path-connection. Each fires its own onConnect hook + SSE connect;
|
|
314
395
|
// the daemon process cwd is untouched (NFR-3).
|
|
@@ -356,7 +437,11 @@ export async function runDaemon(flags = {}, deps = {}) {
|
|
|
356
437
|
const askPrompt = deps.prompt ?? prompt;
|
|
357
438
|
const writeCreds = deps.writeLoginFile ?? writeLoginFile;
|
|
358
439
|
const version = deps.version ?? readVersion();
|
|
440
|
+
// Backend executable resolvers — injectable for tests. The SELECTED backend's
|
|
441
|
+
// resolver runs below (claude-code → findClaude, codex → findCodex), so the
|
|
442
|
+
// banner shows the right binary instead of always probing for `claude`.
|
|
359
443
|
const findClaude = deps.resolveClaudePath ?? resolveClaudePath;
|
|
444
|
+
const findCodex = deps.resolveCodexPath ?? resolveCodexPath;
|
|
360
445
|
const verbose = flags.verbose === true || env.CHORUS_VERBOSE === "1";
|
|
361
446
|
|
|
362
447
|
// Resolve the agent backend (default claude-code). An unknown --agent /
|
|
@@ -410,10 +495,12 @@ export async function runDaemon(flags = {}, deps = {}) {
|
|
|
410
495
|
if (typeof pf === "number") return pf;
|
|
411
496
|
const { creds, identity, permissionMode } = pf;
|
|
412
497
|
|
|
413
|
-
// Detect the
|
|
414
|
-
// it's missing; a wake surfaces the error visibly when one
|
|
415
|
-
// resolved path (or absence) is shown in the banner below.
|
|
416
|
-
|
|
498
|
+
// Detect the SELECTED backend's executable (non-fatal): the daemon still
|
|
499
|
+
// subscribes when it's missing; a wake surfaces the error visibly when one
|
|
500
|
+
// arrives. The resolved path (or absence) is shown in the banner below. codex
|
|
501
|
+
// → resolveCodexPath, otherwise resolveClaudePath — so a `--agent codex` run
|
|
502
|
+
// probes (and the banner reports) `codex`, not `claude`.
|
|
503
|
+
const cliPath = agentType === "codex" ? findCodex() : findClaude();
|
|
417
504
|
|
|
418
505
|
// The daemon.json the layered config readers (credentials, sigint timeout, cwds)
|
|
419
506
|
// consult. Surfacing its absolute path + presence in the banner makes it obvious
|
|
@@ -432,7 +519,7 @@ export async function runDaemon(flags = {}, deps = {}) {
|
|
|
432
519
|
permissionMode,
|
|
433
520
|
credentialSource: creds.source,
|
|
434
521
|
agentType,
|
|
435
|
-
|
|
522
|
+
cliPath,
|
|
436
523
|
connection: "connecting…",
|
|
437
524
|
configPath,
|
|
438
525
|
configExists,
|
|
@@ -445,6 +532,14 @@ export async function runDaemon(flags = {}, deps = {}) {
|
|
|
445
532
|
if (permissionMode === "yolo") {
|
|
446
533
|
errLog(`[Chorus] ${yoloWarningLine()}`);
|
|
447
534
|
}
|
|
535
|
+
// A missing backend binary is non-fatal (the daemon still subscribes), but the
|
|
536
|
+
// banner row alone is easy to miss in a systemd journal — emit one loud ⚠ line
|
|
537
|
+
// on stderr so the operator sees it at startup, not only when a wake fails. The
|
|
538
|
+
// warning names the SELECTED backend (claude / CHORUS_CLAUDE_PATH or codex /
|
|
539
|
+
// CHORUS_CODEX_PATH).
|
|
540
|
+
if (cliPath === null) {
|
|
541
|
+
errLog(`[Chorus] ${agentNotFoundWarningLine(agentType)}`);
|
|
542
|
+
}
|
|
448
543
|
|
|
449
544
|
// Surface the served paths so an operator sees a multi-path daemon at a glance.
|
|
450
545
|
// A single `[undefined]` (the default) prints the process cwd it falls back to.
|
|
@@ -476,8 +571,32 @@ export async function runDaemon(flags = {}, deps = {}) {
|
|
|
476
571
|
await daemon.start();
|
|
477
572
|
log("[Chorus] daemon running. Waiting for task dispatches (Ctrl+C to stop).");
|
|
478
573
|
|
|
479
|
-
// Keep the process alive for the long-lived SSE subscription
|
|
480
|
-
|
|
574
|
+
// Keep the process alive for the long-lived SSE subscription, but exit non-zero if
|
|
575
|
+
// EVERY declared path turns out to be already served by a live daemon
|
|
576
|
+
// (add-daemon-connection-conflict-skip, Q3). `daemon.allConflict` settles only in
|
|
577
|
+
// that all-paths-conflicted case; otherwise we wait forever on the subscription. A
|
|
578
|
+
// sentinel distinguishes the two so a waitForever that never settles can't be mistaken
|
|
579
|
+
// for the conflict exit.
|
|
580
|
+
const ALL_CONFLICT = Symbol("all-conflict");
|
|
581
|
+
const waitForever = deps.waitForever ?? (() => new Promise(() => {}));
|
|
582
|
+
// `daemon.allConflict` is present on the real buildDaemon output; guard for injected
|
|
583
|
+
// test fakes that don't provide it (those never settle the conflict branch). A
|
|
584
|
+
// never-settling fallback keeps the race purely waitForever-driven in that case.
|
|
585
|
+
const allConflictSignal =
|
|
586
|
+
daemon.allConflict ?? new Promise(() => {});
|
|
587
|
+
const outcome = await Promise.race([
|
|
588
|
+
waitForever().then(() => 0),
|
|
589
|
+
allConflictSignal.then(() => ALL_CONFLICT),
|
|
590
|
+
]);
|
|
591
|
+
if (outcome === ALL_CONFLICT) {
|
|
592
|
+
const n = servedPaths.length;
|
|
593
|
+
errLog(
|
|
594
|
+
`[Chorus] all ${n} declared ${n === 1 ? "path is" : "paths are"} already served by a live daemon — nothing to do. ` +
|
|
595
|
+
`Stop the other daemon(s) or remove the conflicting path(s), then restart.`
|
|
596
|
+
);
|
|
597
|
+
await daemon.stop();
|
|
598
|
+
return 1;
|
|
599
|
+
}
|
|
481
600
|
return 0;
|
|
482
601
|
}
|
|
483
602
|
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
// cli/embedded-db.mjs
|
|
2
|
+
// Embedded PGlite launch logic, extracted out of chorus.mjs (GitHub #379).
|
|
3
|
+
//
|
|
4
|
+
// Why this module exists — the bug:
|
|
5
|
+
// chorus.mjs used to fork the PGlite child with { stdio: "ignore" }, attach only
|
|
6
|
+
// .on("error") (which fires ONLY on spawn failure), then trust waitForTcp — which
|
|
7
|
+
// answers "is *someone* listening on this port?", NOT "is it *our* PGlite?". When a
|
|
8
|
+
// real Postgres already occupied the port (default 5433), the forked PGlite child
|
|
9
|
+
// died of EADDRINUSE — but it catches that and exits with code 0 (a clean shutdown),
|
|
10
|
+
// so .on("error") never fired and its output was swallowed by stdio:"ignore". The
|
|
11
|
+
// launcher then connected to the FOREIGN Postgres, printed a false "PGlite ready",
|
|
12
|
+
// and `prisma migrate deploy` failed authentication with a bare Prisma P1000.
|
|
13
|
+
//
|
|
14
|
+
// The fix is defense-in-depth, both layers pure + dependency-injected so they unit-test
|
|
15
|
+
// with fakes (server-signal-handlers.mjs precedent — no real process spawning, no
|
|
16
|
+
// import-time side effects):
|
|
17
|
+
// 1. Pre-flight port-occupancy probe — before forking, check whether the port is
|
|
18
|
+
// already held. If so, FAIL FAST with an actionable message (no fork, no false
|
|
19
|
+
// "ready", no silent mis-connect).
|
|
20
|
+
// 2. Exit-latch — after forking, race the child's "exit"/"error" against port-ready.
|
|
21
|
+
// If the child exits before readiness is confirmed, for ANY exit code (including
|
|
22
|
+
// the reproduced EADDRINUSE -> exit 0), the launch is FATAL. "someone is listening"
|
|
23
|
+
// is no longer sufficient evidence that our embedded PGlite is up.
|
|
24
|
+
//
|
|
25
|
+
// No automatic port bumping (out of scope for #379 — elaboration chose fail-fast).
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Format the fail-fast message shown when the embedded PGlite port is occupied.
|
|
29
|
+
* @param {number} port
|
|
30
|
+
* @returns {string}
|
|
31
|
+
*/
|
|
32
|
+
export function formatPortConflictMessage(port) {
|
|
33
|
+
return (
|
|
34
|
+
`ERROR: Embedded PostgreSQL (PGlite) could not start — port ${port} is already in use.\n` +
|
|
35
|
+
`Another process (often a real PostgreSQL) is occupying it. Free the port, or run\n` +
|
|
36
|
+
`Chorus on a different embedded port: chorus --pglite-port <port>`
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** True when a child process has already terminated (exit code recorded). */
|
|
41
|
+
function childHasExited(child) {
|
|
42
|
+
return child.exitCode !== null && child.exitCode !== undefined;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Classify migrate output as a Prisma authentication failure (P1000).
|
|
47
|
+
*
|
|
48
|
+
* Matches the stable error CODE token first, then the human phrase as a fallback,
|
|
49
|
+
* so it survives message drift across Prisma versions. Deliberately narrow: it must
|
|
50
|
+
* NOT fire on other migration errors (P3009 failed migration, P1001 can't-reach, etc.)
|
|
51
|
+
* — those keep chorus.mjs's existing generic "Database migration failed" path.
|
|
52
|
+
* Verified against the installed Prisma 7.3.0 surface text (GitHub #379).
|
|
53
|
+
*
|
|
54
|
+
* @param {string|undefined|null} output combined stdout+stderr of `prisma migrate deploy`
|
|
55
|
+
* @returns {boolean}
|
|
56
|
+
*/
|
|
57
|
+
export function isPrismaAuthFailure(output) {
|
|
58
|
+
if (!output) return false;
|
|
59
|
+
const text = String(output);
|
|
60
|
+
// P1000 is Prisma's dedicated auth-failure code — the most stable signal.
|
|
61
|
+
if (/\bP1000\b/.test(text)) return true;
|
|
62
|
+
// Fallback phrase (covers adapter-surfaced errors that omit the bare code token).
|
|
63
|
+
if (/Authentication failed against (the )?database server/i.test(text)) return true;
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Mask credentials in a Postgres connection URL, preserving host:port (+db) for
|
|
69
|
+
* diagnostics. Falls back to a naive user:pass@ strip if URL parsing fails, and to a
|
|
70
|
+
* placeholder for empty input.
|
|
71
|
+
*
|
|
72
|
+
* @param {string|undefined|null} url
|
|
73
|
+
* @returns {string}
|
|
74
|
+
*/
|
|
75
|
+
export function maskDbUrl(url) {
|
|
76
|
+
if (!url) return "(unknown database)";
|
|
77
|
+
const raw = String(url);
|
|
78
|
+
try {
|
|
79
|
+
const u = new URL(raw);
|
|
80
|
+
const auth = u.username ? `${u.username}:***@` : "";
|
|
81
|
+
const db = u.pathname && u.pathname !== "/" ? u.pathname : "";
|
|
82
|
+
return `${u.protocol}//${auth}${u.host}${db}`;
|
|
83
|
+
} catch {
|
|
84
|
+
// Best-effort: strip a user:pass@ segment if present.
|
|
85
|
+
return raw.replace(/\/\/[^@/]*@/, "//***@");
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** Extract just host:port from a connection URL for terse messages. */
|
|
90
|
+
function hostPortOf(url) {
|
|
91
|
+
if (!url) return "the database";
|
|
92
|
+
try {
|
|
93
|
+
return new URL(String(url)).host || "the database";
|
|
94
|
+
} catch {
|
|
95
|
+
const m = String(url).match(/@([^/?]+)/);
|
|
96
|
+
return m ? m[1] : "the database";
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Build the Chorus-friendly diagnostic shown (as the FINAL output) when
|
|
102
|
+
* `prisma migrate deploy` fails authentication. The remedy depends on WHY we're
|
|
103
|
+
* pointed at that database:
|
|
104
|
+
* - embedded path (no external DATABASE_URL): the port is likely occupied by another
|
|
105
|
+
* PostgreSQL — suggest `chorus --pglite-port <port>`.
|
|
106
|
+
* - external path (DATABASE_URL set): name the external host:port and suggest
|
|
107
|
+
* `unset DATABASE_URL` if it was unintended.
|
|
108
|
+
* Credentials are always masked.
|
|
109
|
+
*
|
|
110
|
+
* @param {object} params
|
|
111
|
+
* @param {string} params.effectiveUrl the DATABASE_URL actually used for migration
|
|
112
|
+
* @param {boolean} params.startedEmbedded true if we launched embedded PGlite ourselves
|
|
113
|
+
* @param {number} params.pglitePort the embedded port (for the --pglite-port hint)
|
|
114
|
+
* @returns {string}
|
|
115
|
+
*/
|
|
116
|
+
export function formatMigrationAuthDiagnostic({ effectiveUrl, startedEmbedded, pglitePort }) {
|
|
117
|
+
const masked = maskDbUrl(effectiveUrl);
|
|
118
|
+
const hostPort = hostPortOf(effectiveUrl);
|
|
119
|
+
const lines = [
|
|
120
|
+
"",
|
|
121
|
+
"ERROR: Database migration failed — the database server rejected the credentials.",
|
|
122
|
+
`Connected to ${masked}, but authentication failed (Prisma P1000).`,
|
|
123
|
+
"",
|
|
124
|
+
];
|
|
125
|
+
if (startedEmbedded) {
|
|
126
|
+
lines.push(
|
|
127
|
+
`This usually means port ${pglitePort} is occupied by another PostgreSQL, so Chorus`,
|
|
128
|
+
`connected to it instead of its own embedded database. Free the port, or run on a`,
|
|
129
|
+
`different one: chorus --pglite-port <port>`
|
|
130
|
+
);
|
|
131
|
+
} else {
|
|
132
|
+
lines.push(
|
|
133
|
+
`Chorus used the DATABASE_URL from your environment (${hostPort}) instead of its`,
|
|
134
|
+
`embedded database. If that was not intended, clear it and re-run: unset DATABASE_URL`
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
return lines.join("\n");
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Launch the embedded PGlite child and confirm it is genuinely OUR process that is
|
|
142
|
+
* ready — not a foreign listener on the same port.
|
|
143
|
+
*
|
|
144
|
+
* Pure w.r.t. its injected dependencies: `fork`, `waitForTcp`, `preflightCheck`,
|
|
145
|
+
* `logger`. No process global is touched here; the caller (chorus.mjs) wires the real
|
|
146
|
+
* implementations and decides how to exit on failure.
|
|
147
|
+
*
|
|
148
|
+
* @param {object} params
|
|
149
|
+
* @param {string} params.host host to probe for readiness (e.g. "localhost")
|
|
150
|
+
* @param {number} params.port embedded PGlite port
|
|
151
|
+
* @param {() => { on: Function, kill?: Function, exitCode: number|null, killed?: boolean }} params.fork
|
|
152
|
+
* forks the PGlite server child and returns a ChildProcess-like object
|
|
153
|
+
* @param {(host: string, port: number) => Promise<void>} params.waitForTcp
|
|
154
|
+
* resolves when the port accepts a TCP connection, rejects on timeout
|
|
155
|
+
* @param {(host: string, port: number) => Promise<boolean>} params.preflightCheck
|
|
156
|
+
* resolves true if the port is ALREADY occupied before we fork (foreign listener)
|
|
157
|
+
* @param {{ log: Function, error: Function }} params.logger
|
|
158
|
+
* @returns {Promise<
|
|
159
|
+
* | { ok: true, child: object }
|
|
160
|
+
* | { ok: false, reason: "port-occupied", port: number }
|
|
161
|
+
* | { ok: false, reason: "child-exited", exitInfo: { code: number|null, signal: string|null } }
|
|
162
|
+
* | { ok: false, reason: "child-error", error: Error }
|
|
163
|
+
* | { ok: false, reason: "not-ready", error: Error }
|
|
164
|
+
* >}
|
|
165
|
+
*/
|
|
166
|
+
export async function launchEmbeddedPglite({ host, port, fork, waitForTcp, preflightCheck, logger }) {
|
|
167
|
+
// Layer 1 — pre-flight: never fork onto an already-occupied port.
|
|
168
|
+
const occupied = await preflightCheck(host, port);
|
|
169
|
+
if (occupied) {
|
|
170
|
+
logger.error(formatPortConflictMessage(port));
|
|
171
|
+
return { ok: false, reason: "port-occupied", port };
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const child = fork();
|
|
175
|
+
|
|
176
|
+
// The child may have died synchronously during/just after fork (its exit code is
|
|
177
|
+
// then already recorded even if our "exit" listener attaches a tick too late).
|
|
178
|
+
if (childHasExited(child)) {
|
|
179
|
+
return {
|
|
180
|
+
ok: false,
|
|
181
|
+
reason: "child-exited",
|
|
182
|
+
exitInfo: { code: child.exitCode, signal: null },
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// Layer 2 — latch the child's terminal events, then race them against readiness.
|
|
187
|
+
// A dead child ALWAYS beats a "someone is listening" probe: that is the #379 guard.
|
|
188
|
+
let exitInfo = null; // { code, signal } once the child exits
|
|
189
|
+
let spawnError = null;
|
|
190
|
+
let readyError = null;
|
|
191
|
+
|
|
192
|
+
const childDied = new Promise((resolve) => {
|
|
193
|
+
child.on("exit", (code, signal) => {
|
|
194
|
+
exitInfo = { code, signal };
|
|
195
|
+
resolve("exit");
|
|
196
|
+
});
|
|
197
|
+
child.on("error", (err) => {
|
|
198
|
+
spawnError = err;
|
|
199
|
+
resolve("error");
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
const readied = waitForTcp(host, port).then(
|
|
204
|
+
() => "ready",
|
|
205
|
+
(err) => {
|
|
206
|
+
readyError = err;
|
|
207
|
+
return "not-ready";
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
|
|
211
|
+
const outcome = await Promise.race([childDied, readied]);
|
|
212
|
+
|
|
213
|
+
// Re-check the latches regardless of who won the race — the child dying is fatal
|
|
214
|
+
// even if the port-ready probe also resolved (e.g. against a foreign listener).
|
|
215
|
+
if (exitInfo || childHasExited(child)) {
|
|
216
|
+
return {
|
|
217
|
+
ok: false,
|
|
218
|
+
reason: "child-exited",
|
|
219
|
+
exitInfo: exitInfo || { code: child.exitCode ?? null, signal: null },
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
if (spawnError) {
|
|
223
|
+
return { ok: false, reason: "child-error", error: spawnError };
|
|
224
|
+
}
|
|
225
|
+
if (outcome === "not-ready") {
|
|
226
|
+
// Readiness timed out but the child is (as far as we know) still alive — don't leak it.
|
|
227
|
+
if (child.kill && !child.killed) child.kill("SIGTERM");
|
|
228
|
+
return { ok: false, reason: "not-ready", error: readyError };
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// outcome === "ready" AND the child has not exited → genuinely our PGlite.
|
|
232
|
+
logger.log(`PGlite ready on port ${port}.`);
|
|
233
|
+
return { ok: true, child };
|
|
234
|
+
}
|
package/cli/login.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// ~/.chorus/daemon.json (0600). On validation failure, nothing is written.
|
|
4
4
|
// Plain ESM; the only dependency is the in-repo MCP SDK (via chorus-client).
|
|
5
5
|
|
|
6
|
-
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
6
|
+
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { dirname } from "node:path";
|
|
8
8
|
import { createInterface } from "node:readline";
|
|
9
9
|
|
|
@@ -49,56 +49,99 @@ export function prompt(query, opts = {}) {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* Field-level merge update of the login file (`~/.chorus/daemon.json`) — the
|
|
53
|
+
* single read → merge → write(0600) helper every config writer routes through.
|
|
54
|
+
*
|
|
55
|
+
* Reads any existing file, shallow-merges `partial` over it (partial keys win,
|
|
56
|
+
* every other pre-existing field is preserved), and writes the result back with
|
|
57
|
+
* owner-only permissions. A shallow merge is correct because every field is a
|
|
58
|
+
* scalar or a flat array (`cwds`) — there are no nested objects to deep-merge.
|
|
53
59
|
*
|
|
54
|
-
*
|
|
55
|
-
* `
|
|
56
|
-
*
|
|
57
|
-
* (
|
|
58
|
-
*
|
|
60
|
+
* The write is atomic: the JSON is written to a sibling `<path>.tmp` at 0600 and
|
|
61
|
+
* then `rename()`d over the target, so a crash mid-write never truncates the
|
|
62
|
+
* live file. A missing / unreadable / malformed existing file is treated as an
|
|
63
|
+
* empty object (defensive parse), so a re-login still produces a valid file
|
|
64
|
+
* rather than aborting on a corrupt one.
|
|
59
65
|
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
66
|
+
* Because writes now merge, NO field is ever silently dropped — in particular a
|
|
67
|
+
* `chorus login` preserves any pre-existing `cwds` / `yoloAckAt` /
|
|
68
|
+
* `sigintTimeoutMs` (daemon-config-field-merge change; supersedes the prior
|
|
69
|
+
* "credential change clears the yolo acknowledgement" behavior).
|
|
70
|
+
*
|
|
71
|
+
* @param {Record<string, unknown>} partial The fields to set/overwrite.
|
|
72
|
+
* @param {{
|
|
73
|
+
* path?: string,
|
|
74
|
+
* read?: (p: string) => string,
|
|
75
|
+
* write?: (p: string, c: string, o: object) => void,
|
|
76
|
+
* mkdir?: (p: string, o: object) => void,
|
|
77
|
+
* rename?: (from: string, to: string) => void,
|
|
78
|
+
* }} [deps]
|
|
79
|
+
* @returns {string} the file path written
|
|
62
80
|
*/
|
|
63
|
-
export function
|
|
81
|
+
export function updateDaemonConfig(partial, deps = {}) {
|
|
64
82
|
const path = deps.path ?? loginFilePath();
|
|
83
|
+
const read = deps.read ?? ((p) => readFileSync(p, "utf8"));
|
|
65
84
|
const write = deps.write ?? writeFileSync;
|
|
66
85
|
const mkdir = deps.mkdir ?? mkdirSync;
|
|
86
|
+
const rename = deps.rename ?? renameSync;
|
|
87
|
+
|
|
88
|
+
// Defensive read: missing / unreadable / malformed → start from empty so a
|
|
89
|
+
// re-login over a corrupt file still writes a valid one (no silent abort).
|
|
90
|
+
let current = {};
|
|
91
|
+
try {
|
|
92
|
+
const parsed = JSON.parse(read(path));
|
|
93
|
+
// Only a plain object is a valid config; arrays / scalars → start fresh.
|
|
94
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) current = parsed;
|
|
95
|
+
} catch {
|
|
96
|
+
// treat as empty
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const merged = { ...current, ...partial };
|
|
67
100
|
mkdir(dirname(path), { recursive: true });
|
|
68
|
-
write
|
|
101
|
+
// Atomic write: temp file (0600) in the same dir, then rename over target.
|
|
102
|
+
const tmp = `${path}.tmp`;
|
|
103
|
+
write(tmp, JSON.stringify(merged, null, 2) + "\n", { mode: 0o600 });
|
|
104
|
+
rename(tmp, path);
|
|
69
105
|
return path;
|
|
70
106
|
}
|
|
71
107
|
|
|
72
108
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
109
|
+
* Persist credentials + identity to the login file with owner-only perms.
|
|
110
|
+
*
|
|
111
|
+
* Thin wrapper over {@link updateDaemonConfig}: it field-merges the given
|
|
112
|
+
* credential/identity fields over any existing file, so every OTHER pre-existing
|
|
113
|
+
* field (`cwds`, `yoloAckAt`, `sigintTimeoutMs`, …) is preserved across a
|
|
114
|
+
* `chorus login` or a daemon-start credential completion. It no longer omits
|
|
115
|
+
* `yoloAckAt` — a credential write never discards the recorded yolo ack.
|
|
116
|
+
*
|
|
117
|
+
* The `deps` seams (`path`, `write`, `mkdir`) are kept for callers/tests that
|
|
118
|
+
* inject IO; `write` is the low-level `(path, content, opts)` writer.
|
|
119
|
+
*
|
|
120
|
+
* @param {{ url: string, apiKey: string, agentUuid: string, agentName: string }} data
|
|
121
|
+
* @param {{ path?: string, write?: (p: string, c: string, o: object) => void, mkdir?: (p: string, o: object) => void, read?: (p: string) => string, rename?: (from: string, to: string) => void }} [deps]
|
|
122
|
+
*/
|
|
123
|
+
export function writeLoginFile(data, deps = {}) {
|
|
124
|
+
return updateDaemonConfig(data, deps);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Record (or refresh) the yolo acknowledgement in the login file, preserving
|
|
129
|
+
* everything already on disk. Delegates to {@link updateDaemonConfig}, which
|
|
130
|
+
* reads the current file, merges `yoloAckAt`, and rewrites with 0600. Used by
|
|
131
|
+
* the daemon after an interactive TTY yolo confirmation — it does NOT touch
|
|
132
|
+
* url/apiKey/identity.
|
|
77
133
|
*
|
|
78
|
-
*
|
|
79
|
-
* the
|
|
134
|
+
* A TTY user whose credentials come from env / flags has no login file yet, but
|
|
135
|
+
* the ack must still persist (else they'd re-confirm yolo on every start). A
|
|
136
|
+
* file carrying only `yoloAckAt` is harmless — resolveCredentials simply falls
|
|
137
|
+
* through it.
|
|
80
138
|
*
|
|
81
139
|
* @param {string} yoloAckAt ISO-8601 timestamp of the confirmation.
|
|
82
|
-
* @param {{ path?: string, read?: (p: string) => string, write?:
|
|
140
|
+
* @param {{ path?: string, read?: (p: string) => string, write?: (p: string, c: string, o: object) => void, mkdir?: (p: string, o: object) => void, rename?: (from: string, to: string) => void }} [deps]
|
|
83
141
|
* @returns {string} the file path written
|
|
84
142
|
*/
|
|
85
143
|
export function recordYoloAck(yoloAckAt, deps = {}) {
|
|
86
|
-
|
|
87
|
-
const read = deps.read ?? ((p) => readFileSync(p, "utf8"));
|
|
88
|
-
const write = deps.write ?? writeLoginFile;
|
|
89
|
-
// Start from the existing file when present, else an empty object: a TTY user
|
|
90
|
-
// whose credentials come from env / flags has no login file yet, but the ack
|
|
91
|
-
// must still persist (else they'd re-confirm yolo on every start). A file
|
|
92
|
-
// carrying only `yoloAckAt` is harmless — resolveCredentials simply falls
|
|
93
|
-
// through it, and a later `chorus login` overwrites (clearing the ack).
|
|
94
|
-
let current = {};
|
|
95
|
-
try {
|
|
96
|
-
const parsed = JSON.parse(read(path));
|
|
97
|
-
if (parsed && typeof parsed === "object") current = parsed;
|
|
98
|
-
} catch {
|
|
99
|
-
// missing / unreadable / malformed → treat as empty (start fresh)
|
|
100
|
-
}
|
|
101
|
-
return write({ ...current, yoloAckAt }, { path });
|
|
144
|
+
return updateDaemonConfig({ yoloAckAt }, deps);
|
|
102
145
|
}
|
|
103
146
|
|
|
104
147
|
/**
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// cli/spawner-select.mjs
|
|
2
|
+
// Backend selection seam: maps the resolved agent type (daemon-agent.mjs) to a
|
|
3
|
+
// concrete Spawner instance. This is the ONLY place the daemon branches on the
|
|
4
|
+
// backend — the wake pipeline above it (queue, waker, directed delivery, headless
|
|
5
|
+
// guard, reporters) stays backend-agnostic and drives whichever spawner is
|
|
6
|
+
// injected purely through the shared wake(...) contract.
|
|
7
|
+
//
|
|
8
|
+
// The function is TOTAL: resolveAgentType has already rejected unknown values
|
|
9
|
+
// before this runs, so an unrecognized type here is not a user error path — we
|
|
10
|
+
// fall back to the safe default (claude-code) rather than throw.
|
|
11
|
+
|
|
12
|
+
import { ClaudeSpawner } from "./claude-spawner.mjs";
|
|
13
|
+
import { CodexSpawner } from "./codex-spawner.mjs";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Construct the spawner backend for `agentType`.
|
|
17
|
+
* @param {string} agentType "claude-code" | "codex" (already validated upstream).
|
|
18
|
+
* @param {{ logger?: any, permissionMode?: "chorus"|"yolo", creds?: { url: string, apiKey: string } }} [opts]
|
|
19
|
+
* @returns {import("./codex-spawner.mjs").Spawner}
|
|
20
|
+
*/
|
|
21
|
+
export function selectSpawner(agentType, opts = {}) {
|
|
22
|
+
const { logger, permissionMode, creds } = opts;
|
|
23
|
+
if (agentType === "codex") {
|
|
24
|
+
return new CodexSpawner({ logger, permissionMode, creds });
|
|
25
|
+
}
|
|
26
|
+
// Default / "claude-code": construction byte-identical to the prior daemon
|
|
27
|
+
// (ClaudeSpawner takes only { logger, permissionMode } — creds are not used by
|
|
28
|
+
// the Claude backend, which gets its key via the --mcp-config file).
|
|
29
|
+
return new ClaudeSpawner({ logger, permissionMode });
|
|
30
|
+
}
|