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
|
@@ -54,6 +54,7 @@ exports.validatePollingContext = validatePollingContext;
|
|
|
54
54
|
exports.capturePollerFrame = capturePollerFrame;
|
|
55
55
|
exports.captureAndCleanOutput = captureAndCleanOutput;
|
|
56
56
|
exports.processStopConditionDelta = processStopConditionDelta;
|
|
57
|
+
exports.noHookReceiptHint = noHookReceiptHint;
|
|
57
58
|
exports.detectAndRespondToPrompt = detectAndRespondToPrompt;
|
|
58
59
|
exports.startAutoYesPolling = startAutoYesPolling;
|
|
59
60
|
exports.stopAutoYesPolling = stopAutoYesPolling;
|
|
@@ -63,6 +64,7 @@ exports.stopAutoYesPollingByWorktree = stopAutoYesPollingByWorktree;
|
|
|
63
64
|
exports.isAnyPollerActiveForWorktree = isAnyPollerActiveForWorktree;
|
|
64
65
|
const cli_session_1 = require("./session/cli-session");
|
|
65
66
|
const response_checker_1 = require("./polling/response-checker");
|
|
67
|
+
const antigravity_receipt_episodes_1 = require("./polling/antigravity-receipt-episodes");
|
|
66
68
|
const antigravity_permission_receipts_1 = require("./polling/antigravity-permission-receipts");
|
|
67
69
|
const auto_yes_resolver_1 = require("./polling/auto-yes-resolver");
|
|
68
70
|
const auto_yes_policy_1 = require("./polling/auto-yes-policy");
|
|
@@ -77,17 +79,21 @@ const worktree_session_ownership_1 = require("./cli-tools/worktree-session-owner
|
|
|
77
79
|
const prompt_answer_sender_1 = require("./prompt-answer-sender");
|
|
78
80
|
const prompt_answer_semantic_1 = require("./prompt-answer-semantic");
|
|
79
81
|
const tmux_1 = require("./tmux/tmux");
|
|
82
|
+
const session_created_signal_1 = require("./tmux/session-created-signal");
|
|
80
83
|
const manager_1 = require("./cli-tools/manager");
|
|
81
84
|
const cli_patterns_1 = require("./detection/cli-patterns");
|
|
82
85
|
const prompt_key_1 = require("./detection/prompt-key");
|
|
83
86
|
const errors_1 = require("./errors");
|
|
84
87
|
const tmux_capture_cache_1 = require("./tmux/tmux-capture-cache");
|
|
85
88
|
const auto_yes_config_1 = require("../config/auto-yes-config");
|
|
89
|
+
const auto_yes_poller_stop_reason_1 = require("./polling/auto-yes-poller-stop-reason");
|
|
86
90
|
const logger_1 = require("../lib/logger");
|
|
87
91
|
const logger = (0, logger_1.createLogger)('auto-yes-poller');
|
|
88
92
|
const path_validator_1 = require("./security/path-validator");
|
|
89
93
|
const auto_yes_state_1 = require("./auto-yes-state");
|
|
90
94
|
const global_state_1 = require("./global-state");
|
|
95
|
+
const auto_yes_suppression_reason_1 = require("./polling/auto-yes-suppression-reason");
|
|
96
|
+
const auto_yes_suppression_state_1 = require("./polling/auto-yes-suppression-state");
|
|
91
97
|
const auto_yes_poller_state_1 = require("./polling/auto-yes-poller-state");
|
|
92
98
|
const auto_yes_prompt_suppression_1 = require("./polling/auto-yes-prompt-suppression");
|
|
93
99
|
/** In-memory storage for poller states (globalThis for hot reload persistence) */
|
|
@@ -99,7 +105,10 @@ const autoYesPollerStates = (0, global_state_1.getOrInitGlobal)('__autoYesPoller
|
|
|
99
105
|
* instance. globalThis for the same reason as the poller states above.
|
|
100
106
|
*/
|
|
101
107
|
const withheldNoReceiptLoggedAt = (0, global_state_1.getOrInitGlobal)('__autoYesWithheldNoReceiptLoggedAt', () => new Map());
|
|
102
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* Least gap between two `antigravity-autoyes-withheld-no-hook-receipt` lines for
|
|
110
|
+
* one instance. `antigravity-autoyes-withheld-by-policy` (Issue #3724) shares it.
|
|
111
|
+
*/
|
|
103
112
|
const WITHHELD_NO_RECEIPT_LOG_INTERVAL_MS = 60_000;
|
|
104
113
|
// =============================================================================
|
|
105
114
|
// Poller State Accessors (compositeKey-based)
|
|
@@ -125,7 +134,8 @@ function getActivePollerCount() {
|
|
|
125
134
|
* @internal Exported for testing purposes only.
|
|
126
135
|
*/
|
|
127
136
|
function clearAllPollerStates() {
|
|
128
|
-
|
|
137
|
+
// Issue #3730: a test seam, not a shutdown — logged as such.
|
|
138
|
+
(0, auto_yes_poller_stop_reason_1.withPollerStopReason)('reset', () => stopAllAutoYesPolling());
|
|
129
139
|
autoYesPollerStates.clear();
|
|
130
140
|
withheldNoReceiptLoggedAt.clear();
|
|
131
141
|
}
|
|
@@ -158,8 +168,8 @@ function isPollerActive(compositeKey) {
|
|
|
158
168
|
* @param compositeKey - Composite key
|
|
159
169
|
* @param timestamp - Timestamp value (Date.now())
|
|
160
170
|
*/
|
|
161
|
-
function updateLastServerResponseTimestamp(compositeKey, timestamp) {
|
|
162
|
-
const pollerState =
|
|
171
|
+
function updateLastServerResponseTimestamp(compositeKey, timestamp, owner) {
|
|
172
|
+
const pollerState = ownedPollerState(compositeKey, owner);
|
|
163
173
|
if (pollerState) {
|
|
164
174
|
pollerState.lastServerResponseTimestamp = timestamp;
|
|
165
175
|
}
|
|
@@ -170,9 +180,10 @@ function updateLastServerResponseTimestamp(compositeKey, timestamp) {
|
|
|
170
180
|
* and after an answer is sent.
|
|
171
181
|
*
|
|
172
182
|
* @param compositeKey - Composite key
|
|
183
|
+
* @param owner - The tick's own poller state (Issue #3706); see {@link ownedPollerState}
|
|
173
184
|
*/
|
|
174
|
-
function resetErrorCount(compositeKey) {
|
|
175
|
-
const pollerState =
|
|
185
|
+
function resetErrorCount(compositeKey, owner) {
|
|
186
|
+
const pollerState = ownedPollerState(compositeKey, owner);
|
|
176
187
|
if (pollerState) {
|
|
177
188
|
pollerState.consecutiveErrors = 0;
|
|
178
189
|
pollerState.currentInterval = auto_yes_state_1.POLLING_INTERVAL_MS;
|
|
@@ -183,9 +194,10 @@ function resetErrorCount(compositeKey) {
|
|
|
183
194
|
* [IA-MF-001] compositeKey-based: extracts worktreeId/cliToolId for disableAutoYes.
|
|
184
195
|
*
|
|
185
196
|
* @param compositeKey - Composite key
|
|
197
|
+
* @param owner - The tick's own poller state (Issue #3706); see {@link ownedPollerState}
|
|
186
198
|
*/
|
|
187
|
-
function incrementErrorCount(compositeKey) {
|
|
188
|
-
const pollerState =
|
|
199
|
+
function incrementErrorCount(compositeKey, owner) {
|
|
200
|
+
const pollerState = ownedPollerState(compositeKey, owner);
|
|
189
201
|
if (pollerState) {
|
|
190
202
|
pollerState.consecutiveErrors++;
|
|
191
203
|
pollerState.currentInterval = (0, auto_yes_state_1.calculateBackoffInterval)(pollerState.consecutiveErrors);
|
|
@@ -205,10 +217,66 @@ function incrementErrorCount(compositeKey) {
|
|
|
205
217
|
// Issue #896: target the specific instance state (3-part keys carry instanceId).
|
|
206
218
|
(0, auto_yes_state_1.disableAutoYes)(worktreeId, cliToolId, 'consecutive_errors', (0, auto_yes_state_1.extractInstanceId)(compositeKey) ?? undefined);
|
|
207
219
|
}
|
|
208
|
-
stopAutoYesPolling(compositeKey);
|
|
220
|
+
stopAutoYesPolling(compositeKey, 'consecutive-errors');
|
|
209
221
|
}
|
|
210
222
|
}
|
|
211
223
|
}
|
|
224
|
+
/**
|
|
225
|
+
* The poller state under `compositeKey`, but only when it is `owner` — the
|
|
226
|
+
* tick's own (Issue #3706). Without `owner` (callers outside a tick, and tests
|
|
227
|
+
* driving `detectAndRespondToPrompt` with a hand-built state) it is the plain
|
|
228
|
+
* by-key read this always was.
|
|
229
|
+
*/
|
|
230
|
+
function ownedPollerState(compositeKey, owner) {
|
|
231
|
+
const pollerState = getPollerState(compositeKey);
|
|
232
|
+
if (owner !== undefined && pollerState !== owner)
|
|
233
|
+
return undefined;
|
|
234
|
+
return pollerState;
|
|
235
|
+
}
|
|
236
|
+
/** Is the tick's poller still the one under its key (not stopped, not replaced)? */
|
|
237
|
+
function isPollerCurrent(generation) {
|
|
238
|
+
return getPollerState(generation.compositeKey) === generation.pollerState;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* May the tick still act: its poller, its grant (the same enable, not expired)
|
|
242
|
+
* and its session (no relaunch since) are all still the ones it started under.
|
|
243
|
+
* Checked after capture, after each wait before a key, and inside the send.
|
|
244
|
+
*/
|
|
245
|
+
function isTickCurrent(generation) {
|
|
246
|
+
if (!isPollerCurrent(generation))
|
|
247
|
+
return false;
|
|
248
|
+
// `getAutoYesState` returns the stored object until it expires, when it
|
|
249
|
+
// stores (and returns) a disabled one — so an expiry fails identity too.
|
|
250
|
+
const grant = (0, auto_yes_state_1.getAutoYesState)(generation.worktreeId, generation.cliToolId, generation.instanceId);
|
|
251
|
+
if (grant !== generation.grant || !grant.enabled)
|
|
252
|
+
return false;
|
|
253
|
+
return isSameSession(generation);
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Is the session the tick answered still the one it started on (Issue #3706)?
|
|
257
|
+
* What the follow-ups of an answer already sent — the response poller restart,
|
|
258
|
+
* the terminal push — are judged by: a disable after the keys landed does not
|
|
259
|
+
* un-send them, a relaunch does make them about another process.
|
|
260
|
+
*/
|
|
261
|
+
function isSameSession(generation) {
|
|
262
|
+
return (0, auto_yes_enter_fallback_1.getEnterFallbackSessionEpoch)(generation.compositeKey) === generation.sessionEpoch;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* End a tick that found its generation gone (Issue #3706). It changes nothing;
|
|
266
|
+
* it re-arms its timer only when its own poller is still the current one — a
|
|
267
|
+
* renewed grant or a relaunched session under the same poller — so the chain
|
|
268
|
+
* goes on and the next tick starts from the new state.
|
|
269
|
+
*/
|
|
270
|
+
function endStaleTick(generation) {
|
|
271
|
+
logger.debug('poller:auto-yes-tick-superseded', {
|
|
272
|
+
worktreeId: generation.worktreeId,
|
|
273
|
+
cliToolId: generation.cliToolId,
|
|
274
|
+
instanceId: generation.instanceId,
|
|
275
|
+
pollerCurrent: isPollerCurrent(generation),
|
|
276
|
+
});
|
|
277
|
+
if (isPollerCurrent(generation))
|
|
278
|
+
scheduleNextPoll(generation);
|
|
279
|
+
}
|
|
212
280
|
/**
|
|
213
281
|
* Check if the given prompt has already been answered recently.
|
|
214
282
|
*
|
|
@@ -243,14 +311,18 @@ function validatePollingContext(compositeKey, pollerState) {
|
|
|
243
311
|
const worktreeId = (0, auto_yes_state_1.extractWorktreeId)(compositeKey);
|
|
244
312
|
const cliToolId = (0, auto_yes_state_1.extractCliToolId)(compositeKey);
|
|
245
313
|
if (!cliToolId) {
|
|
246
|
-
stopAutoYesPolling(compositeKey);
|
|
314
|
+
stopAutoYesPolling(compositeKey, 'invalid-key');
|
|
247
315
|
return 'expired';
|
|
248
316
|
}
|
|
249
317
|
// Issue #896: resolve instanceId so per-instance enabled state is checked.
|
|
250
318
|
const instanceId = (0, auto_yes_state_1.extractInstanceId)(compositeKey) ?? undefined;
|
|
251
319
|
const autoYesState = (0, auto_yes_state_1.getAutoYesState)(worktreeId, cliToolId, instanceId);
|
|
252
320
|
if (!autoYesState?.enabled) {
|
|
253
|
-
|
|
321
|
+
// Issue #3730: the return value says 'expired' for every one of these (its
|
|
322
|
+
// callers only need "stop"), but the log says which it was — the getter
|
|
323
|
+
// has just turned a past deadline into `stopReason: 'expired'`, and
|
|
324
|
+
// anything else is a grant some other path disabled or removed.
|
|
325
|
+
stopAutoYesPolling(compositeKey, autoYesState?.stopReason === 'expired' ? 'expired' : 'not-enabled');
|
|
254
326
|
return 'expired';
|
|
255
327
|
}
|
|
256
328
|
return 'valid';
|
|
@@ -307,7 +379,7 @@ function processStopConditionDelta(compositeKey, pollerState, cleanOutput) {
|
|
|
307
379
|
if (cleanOutput.length > baseline) {
|
|
308
380
|
const newContent = cleanOutput.substring(baseline);
|
|
309
381
|
pollerState.stopCheckBaselineLength = cleanOutput.length;
|
|
310
|
-
return (0, auto_yes_state_1.checkStopCondition)(compositeKey, newContent, stopAutoYesPolling);
|
|
382
|
+
return (0, auto_yes_state_1.checkStopCondition)(compositeKey, newContent, (key) => stopAutoYesPolling(key, 'stop-pattern'));
|
|
311
383
|
}
|
|
312
384
|
else if (cleanOutput.length < baseline) {
|
|
313
385
|
pollerState.stopCheckBaselineLength = cleanOutput.length;
|
|
@@ -330,6 +402,13 @@ function processStopConditionDelta(compositeKey, pollerState, cleanOutput) {
|
|
|
330
402
|
* Why it is worth a line: a machine whose `~/.gemini/config/hooks.json` points at
|
|
331
403
|
* another server (#2622) never sends us the question, and every real dialog then
|
|
332
404
|
* waits for a human with no sign of why. The line names the file to look at.
|
|
405
|
+
*
|
|
406
|
+
* A stale receipt does not always mean that, though (Issue #3724): a dialog the
|
|
407
|
+
* contract's autoYes withheld got its receipt, the server answered `ask`, and
|
|
408
|
+
* the dialog outlived the window. When `resolveAutoAnswerWithPolicy` on the
|
|
409
|
+
* ungated reading suppresses the answer by contract (the base rules would have
|
|
410
|
+
* answered it), the line is `antigravity-autoyes-withheld-by-policy` instead,
|
|
411
|
+
* naming the reason, the mode and the task. Both share the limit.
|
|
333
412
|
* The response-checker's own `antigravity-dialog-no-recent-receipt` stays at
|
|
334
413
|
* debug — it prints on every tick the same pane is read again.
|
|
335
414
|
*
|
|
@@ -337,27 +416,193 @@ function processStopConditionDelta(compositeKey, pollerState, cleanOutput) {
|
|
|
337
416
|
* @param readWithoutGate - The same frame read without `receiptScope`
|
|
338
417
|
*/
|
|
339
418
|
function logIfWithheldForWantOfReceipt(worktreeId, instanceId, compositeKey, readWithoutGate) {
|
|
340
|
-
|
|
419
|
+
// Issue #3767: the gate's own verdict for this tick's candidate. Null means it
|
|
420
|
+
// never saw one (no dialog), `ok` that it let the frame through.
|
|
421
|
+
let verdict = (0, antigravity_receipt_episodes_1.getAntigravityReceiptVerdict)(worktreeId, instanceId);
|
|
422
|
+
if (verdict?.ok)
|
|
341
423
|
return;
|
|
342
424
|
const now = Date.now();
|
|
343
|
-
const lastLoggedAt = withheldNoReceiptLoggedAt.get(compositeKey);
|
|
344
|
-
if (lastLoggedAt !== undefined && now - lastLoggedAt < WITHHELD_NO_RECEIPT_LOG_INTERVAL_MS)
|
|
345
|
-
return;
|
|
346
425
|
const ungated = readWithoutGate();
|
|
347
426
|
if (!ungated.isPrompt || !ungated.promptData)
|
|
348
427
|
return;
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
428
|
+
// The gate was not consulted (the gated reading declined the frame on screen
|
|
429
|
+
// grounds alone) yet the frame reads as a prompt: judge it here.
|
|
430
|
+
verdict ??= (0, antigravity_receipt_episodes_1.judgeAntigravityPermissionReceipt)(worktreeId, instanceId, now);
|
|
431
|
+
if (verdict.ok)
|
|
432
|
+
return;
|
|
433
|
+
// Issue #3724: a contract that withholds the answer makes the server reply
|
|
434
|
+
// `ask`, so the dialog stays up past the receipt window. The cause is then the
|
|
435
|
+
// contract, not a hooks.json that points elsewhere. Judged exactly as the tick
|
|
436
|
+
// judges a prompt it can read — the base rules first, then the contract — so
|
|
437
|
+
// a prompt the base rules never answer (a checkbox, a typed option) is not
|
|
438
|
+
// blamed on the contract. Policy and task id come from one lookup.
|
|
439
|
+
const { policy, taskId } = (0, auto_yes_policy_1.getSessionAutoYesPolicyEntry)(worktreeId, 'antigravity', instanceId);
|
|
440
|
+
const resolution = (0, auto_yes_resolver_1.resolveAutoAnswerWithPolicy)(ungated.promptData, policy);
|
|
441
|
+
// Issue #3767: `answered` is the dialog the gate already let through on this
|
|
442
|
+
// receipt, still up past the window. Unless the contract withheld it, that is
|
|
443
|
+
// not a missing receipt: neither recorded nor logged, nor counted for the limit.
|
|
444
|
+
// Issue #3789: `answered` is also a dialog accepted but never sent to (the
|
|
445
|
+
// tick recorded its own reason, if any, and that record is kept). One the
|
|
446
|
+
// poller DID send keys to and still up past the grace is `outlived`, which is
|
|
447
|
+
// recorded and logged like the others, so the stop is not a silent one.
|
|
448
|
+
// Issue #3796: the reason the poller recorded for this dialog (partial-answer,
|
|
449
|
+
// the contract, …) while it could still read it inside the window was not
|
|
450
|
+
// re-stamped once the window closed — the gated reading stopped seeing the
|
|
451
|
+
// prompt — so `cmate wait` dropped it as stale a minute later with the dialog
|
|
452
|
+
// still up. Re-stamped here on every tick the dialog stays — only while it
|
|
453
|
+
// still holds under this tick's evaluation — and kept over a `no-hook-receipt`
|
|
454
|
+
// for it: it is the more exact reason.
|
|
455
|
+
const keptPartialAnswer = refreshEpisodeSuppression(worktreeId, instanceId, verdict, resolution);
|
|
456
|
+
// Issue #3796 review D: a contract that withholds the prompt now is published
|
|
457
|
+
// whatever was recorded before — none at all (the window closed before the
|
|
458
|
+
// tick could read it, or an ended contract's record was dropped and a new one
|
|
459
|
+
// withholds it again) or another reason. Without it `cmate wait` read no
|
|
460
|
+
// reason and held the prompt as one Auto-Yes was answering. Only a partial
|
|
461
|
+
// answer still on screen comes first, as it does on the tick (step 2.5).
|
|
462
|
+
if (resolution.suppressedBy && !keptPartialAnswer) {
|
|
463
|
+
(0, auto_yes_suppression_state_1.recordPolicySuppression)(worktreeId, 'antigravity', instanceId, {
|
|
464
|
+
reason: resolution.suppressedBy,
|
|
465
|
+
mode: policy?.mode ?? null,
|
|
466
|
+
promptType: ungated.promptData.type,
|
|
467
|
+
...(resolution.pattern !== undefined ? { pattern: resolution.pattern } : {}),
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
if (!resolution.suppressedBy && (verdict.cause === 'answered' || keptPartialAnswer))
|
|
471
|
+
return;
|
|
472
|
+
const lastLoggedAt = withheldNoReceiptLoggedAt.get(compositeKey);
|
|
473
|
+
const logDue = lastLoggedAt === undefined || now - lastLoggedAt >= WITHHELD_NO_RECEIPT_LOG_INTERVAL_MS;
|
|
474
|
+
if (logDue) {
|
|
475
|
+
for (const [key, loggedAt] of withheldNoReceiptLoggedAt) {
|
|
476
|
+
if (now - loggedAt >= WITHHELD_NO_RECEIPT_LOG_INTERVAL_MS)
|
|
477
|
+
withheldNoReceiptLoggedAt.delete(key);
|
|
478
|
+
}
|
|
479
|
+
withheldNoReceiptLoggedAt.set(compositeKey, now);
|
|
352
480
|
}
|
|
353
|
-
|
|
481
|
+
if (resolution.suppressedBy) {
|
|
482
|
+
if (!logDue)
|
|
483
|
+
return;
|
|
484
|
+
logger.info('antigravity-autoyes-withheld-by-policy', {
|
|
485
|
+
worktreeId,
|
|
486
|
+
instanceId: instanceId ?? 'antigravity',
|
|
487
|
+
reason: resolution.suppressedBy,
|
|
488
|
+
mode: policy?.mode ?? null,
|
|
489
|
+
taskId,
|
|
490
|
+
hint: '契約の autoYes が答えを止めている。契約の autoYes を確認',
|
|
491
|
+
});
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
// Issue #3767: recorded on every tick (the record's `at` follows the prompt
|
|
495
|
+
// while it stays up), logged once a minute.
|
|
496
|
+
(0, auto_yes_suppression_state_1.recordPolicySuppression)(worktreeId, 'antigravity', instanceId, {
|
|
497
|
+
reason: auto_yes_suppression_reason_1.NO_HOOK_RECEIPT_SUPPRESSION_REASON,
|
|
498
|
+
mode: null,
|
|
499
|
+
promptType: ungated.promptData.type,
|
|
500
|
+
});
|
|
501
|
+
if (!logDue)
|
|
502
|
+
return;
|
|
354
503
|
logger.info('antigravity-autoyes-withheld-no-hook-receipt', {
|
|
355
504
|
worktreeId,
|
|
356
505
|
instanceId: instanceId ?? 'antigravity',
|
|
357
506
|
windowMs: antigravity_permission_receipts_1.ANTIGRAVITY_PERMISSION_RECEIPT_WINDOW_MS,
|
|
358
|
-
hint:
|
|
507
|
+
hint: noHookReceiptHint(verdict, now),
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Issue #3796: keep the suppression the poller recorded during this dialog's
|
|
512
|
+
* episode current while the dialog it accepted (`answered` / `outlived`) is
|
|
513
|
+
* still up. Only a record made since the dialog was first read, and never the
|
|
514
|
+
* receipt gate's own `no-hook-receipt` (the caller records that itself). A
|
|
515
|
+
* record is kept only while its reason still holds NOW:
|
|
516
|
+
*
|
|
517
|
+
* - `partial-answer` remembers an event: it holds for as long as the dialog
|
|
518
|
+
* the keys went to stays up (this episode), and is re-stamped here;
|
|
519
|
+
* - a contract reason is the contract's verdict on the prompt, re-evaluated on
|
|
520
|
+
* every tick (`resolution`): no verdict (the contract ended, or now answers
|
|
521
|
+
* it) drops the record — the dialog is then `answered` / `outlived` like any
|
|
522
|
+
* other. A verdict is recorded by the caller (review D), whatever was here;
|
|
523
|
+
* - any other reason is left as it was recorded.
|
|
524
|
+
*
|
|
525
|
+
* @returns true when a `partial-answer` that still holds was re-stamped
|
|
526
|
+
*/
|
|
527
|
+
function refreshEpisodeSuppression(worktreeId, instanceId, verdict, resolution) {
|
|
528
|
+
if (verdict.cause !== 'answered' && verdict.cause !== 'outlived')
|
|
529
|
+
return false;
|
|
530
|
+
const own = (0, auto_yes_suppression_state_1.getLastPolicySuppression)(worktreeId, 'antigravity', instanceId);
|
|
531
|
+
if (own === null || own.reason === auto_yes_suppression_reason_1.NO_HOOK_RECEIPT_SUPPRESSION_REASON || !(own.at >= verdict.firstSeenAt)) {
|
|
532
|
+
return false;
|
|
533
|
+
}
|
|
534
|
+
if (own.reason === auto_yes_suppression_reason_1.PARTIAL_ANSWER_SUPPRESSION_REASON) {
|
|
535
|
+
// The memory is the episode's: the dialog the keys went to is still the one
|
|
536
|
+
// up (same episode, accepted on the same receipt). Not `getPartialAnswer`:
|
|
537
|
+
// the tick forgets it as soon as the gated reading stops seeing the prompt,
|
|
538
|
+
// which past the window is every tick.
|
|
539
|
+
const { at: _recordedAt, ...suppression } = own;
|
|
540
|
+
(0, auto_yes_suppression_state_1.recordPolicySuppression)(worktreeId, 'antigravity', instanceId, suppression);
|
|
541
|
+
return true;
|
|
542
|
+
}
|
|
543
|
+
if (auto_yes_suppression_reason_1.CONTRACT_SUPPRESSION_REASONS.has(own.reason) && !resolution.suppressedBy) {
|
|
544
|
+
(0, auto_yes_suppression_state_1.forgetPolicySuppression)(worktreeId, 'antigravity', instanceId);
|
|
545
|
+
}
|
|
546
|
+
return false;
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Issue #3789: keys for an agy dialog the receipt gate accepted reached tmux.
|
|
550
|
+
* Only here does the gate start the grace after which a dialog still up is
|
|
551
|
+
* reported as `outlived`; the tick's `no_answer` exits (another server's session,
|
|
552
|
+
* a partial answer, the base rules or the contract not answering) never get
|
|
553
|
+
* here, so their own records are not overwritten by `no-hook-receipt`.
|
|
554
|
+
*
|
|
555
|
+
* Issue #3796: `interrupted` — the send began and was cut short (stopped
|
|
556
|
+
* part-way, or failed). Its keys may be on the pane and the receipt is spent,
|
|
557
|
+
* so the grace starts here too; without it the dialog stayed `answered`, and
|
|
558
|
+
* silent, for as long as it stayed up.
|
|
559
|
+
*/
|
|
560
|
+
function noteAnswerSent(cliToolId, worktreeId, instanceId, interrupted = false, forReceiptAt) {
|
|
561
|
+
if (cliToolId !== 'antigravity')
|
|
562
|
+
return;
|
|
563
|
+
(0, antigravity_receipt_episodes_1.markAntigravityAnswerSent)(worktreeId, instanceId, Date.now(), {
|
|
564
|
+
interrupted,
|
|
565
|
+
...(forReceiptAt !== undefined ? { forReceiptAt } : {}),
|
|
359
566
|
});
|
|
360
567
|
}
|
|
568
|
+
/**
|
|
569
|
+
* Issue #3796 review: the agy episode a send is about to go to, read before
|
|
570
|
+
* its first await; null for other tools. Given back to {@link noteAnswerSent}
|
|
571
|
+
* however the send came back — whole, failed or cut short (review E) — so that
|
|
572
|
+
* only that episode is marked — the same
|
|
573
|
+
* idea as the Enter record's generation check in `tryEnterFallback`.
|
|
574
|
+
*/
|
|
575
|
+
function receiptEpisodeOfSend(cliToolId, worktreeId, instanceId) {
|
|
576
|
+
return cliToolId === 'antigravity' ? (0, antigravity_receipt_episodes_1.getAntigravityAcceptedReceiptAt)(worktreeId, instanceId) : null;
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* The hint for `antigravity-autoyes-withheld-no-hook-receipt` (Issue #3767):
|
|
580
|
+
* which of the withheld cases it was decides where to look.
|
|
581
|
+
*/
|
|
582
|
+
function noHookReceiptHint(verdict, now = Date.now()) {
|
|
583
|
+
const seconds = verdict.ageMs === null ? null : Math.round(verdict.ageMs / 1000);
|
|
584
|
+
// `lapsed` says how long ago, so from now: the line repeats once a minute.
|
|
585
|
+
const secondsAgo = verdict.lastReceiptAt === null ? null : Math.round((now - verdict.lastReceiptAt) / 1000);
|
|
586
|
+
switch (verdict.cause) {
|
|
587
|
+
case 'never':
|
|
588
|
+
return 'hook の受信が一度も無いため Auto-Yes は答えなかった。~/.gemini/config/hooks.json の向き先(#2622)を確認';
|
|
589
|
+
case 'late':
|
|
590
|
+
return `最後の受信から ${seconds} 秒後に確認が出た(窓 ${antigravity_permission_receipts_1.ANTIGRAVITY_PERMISSION_RECEIPT_WINDOW_MS / 1000} 秒の外)ため答えなかった。人が答える(auto-yes --disable → prompt --json → respond --expect-screen)。続くなら ~/.gemini/config/hooks.json の向き先(#2622)も確認`;
|
|
591
|
+
case 'lapsed':
|
|
592
|
+
return `最後の受信は ${secondsAgo} 秒前で途絶えている(hook が届かなくなった)。hooks.json の向き先(#2622)と agy の再起動を確認`;
|
|
593
|
+
case 'predates':
|
|
594
|
+
return '確認は最後の受信より前から画面に出ていた(引用か別の確認)ため答えなかった。人が答える';
|
|
595
|
+
case 'used':
|
|
596
|
+
return '最後の受信は直前の確認に使い済み。この確認に対する受信は無いため答えなかった。人が答える';
|
|
597
|
+
case 'outlived':
|
|
598
|
+
if (verdict.answerInterrupted === true) {
|
|
599
|
+
return `Auto-Yes が最後の受信の確認へ答えを送る途中で送信が止まり(キーの一部が入力に残っている可能性がある)、${antigravity_receipt_episodes_1.ANTIGRAVITY_ANSWERED_DIALOG_GRACE_MS / 1000} 秒を過ぎても確認が画面に残っている。未使用の受信が無いため、もう一度は答えない。人が答える(auto-yes --disable → prompt --json → respond --expect-screen)`;
|
|
600
|
+
}
|
|
601
|
+
return `Auto-Yes が最後の受信の確認へキーを送ってから ${antigravity_receipt_episodes_1.ANTIGRAVITY_ANSWERED_DIALOG_GRACE_MS / 1000} 秒を過ぎても、確認が画面に残っている。キーで確認が閉じなかったか、新しい受信の無い別の確認と入れ替わった(画面からは区別できない)。未使用の受信が無いため、もう一度は答えない。人が答える(auto-yes --disable → prompt --json → respond --expect-screen)`;
|
|
602
|
+
default:
|
|
603
|
+
return 'hook の受信記録が直近に無いため Auto-Yes は答えなかった。~/.gemini/config/hooks.json の向き先(#2622)を確認';
|
|
604
|
+
}
|
|
605
|
+
}
|
|
361
606
|
/**
|
|
362
607
|
* The audit row's `answer` for the Enter (Issue #3397): not a digit, so the
|
|
363
608
|
* History reads as "Auto-Yes pressed Enter" rather than as a chosen option.
|
|
@@ -409,9 +654,13 @@ function isStillEnterFallbackScreen(prompt, fresh) {
|
|
|
409
654
|
* 6. a capture taken now, past the capture cache, must still be that screen
|
|
410
655
|
* ({@link isStillEnterFallbackScreen}).
|
|
411
656
|
*
|
|
657
|
+
* Issue #3706: with a `generation` (a tick of `pollAutoYes`), the waits of
|
|
658
|
+
* steps 5 and 6 are each followed by {@link isTickCurrent}; a tick that lost
|
|
659
|
+
* its generation sends nothing and changes nothing.
|
|
660
|
+
*
|
|
412
661
|
* @returns true when the Enter was sent; the caller returns `responded`
|
|
413
662
|
*/
|
|
414
|
-
async function tryEnterFallback(prompt, promptDetection, dialogGate, rawOutput) {
|
|
663
|
+
async function tryEnterFallback(prompt, promptDetection, dialogGate, rawOutput, generation) {
|
|
415
664
|
const { worktreeId, cliToolId, instanceId, pollerState, promptData, frameKey } = prompt;
|
|
416
665
|
const judgement = dialogGate.dialog === null ? (0, auto_yes_enter_fallback_1.judgeEnterFallback)(cliToolId, rawOutput) : null;
|
|
417
666
|
if (judgement === null || !judgement.eligible) {
|
|
@@ -481,6 +730,8 @@ async function tryEnterFallback(prompt, promptDetection, dialogGate, rawOutput)
|
|
|
481
730
|
// 5. Never another server's session (Issue #2865).
|
|
482
731
|
const sessionName = manager_1.CLIToolManager.getInstance().getTool(cliToolId).getSessionName(worktreeId, instanceId);
|
|
483
732
|
const ownership = await (0, worktree_session_ownership_1.checkWorktreeSessionOwnership)(worktreeId, sessionName);
|
|
733
|
+
if (generation !== undefined && !isTickCurrent(generation))
|
|
734
|
+
return false;
|
|
484
735
|
if (ownership === null || ownership.verdict === 'foreign') {
|
|
485
736
|
(0, auto_yes_poller_state_1.warnOncePerFrame)(pollerState, `${frameKey}\u0000${sessionName}\u0000${ownership ? 'foreign' : 'worktree_not_found'}`, 'poller:auto-yes-skipped-foreign-session', {
|
|
486
737
|
worktreeId,
|
|
@@ -500,6 +751,8 @@ async function tryEnterFallback(prompt, promptDetection, dialogGate, rawOutput)
|
|
|
500
751
|
// has the box back. Everything that decided the Enter is judged again on the
|
|
501
752
|
// fresh frame; any difference sends nothing, and the next tick starts over.
|
|
502
753
|
const fresh = await (0, cli_session_1.captureSessionOutputFresh)(worktreeId, cliToolId, (rawOutput ?? '').split('\n').length, instanceId);
|
|
754
|
+
if (generation !== undefined && !isTickCurrent(generation))
|
|
755
|
+
return false;
|
|
503
756
|
if (!isStillEnterFallbackScreen(prompt, fresh)) {
|
|
504
757
|
pollerState.enterFallbackCandidateKey = null;
|
|
505
758
|
logger.debug('poller:auto-yes-enter-fallback-fresh-frame-differs', {
|
|
@@ -510,19 +763,34 @@ async function tryEnterFallback(prompt, promptDetection, dialogGate, rawOutput)
|
|
|
510
763
|
});
|
|
511
764
|
return false;
|
|
512
765
|
}
|
|
766
|
+
const receiptEpisode = receiptEpisodeOfSend(cliToolId, worktreeId, instanceId);
|
|
513
767
|
try {
|
|
514
768
|
await (0, tmux_1.sendSpecialKeys)(sessionName, ['Enter']);
|
|
515
769
|
}
|
|
770
|
+
catch (error) {
|
|
771
|
+
// Issue #3796: the Enter may or may not have reached the pane.
|
|
772
|
+
noteAnswerSent(cliToolId, worktreeId, instanceId, true, receiptEpisode);
|
|
773
|
+
throw error;
|
|
774
|
+
}
|
|
516
775
|
finally {
|
|
517
776
|
(0, tmux_capture_cache_1.invalidateCache)(sessionName);
|
|
518
777
|
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
778
|
+
// Issue #3796 review E: the Enter is out — for the episode it began for only.
|
|
779
|
+
noteAnswerSent(cliToolId, worktreeId, instanceId, false, receiptEpisode);
|
|
780
|
+
// Issue #3706: the Enter is out, but the per-screen record is the CURRENT
|
|
781
|
+
// session's: when the poller was stopped (the record was forgotten with it)
|
|
782
|
+
// or a new session began while `send-keys` was awaited, the return of this
|
|
783
|
+
// send must not put the record back. The audit row below is kept either way.
|
|
784
|
+
if (generation === undefined || (isPollerCurrent(generation) && isSameSession(generation))) {
|
|
785
|
+
pollerState.enterFallbackSentKey = frameKey;
|
|
786
|
+
pollerState.enterFallbackCandidateKey = null;
|
|
787
|
+
(0, auto_yes_enter_fallback_1.recordEnterFallbackSent)(worktreeId, cliToolId, instanceId, {
|
|
788
|
+
promptType: promptData.type,
|
|
789
|
+
refusalReason: judgement.refusalReason,
|
|
790
|
+
screenKey,
|
|
791
|
+
...(generation !== undefined ? { epoch: generation.sessionEpoch } : {}),
|
|
792
|
+
});
|
|
793
|
+
}
|
|
526
794
|
logger.info('poller:auto-yes-enter-fallback-sent', {
|
|
527
795
|
worktreeId,
|
|
528
796
|
cliToolId,
|
|
@@ -531,7 +799,7 @@ async function tryEnterFallback(prompt, promptDetection, dialogGate, rawOutput)
|
|
|
531
799
|
refusalReason: judgement.refusalReason,
|
|
532
800
|
composerState: judgement.composerState,
|
|
533
801
|
});
|
|
534
|
-
await finishAnsweredPrompt(prompt, promptDetection, exports.AUTO_YES_ENTER_FALLBACK_ANSWER);
|
|
802
|
+
await finishAnsweredPrompt(prompt, promptDetection, exports.AUTO_YES_ENTER_FALLBACK_ANSWER, generation);
|
|
535
803
|
return true;
|
|
536
804
|
}
|
|
537
805
|
/**
|
|
@@ -543,24 +811,54 @@ async function tryEnterFallback(prompt, promptDetection, dialogGate, rawOutput)
|
|
|
543
811
|
* @param promptDetection - The detection `prompt.promptData` was read from; its
|
|
544
812
|
* content becomes the audit row's
|
|
545
813
|
* @param answer - The answer that was sent
|
|
814
|
+
* @param generation - The tick's generation (Issue #3706). The keys are out, so
|
|
815
|
+
* the task event and the audit row are always written: they record what the
|
|
816
|
+
* agent actually received. What belongs to the poller is written to the
|
|
817
|
+
* tick's own poller state only, never to a successor under the same key, and
|
|
818
|
+
* the response poller restart and the terminal push are skipped when the
|
|
819
|
+
* session was relaunched meanwhile.
|
|
546
820
|
*/
|
|
547
|
-
async function finishAnsweredPrompt(prompt, promptDetection, answer) {
|
|
821
|
+
async function finishAnsweredPrompt(prompt, promptDetection, answer, generation) {
|
|
548
822
|
const { worktreeId, cliToolId, instanceId, compositeKey, pollerState, promptData, promptKey } = prompt;
|
|
549
|
-
//
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
//
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
823
|
+
// Issue #3706: the keys went to the session the tick started on. When a new
|
|
824
|
+
// one was begun while they were being sent, the new process never received
|
|
825
|
+
// this answer, so nothing that stands for "this instance's prompt was just
|
|
826
|
+
// answered" is written: not the dedup key (it would keep Auto-Yes off the new
|
|
827
|
+
// process's identical question), not the poller's response time, not the
|
|
828
|
+
// task event (the task looked up now may be the new session's). Only the
|
|
829
|
+
// audit row is, and it may not adopt a pending row saved after the tick began.
|
|
830
|
+
const sameSession = generation === undefined || isSameSession(generation);
|
|
831
|
+
if (sameSession) {
|
|
832
|
+
// 6. Update timestamp and reset error count
|
|
833
|
+
updateLastServerResponseTimestamp(compositeKey, Date.now(), generation?.pollerState);
|
|
834
|
+
resetErrorCount(compositeKey, generation?.pollerState);
|
|
835
|
+
// 7. Record answered prompt key and timestamp
|
|
836
|
+
pollerState.lastAnsweredPromptKey = promptKey;
|
|
837
|
+
pollerState.lastAnsweredAt = Date.now();
|
|
838
|
+
pollerState.lastSkipWarnKey = null;
|
|
839
|
+
}
|
|
840
|
+
// Issue #3748: what was answered and with what — the question (cut to
|
|
841
|
+
// MAX_LOGGED_QUESTION_LENGTH, never the full text) and the answer sent (the
|
|
842
|
+
// option number, `y`, or `[Enter]`) — so an answer that should not have been
|
|
843
|
+
// given can be told from the log alone.
|
|
844
|
+
logger.info('poller:response-sent', {
|
|
845
|
+
worktreeId,
|
|
846
|
+
cliToolId,
|
|
847
|
+
instanceId,
|
|
848
|
+
sameSession,
|
|
849
|
+
promptType: promptData.type,
|
|
850
|
+
question: (0, auto_yes_prompt_suppression_1.truncateForLog)(promptData.question),
|
|
851
|
+
answer,
|
|
852
|
+
});
|
|
557
853
|
// Issue #1548: the prompt was answered without a human. Raised only after
|
|
558
854
|
// the keys actually reached tmux, so a send that threw is not logged as an
|
|
559
855
|
// answer. No-ops when this instance is not running a contract.
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
856
|
+
if (sameSession) {
|
|
857
|
+
(0, task_transition_service_1.applyEventToActiveTask)((0, db_instance_1.getDbInstance)(), worktreeId, cliToolId,
|
|
858
|
+
// Undefined means the primary instance, which the task lookup identifies
|
|
859
|
+
// by the tool id itself (see getActiveTaskForInstance).
|
|
860
|
+
instanceId ?? cliToolId, 'prompt_answered_auto', { promptType: promptData.type });
|
|
861
|
+
}
|
|
564
862
|
// Issue #1685: persist question/options/answer to chat history so the audit
|
|
565
863
|
// trail survives even when the answer landed inside the response poller's
|
|
566
864
|
// interval and the prompt was never saved as a pending message. Must never
|
|
@@ -575,6 +873,7 @@ async function finishAnsweredPrompt(prompt, promptDetection, answer) {
|
|
|
575
873
|
answer,
|
|
576
874
|
answeredBy: 'auto',
|
|
577
875
|
content: promptDetection.rawContent || promptDetection.cleanContent,
|
|
876
|
+
...(sameSession ? {} : { pendingSavedAtOrBefore: generation.startedAt }),
|
|
578
877
|
});
|
|
579
878
|
}
|
|
580
879
|
catch (recordError) {
|
|
@@ -605,6 +904,10 @@ async function finishAnsweredPrompt(prompt, promptDetection, answer) {
|
|
|
605
904
|
Promise.resolve().then(() => __importStar(require('../lib/polling/response-poller'))),
|
|
606
905
|
Promise.resolve().then(() => __importStar(require('../lib/realtime/terminal-broadcast'))),
|
|
607
906
|
]);
|
|
907
|
+
// Re-read after the await, not the `sameSession` taken before the audit: a
|
|
908
|
+
// relaunch while the modules loaded makes the restart about the new process.
|
|
909
|
+
if (!sameSession || (generation !== undefined && !isSameSession(generation)))
|
|
910
|
+
return;
|
|
608
911
|
startResponsePolling(worktreeId, cliToolId, instanceId);
|
|
609
912
|
void broadcastTerminalSnapshotAfterInteraction(worktreeId, cliToolId, instanceId);
|
|
610
913
|
}
|
|
@@ -621,10 +924,22 @@ async function finishAnsweredPrompt(prompt, promptDetection, answer) {
|
|
|
621
924
|
* @param rawOutput - The SAME tick's capture with its box drawing intact
|
|
622
925
|
* (Issue #2522). Omitting it costs Command Code's `AskUserQuestion` and
|
|
623
926
|
* nothing else; see {@link capturePollerFrame}.
|
|
927
|
+
* @param generation - The calling tick's generation (Issue #3706). Given, every
|
|
928
|
+
* wait before a key — the ownership check, the Enter fallback's fresh capture,
|
|
929
|
+
* each wait inside the send — is followed by {@link isTickCurrent}, and a tick
|
|
930
|
+
* that lost it types nothing more and returns `no_answer`. Omitted (direct
|
|
931
|
+
* callers, tests), nothing is checked, as before.
|
|
624
932
|
* @returns 'responded' | 'no_prompt' | 'duplicate' | 'no_answer' | 'error'
|
|
625
933
|
*/
|
|
626
|
-
async function detectAndRespondToPrompt(worktreeId, pollerState, cliToolId, cleanOutput, precomputedLines, instanceId, rawOutput) {
|
|
934
|
+
async function detectAndRespondToPrompt(worktreeId, pollerState, cliToolId, cleanOutput, precomputedLines, instanceId, rawOutput, generation) {
|
|
627
935
|
const compositeKey = (0, auto_yes_state_1.buildCompositeKey)(worktreeId, cliToolId, instanceId);
|
|
936
|
+
// Issue #3706 / #3713: the send in flight, settled without an await once it
|
|
937
|
+
// comes back — as a partial answer when it was stopped with keys on the pane.
|
|
938
|
+
let attempt = null;
|
|
939
|
+
// Issue #3796: `sendPromptAnswer` began and has not returned — a throw now cut
|
|
940
|
+
// the send short, and the agy receipt gate is told so (`noteAnswerSent`).
|
|
941
|
+
let sendInFlight = false;
|
|
942
|
+
let receiptEpisode = null;
|
|
628
943
|
try {
|
|
629
944
|
// 1. Detect prompt.
|
|
630
945
|
//
|
|
@@ -681,12 +996,27 @@ async function detectAndRespondToPrompt(worktreeId, pollerState, cliToolId, clea
|
|
|
681
996
|
// makes "the status chain and Auto-Yes read the same live region" a fact
|
|
682
997
|
// rather than a hope: there is no second normalisation to disagree with.
|
|
683
998
|
const frame = (0, frame_1.normalizeFrame)(rawOutput ?? cleanOutput, cliToolId);
|
|
999
|
+
// Issue #3767: bracket the read so the receipt gate can tell when an agy
|
|
1000
|
+
// dialog first appeared, not only what time this tick is.
|
|
1001
|
+
if (cliToolId === 'antigravity')
|
|
1002
|
+
(0, antigravity_receipt_episodes_1.beginAntigravityFrameRead)(worktreeId, instanceId);
|
|
684
1003
|
const promptDetection = (0, response_checker_1.detectPromptOnCleanFrame)(cleanOutput, cliToolId, precomputedLines, rawOutput, receiptScope, frame);
|
|
1004
|
+
if (cliToolId === 'antigravity')
|
|
1005
|
+
(0, antigravity_receipt_episodes_1.endAntigravityFrameRead)(worktreeId, instanceId);
|
|
685
1006
|
if (!promptDetection.isPrompt || !promptDetection.promptData) {
|
|
1007
|
+
(0, auto_yes_poller_state_1.forgetPartialAnswer)(compositeKey);
|
|
686
1008
|
pollerState.lastAnsweredPromptKey = null;
|
|
687
1009
|
pollerState.lastAnsweredAt = null;
|
|
688
|
-
pollerState.lastSkipWarnKey = null;
|
|
689
1010
|
pollerState.enterFallbackCandidateKey = null;
|
|
1011
|
+
// Issue #3757: agy's trust screen reads as no prompt (unnumbered: neither
|
|
1012
|
+
// reader takes it), but it is one nobody here answers — record why, still
|
|
1013
|
+
// as `no_prompt`. Before the warn key is cleared, so the WARN stays once
|
|
1014
|
+
// per screen.
|
|
1015
|
+
if (cliToolId === 'antigravity' &&
|
|
1016
|
+
(0, auto_yes_prompt_suppression_1.suppressAntigravityTrustScreen)(worktreeId, instanceId, pollerState, frame, manager_1.CLIToolManager.getInstance().getTool(cliToolId).getSessionName(worktreeId, instanceId))) {
|
|
1017
|
+
return 'no_prompt';
|
|
1018
|
+
}
|
|
1019
|
+
pollerState.lastSkipWarnKey = null;
|
|
690
1020
|
if (cliToolId === 'antigravity' && !promptDetection.isPrompt) {
|
|
691
1021
|
logIfWithheldForWantOfReceipt(worktreeId, instanceId, compositeKey, () => (0, response_checker_1.detectPromptOnCleanFrame)(cleanOutput, cliToolId, precomputedLines, rawOutput));
|
|
692
1022
|
}
|
|
@@ -708,6 +1038,37 @@ async function detectAndRespondToPrompt(worktreeId, pollerState, cliToolId, clea
|
|
|
708
1038
|
promptKey,
|
|
709
1039
|
frameKey,
|
|
710
1040
|
};
|
|
1041
|
+
// 2.5. Issue #3706: an earlier answer to this prompt was stopped after some
|
|
1042
|
+
// of its keys reached the pane (a `y` whose Enter was withheld). Typing the
|
|
1043
|
+
// answer again would append to what is already in the input (`yy`), and
|
|
1044
|
+
// what the pane holds now cannot be told from the frame, so the prompt is
|
|
1045
|
+
// left for a human until it leaves the screen, another prompt replaces it
|
|
1046
|
+
// (`partialAnswerScreenKey`: options and approvalTarget count, the cursor
|
|
1047
|
+
// does not), or the session is relaunched. Recorded as a suppression, so
|
|
1048
|
+
// the prompt Push and `cmate wait` see "withheld", not "answering".
|
|
1049
|
+
const screenKey = (0, auto_yes_poller_state_1.partialAnswerScreenKey)(promptDetection.promptData);
|
|
1050
|
+
const partial = (0, auto_yes_poller_state_1.getPartialAnswer)(compositeKey, epoch);
|
|
1051
|
+
if (partial !== null) {
|
|
1052
|
+
if (partial.screenKey === screenKey) {
|
|
1053
|
+
(0, auto_yes_prompt_suppression_1.suppressAndWarnOnce)(judged, {
|
|
1054
|
+
reason: auto_yes_suppression_reason_1.PARTIAL_ANSWER_SUPPRESSION_REASON,
|
|
1055
|
+
mode: null,
|
|
1056
|
+
promptType: promptDetection.promptData.type,
|
|
1057
|
+
}, `${frameKey}\u0000partial-answer`, 'poller:auto-yes-skipped-partial-answer', { promptType: promptDetection.promptData.type, stoppedAt: partial.at });
|
|
1058
|
+
return 'no_answer';
|
|
1059
|
+
}
|
|
1060
|
+
// Another prompt is on screen: only the sends at the forgotten one's
|
|
1061
|
+
// screen go with it (#3713) — one in flight at this screen keeps its hold.
|
|
1062
|
+
(0, auto_yes_poller_state_1.forgetPartialAnswer)(compositeKey, partial.screenKey);
|
|
1063
|
+
}
|
|
1064
|
+
// Issue #3713: a worktree ID move carried an answer still being sent to
|
|
1065
|
+
// this session's key. Its keys may already be on the pane, and how its send
|
|
1066
|
+
// ends is not known yet — so this screen gets no keys until it comes back
|
|
1067
|
+
// (recorded as a partial answer above, or gone).
|
|
1068
|
+
if ((0, auto_yes_poller_state_1.hasMovedSendInFlight)(compositeKey, epoch, screenKey)) {
|
|
1069
|
+
(0, auto_yes_poller_state_1.warnOncePerFrame)(pollerState, `${frameKey}\u0000moved-send-in-flight`, 'poller:auto-yes-skipped-moved-send-in-flight', { worktreeId, cliToolId, instanceId, promptType: promptDetection.promptData.type });
|
|
1070
|
+
return 'no_answer';
|
|
1071
|
+
}
|
|
711
1072
|
// 3., 3.2., 3.5. Frames that are not Auto-Yes's to answer: see
|
|
712
1073
|
// `suppressIfNotOursToAnswer`.
|
|
713
1074
|
const notOurs = (0, auto_yes_prompt_suppression_1.suppressIfNotOursToAnswer)(judged, frame);
|
|
@@ -720,9 +1081,10 @@ async function detectAndRespondToPrompt(worktreeId, pollerState, cliToolId, clea
|
|
|
720
1081
|
// 3.6. Issue #3397: a refused frame may be a choice screen CommandMate
|
|
721
1082
|
// cannot read; with Auto-Yes on it gets one Enter. See `tryEnterFallback`.
|
|
722
1083
|
if (notOurs.kind === 'dialog-gate-refused') {
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
1084
|
+
if (!(await tryEnterFallback(judged, promptDetection, notOurs.dialogGate, rawOutput, generation))) {
|
|
1085
|
+
return 'no_answer';
|
|
1086
|
+
}
|
|
1087
|
+
return 'responded';
|
|
726
1088
|
}
|
|
727
1089
|
// 4. Resolve auto answer under the execution contract's policy (Issue #1547).
|
|
728
1090
|
// Auto-Yes reads the frame itself instead of going through status-detector
|
|
@@ -759,6 +1121,8 @@ async function detectAndRespondToPrompt(worktreeId, pollerState, cliToolId, clea
|
|
|
759
1121
|
// Issue #2865: never auto-answer a same-named session another CommandMate
|
|
760
1122
|
// server created. The poller keeps running; it just does not type.
|
|
761
1123
|
const ownership = await (0, worktree_session_ownership_1.checkWorktreeSessionOwnership)(worktreeId, sessionName);
|
|
1124
|
+
if (generation !== undefined && !isTickCurrent(generation))
|
|
1125
|
+
return 'no_answer';
|
|
762
1126
|
if (ownership === null || ownership.verdict === 'foreign') {
|
|
763
1127
|
(0, auto_yes_poller_state_1.warnOncePerFrame)(pollerState, `${frameKey}\u0000${sessionName}\u0000${ownership ? 'foreign' : 'worktree_not_found'}`, 'poller:auto-yes-skipped-foreign-session', {
|
|
764
1128
|
worktreeId,
|
|
@@ -770,23 +1134,51 @@ async function detectAndRespondToPrompt(worktreeId, pollerState, cliToolId, clea
|
|
|
770
1134
|
});
|
|
771
1135
|
return 'no_answer';
|
|
772
1136
|
}
|
|
1137
|
+
attempt = (0, auto_yes_poller_state_1.beginSendAttempt)(compositeKey, screenKey, generation?.sessionEpoch ?? epoch);
|
|
1138
|
+
receiptEpisode = receiptEpisodeOfSend(cliToolId, worktreeId, instanceId);
|
|
1139
|
+
sendInFlight = true;
|
|
773
1140
|
try {
|
|
774
1141
|
await (0, prompt_answer_sender_1.sendPromptAnswer)({
|
|
775
1142
|
sessionName,
|
|
776
1143
|
answer,
|
|
777
1144
|
cliToolId,
|
|
778
1145
|
promptData: promptDetection.promptData,
|
|
1146
|
+
// Issue #3706: asked after each wait inside the send.
|
|
1147
|
+
...(generation !== undefined ? { stillCurrent: () => isTickCurrent(generation) } : {}),
|
|
779
1148
|
});
|
|
780
1149
|
}
|
|
781
1150
|
finally {
|
|
782
1151
|
(0, tmux_capture_cache_1.invalidateCache)(sessionName);
|
|
783
1152
|
}
|
|
1153
|
+
sendInFlight = false;
|
|
1154
|
+
(0, auto_yes_poller_state_1.settleSendAttempt)(attempt, false);
|
|
1155
|
+
// Issue #3796 review E: the episode the send began for, as on the failure side.
|
|
1156
|
+
noteAnswerSent(cliToolId, worktreeId, instanceId, false, receiptEpisode);
|
|
784
1157
|
// 6., 7. The answer reached tmux: see `finishAnsweredPrompt`.
|
|
785
|
-
await finishAnsweredPrompt(judged, promptDetection, answer);
|
|
1158
|
+
await finishAnsweredPrompt(judged, promptDetection, answer, generation);
|
|
786
1159
|
return 'responded';
|
|
787
1160
|
}
|
|
788
|
-
catch {
|
|
789
|
-
|
|
1161
|
+
catch (error) {
|
|
1162
|
+
// Issue #3706: a tick that lost its generation — the send stopped part-way
|
|
1163
|
+
// (`PromptAnswerAbortedError`), or failed after the grant went — is not a
|
|
1164
|
+
// failure of the poller that now holds the key, and not an answer either.
|
|
1165
|
+
if (generation !== undefined && !isTickCurrent(generation)) {
|
|
1166
|
+
const keysSent = error instanceof Error && 'keysSent' in error ? Boolean(error.keysSent) : null;
|
|
1167
|
+
// A stop with keys already on the pane: the next tick must not type the
|
|
1168
|
+
// answer again over them (step 2.5). Recorded under the attempt's key as
|
|
1169
|
+
// it is now — the new one when a worktree ID move carried it (#3713).
|
|
1170
|
+
if (attempt !== null)
|
|
1171
|
+
(0, auto_yes_poller_state_1.settleSendAttempt)(attempt, keysSent === true);
|
|
1172
|
+
if (sendInFlight)
|
|
1173
|
+
noteAnswerSent(cliToolId, worktreeId, instanceId, true, receiptEpisode);
|
|
1174
|
+
logger.info('poller:auto-yes-answer-abandoned', { worktreeId, cliToolId, instanceId, keysSent });
|
|
1175
|
+
return 'no_answer';
|
|
1176
|
+
}
|
|
1177
|
+
if (attempt !== null)
|
|
1178
|
+
(0, auto_yes_poller_state_1.settleSendAttempt)(attempt, false);
|
|
1179
|
+
if (sendInFlight)
|
|
1180
|
+
noteAnswerSent(cliToolId, worktreeId, instanceId, true, receiptEpisode);
|
|
1181
|
+
incrementErrorCount(compositeKey, generation?.pollerState);
|
|
790
1182
|
logger.warn('poller:detect-respond-error', { worktreeId, cliToolId, instanceId });
|
|
791
1183
|
return 'error';
|
|
792
1184
|
}
|
|
@@ -797,19 +1189,40 @@ async function detectAndRespondToPrompt(worktreeId, pollerState, cliToolId, clea
|
|
|
797
1189
|
* @param worktreeId - Worktree identifier
|
|
798
1190
|
* @param cliToolId - CLI tool type being polled
|
|
799
1191
|
* @param instanceId - Agent instance ID being polled (Issue #896; equals cliToolId for primary)
|
|
1192
|
+
* @param owner - The poller state whose timer fired (Issue #3706); a timer of a
|
|
1193
|
+
* poller that has since been replaced does nothing
|
|
800
1194
|
*/
|
|
801
|
-
async function pollAutoYes(worktreeId, cliToolId, instanceId) {
|
|
1195
|
+
async function pollAutoYes(worktreeId, cliToolId, instanceId, owner) {
|
|
802
1196
|
const compositeKey = (0, auto_yes_state_1.buildCompositeKey)(worktreeId, cliToolId, instanceId);
|
|
803
1197
|
// 1. Validate context
|
|
804
1198
|
const pollerState = getPollerState(compositeKey);
|
|
1199
|
+
if (owner !== undefined && pollerState !== owner)
|
|
1200
|
+
return;
|
|
805
1201
|
const contextResult = validatePollingContext(compositeKey, pollerState);
|
|
806
1202
|
if (contextResult !== 'valid') {
|
|
807
1203
|
return;
|
|
808
1204
|
}
|
|
1205
|
+
const grant = (0, auto_yes_state_1.getAutoYesState)(worktreeId, cliToolId, instanceId);
|
|
1206
|
+
if (!grant?.enabled)
|
|
1207
|
+
return;
|
|
1208
|
+
// Issue #3706: what this tick acts for, compared after every wait below.
|
|
1209
|
+
const generation = {
|
|
1210
|
+
compositeKey,
|
|
1211
|
+
worktreeId,
|
|
1212
|
+
cliToolId,
|
|
1213
|
+
instanceId,
|
|
1214
|
+
pollerState: pollerState,
|
|
1215
|
+
grant,
|
|
1216
|
+
sessionEpoch: (0, auto_yes_enter_fallback_1.getEnterFallbackSessionEpoch)(compositeKey),
|
|
1217
|
+
startedAt: Date.now(),
|
|
1218
|
+
};
|
|
1219
|
+
// Issue #3796: this is the session wait's tick (it was scheduled as one) —
|
|
1220
|
+
// recorded before anything can fail, for the push gate.
|
|
1221
|
+
if (pollerState.sessionWaitTickAt !== undefined)
|
|
1222
|
+
pollerState.sessionWaitTickRanAt = generation.startedAt;
|
|
809
1223
|
try {
|
|
810
1224
|
// 2. Capture and clean output
|
|
811
|
-
const
|
|
812
|
-
const captureLines = autoYesState?.stopPattern
|
|
1225
|
+
const captureLines = grant.stopPattern
|
|
813
1226
|
? auto_yes_config_1.FULL_CAPTURE_LINES
|
|
814
1227
|
: auto_yes_config_1.REDUCED_CAPTURE_LINES;
|
|
815
1228
|
// Issue #2522: one capture, both spellings. The cleaned string drives every
|
|
@@ -817,8 +1230,14 @@ async function pollAutoYes(worktreeId, cliToolId, instanceId) {
|
|
|
817
1230
|
// so a dialog anchored on box drawing is not invisible to the one path that
|
|
818
1231
|
// can answer it without a human.
|
|
819
1232
|
const { raw: rawOutput, clean: cleanOutput } = await capturePollerFrame(worktreeId, cliToolId, captureLines, instanceId);
|
|
1233
|
+
if (!isTickCurrent(generation)) {
|
|
1234
|
+
endStaleTick(generation);
|
|
1235
|
+
return;
|
|
1236
|
+
}
|
|
820
1237
|
if (pollerState.waitingForSession) {
|
|
821
1238
|
pollerState.waitingForSession = false;
|
|
1239
|
+
// Issue #3796: the session wait's tick ran here — read by the push gate.
|
|
1240
|
+
pollerState.sessionAppearedAt = generation.startedAt;
|
|
822
1241
|
logger.info('poller:session-appeared', { worktreeId, cliToolId, instanceId });
|
|
823
1242
|
}
|
|
824
1243
|
const lines = cleanOutput.split('\n');
|
|
@@ -827,23 +1246,27 @@ async function pollAutoYes(worktreeId, cliToolId, instanceId) {
|
|
|
827
1246
|
return;
|
|
828
1247
|
}
|
|
829
1248
|
// 4. Detect and respond to prompt
|
|
830
|
-
const result = await detectAndRespondToPrompt(worktreeId, pollerState, cliToolId, cleanOutput, lines, instanceId, rawOutput);
|
|
1249
|
+
const result = await detectAndRespondToPrompt(worktreeId, pollerState, cliToolId, cleanOutput, lines, instanceId, rawOutput, generation);
|
|
1250
|
+
if (!isTickCurrent(generation)) {
|
|
1251
|
+
endStaleTick(generation);
|
|
1252
|
+
return;
|
|
1253
|
+
}
|
|
831
1254
|
// Issue #3329: a poll that ran to the end ends the run of errors, so only
|
|
832
1255
|
// failures in a row reach AUTO_STOP_ERROR_THRESHOLD — not ones scattered
|
|
833
1256
|
// over hours. Not on 'error': a capture that works followed by an answer
|
|
834
1257
|
// that fails every time must still back off and stop.
|
|
835
1258
|
if (result !== 'error') {
|
|
836
|
-
resetErrorCount(compositeKey);
|
|
1259
|
+
resetErrorCount(compositeKey, generation.pollerState);
|
|
837
1260
|
}
|
|
838
1261
|
if (result === 'responded') {
|
|
839
|
-
scheduleNextPoll(
|
|
1262
|
+
scheduleNextPoll(generation, auto_yes_state_1.COOLDOWN_INTERVAL_MS);
|
|
840
1263
|
return;
|
|
841
1264
|
}
|
|
842
1265
|
// 5. Thinking check
|
|
843
1266
|
if (result === 'no_prompt') {
|
|
844
1267
|
const recentLines = lines.slice(-auto_yes_state_1.THINKING_CHECK_LINE_COUNT).join('\n');
|
|
845
1268
|
if ((0, cli_patterns_1.detectThinking)(cliToolId, recentLines)) {
|
|
846
|
-
scheduleNextPoll(
|
|
1269
|
+
scheduleNextPoll(generation, auto_yes_config_1.THINKING_POLLING_INTERVAL_MS);
|
|
847
1270
|
return;
|
|
848
1271
|
}
|
|
849
1272
|
}
|
|
@@ -853,18 +1276,23 @@ async function pollAutoYes(worktreeId, cliToolId, instanceId) {
|
|
|
853
1276
|
// the session it answers for (`auto-yes-lifecycle`), and `send --auto-yes`
|
|
854
1277
|
// enables it before the session starts — so wait until `expiresAt`, at the
|
|
855
1278
|
// backoff cap, instead of counting toward `consecutive_errors`.
|
|
856
|
-
|
|
1279
|
+
const sessionMissing = await isSessionMissing(worktreeId, cliToolId, instanceId);
|
|
1280
|
+
if (!isTickCurrent(generation)) {
|
|
1281
|
+
endStaleTick(generation);
|
|
1282
|
+
return;
|
|
1283
|
+
}
|
|
1284
|
+
if (sessionMissing) {
|
|
857
1285
|
if (!pollerState.waitingForSession) {
|
|
858
1286
|
pollerState.waitingForSession = true;
|
|
859
1287
|
logger.info('poller:waiting-for-session', { worktreeId, cliToolId, instanceId });
|
|
860
1288
|
}
|
|
861
|
-
scheduleNextPoll(
|
|
1289
|
+
scheduleNextPoll(generation, auto_yes_state_1.MAX_BACKOFF_MS, { sessionWait: true });
|
|
862
1290
|
return;
|
|
863
1291
|
}
|
|
864
|
-
incrementErrorCount(compositeKey);
|
|
1292
|
+
incrementErrorCount(compositeKey, generation.pollerState);
|
|
865
1293
|
logger.warn('poller:poll-error', { worktreeId, cliToolId, instanceId, error: (0, errors_1.getErrorMessage)(error) });
|
|
866
1294
|
}
|
|
867
|
-
scheduleNextPoll(
|
|
1295
|
+
scheduleNextPoll(generation);
|
|
868
1296
|
}
|
|
869
1297
|
/**
|
|
870
1298
|
* Whether a failed capture failed because the session does not exist
|
|
@@ -883,20 +1311,76 @@ async function isSessionMissing(worktreeId, cliToolId, instanceId) {
|
|
|
883
1311
|
/**
|
|
884
1312
|
* Schedule the next polling iteration
|
|
885
1313
|
*
|
|
886
|
-
*
|
|
887
|
-
*
|
|
888
|
-
*
|
|
1314
|
+
* Issue #3706: on the tick's OWN poller state, and only while it is still the
|
|
1315
|
+
* one under its key. Re-reading by key let a tick that outlived a disable →
|
|
1316
|
+
* enable write its timer over the new poller's `timerId`, leaving two chains.
|
|
1317
|
+
*
|
|
1318
|
+
* @param generation - The tick's generation
|
|
889
1319
|
* @param overrideInterval - Optional override for the next poll delay
|
|
1320
|
+
* @param options.sessionWait - The tick waits for a session to appear (Issue #3791)
|
|
890
1321
|
*/
|
|
891
|
-
function scheduleNextPoll(
|
|
892
|
-
|
|
893
|
-
const pollerState = getPollerState(compositeKey);
|
|
894
|
-
if (!pollerState)
|
|
1322
|
+
function scheduleNextPoll(generation, overrideInterval, options = {}) {
|
|
1323
|
+
if (!isPollerCurrent(generation))
|
|
895
1324
|
return;
|
|
1325
|
+
const { worktreeId, cliToolId, instanceId, pollerState } = generation;
|
|
896
1326
|
const interval = Math.max(overrideInterval ?? pollerState.currentInterval, auto_yes_state_1.POLLING_INTERVAL_MS);
|
|
897
|
-
|
|
898
|
-
|
|
1327
|
+
// Issue #3791: only the session wait's tick is one the push gate waits for.
|
|
1328
|
+
pollerState.sessionWaitTickAt = options.sessionWait === true ? Date.now() + interval : undefined;
|
|
1329
|
+
// Issue #3796: any new timer supersedes the previous one's wake.
|
|
1330
|
+
dropSessionWaitWake(generation.compositeKey);
|
|
1331
|
+
const timerId = setTimeout(() => {
|
|
1332
|
+
dropSessionWaitWake(generation.compositeKey, timerId);
|
|
1333
|
+
void pollAutoYes(worktreeId, cliToolId, instanceId, pollerState);
|
|
899
1334
|
}, interval);
|
|
1335
|
+
pollerState.timerId = timerId;
|
|
1336
|
+
if (options.sessionWait === true)
|
|
1337
|
+
armSessionWaitWake(generation, timerId);
|
|
1338
|
+
}
|
|
1339
|
+
/** compositeKey -> the pending session-wait tick's wake. At most one per poller key. */
|
|
1340
|
+
const sessionWaitWakes = (0, global_state_1.getOrInitGlobal)('__autoYesSessionWaitWakes', () => new Map());
|
|
1341
|
+
/**
|
|
1342
|
+
* Stop listening for the session of `compositeKey` (Issue #3796).
|
|
1343
|
+
*
|
|
1344
|
+
* @param timerId - Only when the wake is this timer's: the timer firing drops
|
|
1345
|
+
* its own wake, never a successor's
|
|
1346
|
+
*/
|
|
1347
|
+
function dropSessionWaitWake(compositeKey, timerId) {
|
|
1348
|
+
const wake = sessionWaitWakes.get(compositeKey);
|
|
1349
|
+
if (wake === undefined || (timerId !== undefined && wake.timerId !== timerId))
|
|
1350
|
+
return;
|
|
1351
|
+
sessionWaitWakes.delete(compositeKey);
|
|
1352
|
+
wake.unsubscribe();
|
|
1353
|
+
}
|
|
1354
|
+
/**
|
|
1355
|
+
* Issue #3796: while the poller waits `MAX_BACKOFF_MS` for its session, the
|
|
1356
|
+
* session's creation brings the tick forward to a poll interval — so the first
|
|
1357
|
+
* prompt of a session started right after the poller looked (`send --auto-yes`
|
|
1358
|
+
* enables Auto-Yes before the session exists) is answered, or its human
|
|
1359
|
+
* notified, without waiting out the backoff. The push gate's hold follows the
|
|
1360
|
+
* earlier tick (`autoYesHoldEndsAt`).
|
|
1361
|
+
*
|
|
1362
|
+
* The wake replaces the pending timer and nothing else: it does nothing once
|
|
1363
|
+
* that timer fired (the tick drops the wake before it runs, so a tick in flight
|
|
1364
|
+
* is never doubled), once another timer replaced it, or once the poller was
|
|
1365
|
+
* stopped or replaced (`stopAutoYesPolling` drops it, and `scheduleNextPoll`
|
|
1366
|
+
* checks the poller is still the generation's).
|
|
1367
|
+
*/
|
|
1368
|
+
function armSessionWaitWake(generation, timerId) {
|
|
1369
|
+
const { compositeKey, worktreeId, cliToolId, instanceId, pollerState } = generation;
|
|
1370
|
+
const sessionName = manager_1.CLIToolManager.getInstance().getTool(cliToolId).getSessionName(worktreeId, instanceId);
|
|
1371
|
+
const unsubscribe = (0, session_created_signal_1.onTmuxSessionCreated)(sessionName, () => {
|
|
1372
|
+
const wake = sessionWaitWakes.get(compositeKey);
|
|
1373
|
+
if (wake === undefined || wake.timerId !== timerId)
|
|
1374
|
+
return;
|
|
1375
|
+
sessionWaitWakes.delete(compositeKey);
|
|
1376
|
+
if (!isPollerCurrent(generation) || pollerState.timerId !== timerId)
|
|
1377
|
+
return;
|
|
1378
|
+
clearTimeout(timerId);
|
|
1379
|
+
logger.info('poller:session-created-wake', { worktreeId, cliToolId, instanceId });
|
|
1380
|
+
// Still the session wait's tick — the one the push gate's hold is about.
|
|
1381
|
+
scheduleNextPoll(generation, auto_yes_state_1.POLLING_INTERVAL_MS, { sessionWait: true });
|
|
1382
|
+
});
|
|
1383
|
+
sessionWaitWakes.set(compositeKey, { timerId, unsubscribe });
|
|
900
1384
|
}
|
|
901
1385
|
// =============================================================================
|
|
902
1386
|
// Public Poller API
|
|
@@ -920,6 +1404,11 @@ function startAutoYesPolling(worktreeId, cliToolId, instanceId) {
|
|
|
920
1404
|
}
|
|
921
1405
|
// Resolve the effective instance ID (primary === cliToolId).
|
|
922
1406
|
const effectiveInstanceId = instanceId ?? cliToolId;
|
|
1407
|
+
// Issue #3730: nothing starts once a shutdown has recorded what it releases —
|
|
1408
|
+
// a poller started after the record would be a grant the record never saw.
|
|
1409
|
+
if ((0, auto_yes_state_1.isAutoYesShutdownStarted)()) {
|
|
1410
|
+
return { started: false, reason: 'server shutting down' };
|
|
1411
|
+
}
|
|
923
1412
|
// Check if auto-yes is enabled
|
|
924
1413
|
const autoYesState = (0, auto_yes_state_1.getAutoYesState)(worktreeId, cliToolId, effectiveInstanceId);
|
|
925
1414
|
if (!autoYesState?.enabled) {
|
|
@@ -938,7 +1427,7 @@ function startAutoYesPolling(worktreeId, cliToolId, instanceId) {
|
|
|
938
1427
|
}
|
|
939
1428
|
// Stop existing poller if cliToolId changed
|
|
940
1429
|
if (existingPollerState) {
|
|
941
|
-
stopAutoYesPolling(compositeKey);
|
|
1430
|
+
stopAutoYesPolling(compositeKey, 'replaced');
|
|
942
1431
|
}
|
|
943
1432
|
// Create new poller state
|
|
944
1433
|
const pollerState = {
|
|
@@ -958,7 +1447,7 @@ function startAutoYesPolling(worktreeId, cliToolId, instanceId) {
|
|
|
958
1447
|
(0, auto_yes_policy_1.invalidateSessionAutoYesPolicy)(compositeKey);
|
|
959
1448
|
// Start polling immediately
|
|
960
1449
|
pollerState.timerId = setTimeout(() => {
|
|
961
|
-
pollAutoYes(worktreeId, cliToolId, effectiveInstanceId);
|
|
1450
|
+
void pollAutoYes(worktreeId, cliToolId, effectiveInstanceId, pollerState);
|
|
962
1451
|
}, auto_yes_state_1.POLLING_INTERVAL_MS);
|
|
963
1452
|
logger.info('poller:started', { worktreeId, cliToolId, instanceId: effectiveInstanceId });
|
|
964
1453
|
return { started: true };
|
|
@@ -968,9 +1457,16 @@ function startAutoYesPolling(worktreeId, cliToolId, instanceId) {
|
|
|
968
1457
|
*
|
|
969
1458
|
* Issue #525: Changed from (worktreeId) to (compositeKey).
|
|
970
1459
|
*
|
|
1460
|
+
* Issue #3730: `reason` is why the POLLER stops, logged on `poller:stopped`. It
|
|
1461
|
+
* does not touch the grant: an ID move and a replacement stop the poller and
|
|
1462
|
+
* keep the grant, so disabling stays each caller's own decision. Omitted, the
|
|
1463
|
+
* reason of an enclosing {@link withPollerStopReason} applies (the lifecycle
|
|
1464
|
+
* table's path), else `unspecified`.
|
|
1465
|
+
*
|
|
971
1466
|
* @param compositeKey - Composite key (worktreeId:cliToolId)
|
|
1467
|
+
* @param reason - Why the poller stops
|
|
972
1468
|
*/
|
|
973
|
-
function stopAutoYesPolling(compositeKey) {
|
|
1469
|
+
function stopAutoYesPolling(compositeKey, reason) {
|
|
974
1470
|
// Issue #3397: before the early return — the disable route and the session
|
|
975
1471
|
// cleanup call this for an instance whose poller may already be gone, and the
|
|
976
1472
|
// Enter record must not outlive the grant or the session either way.
|
|
@@ -981,23 +1477,32 @@ function stopAutoYesPolling(compositeKey) {
|
|
|
981
1477
|
if (pollerState.timerId) {
|
|
982
1478
|
clearTimeout(pollerState.timerId);
|
|
983
1479
|
}
|
|
1480
|
+
dropSessionWaitWake(compositeKey);
|
|
984
1481
|
autoYesPollerStates.delete(compositeKey);
|
|
985
1482
|
(0, auto_yes_policy_1.invalidateSessionAutoYesPolicy)(compositeKey);
|
|
986
|
-
logger.info('poller:stopped', { compositeKey });
|
|
1483
|
+
logger.info('poller:stopped', { compositeKey, reason: (0, auto_yes_poller_stop_reason_1.resolvePollerStopReason)(reason, 'unspecified') });
|
|
987
1484
|
}
|
|
988
1485
|
/**
|
|
989
1486
|
* Stop all server-side auto-yes polling (graceful shutdown).
|
|
1487
|
+
*
|
|
1488
|
+
* Issue #3730: logs `shutdown` unless an enclosing
|
|
1489
|
+
* {@link withPollerStopReason} says otherwise (the test reset). Writes nothing
|
|
1490
|
+
* to disk: the record of the grants a shutdown released is the server's to
|
|
1491
|
+
* make (`lib/auto-yes-shutdown-record`), never a side effect of this.
|
|
990
1492
|
*/
|
|
991
1493
|
function stopAllAutoYesPolling() {
|
|
1494
|
+
const reason = (0, auto_yes_poller_stop_reason_1.resolvePollerStopReason)(undefined, 'shutdown');
|
|
992
1495
|
for (const [key, pollerState] of autoYesPollerStates.entries()) {
|
|
993
1496
|
if (pollerState.timerId) {
|
|
994
1497
|
clearTimeout(pollerState.timerId);
|
|
995
1498
|
}
|
|
1499
|
+
dropSessionWaitWake(key);
|
|
996
1500
|
(0, auto_yes_policy_1.invalidateSessionAutoYesPolicy)(key);
|
|
997
|
-
logger.info('poller:stopped', { compositeKey: key, reason
|
|
1501
|
+
logger.info('poller:stopped', { compositeKey: key, reason });
|
|
998
1502
|
}
|
|
999
1503
|
autoYesPollerStates.clear();
|
|
1000
1504
|
(0, auto_yes_enter_fallback_1.clearEnterFallbacks)();
|
|
1505
|
+
(0, auto_yes_poller_state_1.clearPartialAnswers)();
|
|
1001
1506
|
}
|
|
1002
1507
|
/**
|
|
1003
1508
|
* Get all composite keys that have active auto-yes poller entries.
|
|
@@ -1017,12 +1522,22 @@ function getAutoYesPollerCompositeKeys() {
|
|
|
1017
1522
|
* [SF-001] Uses shared filterCompositeKeysByWorktree (DRY).
|
|
1018
1523
|
*
|
|
1019
1524
|
* @param worktreeId - Worktree identifier
|
|
1525
|
+
* @param options.reason - Issue #3730: why the pollers stop, for `poller:stopped`
|
|
1526
|
+
* @param options.keepPartialAnswers - Issue #3713 (re-instruction 1, P2-1): the
|
|
1527
|
+
* disable route's "every agent" passes it — a disable, like one agent's
|
|
1528
|
+
* `stopAutoYesPolling`, keeps the memory of an answer stopped part-way and
|
|
1529
|
+
* the sends still in flight, so a disable → enable does not type over a
|
|
1530
|
+
* partial input. Omitted (the worktree being deleted, `session-cleanup` via
|
|
1531
|
+
* `auto-yes-lifecycle`), both are dropped and a late send records nothing.
|
|
1020
1532
|
*/
|
|
1021
|
-
function stopAutoYesPollingByWorktree(worktreeId) {
|
|
1533
|
+
function stopAutoYesPollingByWorktree(worktreeId, options) {
|
|
1022
1534
|
const pollerKeys = (0, auto_yes_state_1.filterCompositeKeysByWorktree)(Array.from(autoYesPollerStates.keys()), worktreeId);
|
|
1023
|
-
|
|
1535
|
+
// Issue #3730: `options.reason`, else the enclosing scope's (the lifecycle table).
|
|
1536
|
+
pollerKeys.forEach(key => stopAutoYesPolling(key, options?.reason));
|
|
1024
1537
|
// Issue #3397: and the records of instances whose poller had already stopped.
|
|
1025
1538
|
(0, auto_yes_enter_fallback_1.forgetEnterFallbacksByWorktree)(worktreeId);
|
|
1539
|
+
if (!options?.keepPartialAnswers)
|
|
1540
|
+
(0, auto_yes_poller_state_1.forgetPartialAnswersByWorktree)(worktreeId);
|
|
1026
1541
|
}
|
|
1027
1542
|
/**
|
|
1028
1543
|
* Check if any auto-yes poller is active for a given worktreeId.
|