@chorus-aidlc/chorus 0.17.1 → 0.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +351 -351
- package/.next/standalone/.next/app-path-routes-manifest.json +36 -36
- package/.next/standalone/.next/build-manifest.json +5 -5
- package/.next/standalone/.next/prerender-manifest.json +36 -36
- 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 +2 -2
- 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_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.js +11 -9
- 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_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/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_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 +3 -3
- 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 +36 -36
- package/.next/standalone/.next/server/chunks/1318.js +1 -1
- package/.next/standalone/.next/server/chunks/1559.js +2 -2
- package/.next/standalone/.next/server/chunks/{5737.js → 2536.js} +6 -4
- package/.next/standalone/.next/server/chunks/2572.js +1 -1
- package/.next/standalone/.next/server/chunks/2953.js +1 -0
- package/.next/standalone/.next/server/chunks/2961.js +1 -1
- package/.next/standalone/.next/server/chunks/4827.js +1 -1
- package/.next/standalone/.next/server/chunks/5162.js +1 -0
- package/.next/standalone/.next/server/chunks/5245.js +1 -1
- package/.next/standalone/.next/server/chunks/{7822.js → 6080.js} +1 -1
- package/.next/standalone/.next/server/chunks/6113.js +1 -1
- package/.next/standalone/.next/server/chunks/6515.js +2 -2
- package/.next/standalone/.next/server/chunks/6689.js +1 -0
- 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/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/9667.js +1 -0
- package/.next/standalone/.next/server/chunks/9931.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/.next/server/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.32f7dedc4fd7e3e1.js → 11595.b81c0bf7732c3b62.js} +1 -1
- package/.next/standalone/.next/static/chunks/{26494-5a04e150431b0233.js → 24808-e3d95efc7ec039c5.js} +1 -1
- package/.next/standalone/.next/static/chunks/{31308-bb4a97b3f39c22dd.js → 31308-32614efb88305738.js} +1 -1
- package/.next/standalone/.next/static/chunks/{33456.87f86ce6041405e0.js → 33456.cfc9aa607a62e879.js} +1 -1
- package/.next/standalone/.next/static/chunks/{4860.9457e021394e9399.js → 4860.41351a823cf400e4.js} +1 -1
- package/.next/standalone/.next/static/chunks/51468-194d894e563580dd.js +1 -0
- package/.next/standalone/.next/static/chunks/61570-527701d072d00a24.js +1 -0
- package/.next/standalone/.next/static/chunks/65066-6da35d5cb080c7f5.js +1 -0
- package/.next/standalone/.next/static/chunks/72875-0987d09cd8406614.js +1 -0
- package/.next/standalone/.next/static/chunks/75936-79860953212592fd.js +1 -0
- package/.next/standalone/.next/static/chunks/79919-e02963faee5cb563.js +1 -0
- package/.next/standalone/.next/static/chunks/94643-e8f5fa25e2340cc8.js +1 -0
- package/.next/standalone/.next/static/chunks/{99373.aed267aa48c5bdd0.js → 99373.633f7c25e64bcdac.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-bb5ef11586301c72.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/{page-f4810f1b9f39d1ae.js → page-eecb38fa4b8eb4e8.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/{page-721d2152f1a28c88.js → page-725373108da1b08c.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-cd7ec77596304a07.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/{page-f31ad2eebe257628.js → page-97a9e6f949002004.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-7d2f4713697eb0a7.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-cec15f4b835d34fc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-0225f87552b977d9.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/{page-53ce4468844cc84f.js → page-4ee117e690fda56f.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/{page-1c374d19e8046d9a.js → page-7fbc46dfb7b22bd3.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/{page-31d6f8e82c7f5366.js → page-069c9738e516436b.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-8b30678a58e7b2ee.js +1 -0
- package/.next/standalone/.next/static/chunks/app/onboarding/{page-d082f9b60ad03057.js → page-4fce966dc96d4ff1.js} +1 -1
- package/.next/standalone/.next/static/chunks/{webpack-e2e0ef50652d5791.js → webpack-1bfc783412a06fc5.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 +1 -1
- package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +2 -2
- package/.next/standalone/public/chorus-plugin/skills/chorus-cli/SKILL.md +11 -1
- 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 +1 -1
- package/.next/standalone/public/chorus-plugin/skills/orchestrate/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +3 -3
- 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 +11 -1
- 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 +1 -1
- 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 +1 -1
- 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/.kiro/steering/chorus.md +1 -1
- package/.next/standalone/public/kiro-plugin/bin/chorus-api.sh +1 -1
- package/.next/standalone/public/skill/chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/develop-chorus/SKILL.md +1 -1
- package/.next/standalone/public/skill/yolo-chorus/SKILL.md +2 -2
- package/README.ja.md +2 -0
- package/README.ko.md +2 -0
- package/README.md +2 -0
- package/README.zh.md +2 -0
- package/cli/agent-backend-prompt.mjs +5 -0
- package/cli/agent-launcher.mjs +341 -0
- package/cli/agents.mjs +12 -0
- package/cli/credentials.mjs +102 -0
- package/cli/daemon-agent.mjs +4 -2
- package/cli/init/adapters.mjs +5 -5
- package/cli/init/agent-type-map.mjs +5 -5
- package/cli/init/install-methods.mjs +124 -10
- package/cli/init/pi-mcp-config.mjs +166 -0
- package/cli/init/steps/credential-seed.mjs +56 -3
- package/cli/pi-spawner.mjs +286 -0
- package/cli/spawner-select.mjs +7 -1
- package/cli/upload-hooks.mjs +25 -1
- package/package.json +1 -1
- package/.next/standalone/.next/server/chunks/1073.js +0 -1
- package/.next/standalone/.next/server/chunks/6487.js +0 -1
- package/.next/standalone/.next/server/chunks/7770.js +0 -1
- package/.next/standalone/.next/server/chunks/8586.js +0 -1
- package/.next/standalone/.next/static/chunks/11998-27dcf858173fc015.js +0 -1
- package/.next/standalone/.next/static/chunks/12070-426bb88f5179812b.js +0 -1
- package/.next/standalone/.next/static/chunks/17409-67dbc0a3f4cbc207.js +0 -1
- package/.next/standalone/.next/static/chunks/4166-85352630c29e2c2b.js +0 -1
- package/.next/standalone/.next/static/chunks/65807-086d83649f593a5a.js +0 -1
- package/.next/standalone/.next/static/chunks/79919-56796c262f51fa82.js +0 -1
- package/.next/standalone/.next/static/chunks/94643-87ee1ede6d955937.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-9219c4de1012f0fb.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-9bcff40805f39b25.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-a4fb04068539c4ce.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-b1d2af10e9bc7e09.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-2cb245b0602a3c85.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-32bff791b19a0a58.js +0 -1
- /package/.next/standalone/.next/static/{_s4RZW3efB1g0lrKgLiZ7 → WSN4XeA1kUCI6CeEHcaT_}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{_s4RZW3efB1g0lrKgLiZ7 → WSN4XeA1kUCI6CeEHcaT_}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
// cli/pi-spawner.mjs
|
|
2
|
+
// Cross-platform headless pi spawner — the `pi` counterpart to ClaudeSpawner /
|
|
3
|
+
// CodexSpawner, satisfying the SAME backend-agnostic Spawner.wake(...) contract so
|
|
4
|
+
// the daemon's wake pipeline (queue, waker, directed delivery, headless guard,
|
|
5
|
+
// reporters) stays backend-neutral and drives whichever spawner is injected purely
|
|
6
|
+
// through the shared wake(...) contract.
|
|
7
|
+
//
|
|
8
|
+
// Verified against the pi source (earendil-works/pi, packages/coding-agent) before
|
|
9
|
+
// coding — NOT guessed:
|
|
10
|
+
// • `pi --mode json -p` runs headless and emits a JSONL event stream on stdout
|
|
11
|
+
// (one JSON object per line): the session header first, then AgentSessionEvents
|
|
12
|
+
// (`message_start` / `message_update` / `message_end` / `tool_execution_*` /
|
|
13
|
+
// `turn_end` / `agent_end`). Verified against src/modes/print-mode.ts +
|
|
14
|
+
// src/modes/json-event.ts + docs/json.md.
|
|
15
|
+
// • The prompt is read from PIPED STDIN (never argv): main.ts `readPipedStdin()`
|
|
16
|
+
// folds stdin into the initial message when stdin is not a TTY. We pipe the
|
|
17
|
+
// prompt and close stdin, exactly like the Claude/Codex spawners.
|
|
18
|
+
// • SESSION MODEL — client-owned id (like Claude, unlike Codex). pi accepts a
|
|
19
|
+
// caller-provided `--session-id <id>` which is IDEMPOTENT create-or-resume:
|
|
20
|
+
// main.ts createSessionManager() resumes the existing session when one with
|
|
21
|
+
// that exact id already exists in the cwd-scoped session dir, otherwise creates
|
|
22
|
+
// a fresh session WITH that id. (`--session <id>` is the resume-ONLY flag — it
|
|
23
|
+
// hard-errors when the session is absent — so it is the wrong choice for a wake
|
|
24
|
+
// that must create-if-missing.) So we pass `--session-id <anchor>` for BOTH the
|
|
25
|
+
// first wake and every resume; pi owns the new-vs-resume decision from its own
|
|
26
|
+
// on-disk state. No persisted anchor→id map is needed (that is only for Codex,
|
|
27
|
+
// which generates its own id). We NEVER pass `--no-session` (that flag is for
|
|
28
|
+
// ephemeral subagent children only).
|
|
29
|
+
// • pi has NO permission system (no sandbox / no tool-approval prompt in headless
|
|
30
|
+
// mode), so `permissionMode` is a NO-OP: we emit no sandbox / skip-permissions
|
|
31
|
+
// flag. `chorus` and `yolo` modes run identically.
|
|
32
|
+
// • pi has no native MCP: a woken pi reaches Chorus tools only via the chorus-pi
|
|
33
|
+
// extension / pi-mcp-adapter installed in the woken environment. This spawner
|
|
34
|
+
// does not inject MCP; it exports the daemon's creds into the child env, which
|
|
35
|
+
// the extension consumes (CHORUS_URL / CHORUS_API_KEY / CHORUS_AGENT_PROFILE).
|
|
36
|
+
//
|
|
37
|
+
// Reuses claude-spawner's platform-neutral NDJSON parser (parseNdjsonChunk) and the
|
|
38
|
+
// PATH-walk / .cmd-shim shape of the other spawners' path resolution.
|
|
39
|
+
|
|
40
|
+
import { spawn } from "node:child_process";
|
|
41
|
+
import { statSync } from "node:fs";
|
|
42
|
+
import { win32 as pathWin32, posix as pathPosix } from "node:path";
|
|
43
|
+
import { parseNdjsonChunk } from "./claude-spawner.mjs";
|
|
44
|
+
|
|
45
|
+
const NOOP_LOGGER = { info() {}, warn() {}, error() {} };
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Build the argv for a headless pi run. The prompt is NEVER here — it goes over
|
|
49
|
+
* stdin (`pi -p` folds piped stdin into the initial message).
|
|
50
|
+
*
|
|
51
|
+
* `--session-id <anchor>` is pi's idempotent create-or-resume flag (verified against
|
|
52
|
+
* pi main.ts createSessionManager): it resumes the session with that exact id if one
|
|
53
|
+
* exists in the cwd-scoped dir, else creates a new session with that id — so the SAME
|
|
54
|
+
* args serve both the first wake and every resume, and pi owns the decision. `-p` is
|
|
55
|
+
* placed LAST so pi's arg parser can never mistake a following token for a message
|
|
56
|
+
* positional (its `-p` handler slurps the next bare, non-flag arg as a message).
|
|
57
|
+
*
|
|
58
|
+
* @param {{ sessionId: string }} o
|
|
59
|
+
* @returns {string[]}
|
|
60
|
+
*/
|
|
61
|
+
export function buildPiArgs({ sessionId }) {
|
|
62
|
+
return ["--mode", "json", "--session-id", sessionId, "-p"];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Resolve the real `pi` executable WITHOUT a shell — same approach as
|
|
67
|
+
* resolveClaudePath / resolveCodexPath. On Windows the bin may be `pi.cmd` (npm
|
|
68
|
+
* shim), which `spawn` can't exec directly without shell:true; we walk PATH for the
|
|
69
|
+
* platform candidates. `CHORUS_PI_PATH` overrides.
|
|
70
|
+
* @param {{ env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, isFile?: (p: string) => boolean }} [deps]
|
|
71
|
+
* @returns {string | null}
|
|
72
|
+
*/
|
|
73
|
+
export function resolvePiPath(deps = {}) {
|
|
74
|
+
const env = deps.env ?? process.env;
|
|
75
|
+
const platform = deps.platform ?? process.platform;
|
|
76
|
+
const isFile =
|
|
77
|
+
deps.isFile ??
|
|
78
|
+
((p) => {
|
|
79
|
+
try {
|
|
80
|
+
return statSync(p).isFile();
|
|
81
|
+
} catch {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
if (env.CHORUS_PI_PATH && isFile(env.CHORUS_PI_PATH)) {
|
|
87
|
+
return env.CHORUS_PI_PATH;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const isWin = platform === "win32";
|
|
91
|
+
const p = isWin ? pathWin32 : pathPosix;
|
|
92
|
+
const names = isWin ? ["pi.cmd", "pi.exe", "pi"] : ["pi"];
|
|
93
|
+
const pathVar = env.PATH || env.Path || "";
|
|
94
|
+
const dirs = pathVar.split(p.delimiter).filter(Boolean);
|
|
95
|
+
for (const dir of dirs) {
|
|
96
|
+
for (const name of names) {
|
|
97
|
+
const candidate = p.join(dir, name);
|
|
98
|
+
if (isFile(candidate)) return candidate;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Resolve the actual command + argv to spawn. On Windows a `.cmd`/`.bat` shim is
|
|
106
|
+
* not a PE executable, so it must run via `cmd.exe /d /s /c <path> ...args`; we keep
|
|
107
|
+
* shell:false and pass argv as an array (no shell word-splitting/injection).
|
|
108
|
+
* @param {string} piPath @param {string[]} args
|
|
109
|
+
* @param {NodeJS.Platform} [platform] @param {NodeJS.ProcessEnv} [env]
|
|
110
|
+
* @returns {{ command: string, argv: string[] }}
|
|
111
|
+
*/
|
|
112
|
+
export function resolveSpawnCommand(piPath, args, platform = process.platform, env = process.env) {
|
|
113
|
+
const isWin = platform === "win32";
|
|
114
|
+
const lower = piPath.toLowerCase();
|
|
115
|
+
if (isWin && (lower.endsWith(".cmd") || lower.endsWith(".bat"))) {
|
|
116
|
+
const comspec = env.ComSpec || env.COMSPEC || "cmd.exe";
|
|
117
|
+
return { command: comspec, argv: ["/d", "/s", "/c", piPath, ...args] };
|
|
118
|
+
}
|
|
119
|
+
return { command: piPath, argv: args };
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @typedef {Object} PiSpawnerOptions
|
|
124
|
+
* @property {string} [piPath] Resolved pi path (resolved lazily if omitted).
|
|
125
|
+
* @property {(o: object) => any} [spawnImpl] Injectable spawn (tests).
|
|
126
|
+
* @property {{info(m:string):void,warn(m:string):void,error(m:string):void}} [logger]
|
|
127
|
+
* @property {"chorus"|"yolo"} [permissionMode] Accepted for a uniform selectSpawner
|
|
128
|
+
* call, but a NO-OP: pi has no permission system, so no flag is emitted either way.
|
|
129
|
+
* @property {{ url: string, apiKey: string, agentUuid?: string, agentName?: string }} [creds]
|
|
130
|
+
* Daemon creds exported into the child env for the chorus-pi extension's MCP-over-HTTP
|
|
131
|
+
* tooling and SessionStart bookkeeping.
|
|
132
|
+
* @property {NodeJS.Platform} [platform] Injectable for tests; gates POSIX `detached`.
|
|
133
|
+
* @property {(deps?: object) => (string|null)} [resolvePiPathFn] Injectable resolver.
|
|
134
|
+
*/
|
|
135
|
+
|
|
136
|
+
export class PiSpawner {
|
|
137
|
+
/** @param {PiSpawnerOptions} [opts] */
|
|
138
|
+
constructor(opts = {}) {
|
|
139
|
+
// pi manages new-vs-resume internally from its own on-disk session state (the
|
|
140
|
+
// `--session-id` anchor is idempotent create-or-resume), so the daemon's shared
|
|
141
|
+
// Claude transcript probe is NOT authoritative for pi. Setting this false makes
|
|
142
|
+
// the waker skip the Claude-specific "take over with `claude --resume`" log line
|
|
143
|
+
// (mirrors CodexSpawner) — pi is not resumable via `claude --resume`.
|
|
144
|
+
this.sessionDecision = { probeIsAuthoritative: false };
|
|
145
|
+
this.piPath = opts.piPath ?? null;
|
|
146
|
+
this.spawnImpl = opts.spawnImpl ?? spawn;
|
|
147
|
+
this.logger = opts.logger ?? NOOP_LOGGER;
|
|
148
|
+
// Stored for a uniform construction shape, but never consulted when building
|
|
149
|
+
// args — pi has no permission surface, so no sandbox / skip-permissions flag.
|
|
150
|
+
this.permissionMode = opts.permissionMode ?? "chorus";
|
|
151
|
+
this.creds = opts.creds ?? null;
|
|
152
|
+
this.platform = opts.platform ?? process.platform;
|
|
153
|
+
this.resolvePiPathFn = opts.resolvePiPathFn ?? resolvePiPath;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Spawn a headless pi run. Resolves when the subprocess exits. The prompt is
|
|
158
|
+
* written to stdin (never argv). `sessionId` is the Chorus anchor (direct idea
|
|
159
|
+
* uuid, or the entity uuid for an ad-hoc session) and is passed straight through as
|
|
160
|
+
* pi's client-owned `--session-id`, which pi resolves as create-or-resume from its
|
|
161
|
+
* own on-disk session dir — so the passed `isNew` (derived by the waker's
|
|
162
|
+
* Claude-specific transcript probe, which never matches a pi session) does NOT
|
|
163
|
+
* drive the flag; it is only echoed back for the waker's log line.
|
|
164
|
+
*
|
|
165
|
+
* @param {{ prompt: string, sessionId: string|null, isNew?: boolean, cwd?: string,
|
|
166
|
+
* onMessage?: (obj: any) => void,
|
|
167
|
+
* onChild?: (child: import("node:child_process").ChildProcess) => void }} params
|
|
168
|
+
* @returns {Promise<{ sessionId: string, backendSessionId: string|null, exitCode: number|null, isNew: boolean }>}
|
|
169
|
+
* `backendSessionId` is the resumable anchor (the input `sessionId`) after a spawn,
|
|
170
|
+
* so the conversation UI can offer a resumable id — mirrors the other spawners.
|
|
171
|
+
* `null` on the pre-spawn failure paths (no run started, nothing to resume).
|
|
172
|
+
*/
|
|
173
|
+
async wake({ prompt, sessionId, isNew, cwd, onMessage, onChild }) {
|
|
174
|
+
const anchor = typeof sessionId === "string" ? sessionId : "";
|
|
175
|
+
const isNewFlag = Boolean(isNew);
|
|
176
|
+
|
|
177
|
+
const piPath = this.piPath ?? this.resolvePiPathFn();
|
|
178
|
+
if (!piPath) {
|
|
179
|
+
// No crash — surface visibly and resolve with a failure result (matches the
|
|
180
|
+
// other spawners' "skipping wake" convention: exitCode null, no throw).
|
|
181
|
+
this.logger.error("[Chorus] cannot locate the `pi` executable on PATH; skipping wake");
|
|
182
|
+
return { sessionId: anchor, backendSessionId: null, exitCode: null, isNew: isNewFlag };
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const args = buildPiArgs({ sessionId: anchor });
|
|
186
|
+
const { command, argv } = resolveSpawnCommand(piPath, args, this.platform);
|
|
187
|
+
|
|
188
|
+
// POSIX: detached process group so the interrupt path can group-kill the tree
|
|
189
|
+
// (pi may fork child shells / subagents). Windows uses taskkill /T. stdio stays
|
|
190
|
+
// piped — prompt over stdin + NDJSON stdout parse are unaffected.
|
|
191
|
+
const detached = this.platform !== "win32";
|
|
192
|
+
|
|
193
|
+
// Export the daemon's resolved connection pair for the chorus-pi extension's
|
|
194
|
+
// Chorus tooling. Explicitly overwrite inherited values so the extension and the
|
|
195
|
+
// daemon cannot disagree about which Chorus instance this wake belongs to.
|
|
196
|
+
const childEnv = { ...process.env, CHORUS_DAEMON_HEADLESS: "1" };
|
|
197
|
+
if (this.creds) {
|
|
198
|
+
if (this.creds.url) childEnv.CHORUS_URL = this.creds.url;
|
|
199
|
+
if (this.creds.apiKey) childEnv.CHORUS_API_KEY = this.creds.apiKey;
|
|
200
|
+
// Identity profile for the woken session — its extension/skills pass this to
|
|
201
|
+
// `chorus mcp --agent`, which resolves the key from ~/.chorus/daemon.json.
|
|
202
|
+
if (this.creds.agentUuid || this.creds.agentName)
|
|
203
|
+
childEnv.CHORUS_AGENT_PROFILE = this.creds.agentUuid || this.creds.agentName;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
return new Promise((resolve) => {
|
|
207
|
+
let child;
|
|
208
|
+
try {
|
|
209
|
+
child = this.spawnImpl(command, argv, {
|
|
210
|
+
cwd: cwd ?? process.cwd(),
|
|
211
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
212
|
+
env: childEnv,
|
|
213
|
+
shell: false,
|
|
214
|
+
detached,
|
|
215
|
+
windowsHide: true,
|
|
216
|
+
});
|
|
217
|
+
} catch (err) {
|
|
218
|
+
this.logger.error(`[Chorus] failed to spawn pi: ${err}`);
|
|
219
|
+
resolve({ sessionId: anchor, backendSessionId: null, exitCode: null, isNew: isNewFlag });
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// Hand the live child to the caller (interrupt registry) before resolving.
|
|
224
|
+
// Never let a throwing callback escape into the spawn path.
|
|
225
|
+
if (onChild) {
|
|
226
|
+
try {
|
|
227
|
+
onChild(child);
|
|
228
|
+
} catch (err) {
|
|
229
|
+
this.logger.warn(`[Chorus] onChild handler threw: ${err}`);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
let stdoutBuf = "";
|
|
234
|
+
|
|
235
|
+
child.stdout?.setEncoding?.("utf8");
|
|
236
|
+
child.stdout?.on("data", (chunk) => {
|
|
237
|
+
stdoutBuf = parseNdjsonChunk(
|
|
238
|
+
stdoutBuf,
|
|
239
|
+
String(chunk),
|
|
240
|
+
(obj) => {
|
|
241
|
+
if (onMessage) {
|
|
242
|
+
try {
|
|
243
|
+
onMessage(obj);
|
|
244
|
+
} catch (err) {
|
|
245
|
+
this.logger.warn(`[Chorus] onMessage handler threw: ${err}`);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
(msg) => this.logger.warn(`[Chorus] ${msg}`)
|
|
250
|
+
);
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
child.stderr?.setEncoding?.("utf8");
|
|
254
|
+
child.stderr?.on("data", (chunk) => {
|
|
255
|
+
const text = String(chunk).trim();
|
|
256
|
+
if (text) this.logger.warn(`[Chorus] pi stderr: ${text}`);
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
child.on("error", (err) => {
|
|
260
|
+
this.logger.error(`[Chorus] pi process error: ${err}`);
|
|
261
|
+
resolve({ sessionId: anchor, backendSessionId: anchor || null, exitCode: null, isNew: isNewFlag });
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
child.on("close", (code) => {
|
|
265
|
+
if (code !== 0) {
|
|
266
|
+
this.logger.warn(`[Chorus] pi exited with code ${code}`);
|
|
267
|
+
}
|
|
268
|
+
resolve({ sessionId: anchor, backendSessionId: anchor || null, exitCode: code, isNew: isNewFlag });
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
// Guard against an ASYNC stdin error (EPIPE) so it never becomes an
|
|
272
|
+
// uncaughtException that kills the daemon.
|
|
273
|
+
child.stdin?.on?.("error", (err) => {
|
|
274
|
+
this.logger.warn(`[Chorus] pi stdin error (ignored): ${err}`);
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
// Feed the prompt over stdin, then close it so the model runs.
|
|
278
|
+
try {
|
|
279
|
+
child.stdin?.write(prompt);
|
|
280
|
+
child.stdin?.end();
|
|
281
|
+
} catch (err) {
|
|
282
|
+
this.logger.warn(`[Chorus] failed writing prompt to pi stdin: ${err}`);
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
}
|
package/cli/spawner-select.mjs
CHANGED
|
@@ -20,6 +20,7 @@ import { ClaudeSpawner } from "./claude-spawner.mjs";
|
|
|
20
20
|
import { CodexSpawner } from "./codex-spawner.mjs";
|
|
21
21
|
import { DshSpawner } from "./dsh-spawner.mjs";
|
|
22
22
|
import { KiroSpawner } from "./kiro-spawner.mjs";
|
|
23
|
+
import { PiSpawner } from "./pi-spawner.mjs";
|
|
23
24
|
|
|
24
25
|
/**
|
|
25
26
|
* A fail-closed spawner for the `offline` agentType. It satisfies the shared
|
|
@@ -52,7 +53,7 @@ export class OfflineSpawner {
|
|
|
52
53
|
|
|
53
54
|
/**
|
|
54
55
|
* Construct the spawner backend for `agentType`.
|
|
55
|
-
* @param {string} agentType "claude-code" | "codex" | "kiro" | "dsh" | "offline"
|
|
56
|
+
* @param {string} agentType "claude-code" | "codex" | "kiro" | "dsh" | "pi" | "offline"
|
|
56
57
|
* (already validated upstream). "offline" → OfflineSpawner (fail-closed no-op).
|
|
57
58
|
* @param {{ logger?: any, permissionMode?: "chorus"|"yolo", creds?: { url: string, apiKey: string } }} [opts]
|
|
58
59
|
* @returns {import("./codex-spawner.mjs").Spawner}
|
|
@@ -79,5 +80,10 @@ export function selectSpawner(agentType, opts = {}) {
|
|
|
79
80
|
prepareManagedConfigFn: opts.prepareManagedConfigFn,
|
|
80
81
|
});
|
|
81
82
|
}
|
|
83
|
+
if (agentType === "pi") {
|
|
84
|
+
// pi is a first-class wakeable backend — an explicit branch so it NEVER falls
|
|
85
|
+
// through to the claude-code default below (nor is treated as offline).
|
|
86
|
+
return new PiSpawner({ logger, permissionMode, creds });
|
|
87
|
+
}
|
|
82
88
|
return new ClaudeSpawner({ logger, permissionMode, creds });
|
|
83
89
|
}
|
package/cli/upload-hooks.mjs
CHANGED
|
@@ -399,15 +399,26 @@ function stripSystemReminders(s) {
|
|
|
399
399
|
* the caller can skip it). Never throws — a shape it doesn't recognize yields null
|
|
400
400
|
* rather than an error (defensive against CLI drift).
|
|
401
401
|
*
|
|
402
|
-
*
|
|
402
|
+
* Four stream dialects are recognized (their top-level shapes are disjoint, so no
|
|
403
403
|
* backend flag is needed):
|
|
404
404
|
* - Claude Code stream-json: `{ type: "user"|"assistant", message: { content … } }`.
|
|
405
|
+
* - DeepSeek Harness (dsh): `{ type: "user/message"|"assistant/message", data: { message } }`.
|
|
405
406
|
* - codex `codex exec --json`: conversation/tool output rides on `item.completed`
|
|
406
407
|
* events discriminated by `item.type`; assistant text is an `agent_message`
|
|
407
408
|
* item with a top-level `item.text` (verified against codex-cli 0.142.3). codex
|
|
408
409
|
* does NOT echo the user prompt (the chat UI renders that from the turn's
|
|
409
410
|
* promptText), and `reasoning` / `command_execution` / lifecycle envelopes are
|
|
410
411
|
* not conversation text — all dropped.
|
|
412
|
+
* - pi (@earendil-works/pi-coding-agent) `pi --mode json`: AgentSessionEvents whose
|
|
413
|
+
* authoritative final text is a `message_end` carrying a full AgentMessage
|
|
414
|
+
* (`{ role, content }`). We keep ONLY the assistant message: pi UNCONDITIONALLY
|
|
415
|
+
* re-emits the wake prompt as a `message_end` with role "user" (agent-loop.ts),
|
|
416
|
+
* which the daemon already stores as the turn's promptText — so echoing it would
|
|
417
|
+
* duplicate the prompt (same reason codex drops the user echo). `toolResult`
|
|
418
|
+
* messages and `tool_execution_end` tool-output events are not conversation text.
|
|
419
|
+
* pi's content-block shape is identical to Claude's (text blocks `{type:"text",text}`,
|
|
420
|
+
* thinking `{type:"thinking"}`, tool calls `{type:"toolCall"}`), so we normalize the
|
|
421
|
+
* assistant envelope to the Claude shape and reuse the same block extractor.
|
|
411
422
|
*
|
|
412
423
|
* @param {any} obj One parsed stream NDJSON object.
|
|
413
424
|
* @returns {{ role: "user"|"assistant", text: string } | null}
|
|
@@ -438,6 +449,19 @@ export function extractTranscriptText(obj) {
|
|
|
438
449
|
return { role: "assistant", text: itemText };
|
|
439
450
|
}
|
|
440
451
|
|
|
452
|
+
// ── pi `pi --mode json` dialect ──
|
|
453
|
+
// pi's authoritative final text of each step is a `message_end` carrying a full
|
|
454
|
+
// AgentMessage `{ role, content }`. Keep ONLY the assistant message: pi re-emits the
|
|
455
|
+
// wake prompt as a role:"user" message_end (already stored as the turn's promptText),
|
|
456
|
+
// and role:"toolResult" / `tool_execution_end` events are tool output, not text.
|
|
457
|
+
// pi's content-block shape matches Claude's, so we hand the message to the Claude-shape
|
|
458
|
+
// extractor below (which keeps only `{type:"text"}` blocks, strips reminders, drops empties).
|
|
459
|
+
if (obj.type === "message_end") {
|
|
460
|
+
const message = obj.message;
|
|
461
|
+
if (!message || typeof message !== "object" || message.role !== "assistant") return null;
|
|
462
|
+
return extractTranscriptText({ type: "assistant", message });
|
|
463
|
+
}
|
|
464
|
+
|
|
441
465
|
// ── Claude Code stream-json dialect ──
|
|
442
466
|
if (!CONVERSATION_TYPES.has(obj.type)) return null;
|
|
443
467
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chorus-aidlc/chorus",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.2",
|
|
4
4
|
"description": "The Agent Harness for AI-Human Collaboration — session lifecycle, task state, sub-agent orchestration, observability, and failure recovery",
|
|
5
5
|
"homepage": "https://github.com/Chorus-AIDLC/Chorus",
|
|
6
6
|
"repository": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=1073,exports.ids=[1073],exports.modules={644:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},7813:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(42377);let e=(0,d.createServerReference)("400587c9940eca6c3f556a2f39602f7df6314802c3",d.callServer,void 0,d.findSourceMapURL,"createTaskAction")},15724:(a,b,c)=>{c.d(b,{f:()=>e});var d=c(42377);let e=(0,d.createServerReference)("404550416550b7046aa61a682c1fe9c86f6ada793f",d.callServer,void 0,d.findSourceMapURL,"getTaskActivitiesAction")},21326:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},22293:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{TK:()=>l,kq:()=>m,wG:()=>k,xo:()=>j});var e=c(2613);c(50785);var f=c(9259),g=c(50530),h=c(12217),i=a([f,g]);async function j(a){let b=await (0,f.d)();if(!b)return{dependsOn:[],dependedBy:[]};try{return await g.vQ(b.companyUuid,a)}catch{return{dependsOn:[],dependedBy:[]}}}async function k(a,b){let c=await (0,f.d)();if(!c)return{success:!1,error:"Unauthorized"};try{return await g.QL(c.companyUuid,a,b),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Unknown error"}}}async function l(a,b){let c=await (0,f.d)();if(!c)return{success:!1,error:"Unauthorized"};try{return await g.j9(c.companyUuid,a,b),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Unknown error"}}}async function m(a){let b=await (0,f.d)();if(!b)return{tasks:[]};try{return{tasks:(await g.Vk({companyUuid:b.companyUuid,projectUuid:a,skip:0,take:1e3})).tasks.map(a=>({uuid:a.uuid,title:a.title,status:a.status}))}}catch{return{tasks:[]}}}[f,g]=i.then?(await i)():i,(0,h.D)([j,k,l,m]),(0,e.A)(j,"40056dfb171e85cfe2921edfb8421ed3d93fa214a2",null),(0,e.A)(k,"60c7af1e4361765b5dcf2c74d62389f115c31550a2",null),(0,e.A)(l,"607a6bdd500ae5af65778c7b3459aa99b4193b39df",null),(0,e.A)(m,"400ff4cf087940dcefd447269924b6361d9709f6e0",null),d()}catch(a){d(a)}})},24540:(a,b,c)=>{c.d(b,{T:()=>e});var d=c(42377);let e=(0,d.createServerReference)("607a6bdd500ae5af65778c7b3459aa99b4193b39df",d.callServer,void 0,d.findSourceMapURL,"removeTaskDependencyAction")},30758:(a,b,c)=>{c.d(b,{b:()=>e});var d=c(42377);let e=(0,d.createServerReference)("60f7da766c6cab45b79b47a524e80659e2b958d7c2",d.callServer,void 0,d.findSourceMapURL,"updateTaskStatusAction")},37584:(a,b,c)=>{c.d(b,{h:()=>e});var d=c(42377);let e=(0,d.createServerReference)("60bce5308d86774d8d9c512c08e617dc42c6725e78",d.callServer,void 0,d.findSourceMapURL,"markCriteriaAction")},41818:(a,b,c)=>{c.d(b,{F:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40d434954fc705edbce0e1042ce308502ba2157fa0",d.callServer,void 0,d.findSourceMapURL,"getTaskSourceAction")},52621:(a,b,c)=>{c.d(b,{Y:()=>e});var d=c(42377);let e=(0,d.createServerReference)("409d64d0d10b20b84f6a0fe879c86f8b145fb45231",d.callServer,void 0,d.findSourceMapURL,"updateTaskFieldsAction")},57413:(a,b,c)=>{c.d(b,{w:()=>e});var d=c(42377);let e=(0,d.createServerReference)("60c7af1e4361765b5dcf2c74d62389f115c31550a2",d.callServer,void 0,d.findSourceMapURL,"addTaskDependencyAction")},59179:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]])},60265:(a,b,c)=>{c.d(b,{_u:()=>x,c_:()=>r,nF:()=>w,qK:()=>u});var d=c(10837),e=c(21968),f=c(47797),g=c(92460);c(63410);var h=c(24346),i=c.n(h),j=c(9222),k=c(49599),l=c(74798);let m={open:"bg-[#FFF3E0] dark:bg-[#3a2a12] text-[#E65100] dark:text-[#F0A050]",assigned:"bg-[#E3F2FD] dark:bg-[#13253a] text-[#1976D2] dark:text-[#5AA9F0]",in_progress:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#5A9E6F] dark:text-[#6FD19A]",to_verify:"bg-[#F3E5F5] dark:bg-[#281630] text-[#7B1FA2] dark:text-[#C98FE0]",done:"bg-[#E0F2F1] dark:bg-[#12292a] text-[#00796B] dark:text-[#4FD1C0]",closed:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground"},n={open:"#E65100",assigned:"#1976D2",in_progress:"#5A9E6F",to_verify:"#7B1FA2",done:"#00796B",closed:"#9A9A9A"},o={low:"priority.low",medium:"priority.medium",high:"priority.high",critical:"priority.critical"},p={open:"status.open",assigned:"status.assigned",in_progress:"status.inProgress",to_verify:"status.toVerify",done:"status.done",closed:"status.closed"},q={low:"bg-[#9A9A9A]",medium:"bg-[#E65100]",high:"bg-[#D32F2F]",critical:"bg-[#B71C1C]"},r={taskNode:function({data:a}){let b=(0,j.c)();return(0,d.jsxs)("div",{className:"rounded-lg border-2 border-[#E5E2DC] dark:border-[#2a2a2e] bg-card px-4 py-3 shadow-sm min-w-[200px] max-w-[260px] cursor-pointer hover:border-primary transition-colors",children:[(0,d.jsx)(f.h7,{type:"target",position:g.yX.Top,className:"!bg-primary !w-2 !h-2"}),(0,d.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,d.jsx)(k.E,{className:`text-[10px] ${m[a.status]||""}`,children:b(p[a.status]||a.status)}),(0,d.jsxs)("div",{className:"flex items-center gap-1",children:[(0,d.jsx)("div",{className:`h-1.5 w-1.5 rounded-full ${q[a.priority]||""}`}),(0,d.jsx)("span",{className:"text-[10px] text-muted-foreground",children:b(o[a.priority]||a.priority)})]})]}),(0,d.jsx)("p",{className:"text-xs font-medium text-foreground leading-snug line-clamp-2",children:a.title}),(0,d.jsx)(f.h7,{type:"source",position:g.yX.Bottom,className:"!bg-primary !w-2 !h-2"})]})}},s={taskNode:function({data:a}){let b=n[a.status]||"#E5E0D8";return(0,d.jsxs)("div",{className:"rounded-md border-[1.5px] bg-card px-2.5 py-1.5 shadow-sm",style:{borderColor:b,width:t},children:[(0,d.jsx)(f.h7,{type:"target",position:g.yX.Top,className:"!bg-primary !w-1.5 !h-1.5"}),(0,d.jsx)("p",{className:"text-[10px] font-medium text-foreground leading-tight line-clamp-2",children:a.title}),(0,d.jsx)(f.h7,{type:"source",position:g.yX.Bottom,className:"!bg-primary !w-1.5 !h-1.5"})]})}},t=150,u={animated:!0,style:{stroke:"#C67A52",strokeWidth:2},markerEnd:{type:"arrowclosed",color:"#C67A52"}},v={animated:!0,style:{stroke:"#C67A52",strokeWidth:1.5},markerEnd:{type:"arrowclosed",color:"#C67A52"}};function w(a,b,c){let d=c?.nodeWidth??240,e=c?.nodeHeight??80,f=new(i()).graphlib.Graph;return f.setDefaultEdgeLabel(()=>({})),f.setGraph({rankdir:"TB",nodesep:c?.nodesep??50,ranksep:c?.ranksep??80}),a.forEach(a=>{f.setNode(a.id,{width:d,height:e})}),b.forEach(a=>{f.setEdge(a.source,a.target)}),i().layout(f),{nodes:a.map(a=>{let b=f.node(a.id);return{...a,position:{x:b.x-d/2,y:b.y-e/2}}}),edges:b}}function x({tasks:a,edges:b,readonly:c=!1,compact:g=!1,height:h,onNodeClick:i,className:k}){let m=(0,j.c)(),n=(0,l.W)(),{layoutedNodes:o,layoutedEdges:p}=(0,e.useMemo)(()=>{let c=a.map(a=>({id:a.uuid,type:"taskNode",position:{x:0,y:0},data:{title:a.title,status:a.status,priority:a.priority,proposalUuid:a.proposalUuid??null}})),d=w(c,b.map((a,b)=>({id:`e-${b}`,source:a.to,target:a.from,...g?v:u})),g?{nodeWidth:t,nodeHeight:50,nodesep:20,ranksep:40}:void 0);return{layoutedNodes:d.nodes,layoutedEdges:d.edges}},[a,b,g]);return 0===a.length?(0,d.jsx)("div",{className:`flex items-center justify-center text-sm text-muted-foreground ${k||""}`,style:h?{height:h}:void 0,children:m("tasks.noTasksToDisplay")}):(0,d.jsx)("div",{className:`rounded-[10px] border border-border bg-[#F7F6F3] dark:bg-[#1e1d1b] ${k||""}`,style:h?{height:h}:void 0,children:(0,d.jsxs)(f.Gc,{colorMode:n?"dark":"light",nodes:o,edges:p,nodeTypes:g?s:r,onNodeClick:i?(a,b)=>i(b.id):void 0,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:1.5,proOptions:{hideAttribution:!0},nodesDraggable:!c,nodesConnectable:!c,elementsSelectable:!c,panOnDrag:!0,zoomOnScroll:!0,children:[(0,d.jsx)(f.VS,{color:n?"#40392f":"#E5E0D8",gap:20}),!c&&(0,d.jsx)(f.H2,{className:"[&>button]:border-border [&>button]:bg-card [&>button]:text-foreground [&>button:hover]:bg-background"})]})})}},64029:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{f:()=>l});var e=c(2613);c(50785);var f=c(9259),g=c(67738),h=c(50530),i=c(97307),j=c(12217),k=a([f,g,h]);async function l(a){let b=await (0,f.d)();if(!b)return{activities:[],total:0};try{let c=await (0,h.K4)(b.companyUuid,a);if(!c)return{activities:[],total:0};return await (0,g.listActivitiesWithActorNames)({companyUuid:b.companyUuid,projectUuid:c.projectUuid,targetType:"task",targetUuid:a,skip:0,take:50})}catch(a){return i.default.error({err:a},"Failed to get task activities"),{activities:[],total:0}}}[f,g,h]=k.then?(await k)():k,(0,j.D)([l]),(0,e.A)(l,"404550416550b7046aa61a682c1fe9c86f6ada793f",null),d()}catch(a){d(a)}})},71353:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{IY:()=>n,Nq:()=>m,hD:()=>l});var e=c(2613);c(50785);var f=c(5562),g=c(9259),h=c(50530),i=c(97307),j=c(12217),k=a([g,h]);async function l(a,b){let c=await (0,g.d)();if(!c)return{success:!1,error:"Unauthorized"};if("user"!==c.type&&"super_admin"!==c.type)return{success:!1,error:"Only users can verify acceptance criteria"};try{let d=await (0,h.K4)(c.companyUuid,a);if(!d)return{success:!1,error:"Task not found"};let e=await (0,h._T)(c.companyUuid,a,b,{type:c.type,actorUuid:c.actorUuid});return(0,f.revalidatePath)(`/projects/${d.projectUuid}/tasks/${a}`),(0,f.revalidatePath)(`/projects/${d.projectUuid}/tasks`),{success:!0,data:e}}catch(a){return i.default.error({err:a},"Failed to mark acceptance criteria"),{success:!1,error:"Failed to mark acceptance criteria"}}}async function m(a,b){let c=await (0,g.d)();if(!c)return{success:!1,error:"Unauthorized"};if("user"!==c.type&&"super_admin"!==c.type)return{success:!1,error:"Only users can reset acceptance criteria"};try{let d=await (0,h.K4)(c.companyUuid,a);if(!d)return{success:!1,error:"Task not found"};return await (0,h.Qi)(c.companyUuid,a,b),(0,f.revalidatePath)(`/projects/${d.projectUuid}/tasks/${a}`),(0,f.revalidatePath)(`/projects/${d.projectUuid}/tasks`),{success:!0}}catch(a){return i.default.error({err:a},"Failed to reset acceptance criterion"),{success:!1,error:"Failed to reset acceptance criterion"}}}async function n(a,b){let c=await (0,g.d)();if(!c)return{success:!1,error:"Unauthorized"};try{let d=await (0,h.K4)(c.companyUuid,a);if(!d)return{success:!1,error:"Task not found"};let e=await (0,h.cn)(c.companyUuid,a,b,{type:c.type,actorUuid:c.actorUuid});return(0,f.revalidatePath)(`/projects/${d.projectUuid}/tasks/${a}`),(0,f.revalidatePath)(`/projects/${d.projectUuid}/tasks`),{success:!0,data:e}}catch(a){return i.default.error({err:a},"Failed to self-check acceptance criteria"),{success:!1,error:"Failed to self-check acceptance criteria"}}}[g,h]=k.then?(await k)():k,(0,j.D)([l,m,n]),(0,e.A)(l,"60bce5308d86774d8d9c512c08e617dc42c6725e78",null),(0,e.A)(m,"607a699c8690027bb0c82f71ac40e0374ecfb52756",null),(0,e.A)(n,"600907e299b53b09327bbdd82bcfaeccf37423e550",null),d()}catch(a){d(a)}})},72189:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{F:()=>k});var e=c(2613);c(50785);var f=c(9259),g=c(97879),h=c(97307),i=c(12217),j=a([f,g]);async function k(a){let b=await (0,f.d)();if(!b)return null;try{let c=await (0,g.PK)(b.companyUuid,a);if(!c)return null;return{uuid:c.uuid,title:c.title}}catch(a){return h.default.error({err:a},"Failed to get task source"),null}}[f,g]=j.then?(await j)():j,(0,i.D)([k]),(0,e.A)(k,"40d434954fc705edbce0e1042ce308502ba2157fa0",null),d()}catch(a){d(a)}})},73393:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A0:()=>w,G3:()=>A,M0:()=>r,TV:()=>y,Yw:()=>x,bd:()=>t,hR:()=>u,iY:()=>p,p2:()=>s,qb:()=>q,vq:()=>z,y9:()=>v});var e=c(2613);c(50785);var f=c(5562),g=c(9259),h=c(50530),i=c(28774),j=c(61076),k=c(25383),l=c(67738),m=c(97307),n=c(12217),o=a([g,h,i,j,k,l]);async function p(a){let b=await (0,g.d)();if(!b)return{success:!1,error:"Unauthorized"};try{let c=await (0,h.K4)(b.companyUuid,a);if(!c)return{success:!1,error:"Task not found"};if("open"!==c.status&&"assigned"!==c.status)return{success:!1,error:"Task is not available for claiming"};return await (0,h.QK)({taskUuid:a,companyUuid:b.companyUuid,assigneeType:b.type,assigneeUuid:b.actorUuid,assignedByType:"user",assignedByUuid:b.actorUuid}),await (0,l.createActivity)({companyUuid:b.companyUuid,projectUuid:c.projectUuid,targetType:"task",targetUuid:a,actorType:b.type,actorUuid:b.actorUuid,action:"assigned",value:{assigneeType:b.type,assigneeUuid:b.actorUuid}}),(0,f.revalidatePath)(`/projects/${c.projectUuid}/tasks/${a}`),(0,f.revalidatePath)(`/projects/${c.projectUuid}/tasks`),{success:!0}}catch(a){return m.default.error({err:a},"Failed to claim task"),{success:!1,error:"Failed to claim task"}}}async function q(a,b,c){let d=await (0,g.d)();if(!d||"user"!==d.type)return{success:!1,error:"Unauthorized"};try{let e=await (0,h.K4)(d.companyUuid,a);if(!e)return{success:!1,error:"Task not found"};if("open"!==e.status&&"assigned"!==e.status)return{success:!1,error:"Task is not available for claiming"};let g=await (0,k.gt)({companyUuid:d.companyUuid,actorUserUuid:d.actorUuid,projectUuid:e.projectUuid,agentUuid:b}),i="project_fixed"===g.source?g.agentInstanceUuid:c;return await (0,h.QK)({taskUuid:a,companyUuid:d.companyUuid,assigneeType:"agent",assigneeUuid:b,assignedByType:"user",assignedByUuid:d.actorUuid,instanceUuid:i??void 0,cwdSource:"project_fixed"===g.source?g.source:null,cwdHost:"project_fixed"===g.source?g.host:null,runtimeCwd:"project_fixed"===g.source?g.cwd:null}),await (0,l.createActivity)({companyUuid:d.companyUuid,projectUuid:e.projectUuid,targetType:"task",targetUuid:a,actorType:d.type,actorUuid:d.actorUuid,action:"assigned",value:{assigneeType:"agent",assigneeUuid:b,...i?{instanceUuid:i}:{},..."project_fixed"===g.source?{resolvedCwdSource:g.source,resolvedCwdHost:g.host,resolvedRuntimeCwd:g.cwd}:{}}}),(0,f.revalidatePath)(`/projects/${e.projectUuid}/tasks/${a}`),(0,f.revalidatePath)(`/projects/${e.projectUuid}/tasks`),{success:!0}}catch(a){return m.default.error({err:a},"Failed to claim task to agent"),{success:!1,error:"Failed to claim task"}}}async function r(a,b,c){let d=await (0,g.d)();if(!d||"user"!==d.type)return{success:!1,error:"Unauthorized"};try{let e=await (0,h.K4)(d.companyUuid,a);if(!e)return{success:!1,error:"Task not found"};if("open"!==e.status&&"assigned"!==e.status)return{success:!1,error:"Task is not available for claiming"};return await (0,h.QK)({taskUuid:a,companyUuid:d.companyUuid,assigneeType:"agent",assigneeUuid:b,assignedByType:"user",assignedByUuid:d.actorUuid,instanceUuid:c}),(0,f.revalidatePath)(`/projects/${e.projectUuid}/tasks/${a}`),(0,f.revalidatePath)(`/projects/${e.projectUuid}/tasks`),{success:!0}}catch(a){return m.default.error({err:a},"Failed to reassign task instance (no wake)"),{success:!1,error:"Failed to reassign task"}}}async function s(a){let b=await (0,g.d)();if(!b)return{success:!1,error:"Unauthorized"};try{let c=await (0,h.K4)(b.companyUuid,a);if(!c)return{success:!1,error:"Task not found"};if("assigned"!==c.status&&"in_progress"!==c.status)return{success:!1,error:"Task is not in assigned status"};return await (0,h.Fp)(a),await (0,l.createActivity)({companyUuid:b.companyUuid,projectUuid:c.projectUuid,targetType:"task",targetUuid:a,actorType:b.type,actorUuid:b.actorUuid,action:"released"}),(0,f.revalidatePath)(`/projects/${c.projectUuid}/tasks/${a}`),(0,f.revalidatePath)(`/projects/${c.projectUuid}/tasks`),{success:!0}}catch(a){return m.default.error({err:a},"Failed to release task"),{success:!1,error:"Failed to release task"}}}async function t(a,b){let c=await (0,g.d)();if(!c)return{success:!1,error:"Unauthorized"};try{let d=await (0,h.K4)(c.companyUuid,a);if(!d)return{success:!1,error:"Task not found"};return await (0,h.lC)(a,{status:b}),await (0,l.createActivity)({companyUuid:c.companyUuid,projectUuid:d.projectUuid,targetType:"task",targetUuid:a,actorType:c.type,actorUuid:c.actorUuid,action:"status_changed",value:{status:b}}),(0,f.revalidatePath)(`/projects/${d.projectUuid}/tasks/${a}`),(0,f.revalidatePath)(`/projects/${d.projectUuid}/tasks`),{success:!0}}catch(a){return m.default.error({err:a},"Failed to update task status"),{success:!1,error:"Failed to update task status"}}}async function u(a){let b=await (0,g.d)();if(!b||"user"!==b.type)return{success:!1,error:"Only humans can verify tasks"};try{let c=await (0,h.K4)(b.companyUuid,a);if(!c)return{success:!1,error:"Task not found"};if("to_verify"!==c.status)return{success:!1,error:"Task is not in to_verify status"};let d=await (0,h.Ew)(a);if(!d.allowed)return{success:!1,error:d.reason||"Not all required acceptance criteria are passed"};return await (0,h.lC)(a,{status:"done"}),(0,f.revalidatePath)(`/projects/${c.projectUuid}/tasks/${a}`),(0,f.revalidatePath)(`/projects/${c.projectUuid}/tasks`),{success:!0}}catch(a){return m.default.error({err:a},"Failed to verify task"),{success:!1,error:"Failed to verify task"}}}async function v(a,b){let c=await (0,g.d)();if(!c||"user"!==c.type)return{success:!1,error:"Unauthorized"};try{let d=await (0,h.K4)(c.companyUuid,a);if(!d)return{success:!1,error:"Task not found"};if("open"!==d.status&&"assigned"!==d.status)return{success:!1,error:"Task is not available for assigning"};return await (0,h.QK)({taskUuid:a,companyUuid:c.companyUuid,assigneeType:"user",assigneeUuid:b,assignedByType:"user",assignedByUuid:c.actorUuid}),await (0,l.createActivity)({companyUuid:c.companyUuid,projectUuid:d.projectUuid,targetType:"task",targetUuid:a,actorType:c.type,actorUuid:c.actorUuid,action:"assigned",value:{assigneeType:"user",assigneeUuid:b}}),(0,f.revalidatePath)(`/projects/${d.projectUuid}/tasks/${a}`),(0,f.revalidatePath)(`/projects/${d.projectUuid}/tasks`),{success:!0}}catch(a){return m.default.error({err:a},"Failed to assign task to user"),{success:!1,error:"Failed to assign task"}}}async function w(a){let b=await (0,g.d)();if(!b)return{success:!1,error:"Unauthorized"};try{let c=await (0,h.UT)({companyUuid:b.companyUuid,projectUuid:a.projectUuid,title:a.title,description:a.description||null,priority:a.priority||"medium",storyPoints:a.storyPoints,acceptanceCriteria:a.acceptanceCriteria,createdByUuid:b.actorUuid});return await (0,l.createActivity)({companyUuid:b.companyUuid,projectUuid:a.projectUuid,targetType:"task",targetUuid:c.uuid,actorType:b.type,actorUuid:b.actorUuid,action:"task_created"}),(0,f.revalidatePath)(`/projects/${a.projectUuid}/tasks`),{success:!0,taskUuid:c.uuid}}catch(a){return m.default.error({err:a},"Failed to create task"),{success:!1,error:"Failed to create task"}}}async function x(a){let b=await (0,g.d)();if(!b)return{success:!1,error:"Unauthorized"};try{if(!await (0,h.K4)(b.companyUuid,a.taskUuid))return{success:!1,error:"Task not found"};return await (0,h.lC)(a.taskUuid,{title:a.title,description:a.description,priority:a.priority,storyPoints:a.storyPoints,acceptanceCriteria:a.acceptanceCriteria}),void 0!==a.acceptanceCriteriaItems&&await (0,h.Pf)(b.companyUuid,a.taskUuid,a.acceptanceCriteriaItems),(0,f.revalidatePath)(`/projects/${a.projectUuid}/tasks`),{success:!0}}catch(a){return m.default.error({err:a},"Failed to update task"),{success:!1,error:a instanceof Error?a.message:"Failed to update task"}}}async function y(a,b){let c=await (0,g.d)();if(!c)return{success:!1,error:"Unauthorized"};try{if(!await (0,h.K4)(c.companyUuid,a))return{success:!1,error:"Task not found"};return await (0,h.vq)(a),(0,f.revalidatePath)(`/projects/${b}/tasks`),{success:!0}}catch(a){return m.default.error({err:a},"Failed to delete task"),{success:!1,error:"Failed to delete task"}}}async function z(){let a=await (0,g.d)();if(!a||"user"!==a.type)return{agents:[],users:[]};try{let[b,c]=await Promise.all([(0,i.ic)(a.companyUuid,"task:write",a.actorUuid),(0,i.A8)(a.companyUuid)]);return{agents:b,users:c,currentUserUuid:a.actorUuid}}catch(a){return m.default.error({err:a},"Failed to get assignable agents"),{agents:[],users:[]}}}async function A(a,b){let c=await (0,g.d)();if(!c||"user"!==c.type)return{instances:[],resolvedTarget:null};try{let[d,e]=await Promise.all([(0,j._R)(c.companyUuid,a),b?(0,k.gt)({companyUuid:c.companyUuid,actorUserUuid:c.actorUuid,projectUuid:b,agentUuid:a}):null]);return{instances:d.map(a=>({connectionUuid:a.uuid,agentInstanceUuid:a.agentInstanceUuid,host:a.host,cwd:a.cwd,effectiveStatus:a.effectiveStatus})),resolvedTarget:e}}catch(a){return m.default.error({err:a},"Failed to get agent instances"),{instances:[],resolvedTarget:null}}}[g,h,i,j,k,l]=o.then?(await o)():o,(0,n.D)([p,q,r,s,t,u,v,w,x,y,z,A]),(0,e.A)(p,"404e474d771d8199fa922fd75c5a46a135db5f88a5",null),(0,e.A)(q,"7092a40a93e9fe26c597f1a30c1c01d2b848dad8bd",null),(0,e.A)(r,"7037955a4d0e5d961aacb2ec907a60529f2c2efac1",null),(0,e.A)(s,"40f3d5a47becdf5763f6319cf1e796d2e9ebc144c8",null),(0,e.A)(t,"60f7da766c6cab45b79b47a524e80659e2b958d7c2",null),(0,e.A)(u,"40c8b0bbebcb73d0a750cd4d80367437c0d7afbd47",null),(0,e.A)(v,"600743ea91d7ac9724276706ed3a07448f27e3f067",null),(0,e.A)(w,"400587c9940eca6c3f556a2f39602f7df6314802c3",null),(0,e.A)(x,"409d64d0d10b20b84f6a0fe879c86f8b145fb45231",null),(0,e.A)(y,"603dc70d43c68125d07c1595f8f9340ae2b8b92bde",null),(0,e.A)(z,"003e2e766e32ba41e86d49ecc9c77f96659883e470",null),(0,e.A)(A,"6007aa0b452dc4d1de51d51d01666e7c31167e6ff9",null),d()}catch(a){d(a)}})},73493:(a,b,c)=>{c.d(b,{x:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40056dfb171e85cfe2921edfb8421ed3d93fa214a2",d.callServer,void 0,d.findSourceMapURL,"getTaskDependenciesAction")},77292:(a,b,c)=>{c.d(b,{N:()=>e});var d=c(42377);let e=(0,d.createServerReference)("607a699c8690027bb0c82f71ac40e0374ecfb52756",d.callServer,void 0,d.findSourceMapURL,"resetCriterionAction")},77521:(a,b,c)=>{c.d(b,{Bj:()=>i,L8:()=>e,Wl:()=>j,_5:()=>h,eT:()=>f,fw:()=>g});var d=c(76664);let e=480;function f(a){switch(a){case"done":return"bg-[#00796B]";case"in_progress":return"bg-[#1976D2]";case"to_verify":return"bg-[#7B1FA2]";case"open":case"assigned":return"bg-[#E65100]";case"closed":return"bg-[#9A9A9A]";default:return"bg-[#D9D9D9]"}}function g(a,b){let c=new Date(a),e=new Date().getTime()-c.getTime(),f=Math.floor(e/6e4),g=Math.floor(e/36e5),h=Math.floor(e/864e5);return f<1?b("time.justNow"):f<60?b("time.minutesAgo",{minutes:f}):g<24?b("time.hoursAgo",{hours:g}):h<7?b("time.daysAgo",{days:h}):(0,d.r)(c)}let h={todo:"bg-[#FFF3E0] text-[#E65100] dark:bg-[#3a2a12] dark:text-[#F0A050]",in_progress:"bg-[#E3F2FD] text-[#1976D2] dark:bg-[#13253a] dark:text-[#5AA9F0]",human_conduct_required:"bg-[#F3E5F5] text-[#7B1FA2] dark:bg-[#281630] dark:text-[#C98FE0]",done:"bg-[#E0F2F1] text-[#00796B] dark:bg-[#12292a] dark:text-[#4FD1C0]"},i={todo:"todo",in_progress:"inProgress",human_conduct_required:"humanConductRequired",done:"done"},j={open:"open",researching:"researching",answer_questions:"answerQuestions",planning:"planning",review_proposal:"reviewProposal",building:"building",verify_work:"verifyWork",done:"done"}},78973:(a,b,c)=>{c.d(b,{T:()=>e});var d=c(42377);let e=(0,d.createServerReference)("603dc70d43c68125d07c1595f8f9340ae2b8b92bde",d.callServer,void 0,d.findSourceMapURL,"deleteTaskAction")},81751:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{J:()=>l,h:()=>m});var e=c(2613);c(50785);var f=c(4687),g=c(9259),h=c(30457),i=c(97307),j=c(12217),k=a([g,h]);async function l(a){let b=await (0,g.d)();b||(0,f.redirect)("/login");try{let c=await (0,h.OU)(b.companyUuid,a);return{success:!0,data:c}}catch(a){return i.default.error({err:a},"Failed to fetch task sessions"),{success:!1,error:"Failed to fetch task sessions"}}}async function m(a){let b=await (0,g.d)();b||(0,f.redirect)("/login");try{let c=await (0,h.y_)(b.companyUuid,a);return{success:!0,data:c}}catch(a){return i.default.error({err:a},"Failed to fetch batch worker counts"),{success:!1,error:"Failed to fetch batch worker counts"}}}[g,h]=k.then?(await k)():k,(0,j.D)([l,m]),(0,e.A)(l,"40d444eda690d0c39eb7e9d3df9a87091ed3253448",null),(0,e.A)(m,"402b5a6f7201b224278222f017735a809d74bb4203",null),d()}catch(a){d(a)}})},85579:(a,b,c)=>{c.d(b,{Q:()=>y});var d=c(10837),e=c(21968),f=c(68884),g=c(9222),h=c(86460),i=c(21692),j=c(97443),k=c(42424),l=c(6871),m=c(94214),n=c(2852),o=c(11225),p=c(55732),q=c(23871),r=c(27696),s=c(27876),t=c(42377);t.callServer,t.findSourceMapURL,t.callServer,t.findSourceMapURL;let u=(0,t.createServerReference)("404e474d771d8199fa922fd75c5a46a135db5f88a5",t.callServer,void 0,t.findSourceMapURL,"claimTaskAction"),v=(0,t.createServerReference)("7092a40a93e9fe26c597f1a30c1c01d2b848dad8bd",t.callServer,void 0,t.findSourceMapURL,"claimTaskToAgentAction"),w=(0,t.createServerReference)("600743ea91d7ac9724276706ed3a07448f27e3f067",t.callServer,void 0,t.findSourceMapURL,"claimTaskToUserAction"),x=(0,t.createServerReference)("40f3d5a47becdf5763f6319cf1e796d2e9ebc144c8",t.callServer,void 0,t.findSourceMapURL,"releaseTaskAction");function y({task:a,projectUuid:b,currentUserUuid:c,onClose:t}){let y=(0,g.c)(),z=(0,f.r)(),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)("self"),[E,F]=(0,e.useState)(""),[G,H]=(0,e.useState)(""),[I,J]=(0,e.useState)([]),[K,L]=(0,e.useState)([]),[M,N]=(0,e.useState)(!0),[O,P]=(0,e.useState)(null),[Q,R]=(0,e.useState)([]),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)(null),[W,X]=(0,e.useState)(null),Y=!!a.assignee,Z=Q.find(a=>a.connectionUuid===W)??null,$=new Set(Q.map(a=>a.host)).size>1,_=async()=>{let b;if(B(!0),P(null),"self"===C)b=await u(a.uuid);else if("agent"===C&&E)b=await v(a.uuid,E,Z?.agentInstanceUuid??void 0);else if("user"===C&&G)b=await w(a.uuid,G);else{if("release"!==C)return void B(!1);b=await x(a.uuid)}B(!1),b?.success?(t(),z.refresh()):b?.error&&P(b.error)},aa="self"===C||"agent"===C&&E||"user"===C&&G||"release"===C&&Y;return(0,d.jsxs)(m._8,{open:!0,onOpenChange:a=>{a||t()},className:"bg-card sm:max-w-[400px]",header:(0,d.jsx)(m.AI,{className:"text-base font-semibold text-foreground",children:y("tasks.assignTask")}),footer:(0,d.jsxs)("div",{className:"flex w-full items-center justify-end gap-4",children:[(0,d.jsx)(k.$,{variant:"outline",onClick:t,disabled:A,className:"border-border",children:y("common.cancel")}),(0,d.jsx)(k.$,{onClick:_,disabled:A||!aa,className:"bg-primary hover:bg-[#B56A42] text-white",children:A?(0,d.jsx)(h.A,{className:"h-4 w-4 animate-spin"}):"release"===C?y("common.release"):function(){if("agent"!==C||!Z)return y("common.assign");let a=(0,r.kn)(Z.cwd),b=a.isUnknown?y(a.label):a.label,c=(0,r.g9)(Z.host),d=c.isUnknown?y(c.label):c.label;return $?y("assignInstance.assignToWithHost",{path:b,host:d}):y("assignInstance.assignTo",{path:b})}()})]}),bodyClassName:"space-y-4",children:[(0,d.jsxs)("div",{className:"rounded-lg bg-background p-3",children:[(0,d.jsx)("p",{className:"text-[13px] font-medium text-foreground",children:a.title}),a.description&&(0,d.jsx)("p",{className:"mt-1 text-[11px] text-muted-foreground line-clamp-2",children:a.description})]}),Y&&(0,d.jsx)("div",{className:"rounded-lg bg-[#E3F2FD] dark:bg-[#13253a] p-3",children:(0,d.jsxs)("p",{className:"text-xs text-[#1976D2] dark:text-[#5AA9F0]",children:[y("common.currentAssignee"),": ",(0,d.jsx)("span",{className:"font-medium",children:a.assignee?.name})]})}),O&&(0,d.jsx)("div",{className:"rounded-lg bg-[#FEE2E2] dark:bg-[#331619] p-3",children:(0,d.jsx)("p",{className:"text-xs text-[#D32F2F] dark:text-[#F08078]",children:O})}),(0,d.jsx)("p",{className:"text-[13px] text-muted-foreground",children:y("assign.selectAssignee")}),M?(0,d.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,d.jsx)(h.A,{className:"h-6 w-6 animate-spin text-[#9A9A9A]"})}):(0,d.jsxs)(o.z,{value:C,onValueChange:a=>D(a),className:"space-y-3",children:[(0,d.jsxs)("div",{className:`rounded-[10px] p-4 transition-colors cursor-pointer ${"self"===C?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border hover:border-primary/50"}`,onClick:()=>D("self"),children:[(0,d.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,d.jsx)(o.C,{value:"self",id:"self",className:"border-primary text-primary"}),(0,d.jsx)(n.J,{htmlFor:"self",className:"text-sm font-medium text-foreground cursor-pointer",children:y("assign.assignToMyself")})]}),(0,d.jsx)("p",{className:"mt-2 ml-6 text-xs text-muted-foreground leading-relaxed",children:y("assign.assignToMyselfDesc")})]}),(0,d.jsxs)("div",{className:`rounded-[10px] p-4 transition-colors ${"agent"===C?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border"}`,children:[(0,d.jsxs)("div",{className:"flex items-center gap-2.5 cursor-pointer",onClick:()=>D("agent"),children:[(0,d.jsx)(o.C,{value:"agent",id:"agent",className:"border-primary text-primary"}),(0,d.jsx)(n.J,{htmlFor:"agent",className:"text-sm font-medium text-foreground cursor-pointer",children:y("assign.orAssignToAgent")})]}),(0,d.jsx)("p",{className:"mt-2 ml-6 text-xs text-muted-foreground leading-relaxed",children:y("tasks.onlySelectedAgentCanWork")}),"agent"===C&&(0,d.jsxs)("div",{className:"mt-3 ml-6 space-y-3",children:[(0,d.jsxs)(p.l6,{value:E,onValueChange:F,children:[(0,d.jsx)(p.bq,{className:"w-full border-border",children:(0,d.jsx)(p.yv,{placeholder:y("tasks.selectAgent")})}),(0,d.jsx)(p.gC,{className:"z-[120]",children:I.length>0?I.map(a=>(0,d.jsx)(p.eb,{value:a.uuid,children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(l.AgentAvatar,{name:a.name,size:16,className:"rounded-full"}),(0,d.jsx)("span",{children:a.name})]})},a.uuid)):(0,d.jsx)("div",{className:"px-3 py-2 text-xs text-[#9A9A9A]",children:y("tasks.noAgentsAvailable")})})]}),E&&(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:y("assignInstance.workingDirectory")}),S?(0,d.jsxs)("div",{className:"flex items-center gap-2 py-2 text-xs text-[#9A9A9A]",children:[(0,d.jsx)(h.A,{className:"h-3.5 w-3.5 animate-spin"}),y("assignInstance.loadingInstances")]}):U?.source==="project_fixed"?(0,d.jsx)(s.Y,{target:U}):0===Q.length?(0,d.jsx)("p",{className:"rounded-lg bg-background p-2.5 text-[11px] leading-relaxed text-muted-foreground",children:y("assignInstance.noInstances")}):(0,d.jsx)(q.O,{instances:Q,selectedConnectionUuid:W,onSelect:a=>X(a.connectionUuid),ariaLabel:y("assignInstance.workingDirectory")}),U?.source!=="project_fixed"&&(0,d.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed text-[#9A8C7E]",children:[(0,d.jsx)(i.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0","aria-hidden":!0}),(0,d.jsx)("span",{children:y("assignInstance.pinNote")})]})]})]})]}),(0,d.jsxs)("div",{className:`rounded-[10px] p-4 transition-colors ${"user"===C?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border"}`,children:[(0,d.jsxs)("div",{className:"flex items-center gap-2.5 cursor-pointer",onClick:()=>D("user"),children:[(0,d.jsx)(o.C,{value:"user",id:"user",className:"border-primary text-primary"}),(0,d.jsx)(n.J,{htmlFor:"user",className:"text-sm font-medium text-foreground cursor-pointer",children:y("assign.orAssignToUser")})]}),"user"===C&&(0,d.jsx)("div",{className:"mt-3 ml-6",children:(0,d.jsxs)(p.l6,{value:G,onValueChange:H,children:[(0,d.jsx)(p.bq,{className:"w-full border-border",children:(0,d.jsx)(p.yv,{placeholder:y("tasks.selectUser")})}),(0,d.jsx)(p.gC,{className:"z-[120]",children:K.length>0?K.map(a=>(0,d.jsx)(p.eb,{value:a.uuid,children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(j.A,{className:"h-4 w-4 text-muted-foreground"}),(0,d.jsx)("span",{children:a.name||a.email})]})},a.uuid)):(0,d.jsx)("div",{className:"px-3 py-2 text-xs text-[#9A9A9A]",children:y("tasks.noUsersAvailable")})})]})})]}),Y&&(0,d.jsxs)("div",{className:`rounded-[10px] p-4 transition-colors cursor-pointer ${"release"===C?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border hover:border-primary/50"}`,onClick:()=>D("release"),children:[(0,d.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,d.jsx)(o.C,{value:"release",id:"release",className:"border-primary text-primary"}),(0,d.jsx)(n.J,{htmlFor:"release",className:"text-sm font-medium text-foreground cursor-pointer",children:y("assign.releaseAssignee")})]}),(0,d.jsx)("p",{className:"mt-2 ml-6 text-xs text-muted-foreground leading-relaxed",children:y("assign.releaseAssigneeDesc")})]})]})]})}},86104:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{v:()=>ae});var e=c(10837),f=c(21968),g=c(68884),h=c(9222),i=c(33407),j=c(10694),k=c(92900),l=c(35209),m=c(87461),n=c(65956),o=c(86460),p=c(67832),q=c(98893),r=c(97825),s=c(59179),t=c(55775),u=c(9810),v=c(97443),w=c(58270),x=c(644),y=c(21326),z=c(79543),A=c(49599),B=c(35198),C=c(42424),D=c(9994),E=c(20170),F=c(2852),G=c(74645),H=c(55732),I=c(6019),J=c(80251),K=c(6871),L=c(68797),M=c(7086),N=c(30758),O=c(7813),P=c(52621),Q=c(78973),R=c(37584),S=c(77292),T=c(56828),U=c(73346);c(15724),c(41818);var V=c(97450),W=c(73908),X=c(85579);c(73493),c(86933);var Y=c(57413),Z=c(24540);c(95506);var $=c(76664),_=c(31009),aa=c(45148),ab=c(77521),ac=a([L,T,V]);[L,T,V]=ac.then?(await ac)():ac;let af={open:"bg-[#FFF3E0] dark:bg-[#3a2a12] text-[#E65100] dark:text-[#F0A050]",assigned:"bg-[#E3F2FD] dark:bg-[#13253a] text-[#1976D2] dark:text-[#5AA9F0]",in_progress:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#5A9E6F] dark:text-[#6FD19A]",to_verify:"bg-[#F3E5F5] dark:bg-[#281630] text-[#7B1FA2] dark:text-[#C98FE0]",done:"bg-[#E0F2F1] dark:bg-[#12292a] text-[#00796B] dark:text-[#4FD1C0]",closed:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-[#9A9A9A]"},ag={open:"open",assigned:"assigned",in_progress:"inProgress",to_verify:"toVerify",done:"done",closed:"closed"},ah={low:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-[#9A9A9A]",medium:"bg-[#FFF3E0] dark:bg-[#3a2a12] text-[#E65100] dark:text-[#F0A050]",high:"bg-[#FEE2E2] dark:bg-[#331619] text-[#D32F2F] dark:text-[#F08078]",critical:"bg-[#FFCDD2] dark:bg-[#3a181c] text-[#B71C1C] dark:text-[#F08078]"},ai={low:"lowPriority",medium:"mediumPriority",high:"highPriority",critical:"criticalPriority"};function ad(a,b){let c=new Date(a),d=new Date().getTime()-c.getTime(),e=Math.floor(d/6e4),f=Math.floor(d/36e5),g=Math.floor(d/864e5);return e<1?b("time.justNow"):e<60?b("time.minutesAgo",{minutes:e}):f<24?b("time.hoursAgo",{hours:f}):g<7?b("time.daysAgo",{days:g}):(0,$.r)(c)}function ae({task:a,projectUuid:b,currentUserUuid:c,mode:d="overlay",onClose:ac,onCreated:ae,onDependencyChange:aj,onBack:ak}){let al=(0,h.c)(),am=(0,g.r)(),[an,ao]=(0,f.useState)(!1),[ap,aq]=(0,f.useState)(!1),[ar,as]=(0,f.useState)([]),[at,au]=(0,f.useState)(!0),[av,aw]=(0,f.useState)(null),[ax,ay]=(0,f.useState)(!1),[az,aA]=(0,f.useState)([]),[aB,aC]=(0,f.useState)([]),[aD,aE]=(0,f.useState)(!1),[aF,aG]=(0,f.useState)([]),[aH,aI]=(0,f.useState)(null),[aJ,aK]=(0,f.useState)([]),[aL,aM]=(0,f.useState)([]),aN=null===a,[aO,aP]=(0,f.useState)(aN),[aQ,aR]=(0,f.useState)(a?.title||""),[aS,aT]=(0,f.useState)(a?.description||""),[aU,aV]=(0,f.useState)(a?.priority||"medium"),[aW,aX]=(0,f.useState)(a?.storyPoints!=null?String(a.storyPoints):""),[aY,aZ]=(0,f.useState)((a?.acceptanceCriteriaItems??[]).map(a=>({description:a.description,required:a.required??!0}))),[a$,a_]=(0,f.useState)(!1),[a0,a1]=(0,f.useState)(null),[a2,a3]=(0,f.useState)(!1),a4=(0,M.RU)(a?.assignee??null,{type:"user",uuid:c}),a5=a4&&a?.status==="assigned",a6=a4&&a?.status==="in_progress",a7=a?.status==="to_verify",a8=async b=>{if(!a)return;aq(!0);let c=await (0,N.b)(a.uuid,b);aq(!1),c.success&&(ac(),am.refresh())},a9=()=>{if(aN)return void ac();aP(!1),a&&(aR(a.title),aT(a.description||""),aV(a.priority),aX(null!=a.storyPoints?String(a.storyPoints):""),aZ((a.acceptanceCriteriaItems??[]).map(a=>({description:a.description,required:a.required??!0})))),a1(null)},ba=async()=>{if(!aQ.trim())return void a1(al("tasks.titleRequired"));a_(!0),a1(null);let c=aW.trim()?parseFloat(aW):null;if(aN){let a=await (0,O.A)({projectUuid:b,title:aQ.trim(),description:aS.trim()||void 0,priority:aU,storyPoints:c,acceptanceCriteria:null});a_(!1),a.success?(aL.length>0&&a.taskUuid&&(await Promise.all(aL.map(b=>(0,Y.w)(a.taskUuid,b.uuid))),aj?.()),ae?.(),ac(),am.refresh()):a1(a.error||al("tasks.createFailed"))}else{let d=(a.acceptanceCriteriaItems??[]).map(a=>({description:a.description,required:a.required??!0})),e=aY.filter(a=>a.description.trim().length>0),f=(0,W.K)(d,e);if(f&&0===e.length){a_(!1),a1(al("acceptanceCriteria.atLeastOneRequired"));return}let g=await (0,P.Y)({taskUuid:a.uuid,projectUuid:b,title:aQ.trim(),description:aS.trim()||null,priority:aU,storyPoints:c,...f?{acceptanceCriteriaItems:e.map(a=>({description:a.description.trim(),required:a.required}))}:{}});a_(!1),g.success?(aP(!1),am.refresh()):a1(g.error||al("tasks.updateFailed"))}},bb=async()=>{if(!a)return;a3(!0);let c=await (0,Q.T)(a.uuid,b);a3(!1),c.success&&(ac(),am.refresh())},bc=async b=>{if(!a)return;aI(null);let c=await (0,Y.w)(a.uuid,b);if(c.success){let a=aF.find(a=>a.uuid===b);a&&aA(b=>[...b,a]),aj?.()}else aI(c.error||al("tasks.failedToAddDep"))},bd=async b=>{if(!a)return;aI(null);let c=await (0,Z.T)(a.uuid,b);c.success?(aA(a=>a.filter(a=>a.uuid!==b)),aj?.()):aI(c.error||al("tasks.failedToRemoveDep"))},be=async b=>{if(!a)return;aI(null);let c=await (0,Z.T)(b,a.uuid);c.success?(aC(a=>a.filter(a=>a.uuid!==b)),aj?.()):aI(c.error||al("tasks.failedToRemoveDep"))},bf=aF.filter(b=>b.uuid!==a?.uuid&&!az.some(a=>a.uuid===b.uuid)),bg=aF.filter(a=>!aL.some(b=>b.uuid===a.uuid)),bh="sidebyside"===d;return(0,e.jsxs)(e.Fragment,{children:[!bh&&(0,e.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20",onClick:ac}),(0,e.jsxs)("div",{className:`fixed top-14 md:top-0 flex h-[calc(100%-3.5rem)] md:h-full w-full md:w-[480px] flex-col bg-card shadow-xl border-l border-border ${bh?`z-40 ${an?"":"animate-in slide-in-from-right duration-300"}`:`z-50 right-0 ${an?"":"animate-in slide-in-from-right duration-300"}`}`,style:bh?{right:`${ab.L8}px`}:void 0,children:[(0,e.jsxs)("div",{className:"flex items-center justify-between border-b border-secondary px-6 py-5",children:[ak&&(0,e.jsx)(C.$,{variant:"ghost",size:"icon",className:"mr-2 h-8 w-8 shrink-0",onClick:ak,children:(0,e.jsx)(l.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,e.jsx)("div",{className:"flex-1 min-w-0",children:aO?(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground",children:aN?al("tasks.createTaskTitle"):al("tasks.editTask")}):a?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground truncate",children:a.title}),(0,e.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,e.jsx)(A.E,{className:af[a.status]||"",children:al(`status.${ag[a.status]||a.status}`)}),(0,e.jsx)(A.E,{className:ah[a.priority]||"",children:al(`priority.${ai[a.priority]||a.priority}`)}),a.storyPoints&&(0,e.jsxs)("span",{className:"rounded bg-secondary px-2 py-0.5 text-xs font-medium text-muted-foreground",children:[a.storyPoints,"h"]})]})]}):null}),(0,e.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[a&&!aO&&(0,e.jsxs)(C.$,{variant:"outline",size:"sm",className:"h-8 gap-1.5 border-border text-foreground",onClick:()=>{a&&(aR(a.title),aT(a.description||""),aV(a.priority),aX(null!=a.storyPoints?String(a.storyPoints):""),aZ((a.acceptanceCriteriaItems??[]).map(a=>({description:a.description,required:a.required??!0}))),a1(null),aP(!0))},children:[(0,e.jsx)(m.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,e.jsx)("span",{className:"text-xs",children:al("common.edit")})]}),(0,e.jsx)(C.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-border",onClick:aO&&!aN?a9:ac,children:(0,e.jsx)(j.A,{className:"h-4 w-4 text-muted-foreground"})})]})]}),(0,e.jsx)(G.F,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:(0,e.jsx)("div",{className:"flex min-h-full flex-col px-6 py-5",children:aO?(0,e.jsxs)("div",{className:"space-y-5",children:[a0&&(0,e.jsx)("div",{className:"rounded-lg bg-destructive/10 p-3 text-sm text-destructive",children:a0}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(F.J,{htmlFor:"edit-title",className:"text-[13px] font-medium text-foreground",children:al("tasks.titleLabel")}),(0,e.jsx)(D.p,{id:"edit-title",value:aQ,onChange:a=>aR(a.target.value),className:"border-border text-sm focus-visible:ring-primary",autoFocus:!0})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(F.J,{htmlFor:"edit-description",className:"text-[13px] font-medium text-foreground",children:al("tasks.descriptionLabel")}),(0,e.jsx)(E.T,{id:"edit-description",value:aS,onChange:a=>aT(a.target.value),rows:4,className:"border-border text-sm resize-none focus-visible:ring-primary"})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(F.J,{htmlFor:"edit-priority",className:"text-[13px] font-medium text-foreground",children:al("tasks.priorityLabel")}),(0,e.jsxs)(H.l6,{value:aU,onValueChange:aV,children:[(0,e.jsx)(H.bq,{className:"border-border text-sm focus:ring-primary",children:(0,e.jsx)(H.yv,{})}),(0,e.jsxs)(H.gC,{children:[(0,e.jsx)(H.eb,{value:"low",children:al("priority.low")}),(0,e.jsx)(H.eb,{value:"medium",children:al("priority.medium")}),(0,e.jsx)(H.eb,{value:"high",children:al("priority.high")})]})]})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(F.J,{htmlFor:"edit-story-points",className:"text-[13px] font-medium text-foreground",children:al("tasks.storyPointsLabel")}),(0,e.jsx)(D.p,{id:"edit-story-points",type:"number",min:"0",step:"0.5",value:aW,onChange:a=>aX(a.target.value),className:"border-border text-sm focus-visible:ring-primary"})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(F.J,{className:"text-[13px] font-medium text-foreground",children:al("acceptanceCriteria.title")}),(0,e.jsx)(W.C,{items:aY,onChange:aZ})]}),aN&&(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(F.J,{className:"text-[13px] font-medium text-foreground",children:al("tasks.dependencies")}),aL.length>0&&(0,e.jsx)("div",{className:"space-y-1.5",children:aL.map(a=>(0,e.jsxs)("div",{className:"group flex items-center justify-between rounded-lg bg-background p-2.5",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,e.jsx)(i.A,{className:"h-3.5 w-3.5 shrink-0 text-primary"}),(0,e.jsx)("span",{className:"text-xs text-foreground truncate",children:a.title}),(0,e.jsx)(A.E,{className:`shrink-0 text-[10px] ${af[a.status]||""}`,children:al(`status.${ag[a.status]||a.status}`)})]}),(0,e.jsx)(C.$,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity ml-2 shrink-0",onClick:()=>aM(b=>b.filter(b=>b.uuid!==a.uuid)),children:(0,e.jsx)(j.A,{className:"h-3.5 w-3.5 text-[#9A9A9A] hover:text-[#D32F2F]"})})]},a.uuid))}),bg.length>0&&(0,e.jsxs)(H.l6,{onValueChange:a=>{let b=aF.find(b=>b.uuid===a);b&&aM(a=>[...a,b])},children:[(0,e.jsx)(H.bq,{className:"h-8 border-border text-xs text-muted-foreground focus:ring-primary",children:(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(k.A,{className:"h-3 w-3"}),(0,e.jsx)(H.yv,{placeholder:al("tasks.addDependency")})]})}),(0,e.jsx)(H.gC,{children:bg.map(a=>(0,e.jsx)(H.eb,{value:a.uuid,children:(0,e.jsx)("span",{className:"truncate",children:a.title})},a.uuid))})]},aL.length)]})]}):a?(0,e.jsxs)(_.P.div,{variants:aa.qG,initial:"initial",animate:"animate",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:al("common.assignee")}),(0,e.jsx)("div",{className:"mt-2 flex items-center gap-2.5 rounded-lg bg-background p-3",children:a.assignee?(0,e.jsxs)(e.Fragment,{children:[(0,M.bB)(a.assignee)?(0,e.jsx)(K.AgentAvatar,{name:a.assignee.name,size:28,className:"rounded-full"}):(0,e.jsx)(J.eu,{className:"h-7 w-7",children:(0,e.jsx)(J.q5,{className:"bg-border text-muted-foreground",children:a.assignee.name.charAt(0).toUpperCase()})}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-sm font-medium text-foreground",children:a.assignee.name}),(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:(0,M.bB)(a.assignee)?`${al("common.agent")} • ${a.assignee.assignedAt?(0,$.r)(a.assignee.assignedAt):""}`:al("common.user")}),"agent_instance"===a.assignee.type&&a.assignee.instance&&(0,e.jsx)("div",{className:"mt-1",children:(0,e.jsx)(L.jQ,{cwd:a.assignee.instance.cwd,host:a.assignee.instance.host})})]})]}):(0,e.jsx)("span",{className:"text-sm text-[#9A9A9A]",children:al("common.unassigned")})})]}),aJ.length>0&&(0,e.jsxs)("div",{className:"mt-5",children:[(0,e.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:al("sessions.activeWorkers")}),(0,e.jsx)("div",{className:"mt-2 space-y-1.5",children:aJ.map(a=>(0,e.jsxs)("div",{className:"flex items-center gap-2.5 rounded-lg bg-background p-2.5",children:[(0,e.jsxs)("div",{className:"relative flex-shrink-0",children:[(0,e.jsx)(K.AgentAvatar,{name:a.agentName,size:28,className:"rounded-full"}),(0,e.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 h-2 w-2 rounded-full bg-green-500 ring-2 ring-background"})]}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-xs font-medium text-foreground truncate",children:a.sessionName}),(0,e.jsxs)("div",{className:"text-[10px] text-[#9A9A9A]",children:[a.agentName," \xb7 ",ad(a.checkinAt,al)]})]})]},a.sessionUuid))})]}),(0,e.jsxs)("div",{className:"mt-5",children:[(0,e.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:al("common.description")}),(0,e.jsx)("div",{className:"mt-2",children:a.description?(0,e.jsx)("div",{className:"prose prose-sm max-w-none text-[13px] leading-relaxed text-foreground",children:(0,e.jsx)(V.MarkdownContent,{children:a.description})}):(0,e.jsx)("p",{className:"text-sm italic text-[#9A9A9A]",children:al("common.noDescription")})})]}),a.acceptanceCriteria&&!(a.acceptanceCriteriaItems&&a.acceptanceCriteriaItems.length>0)&&(0,e.jsxs)("div",{className:"mt-5",children:[(0,e.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:al("tasks.acceptanceCriteria")}),(0,e.jsx)("div",{className:"mt-2",children:(0,e.jsx)("div",{className:"prose prose-sm max-w-none text-[13px] leading-relaxed text-foreground",children:(0,e.jsx)(V.MarkdownContent,{children:a.acceptanceCriteria})})})]}),av&&(0,e.jsxs)("div",{className:"mt-5",children:[(0,e.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:al("common.source")}),(0,e.jsx)("a",{href:`/projects/${b}/proposals/${av.uuid}`,className:"mt-2 flex items-center justify-between rounded-lg bg-background p-3 hover:bg-[#F0EDE5] dark:hover:bg-[#26241f] transition-colors",children:(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(n.A,{className:"h-3.5 w-3.5 text-primary"}),(0,e.jsx)("span",{className:"text-xs text-foreground",children:av.title})]})})]}),(0,e.jsxs)("div",{className:"mt-5",children:[(0,e.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:al("tasks.dependencies")}),aH&&(0,e.jsx)("div",{className:"mt-2 rounded-lg bg-destructive/10 p-2.5 text-xs text-destructive",children:aH}),aD?(0,e.jsx)("div",{className:"mt-2 flex items-center justify-center py-4",children:(0,e.jsx)(o.A,{className:"h-4 w-4 animate-spin text-[#9A9A9A]"})}):(0,e.jsxs)(e.Fragment,{children:[az.length>0&&(0,e.jsxs)("div",{className:"mt-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5",children:[(0,e.jsx)(p.A,{className:"h-3 w-3 text-[#9A9A9A]"}),(0,e.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:al("tasks.dependsOn")})]}),(0,e.jsx)("div",{className:"space-y-1.5",children:az.map(a=>(0,e.jsxs)("div",{className:"group flex items-center justify-between rounded-lg bg-background p-3",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,e.jsx)(i.A,{className:"h-3.5 w-3.5 shrink-0 text-primary"}),(0,e.jsx)("span",{className:"text-xs text-foreground truncate",children:a.title}),(0,e.jsx)(A.E,{className:`shrink-0 text-[10px] ${af[a.status]||""}`,children:al(`status.${ag[a.status]||a.status}`)})]}),(0,e.jsx)(C.$,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity ml-2 shrink-0",onClick:()=>bd(a.uuid),children:(0,e.jsx)(j.A,{className:"h-3.5 w-3.5 text-[#9A9A9A] hover:text-[#D32F2F]"})})]},a.uuid))})]}),aB.length>0&&(0,e.jsxs)("div",{className:"mt-3",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5",children:[(0,e.jsx)(p.A,{className:"h-3 w-3 rotate-180 text-[#9A9A9A]"}),(0,e.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:al("tasks.blockedByThis")})]}),(0,e.jsx)("div",{className:"space-y-1.5",children:aB.map(a=>(0,e.jsxs)("div",{className:"group flex items-center justify-between rounded-lg bg-background p-3",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,e.jsx)(i.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,e.jsx)("span",{className:"text-xs text-foreground truncate",children:a.title}),(0,e.jsx)(A.E,{className:`shrink-0 text-[10px] ${af[a.status]||""}`,children:al(`status.${ag[a.status]||a.status}`)})]}),(0,e.jsx)(C.$,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity ml-2 shrink-0",onClick:()=>be(a.uuid),children:(0,e.jsx)(j.A,{className:"h-3.5 w-3.5 text-[#9A9A9A] hover:text-[#D32F2F]"})})]},a.uuid))})]}),0===az.length&&0===aB.length&&(0,e.jsx)("p",{className:"mt-2 text-sm italic text-[#9A9A9A]",children:al("tasks.noDependencies")}),bf.length>0&&(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsxs)(H.l6,{onValueChange:a=>bc(a),children:[(0,e.jsx)(H.bq,{className:"h-8 border-border text-xs text-muted-foreground focus:ring-primary",children:(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(k.A,{className:"h-3 w-3"}),(0,e.jsx)(H.yv,{placeholder:al("tasks.addDependency")})]})}),(0,e.jsx)(H.gC,{children:bf.map(a=>(0,e.jsx)(H.eb,{value:a.uuid,children:(0,e.jsx)("span",{className:"truncate",children:a.title})},a.uuid))})]},az.length)})]})]}),a&&a.acceptanceCriteriaItems&&a.acceptanceCriteriaItems.length>0&&(()=>{let b=a.acceptanceCriteriaItems,c=a.acceptanceSummary,d=a=>"passed"===a?(0,e.jsx)(q.A,{className:"h-4 w-4 text-green-600 dark:text-[#6FD19A]"}):"failed"===a?(0,e.jsx)(r.A,{className:"h-4 w-4 text-red-600 dark:text-[#F08078]"}):(0,e.jsx)(s.A,{className:"h-4 w-4 text-yellow-600 dark:text-[#E0B44E]"}),f=a=>"passed"===a?"bg-green-50 text-green-700 dark:bg-[#14281a] dark:text-[#6FD19A]":"failed"===a?"bg-red-50 text-red-700 dark:bg-[#331619] dark:text-[#F08078]":"bg-yellow-50 text-yellow-700 dark:bg-[#332a12] dark:text-[#E0B44E]",g=async(b,c)=>{(await (0,R.h)(a.uuid,[{uuid:b,status:c}])).success&&am.refresh()};return(0,e.jsxs)("div",{className:"mt-5",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:al("acceptanceCriteria.title")}),c&&(0,e.jsx)(A.E,{className:f(a.acceptanceStatus||"pending"),variant:"secondary",children:al("acceptanceCriteria.progress",{passed:c.passed,total:c.total})})]}),(0,e.jsxs)("div",{className:"mt-2 space-y-2",children:[b.map(b=>(0,e.jsx)(B.Zp,{className:"p-3",children:(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)("div",{className:"mt-0.5 shrink-0",children:d(b.status)}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,e.jsx)("span",{className:"text-xs text-foreground",children:b.description}),(0,e.jsx)(A.E,{variant:"outline",className:"text-[10px] shrink-0",children:b.required?al("acceptanceCriteria.required"):al("acceptanceCriteria.optional")})]}),(0,e.jsxs)("div",{className:"mt-2 space-y-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 text-[10px]",children:[(0,e.jsx)("span",{className:"text-[#9A9A9A] w-20 shrink-0",children:al("acceptanceCriteria.devSelfCheck")}),(0,e.jsxs)(A.E,{className:`text-[10px] ${f(b.devStatus)}`,variant:"secondary",children:[d(b.devStatus),(0,e.jsx)("span",{className:"ml-1",children:al(`acceptanceCriteria.status.${b.devStatus}`)})]})]}),(0,e.jsxs)("div",{className:"flex items-center gap-2 text-[10px]",children:[(0,e.jsx)("span",{className:"text-[#9A9A9A] w-20 shrink-0",children:al("acceptanceCriteria.verification")}),(0,e.jsxs)(A.E,{className:`text-[10px] ${f(b.status)}`,variant:"secondary",children:[d(b.status),(0,e.jsx)("span",{className:"ml-1",children:al(`acceptanceCriteria.status.${b.status}`)})]})]})]}),b.devEvidence&&(0,e.jsxs)("div",{className:"mt-2 rounded bg-background p-2",children:[(0,e.jsx)("span",{className:"text-[10px] font-medium text-[#9A9A9A]",children:al("acceptanceCriteria.devEvidence")}),(0,e.jsx)("p",{className:"text-[11px] text-foreground mt-0.5",children:b.devEvidence})]}),b.evidence&&(0,e.jsxs)("div",{className:"mt-2 rounded bg-background p-2",children:[(0,e.jsx)("span",{className:"text-[10px] font-medium text-[#9A9A9A]",children:al("acceptanceCriteria.verifyEvidence")}),(0,e.jsx)("p",{className:"text-[11px] text-foreground mt-0.5",children:b.evidence})]}),"pending"===b.status?(0,e.jsxs)("div",{className:"mt-2 flex gap-2",children:[(0,e.jsxs)(C.$,{size:"sm",variant:"outline",className:"h-8 min-h-[44px] sm:min-h-0 flex-1 sm:flex-none text-xs text-green-700 dark:text-[#6FD19A] border-green-200 dark:border-[#2a4a34] hover:bg-green-50 dark:hover:bg-[#14281a]",onClick:()=>g(b.uuid,"passed"),children:[(0,e.jsx)(q.A,{className:"h-3.5 w-3.5 mr-1"}),al("acceptanceCriteria.pass")]}),(0,e.jsxs)(C.$,{size:"sm",variant:"outline",className:"h-8 min-h-[44px] sm:min-h-0 flex-1 sm:flex-none text-xs text-red-700 dark:text-[#F08078] border-red-200 dark:border-[#5a2a2e] hover:bg-red-50 dark:hover:bg-[#331619]",onClick:()=>g(b.uuid,"failed"),children:[(0,e.jsx)(r.A,{className:"h-3.5 w-3.5 mr-1"}),al("acceptanceCriteria.fail")]})]}):(0,e.jsx)("div",{className:"mt-2",children:(0,e.jsx)(C.$,{size:"sm",variant:"ghost",className:"h-7 min-h-[44px] sm:min-h-0 text-xs text-[#9A9A9A] hover:text-foreground",onClick:async()=>{(await (0,S.N)(a.uuid,b.uuid)).success&&am.refresh()},children:al("acceptanceCriteria.undoVerification")})})]})]})},b.uuid)),c&&(c.requiredPending>0||c.requiredFailed>0)&&(0,e.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-yellow-50 dark:bg-[#332a12] p-3 mt-2",children:[(0,e.jsx)(t.A,{className:"h-4 w-4 text-yellow-600 dark:text-[#E0B44E] shrink-0"}),(0,e.jsx)("span",{className:"text-xs text-yellow-700 dark:text-[#E0B44E]",children:al("acceptanceCriteria.gateBlocked",{count:c.requiredPending+c.requiredFailed})})]}),c&&0===c.requiredPending&&0===c.requiredFailed&&c.required>0&&(0,e.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-green-50 dark:bg-[#14281a] p-3 mt-2",children:[(0,e.jsx)(q.A,{className:"h-4 w-4 text-green-600 dark:text-[#6FD19A] shrink-0"}),(0,e.jsx)("span",{className:"text-xs text-green-700 dark:text-[#6FD19A]",children:al("acceptanceCriteria.gateReady")})]})]})]})})(),(0,e.jsxs)("div",{className:"mt-5 flex-1",children:[(0,e.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:al("common.activity")}),(0,e.jsx)("div",{className:"mt-2 space-y-3",children:at?(0,e.jsx)("div",{className:"flex items-center justify-center py-4",children:(0,e.jsx)(o.A,{className:"h-4 w-4 animate-spin text-[#9A9A9A]"})}):0===ar.length?(0,e.jsx)("p",{className:"text-sm text-[#9A9A9A] italic",children:al("common.noActivity")}):ar.map(a=>(0,e.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,e.jsx)("div",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-secondary",children:(0,e.jsx)("div",{className:`h-2 w-2 rounded-full ${function(a){switch(a){case"task_created":return"bg-primary";case"task_assigned":case"task_claimed":return"bg-[#1976D2]";case"task_started":return"bg-[#5A9E6F]";case"task_submitted":return"bg-[#7B1FA2]";case"task_completed":case"task_verified":return"bg-[#00796B]";case"task_released":return"bg-[#E65100]";default:return"bg-muted-foreground"}}(a.action)}`})}),(0,e.jsxs)("div",{className:"flex-1",children:[(0,e.jsx)("p",{className:"text-xs text-foreground",children:function(a,b){let c=a.sessionName?`${a.actorName} / ${a.sessionName}`:a.actorName,{action:d}=a;switch(d){case"task_created":return b("activity.taskCreated",{actor:c});case"task_assigned":return b("activity.taskAssigned",{actor:c});case"task_claimed":return b("activity.taskClaimed",{actor:c});case"task_started":return b("activity.taskStarted",{actor:c});case"task_submitted":return b("activity.taskSubmitted",{actor:c});case"task_completed":case"task_verified":return b("activity.taskCompleted",{actor:c});case"task_released":return b("activity.taskReleased",{actor:c});case"task_status_changed":return b("activity.taskStatusChanged",{actor:c});default:return`${c}: ${d}`}}(a,al)}),(0,e.jsx)("p",{className:"text-[10px] text-[#9A9A9A]",children:ad(a.createdAt,al)})]})]},a.uuid))})]}),(0,e.jsxs)("div",{className:"mt-5",children:[(0,e.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:al("references.title")}),(0,e.jsx)("div",{className:"mt-2",children:(0,e.jsx)(U.ReferencesSection,{targetType:"task",targetUuid:a.uuid,canWrite:!0,compact:!0})})]}),(0,e.jsxs)("div",{className:"mt-5",children:[(0,e.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:al("comments.title")}),(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)(T.$m,{targetType:"task",targetUuid:a.uuid,currentUserUuid:c,compact:!0})})]})]}):null})}),(0,e.jsx)("div",{className:"border-t border-secondary px-6 py-4",children:(0,e.jsx)("div",{className:"flex items-center gap-3",children:aO?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(C.$,{variant:"outline",className:"border-border",onClick:a9,disabled:a$,children:al("common.cancel")}),(0,e.jsx)(C.$,{className:"bg-primary hover:bg-[#B56A42] text-white",onClick:ba,disabled:a$||!aQ.trim(),children:a$?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(o.A,{className:"mr-2 h-4 w-4 animate-spin"}),al("common.saving")]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(u.A,{className:"mr-2 h-4 w-4"}),aN?al("common.create"):al("tasks.saveChanges")]})})]}):a?(0,e.jsxs)(e.Fragment,{children:["done"!==a.status&&"closed"!==a.status&&(0,e.jsxs)(C.$,{variant:"outline",className:"border-border",onClick:()=>ay(!0),disabled:ap,children:[(0,e.jsx)(v.A,{className:"mr-2 h-4 w-4"}),al("common.assign")]}),a5&&(0,e.jsxs)(C.$,{className:"flex-1 bg-[#1976D2] hover:bg-[#1565C0] text-white",onClick:()=>a8("in_progress"),disabled:ap,children:[(0,e.jsx)(w.A,{className:"mr-2 h-4 w-4"}),al("tasks.startWork")]}),a6&&(0,e.jsxs)(C.$,{className:"flex-1 bg-[#7B1FA2] hover:bg-[#6A1B9A] text-white",onClick:()=>a8("to_verify"),disabled:ap,children:[(0,e.jsx)(x.A,{className:"mr-2 h-4 w-4"}),al("tasks.submitForReview")]}),a7&&(0,e.jsxs)(C.$,{className:"flex-1 bg-[#22C55E] hover:bg-[#16A34A] text-white",onClick:()=>a8("done"),disabled:ap,children:[(0,e.jsx)(y.A,{className:"mr-2 h-4 w-4"}),al("tasks.markAsVerified")]}),("done"===a.status||"closed"===a.status)&&(0,e.jsx)("div",{className:"text-sm text-[#9A9A9A] text-center w-full",children:al("tasks.taskCompleted")}),(0,e.jsx)("div",{className:"ml-auto",children:(0,e.jsxs)(I.Lt,{children:[(0,e.jsx)(I.tv,{asChild:!0,children:(0,e.jsx)(C.$,{variant:"outline",size:"icon",className:"h-9 w-9 border-border text-[#D32F2F] dark:text-[#F08078] hover:bg-[#FFEBEE] dark:hover:bg-[#331619] hover:text-[#D32F2F] hover:border-[#D32F2F]",children:(0,e.jsx)(z.A,{className:"h-4 w-4"})})}),(0,e.jsxs)(I.EO,{children:[(0,e.jsxs)(I.wd,{children:[(0,e.jsx)(I.r7,{children:al("tasks.deleteTask")}),(0,e.jsx)(I.$v,{children:al("tasks.deleteTaskConfirm",{title:a.title})})]}),(0,e.jsxs)(I.ck,{children:[(0,e.jsx)(I.Zr,{children:al("common.cancel")}),(0,e.jsx)(I.Rx,{variant:"destructive",onClick:bb,disabled:a2,children:a2?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(o.A,{className:"mr-2 h-4 w-4 animate-spin"}),al("common.delete")]}):al("common.delete")})]})]})]})})]}):null})})]}),a&&ax&&(0,e.jsx)(X.Q,{task:a,projectUuid:b,currentUserUuid:c,onClose:()=>ay(!1)})]})}d()}catch(a){d(a)}})},86910:(a,b,c)=>{c.d(b,{h:()=>e});var d=c(42377);let e=(0,d.createServerReference)("402b5a6f7201b224278222f017735a809d74bb4203",d.callServer,void 0,d.findSourceMapURL,"getBatchWorkerCountsAction")},86933:(a,b,c)=>{c.d(b,{k:()=>e});var d=c(42377);let e=(0,d.createServerReference)("400ff4cf087940dcefd447269924b6361d9709f6e0",d.callServer,void 0,d.findSourceMapURL,"getProjectTasksForDependencyAction")},95506:(a,b,c)=>{c.d(b,{J:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40d444eda690d0c39eb7e9d3df9a87091ed3253448",d.callServer,void 0,d.findSourceMapURL,"getTaskSessionsAction")},98625:(a,b,c)=>{c.d(b,{T:()=>f});var d=c(21968),e=c(1007);function f(a,b){let c=(0,e.useSearchParams)(),f=(0,d.useRef)(!1),g=!f.current;f.current=!0;let h=c.get("panel")??(g?b??null:null),i=c.get("tab"),j=(0,d.useCallback)((b,c)=>{let d=new URLSearchParams(window.location.search);b?d.set("panel",b):d.delete("panel"),c?d.set("tab",c):d.delete("tab");let e=d.toString();return e?`${a}?${e}`:a},[a]),k=(0,d.useCallback)((a,b)=>{window.history.replaceState(null,"",j(a,b))},[j]),l=(0,d.useCallback)(()=>{window.history.replaceState(null,"",j(null))},[j]),m=(0,d.useCallback)(a=>{h&&window.history.replaceState(null,"",j(h,a))},[j,h]);return{selectedId:h,selectedTab:i,openPanel:k,closePanel:l,switchTab:m}}}};
|