commandmate 0.29.2 → 0.30.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 +278 -271
- package/.next/app-path-routes-manifest.json +35 -34
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +8 -8
- 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/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update-check/route.js +1 -1
- package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/conversation/route.js +1 -1
- package/.next/server/app/api/assistant/conversation/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/current-output/route.js +1 -1
- package/.next/server/app/api/assistant/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/messages/route.js +1 -1
- package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/session/route.js +1 -1
- package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/start/route.js +18 -18
- package/.next/server/app/api/assistant/start/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/terminal/route.js +19 -19
- package/.next/server/app/api/assistant/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/tools/route.js +1 -1
- package/.next/server/app/api/assistant/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/tools/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_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 +1 -1
- package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/claude-done/route.js +2 -2
- package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/escalation/route.js +1 -1
- package/.next/server/app/api/push/escalation/route_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 -1
- package/.next/server/app/api/push/vapid/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/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/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.js +1 -0
- package/.next/server/app/api/settings/default-surface-mode/route.js.nft.json +1 -0
- package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -0
- 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/todos/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.js +1 -0
- package/.next/server/app/api/worktrees/[id]/cli-reference/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/{start-polling → 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_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]/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_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/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_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_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]/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_client-reference-manifest.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_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 +1 -1
- 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 +1 -1
- 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_client-reference-manifest.js +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.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/chat/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/more/page.js +2 -2
- package/.next/server/app/more/page.js.nft.json +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_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 +12 -12
- 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.js +3 -3
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +35 -34
- package/.next/server/chunks/1058.js +1 -1
- package/.next/server/chunks/1068.js +1 -1
- package/.next/server/chunks/1191.js +1 -1
- package/.next/server/chunks/1341.js +1 -1
- package/.next/server/chunks/1886.js +3 -3
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/261.js +1 -0
- package/.next/server/chunks/2739.js +1 -0
- package/.next/server/chunks/2816.js +1 -1
- package/.next/server/chunks/2827.js +29 -0
- package/.next/server/chunks/3123.js +1 -0
- package/.next/server/chunks/3241.js +1 -1
- package/.next/server/chunks/3543.js +1 -1
- package/.next/server/chunks/3945.js +1 -1
- package/.next/server/chunks/4325.js +1 -0
- package/.next/server/chunks/4390.js +1 -1
- package/.next/server/chunks/4393.js +1 -1
- package/.next/server/chunks/4443.js +6 -0
- package/.next/server/chunks/5017.js +1 -1
- package/.next/server/chunks/5120.js +1 -0
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/6337.js +1 -1
- package/.next/server/chunks/663.js +1 -1
- package/.next/server/chunks/6894.js +8 -0
- package/.next/server/chunks/7685.js +1 -1
- package/.next/server/chunks/7836.js +1 -0
- package/.next/server/chunks/8356.js +1 -1
- package/.next/server/chunks/880.js +1 -1
- package/.next/server/chunks/8807.js +1 -1
- package/.next/server/chunks/9123.js +2 -2
- package/.next/server/chunks/9130.js +3 -3
- package/.next/server/chunks/9627.js +48 -26
- package/.next/server/chunks/9696.js +3 -0
- package/.next/server/chunks/9798.js +1 -1
- 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/server/src/middleware.js +1 -1
- package/.next/server/src/middleware.js.map +1 -1
- package/.next/static/7K0XXFu_ty4wRSkl4X21E/_buildManifest.js +1 -0
- package/.next/static/chunks/{4882-388e94fe0a03c2ba.js → 3916-0e929d089282dc5d.js} +1 -1
- package/.next/static/chunks/{5229-b2a81bb8fb5c19e9.js → 5229-6c89475b61bd2c8b.js} +1 -1
- package/.next/static/chunks/6022-7a7d1760fc9814c7.js +1 -0
- package/.next/static/chunks/6381-28d0e95620aa018e.js +1 -0
- package/.next/static/chunks/app/api/agents/update/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/agents/versions/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/app/update/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/app/update-check/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/assistant/conversation/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/assistant/current-output/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/assistant/messages/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/assistant/session/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/assistant/start/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/assistant/terminal/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/assistant/tools/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/capabilities/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/fs/browse/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/fs/recent-paths/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/hooks/agent-event/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/hooks/permission-request/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/metrics/vibe/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/push/escalation/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/remote/pair/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/repositories/validate-path/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/settings/default-agents/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/skills/installations/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/skills/operations/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/skills/reindex/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/skills/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/templates/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/todos/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/more/{page-75d3783da0d49a25.js → page-333bba1c8bbc9c11.js} +1 -1
- package/.next/static/chunks/app/proxy/[...path]/route-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/layout-ee11f7b8a34cba8c.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-d48b95ed554bcd13.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/terminal/page-2631bc5c4b0a9fb8.js +1 -0
- package/.next/static/css/61e10d4b1b11b193.css +1 -0
- package/.next/trace +13 -13
- package/.next/types/app/api/settings/default-surface-mode/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/{start-polling → cli-reference}/route.ts +3 -3
- package/.next/types/routes.d.ts +3 -2
- package/.next/types/validator.ts +18 -9
- package/dist/server/server.js +58 -0
- package/dist/server/src/lib/claude-output.js +1 -0
- package/dist/server/src/lib/db/app-settings-db.js +60 -0
- package/dist/server/src/lib/db/chat-db.js +120 -7
- package/dist/server/src/lib/detection/status-detector.js +3 -2
- package/dist/server/src/lib/env.js +122 -0
- package/dist/server/src/lib/git/worktrees.js +154 -0
- package/dist/server/src/lib/history/transcript-tail.js +80 -0
- package/dist/server/src/lib/history/user-turn-recorder.js +247 -0
- package/dist/server/src/lib/hooks/permission-decision-service.js +85 -1
- package/dist/server/src/lib/hooks/sources/antigravity/history.js +519 -0
- package/dist/server/src/lib/hooks/sources/antigravity/source.js +7 -0
- package/dist/server/src/lib/hooks/sources/antigravity/transcript.js +407 -0
- package/dist/server/src/lib/hooks/sources/claude/history.js +654 -0
- package/dist/server/src/lib/hooks/sources/claude/source.js +4 -0
- package/dist/server/src/lib/hooks/sources/claude/transcript.js +518 -0
- package/dist/server/src/lib/hooks/sources/codex/history.js +576 -0
- package/dist/server/src/lib/hooks/sources/codex/source.js +4 -0
- package/dist/server/src/lib/hooks/sources/codex/transcript.js +448 -0
- package/dist/server/src/lib/hooks/sources/copilot/source.js +2 -0
- package/dist/server/src/lib/hooks/sources/gemini/source.js +2 -0
- package/dist/server/src/lib/hooks/sources/legacy-relay.js +3 -0
- package/dist/server/src/lib/hooks/sources/opencode/history.js +57 -0
- package/dist/server/src/lib/hooks/sources/opencode/source.js +4 -0
- package/dist/server/src/lib/hooks/sources/opencode/transcript.js +10 -28
- package/dist/server/src/lib/hooks/sources/turn-body.js +118 -0
- package/dist/server/src/lib/polling/prompt-dedup.js +2 -4
- package/dist/server/src/lib/polling/response-checker.js +44 -3
- package/dist/server/src/lib/polling/response-dedup.js +2 -4
- package/dist/server/src/lib/polling/response-poller-core.js +191 -29
- package/dist/server/src/lib/polling/structured-history-gate.js +147 -16
- package/dist/server/src/lib/push/push-sender.js +21 -1
- package/dist/server/src/lib/push/waiting-push-notifier.js +126 -8
- package/dist/server/src/lib/realtime/publisher-registry.js +171 -0
- package/dist/server/src/lib/realtime/terminal-broadcast.js +14 -1
- package/dist/server/src/lib/realtime/types.js +96 -1
- package/dist/server/src/lib/session/current-output-builder.js +263 -4
- package/dist/server/src/lib/session/send-user-message.js +90 -2
- package/dist/server/src/lib/tui-accumulator.js +2 -8
- package/dist/server/src/lib/ws-server.js +143 -6
- package/dist/server/src/types/agent-transcript.js +241 -5
- package/dist/server/src/types/ui-state.js +24 -1
- package/package.json +1 -1
- package/public/sw.js +15 -1
- package/.next/server/app/api/worktrees/[id]/start-polling/route.js +0 -1
- package/.next/server/app/api/worktrees/[id]/start-polling/route.js.nft.json +0 -1
- package/.next/server/chunks/1714.js +0 -7
- package/.next/server/chunks/2198.js +0 -1
- package/.next/server/chunks/221.js +0 -25
- package/.next/server/chunks/2759.js +0 -8
- package/.next/server/chunks/3558.js +0 -1
- package/.next/server/chunks/9508.js +0 -1
- package/.next/static/0YoRrahue4Vchxg1z83IQ/_buildManifest.js +0 -1
- package/.next/static/chunks/1379-af7af9e08f47c979.js +0 -1
- package/.next/static/chunks/6381-9ba5198c0a6ff197.js +0 -1
- package/.next/static/chunks/app/api/agents/update/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/agents/versions/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/app/update/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/app/update-check/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/assistant/conversation/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/assistant/current-output/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/assistant/messages/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/assistant/session/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/assistant/start/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/assistant/terminal/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/assistant/tools/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/capabilities/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/fs/browse/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/fs/recent-paths/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/hooks/agent-event/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/hooks/permission-request/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/metrics/vibe/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/push/escalation/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/remote/pair/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/repositories/validate-path/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/settings/default-agents/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/skills/[id]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/skills/installations/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/skills/operations/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/skills/reindex/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/skills/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/templates/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/todos/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/layout-1c30fb8d4d6fa6ef.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-ce6279d581d1df95.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/terminal/page-00ad5d9a62a71cab.js +0 -1
- package/.next/static/css/b326c8a734e1928e.css +0 -1
- /package/.next/static/{0YoRrahue4Vchxg1z83IQ → 7K0XXFu_ty4wRSkl4X21E}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Separating an agent's own words from its tool log (Issue #2234).
|
|
4
|
+
*
|
|
5
|
+
* Four readers — `./claude/transcript`, `./opencode/transcript`,
|
|
6
|
+
* `./codex/transcript` and `./antigravity/transcript` — turn one agent turn into
|
|
7
|
+
* the single Markdown body that becomes one `chat_messages` row. Each of them
|
|
8
|
+
* used to lay the pieces out in transcript order and join them, which put a run
|
|
9
|
+
* of tool-call lines at the **top** of every body that opened with a tool call.
|
|
10
|
+
* Measured on 400 real Claude Code transcripts (2026-09-02,
|
|
11
|
+
* `docs/design/2234-turn-prose-tool-separation.md` §1): **141 of 586 non-empty
|
|
12
|
+
* turns (24 %)** began with `- \`Bash\` — …`. The chat surface (#2232) shows the
|
|
13
|
+
* body in full, so those 141 bubbles opened with a tool log instead of a reply.
|
|
14
|
+
*
|
|
15
|
+
* This module is the one place that decides the layout, and every reader goes
|
|
16
|
+
* through it. Two rules:
|
|
17
|
+
*
|
|
18
|
+
* 1. **Prose leads.** Text the agent wrote — and the folded `Thinking` quotes
|
|
19
|
+
* that sit between the sentences — keep their transcript order and come
|
|
20
|
+
* first.
|
|
21
|
+
* 2. **The tool log is one section, at the end**, in transcript order, folded
|
|
22
|
+
* into a blockquote under a labelled heading.
|
|
23
|
+
*
|
|
24
|
+
* ## Why the order claim from #2041 / #2121 is narrowed rather than dropped
|
|
25
|
+
*
|
|
26
|
+
* Those Issues kept strict transcript order on the argument that "the order is
|
|
27
|
+
* the only record of what happened when, and this row is the record". That is
|
|
28
|
+
* still true *within* each kind and is still what this module emits: the tool
|
|
29
|
+
* lines are in call order, and the paragraphs are in the order they were
|
|
30
|
+
* written. What is given up is the interleaving **between** the two — which
|
|
31
|
+
* paragraph a given call sat under. It is given up deliberately, because the
|
|
32
|
+
* surface that reads this row is a chat bubble, and a bubble whose first line is
|
|
33
|
+
* `- \`Bash\` — git status` has already failed the reader before the ordering
|
|
34
|
+
* argument gets a hearing.
|
|
35
|
+
*
|
|
36
|
+
* ## Why a blockquote and not `<details>`
|
|
37
|
+
*
|
|
38
|
+
* Measured, not assumed (§3 of the design note). The card renders with
|
|
39
|
+
* `remarkGfm` + `rehypeSanitize` + `rehypeHighlight` and deliberately **no**
|
|
40
|
+
* `rehypeRaw`, so raw HTML never becomes an element: a `<details>` /
|
|
41
|
+
* `<summary>` wrapper is dropped whole and takes its summary text with it,
|
|
42
|
+
* leaving a bare list and no label. A blockquote with a bold first line is
|
|
43
|
+
* Markdown's own way of saying "subordinate", survives the sanitiser untouched,
|
|
44
|
+
* and is the same shape the four readers already use for `Thinking`.
|
|
45
|
+
*
|
|
46
|
+
* @module lib/hooks/sources/turn-body
|
|
47
|
+
*/
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.TURN_TOOL_LOG_LABEL = void 0;
|
|
50
|
+
exports.separateTurnBody = separateTurnBody;
|
|
51
|
+
/**
|
|
52
|
+
* The bold first line of the folded tool section.
|
|
53
|
+
*
|
|
54
|
+
* English, like the `Thinking` label the four readers already share, and for the
|
|
55
|
+
* same reason: the string is written into `chat_messages.content` at read time,
|
|
56
|
+
* so it is baked into rows that outlive any later locale change and cannot be
|
|
57
|
+
* re-translated by the UI.
|
|
58
|
+
*/
|
|
59
|
+
exports.TURN_TOOL_LOG_LABEL = 'Tool calls';
|
|
60
|
+
/**
|
|
61
|
+
* Quote one already-rendered tool line.
|
|
62
|
+
*
|
|
63
|
+
* The four readers all render a call as a **single-line** list item — their
|
|
64
|
+
* detail readers collapse whitespace precisely so a heredoc in a shell command
|
|
65
|
+
* cannot put a newline here — so one prefix per line is enough and the split is
|
|
66
|
+
* a guard rather than a case that is expected to fire.
|
|
67
|
+
*/
|
|
68
|
+
function quoteToolLine(line) {
|
|
69
|
+
return line
|
|
70
|
+
.split('\n')
|
|
71
|
+
.map((part) => (part.length > 0 ? `> ${part}` : '>'))
|
|
72
|
+
.join('\n');
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Lay one turn's rendered blocks out as the body a history row stores.
|
|
76
|
+
*
|
|
77
|
+
* Pure: same blocks in, same string out, no clock and no I/O. That is what lets
|
|
78
|
+
* the settled row (each source's `history` module) and the live
|
|
79
|
+
* `chat_turn_progress` bubble
|
|
80
|
+
* (#2199) agree — both reach this function through the same renderer, so the
|
|
81
|
+
* text a reader watches being written is the text that settles.
|
|
82
|
+
*
|
|
83
|
+
* A turn with no tool calls comes out **byte-identical** to what the readers
|
|
84
|
+
* produced before this Issue: the whole change is the section this adds.
|
|
85
|
+
*
|
|
86
|
+
* @param blocks - Rendered pieces in transcript order; empty text is the
|
|
87
|
+
* caller's to drop
|
|
88
|
+
* @returns The body and the two halves it was built from
|
|
89
|
+
*/
|
|
90
|
+
function separateTurnBody(blocks) {
|
|
91
|
+
const prose = [];
|
|
92
|
+
const tools = [];
|
|
93
|
+
for (const block of blocks) {
|
|
94
|
+
if (block.text.length === 0)
|
|
95
|
+
continue;
|
|
96
|
+
if (block.kind === 'tool')
|
|
97
|
+
tools.push(block.text);
|
|
98
|
+
else
|
|
99
|
+
prose.push(block.text);
|
|
100
|
+
}
|
|
101
|
+
// A blank line between every pair, which is what keeps a paragraph a paragraph
|
|
102
|
+
// and stops a heading being absorbed into the text above it. #2041's join had
|
|
103
|
+
// a second rule — consecutive tool lines joined by a single newline so they
|
|
104
|
+
// stayed one Markdown list — which is gone because no tool line reaches this
|
|
105
|
+
// list any more.
|
|
106
|
+
const proseText = prose.join('\n\n');
|
|
107
|
+
const toolLog = tools.length === 0
|
|
108
|
+
? ''
|
|
109
|
+
: [
|
|
110
|
+
`> **${exports.TURN_TOOL_LOG_LABEL} (${tools.length})**`,
|
|
111
|
+
'>',
|
|
112
|
+
...tools.map(quoteToolLine),
|
|
113
|
+
].join('\n');
|
|
114
|
+
const body = proseText.length > 0 && toolLog.length > 0
|
|
115
|
+
? `${proseText}\n\n${toolLog}`
|
|
116
|
+
: `${proseText}${toolLog}`;
|
|
117
|
+
return { body, prose: proseText, toolLog, toolCalls: tools.length };
|
|
118
|
+
}
|
|
@@ -13,10 +13,8 @@ exports.clearPromptHashCache = clearPromptHashCache;
|
|
|
13
13
|
exports.renamePromptHashCacheKey = renamePromptHashCacheKey;
|
|
14
14
|
exports.normalizePromptForDedup = normalizePromptForDedup;
|
|
15
15
|
const crypto_1 = require("crypto");
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*/
|
|
19
|
-
const promptHashCache = new Map();
|
|
16
|
+
const promptHashCache = globalThis.__promptHashCache ??
|
|
17
|
+
(globalThis.__promptHashCache = new Map());
|
|
20
18
|
/**
|
|
21
19
|
* Check if the given prompt content is a duplicate of the last saved prompt
|
|
22
20
|
* for the same pollerKey. If not a duplicate, updates the cache.
|
|
@@ -96,6 +96,35 @@ function observeUpstreamFaultForPush(worktreeId, cliToolId, instanceId, output)
|
|
|
96
96
|
matchedText: match?.matchedText,
|
|
97
97
|
}).catch(() => { });
|
|
98
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* The `onUpdated` hook for `markPendingPromptsAsAnswered` (Issue #2195).
|
|
101
|
+
*
|
|
102
|
+
* The sweep stamps every still-pending prompt row of an instance the moment the
|
|
103
|
+
* agent is seen to have moved on, which flips a prompt card in the chat surface
|
|
104
|
+
* from "waiting for your answer" to answered. That was the one history mutation
|
|
105
|
+
* with no realtime frame behind it, so every open pane kept showing the stale
|
|
106
|
+
* card until its next `/messages` poll — and #2195 stretches that poll to 15s
|
|
107
|
+
* whenever a socket is up, so the omission had to be closed in the same change
|
|
108
|
+
* that introduced the longer interval.
|
|
109
|
+
*
|
|
110
|
+
* `message_updated`, never `message`: the row already existed and was already
|
|
111
|
+
* delivered when it was created, so a client that appended instead of replacing
|
|
112
|
+
* would show the question twice.
|
|
113
|
+
*/
|
|
114
|
+
function broadcastPromptSweptToAnswered(worktreeId) {
|
|
115
|
+
return (message) => {
|
|
116
|
+
try {
|
|
117
|
+
(0, ws_server_1.broadcastMessage)('message_updated', { worktreeId, message });
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
// The rows are already stamped; a socket write must not fail the poll.
|
|
121
|
+
logger.warn('prompt-sweep-broadcast-failed', {
|
|
122
|
+
worktreeId,
|
|
123
|
+
error: error instanceof Error ? error.message : String(error),
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
}
|
|
99
128
|
// Issue #1790: arm the waiting-edge push subscription.
|
|
100
129
|
//
|
|
101
130
|
// It has to exist before the first edge, and `server.ts` reaches this module at
|
|
@@ -593,7 +622,7 @@ async function checkForResponse(worktreeId, cliToolId, instanceId) {
|
|
|
593
622
|
const cleanOutput = (0, cli_patterns_1.stripAnsi)(output);
|
|
594
623
|
const tailLines = cleanOutput.split('\n').slice(-thinking_constants_1.THINKING_TAIL_LINE_COUNT).join('\n');
|
|
595
624
|
if (thinkingPattern.test(tailLines)) {
|
|
596
|
-
const answeredCount = (0, db_1.markPendingPromptsAsAnswered)(db, worktreeId, cliToolId, resolvedInstanceId);
|
|
625
|
+
const answeredCount = (0, db_1.markPendingPromptsAsAnswered)(db, worktreeId, cliToolId, resolvedInstanceId, broadcastPromptSweptToAnswered(worktreeId));
|
|
597
626
|
if (answeredCount > 0) {
|
|
598
627
|
logger.info('marked-answeredcount-pending');
|
|
599
628
|
}
|
|
@@ -809,13 +838,25 @@ async function checkForResponse(worktreeId, cliToolId, instanceId) {
|
|
|
809
838
|
// (the prompt row, Auto-Yes, the waiting episode, the push fan-out), and the
|
|
810
839
|
// liveness answer is only allowed to suppress the two calls that RECORD THE
|
|
811
840
|
// REPLY. See `./structured-history-gate` for the whole argument.
|
|
812
|
-
|
|
841
|
+
//
|
|
842
|
+
// Issue #2121 adds the second shape. Claude has no stream to be live on; it
|
|
843
|
+
// has a transcript file, and this is the moment to read it — the turn is
|
|
844
|
+
// finished (everything above this line established that) and the row is
|
|
845
|
+
// about to be written. `captureStructuredHistoryTurn` writes the agent's own
|
|
846
|
+
// Markdown and answers true, or answers false and leaves the scrape below to
|
|
847
|
+
// be the only record. `||` and not `&&`: the two are different tools'
|
|
848
|
+
// answers to the same question, and each one is false for the other's tool.
|
|
849
|
+
const structuredHistoryLive = (0, structured_history_gate_1.isStructuredHistoryWriterLive)(worktreeId, cliToolId, instanceId) ||
|
|
850
|
+
(await (0, structured_history_gate_1.captureStructuredHistoryTurn)(worktreeId, cliToolId, instanceId, {
|
|
851
|
+
worktreePath: worktree.path,
|
|
852
|
+
transcriptPathHint: claudeMetadata?.logFilePath ?? null,
|
|
853
|
+
}));
|
|
813
854
|
// Create Markdown log file for the conversation pair
|
|
814
855
|
if (cleanedResponse && !structuredHistoryLive) {
|
|
815
856
|
await (0, conversation_logger_1.recordClaudeConversation)(db, worktreeId, cleanedResponse, cliToolId);
|
|
816
857
|
}
|
|
817
858
|
// Mark any pending prompts as answered
|
|
818
|
-
const answeredCount = (0, db_1.markPendingPromptsAsAnswered)(db, worktreeId, cliToolId, resolvedInstanceId);
|
|
859
|
+
const answeredCount = (0, db_1.markPendingPromptsAsAnswered)(db, worktreeId, cliToolId, resolvedInstanceId, broadcastPromptSweptToAnswered(worktreeId));
|
|
819
860
|
if (answeredCount > 0) {
|
|
820
861
|
logger.info('marked-answeredcount-pending');
|
|
821
862
|
}
|
|
@@ -23,10 +23,8 @@ exports.isDuplicateResponse = isDuplicateResponse;
|
|
|
23
23
|
exports.clearResponseHashCache = clearResponseHashCache;
|
|
24
24
|
exports.renameResponseHashCacheKey = renameResponseHashCacheKey;
|
|
25
25
|
const crypto_1 = require("crypto");
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
*/
|
|
29
|
-
const responseHashCache = new Map();
|
|
26
|
+
const responseHashCache = globalThis.__responseHashCache ??
|
|
27
|
+
(globalThis.__responseHashCache = new Map());
|
|
30
28
|
/**
|
|
31
29
|
* Check whether the given response content was already saved during the current
|
|
32
30
|
* polling cycle for the same pollerKey. If it is new, updates the cache.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/** Polling lifecycle management: start, stop, schedule, and state tracking for response polling. */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.pollingStartTimes = exports.activePollers = exports.GEMINI_LOADING_INDICATORS = exports.MAX_POLLING_DURATION = exports.POLLING_INTERVAL = void 0;
|
|
4
|
+
exports.pollingStartTimes = exports.activePollers = exports.GEMINI_LOADING_INDICATORS = exports.STALLED_TICK_TIMEOUT = exports.MAX_POLLING_DURATION = exports.POLLING_INTERVAL = void 0;
|
|
5
5
|
exports.getPollerKey = getPollerKey;
|
|
6
6
|
exports.startPolling = startPolling;
|
|
7
7
|
exports.scheduleNextResponsePoll = scheduleNextResponsePoll;
|
|
@@ -9,6 +9,7 @@ exports.stopPolling = stopPolling;
|
|
|
9
9
|
exports.stopAllPolling = stopAllPolling;
|
|
10
10
|
exports.getActivePollers = getActivePollers;
|
|
11
11
|
exports.migrateResponsePollerWorktreeIds = migrateResponsePollerWorktreeIds;
|
|
12
|
+
const async_hooks_1 = require("async_hooks");
|
|
12
13
|
const logger_1 = require("../../lib/logger");
|
|
13
14
|
const tui_accumulator_1 = require("../tui-accumulator");
|
|
14
15
|
const prompt_dedup_1 = require("./prompt-dedup");
|
|
@@ -29,6 +30,19 @@ exports.POLLING_INTERVAL = 2000;
|
|
|
29
30
|
* Previously 5 minutes, which caused silent polling stops for long-running tasks.
|
|
30
31
|
*/
|
|
31
32
|
exports.MAX_POLLING_DURATION = 30 * 60 * 1000;
|
|
33
|
+
/**
|
|
34
|
+
* How long a tick may sit inside `checkForResponse()` before a restart stops
|
|
35
|
+
* waiting for it (Issue #2223).
|
|
36
|
+
*
|
|
37
|
+
* Restarts are normally handed to the in-flight tick so the old and new chains
|
|
38
|
+
* never run at once. That queue is only safe while the tick is guaranteed to
|
|
39
|
+
* settle: a `checkForResponse()` that never resolves would otherwise park every
|
|
40
|
+
* later `startPolling()` for that session *forever*, which is a worse failure
|
|
41
|
+
* than the overlap the queue avoids. One tmux capture plus the save path is
|
|
42
|
+
* seconds at the outside, so a minute means the tick is lost, and the restart
|
|
43
|
+
* goes ahead without it.
|
|
44
|
+
*/
|
|
45
|
+
exports.STALLED_TICK_TIMEOUT = 60 * 1000;
|
|
32
46
|
/**
|
|
33
47
|
* Gemini auth/loading state indicators that should not be treated as complete responses.
|
|
34
48
|
* Braille spinner characters are shared with CLAUDE_SPINNER_CHARS in cli-patterns.ts.
|
|
@@ -38,25 +52,38 @@ exports.GEMINI_LOADING_INDICATORS = [
|
|
|
38
52
|
'Waiting for auth',
|
|
39
53
|
'\u280b', '\u2819', '\u2839', '\u2838', '\u283c', '\u2834', '\u2826', '\u2827', '\u2807', '\u280f',
|
|
40
54
|
];
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
55
|
+
const coordinator = globalThis.__responsePollerCoordinator ??
|
|
56
|
+
(globalThis.__responsePollerCoordinator = {
|
|
57
|
+
activePollers: new Map(),
|
|
58
|
+
pollingStartTimes: new Map(),
|
|
59
|
+
owners: new Map(),
|
|
60
|
+
running: new Map(),
|
|
61
|
+
pendingRestart: new Map(),
|
|
62
|
+
ownerStorage: new async_hooks_1.AsyncLocalStorage(),
|
|
63
|
+
generationCounter: 0,
|
|
64
|
+
});
|
|
44
65
|
/**
|
|
45
66
|
* Active pollers map: "worktreeId:instanceId" -> NodeJS.Timeout
|
|
46
67
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
68
|
+
* Shared through `globalThis` (see {@link PollerCoordinator}): the Node module
|
|
69
|
+
* cache does **not** give this singleton behaviour, because the module is
|
|
70
|
+
* evaluated once per bundle and `next start` builds more than one bundle that
|
|
71
|
+
* reaches it (Issue #2223).
|
|
49
72
|
*
|
|
50
73
|
* Issue #868: The key is scoped by instanceId so multiple instances of the
|
|
51
74
|
* same CLI tool on one worktree get independent pollers. For the primary
|
|
52
75
|
* instance (instanceId omitted or equal to cliToolId), the key is identical
|
|
53
76
|
* to the legacy "worktreeId:cliToolId" form for backward compatibility.
|
|
77
|
+
*
|
|
78
|
+
* Membership alone does **not** say who owns the chain — a tick that has
|
|
79
|
+
* already fired leaves its timer here while it runs. Code deciding whether to
|
|
80
|
+
* keep polling must compare ownership tokens, not call `.has()`.
|
|
54
81
|
*/
|
|
55
|
-
exports.activePollers =
|
|
82
|
+
exports.activePollers = coordinator.activePollers;
|
|
56
83
|
/**
|
|
57
84
|
* Polling start times map: "worktreeId:instanceId" -> timestamp
|
|
58
85
|
*/
|
|
59
|
-
exports.pollingStartTimes =
|
|
86
|
+
exports.pollingStartTimes = coordinator.pollingStartTimes;
|
|
60
87
|
/**
|
|
61
88
|
* Generate poller key from worktree ID and agent instance.
|
|
62
89
|
*
|
|
@@ -70,12 +97,31 @@ exports.pollingStartTimes = new Map();
|
|
|
70
97
|
function getPollerKey(worktreeId, cliToolId, instanceId) {
|
|
71
98
|
return `${worktreeId}:${instanceId ?? cliToolId}`;
|
|
72
99
|
}
|
|
100
|
+
/** Hand `pollerKey` to a brand-new chain, retiring whichever chain held it. */
|
|
101
|
+
function takeOwnership(pollerKey) {
|
|
102
|
+
const previous = coordinator.owners.get(pollerKey);
|
|
103
|
+
if (previous)
|
|
104
|
+
previous.superseded = true;
|
|
105
|
+
const owner = {
|
|
106
|
+
pollerKey,
|
|
107
|
+
generation: ++coordinator.generationCounter,
|
|
108
|
+
superseded: false,
|
|
109
|
+
stopped: false,
|
|
110
|
+
};
|
|
111
|
+
coordinator.owners.set(pollerKey, owner);
|
|
112
|
+
return owner;
|
|
113
|
+
}
|
|
73
114
|
// ============================================================================
|
|
74
115
|
// Polling lifecycle (public API)
|
|
75
116
|
// ============================================================================
|
|
76
117
|
/**
|
|
77
118
|
* Start polling for CLI tool response
|
|
78
119
|
*
|
|
120
|
+
* Issue #2223: at most one chain per poller key exists in the whole process,
|
|
121
|
+
* and starting one while a tick of the previous chain is still inside
|
|
122
|
+
* `checkForResponse()` does **not** run the two side by side — the restart is
|
|
123
|
+
* handed to that tick's epilogue and applied when it settles.
|
|
124
|
+
*
|
|
79
125
|
* @param worktreeId - Worktree ID
|
|
80
126
|
* @param cliToolId - CLI tool ID (claude, codex, gemini)
|
|
81
127
|
* @param instanceId - Optional agent instance ID (defaults to primary)
|
|
@@ -87,30 +133,87 @@ function getPollerKey(worktreeId, cliToolId, instanceId) {
|
|
|
87
133
|
*/
|
|
88
134
|
function startPolling(worktreeId, cliToolId, instanceId) {
|
|
89
135
|
const pollerKey = getPollerKey(worktreeId, cliToolId, instanceId);
|
|
136
|
+
const target = { worktreeId, cliToolId, instanceId };
|
|
137
|
+
const inFlight = coordinator.running.get(pollerKey);
|
|
138
|
+
if (inFlight) {
|
|
139
|
+
// Whatever happens next, the tick that is mid-flight has lost the key: it
|
|
140
|
+
// must not reschedule itself over the new chain, and its snapshot is of the
|
|
141
|
+
// previous turn.
|
|
142
|
+
inFlight.owner.superseded = true;
|
|
143
|
+
if (Date.now() - inFlight.since < exports.STALLED_TICK_TIMEOUT) {
|
|
144
|
+
coordinator.pendingRestart.set(pollerKey, target);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
logger.warn('poller:restart-past-stalled-tick', {
|
|
148
|
+
pollerKey,
|
|
149
|
+
generation: inFlight.owner.generation,
|
|
150
|
+
runningForMs: Date.now() - inFlight.since,
|
|
151
|
+
});
|
|
152
|
+
coordinator.running.delete(pollerKey);
|
|
153
|
+
}
|
|
90
154
|
// Stop existing poller if any
|
|
91
155
|
stopPolling(worktreeId, cliToolId, instanceId);
|
|
156
|
+
beginPolling(target);
|
|
157
|
+
}
|
|
158
|
+
/** Seed a fresh polling cycle (start time, TUI accumulator) and schedule its first tick. */
|
|
159
|
+
function beginPolling(target) {
|
|
160
|
+
const pollerKey = getPollerKey(target.worktreeId, target.cliToolId, target.instanceId);
|
|
92
161
|
// Record start time
|
|
93
|
-
|
|
162
|
+
coordinator.pollingStartTimes.set(pollerKey, Date.now());
|
|
94
163
|
// Initialize TUI accumulator for full-screen TUI tools (Layer 2 safety net)
|
|
95
|
-
if (cliToolId === 'opencode' || cliToolId === 'copilot') {
|
|
164
|
+
if (target.cliToolId === 'opencode' || target.cliToolId === 'copilot') {
|
|
96
165
|
(0, tui_accumulator_1.initTuiAccumulator)(pollerKey);
|
|
97
166
|
}
|
|
98
167
|
// Start polling with setTimeout chain to prevent race conditions
|
|
99
|
-
scheduleNextResponsePoll(worktreeId, cliToolId, instanceId);
|
|
168
|
+
scheduleNextResponsePoll(target.worktreeId, target.cliToolId, target.instanceId);
|
|
100
169
|
}
|
|
101
|
-
/**
|
|
170
|
+
/**
|
|
171
|
+
* Take over `pollerKey` with a new chain and schedule its first tick.
|
|
172
|
+
*
|
|
173
|
+
* Public because {@link migrateResponsePollerWorktreeIds} restarts a poller
|
|
174
|
+
* under a new worktree ID with it. The chain's own continuation does *not* go
|
|
175
|
+
* through here: it keeps its ownership token, so its generation survives the
|
|
176
|
+
* whole cycle.
|
|
177
|
+
*/
|
|
102
178
|
function scheduleNextResponsePoll(worktreeId, cliToolId, instanceId) {
|
|
103
179
|
const pollerKey = getPollerKey(worktreeId, cliToolId, instanceId);
|
|
104
|
-
|
|
180
|
+
scheduleTick({ worktreeId, cliToolId, instanceId }, takeOwnership(pollerKey));
|
|
181
|
+
}
|
|
182
|
+
/** Arm the next tick of an existing chain, keeping its ownership token. */
|
|
183
|
+
function scheduleTick(target, owner) {
|
|
184
|
+
const timerId = setTimeout(() => {
|
|
185
|
+
void runPollTick(target, owner);
|
|
186
|
+
}, exports.POLLING_INTERVAL);
|
|
187
|
+
coordinator.activePollers.set(owner.pollerKey, timerId);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* One poll: check for a response, push a snapshot, and arm the next tick.
|
|
191
|
+
*
|
|
192
|
+
* Every decision after the `await` is made against `owner`, never against the
|
|
193
|
+
* presence of a key in {@link activePollers}. `clearTimeout()` cannot cancel a
|
|
194
|
+
* timer that has already fired, so a tick of a chain that was stopped or
|
|
195
|
+
* superseded while it was awaiting `checkForResponse()` still gets here — and
|
|
196
|
+
* before #2223 it read `activePollers.has()` as "I am still the poller",
|
|
197
|
+
* re-registering its own timer over the live one and leaving that poller's
|
|
198
|
+
* timer running but untracked (Issue #2223).
|
|
199
|
+
*/
|
|
200
|
+
async function runPollTick(target, owner) {
|
|
201
|
+
const pollerKey = owner.pollerKey;
|
|
202
|
+
// The timer fired for a chain that has since lost the key. Nothing to do:
|
|
203
|
+
// whoever retired it also armed (or deliberately did not arm) the successor.
|
|
204
|
+
if (owner.superseded || owner.stopped)
|
|
205
|
+
return;
|
|
206
|
+
coordinator.running.set(pollerKey, { owner, since: Date.now() });
|
|
207
|
+
try {
|
|
105
208
|
// Check if max duration exceeded
|
|
106
|
-
const startTime =
|
|
209
|
+
const startTime = coordinator.pollingStartTimes.get(pollerKey);
|
|
107
210
|
if (startTime && Date.now() - startTime > exports.MAX_POLLING_DURATION) {
|
|
108
|
-
|
|
211
|
+
stopPollingByKey(pollerKey);
|
|
109
212
|
return;
|
|
110
213
|
}
|
|
111
214
|
// Check for response
|
|
112
215
|
try {
|
|
113
|
-
await (0, response_checker_1.checkForResponse)(worktreeId, cliToolId, instanceId);
|
|
216
|
+
await coordinator.ownerStorage.run(owner, () => (0, response_checker_1.checkForResponse)(target.worktreeId, target.cliToolId, target.instanceId));
|
|
114
217
|
}
|
|
115
218
|
catch (error) {
|
|
116
219
|
logger.error('error:', { error: error instanceof Error ? error.message : String(error) });
|
|
@@ -118,25 +221,65 @@ function scheduleNextResponsePoll(worktreeId, cliToolId, instanceId) {
|
|
|
118
221
|
// Issue #1120: push the current terminal snapshot to WS subscribers so the
|
|
119
222
|
// output streams during generation. No-op (and no tmux capture) when nobody
|
|
120
223
|
// is subscribed to the worktree room. Best-effort; polling is the fallback.
|
|
121
|
-
|
|
224
|
+
//
|
|
225
|
+
// Issue #2223: skipped once another chain owns the key — a superseded tick
|
|
226
|
+
// would push the previous turn's screen on top of the live one, and its
|
|
227
|
+
// `version` counter would make the client drop the real frame that follows.
|
|
228
|
+
if (!owner.superseded) {
|
|
229
|
+
void (0, terminal_broadcast_1.broadcastTerminalSnapshot)(target.worktreeId, target.cliToolId, target.instanceId);
|
|
230
|
+
}
|
|
122
231
|
// Schedule next poll ONLY after current one completes
|
|
123
|
-
// Guard: only if
|
|
124
|
-
if (
|
|
125
|
-
|
|
232
|
+
// Guard: only if THIS chain is still the poller for the key (Issue #2223)
|
|
233
|
+
if (!owner.superseded && !owner.stopped) {
|
|
234
|
+
scheduleTick(target, owner);
|
|
126
235
|
}
|
|
127
|
-
}
|
|
128
|
-
|
|
236
|
+
}
|
|
237
|
+
finally {
|
|
238
|
+
if (coordinator.running.get(pollerKey)?.owner === owner) {
|
|
239
|
+
coordinator.running.delete(pollerKey);
|
|
240
|
+
}
|
|
241
|
+
// Apply a restart that arrived while this tick was in flight. Doing it here
|
|
242
|
+
// rather than in startPolling() is what keeps the old and new chains from
|
|
243
|
+
// polling the same pane at the same time.
|
|
244
|
+
const pending = coordinator.pendingRestart.get(pollerKey);
|
|
245
|
+
if (pending) {
|
|
246
|
+
coordinator.pendingRestart.delete(pollerKey);
|
|
247
|
+
stopPollingByKey(pollerKey);
|
|
248
|
+
beginPolling(pending);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
129
251
|
}
|
|
130
252
|
/**
|
|
131
253
|
* Stop the poller identified by an already-computed poller key.
|
|
132
254
|
* Shared by stopPolling() and stopAllPolling() so cleanup logic stays in one place.
|
|
133
255
|
*/
|
|
134
256
|
function stopPollingByKey(pollerKey) {
|
|
135
|
-
|
|
257
|
+
// Issue #2223: a tick that has been superseded still runs to completion, and
|
|
258
|
+
// `checkForResponse()` ends the turn with `stopPolling()` on four paths
|
|
259
|
+
// (worktree gone, session not running, prompt detected, TUI reply saved).
|
|
260
|
+
// Honouring that verdict would kill the chain that replaced it — the old
|
|
261
|
+
// tick is describing a turn that is already over.
|
|
262
|
+
const caller = coordinator.ownerStorage.getStore();
|
|
263
|
+
if (caller && caller.pollerKey === pollerKey && (caller.superseded || caller.stopped)) {
|
|
264
|
+
logger.info('poller:stale-stop-ignored', {
|
|
265
|
+
pollerKey,
|
|
266
|
+
generation: caller.generation,
|
|
267
|
+
});
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
const owner = coordinator.owners.get(pollerKey);
|
|
271
|
+
if (owner) {
|
|
272
|
+
owner.stopped = true;
|
|
273
|
+
coordinator.owners.delete(pollerKey);
|
|
274
|
+
}
|
|
275
|
+
// A restart queued behind an in-flight tick is cancelled by an explicit stop:
|
|
276
|
+
// "start then stop" must leave the session stopped.
|
|
277
|
+
coordinator.pendingRestart.delete(pollerKey);
|
|
278
|
+
const timerId = coordinator.activePollers.get(pollerKey);
|
|
136
279
|
if (timerId) {
|
|
137
280
|
clearTimeout(timerId);
|
|
138
|
-
|
|
139
|
-
|
|
281
|
+
coordinator.activePollers.delete(pollerKey);
|
|
282
|
+
coordinator.pollingStartTimes.delete(pollerKey);
|
|
140
283
|
}
|
|
141
284
|
// Clean up TUI accumulator if present
|
|
142
285
|
(0, tui_accumulator_1.clearTuiAccumulator)(pollerKey);
|
|
@@ -166,9 +309,14 @@ function stopPolling(worktreeId, cliToolId, instanceId) {
|
|
|
166
309
|
* Used for cleanup on server shutdown
|
|
167
310
|
*/
|
|
168
311
|
function stopAllPolling() {
|
|
169
|
-
|
|
312
|
+
const keys = new Set([
|
|
313
|
+
...Array.from(coordinator.activePollers.keys()),
|
|
314
|
+
...Array.from(coordinator.owners.keys()),
|
|
315
|
+
]);
|
|
316
|
+
for (const pollerKey of keys) {
|
|
170
317
|
stopPollingByKey(pollerKey);
|
|
171
318
|
}
|
|
319
|
+
coordinator.pendingRestart.clear();
|
|
172
320
|
}
|
|
173
321
|
/**
|
|
174
322
|
* Get list of active pollers
|
|
@@ -176,7 +324,7 @@ function stopAllPolling() {
|
|
|
176
324
|
* @returns Array of worktree IDs currently being polled
|
|
177
325
|
*/
|
|
178
326
|
function getActivePollers() {
|
|
179
|
-
return Array.from(
|
|
327
|
+
return Array.from(coordinator.activePollers.keys());
|
|
180
328
|
}
|
|
181
329
|
/** Split a poller key into its worktree and instance halves. */
|
|
182
330
|
function splitPollerKey(pollerKey) {
|
|
@@ -200,8 +348,9 @@ function splitPollerKey(pollerKey) {
|
|
|
200
348
|
* would go on capturing `mcbd-<cli>-<OLD id>` (a session that no longer exists
|
|
201
349
|
* after the rename), writing its messages against an ID no row carries, and
|
|
202
350
|
* re-registering the old key the moment it fired. So each poller is torn down
|
|
203
|
-
* and restarted under the new ID
|
|
204
|
-
*
|
|
351
|
+
* and restarted under the new ID — ownership token included (Issue #2223), so a
|
|
352
|
+
* tick already inside `checkForResponse()` cannot come back and act on the old
|
|
353
|
+
* ID — with everything that represents *progress* carried across:
|
|
205
354
|
*
|
|
206
355
|
* - `pollingStartTimes`, so MAX_POLLING_DURATION still measures from when the
|
|
207
356
|
* turn actually began rather than restarting the 30-minute budget;
|
|
@@ -264,6 +413,19 @@ function migrateResponsePollerWorktreeIds(renames, resolveCliToolId) {
|
|
|
264
413
|
if (timerId)
|
|
265
414
|
clearTimeout(timerId);
|
|
266
415
|
exports.activePollers.delete(move.oldKey);
|
|
416
|
+
// Issue #2223: retire the ownership token as well. A tick that is inside
|
|
417
|
+
// `checkForResponse()` right now cannot be cancelled by `clearTimeout`, and
|
|
418
|
+
// without this it would resume, find its key gone and — before #2223 —
|
|
419
|
+
// still be able to act on the old worktree ID. Marked superseded rather
|
|
420
|
+
// than merely stopped: Phase 2 below arms a replacement chain, so the old
|
|
421
|
+
// tick's snapshot would land on top of the new one's.
|
|
422
|
+
const retired = coordinator.owners.get(move.oldKey);
|
|
423
|
+
if (retired) {
|
|
424
|
+
retired.superseded = true;
|
|
425
|
+
retired.stopped = true;
|
|
426
|
+
coordinator.owners.delete(move.oldKey);
|
|
427
|
+
}
|
|
428
|
+
coordinator.pendingRestart.delete(move.oldKey);
|
|
267
429
|
carried.set(move.newKey, { startedAt: exports.pollingStartTimes.get(move.oldKey) });
|
|
268
430
|
exports.pollingStartTimes.delete(move.oldKey);
|
|
269
431
|
(0, prompt_dedup_1.renamePromptHashCacheKey)(move.oldKey, move.newKey);
|