commandmate 0.30.2 → 0.31.1
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 +151 -151
- package/.next/app-path-routes-manifest.json +25 -25
- 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 +11 -11
- package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
- package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +25 -25
- 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/4802.js +1 -0
- 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-46e1d2f07c8423ba.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-64d4ec3051971760.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/server/chunks/848.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 → 60mm4_QBuFtFTfo5UMyKU}/_buildManifest.js +0 -0
- /package/.next/static/{QXxQbXWoo7ldUyOcv7PCZ → 60mm4_QBuFtFTfo5UMyKU}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,604 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Turning Command Code's transcript JSONL back into the reply the agent wrote
|
|
4
|
+
* (Issue #2252, Epic #2249 Phase C).
|
|
5
|
+
*
|
|
6
|
+
* The fifth of these readers, after `../claude/transcript` (#2121),
|
|
7
|
+
* `../codex/transcript` (#2197) and `../antigravity/transcript` (#2198), and the
|
|
8
|
+
* one whose file looks most like claude's while agreeing with **antigravity**
|
|
9
|
+
* about the thing that decides the shape of the code: there is no record that
|
|
10
|
+
* says a turn ended.
|
|
11
|
+
*
|
|
12
|
+
* ## What was measured
|
|
13
|
+
*
|
|
14
|
+
* Against Command Code **v1.40.1** on 2026-09-03, on the live transcripts in
|
|
15
|
+
* `tests/fixtures/transcripts/command-code/` (that directory's README says which
|
|
16
|
+
* bytes are the tool's and which are ours), and against the tool's own bundle
|
|
17
|
+
* (`dist/cli.mjs`), which is the only complete statement of the writer:
|
|
18
|
+
*
|
|
19
|
+
* 1. **The file is `<header>` then entries.** Line 1 is
|
|
20
|
+
* `{"type":"session","version":3,"id":…,"timestamp":…,"cwd":…}` and every
|
|
21
|
+
* later line is `{"type":…,"id":…,"parentId":…,"timestamp":…,…}`. The
|
|
22
|
+
* bundle's `isSessionEntryV3` accepts nine `type`s —
|
|
23
|
+
* `message`, `model_change`, `effort_change`, `compaction`,
|
|
24
|
+
* `branch_summary`, `custom`, `custom_message`, `label`, `session_info` —
|
|
25
|
+
* of which only `message` carries a conversation. See
|
|
26
|
+
* {@link COMMAND_CODE_MESSAGE_RECORD_TYPE}.
|
|
27
|
+
* 2. **`id` is an 8-hex short id, not a uuid** (`cb06ab09`), minted by
|
|
28
|
+
* `generateEntryId` with a collision check against the ids already in the
|
|
29
|
+
* file. `parentId` chains each entry to the previous one in file order — it
|
|
30
|
+
* is not a reply-to pointer — so turns are built from order, exactly as
|
|
31
|
+
* claude's are.
|
|
32
|
+
* 3. **`message.meta.source` is the record's provenance**, and it is a first
|
|
33
|
+
* class field rather than something to infer: `user` for the operator's own
|
|
34
|
+
* prompt, `model` for the agent, `tool` for a `tool_result` carrier, and —
|
|
35
|
+
* from the bundle's agent loop — `steering` and `followup` for prompts the
|
|
36
|
+
* loop appends on the operator's behalf. `meta` also carries `createdAt`
|
|
37
|
+
* (epoch ms, when the message was *made*), `messageId`, `isMeta`,
|
|
38
|
+
* `isSummary` and `isAutomated`.
|
|
39
|
+
* 4. **The entry `timestamp` is when the entry was appended to the store, not
|
|
40
|
+
* when the message was made.** The writer buffers: `persistEntry` writes
|
|
41
|
+
* nothing at all until the first *assistant* message entry, and then flushes
|
|
42
|
+
* the header and everything before it in one `writeWholeFile`. In the
|
|
43
|
+
* captured session that gave the prompt, the reply and the tool result the
|
|
44
|
+
* same `timestamp` and three different `meta.createdAt`s. So
|
|
45
|
+
* {@link CommandCodeTranscriptRecord.timestampMs} prefers `createdAt`.
|
|
46
|
+
* 5. **There is no `stop_reason`.** claude's #2264 gate reads
|
|
47
|
+
* `message.stop_reason`; Command Code persists no such field on any record,
|
|
48
|
+
* and grepping the capture confirms it. What the bundle *does* show is the
|
|
49
|
+
* loop's own end condition — `if(!A){const e="max_tokens"===x.stopReason?
|
|
50
|
+
* "max_tokens":"end_turn"; … runOnStop(…)}` where `A` is `hadToolCalls` —
|
|
51
|
+
* so "the model's last message asked for no tool" **is** the end of the
|
|
52
|
+
* turn, it simply is not written down. That is
|
|
53
|
+
* {@link isCommandCodeTurnClosingRecord}, and it is the same rule
|
|
54
|
+
* `../antigravity/transcript` arrived at for the same reason.
|
|
55
|
+
*
|
|
56
|
+
* ## Re-measured on v1.49.0 (Issue #2304)
|
|
57
|
+
*
|
|
58
|
+
* All five facts above still hold, unchanged, nine minor versions later: same
|
|
59
|
+
* `version: 3` header, same `type: session` / `type: message` split, same
|
|
60
|
+
* `message.meta` fields, same `thinking` / `text` / `tool_use` / `tool_result`
|
|
61
|
+
* content blocks, still no `stop_reason` anywhere. The capture is
|
|
62
|
+
* `hook-session-1490.jsonl` in the fixtures directory, taken from the same live
|
|
63
|
+
* run whose hook payloads are `hook-payloads-1490.json`, and no change to this
|
|
64
|
+
* module was needed for it.
|
|
65
|
+
*
|
|
66
|
+
* What *did* change is the directory around the file: 1.49.0 writes
|
|
67
|
+
* `<session_id>.meta.json` and `<session_id>.checkpoints.jsonl` beside the
|
|
68
|
+
* transcript, and 1.40.1 wrote neither. Neither is this module's problem —
|
|
69
|
+
* `./history`'s scan matches `<session_id>.jsonl` exactly — but the checkpoints
|
|
70
|
+
* file is worth one sentence here because it is the one that could reach this
|
|
71
|
+
* parser: its rows are `{id, messageId, turnNumber, createdAt, prompt,
|
|
72
|
+
* messageCount, files}` with **no `type` field at all**, so
|
|
73
|
+
* {@link readCommandCodeTranscriptRecord} declines every one of them and
|
|
74
|
+
* {@link parseCommandCodeTranscript} answers zero records. Measured, not
|
|
75
|
+
* assumed. That is what makes the fail-open hold without a fourth condition on
|
|
76
|
+
* `acceptCommandCodeTranscriptHint`, which the file's `.jsonl` suffix would
|
|
77
|
+
* otherwise satisfy.
|
|
78
|
+
*
|
|
79
|
+
* ## Pure on purpose
|
|
80
|
+
*
|
|
81
|
+
* No filesystem, no database, no `globalThis` — `./history` owns all three. The
|
|
82
|
+
* consequence is that "the saved body equals the transcript's text" is a
|
|
83
|
+
* property a test can assert against a fixture rather than a claim, which is why
|
|
84
|
+
* all four of its siblings are written this way.
|
|
85
|
+
*
|
|
86
|
+
* @module lib/hooks/sources/command-code/transcript
|
|
87
|
+
*/
|
|
88
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
89
|
+
exports.COMMAND_CODE_THINKING_LABEL = exports.MAX_COMMAND_CODE_TOOL_DETAIL_LENGTH = exports.MAX_COMMAND_CODE_TURN_BLOCKS = exports.COMMAND_CODE_TURN_TRUNCATION_MARKER = exports.MAX_COMMAND_CODE_TURN_BODY_LENGTH = exports.COMMAND_CODE_OPERATOR_MESSAGE_SOURCE = exports.COMMAND_CODE_MESSAGE_RECORD_TYPE = exports.COMMAND_CODE_SESSION_RECORD_TYPE = exports.COMMAND_CODE_TRANSCRIPT_EXTENSION = exports.COMMAND_CODE_PROJECTS_DIR_SEGMENTS = void 0;
|
|
90
|
+
exports.readCommandCodeContentBlock = readCommandCodeContentBlock;
|
|
91
|
+
exports.readCommandCodeTranscriptRecord = readCommandCodeTranscriptRecord;
|
|
92
|
+
exports.parseCommandCodeTranscript = parseCommandCodeTranscript;
|
|
93
|
+
exports.isCommandCodePromptRecord = isCommandCodePromptRecord;
|
|
94
|
+
exports.isCommandCodeOperatorPromptRecord = isCommandCodeOperatorPromptRecord;
|
|
95
|
+
exports.isCommandCodeTurnClosingRecord = isCommandCodeTurnClosingRecord;
|
|
96
|
+
exports.isCommandCodeTurnWritable = isCommandCodeTurnWritable;
|
|
97
|
+
exports.createCommandCodeTurn = createCommandCodeTurn;
|
|
98
|
+
exports.buildCommandCodeTurns = buildCommandCodeTurns;
|
|
99
|
+
exports.renderCommandCodeTurn = renderCommandCodeTurn;
|
|
100
|
+
const event_mapper_1 = require("../event-mapper");
|
|
101
|
+
const turn_body_1 = require("../turn-body");
|
|
102
|
+
/**
|
|
103
|
+
* `~/.commandcode/projects` — the directory Command Code keeps one project's
|
|
104
|
+
* sessions in, relative to the home directory.
|
|
105
|
+
*
|
|
106
|
+
* **The leaf below it is not computable and this module never tries.** The
|
|
107
|
+
* bundle's `getProjectDirName` is `slugify(cwd)`, and the captured pair shows
|
|
108
|
+
* that `slugify` splits camel case as well as replacing separators
|
|
109
|
+
* (`…/MyCodeBranchDesk/probe` → `…-my-code-branch-desk-probe`), which is a
|
|
110
|
+
* different function from claude's byte-for-byte `[^A-Za-z0-9] → -`.
|
|
111
|
+
* Reimplementing an unpublished slug would be a rule that silently stops
|
|
112
|
+
* matching the day Command Code changes it; `./history` looks the session id up
|
|
113
|
+
* on the filesystem instead.
|
|
114
|
+
*/
|
|
115
|
+
exports.COMMAND_CODE_PROJECTS_DIR_SEGMENTS = ['.commandcode', 'projects'];
|
|
116
|
+
/** `.jsonl`; the only extension this reader will open. */
|
|
117
|
+
exports.COMMAND_CODE_TRANSCRIPT_EXTENSION = '.jsonl';
|
|
118
|
+
/** The header line's `type`. Carries the session id and the `cwd`. */
|
|
119
|
+
exports.COMMAND_CODE_SESSION_RECORD_TYPE = 'session';
|
|
120
|
+
/** The only entry `type` that carries a conversation. */
|
|
121
|
+
exports.COMMAND_CODE_MESSAGE_RECORD_TYPE = 'message';
|
|
122
|
+
/**
|
|
123
|
+
* `message.meta.source` for a record the person at the keyboard produced.
|
|
124
|
+
*
|
|
125
|
+
* The positive evidence {@link isCommandCodeOperatorPromptRecord} requires; see
|
|
126
|
+
* that function for the census behind choosing an allow list over a deny list.
|
|
127
|
+
*/
|
|
128
|
+
exports.COMMAND_CODE_OPERATOR_MESSAGE_SOURCE = 'user';
|
|
129
|
+
/** Longest body written for one turn. Same bound and reason as claude's. */
|
|
130
|
+
exports.MAX_COMMAND_CODE_TURN_BODY_LENGTH = 200_000;
|
|
131
|
+
/** Appended when {@link MAX_COMMAND_CODE_TURN_BODY_LENGTH} truncates a turn. */
|
|
132
|
+
exports.COMMAND_CODE_TURN_TRUNCATION_MARKER = '\n\n_(truncated)_';
|
|
133
|
+
/**
|
|
134
|
+
* Cap on content blocks kept for one turn.
|
|
135
|
+
*
|
|
136
|
+
* claude's number, for a reason that carries over unchanged: the overflow is
|
|
137
|
+
* reported rather than hidden, so the bound only has to be far above a real
|
|
138
|
+
* turn, and one round of Command Code's loop already produced three blocks
|
|
139
|
+
* (`thinking`, `tool_use`, `tool_use`) on a single record.
|
|
140
|
+
*/
|
|
141
|
+
exports.MAX_COMMAND_CODE_TURN_BLOCKS = 2048;
|
|
142
|
+
/** Longest tool detail put on a summary line. */
|
|
143
|
+
exports.MAX_COMMAND_CODE_TOOL_DETAIL_LENGTH = 200;
|
|
144
|
+
/** The label a thinking block is folded behind. The same word the others use. */
|
|
145
|
+
exports.COMMAND_CODE_THINKING_LABEL = 'Thinking';
|
|
146
|
+
/**
|
|
147
|
+
* The fields of a `tool_use` input worth putting on the summary line, in
|
|
148
|
+
* preference order.
|
|
149
|
+
*
|
|
150
|
+
* The first two are measured on this tool: `shell_command` carries `command` and
|
|
151
|
+
* `description`, and the file tools (`write_file` / `read_file` / `edit_file`)
|
|
152
|
+
* carry `file_path` — the bundle's own `fileArgOf` is `input.file_path ??
|
|
153
|
+
* input.path`, which is why `path` follows it. The rest are the same fall-back
|
|
154
|
+
* order claude's reader uses, and every one of them is a *miss* rather than a
|
|
155
|
+
* mistake: a tool whose input matches none of them renders as the bare tool
|
|
156
|
+
* name, which is what the operator saw on the TUI's tool row anyway.
|
|
157
|
+
*/
|
|
158
|
+
const COMMAND_CODE_TOOL_DETAIL_FIELDS = [
|
|
159
|
+
'command',
|
|
160
|
+
'file_path',
|
|
161
|
+
'path',
|
|
162
|
+
'pattern',
|
|
163
|
+
'query',
|
|
164
|
+
'url',
|
|
165
|
+
'description',
|
|
166
|
+
];
|
|
167
|
+
/**
|
|
168
|
+
* Read one `message.content` element.
|
|
169
|
+
*
|
|
170
|
+
* @returns The block, or null when it is not an object with a `type`
|
|
171
|
+
*/
|
|
172
|
+
function readCommandCodeContentBlock(value) {
|
|
173
|
+
if (!(0, event_mapper_1.isPlainObject)(value))
|
|
174
|
+
return null;
|
|
175
|
+
const type = (0, event_mapper_1.readStringField)(value, 'type');
|
|
176
|
+
if (!type)
|
|
177
|
+
return null;
|
|
178
|
+
if (type === 'tool_use') {
|
|
179
|
+
return {
|
|
180
|
+
type,
|
|
181
|
+
text: null,
|
|
182
|
+
toolName: (0, event_mapper_1.readStringField)(value, 'name'),
|
|
183
|
+
toolDetail: readToolDetail(value.input),
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
// `text` on a text block, `thinking` on a thinking block. Read by name rather
|
|
187
|
+
// than by trying both on every block, so that a future block type carrying an
|
|
188
|
+
// unrelated `text` field is not silently rendered as prose. Note that a
|
|
189
|
+
// `tool_result` block *does* carry nested `content[].text` on this tool and is
|
|
190
|
+
// deliberately not reached by either lookup.
|
|
191
|
+
const text = type === 'text'
|
|
192
|
+
? ((0, event_mapper_1.readStringField)(value, 'text') ?? '')
|
|
193
|
+
: type === 'thinking'
|
|
194
|
+
? ((0, event_mapper_1.readStringField)(value, 'thinking') ?? '')
|
|
195
|
+
: null;
|
|
196
|
+
return { type, text, toolName: null, toolDetail: null };
|
|
197
|
+
}
|
|
198
|
+
/** The first present detail field of a `tool_use` input, collapsed to a line. */
|
|
199
|
+
function readToolDetail(input) {
|
|
200
|
+
if (!(0, event_mapper_1.isPlainObject)(input))
|
|
201
|
+
return null;
|
|
202
|
+
for (const field of COMMAND_CODE_TOOL_DETAIL_FIELDS) {
|
|
203
|
+
const value = (0, event_mapper_1.readStringField)(input, field);
|
|
204
|
+
if (value)
|
|
205
|
+
return boundToolDetail(collapseToLine(value));
|
|
206
|
+
}
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
209
|
+
/** A tool detail on one line. A heredoc `command` puts newlines in it. */
|
|
210
|
+
function collapseToLine(value) {
|
|
211
|
+
return value.replace(/\s+/g, ' ').trim();
|
|
212
|
+
}
|
|
213
|
+
function boundToolDetail(value) {
|
|
214
|
+
return value.length <= exports.MAX_COMMAND_CODE_TOOL_DETAIL_LENGTH
|
|
215
|
+
? value
|
|
216
|
+
: `${value.slice(0, exports.MAX_COMMAND_CODE_TOOL_DETAIL_LENGTH - 1)}…`;
|
|
217
|
+
}
|
|
218
|
+
/** `message.meta`, when the entry has one. */
|
|
219
|
+
function readMessageMeta(message) {
|
|
220
|
+
if (!message)
|
|
221
|
+
return null;
|
|
222
|
+
return (0, event_mapper_1.isPlainObject)(message.meta) ? message.meta : null;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Read one parsed transcript line.
|
|
226
|
+
*
|
|
227
|
+
* @returns The record, or null when the value is not an object with a `type`
|
|
228
|
+
*/
|
|
229
|
+
function readCommandCodeTranscriptRecord(value) {
|
|
230
|
+
if (!(0, event_mapper_1.isPlainObject)(value))
|
|
231
|
+
return null;
|
|
232
|
+
const type = (0, event_mapper_1.readStringField)(value, 'type');
|
|
233
|
+
if (!type)
|
|
234
|
+
return null;
|
|
235
|
+
const isHeader = type === exports.COMMAND_CODE_SESSION_RECORD_TYPE;
|
|
236
|
+
const message = (0, event_mapper_1.isPlainObject)(value.message) ? value.message : null;
|
|
237
|
+
const meta = readMessageMeta(message);
|
|
238
|
+
const rawContent = message?.content;
|
|
239
|
+
const blocks = [];
|
|
240
|
+
let text = '';
|
|
241
|
+
if (typeof rawContent === 'string') {
|
|
242
|
+
// Not observed on v1.40.1 — every captured `content` is an array — but the
|
|
243
|
+
// bundle's own `hasValidV2Content` accepts a bare string for a non-tool
|
|
244
|
+
// role, so a session migrated from the v1/v2 format can hold one.
|
|
245
|
+
text = rawContent;
|
|
246
|
+
}
|
|
247
|
+
else if (Array.isArray(rawContent)) {
|
|
248
|
+
for (const entry of rawContent) {
|
|
249
|
+
const block = readCommandCodeContentBlock(entry);
|
|
250
|
+
if (!block)
|
|
251
|
+
continue;
|
|
252
|
+
blocks.push(block);
|
|
253
|
+
if (block.type === 'text' && block.text)
|
|
254
|
+
text += block.text;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
const timestamp = (0, event_mapper_1.readStringField)(value, 'timestamp');
|
|
258
|
+
const parsedTimestamp = timestamp ? Date.parse(timestamp) : NaN;
|
|
259
|
+
const createdAt = meta && typeof meta.createdAt === 'number' ? meta.createdAt : null;
|
|
260
|
+
return {
|
|
261
|
+
type,
|
|
262
|
+
// The header's `id` is the session id, not an entry id, so it must not
|
|
263
|
+
// become a turn key. Only `message` entries and their siblings have one.
|
|
264
|
+
id: isHeader ? null : (0, event_mapper_1.readStringField)(value, 'id'),
|
|
265
|
+
parentId: (0, event_mapper_1.readStringField)(value, 'parentId'),
|
|
266
|
+
role: message ? (0, event_mapper_1.readStringField)(message, 'role') : null,
|
|
267
|
+
sessionId: isHeader ? (0, event_mapper_1.readStringField)(value, 'id') : null,
|
|
268
|
+
cwd: isHeader ? (0, event_mapper_1.readStringField)(value, 'cwd') : null,
|
|
269
|
+
parentSession: isHeader ? (0, event_mapper_1.readStringField)(value, 'parentSession') : null,
|
|
270
|
+
source: meta ? (0, event_mapper_1.readStringField)(meta, 'source') : null,
|
|
271
|
+
isMeta: meta?.isMeta === true,
|
|
272
|
+
isSummary: meta?.isSummary === true,
|
|
273
|
+
isAutomated: meta?.isAutomated === true,
|
|
274
|
+
timestampMs: createdAt !== null && Number.isFinite(createdAt)
|
|
275
|
+
? createdAt
|
|
276
|
+
: Number.isFinite(parsedTimestamp)
|
|
277
|
+
? parsedTimestamp
|
|
278
|
+
: null,
|
|
279
|
+
blocks,
|
|
280
|
+
text,
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Parse a slice of a transcript file, one line at a time.
|
|
285
|
+
*
|
|
286
|
+
* A line that does not parse is counted and dropped; the rest of the slice is
|
|
287
|
+
* still read. That is the entire answer to "the file is being appended to while
|
|
288
|
+
* we read it": the only line a concurrent write can damage is the last one, and
|
|
289
|
+
* the cost of losing it is that this turn is written on the next poll instead of
|
|
290
|
+
* this one.
|
|
291
|
+
*
|
|
292
|
+
* @param text - The bytes read, decoded as UTF-8
|
|
293
|
+
*/
|
|
294
|
+
function parseCommandCodeTranscript(text) {
|
|
295
|
+
const records = [];
|
|
296
|
+
let malformedLines = 0;
|
|
297
|
+
let sessionId = null;
|
|
298
|
+
let cwd = null;
|
|
299
|
+
let parentSession = null;
|
|
300
|
+
for (const line of text.split('\n')) {
|
|
301
|
+
if (line.trim().length === 0)
|
|
302
|
+
continue;
|
|
303
|
+
let parsed;
|
|
304
|
+
try {
|
|
305
|
+
parsed = JSON.parse(line);
|
|
306
|
+
}
|
|
307
|
+
catch {
|
|
308
|
+
malformedLines += 1;
|
|
309
|
+
continue;
|
|
310
|
+
}
|
|
311
|
+
const record = readCommandCodeTranscriptRecord(parsed);
|
|
312
|
+
if (!record) {
|
|
313
|
+
malformedLines += 1;
|
|
314
|
+
continue;
|
|
315
|
+
}
|
|
316
|
+
records.push(record);
|
|
317
|
+
if (record.sessionId) {
|
|
318
|
+
sessionId = record.sessionId;
|
|
319
|
+
cwd = record.cwd;
|
|
320
|
+
parentSession = record.parentSession;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return { records, malformedLines, sessionId, cwd, parentSession };
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Whether this record opens a turn.
|
|
327
|
+
*
|
|
328
|
+
* Command Code's own rule, taken verbatim from its bundle —
|
|
329
|
+
* `isFreshUserTurn(e) = "user" === e.role && !e.content.some(e => "tool_result"
|
|
330
|
+
* === e.type)` — plus the three guards a *reader* needs that the tool does not:
|
|
331
|
+
*
|
|
332
|
+
* - it must be a `message` entry, because `label` / `session_info` /
|
|
333
|
+
* `model_change` carry no conversation;
|
|
334
|
+
* - it must have an `id`, because that is the turn key and an invented one is a
|
|
335
|
+
* row no later run can recognise as already written;
|
|
336
|
+
* - it must have text, because a turn with no prompt in it is a turn this
|
|
337
|
+
* reader cannot name in History.
|
|
338
|
+
*
|
|
339
|
+
* `meta.isMeta` disqualifies it too: that is the flag the tool's own
|
|
340
|
+
* `filterVisibleMessages` hides a record on, so a record Command Code does not
|
|
341
|
+
* show the operator is not one CommandMate should open a turn on.
|
|
342
|
+
*
|
|
343
|
+
* Deliberately **wider** than {@link isCommandCodeOperatorPromptRecord}: a
|
|
344
|
+
* `steering` or `followup` prompt really is answered, and the reply really does
|
|
345
|
+
* belong to it. The narrower question is "should this text appear as the
|
|
346
|
+
* operator's message", which is asked separately and has a different cost of
|
|
347
|
+
* being wrong.
|
|
348
|
+
*/
|
|
349
|
+
function isCommandCodePromptRecord(record) {
|
|
350
|
+
if (record.type !== exports.COMMAND_CODE_MESSAGE_RECORD_TYPE)
|
|
351
|
+
return false;
|
|
352
|
+
if (record.role !== 'user')
|
|
353
|
+
return false;
|
|
354
|
+
if (record.isMeta)
|
|
355
|
+
return false;
|
|
356
|
+
if (!record.id)
|
|
357
|
+
return false;
|
|
358
|
+
// Command Code's own boundary. A user record that carries tool output is the
|
|
359
|
+
// agent's loop feeding itself, not a new question — the captured turn has one
|
|
360
|
+
// such record carrying two `tool_result` blocks.
|
|
361
|
+
if (record.blocks.some((block) => block.type === 'tool_result'))
|
|
362
|
+
return false;
|
|
363
|
+
return record.text.trim().length > 0;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Whether this record is text a human typed at the terminal (the #2196 rule).
|
|
367
|
+
*
|
|
368
|
+
* ## Positive evidence, not a deny list
|
|
369
|
+
*
|
|
370
|
+
* The rule is `meta.source === "user"`, and a record that claims anything else —
|
|
371
|
+
* or nothing at all — produces no `user` row. That direction is the one #2196
|
|
372
|
+
* settled for claude and it is *better* supported here, because Command Code
|
|
373
|
+
* stamps the provenance itself rather than leaving it to be inferred: the
|
|
374
|
+
* bundle's composer path writes `meta:{source:"user",createdAt:Date.now(),…}`,
|
|
375
|
+
* and the agent loop writes `source:"steering"` for text queued while a turn was
|
|
376
|
+
* running and `source:"followup"` for a prompt it appends on the operator's
|
|
377
|
+
* behalf. Both of those pass {@link isCommandCodePromptRecord} — they are
|
|
378
|
+
* genuinely turns — and neither is something a person put in the chat pane.
|
|
379
|
+
*
|
|
380
|
+
* A deny list would default a shape a later Command Code invents to *being
|
|
381
|
+
* shown*; this defaults to being skipped, which costs the `user` row and keeps
|
|
382
|
+
* the reply — the designed degradation rather than a fabricated message.
|
|
383
|
+
*
|
|
384
|
+
* `isSummary` and `isAutomated` are then checked explicitly even though nothing
|
|
385
|
+
* observed carries `source: "user"` *and* either flag. They are not redundant by
|
|
386
|
+
* construction: compaction is something the operator initiates, so a later
|
|
387
|
+
* version stamping `source: "user"` on the summary it produces would be
|
|
388
|
+
* defensible from Command Code's side and wrong from this one's.
|
|
389
|
+
*/
|
|
390
|
+
function isCommandCodeOperatorPromptRecord(record) {
|
|
391
|
+
if (!isCommandCodePromptRecord(record))
|
|
392
|
+
return false;
|
|
393
|
+
if (record.isSummary)
|
|
394
|
+
return false;
|
|
395
|
+
if (record.isAutomated)
|
|
396
|
+
return false;
|
|
397
|
+
return record.source === exports.COMMAND_CODE_OPERATOR_MESSAGE_SOURCE;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Whether this assistant record is the one that ended the reply (Issue #2264).
|
|
401
|
+
*
|
|
402
|
+
* Prose, and **no `tool_use` block beside it**. See
|
|
403
|
+
* {@link CommandCodeTurnAccumulator.closed} for why neither half alone is the
|
|
404
|
+
* rule, and note that the emptiness test here is the one
|
|
405
|
+
* {@link renderCommandCodeTurn} applies to a text block — a block whose `text`
|
|
406
|
+
* trims to nothing is not rendered, so it cannot be what makes a turn look
|
|
407
|
+
* finished either.
|
|
408
|
+
*/
|
|
409
|
+
function isCommandCodeTurnClosingRecord(record) {
|
|
410
|
+
if (record.type !== exports.COMMAND_CODE_MESSAGE_RECORD_TYPE)
|
|
411
|
+
return false;
|
|
412
|
+
if (record.role !== 'assistant')
|
|
413
|
+
return false;
|
|
414
|
+
if (record.blocks.some((block) => block.type === 'tool_use'))
|
|
415
|
+
return false;
|
|
416
|
+
return record.blocks.some((block) => block.type === 'text' && (block.text ?? '').trim().length > 0);
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Whether a writer may record this turn (Issue #2264).
|
|
420
|
+
*
|
|
421
|
+
* Either proof that nothing more is coming: the agent finished answering
|
|
422
|
+
* ({@link CommandCodeTurnAccumulator.closed}), or it has moved on to another
|
|
423
|
+
* prompt ({@link CommandCodeTurnAccumulator.superseded}).
|
|
424
|
+
*
|
|
425
|
+
* No third branch. claude's equivalent keeps one — a turn whose records carried
|
|
426
|
+
* no `stop_reason` at all is written anyway, so that a Claude release which
|
|
427
|
+
* dropped the field could not switch the reader off silently — and that escape
|
|
428
|
+
* hatch has nothing to guard here: this rule reads no optional field, only the
|
|
429
|
+
* presence of block types the render path already depends on. If `tool_use`
|
|
430
|
+
* were renamed the bodies would be wrong long before the gate was.
|
|
431
|
+
* `../antigravity/transcript` reaches the same two-branch predicate for the same
|
|
432
|
+
* reason.
|
|
433
|
+
*/
|
|
434
|
+
function isCommandCodeTurnWritable(turn) {
|
|
435
|
+
return turn.closed || turn.superseded;
|
|
436
|
+
}
|
|
437
|
+
/** A brand-new accumulator for one turn. */
|
|
438
|
+
function createCommandCodeTurn(record, sessionId) {
|
|
439
|
+
return {
|
|
440
|
+
sessionId,
|
|
441
|
+
promptId: record.id,
|
|
442
|
+
startedAt: record.timestampMs ?? 0,
|
|
443
|
+
promptText: record.text,
|
|
444
|
+
promptIsOperatorInput: isCommandCodeOperatorPromptRecord(record),
|
|
445
|
+
blocks: [],
|
|
446
|
+
assistantRecords: 0,
|
|
447
|
+
closed: false,
|
|
448
|
+
superseded: false,
|
|
449
|
+
overflowed: false,
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Group a transcript's records into turns.
|
|
454
|
+
*
|
|
455
|
+
* File order, and a prompt record opens a turn. Deliberately **not** the
|
|
456
|
+
* `parentId` chain: the bundle sets `parentId` to `lastEntryId` — the entry
|
|
457
|
+
* before this one, whatever it was — so it links a reply to a tool result as
|
|
458
|
+
* readily as to its prompt, and following it would rebuild file order the long
|
|
459
|
+
* way round. `../claude/transcript` gives the same reasoning for the same
|
|
460
|
+
* decision.
|
|
461
|
+
*
|
|
462
|
+
* @param records - In file order
|
|
463
|
+
* @param sessionId - Fallback for a window that did not include the header
|
|
464
|
+
*/
|
|
465
|
+
function buildCommandCodeTurns(records, sessionId) {
|
|
466
|
+
const turns = [];
|
|
467
|
+
const seenIds = new Set();
|
|
468
|
+
let current = null;
|
|
469
|
+
let orphanedAssistantRecords = 0;
|
|
470
|
+
let unresolvedParentRecords = 0;
|
|
471
|
+
let nonMessageRecords = 0;
|
|
472
|
+
let resolvedSessionId = sessionId;
|
|
473
|
+
for (const record of records) {
|
|
474
|
+
if (record.sessionId) {
|
|
475
|
+
resolvedSessionId = record.sessionId;
|
|
476
|
+
continue;
|
|
477
|
+
}
|
|
478
|
+
if (record.type !== exports.COMMAND_CODE_MESSAGE_RECORD_TYPE) {
|
|
479
|
+
nonMessageRecords += 1;
|
|
480
|
+
if (record.id)
|
|
481
|
+
seenIds.add(record.id);
|
|
482
|
+
continue;
|
|
483
|
+
}
|
|
484
|
+
if (record.parentId !== null && !seenIds.has(record.parentId)) {
|
|
485
|
+
unresolvedParentRecords += 1;
|
|
486
|
+
}
|
|
487
|
+
if (record.id)
|
|
488
|
+
seenIds.add(record.id);
|
|
489
|
+
if (isCommandCodePromptRecord(record)) {
|
|
490
|
+
current = createCommandCodeTurn(record, resolvedSessionId);
|
|
491
|
+
turns.push(current);
|
|
492
|
+
continue;
|
|
493
|
+
}
|
|
494
|
+
if (record.role !== 'assistant')
|
|
495
|
+
continue;
|
|
496
|
+
if (!current) {
|
|
497
|
+
orphanedAssistantRecords += 1;
|
|
498
|
+
continue;
|
|
499
|
+
}
|
|
500
|
+
current.assistantRecords += 1;
|
|
501
|
+
// Assigned rather than or-ed, so the value left standing is the *last*
|
|
502
|
+
// assistant record's answer. See {@link CommandCodeTurnAccumulator.closed}.
|
|
503
|
+
current.closed = isCommandCodeTurnClosingRecord(record);
|
|
504
|
+
for (const block of record.blocks) {
|
|
505
|
+
if (current.blocks.length >= exports.MAX_COMMAND_CODE_TURN_BLOCKS) {
|
|
506
|
+
current.overflowed = true;
|
|
507
|
+
break;
|
|
508
|
+
}
|
|
509
|
+
current.blocks.push(block);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
// Every turn but the last one has a later prompt behind it, and a prompt is
|
|
513
|
+
// proof the agent moved on. See {@link CommandCodeTurnAccumulator.superseded}.
|
|
514
|
+
for (let index = 0; index < turns.length - 1; index += 1) {
|
|
515
|
+
turns[index].superseded = true;
|
|
516
|
+
}
|
|
517
|
+
return { turns, orphanedAssistantRecords, unresolvedParentRecords, nonMessageRecords };
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Block types that carry nothing a reader wants.
|
|
521
|
+
*
|
|
522
|
+
* A deny set rather than an allow set, for the reason the other four readers
|
|
523
|
+
* give: a block type a later Command Code adds should surface in the unknown
|
|
524
|
+
* tally instead of being silently equivalent to a tool result. `tool_result` is
|
|
525
|
+
* on it because those blocks live on `user` records, which never reach a turn's
|
|
526
|
+
* body.
|
|
527
|
+
*/
|
|
528
|
+
const COMMAND_CODE_SILENT_BLOCK_TYPES = new Set(['tool_result']);
|
|
529
|
+
/** One tool call as a single Markdown line. */
|
|
530
|
+
function renderToolBlock(block) {
|
|
531
|
+
const name = block.toolName ?? 'tool';
|
|
532
|
+
return block.toolDetail ? `- \`${name}\` — ${block.toolDetail}` : `- \`${name}\``;
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Thinking, folded.
|
|
536
|
+
*
|
|
537
|
+
* A blockquote and not `<details>`, for the reason `../turn-body` documents: the
|
|
538
|
+
* card renders with no `rehypeRaw`, so a `<details>` wrapper is dropped whole
|
|
539
|
+
* and takes its summary text with it.
|
|
540
|
+
*/
|
|
541
|
+
function renderThinkingBlock(text) {
|
|
542
|
+
const quoted = text
|
|
543
|
+
.trim()
|
|
544
|
+
.split('\n')
|
|
545
|
+
.map((line) => (line.length > 0 ? `> ${line}` : '>'))
|
|
546
|
+
.join('\n');
|
|
547
|
+
return `> **${exports.COMMAND_CODE_THINKING_LABEL}**\n>\n${quoted}`;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* Render one turn to Markdown.
|
|
551
|
+
*
|
|
552
|
+
* Every block is kept, and the layout belongs to `../turn-body` (#2234): prose
|
|
553
|
+
* leads, thinking stays where it was written as a folded quote, and the tool
|
|
554
|
+
* calls become one labelled section at the end. Command Code needs that
|
|
555
|
+
* separation more than most — its captured turn opens with `thinking` and two
|
|
556
|
+
* `tool_use` blocks and does not reach prose until the *next* record, so a body
|
|
557
|
+
* in transcript order would open with a tool log every time.
|
|
558
|
+
*/
|
|
559
|
+
function renderCommandCodeTurn(turn) {
|
|
560
|
+
const rendered = [];
|
|
561
|
+
const unknown = new Set();
|
|
562
|
+
let textBlocks = 0;
|
|
563
|
+
let toolBlocks = 0;
|
|
564
|
+
for (const block of turn.blocks) {
|
|
565
|
+
if (block.type === 'text') {
|
|
566
|
+
const text = block.text?.trim() ?? '';
|
|
567
|
+
if (text.length === 0)
|
|
568
|
+
continue;
|
|
569
|
+
rendered.push({ kind: 'prose', text });
|
|
570
|
+
textBlocks += 1;
|
|
571
|
+
continue;
|
|
572
|
+
}
|
|
573
|
+
if (block.type === 'thinking') {
|
|
574
|
+
// Measured empty on this tool as well as on claude: the captured blocks
|
|
575
|
+
// carry `signature: ""` and the text is not always retained.
|
|
576
|
+
const text = block.text?.trim() ?? '';
|
|
577
|
+
if (text.length === 0)
|
|
578
|
+
continue;
|
|
579
|
+
rendered.push({ kind: 'aside', text: renderThinkingBlock(text) });
|
|
580
|
+
continue;
|
|
581
|
+
}
|
|
582
|
+
if (block.type === 'tool_use') {
|
|
583
|
+
rendered.push({ kind: 'tool', text: renderToolBlock(block) });
|
|
584
|
+
toolBlocks += 1;
|
|
585
|
+
continue;
|
|
586
|
+
}
|
|
587
|
+
if (!COMMAND_CODE_SILENT_BLOCK_TYPES.has(block.type))
|
|
588
|
+
unknown.add(block.type);
|
|
589
|
+
}
|
|
590
|
+
let body = (0, turn_body_1.separateTurnBody)(rendered).body;
|
|
591
|
+
if (body.length > exports.MAX_COMMAND_CODE_TURN_BODY_LENGTH) {
|
|
592
|
+
body =
|
|
593
|
+
body.slice(0, exports.MAX_COMMAND_CODE_TURN_BODY_LENGTH - exports.COMMAND_CODE_TURN_TRUNCATION_MARKER.length) +
|
|
594
|
+
exports.COMMAND_CODE_TURN_TRUNCATION_MARKER;
|
|
595
|
+
}
|
|
596
|
+
return {
|
|
597
|
+
sessionId: turn.sessionId,
|
|
598
|
+
promptId: turn.promptId,
|
|
599
|
+
body,
|
|
600
|
+
textBlocks,
|
|
601
|
+
toolBlocks,
|
|
602
|
+
unknownBlockTypes: [...unknown],
|
|
603
|
+
};
|
|
604
|
+
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* @module lib/hooks/sources
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.OPENCODE_CLI_TOOL_ID = exports.CODEX_CLI_TOOL_ID = exports.ANTIGRAVITY_CLI_TOOL_ID = exports.GEMINI_CLI_TOOL_ID = exports.COPILOT_CLI_TOOL_ID = exports.CLAUDE_CLI_TOOL_ID = exports.isAbstainSafe = exports.describeNoDecision = exports.describeAbstain = exports.resetPendingDecisions = exports.openDecisionSlot = exports.listOpenDecisions = exports.closeDecisionSlot = exports.answerPendingDecision = exports.TOOL_CALL_ID_FIELDS = exports.SESSION_ID_FIELDS = exports.extractSnakeCaseEventDetail = exports.CAMEL_CASE_HOOK_EVENT_NAMES = exports.whenNamed = exports.runEventMappers = exports.resetUnknownEventTallies = exports.readStringField = exports.readNestedString = exports.readFirstStringField = exports.isPlainObject = exports.getUnknownEventTally = exports.fromNameTable = exports.boundDetail = exports.renderAgentLaunchCommand = exports.HOOK_PORT_ENV_VAR = exports.COMMANDMATE_HOOK_ENV_VARS = exports.AGENT_EVENT_URL_ENV_VAR = exports.definePushHookSource = exports.definePullEventSource = exports.unregisterAgentEventSource = exports.registerAgentEventSource = exports.listAgentEventSources = exports.hasAgentEventSource = exports.getAgentEventSource = void 0;
|
|
15
|
+
exports.COMMAND_CODE_CLI_TOOL_ID = exports.OPENCODE_CLI_TOOL_ID = exports.CODEX_CLI_TOOL_ID = exports.ANTIGRAVITY_CLI_TOOL_ID = exports.GEMINI_CLI_TOOL_ID = exports.COPILOT_CLI_TOOL_ID = exports.CLAUDE_CLI_TOOL_ID = exports.isAbstainSafe = exports.describeNoDecision = exports.describeAbstain = exports.resetPendingDecisions = exports.openDecisionSlot = exports.listOpenDecisions = exports.closeDecisionSlot = exports.answerPendingDecision = exports.TOOL_CALL_ID_FIELDS = exports.SESSION_ID_FIELDS = exports.extractSnakeCaseEventDetail = exports.CAMEL_CASE_HOOK_EVENT_NAMES = exports.whenNamed = exports.runEventMappers = exports.resetUnknownEventTallies = exports.readStringField = exports.readNestedString = exports.readFirstStringField = exports.isPlainObject = exports.getUnknownEventTally = exports.fromNameTable = exports.boundDetail = exports.renderAgentLaunchCommand = exports.HOOK_PORT_ENV_VAR = exports.COMMANDMATE_HOOK_ENV_VARS = exports.AGENT_EVENT_URL_ENV_VAR = exports.definePushHookSource = exports.definePullEventSource = exports.unregisterAgentEventSource = exports.registerAgentEventSource = exports.listAgentEventSources = exports.hasAgentEventSource = exports.getAgentEventSource = void 0;
|
|
16
16
|
var registry_1 = require("./registry");
|
|
17
17
|
Object.defineProperty(exports, "getAgentEventSource", { enumerable: true, get: function () { return registry_1.getAgentEventSource; } });
|
|
18
18
|
Object.defineProperty(exports, "hasAgentEventSource", { enumerable: true, get: function () { return registry_1.hasAgentEventSource; } });
|
|
@@ -65,3 +65,5 @@ var tool_id_5 = require("./codex/tool-id");
|
|
|
65
65
|
Object.defineProperty(exports, "CODEX_CLI_TOOL_ID", { enumerable: true, get: function () { return tool_id_5.CODEX_CLI_TOOL_ID; } });
|
|
66
66
|
var tool_id_6 = require("./opencode/tool-id");
|
|
67
67
|
Object.defineProperty(exports, "OPENCODE_CLI_TOOL_ID", { enumerable: true, get: function () { return tool_id_6.OPENCODE_CLI_TOOL_ID; } });
|
|
68
|
+
var tool_id_7 = require("./command-code/tool-id");
|
|
69
|
+
Object.defineProperty(exports, "COMMAND_CODE_CLI_TOOL_ID", { enumerable: true, get: function () { return tool_id_7.COMMAND_CODE_CLI_TOOL_ID; } });
|