@chorus-aidlc/chorus 0.16.3 → 0.17.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 +445 -445
- package/.next/standalone/.next/app-path-routes-manifest.json +54 -54
- package/.next/standalone/.next/build-manifest.json +5 -5
- package/.next/standalone/.next/prerender-manifest.json +42 -42
- 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 +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 +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_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_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js +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_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_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 +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
- 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 +2 -2
- package/.next/standalone/.next/server/app/admin/companies/new.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin/companies.html +2 -2
- package/.next/standalone/.next/server/app/admin/companies.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin.html +2 -2
- package/.next/standalone/.next/server/app/admin.rsc +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_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/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/connection-heartbeat/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/directory-request/report/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.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-directory-requests/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-directory-requests/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_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_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/ideas/[uuid]/wake-preview/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/conversational/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mcp/route.js +3 -3
- 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_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/project-visits/pin/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-visits/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-visits/visit/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]/agent-cwds/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_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_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_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/agent-cwd-options/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/references/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/references/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/session/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_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 +2 -2
- package/.next/standalone/.next/server/app/index.rsc +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 +2 -2
- package/.next/standalone/.next/server/app/login/admin.rsc +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 +2 -2
- package/.next/standalone/.next/server/app/login/callback.rsc +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 +2 -2
- package/.next/standalone/.next/server/app/login/pick-workspace.rsc +1 -1
- package/.next/standalone/.next/server/app/login.html +2 -2
- package/.next/standalone/.next/server/app/login.rsc +1 -1
- 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 +2 -2
- package/.next/standalone/.next/server/app/onboarding.rsc +2 -2
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects.html +2 -2
- package/.next/standalone/.next/server/app/projects.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.html +2 -2
- package/.next/standalone/.next/server/app/settings.rsc +3 -3
- package/.next/standalone/.next/server/app-paths-manifest.json +54 -54
- package/.next/standalone/.next/server/chunks/1114.js +1 -1
- package/.next/standalone/.next/server/chunks/1318.js +1 -1
- package/.next/standalone/.next/server/chunks/1437.js +1 -0
- package/.next/standalone/.next/server/chunks/1559.js +2 -2
- package/.next/standalone/.next/server/chunks/2572.js +1 -1
- 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/{9793.js → 3045.js} +1 -1
- package/.next/standalone/.next/server/chunks/3831.js +37 -0
- package/.next/standalone/.next/server/chunks/4827.js +1 -1
- package/.next/standalone/.next/server/chunks/5245.js +1 -1
- package/.next/standalone/.next/server/chunks/{4394.js → 5706.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/6506.js +2 -2
- package/.next/standalone/.next/server/chunks/6515.js +2 -2
- package/.next/standalone/.next/server/chunks/679.js +1 -1
- package/.next/standalone/.next/server/chunks/7368.js +1 -1
- package/.next/standalone/.next/server/chunks/7530.js +1 -1
- package/.next/standalone/.next/server/chunks/8454.js +1 -1
- package/.next/standalone/.next/server/chunks/920.js +1 -1
- package/.next/standalone/.next/server/chunks/9213.js +1 -1
- package/.next/standalone/.next/server/chunks/9378.js +1 -1
- package/.next/standalone/.next/server/chunks/9449.js +1 -0
- package/.next/standalone/.next/server/chunks/9458.js +1 -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/pages/404.html +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/{11595.97e534422c57aee1.js → 11595.bbe40924d18958bf.js} +1 -1
- package/.next/standalone/.next/static/chunks/18139-e6ef4b5869593f8e.js +1 -0
- package/.next/standalone/.next/static/chunks/28856-ef2cb58fbd404ef9.js +1 -0
- package/.next/standalone/.next/static/chunks/{31308-fda6febfb2882a28.js → 31308-bb4a97b3f39c22dd.js} +1 -1
- package/.next/standalone/.next/static/chunks/{33456.6dc44a6aca1a01fd.js → 33456.5499eb8e892b110a.js} +1 -1
- package/.next/standalone/.next/static/chunks/{4860.7873ebc9ba435c8c.js → 4860.be77046fb2b3a2bd.js} +1 -1
- package/.next/standalone/.next/static/chunks/66873-e3be53f41b3f2255.js +1 -0
- package/.next/standalone/.next/static/chunks/70303-aec3d52ad87602a3.js +1 -0
- package/.next/standalone/.next/static/chunks/76201-83b26515f85ce37c.js +1 -0
- package/.next/standalone/.next/static/chunks/78917-a8a8dff98857c045.js +1 -0
- package/.next/standalone/.next/static/chunks/{94643-01be319472d751b3.js → 94643-ffa140f765c73daf.js} +1 -1
- package/.next/standalone/.next/static/chunks/97663-9c3ae4fd60b353db.js +1 -0
- package/.next/standalone/.next/static/chunks/{99373.d0e808c18408b8da.js → 99373.111493dc260a2a04.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/{layout-b742c51c0a764daf.js → layout-40fe7d026c5a7c6d.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-87d4d0fe90fca28c.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-1206abaee85dc915.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/{page-425acbe9ade5fa83.js → page-474e494097c8945f.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/page-e902b19328092ccf.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-f273288c3530aa0f.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-6568a7b08bf9a54b.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-fbd3c27b68666234.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/{page-58b48aa0a11603c3.js → page-15bb6e1696668512.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/{page-286faced32c6133f.js → page-2bea97214b1595cc.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-2bf7ceee62b574c7.js +1 -0
- package/.next/standalone/.next/static/chunks/app/onboarding/{page-5c82cf3abd856301.js → page-540da64d7ba16dc7.js} +1 -1
- package/.next/standalone/.next/static/chunks/{webpack-fa066d7ff9ab2b29.js → webpack-7cbb3ba6792f1fb3.js} +1 -1
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +1 -1
- package/.next/standalone/public/chorus-plugin/bin/chorus-api.sh +44 -1
- package/.next/standalone/public/chorus-plugin/bin/on-session-start.sh +4 -3
- package/.next/standalone/public/chorus-plugin/bin/tests/test-mcp-cli-delegation.sh +244 -0
- package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +19 -1
- package/.next/standalone/public/chorus-plugin/skills/chorus-cli/SKILL.md +57 -0
- package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +2 -2
- package/.next/standalone/public/chorus-plugin/skills/docs/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +85 -42
- package/.next/standalone/public/chorus-plugin/skills/orchestrate/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +2 -2
- package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +3 -3
- package/.next/standalone/public/dsh-credentials.sh +30 -0
- package/.next/standalone/public/install-codex.sh +21 -406
- package/.next/standalone/public/install-kiro.sh +20 -344
- package/.next/standalone/public/install-opencode.sh +20 -275
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-brainstorm/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-cli/SKILL.md +57 -0
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-develop/SKILL.md +2 -2
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-docs/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-idea/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-openspec-aware/SKILL.md +85 -42
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-orchestrate/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-proposal/SKILL.md +2 -2
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-quick-dev/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-review/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-yolo/SKILL.md +3 -3
- package/.next/standalone/public/kiro-plugin/bin/chorus-api.sh +44 -1
- package/.next/standalone/public/kiro-plugin/bin/on-agent-spawn.sh +6 -4
- package/.next/standalone/public/kiro-plugin/manifest.txt +41 -0
- package/.next/standalone/public/skill/brainstorm-chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/chorus/SKILL.md +19 -1
- package/.next/standalone/public/skill/code-reviewer-chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/develop-chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/docs-chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/idea-chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/orchestrate-chorus/SKILL.md +1 -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 +1 -1
- package/.next/standalone/public/skill/task-reviewer-chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/yolo-chorus/SKILL.md +1 -1
- package/.next/standalone/public/test-dsh-credentials.sh +39 -0
- package/.next/standalone/public/test-install-codex.sh +31 -79
- package/README.ja.md +5 -3
- package/README.ko.md +5 -3
- package/README.md +5 -3
- package/README.zh.md +5 -3
- package/chorus.mjs +35 -1
- package/cli/agent-backend-prompt.mjs +94 -0
- package/cli/agents.mjs +329 -0
- package/cli/chorus-client.mjs +69 -0
- package/cli/claude-spawner.mjs +4 -0
- package/cli/client-args.mjs +11 -5
- package/cli/codex-spawner.mjs +11 -6
- package/cli/credentials.mjs +185 -3
- package/cli/daemon-agent.mjs +30 -5
- package/cli/daemon-banner.mjs +3 -3
- package/cli/daemon-config.mjs +27 -2
- package/cli/daemon-install-config.mjs +21 -14
- package/cli/daemon-rest-client.mjs +31 -8
- package/cli/daemon-service.mjs +120 -33
- package/cli/daemon.mjs +175 -28
- package/cli/dsh-managed-config.mjs +407 -0
- package/cli/dsh-spawner.mjs +445 -0
- package/cli/init/adapters.mjs +137 -0
- package/cli/init/agent-type-map.mjs +60 -0
- package/cli/init/chorus-plugin-consts.mjs +16 -0
- package/cli/init/codex-mcp-config.mjs +183 -0
- package/cli/init/contracts.mjs +120 -0
- package/cli/init/detect.mjs +97 -0
- package/cli/init/file-template.mjs +248 -0
- package/cli/init/install-methods.mjs +508 -0
- package/cli/init/registry.mjs +74 -0
- package/cli/init/run-command.mjs +30 -0
- package/cli/init/select.mjs +111 -0
- package/cli/init/steps/credential-seed.mjs +751 -0
- package/cli/init/steps/daemon-setup.mjs +246 -0
- package/cli/init/steps/plugin-install.mjs +37 -0
- package/cli/init-args.mjs +137 -0
- package/cli/init.mjs +198 -0
- package/cli/kiro-spawner.mjs +4 -0
- package/cli/login.mjs +26 -4
- package/cli/mcp-args.mjs +280 -0
- package/cli/mcp.mjs +164 -0
- package/cli/spawner-select.mjs +54 -2
- package/cli/turn-reporter.mjs +5 -2
- package/cli/upload-hooks.mjs +31 -1
- package/cli/waker.mjs +49 -6
- package/package.json +1 -1
- package/prisma/migrations/20260818024700_add_turn_backend_session_id/migration.sql +1 -0
- package/prisma/schema.prisma +3 -0
- package/.next/standalone/.next/server/chunks/3594.js +0 -1
- package/.next/standalone/.next/server/chunks/5351.js +0 -32
- package/.next/standalone/.next/server/chunks/6667.js +0 -1
- package/.next/standalone/.next/server/chunks/6995.js +0 -1
- package/.next/standalone/.next/static/chunks/19887-c0bb297a78a1c7cd.js +0 -1
- package/.next/standalone/.next/static/chunks/29108-5a11eea003f4cc11.js +0 -1
- package/.next/standalone/.next/static/chunks/53073-a7ed20af6538a178.js +0 -1
- package/.next/standalone/.next/static/chunks/6603-e70ddeab6ad09c50.js +0 -1
- package/.next/standalone/.next/static/chunks/78917-1b59cbb806b3ecfc.js +0 -1
- package/.next/standalone/.next/static/chunks/82751-3e161e1d8dbda3ac.js +0 -1
- package/.next/standalone/.next/static/chunks/99366-425e9ef22e60e3e2.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-f636e00c28f425ea.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-c004f1a194af7fa5.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/page-fdd617457730a116.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-6b3fb08d53826d02.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-d5b222f379b2e8ca.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-0a6c2d0e1b68e0e4.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-1507a761e67c2aa9.js +0 -1
- /package/.next/standalone/.next/static/{K8qIdwvKoIWbwQ_f01mnM → 0spgxl3lP26Fl1otd1D7R}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{K8qIdwvKoIWbwQ_f01mnM → 0spgxl3lP26Fl1otd1D7R}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
// cli/init/steps/daemon-setup.mjs
|
|
2
|
+
// The `once`-scoped daemon-setup step for `chorus init` (idea a7c2a3e8). It is the
|
|
3
|
+
// reserved sibling slot in the step registry (see registry.mjs / contracts.mjs):
|
|
4
|
+
// after credentials are seeded (order 10) and each agent's plugin is installed
|
|
5
|
+
// (order 20), this step (order 30) configures the local Chorus daemon and, opt-in,
|
|
6
|
+
// installs it as a boot-autostart service.
|
|
7
|
+
//
|
|
8
|
+
// Owner decisions (elaboration Round 1):
|
|
9
|
+
// - full_preflight : reuse `daemon install`'s cwds + backend preflight so the
|
|
10
|
+
// installed service is usable out of the box.
|
|
11
|
+
// - connection_only : the credential model is Chorus URL + API key only — this
|
|
12
|
+
// step collects NO provider secrets (AWS_/ANTHROPIC_/…).
|
|
13
|
+
// - default_off : the interactive prompt defaults to No (opt-in).
|
|
14
|
+
// - explicit_flag : a non-interactive run (non-TTY OR --yes) installs the
|
|
15
|
+
// boot service ONLY when --daemon-autostart is passed.
|
|
16
|
+
// - linux_and_mac : auto-start is real on Linux (systemd) and macOS (launchd);
|
|
17
|
+
// unsupported platforms write daemon.json + print manual steps.
|
|
18
|
+
// - boot_and_now : accepting installs AND enables the service (start now +
|
|
19
|
+
// at every boot) via the shared installService.
|
|
20
|
+
// - report_skip_repair : a re-run where the service is already installed reports
|
|
21
|
+
// "already configured" and does not rewrite.
|
|
22
|
+
//
|
|
23
|
+
// All collaborators are injected (matching credential-seed.mjs) so the step
|
|
24
|
+
// unit-tests with fakes; production uses the real daemon-service / install-config
|
|
25
|
+
// modules, and an integration test can drive REAL installService against a fake io.
|
|
26
|
+
|
|
27
|
+
import { readFileSync } from "node:fs";
|
|
28
|
+
import { STEP_SCOPES, OUTCOME_ACTIONS } from "../contracts.mjs";
|
|
29
|
+
import { loginFilePath } from "../../credentials.mjs";
|
|
30
|
+
import {
|
|
31
|
+
autostartCapability as defaultAutostartCapability,
|
|
32
|
+
detectSupervisor as defaultDetectSupervisor,
|
|
33
|
+
installService as defaultInstallService,
|
|
34
|
+
resolveServicePaths as defaultResolveServicePaths,
|
|
35
|
+
} from "../../daemon-service.mjs";
|
|
36
|
+
import {
|
|
37
|
+
resolveInstallCredentials as defaultResolveInstallCredentials,
|
|
38
|
+
resolveInstallCwds as defaultResolveInstallCwds,
|
|
39
|
+
resolveInstallAgent as defaultResolveInstallAgent,
|
|
40
|
+
} from "../../daemon-install-config.mjs";
|
|
41
|
+
import { isWakeableAgentType } from "../agent-type-map.mjs";
|
|
42
|
+
|
|
43
|
+
const STEP_ID = "daemon-setup";
|
|
44
|
+
const { INSTALLED, SKIPPED, FAILED } = OUTCOME_ACTIONS;
|
|
45
|
+
const out = (action, detail) => ({ stepId: STEP_ID, action, detail });
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The daemon-setup step body.
|
|
50
|
+
* @param {import("../contracts.mjs").StepContext & {
|
|
51
|
+
* autostartCapability?: Function, detectSupervisor?: Function,
|
|
52
|
+
* installService?: Function, resolveServicePaths?: Function, serviceIo?: object,
|
|
53
|
+
* resolveInstallCredentials?: Function, resolveInstallCwds?: Function,
|
|
54
|
+
* resolveInstallAgent?: Function,
|
|
55
|
+
* writeConfig?: Function, readJson?: Function, loginPath?: string,
|
|
56
|
+
* resolve?: Function, validate?: Function, processCwd?: string,
|
|
57
|
+
* }} ctx
|
|
58
|
+
* @returns {Promise<import("../contracts.mjs").StepOutcome>}
|
|
59
|
+
*/
|
|
60
|
+
export async function setupDaemon(ctx) {
|
|
61
|
+
const env = ctx.env ?? process.env;
|
|
62
|
+
const io = ctx.io ?? {};
|
|
63
|
+
const isTTY = !!io.isTTY;
|
|
64
|
+
const flags = ctx.flags ?? {};
|
|
65
|
+
const log = typeof io.log === "function" ? io.log : () => {};
|
|
66
|
+
|
|
67
|
+
// Injectable collaborators (real defaults in production).
|
|
68
|
+
const capabilityOf = ctx.autostartCapability ?? defaultAutostartCapability;
|
|
69
|
+
const detect = ctx.detectSupervisor ?? defaultDetectSupervisor;
|
|
70
|
+
const install = ctx.installService ?? defaultInstallService;
|
|
71
|
+
const servicePaths = ctx.resolveServicePaths ?? defaultResolveServicePaths;
|
|
72
|
+
const serviceIo = ctx.serviceIo; // undefined ⇒ daemon-service uses its real defaultIO
|
|
73
|
+
const resolveCreds = ctx.resolveInstallCredentials ?? defaultResolveInstallCredentials;
|
|
74
|
+
const resolveCwds = ctx.resolveInstallCwds ?? defaultResolveInstallCwds;
|
|
75
|
+
const resolveAgent = ctx.resolveInstallAgent ?? defaultResolveInstallAgent;
|
|
76
|
+
|
|
77
|
+
// "Non-interactive" for the auto-start decision = non-TTY OR --yes (a --yes run in
|
|
78
|
+
// a TTY must never block on the prompt), matching `daemon install --yes`.
|
|
79
|
+
const nonInteractive = !isTTY || flags.yes === true;
|
|
80
|
+
const skip = nonInteractive; // suppress the resolvers' prompts in non-interactive mode
|
|
81
|
+
|
|
82
|
+
// Shared opts threaded into the reused preflight resolvers. undefined deps fall
|
|
83
|
+
// through to the resolvers' real defaults (updateDaemonConfig / readJsonSafe / …).
|
|
84
|
+
const preflightOpts = {
|
|
85
|
+
isTTY,
|
|
86
|
+
skip,
|
|
87
|
+
writeConfig: ctx.writeConfig,
|
|
88
|
+
readJson: ctx.readJson,
|
|
89
|
+
loginPath: ctx.loginPath,
|
|
90
|
+
prompt: io.ask,
|
|
91
|
+
log,
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
// Reuse the init step-1 selection (idea broaden-init-plugin-install): map each
|
|
95
|
+
// selected adapter id to its daemon agentType and record whether ANY is a
|
|
96
|
+
// daemon-wakeable backend. Each selected agent's own agents[] entry (with its
|
|
97
|
+
// agentType) was already written by the credential-seed step; here we only need
|
|
98
|
+
// the daemon-level default backend + the wakeability gate below. With NO
|
|
99
|
+
// selection (e.g. this step reused outside `chorus init`), the original
|
|
100
|
+
// prompt-driven behavior is preserved.
|
|
101
|
+
const selection = Array.isArray(ctx.selection)
|
|
102
|
+
? ctx.selection.filter((id) => typeof id === "string" && id.trim())
|
|
103
|
+
: [];
|
|
104
|
+
const hasSelection = selection.length > 0;
|
|
105
|
+
|
|
106
|
+
// Will the daemon actually wake anything? credential-seed (order 10) just wrote each
|
|
107
|
+
// selected agent's `daemonWake` into daemon.json `agents[]` (a TTY opt-in lives there,
|
|
108
|
+
// NOT in flags), so read that file rather than re-derive from the selection/flags. An
|
|
109
|
+
// agent will be woken iff its backend is wakeable AND daemonWake is not false. offline
|
|
110
|
+
// OR daemonWake:false ⇒ not woken.
|
|
111
|
+
const readJson =
|
|
112
|
+
ctx.readJson ??
|
|
113
|
+
((p) => {
|
|
114
|
+
try {
|
|
115
|
+
return JSON.parse(readFileSync(p, "utf8"));
|
|
116
|
+
} catch {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
const cfgFile = readJson(ctx.loginPath ?? loginFilePath());
|
|
121
|
+
const configuredAgents =
|
|
122
|
+
cfgFile && Array.isArray(cfgFile.agents) ? cfgFile.agents.filter((a) => a && typeof a === "object") : [];
|
|
123
|
+
const willWake = configuredAgents.some(
|
|
124
|
+
(a) => isWakeableAgentType(a.agentType) && a.daemonWake !== false,
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
// 1. Preflight. With an init SELECTION, credential-seed (order 10) already wrote
|
|
128
|
+
// each selected agent into daemon.json `agents[]` with its OWN cwds + agentType
|
|
129
|
+
// — the authoritative per-agent config. The flat top-level `cwds`/`agent` are a
|
|
130
|
+
// DEPRECATED single-agent leftover (persisting them here leaked a duplicate agent
|
|
131
|
+
// config OUTSIDE the array), so we do NOT write them for a selection. Without a
|
|
132
|
+
// selection (this step reused outside `chorus init`) we keep the original
|
|
133
|
+
// single-agent preflight: persist top-level cwds + the resolved/prompted backend.
|
|
134
|
+
// Connection-only either way: no provider secrets.
|
|
135
|
+
try {
|
|
136
|
+
if (!hasSelection) {
|
|
137
|
+
await resolveCwds(flags, preflightOpts);
|
|
138
|
+
await resolveAgent(flags, env, { ...preflightOpts, errLog: log });
|
|
139
|
+
}
|
|
140
|
+
} catch (err) {
|
|
141
|
+
return out(FAILED, `daemon preflight failed: ${err?.message ?? String(err)}`);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// 1b. Capability gate: if NO configured agent will be woken (every one is offline, or
|
|
145
|
+
// a wakeable backend the operator left opted-out with daemonWake:false), the daemon
|
|
146
|
+
// has nothing to wake. Their agents[] entries are already persisted (credential-seed)
|
|
147
|
+
// for the `chorus mcp` proxy; skip the auto-start prompt AND the service install.
|
|
148
|
+
if (hasSelection && !willWake) {
|
|
149
|
+
log("[chorus agents add] no agent is enabled for daemon waking — the daemon would wake no local backend.");
|
|
150
|
+
log("[chorus agents add] agents' keys are configured in ~/.chorus/daemon.json for `chorus mcp`.");
|
|
151
|
+
return out(SKIPPED, "no agent enabled for daemon waking — agents[] persisted; boot service not installed");
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const manual = () => {
|
|
155
|
+
log("[chorus agents add] daemon config written to ~/.chorus/daemon.json.");
|
|
156
|
+
log("[chorus agents add] start the daemon yourself: `chorus daemon` (foreground) or `chorus daemon -d` (background).");
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// 2. Capability gate (decision: linux_and_mac). Only offer auto-start where a real
|
|
160
|
+
// boot service exists; unsupported platforms write the config + print manual steps.
|
|
161
|
+
const capability = capabilityOf(serviceIo);
|
|
162
|
+
if (capability === "unsupported") {
|
|
163
|
+
const platformLabel = serviceIo?.platform ?? process.platform;
|
|
164
|
+
manual();
|
|
165
|
+
return out(SKIPPED, `daemon.json written; auto-start unsupported on ${platformLabel} — start with 'chorus daemon'`);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// 3. Decide whether to install (decision: default_off / explicit_flag).
|
|
169
|
+
if (nonInteractive) {
|
|
170
|
+
if (flags.daemonAutostart !== true) {
|
|
171
|
+
manual();
|
|
172
|
+
return out(SKIPPED, "daemon.json written; pass --daemon-autostart to install the boot service");
|
|
173
|
+
}
|
|
174
|
+
} else {
|
|
175
|
+
const answer = typeof io.ask === "function"
|
|
176
|
+
? String((await io.ask("Install & enable the Chorus daemon to auto-start on boot? [y/N]: ")) ?? "").trim()
|
|
177
|
+
: "";
|
|
178
|
+
if (!/^y(es)?$/i.test(answer)) {
|
|
179
|
+
manual();
|
|
180
|
+
return out(SKIPPED, "declined auto-start; daemon.json written — start with 'chorus daemon'");
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// 4. Idempotency short-circuit (decision: report_skip_repair) — BEFORE the
|
|
185
|
+
// credential gate, so an already-installed healthy re-run neither re-validates
|
|
186
|
+
// (which could fail on a transient server outage) nor rewrites the unit. A
|
|
187
|
+
// missing/absent service falls through to install (which repairs the drift).
|
|
188
|
+
const sup = detect(serviceIo);
|
|
189
|
+
if ((sup.kind === "systemd" || sup.kind === "launchd") && sup.installed) {
|
|
190
|
+
return out(SKIPPED, `daemon already configured for auto-start (${sup.kind}) — left unchanged`);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// 5. Credential validate-or-abort gate — reached only when actually installing.
|
|
194
|
+
// Reuse the SAME guarantee as `daemon install`: resolve → server-validate the
|
|
195
|
+
// key → (for the legacy single-agent path) persist url+key+identity; abort
|
|
196
|
+
// (install nothing) on failure. With an init SELECTION the per-agent creds are
|
|
197
|
+
// already in agents[] (credential-seed) and resolveCredentials falls back to
|
|
198
|
+
// agents[0], so we VALIDATE ONLY (no-op writeConfig) — persisting the flat
|
|
199
|
+
// top-level url/apiKey/identity here would re-introduce the deprecated
|
|
200
|
+
// outside-the-array agent config. This does NOT lean on credential-seed, whose
|
|
201
|
+
// SKIPPED path performs no server validation and whose FAILED outcome does not
|
|
202
|
+
// stop runInit.
|
|
203
|
+
let cred;
|
|
204
|
+
try {
|
|
205
|
+
cred = await resolveCreds(flags, env, {
|
|
206
|
+
isTTY,
|
|
207
|
+
skip,
|
|
208
|
+
resolve: ctx.resolve,
|
|
209
|
+
validate: ctx.validate,
|
|
210
|
+
writeConfig: hasSelection ? () => {} : ctx.writeConfig,
|
|
211
|
+
prompt: io.ask,
|
|
212
|
+
log,
|
|
213
|
+
errLog: log,
|
|
214
|
+
});
|
|
215
|
+
} catch (err) {
|
|
216
|
+
return out(FAILED, `credential preflight failed: ${err?.message ?? String(err)}`);
|
|
217
|
+
}
|
|
218
|
+
if (!cred || !cred.ok) {
|
|
219
|
+
return out(FAILED, "credentials could not be resolved/validated — no boot service installed");
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// 6. Install & enable the boot service (decision: boot_and_now).
|
|
223
|
+
const cwdList = Array.isArray(flags.cwd) ? flags.cwd : typeof flags.cwd === "string" ? [flags.cwd] : [];
|
|
224
|
+
const spec = {
|
|
225
|
+
...servicePaths(env),
|
|
226
|
+
// cwds/agent live in daemon.json (persisted above); the unit carries neither.
|
|
227
|
+
cwds: cwdList,
|
|
228
|
+
chorusOnly: flags.chorusOnly === true,
|
|
229
|
+
workingDir: ctx.processCwd ?? process.cwd(),
|
|
230
|
+
};
|
|
231
|
+
const r = install(spec, serviceIo);
|
|
232
|
+
if (r && r.installed) {
|
|
233
|
+
log("[chorus agents add] daemon installed & enabled — it will auto-start on boot.");
|
|
234
|
+
for (const s of r.steps ?? []) log(`[chorus agents add] ${s}`);
|
|
235
|
+
return out(INSTALLED, `boot service installed (${r.platform}); manage with 'chorus daemon status|stop|restart|logs'`);
|
|
236
|
+
}
|
|
237
|
+
return out(FAILED, `service install failed: ${r?.error ?? "unknown error"}`);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/** @type {import("../contracts.mjs").InitStep} */
|
|
241
|
+
export const daemonSetupStep = {
|
|
242
|
+
id: STEP_ID,
|
|
243
|
+
order: 30, // after credential-seed (10) and plugin-install (20)
|
|
244
|
+
scope: STEP_SCOPES.ONCE,
|
|
245
|
+
run: setupDaemon,
|
|
246
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// cli/init/steps/plugin-install.mjs
|
|
2
|
+
// The per-agent plugin-install step `chorus init` ships (idea c055e285, A1).
|
|
3
|
+
// The orchestrator invokes run(ctx) once per selected agent with ctx.agentId +
|
|
4
|
+
// ctx.adapter set; the step delegates to the agent's own installPlugin (whose
|
|
5
|
+
// per-agent mechanics live in cli/init/install-methods.mjs). Per-agent failures
|
|
6
|
+
// are isolated by returning a `failed` outcome — never throwing — so one agent
|
|
7
|
+
// cannot abort the others.
|
|
8
|
+
|
|
9
|
+
import { STEP_SCOPES, OUTCOME_ACTIONS } from "../contracts.mjs";
|
|
10
|
+
|
|
11
|
+
/** @type {import("../contracts.mjs").InitStep} */
|
|
12
|
+
export const pluginInstallStep = {
|
|
13
|
+
id: "plugin-install",
|
|
14
|
+
order: 20, // after credential-seed (order 10)
|
|
15
|
+
scope: STEP_SCOPES.PER_AGENT,
|
|
16
|
+
run(ctx) {
|
|
17
|
+
const adapter = ctx.adapter;
|
|
18
|
+
if (!adapter || typeof adapter.installPlugin !== "function") {
|
|
19
|
+
return {
|
|
20
|
+
stepId: "plugin-install",
|
|
21
|
+
agentId: ctx.agentId,
|
|
22
|
+
action: OUTCOME_ACTIONS.FAILED,
|
|
23
|
+
detail: "no adapter resolved for this agent",
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
return adapter.installPlugin(ctx);
|
|
28
|
+
} catch (err) {
|
|
29
|
+
return {
|
|
30
|
+
stepId: "plugin-install",
|
|
31
|
+
agentId: adapter.id,
|
|
32
|
+
action: OUTCOME_ACTIONS.FAILED,
|
|
33
|
+
detail: `install threw: ${err?.message ?? String(err)}`,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// cli/init-args.mjs
|
|
2
|
+
// Argument parsing + help text for `chorus init` (idea c055e285, A1). Pure and
|
|
3
|
+
// side-effect-free so it is unit-testable — chorus.mjs (which runs side effects
|
|
4
|
+
// at import) imports these helpers, mirroring cli/client-args.mjs.
|
|
5
|
+
//
|
|
6
|
+
// Zero dependencies — ships verbatim in the npm package alongside chorus.mjs.
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Parse `chorus init` flags out of an arg list. Recognizes:
|
|
10
|
+
* --agents <csv> comma-separated agent ids (space + `=` forms), repeatable
|
|
11
|
+
* (values accumulate); e.g. `--agents claude,codex`
|
|
12
|
+
* --all configure every supported agent
|
|
13
|
+
* --yes / -y skip confirmations (implied when non-TTY)
|
|
14
|
+
* --url <url> Chorus URL (space + `=`) — for the credential-seed step
|
|
15
|
+
* --api-key <k> Chorus API key (space + `=`)
|
|
16
|
+
* --help / -h
|
|
17
|
+
*
|
|
18
|
+
* Only keys that appear are set, so callers can distinguish "unset" from a
|
|
19
|
+
* falsy value. `agents` is normalized to a de-duped, order-preserving array of
|
|
20
|
+
* lowercased ids (empty tokens dropped); absent ⇒ `agents` is unset.
|
|
21
|
+
*
|
|
22
|
+
* @param {string[]} argv
|
|
23
|
+
* @returns {{ agents?: string[], all?: boolean, yes?: boolean, url?: string,
|
|
24
|
+
* apiKey?: string, dshProfile?: string, daemonAutostart?: boolean,
|
|
25
|
+
* daemonWake?: string[], daemonWakeAll?: boolean, help?: boolean }}
|
|
26
|
+
*/
|
|
27
|
+
export function parseInitFlags(argv) {
|
|
28
|
+
const out = {};
|
|
29
|
+
/** @type {string[]} */
|
|
30
|
+
const agentTokens = [];
|
|
31
|
+
/** @type {string[]} */
|
|
32
|
+
const daemonWakeTokens = [];
|
|
33
|
+
for (let i = 0; i < argv.length; i++) {
|
|
34
|
+
const a = argv[i];
|
|
35
|
+
if (a === "--agents") agentTokens.push(argv[i + 1] ?? "");
|
|
36
|
+
else if (a.startsWith("--agents=")) agentTokens.push(a.slice("--agents=".length));
|
|
37
|
+
else if (a === "--all") out.all = true;
|
|
38
|
+
else if (a === "--yes" || a === "-y") out.yes = true;
|
|
39
|
+
else if (a === "--daemon-autostart") out.daemonAutostart = true;
|
|
40
|
+
else if (a === "--daemon-wake-all") out.daemonWakeAll = true;
|
|
41
|
+
else if (a === "--daemon-wake") daemonWakeTokens.push(argv[i + 1] ?? "");
|
|
42
|
+
else if (a.startsWith("--daemon-wake=")) daemonWakeTokens.push(a.slice("--daemon-wake=".length));
|
|
43
|
+
else if (a === "--url") out.url = argv[i + 1];
|
|
44
|
+
else if (a.startsWith("--url=")) out.url = a.slice("--url=".length);
|
|
45
|
+
else if (a === "--api-key") out.apiKey = argv[i + 1];
|
|
46
|
+
else if (a.startsWith("--api-key=")) out.apiKey = a.slice("--api-key=".length);
|
|
47
|
+
else if (a === "--dsh-profile") out.dshProfile = argv[i + 1];
|
|
48
|
+
else if (a.startsWith("--dsh-profile=")) out.dshProfile = a.slice("--dsh-profile=".length);
|
|
49
|
+
else if (a === "--help" || a === "-h") out.help = true;
|
|
50
|
+
}
|
|
51
|
+
// Normalize a comma-separated, repeatable token list into a de-duped lowercased id
|
|
52
|
+
// array (shared shape for --agents and --daemon-wake).
|
|
53
|
+
const normalizeIds = (tokens) => {
|
|
54
|
+
const seen = new Set();
|
|
55
|
+
/** @type {string[]} */
|
|
56
|
+
const ids = [];
|
|
57
|
+
for (const tok of tokens) {
|
|
58
|
+
for (const raw of String(tok).split(",")) {
|
|
59
|
+
const id = raw.trim().toLowerCase();
|
|
60
|
+
if (id && !seen.has(id)) {
|
|
61
|
+
seen.add(id);
|
|
62
|
+
ids.push(id);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return ids;
|
|
67
|
+
};
|
|
68
|
+
if (agentTokens.length) {
|
|
69
|
+
// Even a `--agents ""`/`--agents ,` that yields nothing still marks intent to
|
|
70
|
+
// pass agents explicitly; expose the (possibly empty) array so the selector
|
|
71
|
+
// can tell "user tried to specify agents" from "user gave no --agents at all".
|
|
72
|
+
out.agents = normalizeIds(agentTokens);
|
|
73
|
+
}
|
|
74
|
+
if (daemonWakeTokens.length) out.daemonWake = normalizeIds(daemonWakeTokens);
|
|
75
|
+
return out;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Help text for `chorus agents add [--help]` (formerly `chorus init`). Pure —
|
|
80
|
+
* takes the version so the caller (which already read package.json) does no IO here.
|
|
81
|
+
* @param {string} version
|
|
82
|
+
* @returns {string}
|
|
83
|
+
*/
|
|
84
|
+
export function initHelpText(version) {
|
|
85
|
+
return `
|
|
86
|
+
Chorus agents add v${version} — one command to configure this machine's coding agents
|
|
87
|
+
for Chorus. Detects installed agents, lets you pick which to configure, installs
|
|
88
|
+
each one's Chorus plugin via that agent's own marketplace, and captures your
|
|
89
|
+
Chorus credentials once into ~/.chorus/daemon.json. (Formerly \`chorus init\`.)
|
|
90
|
+
|
|
91
|
+
USAGE
|
|
92
|
+
chorus agents add Interactive: detect, select, configure
|
|
93
|
+
chorus agents add --all Configure every supported agent
|
|
94
|
+
chorus agents add --agents claude,codex Configure only the named agents
|
|
95
|
+
|
|
96
|
+
OPTIONS
|
|
97
|
+
--agents <a,b> Comma-separated agent ids to configure (repeatable).
|
|
98
|
+
Valid ids come from the adapter registry; an unknown
|
|
99
|
+
id is rejected with the list of valid ids.
|
|
100
|
+
--all Configure every supported agent.
|
|
101
|
+
--url <url> Chorus server URL (env: CHORUS_URL) — seeded once.
|
|
102
|
+
--api-key <cho_...> Agent API key (env: CHORUS_API_KEY) — seeded once.
|
|
103
|
+
--dsh-profile <name> dsh profile to install the Chorus bundle into
|
|
104
|
+
(env: CHORUS_DSH_PROFILE). Required for dsh in a
|
|
105
|
+
non-interactive run; prompted on a TTY.
|
|
106
|
+
--daemon-wake <a,b> Enable daemon auto-waking for these selected agents
|
|
107
|
+
(repeatable). Wakeable agents (claude/codex/kiro) default
|
|
108
|
+
to NOT woken; this opts specific ones in. On a TTY you are
|
|
109
|
+
prompted per agent instead.
|
|
110
|
+
--daemon-wake-all Enable daemon auto-waking for every selected wakeable agent.
|
|
111
|
+
--daemon-autostart Install & enable the daemon boot service (Linux systemd /
|
|
112
|
+
macOS launchd) in a non-interactive run. Ignored where
|
|
113
|
+
auto-start is unsupported (e.g. Windows). In an
|
|
114
|
+
interactive TTY run the daemon-setup step prompts instead
|
|
115
|
+
(default: No).
|
|
116
|
+
-y, --yes Skip confirmation prompts (implied when non-TTY).
|
|
117
|
+
-h, --help Show this help message.
|
|
118
|
+
|
|
119
|
+
NON-INTERACTIVE
|
|
120
|
+
When stdin/stdout is not a TTY, you MUST pass --agents or --all — the command
|
|
121
|
+
will not guess which agents to configure and aborts otherwise. The daemon boot service is
|
|
122
|
+
installed non-interactively ONLY when you pass --daemon-autostart; otherwise the
|
|
123
|
+
daemon config is written and you start it yourself with 'chorus daemon'.
|
|
124
|
+
|
|
125
|
+
SCOPE
|
|
126
|
+
This installs the plugin SURFACE, seeds credentials into the daemon config, and
|
|
127
|
+
optionally configures + auto-starts the local daemon. Live MCP tools for each
|
|
128
|
+
agent arrive with a sibling feature (the 'chorus mcp' proxy). The legacy
|
|
129
|
+
install-*.sh scripts are left untouched.
|
|
130
|
+
|
|
131
|
+
EXAMPLES
|
|
132
|
+
chorus agents add
|
|
133
|
+
chorus agents add --all --yes
|
|
134
|
+
chorus agents add --agents claude,codex --url https://chorus.example.com --api-key cho_xxx --yes
|
|
135
|
+
chorus agents add --all --yes --daemon-autostart
|
|
136
|
+
`;
|
|
137
|
+
}
|
package/cli/init.mjs
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
// cli/init.mjs
|
|
2
|
+
// `chorus init` orchestrator (idea c055e285, A1). Dependency-injected so it
|
|
3
|
+
// unit-tests without real detection / prompts / filesystem, mirroring the pure
|
|
4
|
+
// entry-point style of cli/embedded-db.mjs and cli/client-args.mjs.
|
|
5
|
+
//
|
|
6
|
+
// Flow: parse flags → detect agents → resolve selection → run ordered steps →
|
|
7
|
+
// print per-agent summary → exit code. The ORCHESTRATOR owns per-agent
|
|
8
|
+
// iteration: `once` steps run a single time; `per-agent` steps run once per
|
|
9
|
+
// selected agent with ctx.agentId + ctx.adapter set (contracts.mjs).
|
|
10
|
+
|
|
11
|
+
import { createInterface } from "node:readline";
|
|
12
|
+
import { copyFileSync, existsSync } from "node:fs";
|
|
13
|
+
import { parseInitFlags, initHelpText } from "./init-args.mjs";
|
|
14
|
+
import { resolveSelection as defaultResolveSelection } from "./init/select.mjs";
|
|
15
|
+
import { STEP_SCOPES, OUTCOME_ACTIONS, isFailureOutcome } from "./init/contracts.mjs";
|
|
16
|
+
|
|
17
|
+
/** Build the default runtime IO (real terminal). Only called at run time. */
|
|
18
|
+
function defaultIo() {
|
|
19
|
+
const isTTY = !!(process.stdin.isTTY && process.stdout.isTTY);
|
|
20
|
+
return {
|
|
21
|
+
log: (m) => console.log(m),
|
|
22
|
+
isTTY,
|
|
23
|
+
ask: isTTY
|
|
24
|
+
? (query) =>
|
|
25
|
+
new Promise((resolve) => {
|
|
26
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
27
|
+
rl.question(query, (answer) => {
|
|
28
|
+
rl.close();
|
|
29
|
+
resolve(answer);
|
|
30
|
+
});
|
|
31
|
+
})
|
|
32
|
+
: undefined,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Copy a file to `<path>.chorus-bak` once before overwrite (idempotent). */
|
|
37
|
+
function backupFile(path) {
|
|
38
|
+
try {
|
|
39
|
+
if (!existsSync(path)) return null;
|
|
40
|
+
const bak = `${path}.chorus-bak`;
|
|
41
|
+
if (!existsSync(bak)) copyFileSync(path, bak);
|
|
42
|
+
return bak;
|
|
43
|
+
} catch {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Run `chorus init`.
|
|
50
|
+
* @param {string[]} argv args after the `init` subcommand token
|
|
51
|
+
* @param {{
|
|
52
|
+
* env?: NodeJS.ProcessEnv,
|
|
53
|
+
* version?: string,
|
|
54
|
+
* io?: { log: Function, ask?: Function, isTTY?: boolean },
|
|
55
|
+
* parse?: (argv: string[]) => object,
|
|
56
|
+
* resolveSelection?: Function,
|
|
57
|
+
* detectAgents?: (env: NodeJS.ProcessEnv) => object[],
|
|
58
|
+
* orderedSteps?: () => object[],
|
|
59
|
+
* getAdapter?: (id: string) => (object | undefined),
|
|
60
|
+
* backup?: (path: string) => (string | null),
|
|
61
|
+
* }} [deps]
|
|
62
|
+
* @returns {Promise<number>} process exit code
|
|
63
|
+
*/
|
|
64
|
+
export async function runInit(argv = [], deps = {}) {
|
|
65
|
+
const env = deps.env ?? process.env;
|
|
66
|
+
const io = deps.io ?? defaultIo();
|
|
67
|
+
const parse = deps.parse ?? parseInitFlags;
|
|
68
|
+
const resolveSelection = deps.resolveSelection ?? defaultResolveSelection;
|
|
69
|
+
const backup = deps.backup ?? backupFile;
|
|
70
|
+
|
|
71
|
+
const flags = parse(argv);
|
|
72
|
+
|
|
73
|
+
if (flags.help) {
|
|
74
|
+
io.log(initHelpText(deps.version ?? ""));
|
|
75
|
+
return 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Lazy defaults so importing this module never requires the registry to be
|
|
79
|
+
// fully populated (the registry is filled incrementally by sibling tasks).
|
|
80
|
+
const detectAgents =
|
|
81
|
+
deps.detectAgents ?? ((e) => import("./init/registry.mjs").then((m) => m.detectAgents(e)));
|
|
82
|
+
const orderedSteps =
|
|
83
|
+
deps.orderedSteps ?? (() => import("./init/registry.mjs").then((m) => m.orderedSteps()));
|
|
84
|
+
const getAdapter =
|
|
85
|
+
deps.getAdapter ?? ((id) => import("./init/registry.mjs").then((m) => m.getAdapter(id)));
|
|
86
|
+
|
|
87
|
+
const detections = await detectAgents(env);
|
|
88
|
+
const { selectedIds, error } = await resolveSelection({ flags, detections, io });
|
|
89
|
+
if (error) {
|
|
90
|
+
io.log(`[chorus agents add] ${error}`);
|
|
91
|
+
return 1;
|
|
92
|
+
}
|
|
93
|
+
if (!selectedIds || selectedIds.length === 0) {
|
|
94
|
+
io.log("[chorus agents add] Nothing to configure.");
|
|
95
|
+
return 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
io.log(`[chorus agents add] Configuring: ${selectedIds.join(", ")}`);
|
|
99
|
+
|
|
100
|
+
const steps = await orderedSteps();
|
|
101
|
+
// `ctxExtras` lets a caller/test inject step-context collaborators (e.g. a
|
|
102
|
+
// fake credential validator or command runner) so an end-to-end run is
|
|
103
|
+
// hermetic; production passes none and steps use their real defaults.
|
|
104
|
+
const baseCtx = { selection: selectedIds, flags, io, env, backup, ...(deps.ctxExtras ?? {}) };
|
|
105
|
+
/** @type {import("./init/contracts.mjs").StepOutcome[]} */
|
|
106
|
+
const outcomes = [];
|
|
107
|
+
|
|
108
|
+
for (const step of steps) {
|
|
109
|
+
try {
|
|
110
|
+
if (step.scope === STEP_SCOPES.PER_AGENT) {
|
|
111
|
+
for (const agentId of selectedIds) {
|
|
112
|
+
const adapter = await getAdapter(agentId);
|
|
113
|
+
outcomes.push(await step.run({ ...baseCtx, agentId, adapter }));
|
|
114
|
+
}
|
|
115
|
+
} else {
|
|
116
|
+
outcomes.push(await step.run(baseCtx));
|
|
117
|
+
}
|
|
118
|
+
} catch (err) {
|
|
119
|
+
// A crashing step becomes a visible failed outcome, never a silent abort.
|
|
120
|
+
outcomes.push({
|
|
121
|
+
stepId: step.id,
|
|
122
|
+
action: OUTCOME_ACTIONS.FAILED,
|
|
123
|
+
detail: `step threw: ${err?.message ?? String(err)}`,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
summarize(outcomes.flat(), io, selectedIds);
|
|
129
|
+
return outcomes.flat().some(isFailureOutcome) ? 1 : 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** Print the per-outcome summary table. */
|
|
133
|
+
export function summarize(outcomes, io, selectedIds = []) {
|
|
134
|
+
io.log("");
|
|
135
|
+
io.log("[chorus agents add] Summary:");
|
|
136
|
+
if (outcomes.length === 0) {
|
|
137
|
+
io.log(" (no steps registered yet)");
|
|
138
|
+
}
|
|
139
|
+
for (const o of outcomes) {
|
|
140
|
+
const who = o.agentId ? `${o.agentId}` : o.stepId;
|
|
141
|
+
io.log(` - ${who}: ${o.action}${o.detail ? ` — ${o.detail}` : ""}`);
|
|
142
|
+
}
|
|
143
|
+
const failed = outcomes.filter(isFailureOutcome);
|
|
144
|
+
if (failed.length) {
|
|
145
|
+
io.log(`[chorus agents add] ${failed.length} step(s) failed — see above.`);
|
|
146
|
+
} else if (selectedIds.length) {
|
|
147
|
+
io.log("[chorus agents add] Done. Next: run the daemon / connect MCP to activate tools.");
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
profileExportHint(outcomes, io);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Print an optional `export CHORUS_AGENT_PROFILE=…` hint for every agent whose
|
|
155
|
+
* identity credential-seed captured. Setting it in an interactive shell lets that
|
|
156
|
+
* shell's Chorus hooks/skills act as a specific agent — the CLI resolves the key
|
|
157
|
+
* from ~/.chorus/daemon.json by profile, so the API key need not be exported for
|
|
158
|
+
* the wrapper/doc-mirror MCP path. It is OPTIONAL and ADDITIVE (Claude Code's
|
|
159
|
+
* built-in MCP client still reads CHORUS_URL/CHORUS_API_KEY from the env);
|
|
160
|
+
* daemon-woken sessions receive CHORUS_AGENT_PROFILE from the spawner automatically.
|
|
161
|
+
*
|
|
162
|
+
* EXCEPTIONS — dsh, Claude Code, and Codex: when credential-seed persisted the profile
|
|
163
|
+
* into `$DSH_HOME/.env` (outcome `profileInEnv: true`) dsh loads it into the session env
|
|
164
|
+
* on its own; when it wrote the full CHORUS_* env into `~/.claude/settings.json`
|
|
165
|
+
* (outcome `settingsEnvWritten: true`) Claude Code injects it at session start; and when
|
|
166
|
+
* it wrote the CHORUS_* env into `~/.codex/.env` (outcome `codexEnvWritten: true`) Codex
|
|
167
|
+
* loads it into its process env at startup, reaching both its plugin hooks and shell tool.
|
|
168
|
+
* Either way a manual export is redundant — that agent is omitted from the hint. Every other
|
|
169
|
+
* agent (Kiro, …) has no such file channel and still gets the hint.
|
|
170
|
+
* @param {import("./init/contracts.mjs").StepOutcome[]} outcomes
|
|
171
|
+
* @param {{ log: Function }} io
|
|
172
|
+
*/
|
|
173
|
+
export function profileExportHint(outcomes, io) {
|
|
174
|
+
const seen = new Set();
|
|
175
|
+
const profiles = [];
|
|
176
|
+
for (const o of outcomes) {
|
|
177
|
+
// dsh persists CHORUS_AGENT_PROFILE in $DSH_HOME/.env and loads it into the
|
|
178
|
+
// session env itself — no manual export needed, so skip it here. Claude Code
|
|
179
|
+
// likewise has its full CHORUS_* env written into ~/.claude/settings.json
|
|
180
|
+
// (settingsEnvWritten), and Codex into ~/.codex/.env (codexEnvWritten) — those sessions
|
|
181
|
+
// are fully wired, so skip them too.
|
|
182
|
+
if (o && (o.profileInEnv === true || o.settingsEnvWritten === true || o.codexEnvWritten === true)) continue;
|
|
183
|
+
if (o && typeof o.agentUuid === "string" && o.agentUuid && !seen.has(o.agentUuid)) {
|
|
184
|
+
seen.add(o.agentUuid);
|
|
185
|
+
profiles.push({ agentUuid: o.agentUuid, agentName: typeof o.agentName === "string" ? o.agentName : "" });
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (profiles.length === 0) return;
|
|
189
|
+
|
|
190
|
+
io.log("");
|
|
191
|
+
io.log("[chorus agents add] Optional — act as an agent in THIS shell without exporting its API key");
|
|
192
|
+
io.log(" (Chorus hooks/skills resolve the key from ~/.chorus/daemon.json by profile):");
|
|
193
|
+
for (const p of profiles) {
|
|
194
|
+
io.log(` export CHORUS_AGENT_PROFILE="${p.agentUuid}"${p.agentName ? ` # ${p.agentName}` : ""}`);
|
|
195
|
+
}
|
|
196
|
+
io.log(" One per shell — pick the identity it should act as; add it to ~/.bashrc / ~/.zshrc");
|
|
197
|
+
io.log(" to persist. Daemon-woken sessions set CHORUS_AGENT_PROFILE automatically.");
|
|
198
|
+
}
|
package/cli/kiro-spawner.mjs
CHANGED
|
@@ -280,6 +280,10 @@ export class KiroSpawner {
|
|
|
280
280
|
if (this.creds) {
|
|
281
281
|
if (this.creds.url) childEnv.CHORUS_URL = this.creds.url;
|
|
282
282
|
if (this.creds.apiKey) childEnv.CHORUS_API_KEY = this.creds.apiKey;
|
|
283
|
+
// Identity profile for the woken session — its hooks/skills pass this to
|
|
284
|
+
// `chorus mcp --agent`, which resolves the key from ~/.chorus/daemon.json.
|
|
285
|
+
if (this.creds.agentUuid || this.creds.agentName)
|
|
286
|
+
childEnv.CHORUS_AGENT_PROFILE = this.creds.agentUuid || this.creds.agentName;
|
|
283
287
|
}
|
|
284
288
|
|
|
285
289
|
// Snapshot the session store BEFORE the run so we can identify the sessionId
|