commandmate 0.30.2 → 0.31.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 +160 -160
- package/.next/app-path-routes-manifest.json +27 -27
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +9 -9
- 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/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 +3 -3
- 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 +4 -4
- 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_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 +1 -1
- 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_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/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_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.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.js +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/slash-commands/route.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_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.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.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.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_client-reference-manifest.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_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 +4 -3
- 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.js +4 -3
- package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route.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_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.js +2 -2
- package/.next/server/app/chat/page.js.nft.json +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.js +1 -1
- package/.next/server/app/page.js.nft.json +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.js +2 -2
- package/.next/server/app/repositories/page.js.nft.json +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.js.nft.json +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sessions/page.js +1 -1
- package/.next/server/app/sessions/page.js.nft.json +1 -1
- package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/[skillId]/page.js +2 -2
- package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -1
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/installed/page.js +2 -2
- package/.next/server/app/skills/installed/page.js.nft.json +1 -1
- package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/page.js +1 -1
- package/.next/server/app/skills/page.js.nft.json +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 +10 -10
- package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
- package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +27 -27
- package/.next/server/chunks/1058.js +1 -1
- package/.next/server/chunks/1068.js +1 -1
- package/.next/server/chunks/1262.js +1 -1
- package/.next/server/chunks/1886.js +3 -3
- package/.next/server/chunks/1990.js +103 -0
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/2328.js +1 -1
- package/.next/server/chunks/2404.js +1 -1
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/261.js +1 -1
- package/.next/server/chunks/3123.js +1 -1
- package/.next/server/chunks/3241.js +1 -1
- package/.next/server/chunks/3480.js +5 -4
- package/.next/server/chunks/4299.js +1 -1
- package/.next/server/chunks/4393.js +1 -1
- package/.next/server/chunks/4443.js +1 -5
- package/.next/server/chunks/5017.js +1 -1
- package/.next/server/chunks/5043.js +1 -1
- package/.next/server/chunks/5164.js +1 -1
- package/.next/server/chunks/552.js +2 -2
- package/.next/server/chunks/6072.js +1 -1
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/663.js +4 -3
- package/.next/server/chunks/6894.js +2 -2
- package/.next/server/chunks/7187.js +1 -0
- package/.next/server/chunks/7472.js +1 -1
- package/.next/server/chunks/{880.js → 7859.js} +6 -6
- package/.next/server/chunks/7905.js +1 -1
- package/.next/server/chunks/8800.js +2 -2
- package/.next/server/chunks/8918.js +7 -0
- package/.next/server/chunks/9123.js +2 -2
- package/.next/server/chunks/9130.js +4 -4
- package/.next/server/chunks/9627.js +1 -1
- package/.next/server/chunks/9696.js +1 -1
- 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/pages-manifest.json +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/1783-11c9b4d8a52ebd91.js +1 -0
- package/.next/static/chunks/4718-de1224c9e8a6e7fc.js +1 -0
- package/.next/static/chunks/6022-2fa0b5a82d4ce7b6.js +1 -0
- package/.next/static/chunks/{5229-6c89475b61bd2c8b.js → 6170-951b9f5fe6b4b3b5.js} +1 -1
- package/.next/static/chunks/app/chat/{page-9aa2011410895b0d.js → page-37d7615d17d7e2a0.js} +1 -1
- package/.next/static/chunks/app/layout-4c2f21e3f653ee4c.js +1 -0
- package/.next/static/chunks/app/more/{page-333bba1c8bbc9c11.js → page-353a3924e6d7968e.js} +1 -1
- package/.next/static/chunks/app/{page-214f7ffa13a0cf10.js → page-c2bf871d953a1d6f.js} +1 -1
- package/.next/static/chunks/app/repositories/{page-4951cac905e50224.js → page-7d0f26df0537254c.js} +1 -1
- package/.next/static/chunks/app/review/{page-a0899b2d285318c3.js → page-e3f141b2829973e9.js} +1 -1
- package/.next/static/chunks/app/sessions/{page-fb36145ec732092a.js → page-53f188ed9ca49e5f.js} +1 -1
- package/.next/static/chunks/app/skills/[skillId]/{page-9099e26b60442873.js → page-80569b720aea59cc.js} +1 -1
- package/.next/static/chunks/app/skills/installed/{page-182e32368696d824.js → page-dbd2690ad72da95b.js} +1 -1
- package/.next/static/chunks/app/skills/{page-d3fdc88239ebe0ab.js → page-dacd36f9c11aa7da.js} +1 -1
- package/.next/static/chunks/app/worktrees/[id]/page-97205088520255a5.js +1 -0
- package/.next/static/css/5c13ea243dfdcb66.css +1 -0
- package/.next/trace +13 -13
- package/README.md +37 -11
- package/dist/cli/commands/attach.d.ts +50 -0
- package/dist/cli/commands/attach.d.ts.map +1 -0
- package/dist/cli/commands/attach.js +204 -0
- package/dist/cli/commands/capture.d.ts.map +1 -1
- package/dist/cli/commands/capture.js +114 -0
- package/dist/cli/commands/instances.d.ts.map +1 -1
- package/dist/cli/commands/instances.js +23 -2
- package/dist/cli/commands/ls.d.ts.map +1 -1
- package/dist/cli/commands/ls.js +41 -1
- package/dist/cli/config/cli-dependencies.d.ts.map +1 -1
- package/dist/cli/config/cli-dependencies.js +34 -0
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +5 -0
- package/dist/cli/types/index.d.ts +36 -0
- package/dist/cli/types/index.d.ts.map +1 -1
- package/dist/config/tmux-pane-config.d.ts +153 -0
- package/dist/config/tmux-pane-config.d.ts.map +1 -0
- package/dist/config/tmux-pane-config.js +172 -0
- package/dist/lib/cli-tools/session-name.d.ts +44 -0
- package/dist/lib/cli-tools/session-name.d.ts.map +1 -0
- package/dist/lib/cli-tools/session-name.js +57 -0
- package/dist/lib/cli-tools/types.d.ts +1 -1
- package/dist/lib/cli-tools/types.d.ts.map +1 -1
- package/dist/lib/cli-tools/types.js +6 -1
- package/dist/lib/cli-tools/validation.d.ts +34 -0
- package/dist/lib/cli-tools/validation.d.ts.map +1 -0
- package/dist/lib/cli-tools/validation.js +41 -0
- package/dist/lib/detection/status-reason.d.ts +18 -0
- package/dist/lib/detection/status-reason.d.ts.map +1 -1
- package/dist/lib/detection/status-reason.js +18 -0
- package/dist/lib/detection/tools/verified-against.d.ts +57 -7
- package/dist/lib/detection/tools/verified-against.d.ts.map +1 -1
- package/dist/lib/detection/tools/verified-against.js +59 -8
- package/dist/lib/detection/version-probes.d.ts +26 -5
- package/dist/lib/detection/version-probes.d.ts.map +1 -1
- package/dist/lib/detection/version-probes.js +28 -6
- package/dist/lib/session/tmux-session-surface.d.ts +369 -0
- package/dist/lib/session/tmux-session-surface.d.ts.map +1 -0
- package/dist/lib/session/tmux-session-surface.js +525 -0
- package/dist/server/src/config/cli-tool-timing-config.js +12 -1
- package/dist/server/src/config/detection-evidence-config.js +5 -0
- package/dist/server/src/config/schedule-config.js +28 -1
- package/dist/server/src/lib/cli-tools/antigravity.js +2 -2
- package/dist/server/src/lib/cli-tools/base.js +13 -8
- package/dist/server/src/lib/cli-tools/claude.js +20 -0
- package/dist/server/src/lib/cli-tools/codex.js +205 -61
- package/dist/server/src/lib/cli-tools/command-code.js +349 -0
- package/dist/server/src/lib/cli-tools/composer-spec.js +6 -0
- package/dist/server/src/lib/cli-tools/copilot.js +2 -2
- package/dist/server/src/lib/cli-tools/gemini.js +2 -2
- package/dist/server/src/lib/cli-tools/graceful-exit.js +16 -1
- package/dist/server/src/lib/cli-tools/index.js +4 -1
- package/dist/server/src/lib/cli-tools/install-hints.js +131 -0
- package/dist/server/src/lib/cli-tools/liveness-spec.js +18 -0
- package/dist/server/src/lib/cli-tools/manager.js +2 -0
- package/dist/server/src/lib/cli-tools/opencode.js +2 -2
- package/dist/server/src/lib/cli-tools/start-availability.js +18 -11
- package/dist/server/src/lib/cli-tools/types.js +6 -1
- package/dist/server/src/lib/cli-tools/vibe-local.js +2 -2
- package/dist/server/src/lib/cmate-parser.js +6 -0
- package/dist/server/src/lib/detection/cli-patterns.js +441 -8
- package/dist/server/src/lib/detection/opencode-modal-overlay.js +66 -100
- package/dist/server/src/lib/detection/selection-shape.js +341 -0
- package/dist/server/src/lib/detection/sgr-background.js +210 -0
- package/dist/server/src/lib/detection/status-detector.js +6 -0
- package/dist/server/src/lib/detection/status-reason.js +18 -0
- package/dist/server/src/lib/detection/tools/antigravity/detect.js +38 -15
- package/dist/server/src/lib/detection/tools/codex/cli-patterns.js +392 -0
- package/dist/server/src/lib/detection/tools/codex/detect.js +83 -2
- package/dist/server/src/lib/detection/tools/command-code/detect.js +159 -0
- package/dist/server/src/lib/detection/tools/registry.js +6 -4
- package/dist/server/src/lib/detection/tools/verified-against.js +59 -8
- package/dist/server/src/lib/detection/version-probes.js +28 -6
- package/dist/server/src/lib/hooks/sources/antigravity/history.js +77 -16
- package/dist/server/src/lib/hooks/sources/claude/history.js +94 -18
- package/dist/server/src/lib/hooks/sources/codex/history.js +84 -15
- package/dist/server/src/lib/hooks/sources/codex/hooks-config.js +130 -17
- package/dist/server/src/lib/hooks/sources/codex/relay-install.js +145 -0
- package/dist/server/src/lib/hooks/sources/command-code/history.js +865 -0
- package/dist/server/src/lib/hooks/sources/command-code/hooks-config.js +390 -0
- package/dist/server/src/lib/hooks/sources/command-code/source.js +290 -0
- package/dist/server/src/lib/hooks/sources/command-code/tool-id.js +18 -0
- package/dist/server/src/lib/hooks/sources/command-code/transcript.js +604 -0
- package/dist/server/src/lib/hooks/sources/index.js +3 -1
- package/dist/server/src/lib/hooks/sources/opencode/history.js +57 -3
- package/dist/server/src/lib/hooks/sources/opencode/transcript.js +24 -28
- package/dist/server/src/lib/hooks/sources/registry.js +4 -0
- package/dist/server/src/lib/hooks/sources/turn-body.js +77 -19
- package/dist/server/src/lib/job-executor.js +12 -0
- package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +6 -0
- package/dist/server/src/lib/polling/response-checker.js +112 -7
- package/dist/server/src/lib/polling/structured-history-gate.js +15 -8
- package/dist/server/src/lib/realtime/types.js +15 -5
- package/dist/server/src/lib/response-cleaner.js +24 -1
- package/dist/server/src/lib/response-extractor.js +11 -0
- package/dist/server/src/lib/session/claude-executor.js +223 -4
- package/dist/server/src/lib/session/cli-session.js +52 -0
- package/dist/server/src/lib/session/tmux-session-surface.js +525 -0
- package/dist/server/src/lib/skills/compatibility-matrix.js +117 -1
- package/dist/server/src/lib/tmux/geometry-delegation.js +143 -0
- package/dist/server/src/lib/tmux/read-mode-pager.js +76 -10
- package/dist/server/src/lib/tmux/read-mode.js +44 -2
- package/dist/server/src/lib/tmux/session-hook-scripts.js +249 -0
- package/dist/server/src/lib/tmux/session-hooks.js +122 -0
- package/dist/server/src/lib/tmux/session-status-options.js +213 -0
- package/dist/server/src/lib/tmux/tmux.js +79 -2
- package/dist/server/src/lib/version-checker.js +110 -0
- package/dist/server/src/lib/ws-server.js +16 -10
- package/dist/server/src/types/agent-transcript.js +73 -1
- package/dist/server/src/types/terminal-keys.js +131 -3
- package/dist/types/terminal-keys.d.ts +100 -3
- package/dist/types/terminal-keys.d.ts.map +1 -1
- package/dist/types/terminal-keys.js +131 -3
- package/package.json +1 -1
- package/.next/server/chunks/3099.js +0 -5
- package/.next/server/chunks/7824.js +0 -1
- package/.next/static/chunks/3916-0e929d089282dc5d.js +0 -1
- package/.next/static/chunks/6022-7a7d1760fc9814c7.js +0 -1
- package/.next/static/chunks/6381-147dde2a967e9458.js +0 -1
- package/.next/static/chunks/app/layout-6a26ea22d5cf03dc.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-2f73d69187936627.js +0 -1
- package/.next/static/css/23f9c40ecc458c77.css +0 -1
- /package/.next/static/{QXxQbXWoo7ldUyOcv7PCZ → nXW4dPkpE_9xUf_9ySRff}/_buildManifest.js +0 -0
- /package/.next/static/{QXxQbXWoo7ldUyOcv7PCZ → nXW4dPkpE_9xUf_9ySRff}/_ssgManifest.js +0 -0
|
@@ -320,6 +320,47 @@ async function publishOpencodeTurnProgress(target, turn) {
|
|
|
320
320
|
});
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* When each backfilled turn's last assistant message finished (Issue #2273).
|
|
325
|
+
*
|
|
326
|
+
* `info.time.completed` on every `role: "assistant"` message, folded onto the
|
|
327
|
+
* turn key (`parentID`) with `Math.max` — a tool-calling turn produces more than
|
|
328
|
+
* one assistant message (measured: two, in turn 2 of the captured session) and
|
|
329
|
+
* the turn ended when the last of them did. `time.created` is the fallback for a
|
|
330
|
+
* message opencode has not marked complete.
|
|
331
|
+
*
|
|
332
|
+
* Read here rather than on the accumulator because `./transcript` is not this
|
|
333
|
+
* Issue's to change, and read defensively for the reason everything in this
|
|
334
|
+
* subsystem is: a shape opencode changes must cost the timestamp, not the row.
|
|
335
|
+
*
|
|
336
|
+
* @returns `parentID` → epoch ms; absent for a turn with no usable clock
|
|
337
|
+
*/
|
|
338
|
+
function lastOpencodeCompletedAt(body) {
|
|
339
|
+
const at = new Map();
|
|
340
|
+
if (!Array.isArray(body))
|
|
341
|
+
return at;
|
|
342
|
+
for (const entry of body) {
|
|
343
|
+
if (!(0, event_mapper_1.isPlainObject)(entry))
|
|
344
|
+
continue;
|
|
345
|
+
const info = (0, event_mapper_1.isPlainObject)(entry.info) ? entry.info : null;
|
|
346
|
+
if (!info || info.role !== 'assistant')
|
|
347
|
+
continue;
|
|
348
|
+
const userMessageId = (0, event_mapper_1.readStringField)(info, transcript_1.OPENCODE_TURN_KEY_FIELD);
|
|
349
|
+
if (!userMessageId)
|
|
350
|
+
continue;
|
|
351
|
+
const time = (0, event_mapper_1.isPlainObject)(info.time) ? info.time : null;
|
|
352
|
+
const finished = readFiniteNumber(time?.completed) ?? readFiniteNumber(time?.created) ?? null;
|
|
353
|
+
if (finished === null)
|
|
354
|
+
continue;
|
|
355
|
+
if (finished > (at.get(userMessageId) ?? 0))
|
|
356
|
+
at.set(userMessageId, finished);
|
|
357
|
+
}
|
|
358
|
+
return at;
|
|
359
|
+
}
|
|
360
|
+
/** A finite number, or null. */
|
|
361
|
+
function readFiniteNumber(value) {
|
|
362
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : null;
|
|
363
|
+
}
|
|
323
364
|
/**
|
|
324
365
|
* The turn currently open on this session, for tests and for callers that need
|
|
325
366
|
* to know whether a flush would do anything.
|
|
@@ -342,9 +383,12 @@ function peekOpencodeTurn(target, sessionId) {
|
|
|
342
383
|
*
|
|
343
384
|
* @param target - The instance
|
|
344
385
|
* @param sessionId - `ses_…` from the `session.idle` frame
|
|
386
|
+
* @param closedAt - When the turn ended, epoch ms. Defaults to now, which is
|
|
387
|
+
* what `session.idle` means: opencode's own end-of-turn frame is being handled
|
|
388
|
+
* (Issue #2273). A parameter only so a test need not move the clock.
|
|
345
389
|
* @returns Whether a row was written
|
|
346
390
|
*/
|
|
347
|
-
async function flushOpencodeTurn(target, sessionId) {
|
|
391
|
+
async function flushOpencodeTurn(target, sessionId, closedAt = Date.now()) {
|
|
348
392
|
const turns = transcripts.get(keyOf(target));
|
|
349
393
|
const turn = turns?.get(sessionId);
|
|
350
394
|
if (!turn || !turns)
|
|
@@ -353,7 +397,12 @@ async function flushOpencodeTurn(target, sessionId) {
|
|
|
353
397
|
// not find the accumulator still there and race a duplicate insert past the
|
|
354
398
|
// existence check below.
|
|
355
399
|
turns.delete(sessionId);
|
|
356
|
-
|
|
400
|
+
// The turn's END and not its start (Issue #2273). A reply dated where the turn
|
|
401
|
+
// opened draws ABOVE the tool approvals that were written seconds into it, so
|
|
402
|
+
// the chat surface reads question → answer → approval for a turn that really
|
|
403
|
+
// went question → approval → answer. `Math.max` because a clock that went
|
|
404
|
+
// backwards must not put the reply before its own prompt.
|
|
405
|
+
return writeOpencodeTurn(target, (0, transcript_1.renderOpencodeTurn)(turn), Math.max(turn.startedAt, closedAt), 'stream');
|
|
357
406
|
}
|
|
358
407
|
/**
|
|
359
408
|
* Forget everything held for one instance.
|
|
@@ -506,11 +555,16 @@ async function backfillOpencodeHistory(target, port, sessionId) {
|
|
|
506
555
|
limit: exports.MAX_OPENCODE_BACKFILLED_TURNS,
|
|
507
556
|
});
|
|
508
557
|
}
|
|
558
|
+
// Issue #2273: the same rule the live flush follows, off the REST document's
|
|
559
|
+
// own clock. `time.completed` is when opencode finished the assistant
|
|
560
|
+
// message; the stream route has no equivalent field and uses the instant
|
|
561
|
+
// `session.idle` arrived, which is the same fact a moment later.
|
|
562
|
+
const completedAt = lastOpencodeCompletedAt(body);
|
|
509
563
|
let written = 0;
|
|
510
564
|
// Oldest of the kept ones first, so the rows are inserted in conversation
|
|
511
565
|
// order and `updateWorktreeTimestamp` ends on the newest.
|
|
512
566
|
for (const turn of [...kept].reverse()) {
|
|
513
|
-
const saved = await writeOpencodeTurn(target, (0, transcript_1.renderOpencodeTurn)(turn), turn.startedAt, 'backfill');
|
|
567
|
+
const saved = await writeOpencodeTurn(target, (0, transcript_1.renderOpencodeTurn)(turn), Math.max(turn.startedAt, completedAt.get(turn.userMessageId) ?? 0), 'backfill');
|
|
514
568
|
if (saved)
|
|
515
569
|
written += 1;
|
|
516
570
|
}
|
|
@@ -186,8 +186,14 @@ const OPENCODE_SILENT_PART_TYPES = new Set([
|
|
|
186
186
|
'snapshot',
|
|
187
187
|
'patch',
|
|
188
188
|
]);
|
|
189
|
-
/**
|
|
190
|
-
|
|
189
|
+
/**
|
|
190
|
+
* The label a reasoning block is folded behind.
|
|
191
|
+
*
|
|
192
|
+
* An alias of `../turn-body`'s constant since #2272 rather than a second copy
|
|
193
|
+
* of the string: the section heading and this name have to stay equal or the
|
|
194
|
+
* chat surface's reader stops recognising the section it is meant to fold.
|
|
195
|
+
*/
|
|
196
|
+
exports.OPENCODE_REASONING_LABEL = turn_body_1.TURN_REASONING_LABEL;
|
|
191
197
|
/**
|
|
192
198
|
* One tool call as a single Markdown line.
|
|
193
199
|
*
|
|
@@ -218,33 +224,16 @@ function renderToolPart(part) {
|
|
|
218
224
|
function collapseToLine(value) {
|
|
219
225
|
return value.replace(/\s+/g, ' ').trim();
|
|
220
226
|
}
|
|
221
|
-
/**
|
|
222
|
-
* Reasoning, folded.
|
|
223
|
-
*
|
|
224
|
-
* A blockquote rather than `<details>`, and the reason is a rendering decision
|
|
225
|
-
* that belongs here because it decides what is *stored*: showing `<details>`
|
|
226
|
-
* would mean running `rehype-raw` over agent output in `ConversationPairCard`,
|
|
227
|
-
* and that costs every unfenced `<T>` in ordinary prose — the HTML parser eats
|
|
228
|
-
* it as a tag. A blockquote is Markdown's own way of saying "subordinate", it
|
|
229
|
-
* survives the sanitiser with no raw-HTML pass, and the card's existing
|
|
230
|
-
* two-line collapse already keeps it out of the way.
|
|
231
|
-
*/
|
|
232
|
-
function renderReasoningPart(text) {
|
|
233
|
-
const quoted = text
|
|
234
|
-
.trim()
|
|
235
|
-
.split('\n')
|
|
236
|
-
.map((line) => (line.length > 0 ? `> ${line}` : '>'))
|
|
237
|
-
.join('\n');
|
|
238
|
-
return `> **${exports.OPENCODE_REASONING_LABEL}**\n>\n${quoted}`;
|
|
239
|
-
}
|
|
240
227
|
/**
|
|
241
228
|
* Render one turn to Markdown.
|
|
242
229
|
*
|
|
243
|
-
* Stream order within each kind —
|
|
244
|
-
* the calls
|
|
245
|
-
* them
|
|
246
|
-
*
|
|
247
|
-
*
|
|
230
|
+
* Stream order within each kind — the thoughts are in the order they were
|
|
231
|
+
* thought and the calls in the order they were made. #2041 kept one stream for
|
|
232
|
+
* all of them, #2234 split the tool calls out into a section of their own, and
|
|
233
|
+
* #2272 did the same for the reasoning: measured against 1.18.22, opencode
|
|
234
|
+
* emits a `reasoning` part in front of *every* text part, so leaving them
|
|
235
|
+
* inline meant a one-line answer whose bubble opened with `> **Thinking**` and a
|
|
236
|
+
* long one with four such quotes buried in it. The layout is `../turn-body`'s.
|
|
248
237
|
*
|
|
249
238
|
* @param turn - The accumulator, live or rebuilt from REST
|
|
250
239
|
*/
|
|
@@ -268,7 +257,9 @@ function renderOpencodeTurn(turn) {
|
|
|
268
257
|
const text = part.text?.trim() ?? '';
|
|
269
258
|
if (text.length === 0)
|
|
270
259
|
continue;
|
|
271
|
-
|
|
260
|
+
// Raw, not pre-quoted: `separateTurnBody` folds the whole run under one
|
|
261
|
+
// `Thinking (N)` heading and owns the quoting (Issue #2272).
|
|
262
|
+
blocks.push({ kind: 'reasoning', text });
|
|
272
263
|
continue;
|
|
273
264
|
}
|
|
274
265
|
if (part.type === 'tool') {
|
|
@@ -284,7 +275,11 @@ function renderOpencodeTurn(turn) {
|
|
|
284
275
|
if (!OPENCODE_SILENT_PART_TYPES.has(part.type))
|
|
285
276
|
unknown.add(part.type);
|
|
286
277
|
}
|
|
287
|
-
|
|
278
|
+
const separated = (0, turn_body_1.separateTurnBody)(blocks);
|
|
279
|
+
// The cap still counts the whole body, reasoning included — but the reasoning
|
|
280
|
+
// now sits behind the prose, so what a 200 kB turn loses is the tail of its
|
|
281
|
+
// thinking rather than the answer (Issue #2272).
|
|
282
|
+
let body = separated.body;
|
|
288
283
|
if (body.length > exports.MAX_OPENCODE_TURN_BODY_LENGTH) {
|
|
289
284
|
body =
|
|
290
285
|
body.slice(0, exports.MAX_OPENCODE_TURN_BODY_LENGTH - exports.OPENCODE_TURN_TRUNCATION_MARKER.length) +
|
|
@@ -296,6 +291,7 @@ function renderOpencodeTurn(turn) {
|
|
|
296
291
|
body,
|
|
297
292
|
textParts,
|
|
298
293
|
toolParts,
|
|
294
|
+
reasoningParts: separated.reasoningBlocks,
|
|
299
295
|
unknownPartTypes: [...unknown],
|
|
300
296
|
};
|
|
301
297
|
}
|
|
@@ -40,6 +40,7 @@ const source_3 = require("./gemini/source");
|
|
|
40
40
|
const source_4 = require("./antigravity/source");
|
|
41
41
|
const source_5 = require("./codex/source");
|
|
42
42
|
const source_6 = require("./opencode/source");
|
|
43
|
+
const source_7 = require("./command-code/source");
|
|
43
44
|
const registered = (globalThis.__agentEventSources ??= new Map());
|
|
44
45
|
/** Memoised compatibility sources, so repeated lookups return one object. */
|
|
45
46
|
const legacy = (globalThis.__agentEventLegacySources ??= new Map());
|
|
@@ -109,3 +110,6 @@ registerAgentEventSource(source_3.geminiAgentEventSource);
|
|
|
109
110
|
registerAgentEventSource(source_4.antigravityAgentEventSource);
|
|
110
111
|
registerAgentEventSource(source_5.codexAgentEventSource);
|
|
111
112
|
registerAgentEventSource(source_6.opencodeAgentEventSource);
|
|
113
|
+
// Issue #2251, Epic #2249 Phase B. The seventh, and the last line of "adding a
|
|
114
|
+
// tool" — its own directory plus this.
|
|
115
|
+
registerAgentEventSource(source_7.commandCodeAgentEventSource);
|
|
@@ -13,13 +13,32 @@
|
|
|
13
13
|
* body in full, so those 141 bubbles opened with a tool log instead of a reply.
|
|
14
14
|
*
|
|
15
15
|
* This module is the one place that decides the layout, and every reader goes
|
|
16
|
-
* through it.
|
|
16
|
+
* through it. Three rules:
|
|
17
17
|
*
|
|
18
|
-
* 1. **Prose leads.** Text the agent wrote
|
|
19
|
-
* that sit between the sentences — keep their transcript order and come
|
|
18
|
+
* 1. **Prose leads.** Text the agent wrote keeps its transcript order and comes
|
|
20
19
|
* first.
|
|
21
20
|
* 2. **The tool log is one section, at the end**, in transcript order, folded
|
|
22
21
|
* into a blockquote under a labelled heading.
|
|
22
|
+
* 3. **Reasoning is one section too** (Issue #2272), between the two, on the
|
|
23
|
+
* same shape — see {@link TURN_REASONING_LABEL}.
|
|
24
|
+
*
|
|
25
|
+
* ## Why reasoning became a section of its own (Issue #2272)
|
|
26
|
+
*
|
|
27
|
+
* #2234 moved the tool calls and deliberately left the folded `Thinking` quotes
|
|
28
|
+
* where they sat, on the argument that they are the agent's own words about the
|
|
29
|
+
* reply. Measured against opencode 1.18.22 that argument does not survive
|
|
30
|
+
* contact: opencode emits a `reasoning` part before *every* text part, so the
|
|
31
|
+
* body opens with `> **Thinking**` on a one-line answer and carries four such
|
|
32
|
+
* quotes on a long one — which is exactly the failure #2234 set out to fix, from
|
|
33
|
+
* the other producer.
|
|
34
|
+
*
|
|
35
|
+
* The distinction is therefore drawn on the **block kind**, not on the reader:
|
|
36
|
+
* `reasoning` carries the raw text and is folded into the trailing section,
|
|
37
|
+
* `aside` carries text a reader already folded itself and stays with the prose.
|
|
38
|
+
* The four readers that push `aside` (claude, codex, antigravity, command-code)
|
|
39
|
+
* are untouched by this Issue because none of them has been measured the way
|
|
40
|
+
* opencode has; they can move a block at a time by switching kind, with no
|
|
41
|
+
* change here.
|
|
23
42
|
*
|
|
24
43
|
* ## Why the order claim from #2041 / #2121 is narrowed rather than dropped
|
|
25
44
|
*
|
|
@@ -46,7 +65,7 @@
|
|
|
46
65
|
* @module lib/hooks/sources/turn-body
|
|
47
66
|
*/
|
|
48
67
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
-
exports.TURN_TOOL_LOG_LABEL = void 0;
|
|
68
|
+
exports.TURN_REASONING_LABEL = exports.TURN_TOOL_LOG_LABEL = void 0;
|
|
50
69
|
exports.separateTurnBody = separateTurnBody;
|
|
51
70
|
/**
|
|
52
71
|
* The bold first line of the folded tool section.
|
|
@@ -58,15 +77,31 @@ exports.separateTurnBody = separateTurnBody;
|
|
|
58
77
|
*/
|
|
59
78
|
exports.TURN_TOOL_LOG_LABEL = 'Tool calls';
|
|
60
79
|
/**
|
|
61
|
-
*
|
|
80
|
+
* The bold first line of the folded reasoning section (Issue #2272).
|
|
62
81
|
*
|
|
63
|
-
* The
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
82
|
+
* The same string the five readers already used for their own inline quotes, on
|
|
83
|
+
* purpose: it is baked into `chat_messages.content` at read time, so the rows
|
|
84
|
+
* written before this Issue carry `> **Thinking**` and the rows written after it
|
|
85
|
+
* carry `> **Thinking (N)**`. Keeping the label identical is what lets one
|
|
86
|
+
* reader on the chat surface fold both shapes — see `splitChatThinking` in
|
|
87
|
+
* `components/worktree/ChatMessageBubble`.
|
|
67
88
|
*/
|
|
68
|
-
|
|
69
|
-
|
|
89
|
+
exports.TURN_REASONING_LABEL = 'Thinking';
|
|
90
|
+
/**
|
|
91
|
+
* Put one block inside a blockquote, line by line.
|
|
92
|
+
*
|
|
93
|
+
* Every line gets its own `> ` because a blockquote ends at the first line that
|
|
94
|
+
* has none — a lazy continuation would work in CommonMark for a paragraph and
|
|
95
|
+
* would NOT for the list items the tool log is made of.
|
|
96
|
+
*
|
|
97
|
+
* For a tool line the split is a guard rather than a case that is expected to
|
|
98
|
+
* fire: the five readers all render a call as a single-line list item and
|
|
99
|
+
* collapse whitespace precisely so a heredoc in a shell command cannot put a
|
|
100
|
+
* newline here. For a reasoning block it is the normal path — that text is
|
|
101
|
+
* paragraphs.
|
|
102
|
+
*/
|
|
103
|
+
function quoteBlock(text) {
|
|
104
|
+
return text
|
|
70
105
|
.split('\n')
|
|
71
106
|
.map((part) => (part.length > 0 ? `> ${part}` : '>'))
|
|
72
107
|
.join('\n');
|
|
@@ -80,21 +115,25 @@ function quoteToolLine(line) {
|
|
|
80
115
|
* (#2199) agree — both reach this function through the same renderer, so the
|
|
81
116
|
* text a reader watches being written is the text that settles.
|
|
82
117
|
*
|
|
83
|
-
* A turn with
|
|
84
|
-
*
|
|
118
|
+
* A turn with neither a tool call nor a `reasoning` block comes out
|
|
119
|
+
* **byte-identical** to what the readers produced before #2234 / #2272: the
|
|
120
|
+
* whole change is the sections this adds.
|
|
85
121
|
*
|
|
86
122
|
* @param blocks - Rendered pieces in transcript order; empty text is the
|
|
87
123
|
* caller's to drop
|
|
88
|
-
* @returns The body and the
|
|
124
|
+
* @returns The body and the three parts it was built from
|
|
89
125
|
*/
|
|
90
126
|
function separateTurnBody(blocks) {
|
|
91
127
|
const prose = [];
|
|
128
|
+
const reasoning = [];
|
|
92
129
|
const tools = [];
|
|
93
130
|
for (const block of blocks) {
|
|
94
131
|
if (block.text.length === 0)
|
|
95
132
|
continue;
|
|
96
133
|
if (block.kind === 'tool')
|
|
97
134
|
tools.push(block.text);
|
|
135
|
+
else if (block.kind === 'reasoning')
|
|
136
|
+
reasoning.push(block.text);
|
|
98
137
|
else
|
|
99
138
|
prose.push(block.text);
|
|
100
139
|
}
|
|
@@ -104,15 +143,34 @@ function separateTurnBody(blocks) {
|
|
|
104
143
|
// stayed one Markdown list — which is gone because no tool line reaches this
|
|
105
144
|
// list any more.
|
|
106
145
|
const proseText = prose.join('\n\n');
|
|
146
|
+
// One heading for the whole run, and a bare `>` between the blocks so two
|
|
147
|
+
// consecutive thoughts stay two paragraphs inside the quote rather than
|
|
148
|
+
// running into one another.
|
|
149
|
+
const reasoningLog = reasoning.length === 0
|
|
150
|
+
? ''
|
|
151
|
+
: [
|
|
152
|
+
`> **${exports.TURN_REASONING_LABEL} (${reasoning.length})**`,
|
|
153
|
+
'>',
|
|
154
|
+
reasoning.map(quoteBlock).join('\n>\n'),
|
|
155
|
+
].join('\n');
|
|
107
156
|
const toolLog = tools.length === 0
|
|
108
157
|
? ''
|
|
109
158
|
: [
|
|
110
159
|
`> **${exports.TURN_TOOL_LOG_LABEL} (${tools.length})**`,
|
|
111
160
|
'>',
|
|
112
|
-
...tools.map(
|
|
161
|
+
...tools.map(quoteBlock),
|
|
113
162
|
].join('\n');
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
163
|
+
// Prose, then reasoning, then the tool log. The tool log stays last because
|
|
164
|
+
// #2234 put it there and the readers' rows are matched on `request_id` rather
|
|
165
|
+
// than rewritten, so moving it would split History into two layouts for no
|
|
166
|
+
// gain.
|
|
167
|
+
const body = [proseText, reasoningLog, toolLog].filter((part) => part.length > 0).join('\n\n');
|
|
168
|
+
return {
|
|
169
|
+
body,
|
|
170
|
+
prose: proseText,
|
|
171
|
+
reasoningLog,
|
|
172
|
+
reasoningBlocks: reasoning.length,
|
|
173
|
+
toolLog,
|
|
174
|
+
toolCalls: tools.length,
|
|
175
|
+
};
|
|
118
176
|
}
|
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
* This module manages the DB logging lifecycle (create/update execution logs)
|
|
8
8
|
* and delegates actual command execution to claude-executor.
|
|
9
9
|
*
|
|
10
|
+
* Scheduled tools: claude, codex, gemini, vibe-local, opencode, copilot,
|
|
11
|
+
* antigravity, command-code (Issue #2253). Which flags each one is launched
|
|
12
|
+
* with, and how its stdout is decoded back into an answer, is claude-executor's
|
|
13
|
+
* business — this module only records the verdict.
|
|
14
|
+
*
|
|
10
15
|
* Trust boundary: All inputs are DB-derived from schedule-manager.ts (trusted).
|
|
11
16
|
*/
|
|
12
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -186,6 +191,13 @@ async function executeSchedule(state) {
|
|
|
186
191
|
// Resolve the CLI options via the centralized helper (DR1-004, #2044)
|
|
187
192
|
const options = resolveScheduleExecuteOptions(state.entry, worktree);
|
|
188
193
|
const result = await (0, claude_executor_1.executeClaudeCommand)(state.entry.message, worktree.path, state.entry.cliToolId, state.entry.permission, options);
|
|
194
|
+
// Issue #2253: `result.status` is not always "did the process exit 0".
|
|
195
|
+
// command-code writes a `{"type":"result","subtype":…}` line even on a
|
|
196
|
+
// non-zero exit and can pair `subtype: "success"` with exit 9, so
|
|
197
|
+
// claude-executor reads both halves and folds the verdict into `status` and
|
|
198
|
+
// into the head of `output` (a `Reason: command-code exit N (…)` line).
|
|
199
|
+
// This row is therefore the failure reason as well as the transcript, and
|
|
200
|
+
// must keep writing `result.output` verbatim rather than a summary of it.
|
|
189
201
|
updateExecutionLog(logId, result.status, result.output, result.exitCode);
|
|
190
202
|
updateScheduleLastExecuted(state.scheduleId);
|
|
191
203
|
logger.info('execution:completed', { name: state.entry.name, status: result.status });
|
|
@@ -94,6 +94,12 @@ exports.AUTO_YES_DIALOG_GATE_DEFAULT_MODE = {
|
|
|
94
94
|
gemini: 'legacy',
|
|
95
95
|
antigravity: 'legacy',
|
|
96
96
|
'vibe-local': 'legacy',
|
|
97
|
+
// Issue #2250 / Epic #2249 決定 3: Command Code's Auto-Yes stays on the legacy
|
|
98
|
+
// numbered-response path. Its `PreToolUse` hook fires AFTER the permission
|
|
99
|
+
// dialog is answered (measured: dialog 00:11:37, answer 00:11:46, hook
|
|
100
|
+
// 00:11:46), so a `permissionDecision` cannot dismiss the dialog and there is
|
|
101
|
+
// no measured dialog rule to gate on.
|
|
102
|
+
'command-code': 'legacy',
|
|
97
103
|
};
|
|
98
104
|
/**
|
|
99
105
|
* The kill switch (§13.1 DR3-016).
|
|
@@ -28,6 +28,12 @@ const prompt_dedup_1 = require("./prompt-dedup");
|
|
|
28
28
|
const prompt_dedup_state_1 = require("./prompt-dedup-state");
|
|
29
29
|
const response_dedup_1 = require("./response-dedup");
|
|
30
30
|
const structured_history_gate_1 = require("./structured-history-gate");
|
|
31
|
+
// Issue #2317 Phase D: while a human holds the pane's geometry, the frame is
|
|
32
|
+
// their terminal (44 rows), not the 1000-row canvas every rule below was
|
|
33
|
+
// measured against. See the block in `checkForResponse` for what that changes.
|
|
34
|
+
const session_name_1 = require("../../lib/cli-tools/session-name");
|
|
35
|
+
const geometry_delegation_1 = require("../../lib/tmux/geometry-delegation");
|
|
36
|
+
const tmux_session_surface_1 = require("../../lib/session/tmux-session-surface");
|
|
31
37
|
const response_poller_core_1 = require("./response-poller-core");
|
|
32
38
|
const push_1 = require("../../lib/push");
|
|
33
39
|
// Issue #1790: imported by deep path, not through `@/lib/push`. Suites that
|
|
@@ -246,13 +252,21 @@ function extractResponse(output, lastCapturedLine, cliToolId, captureWindowLines
|
|
|
246
252
|
// silently delete another tool's boundary, and a boundary that stops existing
|
|
247
253
|
// does not fail loudly: it puts terminal furniture back into History.
|
|
248
254
|
const openCodeCleanLines = cliToolId === 'opencode' ? lines.map(cli_patterns_1.stripAnsi) : null;
|
|
255
|
+
// Issue #2250: Command Code is the fourth. Its landmark is its own — the
|
|
256
|
+
// `❯ Ask your question...` composer fenced by two full-pane rules, with the
|
|
257
|
+
// permission-mode row underneath — and it is load-bearing rather than tidy:
|
|
258
|
+
// that placeholder is drawn with the same `❯ <text>` shape as a transcript
|
|
259
|
+
// echo, so without the boundary `findRecentUserPromptIndex` anchors the turn
|
|
260
|
+
// on the FOOTER and every reply extracts as empty (#1289's defect, verbatim).
|
|
249
261
|
const chromeStart = cliToolId === 'claude'
|
|
250
262
|
? (0, cli_patterns_1.findClaudeChromeStart)(lines)
|
|
251
263
|
: cliToolId === 'copilot'
|
|
252
264
|
? (0, cli_patterns_1.findCopilotChromeStart)(lines)
|
|
253
|
-
:
|
|
254
|
-
? (0, cli_patterns_1.
|
|
255
|
-
:
|
|
265
|
+
: cliToolId === 'command-code'
|
|
266
|
+
? (0, cli_patterns_1.findCommandCodeChromeStart)(lines)
|
|
267
|
+
: openCodeCleanLines
|
|
268
|
+
? (0, cli_patterns_1.findOpenCodeChromeStart)(openCodeCleanLines)
|
|
269
|
+
: -1;
|
|
256
270
|
const contentEnd = chromeStart >= 0 ? chromeStart : totalLines;
|
|
257
271
|
const BUFFER_RESET_TOLERANCE = 25;
|
|
258
272
|
const bufferShrank = totalLines > 0 && lastCapturedLine > BUFFER_RESET_TOLERANCE && (totalLines + BUFFER_RESET_TOLERANCE) < lastCapturedLine;
|
|
@@ -330,7 +344,16 @@ function extractResponse(output, lastCapturedLine, cliToolId, captureWindowLines
|
|
|
330
344
|
return -1;
|
|
331
345
|
};
|
|
332
346
|
// Early check for interactive prompts (before extraction logic)
|
|
333
|
-
|
|
347
|
+
//
|
|
348
|
+
// Issue #2250: `command-code` must be here. Its permission dialog draws its
|
|
349
|
+
// highlighted option as `❯ 1. Yes` and keeps a full-pane rule above the block,
|
|
350
|
+
// so `hasPrompt && hasSeparator && !isThinking` below is TRUE while the dialog
|
|
351
|
+
// is waiting for an answer — the turn would be declared finished and the
|
|
352
|
+
// dialog saved as the reply.
|
|
353
|
+
if (cliToolId === 'claude' ||
|
|
354
|
+
cliToolId === 'codex' ||
|
|
355
|
+
cliToolId === 'copilot' ||
|
|
356
|
+
cliToolId === 'command-code') {
|
|
334
357
|
const fullOutput = lines.join('\n');
|
|
335
358
|
const promptDetection = detectPromptWithOptions(fullOutput, cliToolId);
|
|
336
359
|
if (promptDetection.isPrompt) {
|
|
@@ -374,8 +397,15 @@ function extractResponse(output, lastCapturedLine, cliToolId, captureWindowLines
|
|
|
374
397
|
? copilotStatusBar === 'idle'
|
|
375
398
|
: (cliToolId === 'codex' || cliToolId === 'gemini' || cliToolId === 'vibe-local' || cliToolId === 'antigravity') && hasPrompt && !isThinking;
|
|
376
399
|
const isClaudeComplete = cliToolId === 'claude' && hasPrompt && hasSeparator && !isThinking;
|
|
400
|
+
// Issue #2250: claude's shape, because Command Code's layout is claude's — the
|
|
401
|
+
// composer sits between two full-pane rules and is drawn only when the agent
|
|
402
|
+
// will accept input. Deliberately NOT keyed on `✻ Worked for`: that row is the
|
|
403
|
+
// live turn's, not the transcript's (it is present in `turn-version.txt` and
|
|
404
|
+
// gone from `dialog-create-file.txt`, the same pane one prompt later) and
|
|
405
|
+
// `WorkedDurationNote` omits it entirely for a turn under 1000 ms.
|
|
406
|
+
const isCommandCodeComplete = cliToolId === 'command-code' && hasPrompt && hasSeparator && !isThinking;
|
|
377
407
|
const isOpenCodeDone = cliToolId === 'opencode' && (0, response_extractor_1.isOpenCodeComplete)(cleanOutputToCheck);
|
|
378
|
-
if (isPromptBasedComplete || isClaudeComplete || isOpenCodeDone) {
|
|
408
|
+
if (isPromptBasedComplete || isClaudeComplete || isCommandCodeComplete || isOpenCodeDone) {
|
|
379
409
|
const responseLines = [];
|
|
380
410
|
const startIndex = (0, response_extractor_1.resolveExtractionStartIndex)(lastCapturedLine, totalLines, bufferReset, cliToolId, findRecentUserPromptIndex, captureWindowSaturated);
|
|
381
411
|
let endIndex = totalLines;
|
|
@@ -515,6 +545,30 @@ function extractResponse(output, lastCapturedLine, cliToolId, captureWindowLines
|
|
|
515
545
|
return incompleteResult(totalLines);
|
|
516
546
|
}
|
|
517
547
|
}
|
|
548
|
+
// Issue #2250: Command Code's launch screen is a complete, idle frame --
|
|
549
|
+
// block-art logo, three `#` banner rows, composer drawn between its two
|
|
550
|
+
// rules -- so every check above accepts it, and History would open with
|
|
551
|
+
// `# Command Code v1.40.1 / # models: … / # <cwd>` saved as the agent's
|
|
552
|
+
// first reply before the operator has said anything.
|
|
553
|
+
//
|
|
554
|
+
// The rule is ONE condition and it is a positive one: Command Code echoes
|
|
555
|
+
// every prompt into the transcript as `❯ <text>`, and the launch screen has
|
|
556
|
+
// none. That is the shape #1897 and #2247 both converged on; the anchor
|
|
557
|
+
// heuristics claude carries above (`hasBannerArt` / `hasVersionInfo` /
|
|
558
|
+
// `hasStartupTips`) are deliberately NOT reproduced here, because they are
|
|
559
|
+
// what #2247 had to take back -- a bare version string in a reply is a
|
|
560
|
+
// normal reply, and Command Code prints its own version on every launch.
|
|
561
|
+
//
|
|
562
|
+
// `findRecentUserPromptIndex` is the same `/^[>❯]\s+\S/` scan the extraction
|
|
563
|
+
// anchors on, and it stops at `contentEnd`, so the composer's own dim
|
|
564
|
+
// `❯ Ask your question...` placeholder cannot be mistaken for an echo
|
|
565
|
+
// (#1879's trap).
|
|
566
|
+
if (cliToolId === 'command-code' && findRecentUserPromptIndex(totalLines) < 0) {
|
|
567
|
+
logger.info('Command Code launch screen suppressed, response not saved', {
|
|
568
|
+
responseLength: response.length,
|
|
569
|
+
});
|
|
570
|
+
return incompleteResult(totalLines);
|
|
571
|
+
}
|
|
518
572
|
// Gemini-specific check
|
|
519
573
|
if (cliToolId === 'gemini') {
|
|
520
574
|
const bannerCharCount = (response.match(/[░███]/g) || []).length;
|
|
@@ -631,6 +685,36 @@ async function checkForResponse(worktreeId, cliToolId, instanceId) {
|
|
|
631
685
|
(0, response_poller_core_1.stopPolling)(worktreeId, cliToolId, instanceId);
|
|
632
686
|
return false;
|
|
633
687
|
}
|
|
688
|
+
// Issue #2317 Phase D: is a human reading this pane at their own terminal
|
|
689
|
+
// size right now, and did they just stop?
|
|
690
|
+
//
|
|
691
|
+
// Asked only for the tools `attach --live` accepts — no other session can be
|
|
692
|
+
// delegated, so asking about one would be a tmux round-trip per poll with a
|
|
693
|
+
// single possible answer. The read itself is memoised for a second
|
|
694
|
+
// (`DELEGATION_TTL_MS`), which is under one poll interval.
|
|
695
|
+
const sessionName = (0, session_name_1.resolveSessionName)(cliToolId, worktreeId, instanceId);
|
|
696
|
+
const delegation = (0, tmux_session_surface_1.isLiveAttachEligibleSession)(sessionName)
|
|
697
|
+
? await (0, geometry_delegation_1.probeGeometryDelegation)(sessionName)
|
|
698
|
+
: { delegated: false, released: false };
|
|
699
|
+
if (delegation.released) {
|
|
700
|
+
// The canvas is 1000 rows again, so a cursor recorded against a 44-row
|
|
701
|
+
// frame indexes into a pane that no longer exists. Zero is the only value
|
|
702
|
+
// that cannot be wrong in either direction: too low re-saves a turn, too
|
|
703
|
+
// high suppresses every future one. Done BEFORE the state is read below so
|
|
704
|
+
// this poll already sees the reset.
|
|
705
|
+
//
|
|
706
|
+
// A no-op for claude in practice — it renders in the alternate screen, so
|
|
707
|
+
// `lineCountIsCursor` is false and the cursor is not consulted — and that
|
|
708
|
+
// is exactly why it is written here rather than left implicit: the guard
|
|
709
|
+
// has to already be right on the day a scrollback tool is added to
|
|
710
|
+
// `LIVE_ATTACH_TOOLS`.
|
|
711
|
+
(0, db_1.updateSessionState)(db, worktreeId, cliToolId, 0, resolvedInstanceId);
|
|
712
|
+
logger.info('geometry-delegation-released', {
|
|
713
|
+
worktreeId,
|
|
714
|
+
cliToolId,
|
|
715
|
+
instanceId: resolvedInstanceId,
|
|
716
|
+
});
|
|
717
|
+
}
|
|
634
718
|
// Get session state (last captured line count)
|
|
635
719
|
const sessionState = (0, db_1.getSessionState)(db, worktreeId, resolvedInstanceId);
|
|
636
720
|
const lastCapturedLine = sessionState?.lastCapturedLine || 0;
|
|
@@ -891,8 +975,25 @@ async function checkForResponse(worktreeId, cliToolId, instanceId) {
|
|
|
891
975
|
worktreePath: worktree.path,
|
|
892
976
|
transcriptPathHint: claudeMetadata?.logFilePath ?? null,
|
|
893
977
|
}));
|
|
978
|
+
// Issue #2317 Phase D: the scrape is dropped while the geometry is
|
|
979
|
+
// delegated, and the transcript capture above is what makes that safe.
|
|
980
|
+
//
|
|
981
|
+
// ORDER IS LOAD-BEARING. The delegation test is folded in AFTER the two
|
|
982
|
+
// calls above rather than short-circuiting them: `captureStructuredHistoryTurn`
|
|
983
|
+
// is a WRITE, not a query — it is the moment claude's own transcript becomes
|
|
984
|
+
// a History row — so an `||` that put the delegation first would suppress
|
|
985
|
+
// the scrape and the real reply together, and the turn would vanish. Read as
|
|
986
|
+
// it stands: record the turn from the agent's own file, then drop the pane's
|
|
987
|
+
// copy of it, which at 44 rows is a fraction of the answer hard-wrapped at
|
|
988
|
+
// the reader's terminal width.
|
|
989
|
+
//
|
|
990
|
+
// When the transcript capture answers false (an unreadable or absent file)
|
|
991
|
+
// the turn goes UNRECORDED for as long as the delegation lasts. That is the
|
|
992
|
+
// deliberate trade: a missing row is recoverable, a truncated reply saved as
|
|
993
|
+
// the agent's answer is not.
|
|
994
|
+
const suppressScrapedHistory = structuredHistoryLive || delegation.delegated;
|
|
894
995
|
// Create Markdown log file for the conversation pair
|
|
895
|
-
if (cleanedResponse && !
|
|
996
|
+
if (cleanedResponse && !suppressScrapedHistory) {
|
|
896
997
|
await (0, conversation_logger_1.recordClaudeConversation)(db, worktreeId, cleanedResponse, cliToolId);
|
|
897
998
|
}
|
|
898
999
|
// Mark any pending prompts as answered
|
|
@@ -913,7 +1014,7 @@ async function checkForResponse(worktreeId, cliToolId, instanceId) {
|
|
|
913
1014
|
// are not byte-comparable — the pane's copy is hard-wrapped at the pane
|
|
914
1015
|
// width and gutter-prefixed, so no content check could ever recognise them
|
|
915
1016
|
// as the same reply.
|
|
916
|
-
if (!
|
|
1017
|
+
if (!suppressScrapedHistory) {
|
|
917
1018
|
// Create new CLI tool message in database
|
|
918
1019
|
const message = (0, db_1.createMessage)(db, {
|
|
919
1020
|
worktreeId,
|
|
@@ -936,6 +1037,10 @@ async function checkForResponse(worktreeId, cliToolId, instanceId) {
|
|
|
936
1037
|
cliToolId,
|
|
937
1038
|
instanceId: resolvedInstanceId,
|
|
938
1039
|
scrapedLength: cleanedResponse.length,
|
|
1040
|
+
// Which of the two reasons suppressed it. Without this the Phase D case
|
|
1041
|
+
// and the ordinary #2041/#2121 handover are one indistinguishable log
|
|
1042
|
+
// line, and "History is missing a turn" has two very different causes.
|
|
1043
|
+
reason: structuredHistoryLive ? 'structured-history' : 'geometry-delegated',
|
|
939
1044
|
});
|
|
940
1045
|
}
|
|
941
1046
|
// Issue #1790: the agent has just produced a reply, so whatever it was
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* Whether somebody better-informed is already recording this turn (Issue #2041,
|
|
4
|
-
* extended for Claude Code in #2121, codex in #2197
|
|
4
|
+
* extended for Claude Code in #2121, codex in #2197, antigravity in #2198 and
|
|
5
|
+
* Command Code in #2252).
|
|
5
6
|
*
|
|
6
7
|
* The poller's job has always been to be the only writer of conversation
|
|
7
|
-
* history, because for most of the
|
|
8
|
-
* reply exists.
|
|
9
|
-
* replies over the SSE stream CommandMate subscribes to (#1763/#2041), and
|
|
10
|
-
* claude, codex and
|
|
11
|
-
* Two writers for one turn would put the same answer in History
|
|
12
|
-
* the agent wrote it and once as its TUI drew it — so one of
|
|
13
|
-
* down, and it is the one reading the screen.
|
|
8
|
+
* history, because for most of the seven tools the terminal is the only place
|
|
9
|
+
* the reply exists. Five of them now have a second writer: opencode publishes
|
|
10
|
+
* its replies over the SSE stream CommandMate subscribes to (#1763/#2041), and
|
|
11
|
+
* claude, codex, antigravity and command-code each keep their own transcript
|
|
12
|
+
* file on disk. Two writers for one turn would put the same answer in History
|
|
13
|
+
* twice — once as the agent wrote it and once as its TUI drew it — so one of
|
|
14
|
+
* them has to stand down, and it is the one reading the screen.
|
|
14
15
|
*
|
|
15
16
|
* ## Why this is a module and not an `if`
|
|
16
17
|
*
|
|
@@ -74,9 +75,11 @@ const subscription_1 = require("../../lib/hooks/sources/opencode/subscription");
|
|
|
74
75
|
const history_1 = require("../../lib/hooks/sources/claude/history");
|
|
75
76
|
const history_2 = require("../../lib/hooks/sources/codex/history");
|
|
76
77
|
const history_3 = require("../../lib/hooks/sources/antigravity/history");
|
|
78
|
+
const history_4 = require("../../lib/hooks/sources/command-code/history");
|
|
77
79
|
const tool_id_1 = require("../../lib/hooks/sources/claude/tool-id");
|
|
78
80
|
const tool_id_2 = require("../../lib/hooks/sources/codex/tool-id");
|
|
79
81
|
const tool_id_3 = require("../../lib/hooks/sources/antigravity/tool-id");
|
|
82
|
+
const tool_id_4 = require("../../lib/hooks/sources/command-code/tool-id");
|
|
80
83
|
const registry_1 = require("../../lib/hooks/sources/registry");
|
|
81
84
|
const logger = (0, logger_1.createLogger)('lib/polling/structured-history-gate');
|
|
82
85
|
/**
|
|
@@ -168,6 +171,10 @@ const PULL_TRANSCRIPT_READERS = {
|
|
|
168
171
|
capture: (target, capture) => (0, history_3.captureAntigravityTranscriptTurn)(target, capture),
|
|
169
172
|
locate: (target, capture) => (0, history_3.resolveAntigravityTranscriptPath)(target, capture),
|
|
170
173
|
},
|
|
174
|
+
[tool_id_4.COMMAND_CODE_CLI_TOOL_ID]: {
|
|
175
|
+
capture: (target, capture) => (0, history_4.captureCommandCodeTranscriptTurn)(target, capture),
|
|
176
|
+
locate: (target, capture) => (0, history_4.resolveCommandCodeTranscriptPath)(target, capture),
|
|
177
|
+
},
|
|
171
178
|
};
|
|
172
179
|
/**
|
|
173
180
|
* What this tool's source says about who records its replies.
|