commandmate 0.49.1 → 0.49.2
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 +128 -132
- package/.next/app-path-routes-manifest.json +22 -22
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +12 -12
- package/.next/required-server-files.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/release-notes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/capabilities/route.js +1 -1
- package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/subscriptions/route.js +1 -1
- package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/vapid/route_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/[relayId]/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.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/route.js +1 -1
- package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-reference/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/env/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/notes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js +2 -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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js.nft.json +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 +2 -2
- package/.next/server/app/api/worktrees/[id]/logs/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/diff/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +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_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_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 +2 -2
- package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -3
- 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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route.js +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.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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/more/page_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.js +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/page.js +2 -2
- 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 -22
- package/.next/server/chunks/1062.js +1 -0
- package/.next/server/chunks/110.js +1 -0
- package/.next/server/chunks/1501.js +5 -4
- package/.next/server/chunks/1656.js +2 -2
- package/.next/server/chunks/1957.js +2 -0
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/2897.js +1 -0
- package/.next/server/chunks/3417.js +1 -0
- package/.next/server/chunks/3505.js +1 -1
- package/.next/server/chunks/3756.js +1 -0
- package/.next/server/chunks/3801.js +3 -3
- package/.next/server/chunks/4911.js +1 -0
- package/.next/server/chunks/4936.js +1 -0
- package/.next/server/chunks/5209.js +2 -1
- package/.next/server/chunks/5354.js +1 -1
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/6401.js +1 -1
- package/.next/server/chunks/7023.js +2 -2
- package/.next/server/chunks/7905.js +1 -1
- package/.next/server/chunks/8581.js +15 -15
- package/.next/server/chunks/8728.js +2 -2
- package/.next/server/chunks/8782.js +1 -1
- package/.next/server/chunks/9390.js +1 -1
- package/.next/server/chunks/9584.js +1 -1
- package/.next/server/chunks/9731.js +2 -2
- 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-675ba6b21844dc3b.js → 2407-07a237575e1ceb9e.js} +1 -1
- package/.next/static/chunks/3931-61ad1a4fc0208d0e.js +1 -0
- package/.next/static/chunks/5794-7975b8e51e731b19.js +1 -0
- package/.next/static/chunks/6966-d8dc6032410ffaba.js +1 -0
- package/.next/static/chunks/7197-ed3b3d99ac3bd450.js +1 -0
- package/.next/static/chunks/7636-a48cf0f7110250c5.js +1 -0
- package/.next/static/chunks/app/layout-4f64316957b0a8e5.js +1 -0
- package/.next/static/chunks/app/more/page-ff5af5ca48774c89.js +1 -0
- package/.next/static/chunks/app/page-b4863bfe0452e09d.js +1 -0
- package/.next/static/chunks/app/review/page-ff3efb96fdf9bb4b.js +1 -0
- package/.next/static/chunks/app/sessions/{page-890fd50ec9739973.js → page-c6eb7c02db2f4c80.js} +1 -1
- package/.next/static/chunks/app/worktrees/[id]/{page-f6d3ab8185d93aae.js → page-33afc6aa96289fb0.js} +1 -1
- package/.next/trace +13 -13
- package/dist/cli/commands/ask.d.ts.map +1 -1
- package/dist/cli/commands/ask.js +56 -5
- package/dist/cli/commands/attach.d.ts +4 -1
- package/dist/cli/commands/attach.d.ts.map +1 -1
- package/dist/cli/commands/attach.js +19 -7
- package/dist/cli/commands/command-target.d.ts +7 -0
- package/dist/cli/commands/command-target.d.ts.map +1 -1
- package/dist/cli/commands/command-target.js +10 -0
- package/dist/cli/commands/instances.d.ts.map +1 -1
- package/dist/cli/commands/instances.js +38 -2
- package/dist/cli/commands/message-dispatch.d.ts +17 -3
- package/dist/cli/commands/message-dispatch.d.ts.map +1 -1
- package/dist/cli/commands/message-dispatch.js +14 -8
- package/dist/cli/commands/relays.d.ts +2 -1
- package/dist/cli/commands/relays.d.ts.map +1 -1
- package/dist/cli/commands/relays.js +4 -3
- package/dist/cli/commands/respond-strict.d.ts.map +1 -1
- package/dist/cli/commands/respond-strict.js +22 -5
- package/dist/cli/commands/respond.d.ts +2 -2
- package/dist/cli/commands/respond.d.ts.map +1 -1
- package/dist/cli/commands/respond.js +40 -37
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +8 -4
- package/dist/cli/commands/wait-instance.d.ts +9 -1
- package/dist/cli/commands/wait-instance.d.ts.map +1 -1
- package/dist/cli/commands/wait-instance.js +15 -0
- package/dist/cli/commands/wait-poll-state.d.ts +18 -0
- package/dist/cli/commands/wait-poll-state.d.ts.map +1 -1
- package/dist/cli/commands/wait-verify.d.ts +2 -1
- package/dist/cli/commands/wait-verify.d.ts.map +1 -1
- package/dist/cli/commands/wait-verify.js +5 -1
- package/dist/cli/commands/wait.d.ts.map +1 -1
- package/dist/cli/commands/wait.js +37 -13
- package/dist/cli/commands/whoami.d.ts.map +1 -1
- package/dist/cli/commands/whoami.js +3 -1
- 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 +1 -0
- package/dist/cli/types/api-responses.d.ts +3 -1
- package/dist/cli/types/api-responses.d.ts.map +1 -1
- package/dist/cli/utils/api-client.d.ts +55 -1
- package/dist/cli/utils/api-client.d.ts.map +1 -1
- package/dist/cli/utils/api-client.js +220 -18
- package/dist/cli/utils/follow-up-command.d.ts +38 -0
- package/dist/cli/utils/follow-up-command.d.ts.map +1 -0
- package/dist/cli/utils/follow-up-command.js +57 -0
- package/dist/cli/utils/reply-ledger.d.ts +1 -1
- package/dist/cli/utils/reply-ledger.d.ts.map +1 -1
- package/dist/cli/utils/reply-ledger.js +7 -2
- package/dist/cli/utils/server-capabilities.d.ts +18 -0
- package/dist/cli/utils/server-capabilities.d.ts.map +1 -1
- package/dist/cli/utils/server-capabilities.js +36 -3
- package/dist/cli/utils/session-target.d.ts +1 -1
- package/dist/cli/utils/session-target.d.ts.map +1 -1
- package/dist/cli/utils/session-target.js +3 -0
- package/dist/cli/utils/verify-runner.d.ts +7 -0
- package/dist/cli/utils/verify-runner.d.ts.map +1 -1
- package/dist/cli/utils/verify-runner.js +51 -15
- package/dist/lib/cli-tools/session-name.d.ts.map +1 -1
- package/dist/lib/cli-tools/session-name.js +11 -3
- package/dist/lib/session/send-attempt-types.d.ts +25 -0
- package/dist/lib/session/send-attempt-types.d.ts.map +1 -1
- package/dist/lib/session/send-attempt-types.js +10 -1
- package/dist/lib/verification/session-kill-ledger.d.ts +110 -0
- package/dist/lib/verification/session-kill-ledger.d.ts.map +1 -0
- package/dist/lib/verification/session-kill-ledger.js +174 -0
- package/dist/server/locales/en/worktree.json +2 -0
- package/dist/server/locales/ja/worktree.json +2 -0
- package/dist/server/src/config/cli-tool-timing-config.js +1 -7
- package/dist/server/src/lib/auto-yes-poller.js +5 -1
- package/dist/server/src/lib/cli-tools/antigravity.js +5 -2
- package/dist/server/src/lib/cli-tools/base.js +39 -0
- package/dist/server/src/lib/cli-tools/codex.js +7 -4
- package/dist/server/src/lib/cli-tools/command-code.js +7 -3
- package/dist/server/src/lib/cli-tools/copilot.js +5 -3
- package/dist/server/src/lib/cli-tools/gemini.js +10 -2
- package/dist/server/src/lib/cli-tools/launch-keys.js +39 -0
- package/dist/server/src/lib/cli-tools/opencode-v2.js +6 -2
- package/dist/server/src/lib/cli-tools/opencode.js +5 -2
- package/dist/server/src/lib/cli-tools/session-name.js +11 -3
- package/dist/server/src/lib/cli-tools/submit-composer-read.js +16 -6
- package/dist/server/src/lib/cli-tools/submit-verified-sender.js +164 -7
- package/dist/server/src/lib/cli-tools/vibe-local.js +4 -2
- package/dist/server/src/lib/db/db-migration-path.js +63 -2
- package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +5 -4
- package/dist/server/src/lib/hooks/sources/copilot/hook-settings.js +2 -3
- package/dist/server/src/lib/prompt-answer-errors.js +76 -2
- package/dist/server/src/lib/session/agent-event-state.js +4 -0
- package/dist/server/src/lib/session/agent-session-lifecycle.js +6 -1
- package/dist/server/src/lib/session/claude-session.js +22 -6
- package/dist/server/src/lib/session/current-output-builder.js +5 -3
- package/dist/server/src/lib/session/current-output-history-writers.js +1 -1
- package/dist/server/src/lib/session/prompt-submit-receipt.js +155 -0
- package/dist/server/src/lib/session/prompt-waiting-guard.js +10 -3
- package/dist/server/src/lib/session/send-attempt-state.js +48 -0
- package/dist/server/src/lib/session/send-attempt-types.js +10 -1
- package/dist/server/src/lib/session/send-user-message.js +5 -4
- package/dist/server/src/lib/session/session-launch-flight.js +243 -0
- package/dist/server/src/lib/session/session-starting-state.js +40 -4
- package/dist/server/src/lib/session/structured-prompt.js +12 -9
- package/dist/server/src/lib/session/waiting-episode-binding.js +4 -2
- package/dist/server/src/lib/session-cleanup.js +32 -0
- package/dist/server/src/lib/session-key-sender.js +0 -27
- package/dist/server/src/lib/verification/env-clean-gate.js +129 -0
- package/dist/server/src/lib/verification/env-snapshot.js +11 -2
- package/dist/server/src/lib/verification/session-kill-ledger.js +174 -0
- package/package.json +5 -1
- package/release-notes/0.49.2.json +49 -0
- package/.next/server/chunks/3773.js +0 -1
- package/.next/server/chunks/5775.js +0 -1
- package/.next/server/chunks/7604.js +0 -2
- package/.next/static/chunks/3931-1a1abab16248f14d.js +0 -1
- package/.next/static/chunks/4768-ad6f82f034f21eae.js +0 -1
- package/.next/static/chunks/5794-80ac3f06f098ea29.js +0 -1
- package/.next/static/chunks/6654-f3534f35f16644bc.js +0 -1
- package/.next/static/chunks/7665-e9ef6e0a85b9fa49.js +0 -1
- package/.next/static/chunks/8606-ce17ffa77f39608e.js +0 -1
- package/.next/static/chunks/app/layout-8bfac4724277b47f.js +0 -1
- package/.next/static/chunks/app/more/page-87c84987b2765213.js +0 -1
- package/.next/static/chunks/app/page-1b820c421db48c2c.js +0 -1
- package/.next/static/chunks/app/review/page-e2fd4a590646a2d8.js +0 -1
- /package/.next/static/{fqfSDqQMweROeHUzOt_m1 → yGatWDsS532awSs51kXyd}/_buildManifest.js +0 -0
- /package/.next/static/{fqfSDqQMweROeHUzOt_m1 → yGatWDsS532awSs51kXyd}/_ssgManifest.js +0 -0
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* @module cli/utils/verify-runner
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.MAX_PRINTED_LOG_TAIL_LINES = exports.GATE_NOTICE_LOG_PREFIX = exports.FLAKY_GATE_LABEL = exports.FLAKY_LOG_PREFIX = exports.TIMING_LOG_PREFIX = exports.MUTEX_LOG_PREFIX = exports.WORK_EVIDENCE_GATE_ID = exports.VERIFY_POLL_INTERVAL_MS = void 0;
|
|
15
|
+
exports.MAX_PRINTED_LOG_TAIL_LINES = exports.GATE_NOTICE_LOG_PREFIX = exports.FLAKY_GATE_LABEL = exports.FLAKY_LOG_PREFIX = exports.TIMING_LOG_PREFIX = exports.MUTEX_LOG_PREFIX = exports.WORK_EVIDENCE_GATE_ID = exports.VERIFY_FINAL_READ_GRACE_MS = exports.VERIFY_POLL_INTERVAL_MS = void 0;
|
|
16
16
|
exports.parseTimingMarker = parseTimingMarker;
|
|
17
17
|
exports.formatGateTiming = formatGateTiming;
|
|
18
18
|
exports.parseFlakyMarker = parseFlakyMarker;
|
|
@@ -24,6 +24,13 @@ const types_1 = require("../types");
|
|
|
24
24
|
const api_client_1 = require("./api-client");
|
|
25
25
|
/** Matches the wait command's cadence; runs are minutes long, not seconds. */
|
|
26
26
|
exports.VERIFY_POLL_INTERVAL_MS = 5000;
|
|
27
|
+
/**
|
|
28
|
+
* Issue #3983: how far past `--timeout` the read taken AT the deadline may run.
|
|
29
|
+
* The poll sleeps only up to the deadline and reads once more there, so a run
|
|
30
|
+
* that finished in the last interval still reports its verdict (#1544); this
|
|
31
|
+
* bounds that one read rather than skipping it.
|
|
32
|
+
*/
|
|
33
|
+
exports.VERIFY_FINAL_READ_GRACE_MS = 2000;
|
|
27
34
|
/** Built-in gate id; mirrors WORK_EVIDENCE_GATE_ID in lib/verification/gate-runner.ts. */
|
|
28
35
|
exports.WORK_EVIDENCE_GATE_ID = 'work-evidence';
|
|
29
36
|
/**
|
|
@@ -367,9 +374,21 @@ function withConflictMessage(error, worktreeId) {
|
|
|
367
374
|
*/
|
|
368
375
|
async function runVerification(client, request) {
|
|
369
376
|
const { worktreeId } = request;
|
|
377
|
+
// Issue #3983: `timeoutSec` bounds the whole command — the start POST and
|
|
378
|
+
// every run read, each cut at the deadline — not only the gaps between polls.
|
|
379
|
+
// The one read taken at the deadline gets VERIFY_FINAL_READ_GRACE_MS on top.
|
|
380
|
+
const startedAt = Date.now();
|
|
381
|
+
const deadlineAt = request.timeoutSec ? startedAt + request.timeoutSec * 1000 : undefined;
|
|
382
|
+
const bounded = deadlineAt === undefined ? client : client.withDeadline(deadlineAt);
|
|
383
|
+
const finalReader = deadlineAt === undefined ? client : client.withDeadline(deadlineAt + exports.VERIFY_FINAL_READ_GRACE_MS);
|
|
384
|
+
const timedOut = (detail) => {
|
|
385
|
+
console.error(`Timeout: verification of ${worktreeId} exceeded ${request.timeoutSec}s (${detail})`);
|
|
386
|
+
return { exitCode: types_1.VerifyExitCode.TIMEOUT, run: lastRun };
|
|
387
|
+
};
|
|
388
|
+
let lastRun;
|
|
370
389
|
let runId;
|
|
371
390
|
try {
|
|
372
|
-
const started = await
|
|
391
|
+
const started = await bounded.post(`/api/worktrees/${worktreeId}/verify`, {
|
|
373
392
|
trigger: request.trigger,
|
|
374
393
|
instanceId: request.instanceId,
|
|
375
394
|
gateIds: request.gateIds,
|
|
@@ -378,15 +397,30 @@ async function runVerification(client, request) {
|
|
|
378
397
|
runId = (0, api_client_1.assertResponseShape)(started, ['runId'], `POST /api/worktrees/${worktreeId}/verify`).runId;
|
|
379
398
|
}
|
|
380
399
|
catch (error) {
|
|
400
|
+
if ((0, api_client_1.isDeadlineExceeded)(error)) {
|
|
401
|
+
return timedOut('the server did not answer the start request; a run may have started server-side');
|
|
402
|
+
}
|
|
381
403
|
throw withConflictMessage(error, worktreeId);
|
|
382
404
|
}
|
|
383
405
|
console.error(`Verifying: ${worktreeId} (run ${runId})`);
|
|
384
|
-
const startedAt = Date.now();
|
|
385
406
|
const reported = new Set();
|
|
386
407
|
const runPath = `/api/worktrees/${worktreeId}/verify/runs/${runId}`;
|
|
387
|
-
|
|
408
|
+
const stillRunning = `run ${runId} is still running server-side`;
|
|
409
|
+
let finalRead = false;
|
|
388
410
|
while (true) {
|
|
389
|
-
|
|
411
|
+
let body;
|
|
412
|
+
try {
|
|
413
|
+
// A read that starts within the grace of the deadline is read like the
|
|
414
|
+
// last one: started a few ms before it (a non-final sleep ending there),
|
|
415
|
+
// it would otherwise be cut before it could answer.
|
|
416
|
+
const nearDeadline = deadlineAt !== undefined && Date.now() > deadlineAt - exports.VERIFY_FINAL_READ_GRACE_MS;
|
|
417
|
+
body = await (finalRead || nearDeadline ? finalReader : bounded).get(runPath);
|
|
418
|
+
}
|
|
419
|
+
catch (error) {
|
|
420
|
+
if ((0, api_client_1.isDeadlineExceeded)(error))
|
|
421
|
+
return timedOut(stillRunning);
|
|
422
|
+
throw error;
|
|
423
|
+
}
|
|
390
424
|
const run = (0, api_client_1.assertResponseShape)(body, ['run'], `GET ${runPath}`).run;
|
|
391
425
|
lastRun = run;
|
|
392
426
|
reportGates(run.gates ?? [], reported);
|
|
@@ -400,16 +434,18 @@ async function runVerification(client, request) {
|
|
|
400
434
|
}
|
|
401
435
|
return { exitCode: exitCodeForRunStatus(run.status), run };
|
|
402
436
|
}
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
const elapsed = (Date.now() - startedAt) / 1000;
|
|
407
|
-
if (elapsed >= request.timeoutSec) {
|
|
408
|
-
console.error(`Timeout: verification of ${worktreeId} exceeded ${request.timeoutSec}s ` +
|
|
409
|
-
`(run ${runId} is still running server-side)`);
|
|
410
|
-
return { exitCode: types_1.VerifyExitCode.TIMEOUT, run: lastRun };
|
|
411
|
-
}
|
|
437
|
+
if (deadlineAt === undefined) {
|
|
438
|
+
await sleep(exports.VERIFY_POLL_INTERVAL_MS);
|
|
439
|
+
continue;
|
|
412
440
|
}
|
|
413
|
-
|
|
441
|
+
// Checked after the terminal-status branch so a run that finishes by the
|
|
442
|
+
// deadline still reports its verdict instead of a timeout.
|
|
443
|
+
const remaining = deadlineAt - Date.now();
|
|
444
|
+
if (finalRead || remaining <= 0)
|
|
445
|
+
return timedOut(stillRunning);
|
|
446
|
+
// Issue #3983: never sleep past the deadline. Sleeping the full interval put
|
|
447
|
+
// the last read a few ms after it in real time, and that read was skipped.
|
|
448
|
+
finalRead = remaining <= exports.VERIFY_POLL_INTERVAL_MS;
|
|
449
|
+
await sleep(Math.min(exports.VERIFY_POLL_INTERVAL_MS, remaining));
|
|
414
450
|
}
|
|
415
451
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-name.d.ts","sourceRoot":"","sources":["../../../src/lib/cli-tools/session-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAqC,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAM9E,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB,QAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"session-name.d.ts","sourceRoot":"","sources":["../../../src/lib/cli-tools/session-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAqC,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAM9E,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB,QAAkB,CAAC;AAazD,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,wBAAwB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACzD;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,GAAG,IAAI,CAEzD;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAKxE;AAmBD;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,SAAS,EAAE,WAAW,EACtB,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAGR;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,WAAW,EACtB,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAKR;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,WAAW,EACtB,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAER;AAED,yDAAyD;AACzD,MAAM,WAAW,iBAAiB;IAChC,wDAAwD;IACxD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,WAAW,CAAC;IACvB,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAgBvE"}
|
|
@@ -44,8 +44,16 @@ const legacy_session_alias_1 = require("../tmux/legacy-session-alias");
|
|
|
44
44
|
const SESSION_NAME_PREFIX = 'mcbd-';
|
|
45
45
|
/** Shape of a session-name namespace: 8 lowercase hex digits (Issue #2866). */
|
|
46
46
|
exports.SESSION_NAMESPACE_PATTERN = /^[0-9a-f]{8}$/;
|
|
47
|
-
/**
|
|
48
|
-
|
|
47
|
+
/**
|
|
48
|
+
* CLI tool ids, longest first, so a longer id is never read as a shorter one.
|
|
49
|
+
*
|
|
50
|
+
* Read when called, not when this module loads (Issue #3981): modules loaded
|
|
51
|
+
* early (`session-starting-state`) import this one, and a module-load read of
|
|
52
|
+
* `CLI_TOOL_IDS` reaches a test's getter mock before it can answer.
|
|
53
|
+
*/
|
|
54
|
+
function cliToolIdsLongestFirst() {
|
|
55
|
+
return [...types_1.CLI_TOOL_IDS].sort((a, b) => b.length - a.length);
|
|
56
|
+
}
|
|
49
57
|
/**
|
|
50
58
|
* The namespace this process names its sessions with, or null (legacy names).
|
|
51
59
|
*
|
|
@@ -150,7 +158,7 @@ function parseSessionName(name) {
|
|
|
150
158
|
namespace = body.slice(0, dash);
|
|
151
159
|
body = body.slice(dash + 1);
|
|
152
160
|
}
|
|
153
|
-
const cliToolId =
|
|
161
|
+
const cliToolId = cliToolIdsLongestFirst().find((id) => body.startsWith(`${id}-`));
|
|
154
162
|
if (!cliToolId)
|
|
155
163
|
return null;
|
|
156
164
|
const rest = body.slice(cliToolId.length + 1);
|
|
@@ -54,6 +54,12 @@ export type SendAttemptReason =
|
|
|
54
54
|
| 'relay-reservation-lost'
|
|
55
55
|
/** `not-sent`: the pane could not be re-read under the input lock, so nothing was typed (#3945). */
|
|
56
56
|
| 'recheck-failed'
|
|
57
|
+
/**
|
|
58
|
+
* `not-sent`: a body sent as one paste could not be loaded into the tmux
|
|
59
|
+
* buffer (`load-buffer` failed), so `paste-buffer` never ran and nothing of
|
|
60
|
+
* the body reached the pane (#4011/#4031).
|
|
61
|
+
*/
|
|
62
|
+
| 'paste-not-started'
|
|
57
63
|
/** `indeterminate`: the body was typed, did not land intact, and was taken back out best-effort (#2464/#3366). */
|
|
58
64
|
| 'body-not-landed'
|
|
59
65
|
/** `indeterminate`: an autocompletion replaced the body; the line was cleared best-effort (#1501). */
|
|
@@ -62,6 +68,16 @@ export type SendAttemptReason =
|
|
|
62
68
|
| 'submit-unconfirmed'
|
|
63
69
|
/** `indeterminate`: a read of the composer after the failure still shows the body. */
|
|
64
70
|
| 'composer-residue'
|
|
71
|
+
/**
|
|
72
|
+
* `indeterminate`: the composer did not show the body after Enter, but the
|
|
73
|
+
* agent did not report the session's first prompt either (#4035).
|
|
74
|
+
*/
|
|
75
|
+
| 'prompt-unreported'
|
|
76
|
+
/**
|
|
77
|
+
* `indeterminate`: a send reported `sent`, and the next send found that body
|
|
78
|
+
* still in the composer before typing its own (#4035).
|
|
79
|
+
*/
|
|
80
|
+
| 'found-in-composer'
|
|
65
81
|
/** `indeterminate`: any other failure; where it stopped is not known. */
|
|
66
82
|
| 'send-error';
|
|
67
83
|
/** The last send attempt as `prompt --json` publishes it (`lastSend`). */
|
|
@@ -77,6 +93,15 @@ export interface LastSendAttempt {
|
|
|
77
93
|
* send before any body is typed (Issue #3772). Matched by code, never by wording.
|
|
78
94
|
*/
|
|
79
95
|
export declare const PLAN_REVIEW_SEND_REFUSED_CODE = "PLAN_REVIEW_SEND_REFUSED";
|
|
96
|
+
/**
|
|
97
|
+
* `code` on the error a long body's paste throws when `load-buffer` failed
|
|
98
|
+
* (Issue #4031): `paste-buffer` never ran, so none of the body reached the
|
|
99
|
+
* pane. The tools wrap the error (`Failed to send message to <tool>: …`) with
|
|
100
|
+
* it as `cause`, and the send's outcome is read off that chain by code — the
|
|
101
|
+
* wording is shared with nothing, but a `paste-buffer` failure's is
|
|
102
|
+
* (`Failed to paste message into tmux session`) and that one is not known safe.
|
|
103
|
+
*/
|
|
104
|
+
export declare const PASTE_NOT_STARTED_CODE = "PASTE_NOT_STARTED";
|
|
80
105
|
/**
|
|
81
106
|
* `code` on the errors the input re-check throws before any key
|
|
82
107
|
* (`recheckComposerBeforeInput`, Issue #3952): a dialog was open, or the pane
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-attempt-types.d.ts","sourceRoot":"","sources":["../../../src/lib/session/send-attempt-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,MAAM,GAAG,eAAe,CAAC;AAErE,MAAM,MAAM,iBAAiB;AAC3B,wCAAwC;AACtC,WAAW;AACb,2EAA2E;GACzE,kBAAkB;AACpB,mEAAmE;GACjE,kBAAkB;AACpB,oDAAoD;GAClD,sBAAsB;AACxB,8GAA8G;GAC5G,gBAAgB;AAClB,sEAAsE;GACpE,iBAAiB;AACnB,oEAAoE;GAClE,qBAAqB;AACvB,4EAA4E;GAC1E,oBAAoB;AACtB,qGAAqG;GACnG,aAAa;AACf,gGAAgG;GAC9F,oBAAoB;AACtB,sGAAsG;GACpG,kBAAkB;AACpB,+FAA+F;GAC7F,iBAAiB;AACnB;;;;GAIG;GACD,wBAAwB;AAC1B,oGAAoG;GAClG,gBAAgB;AAClB,kHAAkH;GAChH,iBAAiB;AACnB,sGAAsG;GACpG,wBAAwB;AAC1B,sGAAsG;GACpG,oBAAoB;AACtB,sFAAsF;GACpF,kBAAkB;AACpB,yEAAyE;GACvE,YAAY,CAAC;AAEjB,0EAA0E;AAC1E,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,gBAAgB,CAAC;IACxB,8FAA8F;IAC9F,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAAC;CACpC;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B,6BAA6B,CAAC;AAExE;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,iCAAiC,CAAC;AAChF,eAAO,MAAM,yBAAyB,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"send-attempt-types.d.ts","sourceRoot":"","sources":["../../../src/lib/session/send-attempt-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,MAAM,GAAG,eAAe,CAAC;AAErE,MAAM,MAAM,iBAAiB;AAC3B,wCAAwC;AACtC,WAAW;AACb,2EAA2E;GACzE,kBAAkB;AACpB,mEAAmE;GACjE,kBAAkB;AACpB,oDAAoD;GAClD,sBAAsB;AACxB,8GAA8G;GAC5G,gBAAgB;AAClB,sEAAsE;GACpE,iBAAiB;AACnB,oEAAoE;GAClE,qBAAqB;AACvB,4EAA4E;GAC1E,oBAAoB;AACtB,qGAAqG;GACnG,aAAa;AACf,gGAAgG;GAC9F,oBAAoB;AACtB,sGAAsG;GACpG,kBAAkB;AACpB,+FAA+F;GAC7F,iBAAiB;AACnB;;;;GAIG;GACD,wBAAwB;AAC1B,oGAAoG;GAClG,gBAAgB;AAClB;;;;GAIG;GACD,mBAAmB;AACrB,kHAAkH;GAChH,iBAAiB;AACnB,sGAAsG;GACpG,wBAAwB;AAC1B,sGAAsG;GACpG,oBAAoB;AACtB,sFAAsF;GACpF,kBAAkB;AACpB;;;GAGG;GACD,mBAAmB;AACrB;;;GAGG;GACD,mBAAmB;AACrB,yEAAyE;GACvE,YAAY,CAAC;AAEjB,0EAA0E;AAC1E,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,gBAAgB,CAAC;IACxB,8FAA8F;IAC9F,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAAC;CACpC;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B,6BAA6B,CAAC;AAExE;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,iCAAiC,CAAC;AAChF,eAAO,MAAM,yBAAyB,yBAAyB,CAAC"}
|
|
@@ -9,12 +9,21 @@
|
|
|
9
9
|
* @module lib/session/send-attempt-types
|
|
10
10
|
*/
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.INPUT_RECHECK_FAILED_CODE = exports.INPUT_RECHECK_PROMPT_WAITING_CODE = exports.PLAN_REVIEW_SEND_REFUSED_CODE = void 0;
|
|
12
|
+
exports.INPUT_RECHECK_FAILED_CODE = exports.INPUT_RECHECK_PROMPT_WAITING_CODE = exports.PASTE_NOT_STARTED_CODE = exports.PLAN_REVIEW_SEND_REFUSED_CODE = void 0;
|
|
13
13
|
/**
|
|
14
14
|
* `code` on the error a tool throws when a plan review overlay refuses the
|
|
15
15
|
* send before any body is typed (Issue #3772). Matched by code, never by wording.
|
|
16
16
|
*/
|
|
17
17
|
exports.PLAN_REVIEW_SEND_REFUSED_CODE = 'PLAN_REVIEW_SEND_REFUSED';
|
|
18
|
+
/**
|
|
19
|
+
* `code` on the error a long body's paste throws when `load-buffer` failed
|
|
20
|
+
* (Issue #4031): `paste-buffer` never ran, so none of the body reached the
|
|
21
|
+
* pane. The tools wrap the error (`Failed to send message to <tool>: …`) with
|
|
22
|
+
* it as `cause`, and the send's outcome is read off that chain by code — the
|
|
23
|
+
* wording is shared with nothing, but a `paste-buffer` failure's is
|
|
24
|
+
* (`Failed to paste message into tmux session`) and that one is not known safe.
|
|
25
|
+
*/
|
|
26
|
+
exports.PASTE_NOT_STARTED_CODE = 'PASTE_NOT_STARTED';
|
|
18
27
|
/**
|
|
19
28
|
* `code` on the errors the input re-check throws before any key
|
|
20
29
|
* (`recheckComposerBeforeInput`, Issue #3952): a dialog was open, or the pane
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Record of `mcbd-*` sessions stopped through CommandMate's kill (Issue #3993).
|
|
3
|
+
*
|
|
4
|
+
* The `env-clean` gate counts every vanished session of a sibling worktree as a
|
|
5
|
+
* violation, because a worker killing its neighbour is the #1624 failure. The
|
|
6
|
+
* orchestrator stops sibling sessions too — `commandmate instances <wt> kill`
|
|
7
|
+
* when it cleans a worktree up (worktree-cleanup Phase 3), the UI's kill
|
|
8
|
+
* button, the server's cleanup after sync or a repository removal — and the two
|
|
9
|
+
* snapshots cannot tell that apart from a worker's kill: on 2026-10-29 four
|
|
10
|
+
* verification runs of #3957 failed on `- mcbd-…-<another worktree> [other]`
|
|
11
|
+
* for a cleanup nobody in the worker's transcript had run.
|
|
12
|
+
*
|
|
13
|
+
* This ledger is the missing fact: one line per kill, naming the API, the
|
|
14
|
+
* tmux sessions it actually stopped, the worktree it was for and who asked
|
|
15
|
+
* (the caller's working directory and tmux session). The gate excuses as little
|
|
16
|
+
* as it can prove is not the worker's (`env-clean-gate.ts`, `findExternalKill`):
|
|
17
|
+
* a vanished sibling session is `external` only when a line inside the task's
|
|
18
|
+
* window names that exact session, was written by the CLI, and its caller is
|
|
19
|
+
* known to be someone else — a cwd in a sibling directory of the task's
|
|
20
|
+
* worktree (the primary checkout, another worktree) or a tmux session of
|
|
21
|
+
* another worktree. Everything else stays a violation, exactly as before:
|
|
22
|
+
* a worker's own kill, a caller that is nowhere in particular (`/tmp`, `$HOME`),
|
|
23
|
+
* the route's and the server's lines (a worker can reach the UI and trigger
|
|
24
|
+
* sync too), and any kill that bypassed CommandMate (`tmux kill-session`), which
|
|
25
|
+
* records nothing. Those lines are still shown next to the violation.
|
|
26
|
+
*
|
|
27
|
+
* Written by the CLI (with its caller), by the kill-session route and by
|
|
28
|
+
* `session-cleanup.ts`. A CLI kill is therefore recorded twice — the CLI's line
|
|
29
|
+
* and the route's `http` line — which changes no verdict: only the CLI's line
|
|
30
|
+
* can excuse anything.
|
|
31
|
+
*
|
|
32
|
+
* Machine-wide, like the gate mutex (`machine-lock.ts`): the CLI and the server
|
|
33
|
+
* write it and the server's gate reads it, so the path is derived from `$HOME` alone —
|
|
34
|
+
* `~/.commandmate/session-kills/<UTC date>.jsonl` — with an override for tests.
|
|
35
|
+
* The `commandmate-entries` probe ignores the directory, like `locks`.
|
|
36
|
+
*
|
|
37
|
+
* Node built-ins only: the CLI imports this module.
|
|
38
|
+
*
|
|
39
|
+
* @module lib/verification/session-kill-ledger
|
|
40
|
+
*/
|
|
41
|
+
/** Directory under `~/.commandmate`; exported for the `commandmate-entries` probe. */
|
|
42
|
+
export declare const SESSION_KILL_LEDGER_DIR_NAME = "session-kills";
|
|
43
|
+
/** Overrides the ledger directory (tests, isolated environments). */
|
|
44
|
+
export declare const SESSION_KILL_LEDGER_ROOT_ENV = "CM_SESSION_KILL_LEDGER_ROOT";
|
|
45
|
+
/** Bumped only when a line stops being readable by this module. */
|
|
46
|
+
export declare const SESSION_KILL_LEDGER_VERSION = 1;
|
|
47
|
+
/** Day files older than this are removed when a new line is written (same as env snapshots). */
|
|
48
|
+
export declare const SESSION_KILL_LEDGER_RETENTION_MS: number;
|
|
49
|
+
/**
|
|
50
|
+
* What stopped the session: the kill-session API (`POST /api/worktrees/:id/kill-session`,
|
|
51
|
+
* also behind `instances <wt> kill`), or the server's own cleanup of worktrees
|
|
52
|
+
* that sync or a repository removal dropped (`lib/session-cleanup.ts`).
|
|
53
|
+
*/
|
|
54
|
+
export type SessionKillApi = 'kill-session' | 'session-cleanup';
|
|
55
|
+
/**
|
|
56
|
+
* Who wrote the record, which decides how much it says about the caller:
|
|
57
|
+
*
|
|
58
|
+
* - `cli` — `commandmate instances … kill`; callerCwd / callerSession are the CLI's own.
|
|
59
|
+
* - `browser` — the kill-session route, for a same-origin browser request (the UI).
|
|
60
|
+
* - `http` — the kill-session route, for any other request (the CLI's own POST,
|
|
61
|
+
* curl). The caller is unknown, so callerCwd / callerSession are null.
|
|
62
|
+
* - `server` — the server's cleanup; no request is behind it.
|
|
63
|
+
*
|
|
64
|
+
* Only `cli` lines can excuse a removal. `browser` is judged from
|
|
65
|
+
* `Sec-Fetch-Site` alone, which a header names and a UI-driving worker sends;
|
|
66
|
+
* `server` cleanup runs after a `commandmate sync` a worker can issue. Both are
|
|
67
|
+
* kept so the report can say a kill was recorded, not to excuse it.
|
|
68
|
+
*/
|
|
69
|
+
export type SessionKillOrigin = 'cli' | 'browser' | 'http' | 'server';
|
|
70
|
+
export interface SessionKillRecord {
|
|
71
|
+
version: number;
|
|
72
|
+
/** Epoch ms of the successful kill. */
|
|
73
|
+
at: number;
|
|
74
|
+
api: SessionKillApi;
|
|
75
|
+
origin: SessionKillOrigin;
|
|
76
|
+
/** Worktree whose session(s) were stopped. */
|
|
77
|
+
worktreeId: string;
|
|
78
|
+
/** Instance the kill was scoped to; null for a whole-worktree kill. */
|
|
79
|
+
instanceId: string | null;
|
|
80
|
+
/**
|
|
81
|
+
* tmux session names the kill actually stopped — the route's `killedSessions`.
|
|
82
|
+
* The gate matches a vanished session against these exactly, never by the
|
|
83
|
+
* worktree id (whose prefix another worktree's id can share). Empty when the
|
|
84
|
+
* writer could not tell, which excuses nothing.
|
|
85
|
+
*/
|
|
86
|
+
sessionNames: string[];
|
|
87
|
+
/** Working directory of the process that asked; null when unreadable. */
|
|
88
|
+
callerCwd: string | null;
|
|
89
|
+
/** tmux session the caller ran inside; null outside tmux. */
|
|
90
|
+
callerSession: string | null;
|
|
91
|
+
}
|
|
92
|
+
export declare function defaultSessionKillLedgerRoot(): string;
|
|
93
|
+
export declare function resolveSessionKillLedgerRoot(env?: Record<string, string | undefined>): string;
|
|
94
|
+
/**
|
|
95
|
+
* Append one kill. Never throws: the kill already happened, and failing the
|
|
96
|
+
* command over its bookkeeping would only hide that.
|
|
97
|
+
*
|
|
98
|
+
* @returns true when the line was written
|
|
99
|
+
*/
|
|
100
|
+
export declare function appendSessionKillRecord(record: SessionKillRecord, root?: string): boolean;
|
|
101
|
+
/** Whether a parsed line is a record this module can use; anything else is skipped. */
|
|
102
|
+
export declare function isSessionKillRecord(value: unknown): value is SessionKillRecord;
|
|
103
|
+
/**
|
|
104
|
+
* The kills recorded in `[since, until]` (epoch ms, inclusive).
|
|
105
|
+
*
|
|
106
|
+
* A missing directory, an unreadable day file and a malformed line all read as
|
|
107
|
+
* "no record", which only ever excuses less.
|
|
108
|
+
*/
|
|
109
|
+
export declare function readSessionKillRecords(since: number, until: number, root?: string): SessionKillRecord[];
|
|
110
|
+
//# sourceMappingURL=session-kill-ledger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-kill-ledger.d.ts","sourceRoot":"","sources":["../../../src/lib/verification/session-kill-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAMH,sFAAsF;AACtF,eAAO,MAAM,4BAA4B,kBAAkB,CAAC;AAE5D,qEAAqE;AACrE,eAAO,MAAM,4BAA4B,gCAAgC,CAAC;AAE1E,mEAAmE;AACnE,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,gGAAgG;AAChG,eAAO,MAAM,gCAAgC,QAA2B,CAAC;AAMzE;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,iBAAiB,CAAC;AAEhE;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAKtE,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,cAAc,CAAC;IACpB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;;;OAKG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,yEAAyE;IACzE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,6DAA6D;IAC7D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,wBAAgB,4BAA4B,IAAI,MAAM,CAErD;AAED,wBAAgB,4BAA4B,CAC1C,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,MAAM,CAGR;AAyBD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,iBAAiB,EACzB,IAAI,GAAE,MAAuC,GAC5C,OAAO,CAaT;AAMD,uFAAuF;AACvF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAkB9E;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,MAAuC,GAC5C,iBAAiB,EAAE,CA0BrB"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Record of `mcbd-*` sessions stopped through CommandMate's kill (Issue #3993).
|
|
4
|
+
*
|
|
5
|
+
* The `env-clean` gate counts every vanished session of a sibling worktree as a
|
|
6
|
+
* violation, because a worker killing its neighbour is the #1624 failure. The
|
|
7
|
+
* orchestrator stops sibling sessions too — `commandmate instances <wt> kill`
|
|
8
|
+
* when it cleans a worktree up (worktree-cleanup Phase 3), the UI's kill
|
|
9
|
+
* button, the server's cleanup after sync or a repository removal — and the two
|
|
10
|
+
* snapshots cannot tell that apart from a worker's kill: on 2026-10-29 four
|
|
11
|
+
* verification runs of #3957 failed on `- mcbd-…-<another worktree> [other]`
|
|
12
|
+
* for a cleanup nobody in the worker's transcript had run.
|
|
13
|
+
*
|
|
14
|
+
* This ledger is the missing fact: one line per kill, naming the API, the
|
|
15
|
+
* tmux sessions it actually stopped, the worktree it was for and who asked
|
|
16
|
+
* (the caller's working directory and tmux session). The gate excuses as little
|
|
17
|
+
* as it can prove is not the worker's (`env-clean-gate.ts`, `findExternalKill`):
|
|
18
|
+
* a vanished sibling session is `external` only when a line inside the task's
|
|
19
|
+
* window names that exact session, was written by the CLI, and its caller is
|
|
20
|
+
* known to be someone else — a cwd in a sibling directory of the task's
|
|
21
|
+
* worktree (the primary checkout, another worktree) or a tmux session of
|
|
22
|
+
* another worktree. Everything else stays a violation, exactly as before:
|
|
23
|
+
* a worker's own kill, a caller that is nowhere in particular (`/tmp`, `$HOME`),
|
|
24
|
+
* the route's and the server's lines (a worker can reach the UI and trigger
|
|
25
|
+
* sync too), and any kill that bypassed CommandMate (`tmux kill-session`), which
|
|
26
|
+
* records nothing. Those lines are still shown next to the violation.
|
|
27
|
+
*
|
|
28
|
+
* Written by the CLI (with its caller), by the kill-session route and by
|
|
29
|
+
* `session-cleanup.ts`. A CLI kill is therefore recorded twice — the CLI's line
|
|
30
|
+
* and the route's `http` line — which changes no verdict: only the CLI's line
|
|
31
|
+
* can excuse anything.
|
|
32
|
+
*
|
|
33
|
+
* Machine-wide, like the gate mutex (`machine-lock.ts`): the CLI and the server
|
|
34
|
+
* write it and the server's gate reads it, so the path is derived from `$HOME` alone —
|
|
35
|
+
* `~/.commandmate/session-kills/<UTC date>.jsonl` — with an override for tests.
|
|
36
|
+
* The `commandmate-entries` probe ignores the directory, like `locks`.
|
|
37
|
+
*
|
|
38
|
+
* Node built-ins only: the CLI imports this module.
|
|
39
|
+
*
|
|
40
|
+
* @module lib/verification/session-kill-ledger
|
|
41
|
+
*/
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.SESSION_KILL_LEDGER_RETENTION_MS = exports.SESSION_KILL_LEDGER_VERSION = exports.SESSION_KILL_LEDGER_ROOT_ENV = exports.SESSION_KILL_LEDGER_DIR_NAME = void 0;
|
|
44
|
+
exports.defaultSessionKillLedgerRoot = defaultSessionKillLedgerRoot;
|
|
45
|
+
exports.resolveSessionKillLedgerRoot = resolveSessionKillLedgerRoot;
|
|
46
|
+
exports.appendSessionKillRecord = appendSessionKillRecord;
|
|
47
|
+
exports.isSessionKillRecord = isSessionKillRecord;
|
|
48
|
+
exports.readSessionKillRecords = readSessionKillRecords;
|
|
49
|
+
const fs_1 = require("fs");
|
|
50
|
+
const os_1 = require("os");
|
|
51
|
+
const path_1 = require("path");
|
|
52
|
+
/** Directory under `~/.commandmate`; exported for the `commandmate-entries` probe. */
|
|
53
|
+
exports.SESSION_KILL_LEDGER_DIR_NAME = 'session-kills';
|
|
54
|
+
/** Overrides the ledger directory (tests, isolated environments). */
|
|
55
|
+
exports.SESSION_KILL_LEDGER_ROOT_ENV = 'CM_SESSION_KILL_LEDGER_ROOT';
|
|
56
|
+
/** Bumped only when a line stops being readable by this module. */
|
|
57
|
+
exports.SESSION_KILL_LEDGER_VERSION = 1;
|
|
58
|
+
/** Day files older than this are removed when a new line is written (same as env snapshots). */
|
|
59
|
+
exports.SESSION_KILL_LEDGER_RETENTION_MS = 30 * 24 * 60 * 60 * 1000;
|
|
60
|
+
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
61
|
+
const DAY_FILE_PATTERN = /^(\d{4}-\d{2}-\d{2})\.jsonl$/;
|
|
62
|
+
const SESSION_KILL_APIS = ['kill-session', 'session-cleanup'];
|
|
63
|
+
const SESSION_KILL_ORIGINS = ['cli', 'browser', 'http', 'server'];
|
|
64
|
+
function defaultSessionKillLedgerRoot() {
|
|
65
|
+
return (0, path_1.join)((0, os_1.homedir)(), '.commandmate', exports.SESSION_KILL_LEDGER_DIR_NAME);
|
|
66
|
+
}
|
|
67
|
+
function resolveSessionKillLedgerRoot(env = process.env) {
|
|
68
|
+
const override = env[exports.SESSION_KILL_LEDGER_ROOT_ENV];
|
|
69
|
+
return override && override.trim() !== '' ? override : defaultSessionKillLedgerRoot();
|
|
70
|
+
}
|
|
71
|
+
function dayOf(epochMs) {
|
|
72
|
+
return new Date(epochMs).toISOString().slice(0, 10);
|
|
73
|
+
}
|
|
74
|
+
function pruneOldDays(root, now) {
|
|
75
|
+
const oldest = dayOf(now - exports.SESSION_KILL_LEDGER_RETENTION_MS);
|
|
76
|
+
let names;
|
|
77
|
+
try {
|
|
78
|
+
names = (0, fs_1.readdirSync)(root);
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
for (const name of names) {
|
|
84
|
+
const day = DAY_FILE_PATTERN.exec(name)?.[1];
|
|
85
|
+
if (day === undefined || day >= oldest)
|
|
86
|
+
continue;
|
|
87
|
+
try {
|
|
88
|
+
(0, fs_1.rmSync)((0, path_1.join)(root, name), { force: true });
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
// A day file that cannot be removed is disk use, not a reason to fail a kill.
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Append one kill. Never throws: the kill already happened, and failing the
|
|
97
|
+
* command over its bookkeeping would only hide that.
|
|
98
|
+
*
|
|
99
|
+
* @returns true when the line was written
|
|
100
|
+
*/
|
|
101
|
+
function appendSessionKillRecord(record, root = resolveSessionKillLedgerRoot()) {
|
|
102
|
+
try {
|
|
103
|
+
(0, fs_1.mkdirSync)(root, { recursive: true, mode: 0o700 });
|
|
104
|
+
// One short line per append; O_APPEND keeps concurrent writers' lines whole.
|
|
105
|
+
(0, fs_1.appendFileSync)((0, path_1.join)(root, `${dayOf(record.at)}.jsonl`), `${JSON.stringify(record)}\n`, {
|
|
106
|
+
encoding: 'utf8',
|
|
107
|
+
mode: 0o600,
|
|
108
|
+
});
|
|
109
|
+
pruneOldDays(root, record.at);
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function isNullableString(value) {
|
|
117
|
+
return value === null || typeof value === 'string';
|
|
118
|
+
}
|
|
119
|
+
/** Whether a parsed line is a record this module can use; anything else is skipped. */
|
|
120
|
+
function isSessionKillRecord(value) {
|
|
121
|
+
if (typeof value !== 'object' || value === null)
|
|
122
|
+
return false;
|
|
123
|
+
const record = value;
|
|
124
|
+
return (record.version === exports.SESSION_KILL_LEDGER_VERSION &&
|
|
125
|
+
typeof record.at === 'number' &&
|
|
126
|
+
typeof record.api === 'string' &&
|
|
127
|
+
SESSION_KILL_APIS.includes(record.api) &&
|
|
128
|
+
typeof record.origin === 'string' &&
|
|
129
|
+
SESSION_KILL_ORIGINS.includes(record.origin) &&
|
|
130
|
+
typeof record.worktreeId === 'string' &&
|
|
131
|
+
record.worktreeId !== '' &&
|
|
132
|
+
isNullableString(record.instanceId) &&
|
|
133
|
+
Array.isArray(record.sessionNames) &&
|
|
134
|
+
record.sessionNames.every((name) => typeof name === 'string') &&
|
|
135
|
+
isNullableString(record.callerCwd) &&
|
|
136
|
+
isNullableString(record.callerSession));
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* The kills recorded in `[since, until]` (epoch ms, inclusive).
|
|
140
|
+
*
|
|
141
|
+
* A missing directory, an unreadable day file and a malformed line all read as
|
|
142
|
+
* "no record", which only ever excuses less.
|
|
143
|
+
*/
|
|
144
|
+
function readSessionKillRecords(since, until, root = resolveSessionKillLedgerRoot()) {
|
|
145
|
+
if (!(since <= until))
|
|
146
|
+
return [];
|
|
147
|
+
// Nothing older than the retention survives, so a stale baseline costs no extra reads.
|
|
148
|
+
since = Math.max(since, until - exports.SESSION_KILL_LEDGER_RETENTION_MS - DAY_MS);
|
|
149
|
+
const records = [];
|
|
150
|
+
for (let day = Date.parse(`${dayOf(since)}T00:00:00.000Z`); day <= until; day += DAY_MS) {
|
|
151
|
+
let text;
|
|
152
|
+
try {
|
|
153
|
+
text = (0, fs_1.readFileSync)((0, path_1.join)(root, `${dayOf(day)}.jsonl`), 'utf8');
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
for (const line of text.split('\n')) {
|
|
159
|
+
if (line.trim() === '')
|
|
160
|
+
continue;
|
|
161
|
+
let parsed;
|
|
162
|
+
try {
|
|
163
|
+
parsed = JSON.parse(line);
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
if (isSessionKillRecord(parsed) && parsed.at >= since && parsed.at <= until) {
|
|
169
|
+
records.push(parsed);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return records;
|
|
174
|
+
}
|
|
@@ -1138,6 +1138,7 @@
|
|
|
1138
1138
|
"promptResponse": {
|
|
1139
1139
|
"refused": "Your answer was not sent because the dialog has changed. Please check the screen.",
|
|
1140
1140
|
"failed": "Could not send the answer. Please try again.",
|
|
1141
|
+
"partial": "The answer stopped part-way: some of its keys may have reached the agent. Check the screen before answering again.",
|
|
1141
1142
|
"stuckHint": "If sending does not work, operate the terminal in direct input mode.",
|
|
1142
1143
|
"stuckHintLink": "Switch to direct input",
|
|
1143
1144
|
"unanswerable": "CommandMate cannot operate this screen. Use direct input mode instead.",
|
|
@@ -1169,6 +1170,7 @@
|
|
|
1169
1170
|
"nothingToSubmit": "There is no comment to submit. Add a comment first.",
|
|
1170
1171
|
"invalidRequest": "That action does not fit this screen. Nothing was sent.",
|
|
1171
1172
|
"notActive": "Nothing was sent: no plan review is on screen.",
|
|
1173
|
+
"inputLost": "Stopped part-way: some keys may have reached the agent. Check the screen before trying again.",
|
|
1172
1174
|
"generic": "Could not send."
|
|
1173
1175
|
},
|
|
1174
1176
|
"composerNotice": "The plan is waiting for your review — approve, cancel or comment.",
|
|
@@ -1138,6 +1138,7 @@
|
|
|
1138
1138
|
"promptResponse": {
|
|
1139
1139
|
"refused": "ダイアログの状態が変わったため送信できませんでした。画面を確認してください。",
|
|
1140
1140
|
"failed": "送信に失敗しました。もう一度お試しください。",
|
|
1141
|
+
"partial": "回答の途中で止まりました。一部のキーが届いた可能性があります。画面を確認してから答え直してください。",
|
|
1141
1142
|
"stuckHint": "送信がうまくいかない場合は、直接入力モードで操作してください。",
|
|
1142
1143
|
"stuckHintLink": "直接入力に切り替える",
|
|
1143
1144
|
"unanswerable": "この画面は CommandMate から操作できません。直接入力モードで操作してください。",
|
|
@@ -1169,6 +1170,7 @@
|
|
|
1169
1170
|
"nothingToSubmit": "送るコメントがありません。先にコメントを追加してください。",
|
|
1170
1171
|
"invalidRequest": "この画面では送れない操作です。何も送っていません。",
|
|
1171
1172
|
"notActive": "計画のレビュー画面が表示されていないため、何も送っていません。",
|
|
1173
|
+
"inputLost": "途中で止まりました。一部のキーが届いた可能性があります。画面を確認してから操作し直してください。",
|
|
1172
1174
|
"generic": "送信できませんでした。"
|
|
1173
1175
|
},
|
|
1174
1176
|
"composerNotice": "計画の確認待ちです。承認・取り消し・コメントを選んでください",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* All values are preserved from the original literals (no behavior change).
|
|
21
21
|
*/
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.LIVENESS_CONFIRM_DELAY_MS = exports.
|
|
23
|
+
exports.LIVENESS_CONFIRM_DELAY_MS = exports.OPENCODE_V2_COMPOSER_WAIT_MS = exports.OPENCODE_V2_EXIT_WAIT_MS = exports.COMMAND_CODE_INIT_WAIT_MS = exports.VIBE_LOCAL_DOUBLE_ENTER_WAIT_MS = exports.COPILOT_EXIT_WAIT_MS = exports.OPENCODE_INTERRUPT_SECOND_ESCAPE_DELAY_MS = exports.OPENCODE_EXIT_WAIT_MS = exports.CODEX_DIALOG_SETTLE_MS = exports.TUI_EXIT_WAIT_MS = exports.TUI_INTERRUPT_SETTLE_MS = exports.TUI_MESSAGE_PROCESSED_WAIT_MS = exports.TUI_TEXT_INPUT_WAIT_MS = exports.TUI_SESSION_CREATE_WAIT_MS = void 0;
|
|
24
24
|
/**
|
|
25
25
|
* Wait (ms) after `createSession()` before sending the first keys, giving tmux
|
|
26
26
|
* time to spin up the session.
|
|
@@ -156,12 +156,6 @@ exports.OPENCODE_V2_EXIT_WAIT_MS = 3000;
|
|
|
156
156
|
* Site: opencode-v2 sendMessage().
|
|
157
157
|
*/
|
|
158
158
|
exports.OPENCODE_V2_COMPOSER_WAIT_MS = 15000;
|
|
159
|
-
/**
|
|
160
|
-
* Wait (ms) for the `unset CLAUDECODE` command to reach the shell while
|
|
161
|
-
* sanitizing the session environment (empirically determined).
|
|
162
|
-
* Site: session-key-sender sanitizeSessionEnvironment().
|
|
163
|
-
*/
|
|
164
|
-
exports.CLAUDE_ENV_SANITIZE_WAIT_MS = 100;
|
|
165
159
|
/**
|
|
166
160
|
* Wait (ms) between the two liveness readings that must agree before a reuse
|
|
167
161
|
* path re-sends a launch command (Issue #2070).
|
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
* Dependencies: auto-yes-state.ts (composite keys / state), polling/* (prompt
|
|
11
11
|
* detection, resolver, policy, dialog gate, session epoch, poller state,
|
|
12
12
|
* decision record), cli-tools/*, session/cli-session.ts, tmux/*, detection/*,
|
|
13
|
-
* db/*, tasks/*.
|
|
13
|
+
* db/*, tasks/*. Split out of this file (Issue #3893): auto-yes-poller-tick.ts
|
|
14
|
+
* (tick reading / no-prompt bookkeeping / decision recorder),
|
|
15
|
+
* auto-yes-poller-answer-target.ts (answer target), auto-yes-poller-session-presence.ts
|
|
16
|
+
* (whether a failed capture's session is gone) and auto-yes-poller-keys.ts
|
|
17
|
+
* (which composite keys have a poller entry).
|
|
14
18
|
*
|
|
15
19
|
* Issue #3821: this poller (with the hook / API adjudication) is what answers
|
|
16
20
|
* automatically. The browser no longer answers, and the Enter sent to a choice
|
|
@@ -267,7 +267,9 @@ class AntigravityTool extends base_1.BaseCLITool {
|
|
|
267
267
|
// screen is this window's to confirm; the poller records nothing for it.
|
|
268
268
|
(0, antigravity_startup_trust_1.beginStartupWindow)(sessionName);
|
|
269
269
|
try {
|
|
270
|
-
|
|
270
|
+
// Issue #3981: in one writer's turn of the input lock; the waits below
|
|
271
|
+
// stay outside it.
|
|
272
|
+
await this.typeLaunchLines(sessionName, [(0, launch_screen_1.withLaunchScreenCleared)(launchCommand)]);
|
|
271
273
|
// Wait for agy to initialize
|
|
272
274
|
await new Promise((resolve) => setTimeout(resolve, ANTIGRAVITY_INIT_WAIT_MS));
|
|
273
275
|
// Poll until the interactive prompt is ready (handles the trust dialog)
|
|
@@ -494,7 +496,8 @@ class AntigravityTool extends base_1.BaseCLITool {
|
|
|
494
496
|
}
|
|
495
497
|
catch (error) {
|
|
496
498
|
const errorMessage = (0, errors_1.getErrorMessage)(error);
|
|
497
|
-
|
|
499
|
+
// Issue #4031: the cause keeps a failed `load-buffer`'s code (`classifySendFailure`).
|
|
500
|
+
throw new Error(`Failed to send message to Antigravity: ${errorMessage}`, { cause: error });
|
|
498
501
|
}
|
|
499
502
|
}
|
|
500
503
|
/**
|