commandmate 0.49.2 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +476 -423
- package/.next/app-path-routes-manifest.json +28 -21
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +9 -9
- package/.next/react-loadable-manifest.json +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +40 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/release-notes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/capabilities/route.js +1 -1
- package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/route.js +1 -1
- package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
- package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/status/route.js +1 -1
- package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
- package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/agent-event/route.js +1 -103
- package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/claude-done/route.js +2 -2
- package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/escalation/route.js +1 -1
- package/.next/server/app/api/push/escalation/route.js.nft.json +1 -1
- package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/subscriptions/route.js +1 -1
- package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/vapid/route.js +1 -1
- package/.next/server/app/api/push/vapid/route.js.nft.json +1 -1
- package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route.js +4 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/[relayId]/resolve/route.js +1 -0
- package/.next/server/app/api/relays/[relayId]/resolve/route.js.nft.json +1 -0
- package/.next/server/app/api/relays/[relayId]/resolve/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/relays/[relayId]/route.js +1 -1
- package/.next/server/app/api/relays/[relayId]/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/[relayId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/route.js +4 -1
- package/.next/server/app/api/relays/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/remote/pair/route.js +2 -2
- package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/role-defaults/route.js +1 -0
- package/.next/server/app/api/repositories/[id]/role-defaults/route.js.nft.json +1 -0
- package/.next/server/app/api/repositories/[id]/role-defaults/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/route.js +1 -1
- package/.next/server/app/api/repositories/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/validate-path/route.js +1 -1
- package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roles/[id]/route.js +1 -0
- package/.next/server/app/api/roles/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/roles/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/roles/route.js +1 -0
- package/.next/server/app/api/roles/route.js.nft.json +1 -0
- package/.next/server/app/api/roles/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/settings/agent-role-defaults/route.js +1 -0
- package/.next/server/app/api/settings/agent-role-defaults/route.js.nft.json +1 -0
- package/.next/server/app/api/settings/agent-role-defaults/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/settings/default-agents/route.js +1 -1
- package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/slash-commands/route.js +1 -1
- package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/route.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/route.js +1 -1
- package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-reference/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +3 -3
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/env/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/execution-logs/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/notes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/roles/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/instances/roles/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/instances/roles/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/instances/roles/settle/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/instances/roles/settle/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/instances/roles/settle/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/schedules/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js +1 -144
- package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -104
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -103
- package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/more/page.js +1 -1
- package/.next/server/app/more/page_client-reference-manifest.js +1 -1
- package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/repositories/page.js +2 -2
- package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page.js +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sessions/page.js +1 -1
- package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/page.js +10 -10
- package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +28 -21
- package/.next/server/chunks/1184.js +5 -0
- package/.next/server/chunks/1501.js +5 -5
- package/.next/server/chunks/1656.js +2 -2
- package/.next/server/chunks/1957.js +2 -2
- package/.next/server/chunks/1990.js +103 -0
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/2404.js +1 -1
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/2819.js +1 -0
- package/.next/server/chunks/2897.js +1 -1
- package/.next/server/chunks/3042.js +2 -0
- package/.next/server/chunks/3241.js +1 -1
- package/.next/server/chunks/3294.js +3 -0
- package/.next/server/chunks/3417.js +1 -1
- package/.next/server/chunks/3480.js +1 -1
- package/.next/server/chunks/3505.js +2 -6
- package/.next/server/chunks/3543.js +1 -1
- package/.next/server/chunks/3801.js +7 -7
- package/.next/server/chunks/3945.js +1 -1
- package/.next/server/chunks/4207.js +1 -1
- package/.next/server/chunks/454.js +1 -0
- package/.next/server/chunks/4645.js +1 -0
- package/.next/server/chunks/4911.js +1 -1
- package/.next/server/chunks/5209.js +2 -2
- package/.next/server/chunks/5350.js +216 -0
- package/.next/server/chunks/5354.js +1 -1
- package/.next/server/chunks/5571.js +1 -1
- package/.next/server/chunks/6009.js +12 -0
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/6285.js +1 -1
- package/.next/server/chunks/6401.js +1 -1
- package/.next/server/chunks/6486.js +2 -2
- package/.next/server/chunks/6569.js +1 -0
- package/.next/server/chunks/6781.js +1 -1
- package/.next/server/chunks/6793.js +4 -4
- package/.next/server/chunks/696.js +3 -0
- package/.next/server/chunks/7023.js +3 -3
- package/.next/server/chunks/7083.js +1 -0
- package/.next/server/chunks/741.js +1 -0
- package/.next/server/chunks/7662.js +1 -0
- package/.next/server/chunks/7905.js +1 -1
- package/.next/server/chunks/8143.js +33 -0
- package/.next/server/chunks/8581.js +6 -6
- package/.next/server/chunks/8728.js +2 -2
- package/.next/server/chunks/8782.js +1 -1
- package/.next/server/chunks/8807.js +181 -93
- package/.next/server/chunks/8918.js +3 -105
- package/.next/server/chunks/8955.js +1 -0
- package/.next/server/chunks/9169.js +1 -0
- package/.next/server/chunks/923.js +1 -0
- package/.next/server/chunks/9390.js +2 -2
- package/.next/server/chunks/9627.js +9 -9
- package/.next/server/chunks/973.js +1 -0
- package/.next/server/chunks/9731.js +3 -3
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/2314-2c9d587a27e8f731.js +1 -0
- package/.next/static/chunks/2407-ee881c99e218975b.js +1 -0
- package/.next/static/chunks/3931-24d7e245a93feb25.js +1 -0
- package/.next/static/chunks/4548-9afa02fd18afa6c7.js +1 -0
- package/.next/static/chunks/{5794-7975b8e51e731b19.js → 5794-38b3b504b3d97e04.js} +1 -1
- package/.next/static/chunks/{6966-d8dc6032410ffaba.js → 6966-dbfa4a43397f8c6d.js} +1 -1
- package/.next/static/chunks/7090-28e83f5a0efdb3b4.js +1 -0
- package/.next/static/chunks/7229.016d007c467a3600.js +1 -0
- package/.next/static/chunks/{8407-35bbfc84793d7004.js → 8407-dd6a8062fc449899.js} +1 -1
- package/.next/static/chunks/app/api/agents/update/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/agents/versions/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/app/release-notes/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/app/update/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/app/update-check/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/capabilities/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/fs/browse/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/fs/recent-paths/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/hooks/agent-event/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/hooks/permission-request/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/metrics/vibe/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/push/escalation/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/resolve/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/relays/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/remote/pair/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/role-defaults/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/validate-path/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/roles/[id]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/roles/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/settings/agent-role-defaults/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/settings/default-agents/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/skills/installations/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/skills/operations/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/skills/reindex/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/skills/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/templates/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/roles/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/roles/settle/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/layout-7bf800fcc5e025b1.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/more/{page-ff5af5ca48774c89.js → page-e8f5780f6e4fb657.js} +1 -1
- package/.next/static/chunks/app/{page-b4863bfe0452e09d.js → page-869f353a4ac4e15b.js} +1 -1
- package/.next/static/chunks/app/proxy/[...path]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/repositories/page-bedb505687010f18.js +1 -0
- package/.next/static/chunks/app/review/page-87c4a9b0de50fa80.js +1 -0
- package/.next/static/chunks/app/sessions/{page-c6eb7c02db2f4c80.js → page-82ca46793789fce4.js} +1 -1
- package/.next/static/chunks/app/worktrees/[id]/layout-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-570eb79fbbd1a934.js +1 -0
- package/.next/static/chunks/{webpack-838df0273b03af19.js → webpack-16b1a3143fa42ca0.js} +1 -1
- package/.next/static/css/d4f2c9522cf1b449.css +1 -0
- package/.next/static/z4d8-5MaLkoD-4EhueZwk/_buildManifest.js +1 -0
- package/.next/trace +14 -13
- package/.next/types/app/api/relays/[relayId]/resolve/route.ts +347 -0
- package/.next/types/app/api/repositories/[id]/role-defaults/route.ts +347 -0
- package/.next/types/app/api/roles/[id]/route.ts +347 -0
- package/.next/types/app/api/roles/route.ts +347 -0
- package/.next/types/app/api/settings/agent-role-defaults/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/instances/roles/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/instances/roles/settle/route.ts +347 -0
- package/.next/types/routes.d.ts +8 -1
- package/.next/types/validator.ts +63 -0
- package/dist/cli/commands/instances.d.ts +1 -0
- package/dist/cli/commands/instances.d.ts.map +1 -1
- package/dist/cli/commands/instances.js +290 -33
- package/dist/cli/commands/message-dispatch.d.ts +25 -3
- package/dist/cli/commands/message-dispatch.d.ts.map +1 -1
- package/dist/cli/commands/message-dispatch.js +26 -6
- package/dist/cli/commands/prompt.d.ts.map +1 -1
- package/dist/cli/commands/prompt.js +2 -1
- package/dist/cli/commands/relays.d.ts +7 -0
- package/dist/cli/commands/relays.d.ts.map +1 -1
- package/dist/cli/commands/relays.js +179 -6
- package/dist/cli/commands/report.d.ts +7 -2
- package/dist/cli/commands/report.d.ts.map +1 -1
- package/dist/cli/commands/report.js +19 -6
- package/dist/cli/commands/respond-strict.d.ts.map +1 -1
- package/dist/cli/commands/respond-strict.js +9 -2
- package/dist/cli/commands/roles.d.ts +11 -0
- package/dist/cli/commands/roles.d.ts.map +1 -0
- package/dist/cli/commands/roles.js +392 -0
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +526 -38
- package/dist/cli/commands/task.d.ts +22 -0
- package/dist/cli/commands/task.d.ts.map +1 -1
- package/dist/cli/commands/task.js +26 -18
- package/dist/cli/docs/agent-operations.d.ts +1 -1
- package/dist/cli/docs/agent-operations.d.ts.map +1 -1
- package/dist/cli/docs/agent-operations.js +91 -3
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +6 -0
- package/dist/cli/types/api-responses.d.ts +106 -0
- package/dist/cli/types/api-responses.d.ts.map +1 -1
- package/dist/cli/types/index.d.ts +38 -0
- package/dist/cli/types/index.d.ts.map +1 -1
- package/dist/cli/types/index.js +15 -1
- package/dist/cli/utils/agent-instances.d.ts +29 -1
- package/dist/cli/utils/agent-instances.d.ts.map +1 -1
- package/dist/cli/utils/agent-instances.js +67 -7
- package/dist/cli/utils/agent-roles.d.ts +75 -0
- package/dist/cli/utils/agent-roles.d.ts.map +1 -0
- package/dist/cli/utils/agent-roles.js +238 -0
- package/dist/cli/utils/api-client-deadline.d.ts +28 -0
- package/dist/cli/utils/api-client-deadline.d.ts.map +1 -0
- package/dist/cli/utils/api-client-deadline.js +46 -0
- package/dist/cli/utils/api-client-errors.d.ts +140 -0
- package/dist/cli/utils/api-client-errors.d.ts.map +1 -0
- package/dist/cli/utils/api-client-errors.js +222 -0
- package/dist/cli/utils/api-client.d.ts +9 -131
- package/dist/cli/utils/api-client.d.ts.map +1 -1
- package/dist/cli/utils/api-client.js +43 -258
- package/dist/cli/utils/role-failure.d.ts +31 -0
- package/dist/cli/utils/role-failure.d.ts.map +1 -0
- package/dist/cli/utils/role-failure.js +90 -0
- package/dist/cli/utils/role-input.d.ts +16 -0
- package/dist/cli/utils/role-input.d.ts.map +1 -0
- package/dist/cli/utils/role-input.js +78 -0
- package/dist/cli/utils/security-logger.d.ts +17 -0
- package/dist/cli/utils/security-logger.d.ts.map +1 -1
- package/dist/cli/utils/security-logger.js +44 -5
- package/dist/lib/cli-tools/types.d.ts +6 -0
- package/dist/lib/cli-tools/types.d.ts.map +1 -1
- package/dist/lib/detection/tools/verified-against.d.ts +16 -0
- package/dist/lib/detection/tools/verified-against.d.ts.map +1 -1
- package/dist/lib/detection/tools/verified-against.js +16 -0
- package/dist/lib/session/send-attempt-types.d.ts +4 -0
- package/dist/lib/session/send-attempt-types.d.ts.map +1 -1
- package/dist/lib/verification/verify-config.d.ts +22 -0
- package/dist/lib/verification/verify-config.d.ts.map +1 -1
- package/dist/lib/verification/verify-config.js +32 -2
- package/dist/server/locales/en/worktree.json +30 -4
- package/dist/server/locales/ja/worktree.json +30 -4
- package/dist/server/src/config/safe-directory.js +30 -0
- package/dist/server/src/lib/agent-roles/adapters.js +174 -0
- package/dist/server/src/lib/agent-roles/artifacts.js +638 -0
- package/dist/server/src/lib/agent-roles/composition.js +222 -0
- package/dist/server/src/lib/agent-roles/fingerprint.js +21 -0
- package/dist/server/src/lib/agent-roles/jsonc.js +85 -0
- package/dist/server/src/lib/agent-roles/launch-errors.js +58 -0
- package/dist/server/src/lib/agent-roles/pane-env.js +63 -0
- package/dist/server/src/lib/agent-roles/resolve.js +375 -0
- package/dist/server/src/lib/agent-roles/toml-basic.js +140 -0
- package/dist/server/src/lib/agent-roles/unicode.js +16 -0
- package/dist/server/src/lib/agent-roles/validation.js +61 -0
- package/dist/server/src/lib/cli-tools/antigravity.js +39 -6
- package/dist/server/src/lib/cli-tools/base.js +63 -5
- package/dist/server/src/lib/cli-tools/claude-auto-default-nudge.js +141 -0
- package/dist/server/src/lib/cli-tools/claude.js +15 -3
- package/dist/server/src/lib/cli-tools/codex.js +134 -21
- package/dist/server/src/lib/cli-tools/command-code.js +28 -13
- package/dist/server/src/lib/cli-tools/copilot.js +189 -31
- package/dist/server/src/lib/cli-tools/gemini.js +37 -3
- package/dist/server/src/lib/cli-tools/launch-answer-skips.js +76 -0
- package/dist/server/src/lib/cli-tools/opencode-v2.js +10 -0
- package/dist/server/src/lib/cli-tools/opencode.js +214 -12
- package/dist/server/src/lib/cli-tools/prompt-wait-dialog.js +115 -0
- package/dist/server/src/lib/cli-tools/submit-composer-read.js +65 -12
- package/dist/server/src/lib/cli-tools/submit-verified-sender-composer.js +78 -0
- package/dist/server/src/lib/cli-tools/submit-verified-sender-lock.js +116 -0
- package/dist/server/src/lib/cli-tools/submit-verified-sender-report.js +250 -0
- package/dist/server/src/lib/cli-tools/submit-verified-sender-shared.js +106 -0
- package/dist/server/src/lib/cli-tools/submit-verified-sender.js +94 -295
- package/dist/server/src/lib/cli-tools/vibe-local.js +111 -0
- package/dist/server/src/lib/db/agent-instances-db.js +53 -0
- package/dist/server/src/lib/db/agent-roles-db.js +409 -0
- package/dist/server/src/lib/db/agent-session-cost-sampler.js +3 -2
- package/dist/server/src/lib/db/chat-db.js +14 -1
- package/dist/server/src/lib/db/db-instance.js +84 -2
- package/dist/server/src/lib/db/migrations/index.js +6 -0
- package/dist/server/src/lib/db/migrations/runner.js +1 -1
- package/dist/server/src/lib/db/migrations/v63-session-relays-delivery-attempt.js +61 -0
- package/dist/server/src/lib/db/migrations/v64-agent-roles.js +123 -0
- package/dist/server/src/lib/db/migrations/v65-agent-instance-creation-keys.js +42 -0
- package/dist/server/src/lib/db/relay-bind-db-base.js +89 -0
- package/dist/server/src/lib/db/relay-bind-db-delivery.js +223 -0
- package/dist/server/src/lib/db/relay-bind-db-pending.js +183 -0
- package/dist/server/src/lib/db/relay-bind-db.js +88 -167
- package/dist/server/src/lib/db/relay-db-base.js +20 -0
- package/dist/server/src/lib/db/relay-db-count.js +49 -0
- package/dist/server/src/lib/db/relay-db-delivery.js +104 -0
- package/dist/server/src/lib/db/relay-db-hold.js +250 -0
- package/dist/server/src/lib/db/relay-db.js +68 -92
- package/dist/server/src/lib/detection/cli-patterns.js +13 -3
- package/dist/server/src/lib/detection/model-info-extractor.js +1 -1
- package/dist/server/src/lib/detection/tools/claude/patterns.js +76 -0
- package/dist/server/src/lib/detection/tools/codex/cli-patterns.js +5 -0
- package/dist/server/src/lib/detection/tools/codex/detect.js +5 -1
- package/dist/server/src/lib/detection/tools/codex/patterns.js +52 -2
- package/dist/server/src/lib/detection/tools/codex/prompt.js +23 -3
- package/dist/server/src/lib/detection/tools/opencode/composer-own-text.js +119 -0
- package/dist/server/src/lib/detection/tools/opencode/detect.js +30 -15
- package/dist/server/src/lib/detection/tools/opencode/patterns.js +268 -7
- package/dist/server/src/lib/detection/tools/opencode/readiness.js +71 -0
- package/dist/server/src/lib/detection/tools/opencode-v2/detect.js +51 -15
- package/dist/server/src/lib/detection/tools/opencode-v2/patterns.js +195 -11
- package/dist/server/src/lib/detection/tools/run-detection.js +5 -2
- package/dist/server/src/lib/detection/tools/verified-against.js +16 -0
- package/dist/server/src/lib/detection/tools/vibe-local/readiness.js +92 -0
- package/dist/server/src/lib/git/git-common-dir.js +192 -0
- package/dist/server/src/lib/hooks/hook-settings-generator.js +8 -2
- package/dist/server/src/lib/hooks/sources/copilot/hook-settings.js +31 -1
- package/dist/server/src/lib/hooks/sources/launch-command.js +31 -8
- package/dist/server/src/lib/hooks/sources/opencode/client.js +20 -0
- package/dist/server/src/lib/hooks/sources/opencode-v2/client.js +24 -0
- package/dist/server/src/lib/hooks/sources/opencode-v2/history.js +208 -35
- package/dist/server/src/lib/hooks/sources/opencode-v2/secrets.js +7 -1
- package/dist/server/src/lib/hooks/sources/opencode-v2/subscription.js +117 -2
- package/dist/server/src/lib/job-executor.js +18 -1
- package/dist/server/src/lib/polling/response-checker-extraction-steps.js +58 -4
- package/dist/server/src/lib/polling/response-checker.js +32 -7
- package/dist/server/src/lib/relay/relay-bound-reply.js +20 -9
- package/dist/server/src/lib/relay/relay-delivery-block.js +150 -0
- package/dist/server/src/lib/relay/relay-delivery.js +416 -79
- package/dist/server/src/lib/relay/relay-messages.js +13 -0
- package/dist/server/src/lib/relay/relay-system-line.js +28 -15
- package/dist/server/src/lib/relay/types.js +14 -2
- package/dist/server/src/lib/response-cleaner.js +13 -3
- package/dist/server/src/lib/response-extractor.js +38 -3
- package/dist/server/src/lib/session/agent-session-lifecycle.js +9 -1
- package/dist/server/src/lib/session/claude-executor.js +13 -1
- package/dist/server/src/lib/session/claude-session.js +113 -14
- package/dist/server/src/lib/session/current-output-builder.js +7 -5
- package/dist/server/src/lib/session/instance-input-lock.js +140 -6
- package/dist/server/src/lib/session/prompt-submit-receipt.js +87 -18
- package/dist/server/src/lib/session/prompt-waiting-guard.js +8 -2
- package/dist/server/src/lib/session/respond-target.js +82 -0
- package/dist/server/src/lib/session/role-launch.js +722 -0
- package/dist/server/src/lib/session/send-attempt-state.js +137 -3
- package/dist/server/src/lib/session/send-user-message.js +84 -7
- package/dist/server/src/lib/session/session-generation-archive.js +7 -8
- package/dist/server/src/lib/session/session-launch-flight.js +33 -1
- package/dist/server/src/lib/session/structured-prompt.js +12 -7
- package/dist/server/src/lib/session/worktree-session-reconcile.js +15 -0
- package/dist/server/src/lib/session-key-sender.js +6 -1
- package/dist/server/src/lib/test-run-detection.js +53 -0
- package/dist/server/src/lib/tmux/read-mode.js +4 -0
- package/dist/server/src/lib/tmux/session-hook-scripts.js +36 -4
- package/dist/server/src/lib/tui-accumulator.js +14 -5
- package/dist/server/src/lib/verification/env-clean-gate.js +117 -12
- package/dist/server/src/lib/verification/gate-runner.js +9 -8
- package/dist/server/src/lib/verification/verify-config.js +32 -2
- package/dist/server/src/types/agent-roles.js +56 -0
- package/dist/types/agent-roles.d.ts +351 -0
- package/dist/types/agent-roles.d.ts.map +1 -0
- package/dist/types/agent-roles.js +56 -0
- package/docs/en/user-guide/webapp-guide.md +16 -0
- package/package.json +2 -1
- package/release-notes/0.49.3.json +52 -0
- package/release-notes/0.50.0.json +113 -0
- package/.next/server/chunks/1062.js +0 -1
- package/.next/server/chunks/110.js +0 -1
- package/.next/server/chunks/2422.js +0 -1
- package/.next/server/chunks/3756.js +0 -1
- package/.next/server/chunks/4936.js +0 -1
- package/.next/server/chunks/5630.js +0 -1
- package/.next/server/chunks/610.js +0 -1
- package/.next/server/chunks/6119.js +0 -1
- package/.next/server/chunks/6808.js +0 -4
- package/.next/server/chunks/7491.js +0 -3
- package/.next/server/chunks/9198.js +0 -144
- package/.next/server/chunks/9360.js +0 -2
- package/.next/server/chunks/9584.js +0 -1
- package/.next/static/chunks/2407-07a237575e1ceb9e.js +0 -1
- package/.next/static/chunks/344-e1cefd00787060e4.js +0 -1
- package/.next/static/chunks/3931-61ad1a4fc0208d0e.js +0 -1
- package/.next/static/chunks/7229.7f0f5a7032b612b4.js +0 -1
- package/.next/static/chunks/8165-263172c17ae8e8c3.js +0 -1
- package/.next/static/chunks/app/api/agents/update/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/agents/versions/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/app/release-notes/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/app/update/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/app/update-check/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/capabilities/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/fs/browse/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/fs/recent-paths/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/hooks/agent-event/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/hooks/permission-request/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/metrics/vibe/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/push/escalation/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/relays/[relayId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/relays/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/remote/pair/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/validate-path/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/settings/default-agents/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/skills/[id]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/skills/installations/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/skills/operations/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/skills/reindex/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/skills/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/templates/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/layout-4f64316957b0a8e5.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/repositories/page-71f5a5ac29b0370d.js +0 -1
- package/.next/static/chunks/app/review/page-ff3efb96fdf9bb4b.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/layout-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-33afc6aa96289fb0.js +0 -1
- package/.next/static/css/c1e307d05daf93b6.css +0 -1
- package/.next/static/yGatWDsS532awSs51kXyd/_buildManifest.js +0 -1
- /package/.next/static/{yGatWDsS532awSs51kXyd → z4d8-5MaLkoD-4EhueZwk}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,722 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setLaunchRoleDatabaseForTest = setLaunchRoleDatabaseForTest;
|
|
4
|
+
exports.resolveLaunchRole = resolveLaunchRole;
|
|
5
|
+
exports.requestLaunchRole = requestLaunchRole;
|
|
6
|
+
exports.prepareRoleLaunch = prepareRoleLaunch;
|
|
7
|
+
exports.runWithLaunchRole = runWithLaunchRole;
|
|
8
|
+
exports.gateLaunchRole = gateLaunchRole;
|
|
9
|
+
exports.noteLaunchProcessReplaced = noteLaunchProcessReplaced;
|
|
10
|
+
exports.noteLaunchResumedConversation = noteLaunchResumedConversation;
|
|
11
|
+
exports.renderLaunchCommandWithRole = renderLaunchCommandWithRole;
|
|
12
|
+
exports.settleLaunchRole = settleLaunchRole;
|
|
13
|
+
exports.getLaunchRoleEvidence = getLaunchRoleEvidence;
|
|
14
|
+
exports.runningRoleProblem = runningRoleProblem;
|
|
15
|
+
exports.settingsGiveRole = settingsGiveRole;
|
|
16
|
+
exports.forgetLaunchRoleEvidence = forgetLaunchRoleEvidence;
|
|
17
|
+
exports.readLaunchRoleEpoch = readLaunchRoleEpoch;
|
|
18
|
+
exports.assertNotStoppedWhileResolving = assertNotStoppedWhileResolving;
|
|
19
|
+
exports.wasResumedAcrossRole = wasResumedAcrossRole;
|
|
20
|
+
exports.takeResumedAcrossRoleNotice = takeResumedAcrossRoleNotice;
|
|
21
|
+
exports.moveLaunchRoleEvidence = moveLaunchRoleEvidence;
|
|
22
|
+
exports.resolveScheduleRole = resolveScheduleRole;
|
|
23
|
+
exports.resetLaunchRoleStateForTest = resetLaunchRoleStateForTest;
|
|
24
|
+
exports.recomputeInjectionFingerprint = recomputeInjectionFingerprint;
|
|
25
|
+
/**
|
|
26
|
+
* The one way a role gets into a launch (Issue #4115, Epic #4112).
|
|
27
|
+
*
|
|
28
|
+
* Every interactive start goes through `BaseCLITool.startSession`, including the
|
|
29
|
+
* relaunch a driver does inside a send, and that calls {@link requestLaunchRole}
|
|
30
|
+
* once. The answer is a frozen {@link LaunchRoleSnapshot}. It reaches the launch
|
|
31
|
+
* line through an `AsyncLocalStorage`, because `AgentLaunchContext` must not carry
|
|
32
|
+
* the database and seven `launchSession` signatures need not change.
|
|
33
|
+
*
|
|
34
|
+
* ## "The same role"
|
|
35
|
+
*
|
|
36
|
+
* - A new launch resolves the latest settings.
|
|
37
|
+
* - Retries inside one launch (Codex's relaunch after its update) use the same
|
|
38
|
+
* snapshot, and {@link noteLaunchProcessReplaced} moves the generation on, so the
|
|
39
|
+
* `launched` record names the process that is actually there at the end.
|
|
40
|
+
* - A process being reused gets nothing: only a launch line that was really built
|
|
41
|
+
* opens a generation, so reconnecting never records anything as applied.
|
|
42
|
+
*
|
|
43
|
+
* ## Refusals
|
|
44
|
+
*
|
|
45
|
+
* A snapshot can carry a refusal instead of a role. It is thrown when a launch would
|
|
46
|
+
* actually happen, so a live process can still be reconnected to (its role was
|
|
47
|
+
* fixed when it started). It never falls back to "no role", and it does not use
|
|
48
|
+
* `prepareLaunch`'s fail-open: many CLIs carry on without a role when handed a bad
|
|
49
|
+
* one (§8), so the file is inspected before anything is typed.
|
|
50
|
+
*
|
|
51
|
+
* ## Evidence
|
|
52
|
+
*
|
|
53
|
+
* {@link getLaunchRoleEvidence} is what this server knows about the process it
|
|
54
|
+
* started: the generation and what it injected, in memory. After a server restart
|
|
55
|
+
* there is none, and the state reads as unknown rather than as whatever the last
|
|
56
|
+
* record said. The `launched` record is written only on the evidence §14 lists per
|
|
57
|
+
* adapter; with none (Command Code, Antigravity) it stays unknown.
|
|
58
|
+
*
|
|
59
|
+
* @module lib/session/role-launch
|
|
60
|
+
*/
|
|
61
|
+
const async_hooks_1 = require("async_hooks");
|
|
62
|
+
const crypto_1 = require("crypto");
|
|
63
|
+
const auto_yes_state_1 = require("../../lib/auto-yes-state");
|
|
64
|
+
const global_state_1 = require("../../lib/global-state");
|
|
65
|
+
const logger_1 = require("../../lib/logger");
|
|
66
|
+
const db_instance_1 = require("../../lib/db/db-instance");
|
|
67
|
+
const agent_roles_db_1 = require("../../lib/db/agent-roles-db");
|
|
68
|
+
const launch_command_1 = require("../../lib/hooks/sources/launch-command");
|
|
69
|
+
const fingerprint_1 = require("../../lib/agent-roles/fingerprint");
|
|
70
|
+
const adapters_1 = require("../../lib/agent-roles/adapters");
|
|
71
|
+
const artifacts_1 = require("../../lib/agent-roles/artifacts");
|
|
72
|
+
const composition_1 = require("../../lib/agent-roles/composition");
|
|
73
|
+
const launch_errors_1 = require("../../lib/agent-roles/launch-errors");
|
|
74
|
+
const resolve_1 = require("../../lib/agent-roles/resolve");
|
|
75
|
+
const uat_isolation_1 = require("../../config/uat-isolation");
|
|
76
|
+
const test_run_detection_1 = require("../../lib/test-run-detection");
|
|
77
|
+
const agent_roles_1 = require("../../types/agent-roles");
|
|
78
|
+
const logger = (0, logger_1.createLogger)('session/role-launch');
|
|
79
|
+
/**
|
|
80
|
+
* The database a launch resolves through, or null when there is none. In a test run
|
|
81
|
+
* that is none unless the test hands one in: `getDbInstance()` creates a file when
|
|
82
|
+
* there is none, and hundreds of suites drive `startSession` with tmux mocked
|
|
83
|
+
* (the same rule as `resolveSessionArchiveDatabase`).
|
|
84
|
+
*/
|
|
85
|
+
function launchRoleDatabase() {
|
|
86
|
+
if ((0, test_run_detection_1.isUnderTest)())
|
|
87
|
+
return globalThis.__launchRoleTestDb ?? null;
|
|
88
|
+
return (0, db_instance_1.getDbInstance)();
|
|
89
|
+
}
|
|
90
|
+
/** Point the launch path at a database. Test-only. */
|
|
91
|
+
function setLaunchRoleDatabaseForTest(db) {
|
|
92
|
+
globalThis.__launchRoleTestDb = db;
|
|
93
|
+
}
|
|
94
|
+
// ---------------------------------------------------------------------------
|
|
95
|
+
// Resolving
|
|
96
|
+
// ---------------------------------------------------------------------------
|
|
97
|
+
function refused(db, target, reason, message, resolution = null) {
|
|
98
|
+
return Object.freeze({
|
|
99
|
+
target,
|
|
100
|
+
db,
|
|
101
|
+
resolution,
|
|
102
|
+
membership: null,
|
|
103
|
+
composition: null,
|
|
104
|
+
injection: null,
|
|
105
|
+
injectionFingerprint: null,
|
|
106
|
+
refusal: new launch_errors_1.RoleLaunchRefusedError(reason, message),
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function noRoleFastPath(db, target) {
|
|
110
|
+
const resolution = {
|
|
111
|
+
cliToolId: target.cliToolId,
|
|
112
|
+
repositoryId: null,
|
|
113
|
+
repositoryIds: [],
|
|
114
|
+
kind: 'none',
|
|
115
|
+
source: 'fallback',
|
|
116
|
+
reason: 'no-default',
|
|
117
|
+
};
|
|
118
|
+
return Object.freeze({
|
|
119
|
+
target,
|
|
120
|
+
db,
|
|
121
|
+
resolution,
|
|
122
|
+
membership: null,
|
|
123
|
+
composition: null,
|
|
124
|
+
injection: null,
|
|
125
|
+
injectionFingerprint: null,
|
|
126
|
+
refusal: null,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/** Git failing once should not stop a launch, so an undetermined answer is asked once more. */
|
|
130
|
+
const MEMBERSHIP_ATTEMPTS = 2;
|
|
131
|
+
/**
|
|
132
|
+
* Resolve the role and everything it takes to compute what would be injected. Never
|
|
133
|
+
* throws: a problem is a snapshot with a refusal, so a caller has one thing to read.
|
|
134
|
+
*/
|
|
135
|
+
async function resolveLaunchRole(db, input, deps = {}) {
|
|
136
|
+
const target = {
|
|
137
|
+
worktreeId: input.worktreeId,
|
|
138
|
+
cliToolId: input.cliToolId,
|
|
139
|
+
instanceId: input.instanceId,
|
|
140
|
+
};
|
|
141
|
+
const instanceId = input.instanceId ?? input.cliToolId;
|
|
142
|
+
let answer = null;
|
|
143
|
+
try {
|
|
144
|
+
for (let attempt = 0; attempt < MEMBERSHIP_ATTEMPTS; attempt += 1) {
|
|
145
|
+
answer = await (0, resolve_1.withSettledWorktreeMembership)(db, input.worktreeId, deps, (worktree, membership) => {
|
|
146
|
+
const stored = input.defaultsOnly
|
|
147
|
+
? { state: 'inherit' }
|
|
148
|
+
: (0, agent_roles_db_1.getInstanceRoleState)(db, worktree.id, instanceId);
|
|
149
|
+
return { resolution: (0, resolve_1.resolveDefaultsForTool)(db, input.cliToolId, membership, stored), membership };
|
|
150
|
+
});
|
|
151
|
+
const { resolution } = answer;
|
|
152
|
+
if (resolution.kind !== 'ambiguous' || resolution.reason !== 'membership-undetermined')
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
if (error instanceof resolve_1.AgentRoleTargetNotFoundError) {
|
|
158
|
+
return refused(db, target, 'resolve-failed', error.message);
|
|
159
|
+
}
|
|
160
|
+
logger.warn('role-resolve-failed', { error: error instanceof Error ? error.message : String(error) });
|
|
161
|
+
return refused(db, target, 'resolve-failed', 'The role could not be resolved');
|
|
162
|
+
}
|
|
163
|
+
const { resolution, membership } = answer;
|
|
164
|
+
if (resolution.kind === 'ambiguous') {
|
|
165
|
+
const roots = resolution.roots.map((root) => root.path).join(', ');
|
|
166
|
+
return refused(db, target, resolution.reason, resolution.reason === 'root-settings-differ'
|
|
167
|
+
? `The registered roots of this repository hold different role settings for ${input.cliToolId} (${roots}); make them agree or disable one`
|
|
168
|
+
: `Git could not say whether these registered roots belong to this repository (${roots}), and they would change the role of ${input.cliToolId}; retry, or fix or disable the root`, resolution);
|
|
169
|
+
}
|
|
170
|
+
if (resolution.kind === 'none') {
|
|
171
|
+
return Object.freeze({
|
|
172
|
+
target,
|
|
173
|
+
db,
|
|
174
|
+
resolution,
|
|
175
|
+
membership,
|
|
176
|
+
composition: null,
|
|
177
|
+
injection: null,
|
|
178
|
+
injectionFingerprint: null,
|
|
179
|
+
refusal: null,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
const adapter = input.cliToolId;
|
|
183
|
+
if (!(0, agent_roles_1.isAgentRoleAdapterEnabled)(adapter)) {
|
|
184
|
+
return refused(db, target, 'adapter-disabled', `Roles are not enabled for ${adapter} yet; it has a role "${resolution.role.name}", so it was not started without it`, resolution);
|
|
185
|
+
}
|
|
186
|
+
let composition;
|
|
187
|
+
try {
|
|
188
|
+
composition = input.composition ?? await (0, composition_1.loadRoleComposition)(adapter, {
|
|
189
|
+
worktreePath: input.worktreePath,
|
|
190
|
+
readEnv: input.readEnv,
|
|
191
|
+
explicitAgent: input.explicitAgent,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
const message = error instanceof composition_1.RoleCompositionError ? error.message : 'The settings to compose with could not be read';
|
|
196
|
+
return refused(db, target, 'composition-failed', message, resolution);
|
|
197
|
+
}
|
|
198
|
+
const injection = (0, adapters_1.computeRoleInjection)(adapter, resolution.role, composition);
|
|
199
|
+
return Object.freeze({
|
|
200
|
+
target,
|
|
201
|
+
db,
|
|
202
|
+
resolution,
|
|
203
|
+
membership,
|
|
204
|
+
composition,
|
|
205
|
+
injection,
|
|
206
|
+
injectionFingerprint: injection.injectionFingerprint,
|
|
207
|
+
refusal: null,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* The entry a start goes through.
|
|
212
|
+
*
|
|
213
|
+
* @returns Null when the role layer does not apply (a tool outside D3, or no
|
|
214
|
+
* database). A snapshot synchronously when no role is configured anywhere, so
|
|
215
|
+
* such a start registers its flight in the same tick as it always did (R4 of
|
|
216
|
+
* `session-launch-flight`) and runs no git. Otherwise a promise, rejected only
|
|
217
|
+
* with a {@link RoleLaunchRefusedError} when the database cannot be read at all.
|
|
218
|
+
*/
|
|
219
|
+
function requestLaunchRole(target, worktreePath, readEnv) {
|
|
220
|
+
if (!(0, agent_roles_1.isAgentRoleCliTool)(target.cliToolId))
|
|
221
|
+
return null;
|
|
222
|
+
let db;
|
|
223
|
+
try {
|
|
224
|
+
db = launchRoleDatabase();
|
|
225
|
+
if (db === null)
|
|
226
|
+
return null;
|
|
227
|
+
if (!(0, agent_roles_db_1.hasAnyRoleSetting)(db))
|
|
228
|
+
return noRoleFastPath(db, target);
|
|
229
|
+
}
|
|
230
|
+
catch (error) {
|
|
231
|
+
logger.warn('role-database-unavailable', { error: error instanceof Error ? error.message : String(error) });
|
|
232
|
+
return Promise.reject(new launch_errors_1.RoleLaunchRefusedError('resolve-failed', 'The database could not be read to resolve the role'));
|
|
233
|
+
}
|
|
234
|
+
return resolveLaunchRole(db, { ...target, worktreePath, readEnv });
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Write and inspect the file (§5) and work out how it reaches the CLI.
|
|
238
|
+
*
|
|
239
|
+
* @throws {RoleLaunchRefusedError} It cannot be used; nothing about it reaches a CLI
|
|
240
|
+
*/
|
|
241
|
+
function prepareRoleLaunch(snapshot) {
|
|
242
|
+
const { injection, resolution, composition, db } = snapshot;
|
|
243
|
+
if (injection === null)
|
|
244
|
+
return null;
|
|
245
|
+
if (resolution?.kind !== 'role')
|
|
246
|
+
throw new launch_errors_1.RoleLaunchRefusedError('resolve-failed', 'The role was not resolved');
|
|
247
|
+
try {
|
|
248
|
+
const name = (0, artifacts_1.buildArtifactName)({
|
|
249
|
+
namespace: (0, artifacts_1.deriveServerNamespace)(db.name),
|
|
250
|
+
roleId: resolution.role.id,
|
|
251
|
+
injectionFingerprint: injection.injectionFingerprint,
|
|
252
|
+
});
|
|
253
|
+
const artifact = (0, artifacts_1.writeRoleArtifact)({ adapter: injection.adapter, name, instructions: injection.instructions });
|
|
254
|
+
(0, artifacts_1.inspectRoleArtifact)({
|
|
255
|
+
adapter: injection.adapter,
|
|
256
|
+
name,
|
|
257
|
+
path: artifact.path,
|
|
258
|
+
expectedFingerprint: artifact.artifactFingerprint,
|
|
259
|
+
});
|
|
260
|
+
return { artifact, args: (0, adapters_1.buildRoleLaunchArguments)(injection, artifact, composition ?? {}) };
|
|
261
|
+
}
|
|
262
|
+
catch (error) {
|
|
263
|
+
if (error instanceof artifacts_1.RoleArtifactError || error instanceof uat_isolation_1.UatIsolationLaunchRefusedError) {
|
|
264
|
+
throw new launch_errors_1.RoleLaunchRefusedError('artifact-failed', error.message);
|
|
265
|
+
}
|
|
266
|
+
throw new launch_errors_1.RoleLaunchRefusedError('artifact-failed', `The role's file could not be prepared: ${error.message}`);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
function scope() {
|
|
270
|
+
return (0, global_state_1.getOrInitGlobal)('__launchRoleScope', () => new async_hooks_1.AsyncLocalStorage());
|
|
271
|
+
}
|
|
272
|
+
function evidenceMap() {
|
|
273
|
+
return (0, global_state_1.getOrInitGlobal)('__launchRoleEvidence', () => new Map());
|
|
274
|
+
}
|
|
275
|
+
function evidenceKey(target) {
|
|
276
|
+
return (0, auto_yes_state_1.buildCompositeKey)(target.worktreeId, target.cliToolId, target.instanceId);
|
|
277
|
+
}
|
|
278
|
+
function epochMap() {
|
|
279
|
+
return (0, global_state_1.getOrInitGlobal)('__launchRoleEpochs', () => new Map());
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Whether this launch no longer speaks for the session. A launch killed midway keeps
|
|
283
|
+
* running until its readiness wait ends, and that wait can be satisfied by the screen
|
|
284
|
+
* of the launch started after it (`forgetSessionLaunch`, #3195). Such a launch writes
|
|
285
|
+
* nothing, stops nothing and moves nothing: the session is its successor's.
|
|
286
|
+
*
|
|
287
|
+
* A kill moves the epoch, which catches a launch that has not opened a generation yet.
|
|
288
|
+
* A generation that is no longer the current one catches the rest.
|
|
289
|
+
*/
|
|
290
|
+
function isStale(store) {
|
|
291
|
+
const key = evidenceKey(store.snapshot.target);
|
|
292
|
+
if ((epochMap().get(key) ?? 0) !== store.epoch)
|
|
293
|
+
return true;
|
|
294
|
+
return store.generation !== null && evidenceMap().get(key)?.sessionGeneration !== store.generation;
|
|
295
|
+
}
|
|
296
|
+
/** Run one launch with its snapshot, removing the composed env file however it ends. */
|
|
297
|
+
async function runWithLaunchRole(snapshot, fn) {
|
|
298
|
+
const store = {
|
|
299
|
+
snapshot,
|
|
300
|
+
prepared: null,
|
|
301
|
+
envFile: null,
|
|
302
|
+
generation: null,
|
|
303
|
+
epoch: epochMap().get(evidenceKey(snapshot.target)) ?? 0,
|
|
304
|
+
previousFingerprint: null,
|
|
305
|
+
};
|
|
306
|
+
try {
|
|
307
|
+
return await scope().run(store, fn);
|
|
308
|
+
}
|
|
309
|
+
finally {
|
|
310
|
+
if (store.envFile !== null)
|
|
311
|
+
(0, artifacts_1.removeLaunchEnvFile)(store.envFile);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Prepare before any pane exists, so a refusal leaves no empty pane that a later
|
|
316
|
+
* send would read as a running agent.
|
|
317
|
+
*
|
|
318
|
+
* @returns The refusal, or null when the launch may go on
|
|
319
|
+
*/
|
|
320
|
+
function gateLaunchRole() {
|
|
321
|
+
const store = scope().getStore();
|
|
322
|
+
if (!store)
|
|
323
|
+
return null;
|
|
324
|
+
if (store.snapshot.refusal)
|
|
325
|
+
return store.snapshot.refusal;
|
|
326
|
+
try {
|
|
327
|
+
store.prepared = prepareRoleLaunch(store.snapshot);
|
|
328
|
+
return null;
|
|
329
|
+
}
|
|
330
|
+
catch (error) {
|
|
331
|
+
if (error instanceof launch_errors_1.RoleLaunchRefusedError)
|
|
332
|
+
return error;
|
|
333
|
+
throw error;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
function sameTarget(a, b) {
|
|
337
|
+
return a.worktreeId === b.worktreeId && a.cliToolId === b.cliToolId && (a.instanceId ?? a.cliToolId) === (b.instanceId ?? b.cliToolId);
|
|
338
|
+
}
|
|
339
|
+
function recordPhase(store, phase) {
|
|
340
|
+
const { snapshot, prepared, generation } = store;
|
|
341
|
+
const { resolution, injection, target, db } = snapshot;
|
|
342
|
+
// Every await between a piece of evidence and this write ends here: `launched` is
|
|
343
|
+
// only ever written for the generation that is current in the same step.
|
|
344
|
+
if (generation === null || resolution === null || resolution.kind === 'ambiguous' || isStale(store))
|
|
345
|
+
return;
|
|
346
|
+
const role = resolution.kind === 'role' ? resolution.role : null;
|
|
347
|
+
try {
|
|
348
|
+
(0, agent_roles_db_1.recordRoleLaunch)(db, {
|
|
349
|
+
worktreeId: target.worktreeId,
|
|
350
|
+
instanceId: target.instanceId ?? target.cliToolId,
|
|
351
|
+
cliToolId: target.cliToolId,
|
|
352
|
+
phase,
|
|
353
|
+
sessionGeneration: generation,
|
|
354
|
+
source: resolution.source,
|
|
355
|
+
repositoryId: resolution.repositoryId,
|
|
356
|
+
roleId: role?.id ?? null,
|
|
357
|
+
roleName: role?.name ?? null,
|
|
358
|
+
bodyVersion: role?.bodyVersion ?? null,
|
|
359
|
+
bodyFingerprint: role?.bodyFingerprint ?? null,
|
|
360
|
+
injectionFingerprint: injection?.injectionFingerprint ?? null,
|
|
361
|
+
artifactFingerprint: prepared?.artifact.artifactFingerprint ?? null,
|
|
362
|
+
adapterId: injection?.adapter ?? null,
|
|
363
|
+
adapterVersion: injection?.adapterVersion ?? null,
|
|
364
|
+
wrapperVersion: injection?.wrapperVersion ?? null,
|
|
365
|
+
artifactPath: prepared?.artifact.path ?? null,
|
|
366
|
+
effectiveAgent: injection?.effectiveAgent ?? null,
|
|
367
|
+
compositionSourceFingerprint: injection?.compositionSourceFingerprint ?? null,
|
|
368
|
+
noRoleReason: resolution.kind === 'none' ? resolution.reason : null,
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
catch (error) {
|
|
372
|
+
// A record that could not be written leaves the state unknown. It is not a reason to refuse the launch.
|
|
373
|
+
logger.warn('role-launch-record-failed', { phase, error: error instanceof Error ? error.message : String(error) });
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
function openGeneration(store) {
|
|
377
|
+
if (isStale(store)) {
|
|
378
|
+
// The line is still built for whatever the driver does with it; nothing says it is the session's.
|
|
379
|
+
store.generation ??= (0, crypto_1.randomUUID)();
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
const { target, db } = store.snapshot;
|
|
383
|
+
if (store.generation === null && target.cliToolId === 'opencode') {
|
|
384
|
+
const instanceId = target.instanceId ?? target.cliToolId;
|
|
385
|
+
store.previousFingerprint = (0, agent_roles_db_1.getLatestRoleLaunchRecords)(db, target.worktreeId, instanceId).requested?.injectionFingerprint ?? null;
|
|
386
|
+
}
|
|
387
|
+
store.generation = (0, crypto_1.randomUUID)();
|
|
388
|
+
evidenceMap().set(evidenceKey(store.snapshot.target), {
|
|
389
|
+
sessionGeneration: store.generation,
|
|
390
|
+
injectionFingerprint: store.snapshot.injectionFingerprint,
|
|
391
|
+
composition: store.snapshot.composition,
|
|
392
|
+
resumedAcrossRole: false,
|
|
393
|
+
resumeNoticeTaken: false,
|
|
394
|
+
});
|
|
395
|
+
recordPhase(store, 'requested');
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* A launch replaced its own process in the same pane (Codex's relaunch after its
|
|
399
|
+
* update). The snapshot stays; the generation moves on. Called from
|
|
400
|
+
* `beginAgentSession`, which is what says a new process is starting.
|
|
401
|
+
*/
|
|
402
|
+
function noteLaunchProcessReplaced(target) {
|
|
403
|
+
const store = scope().getStore();
|
|
404
|
+
if (store && store.generation !== null && sameTarget(store.snapshot.target, target))
|
|
405
|
+
openGeneration(store);
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* This launch is about to continue a remembered conversation (OpenCode V1, §6.4). If
|
|
409
|
+
* the role is not the one that conversation last ran under, the role changes for all
|
|
410
|
+
* of it with the old role's replies still in its history, and someone has to be told.
|
|
411
|
+
* Here, in the launch, so that a change by inheritance and a driver's own relaunch
|
|
412
|
+
* are told as well as a send that named a role.
|
|
413
|
+
*/
|
|
414
|
+
function noteLaunchResumedConversation(target) {
|
|
415
|
+
const store = scope().getStore();
|
|
416
|
+
if (!store || store.generation === null || !sameTarget(store.snapshot.target, target) || isStale(store))
|
|
417
|
+
return;
|
|
418
|
+
if (store.previousFingerprint === store.snapshot.injectionFingerprint)
|
|
419
|
+
return;
|
|
420
|
+
const stored = evidenceMap().get(evidenceKey(target));
|
|
421
|
+
if (stored)
|
|
422
|
+
stored.resumedAcrossRole = true;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* The line for a pane, with the role in it. Used by `buildAgentLaunchCommandLine`,
|
|
426
|
+
* the one function every driver gets its launch line from. Outside a launch, or with
|
|
427
|
+
* no role, this is `renderAgentLaunchCommand(plan)` byte for byte.
|
|
428
|
+
*
|
|
429
|
+
* @throws {RoleLaunchRefusedError} Reaching a launch line with a refused snapshot
|
|
430
|
+
*/
|
|
431
|
+
function renderLaunchCommandWithRole(context, plan) {
|
|
432
|
+
const store = scope().getStore();
|
|
433
|
+
if (!store || !sameTarget(store.snapshot.target, context.target))
|
|
434
|
+
return (0, launch_command_1.renderAgentLaunchCommand)(plan);
|
|
435
|
+
if (store.snapshot.refusal)
|
|
436
|
+
throw store.snapshot.refusal;
|
|
437
|
+
if (store.snapshot.injection !== null && store.prepared === null)
|
|
438
|
+
store.prepared = prepareRoleLaunch(store.snapshot);
|
|
439
|
+
const { prepared } = store;
|
|
440
|
+
let line;
|
|
441
|
+
if (prepared === null) {
|
|
442
|
+
line = (0, launch_command_1.renderAgentLaunchCommand)(plan);
|
|
443
|
+
}
|
|
444
|
+
else {
|
|
445
|
+
const { args } = prepared.args;
|
|
446
|
+
const { plain, secret } = (0, adapters_1.splitRoleEnv)(prepared.args);
|
|
447
|
+
let prefix = '';
|
|
448
|
+
if (secret !== null) {
|
|
449
|
+
// The user's values may be secrets and a pane shows what is typed into it,
|
|
450
|
+
// so they go through a private file for the length of this launch (§7.1).
|
|
451
|
+
if (store.envFile === null) {
|
|
452
|
+
try {
|
|
453
|
+
store.envFile = (0, artifacts_1.writeLaunchEnvFile)(prepared.artifact.adapter, secret);
|
|
454
|
+
}
|
|
455
|
+
catch (error) {
|
|
456
|
+
throw new launch_errors_1.RoleLaunchRefusedError('artifact-failed', `The composed environment could not be written: ${error.message}`);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
prefix = (0, adapters_1.renderSecretEnvAssignment)(store.envFile);
|
|
460
|
+
}
|
|
461
|
+
const finalPlan = { ...plan, env: { ...plan.env, ...plain } };
|
|
462
|
+
const flags = args.length > 0 ? ` ${(0, adapters_1.renderRoleFlags)(args)}` : '';
|
|
463
|
+
line = `${prefix}${(0, launch_command_1.renderAgentLaunchCommand)(finalPlan)}${flags}`;
|
|
464
|
+
}
|
|
465
|
+
if (store.generation === null)
|
|
466
|
+
openGeneration(store);
|
|
467
|
+
return line;
|
|
468
|
+
}
|
|
469
|
+
/** Copilot carries on with its default agent after these (§6.7). */
|
|
470
|
+
const COPILOT_ROLE_NOT_TAKEN = /✗ (?:Custom agent|Failed to select agent)/;
|
|
471
|
+
function serverConfigConfirms(store, config) {
|
|
472
|
+
const { injection } = store.snapshot;
|
|
473
|
+
const { prepared } = store;
|
|
474
|
+
if (typeof config !== 'object' || config === null || !injection || !prepared)
|
|
475
|
+
return false;
|
|
476
|
+
if (injection.adapter === 'opencode') {
|
|
477
|
+
const { instructions } = config;
|
|
478
|
+
return Array.isArray(instructions) && instructions.includes(prepared.artifact.path);
|
|
479
|
+
}
|
|
480
|
+
// OpenCode V2 2.0.18 answers its config sources, weakest first, and not one merged
|
|
481
|
+
// object: `[{ type, path, info }, { type, path }, { type, info }]`, with the env's last
|
|
482
|
+
// (measured, #4115). So the answer is the last source that says anything for this agent.
|
|
483
|
+
if (!Array.isArray(config))
|
|
484
|
+
return false;
|
|
485
|
+
const agent = injection.effectiveAgent ?? 'build';
|
|
486
|
+
const systems = config
|
|
487
|
+
.map((source) => source?.info?.agents?.[agent]?.system)
|
|
488
|
+
.filter((system) => system !== undefined);
|
|
489
|
+
const system = systems[systems.length - 1];
|
|
490
|
+
// Compared by hash so nothing here holds on to the body.
|
|
491
|
+
return typeof system === 'string' && (0, fingerprint_1.computeFingerprint)(Buffer.from(system, 'utf8')) === prepared.artifact.artifactFingerprint;
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* After the driver's launch returned: write `launched` if there is evidence for it
|
|
495
|
+
* (§14), and stop the session if the CLI said it did not take the role. A reused
|
|
496
|
+
* process opened no generation and nothing happens.
|
|
497
|
+
*
|
|
498
|
+
* @throws {RoleLaunchRefusedError} The CLI refused the role; the session was stopped
|
|
499
|
+
*/
|
|
500
|
+
async function settleLaunchRole(checks) {
|
|
501
|
+
const store = scope().getStore();
|
|
502
|
+
if (!store || store.generation === null || isStale(store))
|
|
503
|
+
return;
|
|
504
|
+
const { injection } = store.snapshot;
|
|
505
|
+
const alive = async () => checks.isAlive().catch(() => false);
|
|
506
|
+
if (injection === null) {
|
|
507
|
+
if (await alive())
|
|
508
|
+
recordPhase(store, 'launched');
|
|
509
|
+
return;
|
|
510
|
+
}
|
|
511
|
+
switch (injection.adapter) {
|
|
512
|
+
case 'claude':
|
|
513
|
+
case 'codex':
|
|
514
|
+
// Both exit on an unreadable or broken file, and the file was inspected
|
|
515
|
+
// before the launch. Still there is the only evidence these two offer.
|
|
516
|
+
if (await alive())
|
|
517
|
+
recordPhase(store, 'launched');
|
|
518
|
+
return;
|
|
519
|
+
case 'copilot': {
|
|
520
|
+
const screen = await checks.capture().catch(() => null);
|
|
521
|
+
// What it read may be the screen of a launch started after this one was killed.
|
|
522
|
+
if (isStale(store))
|
|
523
|
+
return;
|
|
524
|
+
if (screen !== null && COPILOT_ROLE_NOT_TAKEN.test(screen)) {
|
|
525
|
+
forgetLaunchRoleEvidence(store.snapshot.target);
|
|
526
|
+
await checks.kill().catch((error) => {
|
|
527
|
+
logger.warn('role-not-applied-stop-failed', { error: error instanceof Error ? error.message : String(error) });
|
|
528
|
+
});
|
|
529
|
+
throw new launch_errors_1.RoleLaunchRefusedError('not-applied', 'Copilot did not take the role, and would have gone on without it; the session was stopped');
|
|
530
|
+
}
|
|
531
|
+
if (screen !== null && (await alive()))
|
|
532
|
+
recordPhase(store, 'launched');
|
|
533
|
+
return;
|
|
534
|
+
}
|
|
535
|
+
case 'opencode':
|
|
536
|
+
case 'opencode-v2': {
|
|
537
|
+
const config = await checks.readServerConfig().catch(() => null);
|
|
538
|
+
if (serverConfigConfirms(store, config))
|
|
539
|
+
recordPhase(store, 'launched');
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
case 'command-code':
|
|
543
|
+
case 'antigravity':
|
|
544
|
+
// No way to confirm yet (§14), so `launched` stays unknown.
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
// ---------------------------------------------------------------------------
|
|
549
|
+
// What this server knows
|
|
550
|
+
// ---------------------------------------------------------------------------
|
|
551
|
+
function getLaunchRoleEvidence(target) {
|
|
552
|
+
const stored = evidenceMap().get(evidenceKey(target));
|
|
553
|
+
return stored ? { sessionGeneration: stored.sessionGeneration, injectionFingerprint: stored.injectionFingerprint } : null;
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Why the running process no longer has the role the settings say it should, or null
|
|
557
|
+
* when it has it or this server did not start it.
|
|
558
|
+
*
|
|
559
|
+
* For a contract, whose process was fixed earlier (`launch-worker`'s starting
|
|
560
|
+
* message): the settings have to answer the same as they did then. It uses what that
|
|
561
|
+
* launch composed from, so it reads no pane; a role that appeared where the launch
|
|
562
|
+
* had none cannot equal "none" whatever it would compose with.
|
|
563
|
+
*/
|
|
564
|
+
async function runningRoleProblem(db, target, worktreePath, deps = {}) {
|
|
565
|
+
const stored = evidenceMap().get(evidenceKey(target));
|
|
566
|
+
if (!stored)
|
|
567
|
+
return null;
|
|
568
|
+
const unread = async () => undefined;
|
|
569
|
+
const snapshot = await resolveLaunchRole(db, { ...target, worktreePath, readEnv: unread, composition: stored.composition ?? {} }, deps);
|
|
570
|
+
if (snapshot.refusal)
|
|
571
|
+
return `The role for this contract cannot be applied: ${snapshot.refusal.message}`;
|
|
572
|
+
if (snapshot.injectionFingerprint === stored.injectionFingerprint)
|
|
573
|
+
return null;
|
|
574
|
+
return 'The role settings changed after this session was started, so the contract was not sent. Stop the session and send again.';
|
|
575
|
+
}
|
|
576
|
+
/** Whether the settings give this target a role, whatever it would compose with. */
|
|
577
|
+
async function settingsGiveRole(db, target, worktreePath, deps = {}) {
|
|
578
|
+
const unread = async () => undefined;
|
|
579
|
+
const snapshot = await resolveLaunchRole(db, { ...target, worktreePath, readEnv: unread, composition: {} }, deps);
|
|
580
|
+
return snapshot.resolution?.kind === 'role';
|
|
581
|
+
}
|
|
582
|
+
/** The session is gone, or its id is. What was known about it no longer applies. */
|
|
583
|
+
function forgetLaunchRoleEvidence(target) {
|
|
584
|
+
const key = evidenceKey(target);
|
|
585
|
+
evidenceMap().delete(key);
|
|
586
|
+
epochMap().set(key, (epochMap().get(key) ?? 0) + 1);
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* How many times this session has been stopped. A start reads this before it waits to
|
|
590
|
+
* resolve its role: see {@link assertNotStoppedWhileResolving}.
|
|
591
|
+
*/
|
|
592
|
+
function readLaunchRoleEpoch(target) {
|
|
593
|
+
return epochMap().get(evidenceKey(target)) ?? 0;
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* A start with roles configured waits for git before it registers its flight, so a
|
|
597
|
+
* stop in that wait finds no flight to forget and no launch to mark. Left to go on,
|
|
598
|
+
* this start would bring back the session that was just stopped, under an epoch it
|
|
599
|
+
* only read afterwards, and a later start would join it. It was asked for before
|
|
600
|
+
* the stop, so the stop wins.
|
|
601
|
+
*
|
|
602
|
+
* @throws {RoleLaunchRefusedError} The session was stopped since `epoch` was read
|
|
603
|
+
*/
|
|
604
|
+
function assertNotStoppedWhileResolving(target, epoch) {
|
|
605
|
+
if (readLaunchRoleEpoch(target) !== epoch) {
|
|
606
|
+
throw new launch_errors_1.RoleLaunchRefusedError('session-stopped', 'The session was stopped while it was being started; nothing was typed');
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
/** Whether this process continued a conversation that had another role (§6.4). */
|
|
610
|
+
function wasResumedAcrossRole(target) {
|
|
611
|
+
return evidenceMap().get(evidenceKey(target))?.resumedAcrossRole === true;
|
|
612
|
+
}
|
|
613
|
+
/** The same, once per process, for the answer of a send. */
|
|
614
|
+
function takeResumedAcrossRoleNotice(target) {
|
|
615
|
+
const stored = evidenceMap().get(evidenceKey(target));
|
|
616
|
+
if (!stored?.resumedAcrossRole || stored.resumeNoticeTaken)
|
|
617
|
+
return false;
|
|
618
|
+
stored.resumeNoticeTaken = true;
|
|
619
|
+
return true;
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* A worktree id changed and its tmux sessions were renamed: the processes are the
|
|
623
|
+
* same, and the records moved with the row (`getWorktreeChildTables`).
|
|
624
|
+
*/
|
|
625
|
+
function moveLaunchRoleEvidence(renames) {
|
|
626
|
+
const map = evidenceMap();
|
|
627
|
+
const moved = new Map();
|
|
628
|
+
for (const [key, evidence] of map) {
|
|
629
|
+
const rename = renames.find(({ oldId }) => key.startsWith(`${oldId}${auto_yes_state_1.COMPOSITE_KEY_SEPARATOR}`));
|
|
630
|
+
if (!rename)
|
|
631
|
+
continue;
|
|
632
|
+
map.delete(key);
|
|
633
|
+
moved.set(`${rename.newId}${key.slice(rename.oldId.length)}`, evidence);
|
|
634
|
+
}
|
|
635
|
+
for (const [key, evidence] of moved)
|
|
636
|
+
map.set(key, evidence);
|
|
637
|
+
const epochs = epochMap();
|
|
638
|
+
for (const [key, epoch] of [...epochs]) {
|
|
639
|
+
const rename = renames.find(({ oldId }) => key.startsWith(`${oldId}${auto_yes_state_1.COMPOSITE_KEY_SEPARATOR}`));
|
|
640
|
+
if (!rename)
|
|
641
|
+
continue;
|
|
642
|
+
epochs.delete(key);
|
|
643
|
+
epochs.set(`${rename.newId}${key.slice(rename.oldId.length)}`, epoch);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* The role a Schedule runs with: the defaults for its worktree and tool (a primary's
|
|
648
|
+
* own setting belongs to that instance and is not inherited), composed with what its
|
|
649
|
+
* child process will be given. An explicit `agent` is never dropped for it: V1 and
|
|
650
|
+
* Claude take both, and V2 overrides that agent's `system` (§7.1).
|
|
651
|
+
*
|
|
652
|
+
* Called by `job-executor`, and not inside `executeClaudeCommand`, because that one
|
|
653
|
+
* also runs the daily summary, which opens no database and has no role (D2).
|
|
654
|
+
*/
|
|
655
|
+
async function resolveScheduleRole(db, input, deps = {}) {
|
|
656
|
+
const { cliToolId } = input;
|
|
657
|
+
if (!(0, agent_roles_1.isAgentRoleCliTool)(cliToolId))
|
|
658
|
+
return { kind: 'none' };
|
|
659
|
+
let any;
|
|
660
|
+
try {
|
|
661
|
+
any = (0, agent_roles_db_1.hasAnyRoleSetting)(db);
|
|
662
|
+
}
|
|
663
|
+
catch {
|
|
664
|
+
return { kind: 'refused', refusal: new launch_errors_1.RoleLaunchRefusedError('resolve-failed', 'The database could not be read to resolve the role') };
|
|
665
|
+
}
|
|
666
|
+
if (!any)
|
|
667
|
+
return { kind: 'none' };
|
|
668
|
+
const snapshot = await resolveLaunchRole(db, {
|
|
669
|
+
worktreeId: input.worktreeId,
|
|
670
|
+
cliToolId,
|
|
671
|
+
worktreePath: input.worktreePath,
|
|
672
|
+
readEnv: (0, composition_1.fixedEnvReader)(input.env),
|
|
673
|
+
explicitAgent: input.explicitAgent ?? null,
|
|
674
|
+
defaultsOnly: true,
|
|
675
|
+
}, deps);
|
|
676
|
+
if (snapshot.refusal)
|
|
677
|
+
return { kind: 'refused', refusal: snapshot.refusal };
|
|
678
|
+
try {
|
|
679
|
+
const prepared = prepareRoleLaunch(snapshot);
|
|
680
|
+
if (prepared === null || snapshot.resolution?.kind !== 'role')
|
|
681
|
+
return { kind: 'none' };
|
|
682
|
+
return {
|
|
683
|
+
kind: 'role',
|
|
684
|
+
role: { args: prepared.args.args, headlessPosition: prepared.args.headlessPosition, env: prepared.args.env },
|
|
685
|
+
injectionFingerprint: snapshot.injectionFingerprint,
|
|
686
|
+
roleName: snapshot.resolution.role.name,
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
catch (error) {
|
|
690
|
+
if (error instanceof launch_errors_1.RoleLaunchRefusedError)
|
|
691
|
+
return { kind: 'refused', refusal: error };
|
|
692
|
+
throw error;
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
/** Forget everything in memory. Test-only. */
|
|
696
|
+
function resetLaunchRoleStateForTest() {
|
|
697
|
+
evidenceMap().clear();
|
|
698
|
+
epochMap().clear();
|
|
699
|
+
globalThis.__launchRoleTestDb = null;
|
|
700
|
+
}
|
|
701
|
+
/**
|
|
702
|
+
* What the current settings would inject now, from a membership already read: one
|
|
703
|
+
* synchronous stretch, for the moment right before the body, where no await is left.
|
|
704
|
+
*
|
|
705
|
+
* @throws {RoleLaunchRefusedError} The settings no longer resolve to one answer
|
|
706
|
+
*/
|
|
707
|
+
function recomputeInjectionFingerprint(snapshot) {
|
|
708
|
+
const { db, target, membership, composition } = snapshot;
|
|
709
|
+
const instanceId = target.instanceId ?? target.cliToolId;
|
|
710
|
+
const settled = membership ?? { members: [], undetermined: [] };
|
|
711
|
+
const resolution = (0, resolve_1.resolveDefaultsForTool)(db, target.cliToolId, settled, (0, agent_roles_db_1.getInstanceRoleState)(db, target.worktreeId, instanceId));
|
|
712
|
+
if (resolution.kind === 'ambiguous') {
|
|
713
|
+
throw new launch_errors_1.RoleLaunchRefusedError(resolution.reason, 'The role settings no longer resolve to one answer');
|
|
714
|
+
}
|
|
715
|
+
if (resolution.kind === 'none')
|
|
716
|
+
return null;
|
|
717
|
+
const adapter = target.cliToolId;
|
|
718
|
+
// A role appeared where none was resolved: no composition was read, so it cannot be computed here.
|
|
719
|
+
if (composition === null)
|
|
720
|
+
throw new launch_errors_1.RoleLaunchRefusedError('composition-failed', 'A role was set while this send was on its way');
|
|
721
|
+
return (0, adapters_1.computeRoleInjection)(adapter, resolution.role, composition).injectionFingerprint;
|
|
722
|
+
}
|