commandmate 0.46.1 → 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 +223 -216
- package/.next/app-path-routes-manifest.json +19 -18
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +9 -9
- 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 +2 -2
- package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/escalation/route.js +1 -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_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 +19 -18
- package/.next/server/chunks/1210.js +1 -1
- 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 +1 -1
- 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 +10 -10
- package/.next/server/chunks/8728.js +2 -2
- package/.next/server/chunks/8791.js +1 -1
- package/.next/server/chunks/8918.js +4 -4
- 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 +1 -1
- package/.next/server/chunks/9731.js +3 -3
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{2407-9703c569370b8a9d.js → 2407-b2f524f99f7fc353.js} +1 -1
- package/.next/static/chunks/5371-a549a0d2c2044d41.js +1 -0
- package/.next/static/chunks/{5794-4eee51ff1e878aa6.js → 5794-80ac3f06f098ea29.js} +1 -1
- package/.next/static/chunks/602-1c1488959215e140.js +1 -0
- 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/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 +108 -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 +54 -0
- 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 +43 -1
- package/dist/lib/polling/auto-yes-suppression-reason.d.ts.map +1 -1
- package/dist/lib/polling/auto-yes-suppression-reason.js +18 -1
- 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/auto-yes-lifecycle.js +28 -2
- package/dist/server/src/lib/auto-yes-poller.js +345 -28
- 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/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/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/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-policy.js +61 -7
- 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 +18 -1
- package/dist/server/src/lib/polling/auto-yes-suppression-state.js +10 -0
- package/dist/server/src/lib/polling/response-checker-dialog-gate.js +2 -2
- package/dist/server/src/lib/polling/response-checker.js +9 -0
- package/dist/server/src/lib/polling/response-poller-core.js +136 -104
- 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/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/cli-session.js +38 -3
- 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 +2 -1
- 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 +4 -0
- 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.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/2984.js +0 -25
- package/.next/server/chunks/3718.js +0 -1
- package/.next/server/chunks/4837.js +0 -14
- 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-0dc947683e46e78c.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-3e357690446cd2da.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-effbf0796881dd5a.js +0 -1
- /package/.next/static/{QxDf7lm-JJkWoj-TyWiSB → b5BiQC9F6r_XFPdA9cuSj}/_buildManifest.js +0 -0
- /package/.next/static/{QxDf7lm-JJkWoj-TyWiSB → b5BiQC9F6r_XFPdA9cuSj}/_ssgManifest.js +0 -0
|
@@ -103,6 +103,12 @@ exports.CLASSIFICATION_GRACE_MS = 8_000;
|
|
|
103
103
|
const pending = (0, global_state_1.getOrInitGlobal)('__waitingPushPending', () => new Map());
|
|
104
104
|
/** Composite key -> the timer holding that wait's first notification (#2156). */
|
|
105
105
|
const graceTimers = (0, global_state_1.getOrInitGlobal)('__waitingPushGraceTimers', () => new Map());
|
|
106
|
+
/**
|
|
107
|
+
* Composite key -> the timer that asks the gate again when its
|
|
108
|
+
* `auto-yes-answering` hold ends (Issue #3757). Apart from {@link graceTimers}:
|
|
109
|
+
* that one is the classification hold of #2156, this one the Auto-Yes hold.
|
|
110
|
+
*/
|
|
111
|
+
const answerGraceTimers = (0, global_state_1.getOrInitGlobal)('__waitingPushAnswerGraceTimers', () => new Map());
|
|
106
112
|
/**
|
|
107
113
|
* The worktree's display name, for the notification title.
|
|
108
114
|
*
|
|
@@ -160,10 +166,15 @@ function isUnnamedWait(kind) {
|
|
|
160
166
|
/** Drop the hold on this wait without sending anything. */
|
|
161
167
|
function cancelGrace(key) {
|
|
162
168
|
const timer = graceTimers.get(key);
|
|
163
|
-
if (timer
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
169
|
+
if (timer !== undefined) {
|
|
170
|
+
clearTimeout(timer);
|
|
171
|
+
graceTimers.delete(key);
|
|
172
|
+
}
|
|
173
|
+
const answerTimer = answerGraceTimers.get(key);
|
|
174
|
+
if (answerTimer !== undefined) {
|
|
175
|
+
clearTimeout(answerTimer);
|
|
176
|
+
answerGraceTimers.delete(key);
|
|
177
|
+
}
|
|
167
178
|
}
|
|
168
179
|
/**
|
|
169
180
|
* The Auto-Yes gate, then the fan-out.
|
|
@@ -172,17 +183,70 @@ function cancelGrace(key) {
|
|
|
172
183
|
* moment it decides to send, so a notification dropped after the fan-out began
|
|
173
184
|
* would still consume the episode's one slot — see `prompt-push-gate`.
|
|
174
185
|
*/
|
|
175
|
-
function gateAndSend(wait, now) {
|
|
176
|
-
|
|
186
|
+
function gateAndSend(wait, now, recheck = false) {
|
|
187
|
+
const decision = (0, prompt_push_gate_1.decideAndLogPromptPush)({
|
|
177
188
|
worktreeId: wait.worktreeId,
|
|
178
189
|
cliToolId: wait.cliToolId,
|
|
179
190
|
instanceId: wait.instanceId,
|
|
180
191
|
waitingSince: wait.since,
|
|
181
|
-
|
|
192
|
+
now,
|
|
193
|
+
}, { recheck });
|
|
194
|
+
if (decision.suppress) {
|
|
195
|
+
// Issue #3757: "Auto-Yes is answering" is a hold, not a verdict. Ask again
|
|
196
|
+
// when it ends; a wait Auto-Yes did answer is gone from the episode store
|
|
197
|
+
// by then and nothing is sent.
|
|
198
|
+
if (decision.reason === 'auto-yes-answering')
|
|
199
|
+
holdForAutoYesAnswer(wait, now);
|
|
182
200
|
return;
|
|
183
201
|
}
|
|
184
202
|
void sendWaitingPush(wait, false, now);
|
|
185
203
|
}
|
|
204
|
+
/**
|
|
205
|
+
* Re-ask the gate for this wait when its `auto-yes-answering` hold ends
|
|
206
|
+
* (Issue #3757). The edge fires once, so without this a wait Auto-Yes never
|
|
207
|
+
* answered — a screen the poller cannot read and records nothing about — stayed
|
|
208
|
+
* silent until the escalation reminder, ten minutes later.
|
|
209
|
+
*/
|
|
210
|
+
function holdForAutoYesAnswer(wait, now) {
|
|
211
|
+
const key = (0, auto_yes_state_1.buildCompositeKey)(wait.worktreeId, wait.cliToolId, wait.instanceId);
|
|
212
|
+
const existing = answerGraceTimers.get(key);
|
|
213
|
+
if (existing !== undefined)
|
|
214
|
+
clearTimeout(existing);
|
|
215
|
+
// From the gate's own origin, not `since` (Issue #3757 review), and past the
|
|
216
|
+
// poller's session-wait tick (Issue #3791). Capped at the grace, so a clock
|
|
217
|
+
// that went backwards cannot arm an overflowing timer, and a longer hold is
|
|
218
|
+
// asked about again every grace: a poller stopped meanwhile ends it then
|
|
219
|
+
// rather than at a tick that will not come.
|
|
220
|
+
const holdEndsAt = (0, prompt_push_gate_1.autoYesHoldEndsAt)({ worktreeId: wait.worktreeId, cliToolId: wait.cliToolId, instanceId: wait.instanceId, waitingSince: wait.since }, now);
|
|
221
|
+
const delay = Math.min(prompt_push_gate_1.AUTO_YES_ANSWER_GRACE_MS, Math.max(0, holdEndsAt - now));
|
|
222
|
+
const timer = setTimeout(() => {
|
|
223
|
+
answerGraceTimers.delete(key);
|
|
224
|
+
releaseAutoYesHold(key, wait.since);
|
|
225
|
+
}, delay);
|
|
226
|
+
// Never hold the process open for it, as with the other timers here.
|
|
227
|
+
timer.unref?.();
|
|
228
|
+
answerGraceTimers.set(key, timer);
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* The Auto-Yes hold ended: notify unless the wait is over or is another one
|
|
232
|
+
* (Issue #3757). Read from the episode store, as {@link releaseHeldWait} does.
|
|
233
|
+
*/
|
|
234
|
+
function releaseAutoYesHold(key, since) {
|
|
235
|
+
const held = pending.get(key);
|
|
236
|
+
if (held === undefined || held.since !== since)
|
|
237
|
+
return;
|
|
238
|
+
const episode = (0, waiting_episode_state_1.getWaitingEpisode)(held.worktreeId, held.cliToolId, held.instanceId);
|
|
239
|
+
if (episode === null || episode.since !== held.since) {
|
|
240
|
+
pending.delete(key);
|
|
241
|
+
// Issue #3776: this episode's hold only — the next one may hold already.
|
|
242
|
+
(0, prompt_push_gate_1.forgetAutoYesHold)(key, held.since);
|
|
243
|
+
stopEscalationTimerIfIdle();
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const settled = { ...held, kind: episode.kind };
|
|
247
|
+
pending.set(key, settled);
|
|
248
|
+
gateAndSend(settled, Date.now(), true);
|
|
249
|
+
}
|
|
186
250
|
/**
|
|
187
251
|
* The grace elapsed: send the held wait with whatever it is called *now*
|
|
188
252
|
* (Issue #2156).
|
|
@@ -380,6 +444,9 @@ function stopWaitingPushNotifier() {
|
|
|
380
444
|
for (const timer of graceTimers.values())
|
|
381
445
|
clearTimeout(timer);
|
|
382
446
|
graceTimers.clear();
|
|
447
|
+
for (const timer of answerGraceTimers.values())
|
|
448
|
+
clearTimeout(timer);
|
|
449
|
+
answerGraceTimers.clear();
|
|
383
450
|
pending.clear();
|
|
384
451
|
stopEscalationTimerIfIdle();
|
|
385
452
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Relays whose payload is being typed into the requester's composer right now
|
|
4
|
+
* (Issue #3732).
|
|
5
|
+
*
|
|
6
|
+
* A claim is taken by `relay-delivery` immediately before `sendUserMessage`, in
|
|
7
|
+
* the same synchronous stretch that re-read the row and found it still open, and
|
|
8
|
+
* released once the attempt is over (delivered, held or failed). While it is
|
|
9
|
+
* held, `withdrawRelay` answers `delivering` instead of cancelling: a cancel
|
|
10
|
+
* that reported success would be a lie once the send is already under way, and
|
|
11
|
+
* the send cannot be taken back.
|
|
12
|
+
*
|
|
13
|
+
* A module of its own, rather than an export of `relay-delivery`, so that
|
|
14
|
+
* `relay-service` (and the cancel route behind it) can consult it without
|
|
15
|
+
* importing the send path.
|
|
16
|
+
*
|
|
17
|
+
* On `globalThis` for the reason the in-flight set is (#1736): the poller's and
|
|
18
|
+
* the API's bundles must see the same set under `next dev`. Being in memory is
|
|
19
|
+
* enough — a claim only lives for the duration of one send in this process, so
|
|
20
|
+
* there is nothing to migrate and nothing to recover after a restart.
|
|
21
|
+
*
|
|
22
|
+
* @module lib/relay/relay-delivery-claims
|
|
23
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.claimRelayDelivery = claimRelayDelivery;
|
|
26
|
+
exports.releaseRelayDelivery = releaseRelayDelivery;
|
|
27
|
+
exports.isRelayDeliveryClaimed = isRelayDeliveryClaimed;
|
|
28
|
+
exports.resetRelayDeliveryClaims = resetRelayDeliveryClaims;
|
|
29
|
+
const global_state_1 = require("../global-state");
|
|
30
|
+
const claims = (0, global_state_1.getOrInitGlobal)('__relayDeliveryClaims', () => new Set());
|
|
31
|
+
/** Mark a relay as being delivered. */
|
|
32
|
+
function claimRelayDelivery(relayId) {
|
|
33
|
+
claims.add(relayId);
|
|
34
|
+
}
|
|
35
|
+
/** The attempt is over, whatever its outcome. */
|
|
36
|
+
function releaseRelayDelivery(relayId) {
|
|
37
|
+
claims.delete(relayId);
|
|
38
|
+
}
|
|
39
|
+
/** Whether a send for this relay is under way right now. */
|
|
40
|
+
function isRelayDeliveryClaimed(relayId) {
|
|
41
|
+
return claims.has(relayId);
|
|
42
|
+
}
|
|
43
|
+
/** Forget every claim. Test seam. */
|
|
44
|
+
function resetRelayDeliveryClaims() {
|
|
45
|
+
claims.clear();
|
|
46
|
+
}
|
|
@@ -57,6 +57,8 @@ const relay_policy_1 = require("../../lib/relay/relay-policy");
|
|
|
57
57
|
const relay_readiness_1 = require("../../lib/relay/relay-readiness");
|
|
58
58
|
const relay_session_ref_1 = require("../../lib/relay/relay-session-ref");
|
|
59
59
|
const relay_system_line_1 = require("../../lib/relay/relay-system-line");
|
|
60
|
+
const relay_delivery_claims_1 = require("../../lib/relay/relay-delivery-claims");
|
|
61
|
+
const types_1 = require("../../lib/relay/types");
|
|
60
62
|
const logger_1 = require("../../lib/logger");
|
|
61
63
|
const global_state_1 = require("../global-state");
|
|
62
64
|
const logger = (0, logger_1.createLogger)('relay-delivery');
|
|
@@ -158,6 +160,7 @@ const inFlight = (0, global_state_1.getOrInitGlobal)('__relayDeliveryInFlight',
|
|
|
158
160
|
/** Forget every in-flight delivery. Test seam. */
|
|
159
161
|
function resetRelayDeliveryState() {
|
|
160
162
|
inFlight.clear();
|
|
163
|
+
(0, relay_delivery_claims_1.resetRelayDeliveryClaims)();
|
|
161
164
|
globalThis.__relayPumpRunning = false;
|
|
162
165
|
}
|
|
163
166
|
function senderLabel(db, relay) {
|
|
@@ -431,6 +434,13 @@ function notifyRelayPromptWaiting(worker) {
|
|
|
431
434
|
function sweepExpiredRelays(db, now = Date.now()) {
|
|
432
435
|
let expired = 0;
|
|
433
436
|
for (const relay of (0, relay_db_1.listExpiredOpenRelays)(db, now)) {
|
|
437
|
+
// A send already under way for this relay cannot be taken back (#3732).
|
|
438
|
+
// Expiring it now would leave A with both the reply and the expiry notice,
|
|
439
|
+
// and the delivery's own cleanup would then wipe that notice. The next
|
|
440
|
+
// sweep finds it closed (delivered) or, if the send was refused, still
|
|
441
|
+
// open and expires it then.
|
|
442
|
+
if ((0, relay_delivery_claims_1.isRelayDeliveryClaimed)(relay.id))
|
|
443
|
+
continue;
|
|
434
444
|
try {
|
|
435
445
|
const locale = (0, model_change_push_notifier_1.resolveReadersLocale)(db);
|
|
436
446
|
// A payload that never went out is superseded by the expiry notice: A
|
|
@@ -465,47 +475,83 @@ function sweepExpiredRelays(db, now = Date.now()) {
|
|
|
465
475
|
* repeat delivery is prevented by the in-flight set within a process and by
|
|
466
476
|
* `markRelayDelivered`'s guarded update across one, which is the idempotency the
|
|
467
477
|
* Issue asks for by name.
|
|
478
|
+
*
|
|
479
|
+
* `kind` and `body` are what the pump's listing saw, and that listing is stale
|
|
480
|
+
* by the time the readiness check returns (#3732): an earlier relay's send, or
|
|
481
|
+
* this one's own capture, may have let a cancel or an expiry sweep run. So the
|
|
482
|
+
* row is read again AFTER the last await before the send, and the send goes
|
|
483
|
+
* ahead only when it still carries the same payload — and, for anything but an
|
|
484
|
+
* expiry notice, is still open. The claim is taken in that same synchronous
|
|
485
|
+
* stretch, so no cancel can slip in between the check and the send; from then
|
|
486
|
+
* on `withdrawRelay` answers `delivering`.
|
|
468
487
|
*/
|
|
469
488
|
async function deliverOne(db, relayId, kind, body) {
|
|
470
|
-
const
|
|
471
|
-
if (!
|
|
489
|
+
const listed = (0, relay_db_1.getRelayById)(db, relayId);
|
|
490
|
+
if (!listed)
|
|
472
491
|
return 'skipped';
|
|
473
|
-
const
|
|
474
|
-
const hold = await (0, relay_readiness_1.findRelayHoldReason)(
|
|
492
|
+
const listedRequester = (0, relay_session_ref_1.resolveRelaySession)(db, listed.from);
|
|
493
|
+
const hold = await (0, relay_readiness_1.findRelayHoldReason)(listedRequester.worktreeId, listedRequester.cliToolId, listedRequester.instanceId, db);
|
|
475
494
|
if (hold) {
|
|
476
495
|
logger.debug('relay-delivery-held', { relayId, kind, reason: hold });
|
|
477
496
|
return 'held';
|
|
478
497
|
}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
if (!result.ok) {
|
|
491
|
-
logger.info('relay-delivery-refused', { relayId, kind, stage: result.stage });
|
|
492
|
-
return result.stage === 'prompt_waiting' ? 'held' : 'failed';
|
|
498
|
+
// Synchronous from here to the send: re-read, then claim.
|
|
499
|
+
const current = findCurrentPayload(db, relayId);
|
|
500
|
+
if (!current || current.kind !== kind || current.body !== body) {
|
|
501
|
+
logger.info('relay-delivery-superseded', { relayId, kind });
|
|
502
|
+
return 'skipped';
|
|
503
|
+
}
|
|
504
|
+
// An expiry notice is delivered from a CLOSED relay by design; everything
|
|
505
|
+
// else is only owed while the relay is open.
|
|
506
|
+
if (kind !== 'expired' && !(0, types_1.isOpenRelayState)(current.relay.state)) {
|
|
507
|
+
logger.info('relay-delivery-closed', { relayId, kind, state: current.relay.state });
|
|
508
|
+
return 'skipped';
|
|
493
509
|
}
|
|
494
|
-
const
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
510
|
+
const relay = current.relay;
|
|
511
|
+
const requester = (0, relay_session_ref_1.resolveRelaySession)(db, relay.from);
|
|
512
|
+
(0, relay_delivery_claims_1.claimRelayDelivery)(relayId);
|
|
513
|
+
try {
|
|
514
|
+
const result = await (0, send_user_message_1.sendUserMessage)(db, {
|
|
515
|
+
worktreeId: requester.worktreeId,
|
|
516
|
+
content: body,
|
|
517
|
+
cliToolId: requester.cliToolId,
|
|
518
|
+
instanceId: requester.instanceId,
|
|
519
|
+
messageType: 'relay',
|
|
520
|
+
// The pointer back at the ledger. Also `session_relays.sent_request_id` for
|
|
521
|
+
// a reply, which carries a UNIQUE index — so a second delivery of the same
|
|
522
|
+
// relay cannot be recorded even if one were somehow attempted.
|
|
523
|
+
requestId: kind === 'reply' ? (0, chat_db_1.relayRequestId)(relay.id) : undefined,
|
|
524
|
+
});
|
|
525
|
+
if (!result.ok) {
|
|
526
|
+
logger.info('relay-delivery-refused', { relayId, kind, stage: result.stage });
|
|
527
|
+
return result.stage === 'prompt_waiting' ? 'held' : 'failed';
|
|
528
|
+
}
|
|
529
|
+
const now = Date.now();
|
|
530
|
+
if (kind === 'reply') {
|
|
531
|
+
if (!(0, relay_db_1.markRelayDelivered)(db, relay.id, (0, chat_db_1.relayRequestId)(relay.id), now)) {
|
|
532
|
+
// Somebody closed it underneath us. The message is already in A's
|
|
533
|
+
// composer, which is the outcome that mattered.
|
|
534
|
+
logger.info('relay-already-closed-on-deliver', { relayId });
|
|
535
|
+
}
|
|
536
|
+
(0, relay_system_line_1.writeRelaySystemLine)(db, relay.id, 'replied', requester, (0, relay_session_ref_1.resolveRelaySession)(db, relay.to), now);
|
|
500
537
|
}
|
|
501
|
-
|
|
538
|
+
else if (kind === 'prompt') {
|
|
539
|
+
(0, relay_system_line_1.writeRelaySystemLine)(db, relay.id, 'waiting', requester, (0, relay_session_ref_1.resolveRelaySession)(db, relay.to), now);
|
|
540
|
+
}
|
|
541
|
+
(0, relay_db_1.clearRelayPending)(db, relay.id, now);
|
|
542
|
+
logger.info('relay-delivered', { relayId, kind, to: `${requester.worktreeId}/${requester.instanceId}` });
|
|
543
|
+
return 'delivered';
|
|
502
544
|
}
|
|
503
|
-
|
|
504
|
-
|
|
545
|
+
finally {
|
|
546
|
+
// Delivered: a reply is closed now and a prompt notice leaves the relay
|
|
547
|
+
// open on purpose, so either way a later cancel must be judged by the row.
|
|
548
|
+
// Held or failed: nothing reached A, so the relay can be withdrawn again.
|
|
549
|
+
(0, relay_delivery_claims_1.releaseRelayDelivery)(relayId);
|
|
505
550
|
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
551
|
+
}
|
|
552
|
+
/** The payload this relay carries right now, read straight from the ledger. */
|
|
553
|
+
function findCurrentPayload(db, relayId) {
|
|
554
|
+
return (0, relay_db_1.listRelaysWithPendingPayload)(db).find((item) => item.relay.id === relayId) ?? null;
|
|
509
555
|
}
|
|
510
556
|
/**
|
|
511
557
|
* Deliver every stashed payload that can be delivered now.
|
|
@@ -209,6 +209,8 @@ function getManagerState() {
|
|
|
209
209
|
initialized: false,
|
|
210
210
|
isSyncing: false,
|
|
211
211
|
cmateFileCache: new Map(),
|
|
212
|
+
generation: 0,
|
|
213
|
+
worktreeStopCounts: new Map(),
|
|
212
214
|
}));
|
|
213
215
|
}
|
|
214
216
|
// =============================================================================
|
|
@@ -251,6 +253,10 @@ async function syncSchedules() {
|
|
|
251
253
|
return;
|
|
252
254
|
manager.isSyncing = true;
|
|
253
255
|
try {
|
|
256
|
+
// Issue #3735: remember what had been stopped when this pass began, so that
|
|
257
|
+
// a stop landing during the readCmateFile() await is noticed afterwards.
|
|
258
|
+
const startGeneration = manager.generation ?? 0;
|
|
259
|
+
const startStopCounts = new Map(manager.worktreeStopCounts);
|
|
254
260
|
const worktrees = (0, cron_parser_1.getAllWorktrees)();
|
|
255
261
|
// Track which scheduleIds are still valid
|
|
256
262
|
const activeScheduleIds = new Set();
|
|
@@ -300,7 +306,26 @@ async function syncSchedules() {
|
|
|
300
306
|
continue;
|
|
301
307
|
const entries = (0, cmate_parser_1.parseSchedulesSection)(scheduleRows);
|
|
302
308
|
// Issue #409: Batch upsert all entries for this worktree
|
|
309
|
+
// (Issue #3735: deliberately not gated — a row for a stopped worktree is
|
|
310
|
+
// fixed by the FK CASCADE or the next sync's disableStaleSchedules())
|
|
303
311
|
const scheduleIds = (0, cron_parser_1.batchUpsertSchedules)(worktree.id, entries);
|
|
312
|
+
// Issue #3735: no await below, so this synchronous check covers every
|
|
313
|
+
// cron created, replaced or recovered for this worktree.
|
|
314
|
+
if ((manager.generation ?? 0) !== startGeneration) {
|
|
315
|
+
// stopAllSchedules() ran. Abandon the pass entirely: the stale-removal
|
|
316
|
+
// step below would otherwise judge schedules of a restarted manager
|
|
317
|
+
// against this pass's partial activeScheduleIds.
|
|
318
|
+
manager.cmateFileCache.delete(worktree.path);
|
|
319
|
+
logger.info('sync:aborted-by-stop-all', { worktreeId: worktree.id });
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
if ((manager.worktreeStopCounts?.get(worktree.id) ?? 0) !== (startStopCounts.get(worktree.id) ?? 0)) {
|
|
323
|
+
// The mtime cache was set before the await; drop it so a worktree
|
|
324
|
+
// that still exists is picked up by the next pass.
|
|
325
|
+
manager.cmateFileCache.delete(worktree.path);
|
|
326
|
+
logger.info('sync:skipped-stopped-worktree', { worktreeId: worktree.id });
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
304
329
|
for (let i = 0; i < entries.length; i++) {
|
|
305
330
|
const entry = entries[i];
|
|
306
331
|
const scheduleId = scheduleIds[i];
|
|
@@ -472,6 +497,7 @@ function stopAllSchedules() {
|
|
|
472
497
|
}
|
|
473
498
|
}
|
|
474
499
|
manager.schedules.clear();
|
|
500
|
+
manager.generation = (manager.generation ?? 0) + 1;
|
|
475
501
|
// DR1-008: Clear mtime cache to prevent stale values from causing
|
|
476
502
|
// incorrect skip decisions on next initScheduleManager() call
|
|
477
503
|
manager.cmateFileCache.clear();
|
|
@@ -504,6 +530,8 @@ function stopAllSchedules() {
|
|
|
504
530
|
*/
|
|
505
531
|
function stopScheduleForWorktree(worktreeId) {
|
|
506
532
|
const manager = getManagerState();
|
|
533
|
+
const stopCounts = (manager.worktreeStopCounts ??= new Map());
|
|
534
|
+
stopCounts.set(worktreeId, (stopCounts.get(worktreeId) ?? 0) + 1);
|
|
507
535
|
// Stop and remove cron jobs for the target worktree
|
|
508
536
|
for (const [scheduleId, state] of manager.schedules) {
|
|
509
537
|
if (state.worktreeId === worktreeId) {
|
|
@@ -16,6 +16,8 @@ exports.isSessionRunning = isSessionRunning;
|
|
|
16
16
|
exports.getSessionPresence = getSessionPresence;
|
|
17
17
|
exports.captureSessionOutput = captureSessionOutput;
|
|
18
18
|
exports.captureSessionOutputFresh = captureSessionOutputFresh;
|
|
19
|
+
exports.sendSessionAnswerKey = sendSessionAnswerKey;
|
|
20
|
+
exports.readSessionPaneCommand = readSessionPaneCommand;
|
|
19
21
|
exports.getSessionName = getSessionName;
|
|
20
22
|
exports.publishSessionSurface = publishSessionSurface;
|
|
21
23
|
exports.forgetSessionSurface = forgetSessionSurface;
|
|
@@ -115,7 +117,8 @@ async function captureSessionOutput(worktreeId, cliToolId, lines = 1000, instanc
|
|
|
115
117
|
* Capture CLI session output bypassing cache (fresh capture).
|
|
116
118
|
*
|
|
117
119
|
* Issue #405: Used by prompt-response endpoint to ensure fresh output
|
|
118
|
-
* for prompt re-verification. Writes back to cache on success
|
|
120
|
+
* for prompt re-verification. Writes back to cache on success, unless the
|
|
121
|
+
* session was invalidated while the capture was in flight (Issue #3734).
|
|
119
122
|
*
|
|
120
123
|
* @param worktreeId - Worktree ID
|
|
121
124
|
* @param cliToolId - CLI tool ID
|
|
@@ -127,11 +130,16 @@ async function captureSessionOutputFresh(worktreeId, cliToolId, lines = 5000, in
|
|
|
127
130
|
log.debug('captureSessionOutputFresh:start', { requestedLines: lines });
|
|
128
131
|
const { cliTool, sessionName } = resolveSessionContext(worktreeId, cliToolId, instanceId);
|
|
129
132
|
const transport = getDefaultTransport();
|
|
133
|
+
// Issue #3734: snapshot the generation before the capture starts
|
|
134
|
+
const generation = (0, tmux_capture_cache_1.getCaptureGeneration)(sessionName);
|
|
130
135
|
try {
|
|
131
136
|
const output = await transport.captureSnapshot(sessionName, { startLine: -lines });
|
|
132
|
-
// Write back to cache if non-empty [SEC4-007]
|
|
137
|
+
// Write back to cache if non-empty [SEC4-007]. Skip it when the session was
|
|
138
|
+
// invalidated while waiting: the output may predate a send (Issue #3734).
|
|
133
139
|
if (output.length > 0) {
|
|
134
|
-
(0, tmux_capture_cache_1.
|
|
140
|
+
if ((0, tmux_capture_cache_1.isCaptureGenerationCurrent)(sessionName, generation)) {
|
|
141
|
+
(0, tmux_capture_cache_1.setCachedCapture)(sessionName, output, lines);
|
|
142
|
+
}
|
|
135
143
|
}
|
|
136
144
|
else {
|
|
137
145
|
(0, tmux_capture_cache_1.invalidateCache)(sessionName);
|
|
@@ -146,6 +154,33 @@ async function captureSessionOutputFresh(worktreeId, cliToolId, lines = 5000, in
|
|
|
146
154
|
throw new Error(`Failed to capture ${cliTool.name} output: ${errorMessage}`);
|
|
147
155
|
}
|
|
148
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* Send ONE answer key to a session and drop its cached capture, so the next
|
|
159
|
+
* read is of the pane after the key (Issue #3756). One key per call: the
|
|
160
|
+
* strict `respond` reads the screen again between two keys.
|
|
161
|
+
*/
|
|
162
|
+
async function sendSessionAnswerKey(worktreeId, cliToolId, key, instanceId) {
|
|
163
|
+
if (key !== 'Up' && key !== 'Down' && key !== 'Enter') {
|
|
164
|
+
throw new Error(`Unsupported answer key: ${String(key)}`);
|
|
165
|
+
}
|
|
166
|
+
const { sessionName } = resolveSessionContext(worktreeId, cliToolId, instanceId);
|
|
167
|
+
try {
|
|
168
|
+
await (0, tmux_1.sendSpecialKeys)(sessionName, [key]);
|
|
169
|
+
}
|
|
170
|
+
finally {
|
|
171
|
+
(0, tmux_capture_cache_1.invalidateCache)(sessionName);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* The foreground command of a session's pane (`#{pane_current_command}`), or
|
|
176
|
+
* null when tmux cannot say (Issue #3788). The strict `respond` reads it after
|
|
177
|
+
* its Enter: agy exits on the trust screen's `No, exit` and leaves the shell in
|
|
178
|
+
* a pane that is still up, which only this tells apart from an unread screen.
|
|
179
|
+
*/
|
|
180
|
+
async function readSessionPaneCommand(worktreeId, cliToolId, instanceId) {
|
|
181
|
+
const { sessionName } = resolveSessionContext(worktreeId, cliToolId, instanceId);
|
|
182
|
+
return (0, tmux_1.getPaneCurrentCommand)(sessionName);
|
|
183
|
+
}
|
|
149
184
|
/**
|
|
150
185
|
* Get session name for a CLI tool and worktree
|
|
151
186
|
*
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The last send attempt per instance (Issue #3759).
|
|
4
|
+
*
|
|
5
|
+
* When the first message of a session did not arrive (#3746:
|
|
6
|
+
* `Antigravity prompt not ready`), nothing said whether it was still to be
|
|
7
|
+
* sent, already on the pane, or somewhere in between. This module keeps, per
|
|
8
|
+
* (worktree, tool, instance), how the last {@link sendUserMessage} attempt
|
|
9
|
+
* ended — `not-sent` / `sent` / `indeterminate` (`./send-attempt-types`) — and
|
|
10
|
+
* `prompt --json` publishes it as `lastSend`.
|
|
11
|
+
*
|
|
12
|
+
* The record carries a digest of the message, never the message: it says which
|
|
13
|
+
* message the state is about without keeping what was written.
|
|
14
|
+
*
|
|
15
|
+
* Nothing here resends. The sender (a person, or the supervising agent) decides,
|
|
16
|
+
* and an `indeterminate` message is not to be resent before looking at the pane.
|
|
17
|
+
*
|
|
18
|
+
* In memory on `globalThis` (the send route and the observing route are bundled
|
|
19
|
+
* apart under `next dev`), bounded; a restart forgets every record, which
|
|
20
|
+
* publishes as "no record", never as a state.
|
|
21
|
+
*
|
|
22
|
+
* Recording must never change a send's outcome: {@link recordSendAttempt}
|
|
23
|
+
* swallows its own failures.
|
|
24
|
+
*
|
|
25
|
+
* @module lib/session/send-attempt-state
|
|
26
|
+
*/
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.sendMessageDigest = sendMessageDigest;
|
|
29
|
+
exports.recordSendAttempt = recordSendAttempt;
|
|
30
|
+
exports.getLastSendAttempt = getLastSendAttempt;
|
|
31
|
+
exports.clearSendAttempts = clearSendAttempts;
|
|
32
|
+
exports.classifySendFailure = classifySendFailure;
|
|
33
|
+
exports.composerHoldsMessage = composerHoldsMessage;
|
|
34
|
+
exports.describeSendAttemptState = describeSendAttemptState;
|
|
35
|
+
const crypto_1 = require("crypto");
|
|
36
|
+
const global_state_1 = require("../../lib/global-state");
|
|
37
|
+
const logger_1 = require("../../lib/logger");
|
|
38
|
+
const session_start_error_1 = require("../../lib/session/session-start-error");
|
|
39
|
+
const send_attempt_types_1 = require("./send-attempt-types");
|
|
40
|
+
const logger = (0, logger_1.createLogger)('session/send-attempt-state');
|
|
41
|
+
/** How many instances are tracked at once; the least recently sent to is forgotten first. */
|
|
42
|
+
const MAX_TRACKED_INSTANCES = 1024;
|
|
43
|
+
const records = (0, global_state_1.getOrInitGlobal)('__sendAttemptRecords', () => new Map());
|
|
44
|
+
function keyOf(instance) {
|
|
45
|
+
return JSON.stringify([instance.worktreeId, instance.cliToolId, instance.instanceId]);
|
|
46
|
+
}
|
|
47
|
+
/** The digest a record carries for `content`. */
|
|
48
|
+
function sendMessageDigest(content) {
|
|
49
|
+
return (0, crypto_1.createHash)('sha256').update(content, 'utf8').digest('hex').slice(0, 16);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Record how a send attempt ended. Never throws: a record that cannot be made
|
|
53
|
+
* leaves the send exactly as it was.
|
|
54
|
+
*/
|
|
55
|
+
function recordSendAttempt(instance, attempt, now = Date.now()) {
|
|
56
|
+
try {
|
|
57
|
+
const key = keyOf(instance);
|
|
58
|
+
// Re-inserted, so the map's order is least recently sent to first.
|
|
59
|
+
records.delete(key);
|
|
60
|
+
records.set(key, {
|
|
61
|
+
at: Math.floor(now),
|
|
62
|
+
state: attempt.state,
|
|
63
|
+
reason: attempt.reason,
|
|
64
|
+
messageDigest: sendMessageDigest(attempt.content),
|
|
65
|
+
});
|
|
66
|
+
while (records.size > MAX_TRACKED_INSTANCES) {
|
|
67
|
+
const oldest = records.keys().next().value;
|
|
68
|
+
if (oldest === undefined)
|
|
69
|
+
break;
|
|
70
|
+
records.delete(oldest);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
logger.warn('send-attempt-record-failed', { error: error instanceof Error ? error.message : String(error) });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/** The instance's last recorded attempt, or null when none is held. */
|
|
78
|
+
function getLastSendAttempt(instance) {
|
|
79
|
+
return records.get(keyOf(instance)) ?? null;
|
|
80
|
+
}
|
|
81
|
+
/** Forget every record (tests). */
|
|
82
|
+
function clearSendAttempts() {
|
|
83
|
+
records.clear();
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Where a failed `ICLITool.sendMessage` stopped, read from its error.
|
|
87
|
+
*
|
|
88
|
+
* Only failures whose wording says the body was never typed are `not-sent`;
|
|
89
|
+
* every other failure is `indeterminate`, because "we do not know" must never
|
|
90
|
+
* read as "safe to resend". The tools wrap these messages
|
|
91
|
+
* (`Failed to send message to <tool>: …`), so they are matched anywhere in it.
|
|
92
|
+
*/
|
|
93
|
+
function classifySendFailure(error) {
|
|
94
|
+
if (typeof error === 'object' &&
|
|
95
|
+
error !== null &&
|
|
96
|
+
error.code === session_start_error_1.SESSION_STARTING_CODE) {
|
|
97
|
+
return { state: 'not-sent', reason: 'session-starting' };
|
|
98
|
+
}
|
|
99
|
+
// #3772: the plan review overlay refused the send before the body was typed.
|
|
100
|
+
if (typeof error === 'object' &&
|
|
101
|
+
error !== null &&
|
|
102
|
+
error.code === send_attempt_types_1.PLAN_REVIEW_SEND_REFUSED_CODE) {
|
|
103
|
+
return { state: 'not-sent', reason: 'plan-review' };
|
|
104
|
+
}
|
|
105
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
106
|
+
// The readiness waits of every tool throw before typing anything.
|
|
107
|
+
if (/prompt not ready/i.test(message))
|
|
108
|
+
return { state: 'not-sent', reason: 'prompt-not-ready' };
|
|
109
|
+
// #1880: refused before the body, after only the clear keys (C-e / C-u).
|
|
110
|
+
if (/still holds unsent text after \d+ clear passes/.test(message)) {
|
|
111
|
+
return { state: 'not-sent', reason: 'composer-not-empty' };
|
|
112
|
+
}
|
|
113
|
+
// #2464 / #3366: typed, never submitted, taken back out best-effort.
|
|
114
|
+
if (/Enter was not pressed, so nothing was submitted/.test(message)) {
|
|
115
|
+
return { state: 'indeterminate', reason: 'body-not-landed' };
|
|
116
|
+
}
|
|
117
|
+
// #1501: the input line was cleared best-effort.
|
|
118
|
+
if (/replaced by a TUI autocompletion/.test(message)) {
|
|
119
|
+
return { state: 'indeterminate', reason: 'replaced-by-completion' };
|
|
120
|
+
}
|
|
121
|
+
// #1471: typed, Enter sent (more than once), never confirmed.
|
|
122
|
+
if (/submit could not be confirmed/i.test(message)) {
|
|
123
|
+
return { state: 'indeterminate', reason: 'submit-unconfirmed' };
|
|
124
|
+
}
|
|
125
|
+
return { state: 'indeterminate', reason: 'send-error' };
|
|
126
|
+
}
|
|
127
|
+
/** The whitespace-free form two renderings of one text share. */
|
|
128
|
+
function compact(text) {
|
|
129
|
+
return text.replace(/\s+/g, '');
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Whether a composer read (`extractComposerText(...).text`) still holds the
|
|
133
|
+
* message: its compacted text contains the compacted start of the message's
|
|
134
|
+
* first non-blank line. Only the start, because a long body is cut by the
|
|
135
|
+
* reader and wrapped by the TUI.
|
|
136
|
+
*/
|
|
137
|
+
function composerHoldsMessage(composerText, content) {
|
|
138
|
+
const firstLine = content.split('\n').find((line) => line.trim() !== '') ?? '';
|
|
139
|
+
const needle = compact(firstLine).slice(0, 32);
|
|
140
|
+
return needle !== '' && compact(composerText).includes(needle);
|
|
141
|
+
}
|
|
142
|
+
/** One line for a failed send's error: what state the message is in, and who resends it. */
|
|
143
|
+
function describeSendAttemptState(attempt) {
|
|
144
|
+
if (attempt.state === 'not-sent') {
|
|
145
|
+
return (`[send state: not-sent (${attempt.reason}): the message was not typed. ` +
|
|
146
|
+
'CommandMate does not resend it; send it again once the input prompt is back ' +
|
|
147
|
+
'(`commandmate prompt <worktree-id> --json` shows the screen and lastSend).]');
|
|
148
|
+
}
|
|
149
|
+
if (attempt.state === 'indeterminate') {
|
|
150
|
+
return (`[send state: indeterminate (${attempt.reason}): part of the message may have been typed or submitted. ` +
|
|
151
|
+
'CommandMate does not resend it; do not resend before checking the pane ' +
|
|
152
|
+
'(`commandmate capture <worktree-id> --pane`), or it may arrive twice.]');
|
|
153
|
+
}
|
|
154
|
+
return `[send state: sent (${attempt.reason})]`;
|
|
155
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* What the last send to an instance did to its pane (Issue #3759): types only.
|
|
4
|
+
*
|
|
5
|
+
* Kept free of imports so the CLI can read the payload's shape through
|
|
6
|
+
* `lib/prompt-observation/types` without pulling the server graph in (the same
|
|
7
|
+
* rule `polling/auto-yes-suppression-reason` follows).
|
|
8
|
+
*
|
|
9
|
+
* @module lib/session/send-attempt-types
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PLAN_REVIEW_SEND_REFUSED_CODE = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* `code` on the error a tool throws when a plan review overlay refuses the
|
|
15
|
+
* send before any body is typed (Issue #3772). Matched by code, never by wording.
|
|
16
|
+
*/
|
|
17
|
+
exports.PLAN_REVIEW_SEND_REFUSED_CODE = 'PLAN_REVIEW_SEND_REFUSED';
|