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
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* @module lib/hooks/sources/launch-command
|
|
29
29
|
*/
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.AGENT_LAUNCH_CONFIG_ENV_VARS = exports.SERVER_PORT_ENV_VAR = exports.AGENT_CORRELATION_ENV_VARS = exports.COMMANDMATE_HOOK_ENV_VARS = exports.HOOK_PORT_ENV_VAR = exports.AGENT_EVENT_URL_ENV_VAR = void 0;
|
|
31
|
+
exports.AGENT_LAUNCH_CONDITIONAL_CONFIG_ENV_VARS = exports.AGENT_LAUNCH_CONFIG_ENV_VARS = exports.SERVER_PORT_ENV_VAR = exports.AGENT_CORRELATION_ENV_VARS = exports.COMMANDMATE_HOOK_ENV_VARS = exports.HOOK_PORT_ENV_VAR = exports.AGENT_EVENT_URL_ENV_VAR = void 0;
|
|
32
32
|
exports.resolveAgentLaunchEnv = resolveAgentLaunchEnv;
|
|
33
33
|
exports.renderAgentLaunchCommand = renderAgentLaunchCommand;
|
|
34
34
|
const env_1 = require("../../../lib/env");
|
|
@@ -171,13 +171,18 @@ exports.SERVER_PORT_ENV_VAR = 'CM_PORT';
|
|
|
171
171
|
* behaviour. `tests/unit/security/child-process-server-port-2403.test.ts`
|
|
172
172
|
* asserts that with a real child process.
|
|
173
173
|
*
|
|
174
|
-
* **
|
|
175
|
-
* local allowlist of `CODEX_HOME` / `COPILOT_HOME` / `XDG_CONFIG_HOME
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
174
|
+
* **Not `COPILOT_HOME` here, and never `XDG_CONFIG_HOME`.** #1933's test carried
|
|
175
|
+
* a local allowlist of `CODEX_HOME` / `COPILOT_HOME` / `XDG_CONFIG_HOME`.
|
|
176
|
+
* `XDG_CONFIG_HOME` is only ever *read* from the ambient environment to decide
|
|
177
|
+
* where a file goes and never reaches `plan.env`. `COPILOT_HOME` does since
|
|
178
|
+
* #4210, but only when the operator configured a *relative* one — copilot's
|
|
179
|
+
* launch then pins the absolute form so it reads the `settings.json` the server
|
|
180
|
+
* wrote — so it is declared on its own list,
|
|
181
|
+
* {@link AGENT_LAUNCH_CONDITIONAL_CONFIG_ENV_VARS}, rather than here: this list
|
|
182
|
+
* is what every default launch writes, and the drift guard holds a default
|
|
183
|
+
* launch to it exactly. An allowlist wide enough to admit a name a launch does
|
|
184
|
+
* not write would wave through a source that started setting one, which is the
|
|
185
|
+
* opposite of what this list is for.
|
|
181
186
|
*
|
|
182
187
|
* Enumerated for the same reason as the list above: so the drift guard can
|
|
183
188
|
* subtract it and hold the remainder to an exact set.
|
|
@@ -186,6 +191,24 @@ exports.AGENT_LAUNCH_CONFIG_ENV_VARS = [
|
|
|
186
191
|
'CODEX_HOME',
|
|
187
192
|
exports.SERVER_PORT_ENV_VAR,
|
|
188
193
|
];
|
|
194
|
+
/**
|
|
195
|
+
* Config a launch line carries only under a configuration, not by default
|
|
196
|
+
* (Issue #4210).
|
|
197
|
+
*
|
|
198
|
+
* `COPILOT_HOME`: written by copilot's launch environment
|
|
199
|
+
* (`copilot/hook-settings` `buildCopilotHookEnvironment`) only when the
|
|
200
|
+
* ambient `COPILOT_HOME` is relative, as the absolute path the hooks
|
|
201
|
+
* `settings.json` was written under — otherwise the server (cwd: package root)
|
|
202
|
+
* and copilot (cwd: the worktree) would resolve the same string to two homes.
|
|
203
|
+
* Unset or absolute, nothing is written and the launch line is what it was.
|
|
204
|
+
*
|
|
205
|
+
* Same kind as {@link AGENT_LAUNCH_CONFIG_ENV_VARS} — a per-tool config
|
|
206
|
+
* redirect, not an identity and not a credential, so it is kept for
|
|
207
|
+
* CommandMate's own children — and listed apart from it only so the drift
|
|
208
|
+
* guard can hold both cases exactly: the default launch to that list, and the
|
|
209
|
+
* relative-`COPILOT_HOME` launch to that list plus this one.
|
|
210
|
+
*/
|
|
211
|
+
exports.AGENT_LAUNCH_CONDITIONAL_CONFIG_ENV_VARS = ['COPILOT_HOME'];
|
|
189
212
|
/**
|
|
190
213
|
* The environment a launch line actually carries: the plan's own, plus this
|
|
191
214
|
* server's port (Issue #2403).
|
|
@@ -45,6 +45,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
45
45
|
exports.OPENCODE_SHARE_REQUEST_TIMEOUT_MS = exports.MAX_OPENCODE_DIFF_PATCH_CHARS = exports.MAX_OPENCODE_DIFF_FILES = exports.OPENCODE_CONTEXT_MESSAGE_WINDOW = exports.MAX_OPENCODE_SESSION_MESSAGES = exports.MAX_OPENCODE_SSE_FRAME_CHARS = exports.MAX_OPENCODE_SESSION_STATUSES = exports.OPENCODE_EVENT_CONTENT_TYPE = exports.OPENCODE_JSON_CONTENT_TYPE = exports.OPENCODE_FETCH_REDIRECT = exports.OPENCODE_REQUEST_TIMEOUT_MS = exports.OPENCODE_SERVER_HOST = void 0;
|
|
46
46
|
exports.opencodeBaseUrl = opencodeBaseUrl;
|
|
47
47
|
exports.probeOpencodeHealth = probeOpencodeHealth;
|
|
48
|
+
exports.fetchOpencodeConfig = fetchOpencodeConfig;
|
|
48
49
|
exports.fetchOpencodeHealth = fetchOpencodeHealth;
|
|
49
50
|
exports.fetchOpencodePendingPermissions = fetchOpencodePendingPermissions;
|
|
50
51
|
exports.fetchOpencodePendingQuestions = fetchOpencodePendingQuestions;
|
|
@@ -242,6 +243,25 @@ async function probeOpencodeHealth(port) {
|
|
|
242
243
|
health: { healthy: true, version: typeof body.version === 'string' ? body.version : null },
|
|
243
244
|
};
|
|
244
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* The resolved config, for the role's evidence (Issue #4115, §14). May hold secrets,
|
|
248
|
+
* so the caller compares it and keeps none of it. Null when nothing answered.
|
|
249
|
+
*/
|
|
250
|
+
async function fetchOpencodeConfig(port) {
|
|
251
|
+
try {
|
|
252
|
+
const response = await loopbackFetch(`${opencodeBaseUrl(port)}/config`, {
|
|
253
|
+
signal: AbortSignal.timeout(5000),
|
|
254
|
+
});
|
|
255
|
+
if (response.status !== 200) {
|
|
256
|
+
await response.body?.cancel().catch(() => { });
|
|
257
|
+
return null;
|
|
258
|
+
}
|
|
259
|
+
return await response.json();
|
|
260
|
+
}
|
|
261
|
+
catch {
|
|
262
|
+
return null;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
245
265
|
/**
|
|
246
266
|
* Ask whether an opencode server is listening on this port.
|
|
247
267
|
*
|
|
@@ -32,6 +32,7 @@ exports.OPENCODE_V2_CONTEXT_MESSAGE_WINDOW = exports.MAX_OPENCODE_V2_DECISION_BO
|
|
|
32
32
|
exports.opencodeV2BaseUrl = opencodeV2BaseUrl;
|
|
33
33
|
exports.opencodeV2AuthorizationHeader = opencodeV2AuthorizationHeader;
|
|
34
34
|
exports.probeOpencodeV2Server = probeOpencodeV2Server;
|
|
35
|
+
exports.fetchOpencodeV2Config = fetchOpencodeV2Config;
|
|
35
36
|
exports.createOpencodeV2SseParser = createOpencodeV2SseParser;
|
|
36
37
|
exports.parseOpencodeV2Frame = parseOpencodeV2Frame;
|
|
37
38
|
exports.openOpencodeV2EventStream = openOpencodeV2EventStream;
|
|
@@ -92,6 +93,29 @@ async function probeOpencodeV2Server(port, password) {
|
|
|
92
93
|
return { kind: 'unreachable' };
|
|
93
94
|
}
|
|
94
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* The config sources, for the role's evidence (Issue #4115, §14): on 2.0.18 an array
|
|
98
|
+
* in order of strength, not one merged object. Holds the role's text and possibly
|
|
99
|
+
* secrets, so the caller compares it and keeps none of it. Null when the server did
|
|
100
|
+
* not answer.
|
|
101
|
+
*/
|
|
102
|
+
async function fetchOpencodeV2Config(port, password, directory) {
|
|
103
|
+
try {
|
|
104
|
+
const response = await fetch(`${opencodeV2BaseUrl(port)}/api/config?directory=${encodeURIComponent(directory)}`, {
|
|
105
|
+
headers: { Authorization: opencodeV2AuthorizationHeader(password) },
|
|
106
|
+
redirect: 'error',
|
|
107
|
+
signal: AbortSignal.timeout(exports.OPENCODE_V2_PROBE_TIMEOUT_MS),
|
|
108
|
+
});
|
|
109
|
+
if (response.status !== 200) {
|
|
110
|
+
await response.body?.cancel().catch(() => { });
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
return await response.json();
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
95
119
|
/** A fresh {@link OpencodeV2SseParser}. */
|
|
96
120
|
function createOpencodeV2SseParser() {
|
|
97
121
|
let buffer = '';
|
|
@@ -24,7 +24,15 @@
|
|
|
24
24
|
* ending close together write each turn once;
|
|
25
25
|
* - and it recovers what the stream missed. A turn that ended while the
|
|
26
26
|
* connection was down is in the document the next time any turn of the
|
|
27
|
-
* session ends
|
|
27
|
+
* session ends — and, since Issue #4187, when the stream reconnects
|
|
28
|
+
* ({@link recoverOpencodeV2History}, which reads back past the newest
|
|
29
|
+
* `user` message, to the page cap).
|
|
30
|
+
*
|
|
31
|
+
* The screen scraper never writes a V2 reply (Issue #4187's decision): the turns
|
|
32
|
+
* of a stream that is not live are this module's to write, later, under their
|
|
33
|
+
* `oc-turn:` key — a scraped row cannot carry that key, so both writing would
|
|
34
|
+
* double the turn. A pane with no subscription at all (`--standalone`) or one
|
|
35
|
+
* whose subscription ended on its own is not recorded.
|
|
28
36
|
*
|
|
29
37
|
* ## One turn in the document
|
|
30
38
|
*
|
|
@@ -103,6 +111,7 @@ exports.buildOpencodeV2TurnsFromMessages = buildOpencodeV2TurnsFromMessages;
|
|
|
103
111
|
exports.readLatestOpencodeV2AssistantModel = readLatestOpencodeV2AssistantModel;
|
|
104
112
|
exports.resetOpencodeV2HistoryQueue = resetOpencodeV2HistoryQueue;
|
|
105
113
|
exports.syncOpencodeV2History = syncOpencodeV2History;
|
|
114
|
+
exports.recoverOpencodeV2History = recoverOpencodeV2History;
|
|
106
115
|
const logger_1 = require("../../../../lib/logger");
|
|
107
116
|
const agent_event_state_1 = require("../../../../lib/session/agent-event-state");
|
|
108
117
|
const agent_transcript_1 = require("../../../../types/agent-transcript");
|
|
@@ -167,19 +176,9 @@ function readOpencodeV2ContentPart(messageId, index, item) {
|
|
|
167
176
|
: null,
|
|
168
177
|
};
|
|
169
178
|
}
|
|
170
|
-
/**
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
* Order-agnostic: the entries are sorted oldest first by `time.created` (the
|
|
174
|
-
* id, which is time-ordered, breaks ties), so a desc page, an asc page or
|
|
175
|
-
* several pages concatenated give the same turns. Assistant messages before the
|
|
176
|
-
* first `user` message belong to a turn whose head is outside what was read,
|
|
177
|
-
* and are dropped rather than attached to nothing.
|
|
178
|
-
*
|
|
179
|
-
* Pure: no fetch, no database.
|
|
180
|
-
*/
|
|
181
|
-
function buildOpencodeV2TurnsFromMessages(entries, sessionId) {
|
|
182
|
-
const messages = entries
|
|
179
|
+
/** `entries`' messages oldest first, as {@link buildOpencodeV2TurnsFromMessages} orders them. */
|
|
180
|
+
function sortOpencodeV2MessagesOldestFirst(entries) {
|
|
181
|
+
return entries
|
|
183
182
|
.filter(event_mapper_1.isPlainObject)
|
|
184
183
|
.filter((message) => (0, event_mapper_1.readStringField)(message, 'id') !== null)
|
|
185
184
|
.map((message, index) => ({ message, index }))
|
|
@@ -192,6 +191,20 @@ function buildOpencodeV2TurnsFromMessages(entries, sessionId) {
|
|
|
192
191
|
return aId < bId ? -1 : aId > bId ? 1 : a.index - b.index;
|
|
193
192
|
})
|
|
194
193
|
.map(({ message }) => message);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Rebuild the turns of a session from `GET /api/session/{id}/message` entries.
|
|
197
|
+
*
|
|
198
|
+
* Order-agnostic: the entries are sorted oldest first by `time.created` (the
|
|
199
|
+
* id, which is time-ordered, breaks ties), so a desc page, an asc page or
|
|
200
|
+
* several pages concatenated give the same turns. Assistant messages before the
|
|
201
|
+
* first `user` message belong to a turn whose head is outside what was read,
|
|
202
|
+
* and are dropped rather than attached to nothing.
|
|
203
|
+
*
|
|
204
|
+
* Pure: no fetch, no database.
|
|
205
|
+
*/
|
|
206
|
+
function buildOpencodeV2TurnsFromMessages(entries, sessionId) {
|
|
207
|
+
const messages = sortOpencodeV2MessagesOldestFirst(entries);
|
|
195
208
|
const turns = [];
|
|
196
209
|
let open = null;
|
|
197
210
|
const close = (closed) => {
|
|
@@ -304,6 +317,78 @@ async function readRecentMessages(port, password, sessionId) {
|
|
|
304
317
|
}
|
|
305
318
|
return entries;
|
|
306
319
|
}
|
|
320
|
+
/** Whether History already holds the turn opened by this user message. */
|
|
321
|
+
async function isOpencodeV2TurnSaved(target, userMessageId) {
|
|
322
|
+
const [{ getDbInstance }, { findMessageByRequestId }] = await Promise.all([
|
|
323
|
+
Promise.resolve().then(() => __importStar(require('../../../../lib/db/db-instance'))),
|
|
324
|
+
Promise.resolve().then(() => __importStar(require('../../../../lib/db'))),
|
|
325
|
+
]);
|
|
326
|
+
return (findMessageByRequestId(getDbInstance(), target.worktreeId, (0, agent_transcript_1.opencodeTurnRequestId)(userMessageId)) !==
|
|
327
|
+
null);
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Read newest-first pages up to {@link MAX_OPENCODE_V2_HISTORY_PAGES} (or the
|
|
331
|
+
* document's end) for the recovery sync (Issue #4187, C6).
|
|
332
|
+
*
|
|
333
|
+
* The ordinary read ({@link readRecentMessages}) stops at the first page with a
|
|
334
|
+
* `user` message, so a turn that closed while the stream was down and is a page
|
|
335
|
+
* further back is never read. This one does not stop at a turn History already
|
|
336
|
+
* has either: no such turn marks the gap's edge for sure — an ordinary sync can
|
|
337
|
+
* write a newer turn before the loss is noticed, and V2's times are another
|
|
338
|
+
* clock — so it reads the whole cap, and the rows' keys (`oc-turn:<id>`) and
|
|
339
|
+
* the per-instance queue keep a turn from being written twice.
|
|
340
|
+
*/
|
|
341
|
+
async function readMessagesToCap(target, port, password, sessionId) {
|
|
342
|
+
const entries = [];
|
|
343
|
+
let cursor = null;
|
|
344
|
+
for (let page = 0; page < exports.MAX_OPENCODE_V2_HISTORY_PAGES; page += 1) {
|
|
345
|
+
const result = await (0, client_1.fetchOpencodeV2SessionMessagesPage)(port, password, sessionId, cursor);
|
|
346
|
+
if (result === null)
|
|
347
|
+
return { entries, unreadable: true, pages: page, truncated: false };
|
|
348
|
+
entries.push(...result.data);
|
|
349
|
+
if (result.next === null || result.data.length === 0) {
|
|
350
|
+
return { entries, unreadable: false, pages: page + 1, truncated: false };
|
|
351
|
+
}
|
|
352
|
+
if (page === exports.MAX_OPENCODE_V2_HISTORY_PAGES - 1) {
|
|
353
|
+
return {
|
|
354
|
+
entries,
|
|
355
|
+
unreadable: false,
|
|
356
|
+
pages: page + 1,
|
|
357
|
+
truncated: headUnread(entries) || (await holdsUnsavedTurn(target, result.data)),
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
cursor = result.next;
|
|
361
|
+
}
|
|
362
|
+
return { entries, unreadable: false, pages: exports.MAX_OPENCODE_V2_HISTORY_PAGES, truncated: false };
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Whether the oldest turn read has messages but not its head: an `assistant`
|
|
366
|
+
* older than every `user` read. Its `user` is beyond the cap, so the turn
|
|
367
|
+
* cannot be built (or told saved) from what was read — a turn longer than the
|
|
368
|
+
* pages read included. Counted as possibly missing: without its `user` id
|
|
369
|
+
* there is no way to ask History.
|
|
370
|
+
*/
|
|
371
|
+
function headUnread(entries) {
|
|
372
|
+
for (const message of sortOpencodeV2MessagesOldestFirst(entries)) {
|
|
373
|
+
const type = (0, event_mapper_1.readStringField)(message, 'type');
|
|
374
|
+
if (type === 'user')
|
|
375
|
+
return false;
|
|
376
|
+
if (type === 'assistant')
|
|
377
|
+
return true;
|
|
378
|
+
}
|
|
379
|
+
return false;
|
|
380
|
+
}
|
|
381
|
+
/** Whether `page` has a `user` message whose turn History does not have. */
|
|
382
|
+
async function holdsUnsavedTurn(target, page) {
|
|
383
|
+
for (const entry of page) {
|
|
384
|
+
if (!(0, event_mapper_1.isPlainObject)(entry) || (0, event_mapper_1.readStringField)(entry, 'type') !== 'user')
|
|
385
|
+
continue;
|
|
386
|
+
const id = (0, event_mapper_1.readStringField)(entry, 'id');
|
|
387
|
+
if (id !== null && !(await isOpencodeV2TurnSaved(target, id)))
|
|
388
|
+
return true;
|
|
389
|
+
}
|
|
390
|
+
return false;
|
|
391
|
+
}
|
|
307
392
|
/**
|
|
308
393
|
* Write one rendered turn, unless its row is already there.
|
|
309
394
|
*
|
|
@@ -358,6 +443,43 @@ async function writeOpencodeV2Turn(target, rendered, timestampMs) {
|
|
|
358
443
|
});
|
|
359
444
|
return true;
|
|
360
445
|
}
|
|
446
|
+
/**
|
|
447
|
+
* Latch the answering model, then write the closed turns of `entries` that
|
|
448
|
+
* History does not have, oldest first. Shared by the ordinary sync and the
|
|
449
|
+
* recovery sync (Issue #4187).
|
|
450
|
+
*
|
|
451
|
+
* @returns How many rows were written, and how many turns History does not
|
|
452
|
+
* have the newest-kept cap dropped
|
|
453
|
+
*/
|
|
454
|
+
async function writeOpencodeV2Turns(target, sessionId, entries, isCurrent) {
|
|
455
|
+
// Issue #2964: the model that answered, onto the hook latch the UI and
|
|
456
|
+
// `capture --json` read. Before the rows, so a failed write cannot cost it.
|
|
457
|
+
// Issue #3733: not for a subscription closed or replaced during the read —
|
|
458
|
+
// a restarted or stopped session would show the old model, and its change
|
|
459
|
+
// broadcast and Push (#2357) would fire for a session that is not there.
|
|
460
|
+
// Issue #4187 (C5): the subscription's `isCurrent` also asks that the session
|
|
461
|
+
// read is still the one it is following, so a late sync of the previous
|
|
462
|
+
// session does not put that session's model back on the display.
|
|
463
|
+
if (isCurrent()) {
|
|
464
|
+
(0, agent_event_state_1.recordAgentReportedModel)(target.worktreeId, tool_id_1.OPENCODE_V2_CLI_TOOL_ID, target.instanceId ?? tool_id_1.OPENCODE_V2_CLI_TOOL_ID, readLatestOpencodeV2AssistantModel(entries));
|
|
465
|
+
}
|
|
466
|
+
const closed = buildOpencodeV2TurnsFromMessages(entries, sessionId).filter((turn) => turn.closed);
|
|
467
|
+
const kept = closed.slice(-exports.MAX_OPENCODE_V2_SYNCED_TURNS);
|
|
468
|
+
let droppedUnsaved = 0;
|
|
469
|
+
for (const turn of closed.slice(0, closed.length - kept.length)) {
|
|
470
|
+
if (!(await isOpencodeV2TurnSaved(target, turn.accumulator.userMessageId)))
|
|
471
|
+
droppedUnsaved += 1;
|
|
472
|
+
}
|
|
473
|
+
let written = 0;
|
|
474
|
+
// Oldest first, so the rows go in in conversation order.
|
|
475
|
+
for (const turn of kept) {
|
|
476
|
+
const rendered = (0, transcript_1.renderOpencodeTurn)(turn.accumulator);
|
|
477
|
+
const at = Math.max(turn.accumulator.startedAt, turn.completedAt ?? 0);
|
|
478
|
+
if (await writeOpencodeV2Turn(target, rendered, at))
|
|
479
|
+
written += 1;
|
|
480
|
+
}
|
|
481
|
+
return { written, droppedUnsaved };
|
|
482
|
+
}
|
|
361
483
|
/**
|
|
362
484
|
* Record every closed turn of a session that History does not have yet.
|
|
363
485
|
*
|
|
@@ -368,9 +490,10 @@ async function writeOpencodeV2Turn(target, rendered, timestampMs) {
|
|
|
368
490
|
* @param port - Its server
|
|
369
491
|
* @param sessionId - `ses_…` from the end-of-turn frame
|
|
370
492
|
* @param isCurrent - Whether the subscription that asked is still the
|
|
371
|
-
* instance's (Issue #3733)
|
|
372
|
-
*
|
|
373
|
-
*
|
|
493
|
+
* instance's (Issue #3733) and still following `sessionId` (Issue #4187);
|
|
494
|
+
* checked after the read, right before the model is latched. False skips
|
|
495
|
+
* only the latch: the rows are still written (the turn did happen, and
|
|
496
|
+
* `requestId` keeps a later sync from doubling them)
|
|
374
497
|
* @returns How many rows were written
|
|
375
498
|
*/
|
|
376
499
|
function syncOpencodeV2History(target, port, sessionId, isCurrent = () => true) {
|
|
@@ -397,25 +520,74 @@ function syncOpencodeV2History(target, port, sessionId, isCurrent = () => true)
|
|
|
397
520
|
});
|
|
398
521
|
return 0;
|
|
399
522
|
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
523
|
+
return (await writeOpencodeV2Turns(target, sessionId, entries, isCurrent)).written;
|
|
524
|
+
}
|
|
525
|
+
catch (error) {
|
|
526
|
+
logger.error('opencode-v2-history-sync-failed', {
|
|
527
|
+
worktreeId: target.worktreeId,
|
|
528
|
+
instanceId,
|
|
529
|
+
port,
|
|
530
|
+
sessionId,
|
|
531
|
+
error: error instanceof Error ? error.message : String(error),
|
|
532
|
+
});
|
|
533
|
+
return 0;
|
|
534
|
+
}
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Record the closed turns of a session that ended while the instance's stream
|
|
539
|
+
* was not live (Issue #4187, the recovery sync on reconnect).
|
|
540
|
+
*
|
|
541
|
+
* The same rows, keys and queue as {@link syncOpencodeV2History} — a recovery
|
|
542
|
+
* and an ordinary sync that overlap still write each turn once (C8) — but read
|
|
543
|
+
* {@link MAX_OPENCODE_V2_HISTORY_PAGES} pages (or to the document's end)
|
|
544
|
+
* instead of to the newest `user` message (C6), never stopping early at a turn
|
|
545
|
+
* History has. A warn (`opencode-v2-history-recovery-truncated`) says only that
|
|
546
|
+
* turns History does not have may lie beyond the cap: the oldest page read held
|
|
547
|
+
* one, the oldest turn read has no `user` in what was read, or
|
|
548
|
+
* {@link MAX_OPENCODE_V2_SYNCED_TURNS} dropped one. Guaranteed: the
|
|
549
|
+
* closed, unsaved turns within those pages, whatever order rows were written in
|
|
550
|
+
* and whatever the clocks say — not every turn ever.
|
|
551
|
+
*
|
|
552
|
+
* Never throws.
|
|
553
|
+
*/
|
|
554
|
+
function recoverOpencodeV2History(target, port, sessionId, options = {}) {
|
|
555
|
+
const isCurrent = options.isCurrent ?? (() => true);
|
|
556
|
+
return serialize((0, secrets_1.opencodeV2KeyOf)(target), async () => {
|
|
557
|
+
const instanceId = target.instanceId ?? target.cliToolId;
|
|
558
|
+
try {
|
|
559
|
+
const password = (0, secrets_1.readOpencodeV2Password)(target);
|
|
560
|
+
if (password === null) {
|
|
561
|
+
// The subscription ends on this too; nothing to try again for.
|
|
562
|
+
logger.info('opencode-v2-history-unavailable', {
|
|
563
|
+
worktreeId: target.worktreeId,
|
|
564
|
+
instanceId,
|
|
565
|
+
reason: 'password-file-missing',
|
|
566
|
+
});
|
|
567
|
+
return { written: 0, unreadable: false };
|
|
568
|
+
}
|
|
569
|
+
const read = await readMessagesToCap(target, port, password, sessionId);
|
|
570
|
+
if (read.unreadable && read.entries.length === 0) {
|
|
571
|
+
logger.warn('opencode-v2-history-unavailable', {
|
|
572
|
+
worktreeId: target.worktreeId,
|
|
573
|
+
instanceId,
|
|
574
|
+
port,
|
|
575
|
+
sessionId,
|
|
576
|
+
reason: 'messages-unreadable',
|
|
577
|
+
});
|
|
578
|
+
return { written: 0, unreadable: true };
|
|
407
579
|
}
|
|
408
|
-
const
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
580
|
+
const { written, droppedUnsaved } = await writeOpencodeV2Turns(target, sessionId, read.entries, isCurrent);
|
|
581
|
+
if (read.truncated || droppedUnsaved > 0) {
|
|
582
|
+
logger.warn('opencode-v2-history-recovery-truncated', {
|
|
583
|
+
worktreeId: target.worktreeId,
|
|
584
|
+
instanceId,
|
|
585
|
+
sessionId,
|
|
586
|
+
pages: read.pages,
|
|
587
|
+
droppedTurns: droppedUnsaved,
|
|
588
|
+
});
|
|
417
589
|
}
|
|
418
|
-
return written;
|
|
590
|
+
return { written, unreadable: read.unreadable };
|
|
419
591
|
}
|
|
420
592
|
catch (error) {
|
|
421
593
|
logger.error('opencode-v2-history-sync-failed', {
|
|
@@ -423,9 +595,10 @@ function syncOpencodeV2History(target, port, sessionId, isCurrent = () => true)
|
|
|
423
595
|
instanceId,
|
|
424
596
|
port,
|
|
425
597
|
sessionId,
|
|
598
|
+
recovery: true,
|
|
426
599
|
error: error instanceof Error ? error.message : String(error),
|
|
427
600
|
});
|
|
428
|
-
return 0;
|
|
601
|
+
return { written: 0, unreadable: true };
|
|
429
602
|
}
|
|
430
603
|
});
|
|
431
604
|
}
|
|
@@ -65,10 +65,16 @@ exports.OPENCODE_V2_PASSWORD_SUFFIX = '.pw';
|
|
|
65
65
|
*
|
|
66
66
|
* `~/.commandmate/opencode-v2`, or `$CM_OPENCODE_V2_DIR`. Resolved on every call
|
|
67
67
|
* so a test that points `HOME` or the variable somewhere else is honoured.
|
|
68
|
+
*
|
|
69
|
+
* Issue #4210: absolute, because a path under it leaves this process. The
|
|
70
|
+
* launch line hands `--password-file <file>` to `scripts/opencode-v2/launch.sh`
|
|
71
|
+
* (`./source.ts` `prepareOpencodeV2Launch`), which runs in the worktree
|
|
72
|
+
* (`cli-tools/base.ts` `createLaunchPane`) and would otherwise read another
|
|
73
|
+
* file than the one written here, or none.
|
|
68
74
|
*/
|
|
69
75
|
function getOpencodeV2StateDir() {
|
|
70
76
|
const fallback = (0, path_1.join)((0, os_1.homedir)(), '.commandmate', 'opencode-v2');
|
|
71
|
-
return (0, safe_directory_1.
|
|
77
|
+
return (0, safe_directory_1.resolveSafeAbsoluteDirectory)(process.env[exports.OPENCODE_V2_DIR_ENV], fallback, exports.OPENCODE_V2_DIR_ENV);
|
|
72
78
|
}
|
|
73
79
|
/**
|
|
74
80
|
* Create the state directory with owner-only access.
|
|
@@ -29,11 +29,18 @@
|
|
|
29
29
|
* And (Issue #2981) `session.usage.updated` and the end of a turn have
|
|
30
30
|
* `./usage` refresh the session's spend and context, which the subscription
|
|
31
31
|
* drops again when it closes or ends — the place v1 drops them.
|
|
32
|
+
* And (Issue #4187) a reconnect — a successful connection after an earlier
|
|
33
|
+
* successful one — has `./history` read the sessions the stream was following
|
|
34
|
+
* when it was lost, once, after the pending resync
|
|
35
|
+
* ({@link recoverOpencodeV2History}), so a turn that closed while the stream
|
|
36
|
+
* was down is written even when no later turn of that session ends. The screen
|
|
37
|
+
* scraper never writes a V2 reply, live or not.
|
|
32
38
|
*
|
|
33
39
|
* @module lib/hooks/sources/opencode-v2/subscription
|
|
34
40
|
*/
|
|
35
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.OPENCODE_V2_MAX_RESYNCED_DECISIONS = exports.OPENCODE_V2_MAX_REJECTED_PROBES = exports.OPENCODE_V2_RECONNECT_BACKOFF_MS = exports.OPENCODE_V2_HEARTBEAT_TIMEOUT_MS = void 0;
|
|
42
|
+
exports.OPENCODE_V2_HISTORY_RECOVERY_RETRY_MS = exports.OPENCODE_V2_MAX_RESYNCED_DECISIONS = exports.OPENCODE_V2_MAX_REJECTED_PROBES = exports.OPENCODE_V2_RECONNECT_BACKOFF_MS = exports.OPENCODE_V2_HEARTBEAT_TIMEOUT_MS = void 0;
|
|
43
|
+
exports.setOpencodeV2HistoryRecoveryRetryDelaysForTests = setOpencodeV2HistoryRecoveryRetryDelaysForTests;
|
|
37
44
|
exports.isOpencodeV2Subscribed = isOpencodeV2Subscribed;
|
|
38
45
|
exports.getOpencodeV2Liveness = getOpencodeV2Liveness;
|
|
39
46
|
exports.isOpencodeV2StructuredHistoryLive = isOpencodeV2StructuredHistoryLive;
|
|
@@ -72,6 +79,17 @@ exports.OPENCODE_V2_MAX_REJECTED_PROBES = 3;
|
|
|
72
79
|
* off a server CommandMate does not police.
|
|
73
80
|
*/
|
|
74
81
|
exports.OPENCODE_V2_MAX_RESYNCED_DECISIONS = 50;
|
|
82
|
+
/**
|
|
83
|
+
* Waits before retrying a recovery sync whose document could not be read
|
|
84
|
+
* (Issue #4187, C7). Three retries, then the session is given up with a warn;
|
|
85
|
+
* its next turn end still has the ordinary sync read the newest turns.
|
|
86
|
+
*/
|
|
87
|
+
exports.OPENCODE_V2_HISTORY_RECOVERY_RETRY_MS = [2_000, 5_000, 15_000];
|
|
88
|
+
let recoveryRetryDelays = exports.OPENCODE_V2_HISTORY_RECOVERY_RETRY_MS;
|
|
89
|
+
/** Shorten the recovery retries. Test seam; null restores the defaults. */
|
|
90
|
+
function setOpencodeV2HistoryRecoveryRetryDelaysForTests(delays) {
|
|
91
|
+
recoveryRetryDelays = delays ?? exports.OPENCODE_V2_HISTORY_RECOVERY_RETRY_MS;
|
|
92
|
+
}
|
|
75
93
|
const subscriptions = (0, global_state_1.getOrInitGlobal)('__opencodeV2Subscriptions', () => new Map());
|
|
76
94
|
/** The last liveness of a subscription that ended on its own, for `liveness()`. */
|
|
77
95
|
const endedLiveness = (0, global_state_1.getOrInitGlobal)('__opencodeV2EndedLiveness', () => new Map());
|
|
@@ -132,6 +150,10 @@ function openOpencodeV2Subscription(target, port, onEvent, normalize) {
|
|
|
132
150
|
liveness: { state: 'unknown' },
|
|
133
151
|
closed: false,
|
|
134
152
|
watchdog: null,
|
|
153
|
+
connectedOnce: false,
|
|
154
|
+
currentSessionId: null,
|
|
155
|
+
recoverySessions: new Map(),
|
|
156
|
+
recoveryController: new AbortController(),
|
|
135
157
|
};
|
|
136
158
|
subscriptions.set(key, state);
|
|
137
159
|
logger.info('opencode-v2-subscription-opened', {
|
|
@@ -172,6 +194,7 @@ function stop(state) {
|
|
|
172
194
|
clearWatchdog(state);
|
|
173
195
|
state.streamController.abort();
|
|
174
196
|
state.lifetimeController.abort();
|
|
197
|
+
state.recoveryController.abort();
|
|
175
198
|
}
|
|
176
199
|
/** End a subscription from inside its own loop, remembering why. */
|
|
177
200
|
function endSubscription(state, reason) {
|
|
@@ -263,6 +286,10 @@ async function runStream(state) {
|
|
|
263
286
|
else {
|
|
264
287
|
rejected = 0;
|
|
265
288
|
const items = await (0, client_1.openOpencodeV2EventStream)(state.port, password, state.streamController.signal);
|
|
289
|
+
// Issue #4187 (C1): read before it is set, so only a success after an
|
|
290
|
+
// earlier success counts as a reconnect.
|
|
291
|
+
const reconnected = state.connectedOnce;
|
|
292
|
+
state.connectedOnce = true;
|
|
266
293
|
markAlive(state);
|
|
267
294
|
attempt = 0;
|
|
268
295
|
// Issue #2951: before the first live frame, so an approval raised while
|
|
@@ -270,6 +297,12 @@ async function runStream(state) {
|
|
|
270
297
|
// one. A frame for the same id on the new stream is then a duplicate by
|
|
271
298
|
// identity, not a second approval.
|
|
272
299
|
await resyncOpencodeV2Pending(state.target, state.port, password, (frame) => deliver(state, frame));
|
|
300
|
+
// Issue #4187 (C2, C3): once per reconnect, after the resync, and only
|
|
301
|
+
// for a subscription still the instance's. Started before the first
|
|
302
|
+
// live frame, so it is queued in `./history` ahead of any ordinary sync
|
|
303
|
+
// this connection's frames trigger.
|
|
304
|
+
if (reconnected && isCurrentSubscription(state))
|
|
305
|
+
startHistoryRecovery(state);
|
|
273
306
|
for await (const item of items) {
|
|
274
307
|
if (state.closed)
|
|
275
308
|
break;
|
|
@@ -288,6 +321,15 @@ async function runStream(state) {
|
|
|
288
321
|
if (state.closed)
|
|
289
322
|
return;
|
|
290
323
|
state.liveness = { state: 'lost', since: Date.now(), reason };
|
|
324
|
+
// Issue #4187 (C4): the session followed when the stream was lost is what a
|
|
325
|
+
// reconnect recovers, whatever session the resync then names. A new entry
|
|
326
|
+
// per loss, so a recovery read already running cannot take this loss out
|
|
327
|
+
// with its own success; that recovery stops here and the next reconnect
|
|
328
|
+
// starts anew.
|
|
329
|
+
state.recoveryController.abort();
|
|
330
|
+
if (state.currentSessionId !== null) {
|
|
331
|
+
state.recoverySessions.set(state.currentSessionId, { lostAt: state.liveness.since });
|
|
332
|
+
}
|
|
291
333
|
logger.info('opencode-v2-subscription-disconnected', {
|
|
292
334
|
worktreeId: state.target.worktreeId,
|
|
293
335
|
instanceId: state.target.instanceId ?? state.target.cliToolId,
|
|
@@ -374,7 +416,74 @@ function deliverOpencodeV2Frame(frame, normalize, onEvent, receivedAt = Date.now
|
|
|
374
416
|
onEvent(event);
|
|
375
417
|
return true;
|
|
376
418
|
}
|
|
419
|
+
/**
|
|
420
|
+
* The recovery sync of one reconnect (Issue #4187, C2〜C8).
|
|
421
|
+
*
|
|
422
|
+
* Reads each session in `recoverySessions` back to the page cap; a
|
|
423
|
+
* session whose read succeeded leaves the set, one that could not be read stays
|
|
424
|
+
* and is retried after {@link OPENCODE_V2_HISTORY_RECOVERY_RETRY_MS}, three
|
|
425
|
+
* times at most, then is given up with a warn. A newer reconnect aborts this one
|
|
426
|
+
* and takes the set over (one recovery per reconnect); a loss of the stream,
|
|
427
|
+
* closing or ending the subscription aborts it too. A read already under way
|
|
428
|
+
* still writes its rows, but takes its session out of the set only if no loss
|
|
429
|
+
* replaced the entry it began on. Never throws.
|
|
430
|
+
*/
|
|
431
|
+
function startHistoryRecovery(state) {
|
|
432
|
+
state.recoveryController.abort();
|
|
433
|
+
const controller = new AbortController();
|
|
434
|
+
state.recoveryController = controller;
|
|
435
|
+
void runHistoryRecovery(state, controller.signal).catch((error) => {
|
|
436
|
+
logger.warn('opencode-v2-history-recovery-failed', {
|
|
437
|
+
worktreeId: state.target.worktreeId,
|
|
438
|
+
instanceId: state.target.instanceId ?? state.target.cliToolId,
|
|
439
|
+
error: error instanceof Error ? error.message : String(error),
|
|
440
|
+
});
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
async function runHistoryRecovery(state, signal) {
|
|
444
|
+
const stillOurs = () => !signal.aborted && isCurrentSubscription(state);
|
|
445
|
+
for (let retry = 0;; retry += 1) {
|
|
446
|
+
if (!stillOurs())
|
|
447
|
+
return;
|
|
448
|
+
const pending = [...state.recoverySessions];
|
|
449
|
+
if (pending.length === 0)
|
|
450
|
+
return;
|
|
451
|
+
for (const [sessionId, entry] of pending) {
|
|
452
|
+
if (!stillOurs())
|
|
453
|
+
return;
|
|
454
|
+
const result = await (0, history_1.recoverOpencodeV2History)(state.target, state.port, sessionId, {
|
|
455
|
+
isCurrent: () => isFollowing(state, sessionId),
|
|
456
|
+
});
|
|
457
|
+
// Only the entry this read began on: a loss during the read replaced it.
|
|
458
|
+
if (!result.unreadable && state.recoverySessions.get(sessionId) === entry) {
|
|
459
|
+
state.recoverySessions.delete(sessionId);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
if (state.recoverySessions.size === 0 || !stillOurs())
|
|
463
|
+
return;
|
|
464
|
+
const delays = recoveryRetryDelays;
|
|
465
|
+
if (retry >= delays.length) {
|
|
466
|
+
const givenUp = [...state.recoverySessions].filter(([, entry]) => pending.some(([, read]) => read === entry));
|
|
467
|
+
logger.warn('opencode-v2-history-recovery-failed', {
|
|
468
|
+
worktreeId: state.target.worktreeId,
|
|
469
|
+
instanceId: state.target.instanceId ?? state.target.cliToolId,
|
|
470
|
+
port: state.port,
|
|
471
|
+
sessionIds: givenUp.map(([sessionId]) => sessionId),
|
|
472
|
+
attempts: retry + 1,
|
|
473
|
+
});
|
|
474
|
+
for (const [sessionId] of givenUp)
|
|
475
|
+
state.recoverySessions.delete(sessionId);
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
await waitUnlessAborted(delays[retry], signal);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
377
481
|
function deliver(state, frame) {
|
|
482
|
+
// Issue #4187 (C4): every frame naming a session moves the current one,
|
|
483
|
+
// resync frames included.
|
|
484
|
+
const sessionId = (0, mappers_1.frameSessionId)(frame);
|
|
485
|
+
if (sessionId !== null)
|
|
486
|
+
state.currentSessionId = sessionId;
|
|
378
487
|
try {
|
|
379
488
|
deliverOpencodeV2Frame(frame, state.normalize, state.onEvent);
|
|
380
489
|
}
|
|
@@ -386,12 +495,18 @@ function deliver(state, frame) {
|
|
|
386
495
|
error: error instanceof Error ? error.message : String(error),
|
|
387
496
|
});
|
|
388
497
|
}
|
|
389
|
-
|
|
498
|
+
// Issue #4187 (C5): latch only while this subscription still follows the
|
|
499
|
+
// session the frame ended a turn of.
|
|
500
|
+
void recordOpencodeV2TurnEnd(state.target, state.port, frame, () => sessionId !== null && isFollowing(state, sessionId));
|
|
390
501
|
void refreshOpencodeV2UsageOnFrame(state.target, state.port, frame, () => isCurrentSubscription(state));
|
|
391
502
|
}
|
|
392
503
|
function isCurrentSubscription(state) {
|
|
393
504
|
return !state.closed && subscriptions.get(state.key) === state;
|
|
394
505
|
}
|
|
506
|
+
/** Still the instance's subscription, and still following `sessionId` (C5). */
|
|
507
|
+
function isFollowing(state, sessionId) {
|
|
508
|
+
return isCurrentSubscription(state) && state.currentSessionId === sessionId;
|
|
509
|
+
}
|
|
395
510
|
/**
|
|
396
511
|
* Have `./usage` re-read the session's spend and context when this frame says
|
|
397
512
|
* they moved (Issue #2981): `session.usage.updated`, or the end of a turn.
|