commandmate 0.46.0 → 0.47.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 +417 -410
- package/.next/app-path-routes-manifest.json +22 -21
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +12 -12
- package/.next/react-loadable-manifest.json +2 -2
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +8 -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.js +4 -2
- 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 +2 -2
- 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 +9 -9
- 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 -7
- 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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/vapid/route.js +1 -7
- 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 +1 -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/route.js +1 -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_client-reference-manifest.js +1 -1
- 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_client-reference-manifest.js +1 -1
- 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_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_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_client-reference-manifest.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_client-reference-manifest.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 +1 -1
- 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_client-reference-manifest.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 +1 -1
- 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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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]/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 +1 -1
- 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.js +9 -9
- 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_client-reference-manifest.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_client-reference-manifest.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 -0
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route_client-reference-manifest.js +1 -0
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 -1
- 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 +2 -2
- 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_client-reference-manifest.js +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_client-reference-manifest.js +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_client-reference-manifest.js +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_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js +2 -2
- 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_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_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_client-reference-manifest.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_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_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_client-reference-manifest.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.js.nft.json +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 +11 -11
- package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
- 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 +22 -21
- package/.next/server/chunks/1210.js +1 -1
- package/.next/server/chunks/1501.js +2 -2
- package/.next/server/chunks/1559.js +1 -1
- package/.next/server/chunks/1601.js +7 -0
- package/.next/server/chunks/1836.js +1 -0
- package/.next/server/chunks/1945.js +14 -0
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/2404.js +1 -1
- package/.next/server/chunks/2422.js +1 -0
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/2460.js +1 -1
- package/.next/server/chunks/2534.js +1 -1
- package/.next/server/chunks/3241.js +1 -1
- package/.next/server/chunks/{3077.js → 4194.js} +12 -12
- package/.next/server/chunks/4207.js +1 -1
- package/.next/server/chunks/4248.js +1 -1
- package/.next/server/chunks/5209.js +1 -1
- package/.next/server/chunks/5292.js +3 -3
- package/.next/server/chunks/5595.js +1 -1
- package/.next/server/chunks/5845.js +1 -1
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/6401.js +1 -1
- package/.next/server/chunks/{2283.js → 6486.js} +7 -7
- package/.next/server/chunks/6722.js +1 -1
- package/.next/server/chunks/6781.js +1 -1
- package/.next/server/chunks/6793.js +2 -2
- package/.next/server/chunks/7166.js +19 -0
- package/.next/server/chunks/7905.js +1 -1
- package/.next/server/chunks/8581.js +12 -12
- package/.next/server/chunks/8728.js +2 -2
- package/.next/server/chunks/8791.js +1 -1
- package/.next/server/chunks/8918.js +6 -6
- package/.next/server/chunks/9199.js +1 -0
- package/.next/server/chunks/936.js +1 -0
- package/.next/server/chunks/9390.js +1 -1
- package/.next/server/chunks/9540.js +1 -0
- package/.next/server/chunks/9627.js +3 -2
- 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/{2407-acb644c5487e1720.js → 2407-b2f524f99f7fc353.js} +1 -1
- package/.next/static/chunks/{2717.21abf5b6bbd45520.js → 2717.1583400c272dc1d9.js} +1 -1
- package/.next/static/chunks/5371-a549a0d2c2044d41.js +1 -0
- package/.next/static/chunks/5794-80ac3f06f098ea29.js +1 -0
- package/.next/static/chunks/602-1c1488959215e140.js +1 -0
- package/.next/static/chunks/{8407-9a72e6f07c5d5458.js → 8407-155f84e5ba05f1d5.js} +1 -1
- package/.next/static/chunks/9079-24f9fa549ed298f1.js +1 -0
- package/.next/static/chunks/app/api/agents/update/{route-0468c3c4baa46028.js → route-c81284a9d8b35304.js} +1 -1
- package/.next/static/chunks/app/api/agents/versions/{route-0468c3c4baa46028.js → route-c81284a9d8b35304.js} +1 -1
- package/.next/static/chunks/app/api/app/release-notes/{route-0468c3c4baa46028.js → route-c81284a9d8b35304.js} +1 -1
- package/.next/static/chunks/app/api/app/update/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/app/update-check/{route-0468c3c4baa46028.js → route-c81284a9d8b35304.js} +1 -1
- package/.next/static/chunks/app/api/auth/login/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/capabilities/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/fs/browse/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/fs/recent-paths/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/hooks/agent-event/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/hooks/permission-request/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/metrics/vibe/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/push/escalation/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/relays/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/remote/pair/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/validate-path/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/settings/default-agents/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/skills/installations/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/skills/operations/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/skills/reindex/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/skills/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/templates/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/layout-419eaf7de340f4ab.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/proxy/[...path]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/sessions/page-e02f1adb1d1c1ccc.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/layout-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-45294052ee3032f1.js +1 -0
- package/.next/static/chunks/{webpack-c0b821f340afdebf.js → webpack-468b7b33030234b3.js} +1 -1
- package/.next/trace +13 -13
- package/.next/types/app/api/worktrees/[id]/prompt-response/strict/route.ts +347 -0
- package/.next/types/routes.d.ts +2 -1
- package/.next/types/validator.ts +9 -0
- package/dist/cli/commands/auto-yes.d.ts +19 -0
- package/dist/cli/commands/auto-yes.d.ts.map +1 -1
- package/dist/cli/commands/auto-yes.js +45 -0
- package/dist/cli/commands/instances.d.ts.map +1 -1
- package/dist/cli/commands/instances.js +23 -18
- package/dist/cli/commands/ls.d.ts +15 -1
- package/dist/cli/commands/ls.d.ts.map +1 -1
- package/dist/cli/commands/ls.js +39 -3
- package/dist/cli/commands/prompt.d.ts +42 -0
- package/dist/cli/commands/prompt.d.ts.map +1 -0
- package/dist/cli/commands/prompt.js +211 -0
- package/dist/cli/commands/relays.d.ts.map +1 -1
- package/dist/cli/commands/relays.js +13 -1
- package/dist/cli/commands/respond-strict.d.ts +31 -0
- package/dist/cli/commands/respond-strict.d.ts.map +1 -0
- package/dist/cli/commands/respond-strict.js +214 -0
- package/dist/cli/commands/respond.d.ts.map +1 -1
- package/dist/cli/commands/respond.js +38 -0
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +41 -5
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +2 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +18 -0
- package/dist/cli/commands/wait.d.ts +21 -1
- package/dist/cli/commands/wait.d.ts.map +1 -1
- package/dist/cli/commands/wait.js +113 -12
- 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 +63 -1
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +6 -2
- package/dist/cli/types/api-responses.d.ts +62 -6
- package/dist/cli/types/api-responses.d.ts.map +1 -1
- package/dist/cli/types/index.d.ts +30 -0
- package/dist/cli/types/index.d.ts.map +1 -1
- package/dist/cli/types/index.js +12 -1
- package/dist/cli/utils/api-client.d.ts +13 -1
- package/dist/cli/utils/api-client.d.ts.map +1 -1
- package/dist/cli/utils/api-client.js +10 -2
- package/dist/cli/utils/daemon-factory.d.ts.map +1 -1
- package/dist/cli/utils/daemon-factory.js +3 -1
- package/dist/cli/utils/daemon.d.ts +38 -1
- package/dist/cli/utils/daemon.d.ts.map +1 -1
- package/dist/cli/utils/daemon.js +161 -8
- package/dist/cli/utils/paths.d.ts +12 -0
- package/dist/cli/utils/paths.d.ts.map +1 -1
- package/dist/cli/utils/paths.js +17 -0
- package/dist/lib/polling/auto-yes-suppression-reason.d.ts +55 -1
- package/dist/lib/polling/auto-yes-suppression-reason.d.ts.map +1 -1
- package/dist/lib/polling/auto-yes-suppression-reason.js +20 -0
- package/dist/lib/prompt-observation/kinds.d.ts +101 -0
- package/dist/lib/prompt-observation/kinds.d.ts.map +1 -0
- package/dist/lib/prompt-observation/kinds.js +123 -0
- package/dist/lib/prompt-observation/types.d.ts +271 -0
- package/dist/lib/prompt-observation/types.d.ts.map +1 -0
- package/dist/lib/prompt-observation/types.js +14 -0
- package/dist/lib/session/send-attempt-types.d.ts +66 -0
- package/dist/lib/session/send-attempt-types.d.ts.map +1 -0
- package/dist/lib/session/send-attempt-types.js +17 -0
- package/dist/server/locales/en/worktree.json +4 -0
- package/dist/server/locales/ja/worktree.json +4 -0
- package/dist/server/server.js +20 -1
- package/dist/server/src/config/auto-yes-config.js +11 -0
- package/dist/server/src/lib/assistant-response-saver.js +13 -0
- package/dist/server/src/lib/auto-yes-lifecycle.js +28 -2
- package/dist/server/src/lib/auto-yes-poller.js +593 -78
- package/dist/server/src/lib/auto-yes-shutdown-record.js +257 -0
- package/dist/server/src/lib/auto-yes-state.js +197 -4
- package/dist/server/src/lib/cli-tools/antigravity-startup-trust.js +135 -0
- package/dist/server/src/lib/cli-tools/antigravity.js +162 -29
- package/dist/server/src/lib/cli-tools/command-code.js +10 -2
- package/dist/server/src/lib/cli-tools/copilot.js +21 -10
- package/dist/server/src/lib/cli-tools/gemini.js +60 -13
- package/dist/server/src/lib/cli-tools/launch-dialog.js +203 -0
- package/dist/server/src/lib/cli-tools/launch-window.js +96 -0
- package/dist/server/src/lib/conversation-logger.js +14 -2
- package/dist/server/src/lib/db/chat-db.js +2 -1
- package/dist/server/src/lib/detection/selection-shape.js +35 -1
- package/dist/server/src/lib/detection/tools/antigravity/detect.js +38 -9
- package/dist/server/src/lib/detection/tools/antigravity/dialog.js +88 -1
- package/dist/server/src/lib/detection/tools/antigravity/patterns.js +41 -1
- package/dist/server/src/lib/detection/tools/claude/detect.js +60 -0
- package/dist/server/src/lib/detection/tools/command-code/selection-shape.js +63 -13
- package/dist/server/src/lib/detection/tools/copilot/patterns.js +7 -1
- package/dist/server/src/lib/history/user-turn-recorder.js +14 -0
- package/dist/server/src/lib/hooks/sources/antigravity/history.js +28 -0
- package/dist/server/src/lib/hooks/sources/claude/history.js +7 -0
- package/dist/server/src/lib/hooks/sources/codex/history.js +7 -0
- package/dist/server/src/lib/hooks/sources/command-code/history.js +7 -0
- package/dist/server/src/lib/hooks/sources/opencode-v2/history.js +11 -2
- package/dist/server/src/lib/hooks/sources/opencode-v2/subscription.js +5 -3
- package/dist/server/src/lib/hooks/sources/transcript-history.js +34 -0
- package/dist/server/src/lib/log-manager.js +7 -2
- package/dist/server/src/lib/polling/antigravity-permission-receipts.js +15 -0
- package/dist/server/src/lib/polling/antigravity-receipt-episodes.js +281 -0
- package/dist/server/src/lib/polling/auto-yes-confirm-page.js +56 -0
- package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +8 -1
- package/dist/server/src/lib/polling/auto-yes-enter-fallback-state.js +22 -3
- package/dist/server/src/lib/polling/auto-yes-policy.js +61 -7
- package/dist/server/src/lib/polling/auto-yes-poller-state.js +234 -0
- package/dist/server/src/lib/polling/auto-yes-poller-stop-reason.js +50 -0
- package/dist/server/src/lib/polling/auto-yes-prompt-suppression.js +220 -5
- package/dist/server/src/lib/polling/auto-yes-suppression-reason.js +20 -0
- package/dist/server/src/lib/polling/auto-yes-suppression-state.js +10 -0
- package/dist/server/src/lib/polling/pending-scraped-response.js +119 -3
- package/dist/server/src/lib/polling/poller-owner.js +110 -0
- package/dist/server/src/lib/polling/response-checker-dialog-gate.js +2 -2
- package/dist/server/src/lib/polling/response-checker.js +211 -39
- package/dist/server/src/lib/polling/response-dedup.js +8 -0
- package/dist/server/src/lib/polling/response-poller-core.js +226 -75
- package/dist/server/src/lib/polling/structured-history-gate.js +20 -1
- package/dist/server/src/lib/prompt-answer-sender.js +59 -12
- package/dist/server/src/lib/prompt-observation/kinds.js +123 -0
- package/dist/server/src/lib/prompt-observation/types.js +14 -0
- package/dist/server/src/lib/push/prompt-push-gate.js +195 -3
- package/dist/server/src/lib/push/waiting-push-notifier.js +74 -7
- package/dist/server/src/lib/realtime/terminal-broadcast.js +14 -0
- package/dist/server/src/lib/relay/relay-delivery-claims.js +46 -0
- package/dist/server/src/lib/relay/relay-delivery.js +76 -30
- package/dist/server/src/lib/schedule-manager.js +28 -0
- package/dist/server/src/lib/session/chat-turn-progress.js +57 -6
- package/dist/server/src/lib/session/cli-session.js +38 -3
- package/dist/server/src/lib/session/current-output-builder.js +19 -0
- package/dist/server/src/lib/session/send-attempt-state.js +155 -0
- package/dist/server/src/lib/session/send-attempt-types.js +17 -0
- package/dist/server/src/lib/session/send-user-message.js +46 -0
- package/dist/server/src/lib/session/worktree-session-reconcile.js +85 -11
- package/dist/server/src/lib/timer-manager.js +7 -0
- package/dist/server/src/lib/tmux/session-created-signal.js +76 -0
- package/dist/server/src/lib/tmux/tmux-capture-cache.js +58 -6
- package/dist/server/src/lib/tmux/tmux.js +28 -2
- package/dist/server/src/lib/verification/env-clean-gate.js +30 -2
- package/dist/server/src/lib/verification/scope-gate-format.js +100 -0
- package/dist/server/src/lib/verification/scope-gate-glob.js +185 -0
- package/dist/server/src/lib/verification/scope-gate.js +19 -271
- package/dist/server/src/lib/ws-server.js +48 -6
- package/docs/en/user-guide/cli-setup-guide.md +12 -1
- package/docs/en/user-guide/webapp-guide.md +2 -0
- package/package.json +1 -1
- package/release-notes/0.46.1.json +40 -0
- package/release-notes/0.47.0.json +118 -0
- package/.next/server/chunks/1789.js +0 -1
- package/.next/server/chunks/2908.js +0 -1
- package/.next/server/chunks/3718.js +0 -1
- package/.next/server/chunks/4837.js +0 -14
- package/.next/server/chunks/5625.js +0 -25
- package/.next/server/chunks/611.js +0 -1
- package/.next/server/chunks/850.js +0 -1
- package/.next/static/chunks/3201-c01f1feed69020e6.js +0 -1
- package/.next/static/chunks/5371-a94ed618148287a0.js +0 -1
- package/.next/static/chunks/5794-947fb4934d8be193.js +0 -1
- package/.next/static/chunks/602-25e45a2422d2a3ea.js +0 -1
- package/.next/static/chunks/app/api/app/update/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/capabilities/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/fs/browse/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/fs/recent-paths/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/hooks/agent-event/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/hooks/permission-request/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/metrics/vibe/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/push/escalation/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/relays/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/remote/pair/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/validate-path/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/settings/default-agents/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/skills/[id]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/skills/installations/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/skills/operations/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/skills/reindex/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/skills/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/templates/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/layout-ae30ce63569c22be.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/sessions/page-9859ed61e93e6890.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/layout-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-2eb1d0fd0a077b7e.js +0 -1
- /package/.next/static/{zI2nQ6WKboSbFbMF4EtrJ → b5BiQC9F6r_XFPdA9cuSj}/_buildManifest.js +0 -0
- /package/.next/static/{zI2nQ6WKboSbFbMF4EtrJ → b5BiQC9F6r_XFPdA9cuSj}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* What a graceful shutdown released, for the next process to explain
|
|
4
|
+
* (Issue #3730).
|
|
5
|
+
*
|
|
6
|
+
* Auto-Yes grants live in memory (`auto-yes-state`), and the lifecycle table
|
|
7
|
+
* keeps `server-shutdown` at `state: 'none'` on purpose: a restarted server
|
|
8
|
+
* starts with every grant OFF. What was missing is the reason. Without it an
|
|
9
|
+
* instance whose grant the restart took reads exactly like one that was never
|
|
10
|
+
* armed, and a worker sits at its next permission dialog with nothing anywhere
|
|
11
|
+
* saying why.
|
|
12
|
+
*
|
|
13
|
+
* So the shutdown writes down which grants were live, and the next start seeds
|
|
14
|
+
* each still in-period one as a DISABLED state with
|
|
15
|
+
* `stopReason: 'server-restart'` (`seedServerRestartNotice`). This is the
|
|
16
|
+
* explanation of a release, never a restore: nothing here enables a grant or
|
|
17
|
+
* starts a poller.
|
|
18
|
+
*
|
|
19
|
+
* ## Scope
|
|
20
|
+
*
|
|
21
|
+
* - Graceful stops only (SIGINT / SIGTERM through `server.ts`). A SIGKILL, a
|
|
22
|
+
* crash or a power loss records nothing; every grant then comes back off with
|
|
23
|
+
* no reason, which is the behaviour before this module.
|
|
24
|
+
* - One record per database: `<CM_DB_PATH>.auto-yes-shutdown.json`. The normal
|
|
25
|
+
* server's `cm.db` and an Issue server's `cm-N.db` share a directory, so a
|
|
26
|
+
* fixed name would let one server read the other's grants. Two processes on
|
|
27
|
+
* ONE database (#1360 calls that a misconfiguration) share the file, and the
|
|
28
|
+
* last writer wins.
|
|
29
|
+
* - `CM_AUTO_YES_SHUTDOWN_RECORD_PATH` overrides the location; `tests/setup.ts`
|
|
30
|
+
* points it at a per-worker temp file so no test touches a real one.
|
|
31
|
+
*
|
|
32
|
+
* ## Failure
|
|
33
|
+
*
|
|
34
|
+
* Every failure is logged and swallowed. A record that cannot be written costs
|
|
35
|
+
* the next start its explanation and nothing else; one that cannot be read,
|
|
36
|
+
* parsed or removed leaves every grant off with no reason — the old behaviour —
|
|
37
|
+
* and the server starts. Shutdown is never held up by this module.
|
|
38
|
+
*
|
|
39
|
+
* Writes go to a temp file in the same directory and are renamed over the
|
|
40
|
+
* record (mode 0600), so a reader sees the old record or the new one, never
|
|
41
|
+
* half of one.
|
|
42
|
+
*
|
|
43
|
+
* ## After the record
|
|
44
|
+
*
|
|
45
|
+
* The HTTP drain after the record still answers requests. An enable is refused
|
|
46
|
+
* from the moment the shutdown begins; an OFF (or a session kill, an instance
|
|
47
|
+
* removal, a worktree delete) is accepted — refusing an OFF would leave a
|
|
48
|
+
* worker that was asked to stop answering still armed for the drain — and the
|
|
49
|
+
* record is rewritten from memory after it, so the next start does not bring
|
|
50
|
+
* back a notice the user cleared. Withdrawing rather than refusing: the change
|
|
51
|
+
* only ever narrows the record.
|
|
52
|
+
*
|
|
53
|
+
* @module lib/auto-yes-shutdown-record
|
|
54
|
+
*/
|
|
55
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
56
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
57
|
+
};
|
|
58
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59
|
+
exports.AUTO_YES_SHUTDOWN_RECORD_SUFFIX = exports.AUTO_YES_SHUTDOWN_RECORD_PATH_ENV = void 0;
|
|
60
|
+
exports.resolveAutoYesShutdownRecordPath = resolveAutoYesShutdownRecordPath;
|
|
61
|
+
exports.recordAutoYesShutdown = recordAutoYesShutdown;
|
|
62
|
+
exports.restoreAutoYesShutdownRecord = restoreAutoYesShutdownRecord;
|
|
63
|
+
const fs_1 = __importDefault(require("fs"));
|
|
64
|
+
const path_1 = __importDefault(require("path"));
|
|
65
|
+
const env_1 = require("../lib/env");
|
|
66
|
+
const logger_1 = require("../lib/logger");
|
|
67
|
+
const types_1 = require("./cli-tools/types");
|
|
68
|
+
const path_validator_1 = require("./security/path-validator");
|
|
69
|
+
const auto_yes_state_1 = require("./auto-yes-state");
|
|
70
|
+
const logger = (0, logger_1.createLogger)('auto-yes-shutdown-record');
|
|
71
|
+
/** Environment variable that overrides where the record lives. */
|
|
72
|
+
exports.AUTO_YES_SHUTDOWN_RECORD_PATH_ENV = 'CM_AUTO_YES_SHUTDOWN_RECORD_PATH';
|
|
73
|
+
/** Appended to the database path to name its record. */
|
|
74
|
+
exports.AUTO_YES_SHUTDOWN_RECORD_SUFFIX = '.auto-yes-shutdown.json';
|
|
75
|
+
/** Version of the on-disk shape. A record of any other version is ignored. */
|
|
76
|
+
const RECORD_VERSION = 1;
|
|
77
|
+
/** Upper bound on entries read back: far above any real server, well below abuse. */
|
|
78
|
+
const MAX_RECORD_ENTRIES = 1000;
|
|
79
|
+
/**
|
|
80
|
+
* Where this process's record lives: the override, else next to the database.
|
|
81
|
+
*
|
|
82
|
+
* @returns The path, or null when neither can be resolved (the record is then skipped)
|
|
83
|
+
*/
|
|
84
|
+
function resolveAutoYesShutdownRecordPath() {
|
|
85
|
+
const override = (process.env[exports.AUTO_YES_SHUTDOWN_RECORD_PATH_ENV] ?? '').trim();
|
|
86
|
+
if (override !== '')
|
|
87
|
+
return override;
|
|
88
|
+
try {
|
|
89
|
+
return `${(0, env_1.getEnv)().CM_DB_PATH}${exports.AUTO_YES_SHUTDOWN_RECORD_SUFFIX}`;
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
logger.warn('record-path-unresolved', { error: error instanceof Error ? error.message : String(error) });
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Begin the Auto-Yes side of a graceful shutdown and write down what it
|
|
98
|
+
* releases. Call it before the pollers are stopped.
|
|
99
|
+
*
|
|
100
|
+
* Marks the shutdown first (`beginAutoYesShutdown`), so an enable that returns
|
|
101
|
+
* from an await after this point is refused rather than added behind the
|
|
102
|
+
* record's back. With nothing to record, a leftover record is removed, so a
|
|
103
|
+
* file the previous start failed to delete cannot outlive the grants it named.
|
|
104
|
+
*
|
|
105
|
+
* Never throws.
|
|
106
|
+
*
|
|
107
|
+
* @param options.path - Record path (default: {@link resolveAutoYesShutdownRecordPath})
|
|
108
|
+
* @param options.now - Clock reading (default: Date.now())
|
|
109
|
+
*/
|
|
110
|
+
function recordAutoYesShutdown(options = {}) {
|
|
111
|
+
(0, auto_yes_state_1.beginAutoYesShutdown)();
|
|
112
|
+
const recordPath = options.path === undefined ? resolveAutoYesShutdownRecordPath() : options.path;
|
|
113
|
+
if (recordPath === null)
|
|
114
|
+
return { recorded: 0, error: 'record path unresolved' };
|
|
115
|
+
// Every later change rewrites the record from memory (see "After the record").
|
|
116
|
+
(0, auto_yes_state_1.setAutoYesChangeAfterShutdownListener)(() => {
|
|
117
|
+
const rewritten = writeRecord(recordPath, Date.now());
|
|
118
|
+
if (rewritten.error === undefined)
|
|
119
|
+
logger.info('record-rewritten', { grants: rewritten.recorded });
|
|
120
|
+
});
|
|
121
|
+
const result = writeRecord(recordPath, options.now ?? Date.now());
|
|
122
|
+
if (result.error === undefined)
|
|
123
|
+
logger.info('recorded', { grants: result.recorded });
|
|
124
|
+
return result;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Write the grants memory holds at `now` to `recordPath`, or remove the record
|
|
128
|
+
* when there are none. Never throws.
|
|
129
|
+
*/
|
|
130
|
+
function writeRecord(recordPath, now) {
|
|
131
|
+
try {
|
|
132
|
+
const grants = (0, auto_yes_state_1.collectReleasedAutoYesGrants)(now);
|
|
133
|
+
if (grants.length === 0) {
|
|
134
|
+
fs_1.default.rmSync(recordPath, { force: true });
|
|
135
|
+
return { recorded: 0 };
|
|
136
|
+
}
|
|
137
|
+
const body = { version: RECORD_VERSION, writtenAt: now, grants };
|
|
138
|
+
const dir = path_1.default.dirname(recordPath);
|
|
139
|
+
fs_1.default.mkdirSync(dir, { recursive: true, mode: 0o700 });
|
|
140
|
+
const tempPath = path_1.default.join(dir, `.${path_1.default.basename(recordPath)}.${process.pid}.tmp`);
|
|
141
|
+
try {
|
|
142
|
+
fs_1.default.writeFileSync(tempPath, JSON.stringify(body), { mode: 0o600 });
|
|
143
|
+
fs_1.default.renameSync(tempPath, recordPath);
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
fs_1.default.rmSync(tempPath, { force: true });
|
|
147
|
+
throw error;
|
|
148
|
+
}
|
|
149
|
+
return { recorded: grants.length };
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
153
|
+
logger.warn('record-failed', { error: message });
|
|
154
|
+
return { recorded: 0, error: message };
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/** One grant read back, or null when the entry is not one this module wrote. */
|
|
158
|
+
function parseGrant(raw) {
|
|
159
|
+
if (typeof raw !== 'object' || raw === null)
|
|
160
|
+
return null;
|
|
161
|
+
const entry = raw;
|
|
162
|
+
const { worktreeId, cliToolId, instanceId, enabledAt, expiresAt } = entry;
|
|
163
|
+
if (typeof worktreeId !== 'string' || !(0, path_validator_1.isValidWorktreeId)(worktreeId))
|
|
164
|
+
return null;
|
|
165
|
+
if (typeof cliToolId !== 'string' || !(0, types_1.isCliToolType)(cliToolId))
|
|
166
|
+
return null;
|
|
167
|
+
if (typeof instanceId !== 'string' || !(0, types_1.isValidInstanceId)(instanceId))
|
|
168
|
+
return null;
|
|
169
|
+
if (typeof enabledAt !== 'number' || !Number.isFinite(enabledAt))
|
|
170
|
+
return null;
|
|
171
|
+
if (typeof expiresAt !== 'number' || !Number.isFinite(expiresAt))
|
|
172
|
+
return null;
|
|
173
|
+
return { worktreeId, cliToolId, instanceId, enabledAt, expiresAt };
|
|
174
|
+
}
|
|
175
|
+
/** The grants in a record, or null when the record is not one this module wrote. */
|
|
176
|
+
function parseRecord(text) {
|
|
177
|
+
let parsed;
|
|
178
|
+
try {
|
|
179
|
+
parsed = JSON.parse(text);
|
|
180
|
+
}
|
|
181
|
+
catch {
|
|
182
|
+
return null;
|
|
183
|
+
}
|
|
184
|
+
if (typeof parsed !== 'object' || parsed === null)
|
|
185
|
+
return null;
|
|
186
|
+
const record = parsed;
|
|
187
|
+
if (record.version !== RECORD_VERSION || !Array.isArray(record.grants))
|
|
188
|
+
return null;
|
|
189
|
+
if (record.grants.length > MAX_RECORD_ENTRIES)
|
|
190
|
+
return null;
|
|
191
|
+
const grants = [];
|
|
192
|
+
for (const raw of record.grants) {
|
|
193
|
+
const grant = parseGrant(raw);
|
|
194
|
+
// All or nothing: a record with an entry this module did not write is not
|
|
195
|
+
// its record, and half-trusting it is how a wrong notice gets shown.
|
|
196
|
+
if (!grant)
|
|
197
|
+
return null;
|
|
198
|
+
grants.push(grant);
|
|
199
|
+
}
|
|
200
|
+
return grants;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Read the previous process's record, seed a restart notice for each grant
|
|
204
|
+
* still in period, and remove the record. Call it before the server answers its
|
|
205
|
+
* first request: a notice seeded after a request could overwrite what that
|
|
206
|
+
* request wrote (it does not — {@link seedServerRestartNotice} refuses a key
|
|
207
|
+
* that has a state — but the first answers would still lack it).
|
|
208
|
+
*
|
|
209
|
+
* The record is consumed whether or not it parses: a broken file read twice is
|
|
210
|
+
* broken twice. A record that cannot be removed is harmless — the next
|
|
211
|
+
* shutdown overwrites or removes it, and a second read seeds nothing over the
|
|
212
|
+
* states the first one wrote.
|
|
213
|
+
*
|
|
214
|
+
* Never throws; with no record, does nothing.
|
|
215
|
+
*
|
|
216
|
+
* @param options.path - Record path (default: {@link resolveAutoYesShutdownRecordPath})
|
|
217
|
+
* @param options.now - Clock reading (default: Date.now())
|
|
218
|
+
*/
|
|
219
|
+
function restoreAutoYesShutdownRecord(options = {}) {
|
|
220
|
+
const recordPath = options.path === undefined ? resolveAutoYesShutdownRecordPath() : options.path;
|
|
221
|
+
if (recordPath === null)
|
|
222
|
+
return { seeded: 0, skipped: 0 };
|
|
223
|
+
let text;
|
|
224
|
+
try {
|
|
225
|
+
text = fs_1.default.readFileSync(recordPath, 'utf8');
|
|
226
|
+
}
|
|
227
|
+
catch (error) {
|
|
228
|
+
if (error.code === 'ENOENT')
|
|
229
|
+
return { seeded: 0, skipped: 0 };
|
|
230
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
231
|
+
logger.warn('restore-unreadable', { error: message });
|
|
232
|
+
return { seeded: 0, skipped: 0, error: message };
|
|
233
|
+
}
|
|
234
|
+
let removeError;
|
|
235
|
+
try {
|
|
236
|
+
fs_1.default.rmSync(recordPath, { force: true });
|
|
237
|
+
}
|
|
238
|
+
catch (error) {
|
|
239
|
+
removeError = error instanceof Error ? error.message : String(error);
|
|
240
|
+
logger.warn('restore-remove-failed', { error: removeError });
|
|
241
|
+
}
|
|
242
|
+
const grants = parseRecord(text);
|
|
243
|
+
if (grants === null) {
|
|
244
|
+
logger.warn('restore-invalid-record');
|
|
245
|
+
return { seeded: 0, skipped: 0, error: 'invalid record' };
|
|
246
|
+
}
|
|
247
|
+
const now = options.now ?? Date.now();
|
|
248
|
+
let seeded = 0;
|
|
249
|
+
for (const grant of grants) {
|
|
250
|
+
if ((0, auto_yes_state_1.seedServerRestartNotice)(grant, now))
|
|
251
|
+
seeded++;
|
|
252
|
+
}
|
|
253
|
+
const skipped = grants.length - seeded;
|
|
254
|
+
if (seeded > 0 || skipped > 0)
|
|
255
|
+
logger.info('restored', { seeded, skipped });
|
|
256
|
+
return removeError === undefined ? { seeded, skipped } : { seeded, skipped, error: removeError };
|
|
257
|
+
}
|
|
@@ -21,6 +21,12 @@ exports.getAutoYesState = getAutoYesState;
|
|
|
21
21
|
exports.setAutoYesEnabled = setAutoYesEnabled;
|
|
22
22
|
exports.disableAutoYes = disableAutoYes;
|
|
23
23
|
exports.clearAllAutoYesStates = clearAllAutoYesStates;
|
|
24
|
+
exports.setAutoYesChangeAfterShutdownListener = setAutoYesChangeAfterShutdownListener;
|
|
25
|
+
exports.beginAutoYesShutdown = beginAutoYesShutdown;
|
|
26
|
+
exports.isAutoYesShutdownStarted = isAutoYesShutdownStarted;
|
|
27
|
+
exports.resetAutoYesShutdownForTesting = resetAutoYesShutdownForTesting;
|
|
28
|
+
exports.collectReleasedAutoYesGrants = collectReleasedAutoYesGrants;
|
|
29
|
+
exports.seedServerRestartNotice = seedServerRestartNotice;
|
|
24
30
|
exports.truncateToUtf8Bytes = truncateToUtf8Bytes;
|
|
25
31
|
exports.checkStopCondition = checkStopCondition;
|
|
26
32
|
exports.deleteAutoYesState = deleteAutoYesState;
|
|
@@ -29,6 +35,7 @@ exports.filterCompositeKeysByWorktree = filterCompositeKeysByWorktree;
|
|
|
29
35
|
exports.getCompositeKeysByWorktree = getCompositeKeysByWorktree;
|
|
30
36
|
exports.deleteAutoYesStateByWorktree = deleteAutoYesStateByWorktree;
|
|
31
37
|
exports.getEnabledAutoYesByWorktree = getEnabledAutoYesByWorktree;
|
|
38
|
+
exports.getRestartReleasedAutoYesByWorktree = getRestartReleasedAutoYesByWorktree;
|
|
32
39
|
exports.migrateAutoYesStateWorktreeIds = migrateAutoYesStateWorktreeIds;
|
|
33
40
|
exports.calculateBackoffInterval = calculateBackoffInterval;
|
|
34
41
|
const auto_yes_config_1 = require("../config/auto-yes-config");
|
|
@@ -156,6 +163,20 @@ function getAutoYesState(worktreeId, cliToolId = 'claude', instanceId) {
|
|
|
156
163
|
const state = autoYesStates.get(key);
|
|
157
164
|
if (!state)
|
|
158
165
|
return null;
|
|
166
|
+
// Issue #3730: a restart notice lives until the deadline of the grant it
|
|
167
|
+
// explains, and then the instance reads as it would have had the notice never
|
|
168
|
+
// been seeded — no state at all. Rewriting it to `expired` (the branch below)
|
|
169
|
+
// would claim a countdown ran out on a grant that was not running.
|
|
170
|
+
if (!state.enabled && state.stopReason === 'server-restart' && isAutoYesExpired(state)) {
|
|
171
|
+
autoYesStates.delete(key);
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
// Issue #3753: only a live grant can run out. A disabled state already has
|
|
175
|
+
// its reason (manual OFF: none; stop pattern; session kill) and rewriting it
|
|
176
|
+
// to `expired` after the old deadline would claim a countdown ended that was
|
|
177
|
+
// not running; a key never armed (`expiresAt` 0) would read `expired` at once.
|
|
178
|
+
if (!state.enabled)
|
|
179
|
+
return state;
|
|
159
180
|
// Auto-disable if expired (Issue #314: delegate to disableAutoYes)
|
|
160
181
|
if (isAutoYesExpired(state)) {
|
|
161
182
|
return disableAutoYes(worktreeId, cliToolId, 'expired', instanceId);
|
|
@@ -188,6 +209,7 @@ function setAutoYesEnabled(worktreeId, cliToolId, enabled, duration, stopPattern
|
|
|
188
209
|
stopPattern,
|
|
189
210
|
};
|
|
190
211
|
autoYesStates.set(key, state);
|
|
212
|
+
notifyChangeAfterShutdown();
|
|
191
213
|
return state;
|
|
192
214
|
}
|
|
193
215
|
else {
|
|
@@ -223,6 +245,7 @@ function disableAutoYes(worktreeId, cliToolId = 'claude', reason, instanceId, st
|
|
|
223
245
|
stopMatchedText,
|
|
224
246
|
};
|
|
225
247
|
autoYesStates.set(key, state);
|
|
248
|
+
notifyChangeAfterShutdown();
|
|
226
249
|
return state;
|
|
227
250
|
}
|
|
228
251
|
/**
|
|
@@ -232,6 +255,122 @@ function disableAutoYes(worktreeId, cliToolId = 'claude', reason, instanceId, st
|
|
|
232
255
|
function clearAllAutoYesStates() {
|
|
233
256
|
autoYesStates.clear();
|
|
234
257
|
}
|
|
258
|
+
const autoYesShutdown = (0, global_state_1.getOrInitGlobal)('__autoYesShutdownStarted', () => ({
|
|
259
|
+
value: false,
|
|
260
|
+
onChangeAfterShutdown: null,
|
|
261
|
+
}));
|
|
262
|
+
/**
|
|
263
|
+
* Who to tell when a state changes after the shutdown began (Issue #3730).
|
|
264
|
+
*
|
|
265
|
+
* The shutdown record is taken first, and the HTTP drain that follows still
|
|
266
|
+
* answers requests: an OFF, a session kill or an instance removal accepted then
|
|
267
|
+
* changes memory only, and the record would bring back the notice the user just
|
|
268
|
+
* cleared. The record module registers here when it writes the record and
|
|
269
|
+
* rewrites it on every later change (an enable is refused by then, so a change
|
|
270
|
+
* can only withdraw). A listener rather than an import: the record module reads
|
|
271
|
+
* this one, not the other way round.
|
|
272
|
+
*
|
|
273
|
+
* @param listener - Called after each change once the shutdown began; null to clear
|
|
274
|
+
*/
|
|
275
|
+
function setAutoYesChangeAfterShutdownListener(listener) {
|
|
276
|
+
autoYesShutdown.onChangeAfterShutdown = listener;
|
|
277
|
+
}
|
|
278
|
+
/** Tell the listener, if the shutdown began and one is registered. Never throws. */
|
|
279
|
+
function notifyChangeAfterShutdown() {
|
|
280
|
+
if (!autoYesShutdown.value)
|
|
281
|
+
return;
|
|
282
|
+
const listener = autoYesShutdown.onChangeAfterShutdown;
|
|
283
|
+
if (!listener)
|
|
284
|
+
return;
|
|
285
|
+
try {
|
|
286
|
+
listener();
|
|
287
|
+
}
|
|
288
|
+
catch {
|
|
289
|
+
// The listener logs its own failures; a write path must not fail on it.
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Mark the start of a graceful shutdown. From here on no grant may be added:
|
|
294
|
+
* the shutdown record has been (or is being) taken, and a grant written after
|
|
295
|
+
* it would be one the next process never hears about. The auto-yes route
|
|
296
|
+
* refuses an enable that returns from its await after this, and
|
|
297
|
+
* `startAutoYesPolling` refuses to start.
|
|
298
|
+
*/
|
|
299
|
+
function beginAutoYesShutdown() {
|
|
300
|
+
autoYesShutdown.value = true;
|
|
301
|
+
}
|
|
302
|
+
/** Whether {@link beginAutoYesShutdown} has run in this process. */
|
|
303
|
+
function isAutoYesShutdownStarted() {
|
|
304
|
+
return autoYesShutdown.value;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Undo {@link beginAutoYesShutdown}.
|
|
308
|
+
* @internal Exported for testing purposes only.
|
|
309
|
+
*/
|
|
310
|
+
function resetAutoYesShutdownForTesting() {
|
|
311
|
+
autoYesShutdown.value = false;
|
|
312
|
+
autoYesShutdown.onChangeAfterShutdown = null;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* The grants a shutdown at `now` releases (Issue #3730): every state that is
|
|
316
|
+
* enabled with time left — read from the state map, not from the pollers, so
|
|
317
|
+
* a grant whose poller never started (no session yet, the poller cap) is
|
|
318
|
+
* included — and every restart notice that is itself still in period, so a
|
|
319
|
+
* second restart inside the window keeps saying why.
|
|
320
|
+
*
|
|
321
|
+
* Read raw rather than through {@link getAutoYesState}: this only looks, and
|
|
322
|
+
* the getter's expiry rewrite is a write.
|
|
323
|
+
*
|
|
324
|
+
* @param now - The shutdown's clock reading
|
|
325
|
+
*/
|
|
326
|
+
function collectReleasedAutoYesGrants(now = Date.now()) {
|
|
327
|
+
const released = [];
|
|
328
|
+
for (const [key, state] of autoYesStates) {
|
|
329
|
+
if (!(now < state.expiresAt))
|
|
330
|
+
continue;
|
|
331
|
+
const live = state.enabled || state.stopReason === 'server-restart';
|
|
332
|
+
if (!live)
|
|
333
|
+
continue;
|
|
334
|
+
const cliToolId = extractCliToolId(key);
|
|
335
|
+
if (!cliToolId)
|
|
336
|
+
continue;
|
|
337
|
+
released.push({
|
|
338
|
+
worktreeId: extractWorktreeId(key),
|
|
339
|
+
cliToolId,
|
|
340
|
+
instanceId: extractInstanceId(key) ?? cliToolId,
|
|
341
|
+
enabledAt: state.enabledAt,
|
|
342
|
+
expiresAt: state.expiresAt,
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
return released;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Seed one restart notice (Issue #3730): a DISABLED state with
|
|
349
|
+
* `stopReason: 'server-restart'` and the released grant's own deadline. Never
|
|
350
|
+
* enables anything and starts no poller.
|
|
351
|
+
*
|
|
352
|
+
* Refused — returns false — when the instance already has a state (whatever
|
|
353
|
+
* wrote it is newer than a record from the previous process) or the deadline
|
|
354
|
+
* has passed (it would be deleted on its first read anyway).
|
|
355
|
+
*
|
|
356
|
+
* @param grant - The released grant
|
|
357
|
+
* @param now - Clock reading to judge the deadline against
|
|
358
|
+
* @returns Whether a notice was written
|
|
359
|
+
*/
|
|
360
|
+
function seedServerRestartNotice(grant, now = Date.now()) {
|
|
361
|
+
const key = buildCompositeKey(grant.worktreeId, grant.cliToolId, grant.instanceId);
|
|
362
|
+
if (autoYesStates.has(key))
|
|
363
|
+
return false;
|
|
364
|
+
if (!(now < grant.expiresAt))
|
|
365
|
+
return false;
|
|
366
|
+
autoYesStates.set(key, {
|
|
367
|
+
enabled: false,
|
|
368
|
+
enabledAt: grant.enabledAt,
|
|
369
|
+
expiresAt: grant.expiresAt,
|
|
370
|
+
stopReason: 'server-restart',
|
|
371
|
+
});
|
|
372
|
+
return true;
|
|
373
|
+
}
|
|
235
374
|
// =============================================================================
|
|
236
375
|
// Stop Condition (Issue #314)
|
|
237
376
|
// =============================================================================
|
|
@@ -417,6 +556,7 @@ function deleteAutoYesState(compositeKey) {
|
|
|
417
556
|
return false;
|
|
418
557
|
}
|
|
419
558
|
autoYesStates.delete(compositeKey);
|
|
559
|
+
notifyChangeAfterShutdown();
|
|
420
560
|
return true;
|
|
421
561
|
}
|
|
422
562
|
/**
|
|
@@ -463,6 +603,8 @@ function getCompositeKeysByWorktree(worktreeId) {
|
|
|
463
603
|
function deleteAutoYesStateByWorktree(worktreeId) {
|
|
464
604
|
const keys = getCompositeKeysByWorktree(worktreeId);
|
|
465
605
|
keys.forEach(key => autoYesStates.delete(key));
|
|
606
|
+
if (keys.length > 0)
|
|
607
|
+
notifyChangeAfterShutdown();
|
|
466
608
|
return keys.length;
|
|
467
609
|
}
|
|
468
610
|
/**
|
|
@@ -480,9 +622,15 @@ function deleteAutoYesStateByWorktree(worktreeId) {
|
|
|
480
622
|
* and "expired" identically, and the map keeps disabled entries around for
|
|
481
623
|
* inspection long after anyone needs them on the wire.
|
|
482
624
|
*
|
|
625
|
+
* Issue #3723: `isBlocked`, when given, marks an armed instance whose contract
|
|
626
|
+
* withholds every answer (`blockedByContract: true`). A callback rather than a
|
|
627
|
+
* lookup here, because the contract lives in SQLite and this module stays free
|
|
628
|
+
* of a database dependency; the list route passes the poller's own policy read.
|
|
629
|
+
*
|
|
630
|
+
* @param isBlocked - Whether the contract blocks Auto-Yes for one instance
|
|
483
631
|
* @returns worktreeId -> instanceId -> summary; worktrees with nothing armed are absent
|
|
484
632
|
*/
|
|
485
|
-
function getEnabledAutoYesByWorktree() {
|
|
633
|
+
function getEnabledAutoYesByWorktree(isBlocked) {
|
|
486
634
|
const byWorktree = new Map();
|
|
487
635
|
// A snapshot of the keys: an expired read below rewrites its own entry.
|
|
488
636
|
for (const key of Array.from(autoYesStates.keys())) {
|
|
@@ -495,7 +643,40 @@ function getEnabledAutoYesByWorktree() {
|
|
|
495
643
|
if (!state?.enabled)
|
|
496
644
|
continue;
|
|
497
645
|
const entries = byWorktree.get(worktreeId) ?? {};
|
|
498
|
-
|
|
646
|
+
const summary = { enabled: true, expiresAt: state.expiresAt };
|
|
647
|
+
if (isBlocked?.(worktreeId, cliToolId, instanceId))
|
|
648
|
+
summary.blockedByContract = true;
|
|
649
|
+
entries[instanceId] = summary;
|
|
650
|
+
byWorktree.set(worktreeId, entries);
|
|
651
|
+
}
|
|
652
|
+
return byWorktree;
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* Every restart notice still in period, grouped by worktree and keyed by
|
|
656
|
+
* instance, for the worktree list (Issue #3730).
|
|
657
|
+
*
|
|
658
|
+
* Its own map rather than entries in {@link getEnabledAutoYesByWorktree}'s:
|
|
659
|
+
* that map is "armed instances", and its readers (the Sessions tile, `ls`'s
|
|
660
|
+
* idle fallback, the new-task targets) count every entry as armed. Reads go
|
|
661
|
+
* through {@link getAutoYesState}, so a notice past its deadline is dropped
|
|
662
|
+
* here, as everywhere.
|
|
663
|
+
*
|
|
664
|
+
* @returns worktreeId -> instanceId -> 'server-restart'; worktrees with none are absent
|
|
665
|
+
*/
|
|
666
|
+
function getRestartReleasedAutoYesByWorktree() {
|
|
667
|
+
const byWorktree = new Map();
|
|
668
|
+
// A snapshot of the keys: an expired read below deletes its own entry.
|
|
669
|
+
for (const key of Array.from(autoYesStates.keys())) {
|
|
670
|
+
const cliToolId = extractCliToolId(key);
|
|
671
|
+
if (!cliToolId)
|
|
672
|
+
continue;
|
|
673
|
+
const worktreeId = extractWorktreeId(key);
|
|
674
|
+
const instanceId = extractInstanceId(key) ?? cliToolId;
|
|
675
|
+
const state = getAutoYesState(worktreeId, cliToolId, instanceId);
|
|
676
|
+
if (!state || state.enabled || state.stopReason !== 'server-restart')
|
|
677
|
+
continue;
|
|
678
|
+
const entries = byWorktree.get(worktreeId) ?? {};
|
|
679
|
+
entries[instanceId] = 'server-restart';
|
|
499
680
|
byWorktree.set(worktreeId, entries);
|
|
500
681
|
}
|
|
501
682
|
return byWorktree;
|
|
@@ -559,9 +740,21 @@ function migrateAutoYesStateWorktreeIds(renames) {
|
|
|
559
740
|
// Two passes so a swap (A→B, B→A) cannot have one half clobber the other.
|
|
560
741
|
for (const move of moves)
|
|
561
742
|
autoYesStates.delete(move.oldKey);
|
|
562
|
-
|
|
743
|
+
// Issue #3730: a restart notice is only an explanation, seeded before the
|
|
744
|
+
// first request; whatever sits under the new key once the sources are gone
|
|
745
|
+
// was written after it (an enable or a disable made while the start-up ID
|
|
746
|
+
// move was still awaiting) and is newer. The notice yields and is dropped.
|
|
747
|
+
// A grant still moves as before — the move exists to keep grants alive.
|
|
748
|
+
const applied = moves.filter((move) => !((0, auto_yes_config_1.isReleasedByRestart)(move.state) && autoYesStates.has(move.newKey)));
|
|
749
|
+
for (const move of applied)
|
|
563
750
|
autoYesStates.set(move.newKey, move.state);
|
|
564
|
-
|
|
751
|
+
// Issue #3753: the move changes memory without going through a setter, so
|
|
752
|
+
// after the shutdown record was taken it must be told: the record still
|
|
753
|
+
// names the old ID, and the next start would bring back a notice (for a state
|
|
754
|
+
// withdrawn under the new ID) the user had already cleared.
|
|
755
|
+
if (moves.length > 0)
|
|
756
|
+
notifyChangeAfterShutdown();
|
|
757
|
+
return applied.map(({ state: _state, ...rest }) => rest);
|
|
565
758
|
}
|
|
566
759
|
/**
|
|
567
760
|
* Calculate backoff interval based on consecutive errors.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* agy's startup folder-trust confirmation that the launch window did not see
|
|
4
|
+
* (Issue #3757).
|
|
5
|
+
*
|
|
6
|
+
* `AntigravityTool.waitForReady` confirms the trust screen with one Enter, but
|
|
7
|
+
* only inside its ~34 s window, and agy's start-up time varies from about one
|
|
8
|
+
* second to more than a minute (measured: the screen appeared 61 s after the
|
|
9
|
+
* launch). A window that ends before agy has drawn anything leaves the screen
|
|
10
|
+
* unanswered, and the launch still reports success.
|
|
11
|
+
*
|
|
12
|
+
* This records that one Enter is still owed to the session, so the next send's
|
|
13
|
+
* readiness wait can deliver it — exactly once. The claim is synchronous and
|
|
14
|
+
* removes the record, so two waits racing over one pane cannot both send it,
|
|
15
|
+
* and a window that already sent its Enter never records one.
|
|
16
|
+
*
|
|
17
|
+
* It also knows whether the launch window is still open (review of #3757): a
|
|
18
|
+
* trust screen inside it is the window's to confirm within a second or two, so
|
|
19
|
+
* the Auto-Yes poller records no `startup-trust-unhandled` for it.
|
|
20
|
+
*
|
|
21
|
+
* And it keeps the owed Enter and the strict `respond` (Issue #3756) from both
|
|
22
|
+
* answering one trust screen: while a strict answer holds the session
|
|
23
|
+
* ({@link holdStartupTrust}), the Enter cannot be claimed, and a strict answer
|
|
24
|
+
* refuses a session whose Enter was claimed moments ago
|
|
25
|
+
* ({@link wasStartupTrustClaimedWithin}) — the two are serialised per session
|
|
26
|
+
* name here, where both sides look.
|
|
27
|
+
*
|
|
28
|
+
* Keyed by tmux session name. Reached through `globalThis` because the writer
|
|
29
|
+
* (the launch) and the reader (a send, from another route handler) may be
|
|
30
|
+
* bundled separately under `next dev` (Issue #1736).
|
|
31
|
+
*
|
|
32
|
+
* @module lib/cli-tools/antigravity-startup-trust
|
|
33
|
+
*/
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.beginStartupWindow = beginStartupWindow;
|
|
36
|
+
exports.endStartupWindow = endStartupWindow;
|
|
37
|
+
exports.isStartupWindowOpen = isStartupWindowOpen;
|
|
38
|
+
exports.markStartupTrustPending = markStartupTrustPending;
|
|
39
|
+
exports.isStartupTrustPending = isStartupTrustPending;
|
|
40
|
+
exports.claimStartupTrust = claimStartupTrust;
|
|
41
|
+
exports.isStartupTrustHeld = isStartupTrustHeld;
|
|
42
|
+
exports.wasStartupTrustClaimedWithin = wasStartupTrustClaimedWithin;
|
|
43
|
+
exports.holdStartupTrust = holdStartupTrust;
|
|
44
|
+
exports.forgetStartupTrust = forgetStartupTrust;
|
|
45
|
+
exports.clearStartupTrust = clearStartupTrust;
|
|
46
|
+
const global_state_1 = require("../global-state");
|
|
47
|
+
/** sessionName -> epoch ms the launch window ended without confirming trust. */
|
|
48
|
+
const pendingStartupTrust = (0, global_state_1.getOrInitGlobal)('__antigravityStartupTrustPending', () => new Map());
|
|
49
|
+
/**
|
|
50
|
+
* sessionName -> how many launch windows (launch line typed → `waitForReady`
|
|
51
|
+
* returned) are open. Counted (Issue #3770): a relaunch racing another must not
|
|
52
|
+
* have the earlier one's end close the later one's window.
|
|
53
|
+
*/
|
|
54
|
+
const openStartupWindows = (0, global_state_1.getOrInitGlobal)('__antigravityStartupWindows', () => new Map());
|
|
55
|
+
/** Sessions a strict `respond` is answering right now (Issue #3756). */
|
|
56
|
+
const strictAnswerHolds = (0, global_state_1.getOrInitGlobal)('__antigravityStartupTrustHolds', () => new Set());
|
|
57
|
+
/** sessionName -> epoch ms the owed Enter was last claimed. */
|
|
58
|
+
const lastClaims = (0, global_state_1.getOrInitGlobal)('__antigravityStartupTrustClaims', () => new Map());
|
|
59
|
+
/** The launch window opened: the launch confirms any trust screen in it. */
|
|
60
|
+
function beginStartupWindow(sessionName) {
|
|
61
|
+
openStartupWindows.set(sessionName, (openStartupWindows.get(sessionName) ?? 0) + 1);
|
|
62
|
+
}
|
|
63
|
+
/** The launch window closed, however it ended. */
|
|
64
|
+
function endStartupWindow(sessionName) {
|
|
65
|
+
const open = openStartupWindows.get(sessionName) ?? 0;
|
|
66
|
+
if (open <= 1)
|
|
67
|
+
openStartupWindows.delete(sessionName);
|
|
68
|
+
else
|
|
69
|
+
openStartupWindows.set(sessionName, open - 1);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @returns True while the launch window is open. A session this process never
|
|
73
|
+
* launched (a server restart, another launcher) has none open.
|
|
74
|
+
*/
|
|
75
|
+
function isStartupWindowOpen(sessionName) {
|
|
76
|
+
return openStartupWindows.has(sessionName);
|
|
77
|
+
}
|
|
78
|
+
/** Record that the launch window ended with the trust screen not yet confirmed. */
|
|
79
|
+
function markStartupTrustPending(sessionName, at = Date.now()) {
|
|
80
|
+
pendingStartupTrust.set(sessionName, at);
|
|
81
|
+
}
|
|
82
|
+
/** @returns True while the launch's trust Enter is still owed to this session. */
|
|
83
|
+
function isStartupTrustPending(sessionName) {
|
|
84
|
+
return pendingStartupTrust.has(sessionName);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Take the owed Enter. True at most once per record: the caller that gets true
|
|
88
|
+
* is the one that sends it. False while a strict `respond` holds the session
|
|
89
|
+
* (Issue #3756): the record is kept, and is the strict answer's to discard.
|
|
90
|
+
*/
|
|
91
|
+
function claimStartupTrust(sessionName, at = Date.now()) {
|
|
92
|
+
if (strictAnswerHolds.has(sessionName))
|
|
93
|
+
return false;
|
|
94
|
+
const claimed = pendingStartupTrust.delete(sessionName);
|
|
95
|
+
if (claimed)
|
|
96
|
+
lastClaims.set(sessionName, at);
|
|
97
|
+
return claimed;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Whether a strict `respond` holds the session right now. The launch window's
|
|
101
|
+
* own Enter checks it too (Issue #3771): a held session is the strict answer's
|
|
102
|
+
* to key, so the window waits a poll and looks again.
|
|
103
|
+
*/
|
|
104
|
+
function isStartupTrustHeld(sessionName) {
|
|
105
|
+
return strictAnswerHolds.has(sessionName);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Whether the owed Enter was claimed within the last `ms` — its Enter may be
|
|
109
|
+
* on its way, or agy may not have redrawn after it yet (Issue #3756).
|
|
110
|
+
*/
|
|
111
|
+
function wasStartupTrustClaimedWithin(sessionName, ms, now = Date.now()) {
|
|
112
|
+
const at = lastClaims.get(sessionName);
|
|
113
|
+
return at !== undefined && now - at < ms;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Hold the session for a strict `respond` (Issue #3756): until the returned
|
|
117
|
+
* release is called, {@link claimStartupTrust} answers false for it.
|
|
118
|
+
*/
|
|
119
|
+
function holdStartupTrust(sessionName) {
|
|
120
|
+
strictAnswerHolds.add(sessionName);
|
|
121
|
+
return () => {
|
|
122
|
+
strictAnswerHolds.delete(sessionName);
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
/** Drop the record: the session was relaunched, killed, or reached its prompt. */
|
|
126
|
+
function forgetStartupTrust(sessionName) {
|
|
127
|
+
pendingStartupTrust.delete(sessionName);
|
|
128
|
+
}
|
|
129
|
+
/** Drop every record. Test seam. */
|
|
130
|
+
function clearStartupTrust() {
|
|
131
|
+
pendingStartupTrust.clear();
|
|
132
|
+
openStartupWindows.clear();
|
|
133
|
+
strictAnswerHolds.clear();
|
|
134
|
+
lastClaims.clear();
|
|
135
|
+
}
|