commandmate 0.44.1 → 0.44.3
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 +169 -169
- package/.next/app-path-routes-manifest.json +35 -35
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +0 -6
- 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.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.js +1 -1
- package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/release-notes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update/route.js +2 -2
- package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/route.js +1 -1
- package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/capabilities/route.js +1 -1
- package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/route.js +1 -1
- package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
- package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/status/route.js +1 -1
- package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
- package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/route.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.js +1 -1
- package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/agent-event/route.js +2 -2
- package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/claude-done/route.js +2 -2
- package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/escalation/route.js +1 -1
- package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/subscriptions/route.js +2 -2
- package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/vapid/route.js +1 -1
- package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route.js +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/route.js +1 -1
- package/.next/server/app/api/relays/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/route.js +1 -1
- package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/route.js +1 -1
- package/.next/server/app/api/repositories/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/default-agents/route.js +1 -1
- package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sidebar/group-order/route.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_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.js +2 -2
- package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/route.js +2 -2
- package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +3 -3
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/execution-logs/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route_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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route_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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/notes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -2
- package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -2
- package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/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 +2 -2
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route.js +3 -3
- package/.next/server/app/api/worktrees/[id]/schedules/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -3
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.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.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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.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.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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/more/page_client-reference-manifest.js +1 -1
- package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sessions/page.js +1 -1
- package/.next/server/app/sessions/page.js.nft.json +1 -1
- package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/page.js +11 -11
- package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
- package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +35 -35
- package/.next/server/chunks/1191.js +2 -2
- package/.next/server/chunks/1210.js +1 -1
- package/.next/server/chunks/1559.js +2 -0
- package/.next/server/chunks/1789.js +1 -0
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/2404.js +1 -1
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/2460.js +1 -0
- package/.next/server/chunks/2710.js +1 -1
- package/.next/server/chunks/2908.js +1 -0
- package/.next/server/chunks/2980.js +1 -1
- package/.next/server/chunks/3241.js +1 -1
- package/.next/server/chunks/3480.js +1 -1
- package/.next/server/chunks/3718.js +1 -1
- package/.next/server/chunks/4207.js +2 -2
- package/.next/server/chunks/450.js +1 -1
- package/.next/server/chunks/4672.js +5 -0
- package/.next/server/chunks/{9353.js → 4718.js} +2 -2
- package/.next/server/chunks/4837.js +14 -0
- package/.next/server/chunks/5048.js +1 -1
- package/.next/server/chunks/5209.js +1 -0
- package/.next/server/chunks/5595.js +1 -0
- package/.next/server/chunks/5625.js +25 -0
- package/.next/server/chunks/5845.js +1 -0
- package/.next/server/chunks/611.js +1 -1
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/6401.js +1 -1
- package/.next/server/chunks/6781.js +1 -1
- package/.next/server/chunks/6793.js +3 -3
- package/.next/server/chunks/7491.js +2 -2
- package/.next/server/chunks/7905.js +1 -1
- package/.next/server/chunks/850.js +1 -0
- package/.next/server/chunks/8543.js +1 -1
- package/.next/server/chunks/8728.js +3 -3
- package/.next/server/chunks/8791.js +1 -1
- package/.next/server/chunks/8800.js +1 -1
- package/.next/server/chunks/8918.js +7 -7
- package/.next/server/chunks/9130.js +1 -5
- package/.next/server/chunks/9390.js +2 -3
- package/.next/server/chunks/9584.js +1 -1
- package/.next/server/chunks/9627.js +6 -6
- package/.next/server/chunks/9731.js +3 -3
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{1642-fb2e176aaadbd137.js → 1642-767aed8e7c61ef7f.js} +1 -1
- package/.next/static/chunks/{2407-f1f258d4a1d92620.js → 2407-06d35bb1aa02de80.js} +1 -1
- package/.next/static/chunks/{2619-04bc32f026a0d946.js → 2619-a305ad4810f1393a.js} +1 -1
- package/.next/static/chunks/4727-5d695d71e3fdf97b.js +1 -0
- package/.next/static/chunks/{8165-3853772f6ae1299b.js → 8165-3525fb42f1b4976e.js} +1 -1
- package/.next/static/chunks/app/{layout-da66300cc20244ed.js → layout-0d1750b833f5cc3e.js} +1 -1
- package/.next/static/chunks/app/sessions/page-2af68c63211c751f.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-e36898c3a80e7302.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/terminal/{page-373ea37b16d930c7.js → page-c601f3b3ece6557e.js} +1 -1
- package/.next/static/css/057f64a65726c439.css +1 -0
- package/.next/trace +13 -13
- package/dist/cli/commands/ask.d.ts.map +1 -1
- package/dist/cli/commands/ask.js +120 -119
- package/dist/cli/commands/attach.d.ts +94 -0
- package/dist/cli/commands/attach.d.ts.map +1 -1
- package/dist/cli/commands/attach.js +145 -7
- package/dist/cli/commands/auto-yes.js +1 -1
- package/dist/cli/commands/capture.d.ts.map +1 -1
- package/dist/cli/commands/capture.js +10 -13
- package/dist/cli/commands/command-target.d.ts +23 -0
- package/dist/cli/commands/command-target.d.ts.map +1 -0
- package/dist/cli/commands/command-target.js +25 -0
- package/dist/cli/commands/instances.d.ts.map +1 -1
- package/dist/cli/commands/instances.js +41 -2
- package/dist/cli/commands/message-dispatch.d.ts +36 -0
- package/dist/cli/commands/message-dispatch.d.ts.map +1 -0
- package/dist/cli/commands/message-dispatch.js +63 -0
- package/dist/cli/commands/reply.d.ts.map +1 -1
- package/dist/cli/commands/reply.js +2 -5
- package/dist/cli/commands/respond.d.ts.map +1 -1
- package/dist/cli/commands/respond.js +3 -6
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +149 -146
- package/dist/cli/commands/wait.d.ts.map +1 -1
- package/dist/cli/commands/wait.js +608 -416
- package/dist/cli/types/api-responses.d.ts +174 -27
- package/dist/cli/types/api-responses.d.ts.map +1 -1
- package/dist/cli/types/api-responses.js +4 -2
- package/dist/cli/utils/api-client.d.ts +25 -5
- package/dist/cli/utils/api-client.d.ts.map +1 -1
- package/dist/cli/utils/api-client.js +87 -55
- package/dist/cli/utils/server-url.d.ts +1 -0
- package/dist/cli/utils/server-url.d.ts.map +1 -1
- package/dist/cli/utils/server-url.js +7 -0
- package/dist/config/uat-isolation.d.ts +140 -0
- package/dist/config/uat-isolation.d.ts.map +1 -0
- package/dist/config/uat-isolation.js +246 -0
- package/dist/lib/global-state.d.ts +12 -0
- package/dist/lib/global-state.d.ts.map +1 -0
- package/dist/lib/global-state.js +16 -0
- package/dist/lib/polling/auto-yes-suppression-reason.d.ts +33 -0
- package/dist/lib/polling/auto-yes-suppression-reason.d.ts.map +1 -0
- package/dist/lib/polling/auto-yes-suppression-reason.js +2 -0
- package/dist/lib/session/prompt-view.d.ts +228 -0
- package/dist/lib/session/prompt-view.d.ts.map +1 -0
- package/dist/lib/session/prompt-view.js +290 -0
- package/dist/lib/session/status-evidence-type.d.ts +16 -0
- package/dist/lib/session/status-evidence-type.d.ts.map +1 -0
- package/dist/lib/session/status-evidence-type.js +2 -0
- package/dist/lib/tmux/legacy-session-alias.d.ts.map +1 -1
- package/dist/lib/tmux/legacy-session-alias.js +2 -1
- package/dist/server/locales/en/worktree.json +3 -1
- package/dist/server/locales/ja/worktree.json +3 -1
- package/dist/server/server.js +5 -3
- package/dist/server/src/cli/types/api-responses.js +4 -2
- package/dist/server/src/config/cli-tool-timing-config.js +1 -6
- package/dist/server/src/config/uat-isolation.js +246 -0
- package/dist/server/src/lib/assistant-response-saver.js +62 -3
- package/dist/server/src/lib/auto-yes-lifecycle.js +139 -0
- package/dist/server/src/lib/auto-yes-poller.js +465 -160
- package/dist/server/src/lib/auto-yes-state.js +2 -2
- package/dist/server/src/lib/cli-tools/antigravity.js +39 -80
- package/dist/server/src/lib/cli-tools/base.js +151 -0
- package/dist/server/src/lib/cli-tools/codex.js +44 -80
- package/dist/server/src/lib/cli-tools/command-code.js +24 -56
- package/dist/server/src/lib/cli-tools/copilot.js +25 -67
- package/dist/server/src/lib/cli-tools/direct-input.js +8 -0
- package/dist/server/src/lib/cli-tools/gemini.js +23 -73
- package/dist/server/src/lib/cli-tools/opencode-pane-width.js +53 -0
- package/dist/server/src/lib/cli-tools/opencode-v2.js +9 -7
- package/dist/server/src/lib/cli-tools/opencode.js +21 -85
- package/dist/server/src/lib/cli-tools/submit-verified-sender.js +127 -4
- package/dist/server/src/lib/cli-tools/vibe-local.js +21 -66
- package/dist/server/src/lib/detection/cli-patterns.js +374 -3047
- package/dist/server/src/lib/detection/idle-evidence-observation.js +2 -2
- package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +7 -32
- package/dist/server/src/lib/detection/prompt-detector.js +2 -35
- package/dist/server/src/lib/detection/selection-shape-patterns.js +69 -0
- package/dist/server/src/lib/detection/selection-shape.js +32 -520
- package/dist/server/src/lib/detection/shared/pasted-text.js +41 -0
- package/dist/server/src/lib/detection/shared/shell-pane-command.js +16 -0
- package/dist/server/src/lib/detection/shared/strip-box-drawing.js +25 -0
- package/dist/server/src/lib/detection/status-detector.js +1 -1
- package/dist/server/src/lib/detection/tools/antigravity/detect.js +12 -60
- package/dist/server/src/lib/detection/tools/antigravity/dialog.js +2 -15
- package/dist/server/src/lib/detection/tools/antigravity/live-region.js +39 -0
- package/dist/server/src/lib/detection/tools/antigravity/patterns.js +286 -0
- package/dist/server/src/lib/detection/tools/claude/detect.js +11 -17
- package/dist/server/src/lib/detection/tools/claude/live-region.js +26 -0
- package/dist/server/src/lib/detection/tools/claude/patterns.js +264 -4
- package/dist/server/src/lib/detection/tools/claude/prompt.js +2 -10
- package/dist/server/src/lib/detection/tools/codex/cli-patterns.js +1 -1
- package/dist/server/src/lib/detection/tools/codex/detect.js +71 -130
- package/dist/server/src/lib/detection/tools/codex/live-region.js +104 -0
- package/dist/server/src/lib/detection/tools/codex/patterns.js +855 -0
- package/dist/server/src/lib/detection/tools/codex/prompt.js +2 -10
- package/dist/server/src/lib/detection/tools/command-code/detect.js +19 -50
- package/dist/server/src/lib/detection/tools/command-code/dialog.js +2 -18
- package/dist/server/src/lib/detection/tools/command-code/live-region.js +36 -0
- package/dist/server/src/lib/detection/tools/command-code/patterns.js +234 -0
- package/dist/server/src/lib/detection/tools/command-code/selection-shape.js +461 -0
- package/dist/server/src/lib/detection/tools/context-above.js +20 -0
- package/dist/server/src/lib/detection/tools/copilot/detect.js +13 -35
- package/dist/server/src/lib/detection/tools/copilot/live-region.js +52 -0
- package/dist/server/src/lib/detection/tools/copilot/patterns.js +640 -0
- package/dist/server/src/lib/detection/tools/copilot/prompt.js +2 -10
- package/dist/server/src/lib/detection/tools/frame.js +36 -2
- package/dist/server/src/lib/detection/tools/gemini/patterns.js +29 -0
- package/dist/server/src/lib/detection/tools/live-region-specs.js +31 -0
- package/dist/server/src/lib/detection/tools/live-region.js +204 -0
- package/dist/server/src/lib/detection/tools/opencode/detect.js +11 -49
- package/dist/server/src/lib/detection/tools/opencode/live-region.js +24 -0
- package/dist/server/src/lib/detection/tools/opencode/patterns.js +508 -0
- package/dist/server/src/lib/detection/tools/opencode-gutter-live-region.js +72 -0
- package/dist/server/src/lib/detection/tools/opencode-v2/detect.js +10 -42
- package/dist/server/src/lib/detection/tools/opencode-v2/live-region.js +24 -0
- package/dist/server/src/lib/detection/tools/opencode-v2/patterns.js +63 -0
- package/dist/server/src/lib/detection/tools/run-detection.js +31 -50
- package/dist/server/src/lib/detection/tools/verdicts.js +59 -0
- package/dist/server/src/lib/detection/tools/vibe-local/patterns.js +20 -0
- package/dist/server/src/lib/detection/truncate-raw-content.js +38 -0
- package/dist/server/src/lib/detection/turn-abandoned.js +66 -0
- package/dist/server/src/lib/detection/unclassified-frame-tracker.js +2 -2
- package/dist/server/src/lib/global-state.js +16 -0
- package/dist/server/src/lib/hooks/agent-session-telemetry.js +4 -6
- package/dist/server/src/lib/hooks/permission-decision-state.js +2 -2
- package/dist/server/src/lib/hooks/sources/antigravity/history.js +11 -76
- package/dist/server/src/lib/hooks/sources/antigravity/hooks-config.js +63 -1
- package/dist/server/src/lib/hooks/sources/antigravity/source.js +16 -0
- package/dist/server/src/lib/hooks/sources/antigravity/transcript.js +3 -12
- package/dist/server/src/lib/hooks/sources/claude/history.js +17 -156
- package/dist/server/src/lib/hooks/sources/claude/queued-notice.js +53 -0
- package/dist/server/src/lib/hooks/sources/claude/source.js +33 -3
- package/dist/server/src/lib/hooks/sources/claude/transcript.js +3 -13
- package/dist/server/src/lib/hooks/sources/codex/history.js +11 -74
- package/dist/server/src/lib/hooks/sources/codex/hooks-config.js +147 -11
- package/dist/server/src/lib/hooks/sources/codex/relay-install.js +64 -21
- package/dist/server/src/lib/hooks/sources/codex/transcript.js +5 -15
- package/dist/server/src/lib/hooks/sources/command-code/history.js +20 -121
- package/dist/server/src/lib/hooks/sources/command-code/transcript.js +3 -13
- package/dist/server/src/lib/hooks/sources/copilot/hook-settings.js +161 -31
- package/dist/server/src/lib/hooks/sources/define-source.js +40 -55
- package/dist/server/src/lib/hooks/sources/event-mapper.js +2 -1
- package/dist/server/src/lib/hooks/sources/opencode/diff.js +3 -4
- package/dist/server/src/lib/hooks/sources/opencode/history.js +2 -1
- package/dist/server/src/lib/hooks/sources/opencode/launch-settings.js +2 -1
- package/dist/server/src/lib/hooks/sources/opencode/payloads.js +2 -1
- package/dist/server/src/lib/hooks/sources/opencode/ports.js +2 -1
- package/dist/server/src/lib/hooks/sources/opencode/subscription.js +4 -3
- package/dist/server/src/lib/hooks/sources/opencode/transcript.js +3 -16
- package/dist/server/src/lib/hooks/sources/opencode-v2/history.js +2 -1
- package/dist/server/src/lib/hooks/sources/opencode-v2/mappers.js +5 -4
- package/dist/server/src/lib/hooks/sources/opencode-v2/ports.js +2 -1
- package/dist/server/src/lib/hooks/sources/opencode-v2/subscription.js +3 -7
- package/dist/server/src/lib/hooks/sources/opencode-v2/usage.js +2 -1
- package/dist/server/src/lib/hooks/sources/pending-decisions.js +2 -1
- package/dist/server/src/lib/hooks/sources/registry.js +3 -2
- package/dist/server/src/lib/hooks/sources/transcript-history.js +262 -0
- package/dist/server/src/lib/hooks/sources/turn-body.js +31 -0
- package/dist/server/src/lib/hooks/tool-input-normalization-state.js +2 -2
- package/dist/server/src/lib/polling/antigravity-permission-receipts.js +2 -2
- package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +16 -4
- package/dist/server/src/lib/polling/auto-yes-enter-fallback-state.js +142 -0
- package/dist/server/src/lib/polling/auto-yes-enter-fallback.js +187 -0
- package/dist/server/src/lib/polling/auto-yes-resolver.js +9 -3
- package/dist/server/src/lib/polling/auto-yes-suppression-reason.js +2 -0
- package/dist/server/src/lib/polling/auto-yes-suppression-state.js +2 -2
- package/dist/server/src/lib/polling/pending-scraped-response.js +190 -0
- package/dist/server/src/lib/polling/prompt-dedup-state.js +2 -2
- package/dist/server/src/lib/polling/prompt-dedup.js +2 -2
- package/dist/server/src/lib/polling/response-checker-dialog-gate.js +95 -0
- package/dist/server/src/lib/polling/response-checker-extraction-result.js +50 -0
- package/dist/server/src/lib/polling/response-checker-extraction-steps.js +670 -0
- package/dist/server/src/lib/polling/response-checker.js +666 -1162
- package/dist/server/src/lib/polling/response-dedup.js +3 -4
- package/dist/server/src/lib/polling/response-poller-constants.js +17 -0
- package/dist/server/src/lib/polling/response-poller-core.js +54 -20
- package/dist/server/src/lib/polling/startup-screen.js +142 -0
- package/dist/server/src/lib/polling/structured-history-gate.js +3 -2
- package/dist/server/src/lib/prompt-answer-semantic.js +178 -0
- package/dist/server/src/lib/prompt-answer-sender.js +6 -5
- package/dist/server/src/lib/push/failure-episode-state.js +2 -2
- package/dist/server/src/lib/push/notification-dedup.js +3 -4
- package/dist/server/src/lib/push/prompt-card-state.js +2 -2
- package/dist/server/src/lib/push/waiting-push-notifier.js +3 -4
- package/dist/server/src/lib/realtime/publisher-registry.js +3 -2
- package/dist/server/src/lib/realtime/terminal-broadcast.js +38 -2
- package/dist/server/src/lib/realtime/terminal-session-ownership.js +45 -0
- package/dist/server/src/lib/relay/relay-delivery.js +6 -2
- package/dist/server/src/lib/relay/relay-readiness.js +38 -1
- package/dist/server/src/lib/relay/relay-triggers.js +9 -0
- package/dist/server/src/lib/resource-cleanup.js +6 -4
- package/dist/server/src/lib/response-cleaner.js +24 -1
- package/dist/server/src/lib/response-extractor.js +16 -0
- package/dist/server/src/lib/schedule-manager.js +8 -10
- package/dist/server/src/lib/session/agent-event-ask-user-question.js +168 -0
- package/dist/server/src/lib/session/agent-event-awaiting-instruction.js +104 -0
- package/dist/server/src/lib/session/agent-event-dedup.js +539 -0
- package/dist/server/src/lib/session/agent-event-model.js +562 -0
- package/dist/server/src/lib/session/agent-event-record.js +10 -0
- package/dist/server/src/lib/session/agent-event-state.js +106 -1854
- package/dist/server/src/lib/session/agent-event-structured-state.js +109 -0
- package/dist/server/src/lib/session/agent-event-turn.js +811 -0
- package/dist/server/src/lib/session/agent-session-lifecycle.js +11 -2
- package/dist/server/src/lib/session/chat-turn-progress.js +322 -0
- package/dist/server/src/lib/session/claude-executor.js +45 -5
- package/dist/server/src/lib/session/claude-session.js +21 -65
- package/dist/server/src/lib/session/cli-session.js +17 -0
- package/dist/server/src/lib/session/current-output-builder.js +454 -1103
- package/dist/server/src/lib/session/current-output-history-writers.js +255 -0
- package/dist/server/src/lib/session/current-output-types.js +9 -0
- package/dist/server/src/lib/session/detection-divergence.js +55 -0
- package/dist/server/src/lib/session/global-session-constants.js +2 -13
- package/dist/server/src/lib/session/hook-turn-hold.js +102 -0
- package/dist/server/src/lib/session/layer-disagreement.js +2 -2
- package/dist/server/src/lib/session/opencode-session-store.js +2 -1
- package/dist/server/src/lib/session/prompt-view.js +290 -0
- package/dist/server/src/lib/session/prompt-waiting-composition.js +35 -0
- package/dist/server/src/lib/session/provisional-turn.js +3 -1
- package/dist/server/src/lib/session/send-user-message.js +1 -1
- package/dist/server/src/lib/session/session-starting-state.js +4 -6
- package/dist/server/src/lib/session/status-evidence-type.js +2 -0
- package/dist/server/src/lib/session/status-evidence.js +2 -2
- package/dist/server/src/lib/session/structured-status-merge.js +335 -0
- package/dist/server/src/lib/session/waiting-episode-state.js +3 -4
- package/dist/server/src/lib/session/waiting-kind.js +3 -0
- package/dist/server/src/lib/session-cleanup.js +6 -8
- package/dist/server/src/lib/skills/install-plan.js +2 -1
- package/dist/server/src/lib/skills/snapshot-store.js +2 -2
- package/dist/server/src/lib/skills/uninstall-plan.js +2 -2
- package/dist/server/src/lib/timer-manager.js +6 -8
- package/dist/server/src/lib/tmux/geometry-delegation.js +3 -4
- package/dist/server/src/lib/tmux/legacy-session-alias.js +2 -1
- package/dist/server/src/lib/tmux/session-hooks.js +2 -1
- package/dist/server/src/lib/tmux/session-status-options.js +3 -3
- package/dist/server/src/lib/tmux/tmux-capture-cache.js +3 -2
- package/dist/server/src/lib/tmux/tmux.js +33 -59
- package/dist/server/src/lib/tui-accumulator.js +2 -2
- package/dist/server/src/lib/version-checker.js +6 -6
- package/dist/server/src/lib/ws-server.js +47 -11
- package/docs/en/user-guide/webapp-guide.md +27 -3
- package/package.json +1 -1
- package/release-notes/0.44.2.json +33 -0
- package/release-notes/0.44.3.json +82 -0
- package/scripts/hooks/cmate-agent-event.sh +18 -0
- package/.next/server/chunks/1068.js +0 -1
- package/.next/server/chunks/434.js +0 -1
- package/.next/server/chunks/5775.js +0 -1
- package/.next/server/chunks/6474.js +0 -14
- package/.next/server/chunks/650.js +0 -1
- package/.next/server/chunks/6661.js +0 -1
- package/.next/server/chunks/8583.js +0 -1
- package/.next/server/chunks/964.js +0 -1
- package/.next/server/chunks/967.js +0 -1
- package/.next/server/chunks/9882.js +0 -25
- package/.next/static/chunks/591-308072f285c34787.js +0 -1
- package/.next/static/chunks/app/sessions/page-049e06335187aa91.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-040c5f0f585e6812.js +0 -1
- package/.next/static/css/38070d879efa1371.css +0 -1
- package/dist/server/src/lib/cli-tools/index.js +0 -41
- package/dist/server/src/lib/polling/global-session-poller.js +0 -140
- /package/.next/static/{57lOiz8zSEHdw97XIm0af → tWwHQzmvc-rv9KKUtDWfQ}/_buildManifest.js +0 -0
- /package/.next/static/{57lOiz8zSEHdw97XIm0af → tWwHQzmvc-rv9KKUtDWfQ}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,855 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Codex pattern constants and helpers moved out of `../../cli-patterns.ts`
|
|
4
|
+
* (Issue #3217 I-2). `cli-patterns.ts` re-exports every public name.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.CODEX_USER_ECHO_PATTERN = exports.CODEX_TRAILED_STATUS_BAR_PATTERN = exports.CODEX_STATUS_BAR_PATTERN = exports.CODEX_PAGER_FOOTER_PATTERN = exports.CODEX_EFFORT_PICKER_FOOTER_PATTERN = exports.CODEX_PICKER_FOOTER_PATTERN = exports.CODEX_FORM_SUBMIT_FOOTER_PATTERN = exports.CODEX_APPROVAL_FOOTER_PATTERN = exports.CODEX_SELECTION_LIST_PATTERN = exports.CODEX_SEPARATOR_PATTERN = exports.CODEX_HOOKS_REVIEW_ANCHORS = exports.CODEX_GENUINE_PROMPT_LINE = exports.CODEX_DIALOG_PATTERN = exports.CODEX_TRUST_QUESTION_PATTERN = exports.CODEX_PROMPT_PATTERN = exports.CODEX_LIVE_STATUS_ROW_PATTERN = exports.CODEX_INTERRUPT_HINT_PATTERN = exports.CODEX_THINKING_PATTERN = void 0;
|
|
8
|
+
exports.isCodexTurnInterruptedFrame = isCodexTurnInterruptedFrame;
|
|
9
|
+
exports.isCodexTurnActive = isCodexTurnActive;
|
|
10
|
+
exports.isCodexPromptReady = isCodexPromptReady;
|
|
11
|
+
exports.findCodexComposerRow = findCodexComposerRow;
|
|
12
|
+
exports.getCodexActiveDialog = getCodexActiveDialog;
|
|
13
|
+
exports.getCodexLifecycleDialog = getCodexLifecycleDialog;
|
|
14
|
+
exports.findCodexChromeStart = findCodexChromeStart;
|
|
15
|
+
exports.findCodexUserEchoIndex = findCodexUserEchoIndex;
|
|
16
|
+
const ansi_1 = require("../../ansi");
|
|
17
|
+
const thinking_constants_1 = require("../../../../config/thinking-constants");
|
|
18
|
+
const cli_patterns_1 = require("./cli-patterns");
|
|
19
|
+
/**
|
|
20
|
+
* Codex activity-marker pattern
|
|
21
|
+
* Matches activity indicators like "• Planning", "• Searching", etc.
|
|
22
|
+
* T1.1: Extended to include "Ran" and "Deciding"
|
|
23
|
+
*
|
|
24
|
+
* Issue #1671: these are *transcript records*, not a liveness signal. Codex is
|
|
25
|
+
* inline-rendered (no alternate screen), so every "• Ran <cmd>" / "• Running
|
|
26
|
+
* <cmd>" step it ever printed stays in the pane scrollback forever — measured on
|
|
27
|
+
* a live `mcbd-codex-*` pane: 396 "• Ran" and 11 "• Running" rows, all of them
|
|
28
|
+
* from finished steps. Matching this pattern against a fixed tail window
|
|
29
|
+
* therefore answers "did a step happen recently", not "is Codex working now".
|
|
30
|
+
* Use {@link isCodexTurnActive} for the latter.
|
|
31
|
+
*/
|
|
32
|
+
exports.CODEX_THINKING_PATTERN = /•\s*(Planning|Searching|Exploring|Running|Thinking|Working|Reading|Writing|Analyzing|Ran|Deciding)/m;
|
|
33
|
+
/**
|
|
34
|
+
* Codex live status-line hint (Issue #1671)
|
|
35
|
+
*
|
|
36
|
+
* While a turn is in flight Codex pins a status row directly above the composer:
|
|
37
|
+
*
|
|
38
|
+
* • Working (13s • esc to interrupt) · 1 background terminal running · /ps to view
|
|
39
|
+
*
|
|
40
|
+
* It is repainted in place every tick and erased the moment the turn ends, so —
|
|
41
|
+
* unlike the "• Ran"/"• Running" step records — it never lingers in scrollback.
|
|
42
|
+
* Measured on a 11,000-line capture of an idle Codex pane: zero occurrences of
|
|
43
|
+
* "esc to interrupt", against 396 lingering "• Ran" rows. That makes it the one
|
|
44
|
+
* unambiguous "Codex is still generating" token, mirroring Claude's
|
|
45
|
+
* {@link CLAUDE_INTERRUPT_HINT_PATTERN}.
|
|
46
|
+
*/
|
|
47
|
+
exports.CODEX_INTERRUPT_HINT_PATTERN = /esc to interrupt/;
|
|
48
|
+
/**
|
|
49
|
+
* Codex's live status row itself, whatever its header says (Issue #3337).
|
|
50
|
+
*
|
|
51
|
+
* {@link CODEX_THINKING_PATTERN} names the row by a `•` and a fixed list of
|
|
52
|
+
* verbs, and codex-cli 0.160.0 draws the row two ways that list misses
|
|
53
|
+
* (`tests/fixtures/codex-mid-turn-3337/`, a live turn sampled every second):
|
|
54
|
+
*
|
|
55
|
+
* - the bullet is a spinner that alternates `•` and `◦`, about half the frames
|
|
56
|
+
* each — so a `◦ Working (43s • esc to interrupt)` frame read `ready`;
|
|
57
|
+
* - the header is not always a verb from the list — `Reconnecting... waiting
|
|
58
|
+
* for network` while codex retries the request.
|
|
59
|
+
*
|
|
60
|
+
* Anchored on the parenthesised elapsed time that precedes `esc to interrupt`
|
|
61
|
+
* (`(43s •`, `(1m 00s •`), which only the live row carries. The queued-steer
|
|
62
|
+
* row's `(press esc to interrupt and send immediately)` has no elapsed time,
|
|
63
|
+
* so it does not match — `steer-queued-running.txt` keeps its verdict.
|
|
64
|
+
*/
|
|
65
|
+
exports.CODEX_LIVE_STATUS_ROW_PATTERN = /^[•◦]\s.*\((?:\d+h\s*)?(?:\d+m\s*)?\d+s\s*•\s*esc to interrupt\)/m;
|
|
66
|
+
/** The row codex prints when a turn is interrupted (Esc), measured on 0.160.0. */
|
|
67
|
+
const CODEX_TURN_INTERRUPTED_ROW = /^■ Conversation interrupted\b/;
|
|
68
|
+
/**
|
|
69
|
+
* The row codex keeps between the interruption and the composer while a shell
|
|
70
|
+
* the turn started is still running (`1 background terminal running · /ps to
|
|
71
|
+
* view · /stop to close`). Not content of the turn: it says the terminal is
|
|
72
|
+
* alive, not that the agent is.
|
|
73
|
+
*/
|
|
74
|
+
const CODEX_BACKGROUND_TERMINAL_ROW = /^\d+ background terminals? running\b/;
|
|
75
|
+
/**
|
|
76
|
+
* Whether the frame shows a codex turn that was interrupted, as its last word
|
|
77
|
+
* (Issue #3337).
|
|
78
|
+
*
|
|
79
|
+
* The last non-blank row above the composer is `■ Conversation interrupted …`.
|
|
80
|
+
* An interrupted turn fires no `Stop` hook (measured on codex 0.160.0 with the
|
|
81
|
+
* hooks trusted: `UserPromptSubmit`, then nothing, after Esc), so this is the
|
|
82
|
+
* frame that says the agent's own end-of-turn report is not coming. A marker
|
|
83
|
+
* from an earlier turn is not the last row once anything follows it. A
|
|
84
|
+
* background-terminal row between the marker and the composer is skipped — an
|
|
85
|
+
* Esc during `sleep 90 && ls` leaves one there.
|
|
86
|
+
*
|
|
87
|
+
* @param lines - Pane rows, ANSI stripped
|
|
88
|
+
*/
|
|
89
|
+
function isCodexTurnInterruptedFrame(lines) {
|
|
90
|
+
const composer = findCodexComposerRow(lines);
|
|
91
|
+
if (composer < 0)
|
|
92
|
+
return false;
|
|
93
|
+
for (let i = composer - 1; i >= 0; i--) {
|
|
94
|
+
const row = lines[i].trim();
|
|
95
|
+
if (row === '' || CODEX_BACKGROUND_TERMINAL_ROW.test(row))
|
|
96
|
+
continue;
|
|
97
|
+
return CODEX_TURN_INTERRUPTED_ROW.test(row);
|
|
98
|
+
}
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* How far above the last content row Codex's composer ("› …") may sit.
|
|
103
|
+
*
|
|
104
|
+
* Codex pins the composer and the status bar to the bottom of the pane, so the
|
|
105
|
+
* composer lands 2-3 rows above the last non-blank row in every observed frame.
|
|
106
|
+
* The small allowance keeps the search from walking up into the transcript and
|
|
107
|
+
* latching onto the echoed user message, which uses the same "› " marker.
|
|
108
|
+
*/
|
|
109
|
+
const CODEX_COMPOSER_SEARCH_ROWS = 8;
|
|
110
|
+
/**
|
|
111
|
+
* Decide whether a Codex turn is still in flight (Issue #1671).
|
|
112
|
+
*
|
|
113
|
+
* Completion detection used to answer this with {@link CODEX_THINKING_PATTERN}
|
|
114
|
+
* over a fixed 20-row tail. Because "• Ran <cmd>" is a *past-tense record* that
|
|
115
|
+
* never leaves the transcript, a turn that ended with a short final message kept
|
|
116
|
+
* that record inside the tail window and was reported as "still thinking"
|
|
117
|
+
* forever — so its reply was never saved, while a turn whose final message
|
|
118
|
+
* happened to be longer than 20 rows pushed the record out of the window and was
|
|
119
|
+
* saved. Whether a reply reached Message History depended on how long it was.
|
|
120
|
+
*
|
|
121
|
+
* Two signals, both measured against live codex-cli 0.146.0 captures:
|
|
122
|
+
*
|
|
123
|
+
* 1. The live status line ({@link CODEX_INTERRUPT_HINT_PATTERN}) anywhere in the
|
|
124
|
+
* tail window. Present in every generating frame from 1s onwards, absent from
|
|
125
|
+
* every idle frame.
|
|
126
|
+
* 2. An activity marker in the rows immediately above the composer — the band
|
|
127
|
+
* Codex reserves for that status line. Version-agnostic backstop for a Codex
|
|
128
|
+
* build whose status row drops the "esc to interrupt" wording; deliberately
|
|
129
|
+
* narrow (THINKING_TAIL_LINE_COUNT rows, matching the window status-detector
|
|
130
|
+
* already uses) so records further up the transcript cannot reach it.
|
|
131
|
+
*
|
|
132
|
+
* When no composer can be located the frame is not a normal Codex layout (an
|
|
133
|
+
* overlay is up, or the pane is mid-redraw), so signal 2 falls back to the whole
|
|
134
|
+
* tail window — the pre-#1671 behaviour, which errs towards "still active".
|
|
135
|
+
*
|
|
136
|
+
* @param lines - Captured pane lines with trailing blank rows already trimmed
|
|
137
|
+
* @param tailLineCount - Size of the tail window completion detection looks at
|
|
138
|
+
* @returns True while Codex is still generating
|
|
139
|
+
*/
|
|
140
|
+
function isCodexTurnActive(lines, tailLineCount) {
|
|
141
|
+
const tailWindow = (0, ansi_1.stripAnsi)(lines.slice(Math.max(0, lines.length - tailLineCount)).join('\n'));
|
|
142
|
+
// 1. Live status line — unambiguous, never survives the end of a turn.
|
|
143
|
+
if (exports.CODEX_INTERRUPT_HINT_PATTERN.test(tailWindow))
|
|
144
|
+
return true;
|
|
145
|
+
// 2. Activity marker in the status-line band directly above the composer.
|
|
146
|
+
// Searched bottom-up so the composer wins over the echoed user message.
|
|
147
|
+
let composerIndex = -1;
|
|
148
|
+
for (let i = lines.length - 1; i >= Math.max(0, lines.length - CODEX_COMPOSER_SEARCH_ROWS); i--) {
|
|
149
|
+
if (exports.CODEX_PROMPT_PATTERN.test((0, ansi_1.stripAnsi)(lines[i]))) {
|
|
150
|
+
composerIndex = i;
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
if (composerIndex < 0)
|
|
155
|
+
return exports.CODEX_THINKING_PATTERN.test(tailWindow);
|
|
156
|
+
const bandStart = Math.max(0, composerIndex - thinking_constants_1.THINKING_TAIL_LINE_COUNT + 1);
|
|
157
|
+
const band = (0, ansi_1.stripAnsi)(lines.slice(bandStart, composerIndex + 1).join('\n'));
|
|
158
|
+
return exports.CODEX_THINKING_PATTERN.test(band);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Codex prompt pattern
|
|
162
|
+
* T1.2: Improved to detect empty prompts as well
|
|
163
|
+
*/
|
|
164
|
+
exports.CODEX_PROMPT_PATTERN = /^›\s*/m;
|
|
165
|
+
/**
|
|
166
|
+
* The directory/folder trust dialog's question line, across codex builds
|
|
167
|
+
* (Issue #2884): `Do you trust the contents of this directory?` (<=0.155.1)
|
|
168
|
+
* and `Trust this folder?` (0.157.1, which dropped the "Do you trust" wording
|
|
169
|
+
* entirely -- `tests/fixtures/codex-dialogs-0157/trust.txt`). The two variants
|
|
170
|
+
* are kept as alternatives of one pattern -- rather than duplicated across
|
|
171
|
+
* {@link CODEX_DIALOG_PATTERN}, `getCodexActiveDialog` and
|
|
172
|
+
* `getCodexLifecycleDialog` -- so those three cannot drift into disagreeing
|
|
173
|
+
* about what counts as the trust dialog.
|
|
174
|
+
*/
|
|
175
|
+
exports.CODEX_TRUST_QUESTION_PATTERN = /Do you trust|Trust this folder\?/;
|
|
176
|
+
/**
|
|
177
|
+
* Codex INTERACTIVE startup dialog pattern (Issue #890)
|
|
178
|
+
*
|
|
179
|
+
* Codex shows interactive update-notification and trust dialogs on first launch.
|
|
180
|
+
* Their currently-selected option lines render as "› 1. Update now", which ALSO
|
|
181
|
+
* matches CODEX_PROMPT_PATTERN (the bare "^›" input-prompt pattern). So "is the
|
|
182
|
+
* input prompt ready?" cannot be decided by CODEX_PROMPT_PATTERN alone -- it must
|
|
183
|
+
* also confirm no INTERACTIVE dialog is still active. This pattern matches markers
|
|
184
|
+
* that appear ONLY in interactive dialogs:
|
|
185
|
+
* - Interactive update dialog: "Skip until next version" (the option-3 label)
|
|
186
|
+
* - Trust dialog: {@link CODEX_TRUST_QUESTION_PATTERN}
|
|
187
|
+
* - Dialog confirm footer: "Press enter to continue"
|
|
188
|
+
* - Numbered selection option: "› 1. ..." (leading ›, a digit, a dot)
|
|
189
|
+
*
|
|
190
|
+
* IMPORTANT (Issue #890 regression): the substring "Update available" is
|
|
191
|
+
* deliberately NOT a marker. After the update is skipped, codex keeps a
|
|
192
|
+
* non-interactive banner box ("✨ Update available! ... / Run npm install -g
|
|
193
|
+
* @openai/codex to update.") rendered ABOVE the genuine "› " prompt. Matching
|
|
194
|
+
* "Update available" would make isCodexPromptReady() return false for as long as
|
|
195
|
+
* that banner is visible, hanging waitForReady (~30s) and waitForPrompt (15s) on
|
|
196
|
+
* exactly the first-launch + update-pending case this fix targets. The interactive
|
|
197
|
+
* update dialog is still reliably detected via its other three markers above
|
|
198
|
+
* ("› 1. Update now" + "Skip until next version" + "Press enter to continue").
|
|
199
|
+
*
|
|
200
|
+
* No /g flag (would make .test() stateful); no nested quantifiers (ReDoS-safe).
|
|
201
|
+
*/
|
|
202
|
+
exports.CODEX_DIALOG_PATTERN = new RegExp(`Skip until next version|${exports.CODEX_TRUST_QUESTION_PATTERN.source}|Press enter to continue|^\\s*›\\s*\\d+\\.\\s`, 'm');
|
|
203
|
+
/**
|
|
204
|
+
* Codex genuine input-prompt line (Issue #892).
|
|
205
|
+
*
|
|
206
|
+
* A line whose first non-space glyph is "›" but which is NOT a numbered dialog
|
|
207
|
+
* option ("› 1. ..."). The selected dialog option renders "›" at column 0 too
|
|
208
|
+
* (same column as the live prompt), so the digit-dot negative lookahead is what
|
|
209
|
+
* distinguishes the genuine input line from a dialog option line. Single-line
|
|
210
|
+
* (no /m, no /g) -- callers test it per line to locate the prompt's position.
|
|
211
|
+
*/
|
|
212
|
+
exports.CODEX_GENUINE_PROMPT_LINE = /^\s*›(?!\s*\d+\.)/;
|
|
213
|
+
/**
|
|
214
|
+
* Decide whether Codex output shows a genuine interactive input prompt rather than
|
|
215
|
+
* a startup dialog (Issue #890, reworked in Issue #892).
|
|
216
|
+
*
|
|
217
|
+
* POSITION-based: capturePane(50) returns scrollback, so a dismissed update/trust
|
|
218
|
+
* dialog lingers ABOVE the live prompt. The original Issue #890 form
|
|
219
|
+
* (`CODEX_PROMPT_PATTERN && !CODEX_DIALOG_PATTERN`) is a whole-window test, so a
|
|
220
|
+
* residual dialog line anywhere in the frame keeps it false forever -- hanging
|
|
221
|
+
* waitForReady/waitForPrompt and (via the re-firing branches) injecting "222...".
|
|
222
|
+
*
|
|
223
|
+
* Instead the frame is ready when a genuine input-prompt line sits BELOW every
|
|
224
|
+
* interactive dialog marker -- i.e. the prompt is the bottom-most active element.
|
|
225
|
+
* CODEX_PROMPT_PATTERN / CODEX_DIALOG_PATTERN are intentionally unchanged here
|
|
226
|
+
* (status-detector.ts / response-checker.ts depend on them).
|
|
227
|
+
*
|
|
228
|
+
* Used by both CodexTool.waitForReady() (startup) and CodexTool.waitForPrompt()
|
|
229
|
+
* (before every send) so a residual dialog is never mistaken for "ready" and, just
|
|
230
|
+
* as importantly, a genuine prompt below stale dialog scrollback IS detected.
|
|
231
|
+
*/
|
|
232
|
+
function isCodexPromptReady(output) {
|
|
233
|
+
const lines = output.split('\n');
|
|
234
|
+
let lastDialogMarkerIdx = -1;
|
|
235
|
+
let lastPromptIdx = -1;
|
|
236
|
+
for (let i = 0; i < lines.length; i++) {
|
|
237
|
+
const line = lines[i];
|
|
238
|
+
if (exports.CODEX_DIALOG_PATTERN.test(line)) {
|
|
239
|
+
// A dialog marker/option line is never itself a genuine prompt.
|
|
240
|
+
lastDialogMarkerIdx = i;
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
if (exports.CODEX_GENUINE_PROMPT_LINE.test(line)) {
|
|
244
|
+
lastPromptIdx = i;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return lastPromptIdx >= 0 && lastPromptIdx > lastDialogMarkerIdx;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Classify the bottom-most active Codex startup dialog (Issue #892).
|
|
251
|
+
*
|
|
252
|
+
* POSITION-based companion to isCodexPromptReady(): only dialog text appearing
|
|
253
|
+
* BELOW the genuine input-prompt line is considered "active". Dialog lines that
|
|
254
|
+
* remain in scrollback ABOVE a live prompt are ignored, so a dismissed dialog is
|
|
255
|
+
* never re-acted on (this is what stops the update branch from re-sending "2" once
|
|
256
|
+
* the dialog has been skipped -- the root cause of the "222..." prefix).
|
|
257
|
+
*
|
|
258
|
+
* Precedence matches CodexTool.waitForReady()'s historical branch order: the
|
|
259
|
+
* update dialog wins over its own "Press enter to continue" footer, because Enter
|
|
260
|
+
* on the update dialog could confirm the default "1. Update now" (npm install).
|
|
261
|
+
*/
|
|
262
|
+
/**
|
|
263
|
+
* Index of codex's bottom-most genuine input-prompt row, or -1 (Issue #892).
|
|
264
|
+
*
|
|
265
|
+
* This is codex's live-region composer marker (Issue #3183): the declaration in
|
|
266
|
+
* `tools/codex/live-region.ts` is built on it, so `NormalizedFrame.liveRegion`
|
|
267
|
+
* starts at this row, and the string entries below — which keep a caller that
|
|
268
|
+
* has no `NormalizedFrame` (codex's own launch loop) — read the same row.
|
|
269
|
+
*
|
|
270
|
+
* capturePane returns scrollback, so a dialog that was answered minutes ago is
|
|
271
|
+
* still in the frame; only what sits BELOW the live prompt is still awaiting a
|
|
272
|
+
* key. Shared by getCodexActiveDialog and getCodexLifecycleDialog so the two
|
|
273
|
+
* cannot drift into disagreeing about what "active" means.
|
|
274
|
+
*/
|
|
275
|
+
function findCodexComposerRow(lines) {
|
|
276
|
+
for (let i = lines.length - 1; i >= 0; i--) {
|
|
277
|
+
if (exports.CODEX_GENUINE_PROMPT_LINE.test(lines[i]))
|
|
278
|
+
return i;
|
|
279
|
+
}
|
|
280
|
+
return -1;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* The rows of codex's ACTIVE region: everything strictly below the composer
|
|
284
|
+
* row, or the whole frame when there is none (Issue #892).
|
|
285
|
+
*
|
|
286
|
+
* A {@link NormalizedFrame} carries that answer already (Issue #3183); a string
|
|
287
|
+
* is read with the same marker, {@link findCodexComposerRow}.
|
|
288
|
+
*/
|
|
289
|
+
function codexActiveRows(input) {
|
|
290
|
+
if (typeof input !== 'string') {
|
|
291
|
+
const region = input.liveRegion;
|
|
292
|
+
if (region.tool === 'codex') {
|
|
293
|
+
return region.anchor === 'composer'
|
|
294
|
+
? input.contentLines.slice((region.composerEndRow ?? region.startRow) + 1)
|
|
295
|
+
: input.contentLines;
|
|
296
|
+
}
|
|
297
|
+
return codexActiveRows(input.clean);
|
|
298
|
+
}
|
|
299
|
+
const lines = input.split('\n');
|
|
300
|
+
return lines.slice(findCodexComposerRow(lines) + 1);
|
|
301
|
+
}
|
|
302
|
+
function getCodexActiveDialog(output) {
|
|
303
|
+
// Residual dialog text above a live prompt is excluded, so a dialog lingering
|
|
304
|
+
// in scrollback is never treated as active.
|
|
305
|
+
const active = codexActiveRows(output).join('\n');
|
|
306
|
+
if (active === '') {
|
|
307
|
+
return null;
|
|
308
|
+
}
|
|
309
|
+
if (active.includes('Skip until next version') ||
|
|
310
|
+
(active.includes('Update') && active.includes('Skip'))) {
|
|
311
|
+
return 'update';
|
|
312
|
+
}
|
|
313
|
+
if (exports.CODEX_TRUST_QUESTION_PATTERN.test(active)) {
|
|
314
|
+
return 'trust';
|
|
315
|
+
}
|
|
316
|
+
if (active.includes('Press enter to continue')) {
|
|
317
|
+
return 'press-enter';
|
|
318
|
+
}
|
|
319
|
+
return null;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Anchors of codex's "Hooks need review" launch dialog — screen 1 of the three
|
|
323
|
+
* it can put in front of a session (Issue #1760, re-measured on codex-cli
|
|
324
|
+
* 0.148.0 for Issue #1829):
|
|
325
|
+
*
|
|
326
|
+
* ```
|
|
327
|
+
* Hooks need review
|
|
328
|
+
* 4 hooks are new or changed.
|
|
329
|
+
* Hooks can run outside the sandbox after you trust them.
|
|
330
|
+
*
|
|
331
|
+
* > 1. Review hooks
|
|
332
|
+
* 2. Trust all and continue
|
|
333
|
+
* 3. Continue without trusting (hooks won't run)
|
|
334
|
+
* Press enter to confirm or esc to go back
|
|
335
|
+
* ```
|
|
336
|
+
*
|
|
337
|
+
* The hook COUNT is data — 0.147.0 said 5, 0.148.0 said 4 — so neither anchor
|
|
338
|
+
* reads it. Both strings are required so a "hooks" mention elsewhere cannot
|
|
339
|
+
* select an option on a live prompt.
|
|
340
|
+
*/
|
|
341
|
+
exports.CODEX_HOOKS_REVIEW_ANCHORS = ['Hooks need review', 'Continue without trusting'];
|
|
342
|
+
/**
|
|
343
|
+
* Footer of screen 2, the hooks LIST, new in codex-cli 0.148.0 (Issue #1829):
|
|
344
|
+
* `Press t to trust all; enter to review hooks; esc to close`.
|
|
345
|
+
*
|
|
346
|
+
* The semicolon is what separates it from screen 3's footer — "trust all;" and
|
|
347
|
+
* "trust;" are disjoint — and matching the footer rather than the table above it
|
|
348
|
+
* keeps the two screens distinguishable by a single line each.
|
|
349
|
+
*/
|
|
350
|
+
const CODEX_HOOKS_LIST_FOOTER_PATTERN = /press\s+t\s+to\s+trust\s+all\s*;/i;
|
|
351
|
+
/**
|
|
352
|
+
* Footer of screen 3, the per-hook review DETAIL (Issue #1829):
|
|
353
|
+
* `Press t to trust; esc to go back`. Where both live sessions in the Issue were
|
|
354
|
+
* found parked.
|
|
355
|
+
*/
|
|
356
|
+
const CODEX_HOOKS_DETAIL_FOOTER_PATTERN = /press\s+t\s+to\s+trust\s*;/i;
|
|
357
|
+
/**
|
|
358
|
+
* How much of the active region {@link getCodexLifecycleDialog} judges, in
|
|
359
|
+
* non-blank lines counted from the bottom (Issue #1829).
|
|
360
|
+
*
|
|
361
|
+
* `getCodexActiveDialog` searches the whole active region, which is right for
|
|
362
|
+
* its caller: `waitForReady` only ever runs during `startSession`, when nothing
|
|
363
|
+
* else can be on screen. This classifier runs on every Auto-Yes poll for the
|
|
364
|
+
* life of the session, where "active region" alone is not enough — a codex
|
|
365
|
+
* approval request renders no `› ` composer line, so an approval that comes up
|
|
366
|
+
* while a dismissed hooks screen is still inside the capture window would have
|
|
367
|
+
* the whole frame as its active region and would be mistaken for the dialog.
|
|
368
|
+
* Requiring the dialog to be in the TAIL is what separates the screen the user
|
|
369
|
+
* is looking at from the one they have already left.
|
|
370
|
+
*
|
|
371
|
+
* 12 lines fits the tallest screen this has to recognise (the review dialog's
|
|
372
|
+
* two anchors sit 6 lines apart) and none of the shorter frames below it.
|
|
373
|
+
*/
|
|
374
|
+
const CODEX_LIFECYCLE_TAIL_LINES = 12;
|
|
375
|
+
/**
|
|
376
|
+
* The interactive update dialog, by its option-3 label or its option-1 line.
|
|
377
|
+
*
|
|
378
|
+
* Deliberately stricter than `getCodexActiveDialog`'s `Update` AND `Skip`
|
|
379
|
+
* fallback: that pair can occur in ordinary agent output, and here a false
|
|
380
|
+
* positive silently stops Auto-Yes answering a real prompt. Both anchors below
|
|
381
|
+
* are dialog chrome that agent output does not produce.
|
|
382
|
+
*/
|
|
383
|
+
const CODEX_UPDATE_DIALOG_ANCHORS = [
|
|
384
|
+
/skip until next version/i,
|
|
385
|
+
/^\s*[›❯]?\s*\d+\.\s*Update now/im,
|
|
386
|
+
];
|
|
387
|
+
/**
|
|
388
|
+
* Classify the bottom-most ACTIVE codex lifecycle screen (Issue #1829).
|
|
389
|
+
*
|
|
390
|
+
* Position-based, via {@link codexActiveRows}: a dialog left in
|
|
391
|
+
* scrollback above a live prompt is not active and returns `null`. That is not
|
|
392
|
+
* a detail — the auto-answer guard in the Auto-Yes poller is built on this
|
|
393
|
+
* function, and a whole-frame version of it would switch Auto-Yes off for the
|
|
394
|
+
* rest of a codex session the moment any launch dialog scrolled past.
|
|
395
|
+
*
|
|
396
|
+
* The two hooks screens are matched FIRST and bottom-up, because a stuck pane
|
|
397
|
+
* holds screen 2 above screen 3 and the way out of each differs. The remaining
|
|
398
|
+
* three are region-level substring tests, which is all their anchors allow:
|
|
399
|
+
* the review dialog's are on two different lines.
|
|
400
|
+
*
|
|
401
|
+
* Deliberately NOT used to decide whether a prompt exists. `detectPrompt` still
|
|
402
|
+
* reports these screens, so a human still sees them; what this function gates is
|
|
403
|
+
* only whether a machine may answer on their behalf.
|
|
404
|
+
*
|
|
405
|
+
* @param output - ANSI-stripped pane capture, or a frame `normalizeFrame(…, 'codex')` built
|
|
406
|
+
* @returns The active lifecycle screen, or null when none is
|
|
407
|
+
*/
|
|
408
|
+
function getCodexLifecycleDialog(output) {
|
|
409
|
+
const activeLines = codexActiveRows(output);
|
|
410
|
+
const window = [];
|
|
411
|
+
for (let i = activeLines.length - 1; i >= 0 && window.length < CODEX_LIFECYCLE_TAIL_LINES; i--) {
|
|
412
|
+
if (activeLines[i].trim() === '')
|
|
413
|
+
continue;
|
|
414
|
+
window.unshift(activeLines[i]);
|
|
415
|
+
}
|
|
416
|
+
if (window.length === 0)
|
|
417
|
+
return null;
|
|
418
|
+
const text = window.join('\n');
|
|
419
|
+
// One bottom-up pass, returning on the first line that decides the question --
|
|
420
|
+
// including the lines that decide it NEGATIVELY. A stuck pane holds screen 2
|
|
421
|
+
// above screen 3, and an approval request can come up with a hooks screen
|
|
422
|
+
// still inside the capture window; in both cases the screen the user is
|
|
423
|
+
// looking at is the lower one.
|
|
424
|
+
for (let i = window.length - 1; i >= 0; i--) {
|
|
425
|
+
const line = window[i];
|
|
426
|
+
if (CODEX_HOOKS_LIST_FOOTER_PATTERN.test(line))
|
|
427
|
+
return 'hooks-list';
|
|
428
|
+
if (CODEX_HOOKS_DETAIL_FOOTER_PATTERN.test(line))
|
|
429
|
+
return 'hooks-detail';
|
|
430
|
+
// The agent asking the human for permission mid-turn (Issue #1628's
|
|
431
|
+
// "esc to cancel" footer, which no lifecycle screen wears). This is exactly
|
|
432
|
+
// the prompt Auto-Yes exists to answer, so whatever lifecycle text is still
|
|
433
|
+
// above it has been left behind and must not withhold the answer.
|
|
434
|
+
if (exports.CODEX_APPROVAL_FOOTER_PATTERN.test(line))
|
|
435
|
+
return null;
|
|
436
|
+
if (CODEX_UPDATE_DIALOG_ANCHORS.some((pattern) => pattern.test(line)))
|
|
437
|
+
return 'update';
|
|
438
|
+
if (exports.CODEX_TRUST_QUESTION_PATTERN.test(line))
|
|
439
|
+
return 'trust';
|
|
440
|
+
// Both anchors required, so a stray "hooks" mention cannot claim the screen.
|
|
441
|
+
if (line.includes(exports.CODEX_HOOKS_REVIEW_ANCHORS[1]) && text.includes(exports.CODEX_HOOKS_REVIEW_ANCHORS[0])) {
|
|
442
|
+
return 'hooks-review';
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
return null;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Codex separator pattern
|
|
449
|
+
*/
|
|
450
|
+
exports.CODEX_SEPARATOR_PATTERN = /^─.*Worked for.*─+$/m;
|
|
451
|
+
/**
|
|
452
|
+
* Codex CLI selection list footer pattern (Issue #619, #622)
|
|
453
|
+
* Detects Codex CLI's interactive selection prompts that use arrow key
|
|
454
|
+
* navigation (e.g., /model command's model and reasoning level selection steps).
|
|
455
|
+
*
|
|
456
|
+
* Matches:
|
|
457
|
+
* - Step 1 (model selection): "Press enter to select reasoning effort, or esc to dismiss."
|
|
458
|
+
* - Step 2 (reasoning level): "Press enter to confirm or esc to go back"
|
|
459
|
+
* - Legacy: "press enter to confirm or esc to cancel"
|
|
460
|
+
* Does NOT match: "press number to confirm" (handled by detectMultipleChoicePrompt)
|
|
461
|
+
*
|
|
462
|
+
* The distinction is important: "press enter to confirm/select" indicates an arrow-key
|
|
463
|
+
* selection list (NavigationButtons), while "press number to confirm" indicates
|
|
464
|
+
* a numbered prompt (PromptPanel with buttons).
|
|
465
|
+
*/
|
|
466
|
+
exports.CODEX_SELECTION_LIST_PATTERN = /press\s+enter\s+to\s+(?:confirm|select)/i;
|
|
467
|
+
/**
|
|
468
|
+
* Codex CLI approval-request footer pattern (Issue #1628).
|
|
469
|
+
*
|
|
470
|
+
* Codex renders an approval request ("Would you like to run the following
|
|
471
|
+
* command?" / "Would you like to make the following edits?") with the SAME
|
|
472
|
+
* "Press enter to confirm" footer as a `/model`-style menu, which is why
|
|
473
|
+
* CODEX_SELECTION_LIST_PATTERN swallows it. The two differ in the escape verb:
|
|
474
|
+
* an approval request can be *cancelled* (it is the agent asking the human for
|
|
475
|
+
* permission), a menu can only be *gone back* from.
|
|
476
|
+
*
|
|
477
|
+
* Measured on codex-cli 0.146.0 (five consecutive live approval frames captured
|
|
478
|
+
* from a real session, plus two live `/model` picker frames):
|
|
479
|
+
* - approval : "Press enter to confirm or esc to cancel"
|
|
480
|
+
* - /model : "Press enter to confirm or esc to go back"
|
|
481
|
+
* - /model : "Press enter to select reasoning effort, or esc to dismiss."
|
|
482
|
+
*
|
|
483
|
+
* Used only as one of two OR'd approval signals (see isCodexApprovalRequest in
|
|
484
|
+
* status-detector.ts); the other is an interrogative question line, so a future
|
|
485
|
+
* rewording of either signal alone does not reopen Issue #1628.
|
|
486
|
+
*
|
|
487
|
+
* No /g flag (keeps .test() stateless), no nested quantifiers (ReDoS-safe).
|
|
488
|
+
*/
|
|
489
|
+
exports.CODEX_APPROVAL_FOOTER_PATTERN = /esc\s+to\s+cancel/i;
|
|
490
|
+
/**
|
|
491
|
+
* Codex CLI tool-call approval FORM footer (Issue #2609).
|
|
492
|
+
*
|
|
493
|
+
* Codex asks for some tool calls through a form rather than the classic
|
|
494
|
+
* approval list, and closes it with a different sentence. Measured on a live
|
|
495
|
+
* Browser use approval (2026-09-17, twice in one session):
|
|
496
|
+
*
|
|
497
|
+
* ```text
|
|
498
|
+
* • Calling 修正前の専用GUIを開く
|
|
499
|
+
*
|
|
500
|
+
* Field 1/1
|
|
501
|
+
* Allow Browser use to access http://127.0.0.1:60311?
|
|
502
|
+
*
|
|
503
|
+
* origin: http://127.0.0.1:60311
|
|
504
|
+
*
|
|
505
|
+
* › 1. Allow Run the tool and continue.
|
|
506
|
+
* 2. Always allow Run the tool and remember this choice for future tool calls.
|
|
507
|
+
* 3. Cancel Cancel this tool call
|
|
508
|
+
* enter to submit | esc to cancel
|
|
509
|
+
* ```
|
|
510
|
+
*
|
|
511
|
+
* No `press enter to confirm/select`, so {@link CODEX_SELECTION_LIST_PATTERN}
|
|
512
|
+
* misses it and `detectCodexDialog` returned null for a dialog the status
|
|
513
|
+
* detector reported as `waiting` — which `/prompt-response` read as
|
|
514
|
+
* `prompt_no_longer_active` and Auto-Yes as `unclassified-frame`.
|
|
515
|
+
*
|
|
516
|
+
* Deliberately a separate constant rather than another alternative in
|
|
517
|
+
* CODEX_SELECTION_LIST_PATTERN: that one also drives `detect.ts` branch 0.8, and
|
|
518
|
+
* this footer is consumed ONLY by `detectCodexDialog`'s entry gate. It is the
|
|
519
|
+
* whole measured row and nothing looser — `/m` + `^…$` against the trimmed
|
|
520
|
+
* footer rows `findNumberedOptionBlock` returns, so a sentence that merely
|
|
521
|
+
* contains "enter to submit", or "esc to cancel" on its own (the #1928 mutation
|
|
522
|
+
* that rewords the approval footer), still does not vouch for a block.
|
|
523
|
+
*
|
|
524
|
+
* No /g flag (keeps .test() stateless), no nested quantifiers (ReDoS-safe).
|
|
525
|
+
*/
|
|
526
|
+
exports.CODEX_FORM_SUBMIT_FOOTER_PATTERN = /^enter\s+to\s+submit\s*\|\s*esc\s+to\s+cancel$/im;
|
|
527
|
+
/**
|
|
528
|
+
* Codex CLI 0.157 picker footer pattern (Issue #2868).
|
|
529
|
+
*
|
|
530
|
+
* codex-cli 0.157.1 retitled `/model` ("Select Model and Effort") and replaced
|
|
531
|
+
* its "Press enter to confirm or esc to go back" footer with the terse
|
|
532
|
+
* `enter select · esc back` row (measured: `tests/fixtures/codex-dialogs-0157/`).
|
|
533
|
+
* CODEX_SELECTION_LIST_PATTERN no longer matched, so branch 0.8 missed the
|
|
534
|
+
* picker and the dialog entry gate refused the answer (`prompt_no_longer_active`).
|
|
535
|
+
*
|
|
536
|
+
* Same construction as CODEX_FORM_SUBMIT_FOOTER_PATTERN: the whole measured row
|
|
537
|
+
* (`/m` + `^…$`), tested only against a trimmed single footer row — never a
|
|
538
|
+
* window — so a transcript quoting the words does not vouch for anything.
|
|
539
|
+
* CODEX_SELECTION_LIST_PATTERN is deliberately left as is (#2774 / #2841).
|
|
540
|
+
*
|
|
541
|
+
* No /g flag (keeps .test() stateless), no nested quantifiers (ReDoS-safe).
|
|
542
|
+
*/
|
|
543
|
+
exports.CODEX_PICKER_FOOTER_PATTERN = /^enter\s+select\s*·\s*esc\s+back$/im;
|
|
544
|
+
/**
|
|
545
|
+
* Codex CLI 0.157 effort-picker footer pattern (Issue #2868).
|
|
546
|
+
*
|
|
547
|
+
* The second `/model` step ("Select Reasoning Level for …") closes with
|
|
548
|
+
* `enter default · s session · esc back` (measured:
|
|
549
|
+
* `tests/fixtures/codex-dialogs-0157/model-picker-effort.txt`). Same
|
|
550
|
+
* construction and rules as CODEX_PICKER_FOOTER_PATTERN: the whole row, tested
|
|
551
|
+
* only against a single trimmed footer row.
|
|
552
|
+
*
|
|
553
|
+
* No /g flag (keeps .test() stateless), no nested quantifiers (ReDoS-safe).
|
|
554
|
+
*/
|
|
555
|
+
exports.CODEX_EFFORT_PICKER_FOOTER_PATTERN = /^enter\s+default\s*·\s*s\s+session\s*·\s*esc\s+back$/im;
|
|
556
|
+
/**
|
|
557
|
+
* Codex CLI pager / edit-previous (transcript) mode footer pattern (Issue #1017)
|
|
558
|
+
*
|
|
559
|
+
* When Codex enters its transcript pager / "edit previous message" mode, the
|
|
560
|
+
* bottom of the frame shows scroll / edit key hints INSTEAD of the usual
|
|
561
|
+
* "model · N% left · path" status bar, e.g.:
|
|
562
|
+
* "↑/↓ to scroll pgup/pgdn to page home/end to jump"
|
|
563
|
+
* "q to quit esc/← to edit prev → to edit next enter to edit message"
|
|
564
|
+
* together with a scroll-percentage separator ("─ N% ─", NOT "N% left ·").
|
|
565
|
+
*
|
|
566
|
+
* Neither CODEX_SELECTION_LIST_PATTERN (which needs "press enter to
|
|
567
|
+
* confirm/select") nor the "N% left ·" status-bar boundary logic in
|
|
568
|
+
* status-detector.ts fires here, so the read-only TerminalDisplay is left with no
|
|
569
|
+
* way to scroll or escape (the reported bug). This pattern recognizes the pager
|
|
570
|
+
* footer directly — independent of the status bar — so the selection window
|
|
571
|
+
* (NavigationButtons) can be rendered.
|
|
572
|
+
*
|
|
573
|
+
* Matches any of the pager-specific hints (either footer line is sufficient):
|
|
574
|
+
* - scroll/page/jump hints: "↑/↓ to scroll" / "pgup/pgdn to page" / "home/end to jump"
|
|
575
|
+
* - edit-previous hints: "esc/← to edit prev" / "→ to edit next" / "enter to edit message"
|
|
576
|
+
* The two branches are independent so a mangled unicode-arrow footer line is still
|
|
577
|
+
* caught by the ASCII "to edit prev/next/message" and "pgup/pgdn"/"home/end" hints.
|
|
578
|
+
*
|
|
579
|
+
* Does NOT match the genuine "/model" selection list ("press enter to select") —
|
|
580
|
+
* that footer has no scroll/page/jump or edit-prev/next/message hint — so the
|
|
581
|
+
* existing CODEX_SELECTION_LIST_PATTERN path is unaffected (no regression).
|
|
582
|
+
*
|
|
583
|
+
* No /g flag (S4-5: keeps test() stateless). No nested quantifiers (SEC4-001: ReDoS-safe).
|
|
584
|
+
*/
|
|
585
|
+
exports.CODEX_PAGER_FOOTER_PATTERN = /(?:↑\/↓|pgup\/pgdn|home\/end)\s+to\s+(?:scroll|page|jump)|to\s+edit\s+(?:prev|next|message)/i;
|
|
586
|
+
/**
|
|
587
|
+
* Codex CLI status-bar line pattern (Issue #1150)
|
|
588
|
+
*
|
|
589
|
+
* The Codex TUI renders a status bar as the bottom-most content line, just above
|
|
590
|
+
* the input area. status-detector.ts uses it as the footer boundary that separates
|
|
591
|
+
* the conversation content (thinking indicators / idle "›" prompt) from the input
|
|
592
|
+
* area, so both the selection-list check (priority 0.8) and the running/idle check
|
|
593
|
+
* (priority 2.7) depend on locating it.
|
|
594
|
+
*
|
|
595
|
+
* The format drifted across Codex versions — the "N% left ·" token was DROPPED in
|
|
596
|
+
* v0.141 (gpt-5.5), which is exactly what broke Issue #1150:
|
|
597
|
+
* - v0.141 (gpt-5.5): "gpt-5.5 xhigh · ~/share/work/github_kewton/commandmate-issue-947"
|
|
598
|
+
* - legacy (gpt-5.4): "gpt-5.4 high · 21% left · ~/share/work/..."
|
|
599
|
+
* - legacy (o4-mini): " o4-mini 50% left · /path/to/project"
|
|
600
|
+
*
|
|
601
|
+
* The previous pattern required "\d+%\s+left\s+·", so v0.141 bars never matched:
|
|
602
|
+
* the footer boundary stayed -1 and the whole Codex running/idle block was skipped,
|
|
603
|
+
* leaving generating sessions misreported as `ready` (static green dot, no glow).
|
|
604
|
+
*
|
|
605
|
+
* Version-independent anchor: a leading model token, a middle-dot "·" separator,
|
|
606
|
+
* and a filesystem path ("~/…" or "/…") at the END of the line. Any "N% left ·"
|
|
607
|
+
* segment (legacy) is absorbed by ".*·" before the trailing path. Requiring the
|
|
608
|
+
* trailing path keeps this Codex-specific (guarded by cliToolId === 'codex' in
|
|
609
|
+
* status-detector.ts) and stops ordinary conversation lines that merely contain a
|
|
610
|
+
* "·" from being mistaken for the status bar.
|
|
611
|
+
*
|
|
612
|
+
* Single-line by design (no /m, no /g): status-detector.ts tests it per content
|
|
613
|
+
* line. No nested quantifiers (ReDoS-safe; adjacent greedy quantifiers only).
|
|
614
|
+
*/
|
|
615
|
+
exports.CODEX_STATUS_BAR_PATTERN = /^\s*\S.*·\s*~?\/\S*\s*$/;
|
|
616
|
+
/**
|
|
617
|
+
* Codex status bar with something drawn AFTER the path (Issue #2818) — the
|
|
618
|
+
* second shape `findCodexFooterBoundary` in `tools/codex/detect.ts` accepts.
|
|
619
|
+
*
|
|
620
|
+
* From codex 0.154.0 on, the bar stops ending in the path once the first turn
|
|
621
|
+
* has named the thread, and Plan mode adds a right-aligned badge:
|
|
622
|
+
*
|
|
623
|
+
* ```text
|
|
624
|
+
* gpt-5.6-terra low · /private/var/…/repo · Run touch probe.txt
|
|
625
|
+
* gpt-6-astra medium · ~/uat3-…/sandbox-repo Plan mode (shift+tab to cycle)
|
|
626
|
+
* ```
|
|
627
|
+
*
|
|
628
|
+
* {@link CODEX_STATUS_BAR_PATTERN} wants the path last, so every such frame had
|
|
629
|
+
* no boundary and fell to the detector's bar-independent branch D (#1150's
|
|
630
|
+
* safety net). That branch reads the 15-row tail, and on an idle frame the tail
|
|
631
|
+
* still holds the finished turn's `• Ran …` record — which is how an idle
|
|
632
|
+
* session read `running` (#2808's `idle-after-declined-approval.txt`; #2818
|
|
633
|
+
* reproduced it on a turn that simply ran one command and answered).
|
|
634
|
+
*
|
|
635
|
+
* Kept a SEPARATE pattern rather than a widened {@link CODEX_STATUS_BAR_PATTERN}
|
|
636
|
+
* so the change stays on the one reader it was measured for: that pattern is
|
|
637
|
+
* also the stripped-capture landmark of {@link findCodexChromeStart} and the
|
|
638
|
+
* value reader's first test in `model-info-extractor.ts`, neither of which
|
|
639
|
+
* this Issue measured.
|
|
640
|
+
*
|
|
641
|
+
* The shape is the one `CODEX_STATUS_BAR_WITH_TRAILER_PATTERN`
|
|
642
|
+
* (`model-info-extractor.ts`, #2592) reads values off, written out here rather
|
|
643
|
+
* than imported: that module's rule is that it must never be the reason this
|
|
644
|
+
* boundary moves. Head segment, `·`, a path, then EITHER a further `·`
|
|
645
|
+
* segment OR a column gap (two spaces) before right-aligned text. `[^·]*` puts
|
|
646
|
+
* the path right after the FIRST `·`, so codex's in-flight row (`• Working (…)
|
|
647
|
+
* · 1 background terminal running · /ps to view`) is not a bar — its first `·`
|
|
648
|
+
* is followed by a count, not a path.
|
|
649
|
+
*
|
|
650
|
+
* Single-line, no /g, no nested quantifiers (ReDoS-safe), as above.
|
|
651
|
+
*/
|
|
652
|
+
exports.CODEX_TRAILED_STATUS_BAR_PATTERN = /^\s*\S[^·]*·\s*~?\/\S*(?:\s*·[^\n]*|[^\S\n]{2,}\S[^\n]*)$/;
|
|
653
|
+
/**
|
|
654
|
+
* How far above the last non-blank row {@link findCodexChromeStart} looks for the
|
|
655
|
+
* composer.
|
|
656
|
+
*
|
|
657
|
+
* Same allowance and the same reason as {@link CODEX_COMPOSER_SEARCH_ROWS}: codex
|
|
658
|
+
* pins the composer two to three rows above the bottom in every measured frame
|
|
659
|
+
* (`tests/fixtures/codex-live-2310/`), and a wider band would let the search walk
|
|
660
|
+
* into the transcript and mistake the echoed user message — drawn with the same
|
|
661
|
+
* `›` — for the input box.
|
|
662
|
+
*
|
|
663
|
+
* Wider than the 8 rows of the liveness search because 0.15x can draw notices
|
|
664
|
+
* BELOW the composer (`N background terminal running · /ps to view · /stop to
|
|
665
|
+
* close`) that the liveness search never had to step over.
|
|
666
|
+
*/
|
|
667
|
+
const CODEX_CHROME_SEARCH_ROWS = 12;
|
|
668
|
+
/**
|
|
669
|
+
* A row whose first character is codex's `›` glyph, with something after it.
|
|
670
|
+
*
|
|
671
|
+
* Deliberately not {@link CODEX_PROMPT_PATTERN}: that one is multiline and
|
|
672
|
+
* matches a bare `›`, which is right for "is a prompt on screen anywhere?" and
|
|
673
|
+
* wrong for classifying ONE row. Anchored at column 0 because all three of
|
|
674
|
+
* codex's `›` uses are, and an indented `›` in a reply is quoted text.
|
|
675
|
+
*/
|
|
676
|
+
const CODEX_CHROME_GLYPH_ROW_PATTERN = /^›(\s|$)/;
|
|
677
|
+
/**
|
|
678
|
+
* Locate the start of codex's bottom-pinned chrome within a captured pane.
|
|
679
|
+
*
|
|
680
|
+
* The fifth reader of this shape, after {@link findClaudeChromeStart} (#1289),
|
|
681
|
+
* {@link findCopilotChromeStart} (#1897), {@link findOpenCodeChromeStart}
|
|
682
|
+
* (#1911) and {@link findCommandCodeChromeStart} (#2250). codex is the tool that
|
|
683
|
+
* never got one, and Issue #2400 is the bill for that.
|
|
684
|
+
*
|
|
685
|
+
* codex renders inline and pins two rows to the bottom of a settled pane:
|
|
686
|
+
*
|
|
687
|
+
* ```text
|
|
688
|
+
* › Ask Codex to do anything ← composer (placeholder or typed text)
|
|
689
|
+
*
|
|
690
|
+
* gpt-6-astra xhigh · ~/share/work/…/CommandMate ← status bar (model · cwd)
|
|
691
|
+
* ```
|
|
692
|
+
*
|
|
693
|
+
* Below the composer codex may also draw its own notices (`N background terminal
|
|
694
|
+
* running · /ps to view`), so the boundary is "the composer row" rather than a
|
|
695
|
+
* list of footer shapes: everything from the composer down is chrome by
|
|
696
|
+
* construction, whatever codex adds there next.
|
|
697
|
+
*
|
|
698
|
+
* ## What went wrong without it (#2400)
|
|
699
|
+
*
|
|
700
|
+
* While the capture window is NOT saturated codex's extraction starts at
|
|
701
|
+
* `lastCapturedLine`, so the composer only ever mattered as the `endIndex` break
|
|
702
|
+
* — which the extraction loop already had. Once the pane outgrows
|
|
703
|
+
* `CACHE_MAX_CAPTURE_LINES` (#1670) the cursor stops being a position in the
|
|
704
|
+
* capture and `resolveExtractionStartIndex` switches to the newest echoed user
|
|
705
|
+
* prompt. With no `contentEnd`, that backwards search started at the very bottom
|
|
706
|
+
* of the pane and the first `›` it met was the COMPOSER. Extraction then began
|
|
707
|
+
* on the row after it, i.e. on the status bar, and the saved "reply" for every
|
|
708
|
+
* turn on a saturated pane was one row:
|
|
709
|
+
*
|
|
710
|
+
* ```text
|
|
711
|
+
* gpt-6-astra xhigh · ~/share/work/github_kewton/CommandAgent-develop
|
|
712
|
+
* ```
|
|
713
|
+
*
|
|
714
|
+
* Identical on every turn, so `isDuplicateResponse` then locked on it and the
|
|
715
|
+
* pane could not record another reply at all. That is #1289's defect verbatim,
|
|
716
|
+
* one tool later — the same reason `findCommandCodeChromeStart` exists.
|
|
717
|
+
*
|
|
718
|
+
* ## Why the attributes and not the placeholder text
|
|
719
|
+
*
|
|
720
|
+
* The codex branch of `findRecentUserPromptIndex` used to exclude the composer by
|
|
721
|
+
* naming its placeholders (`Implement`, `Find and fix`, `Type`, `Summarize`).
|
|
722
|
+
* Those are codex 0.1x wording, and 0.15x draws `Ask Codex to do anything`, so
|
|
723
|
+
* the list silently stopped matching the thing it was written for. Issue #2310
|
|
724
|
+
* measured what actually separates codex's three uses of `›` (U+203A), and it is
|
|
725
|
+
* the SGR attributes, not the text: the composer glyph is bold (`ESC[1m›`), a
|
|
726
|
+
* transcript echo is dim (`ESC[1;2m›`), a dialog option carries a bold label or
|
|
727
|
+
* a label drawn in the glyph's own colour (one span — since #2798 a coloured
|
|
728
|
+
* glyph alone is not enough, because 0.155.1 colours the composer's glyph too).
|
|
729
|
+
* {@link readCodexGlyphRowKind} is that measurement, and this reader is one of
|
|
730
|
+
* its callers.
|
|
731
|
+
*
|
|
732
|
+
* `-1` is returned for a frame whose bottom-most `›` is an option row: codex
|
|
733
|
+
* replaces the composer with the dialog, so there is no chrome to trim and the
|
|
734
|
+
* caller resolves the frame on the prompt path instead.
|
|
735
|
+
*
|
|
736
|
+
* ## The stripped-capture fallback
|
|
737
|
+
*
|
|
738
|
+
* Auto-Yes hands the detection layer a capture that has already been through
|
|
739
|
+
* `stripAnsi`, and there every `›` is the same byte — {@link
|
|
740
|
+
* readCodexGlyphRowKind} answers `null` on purpose rather than guessing. This
|
|
741
|
+
* reader still has to answer for those frames, so it falls back to the one
|
|
742
|
+
* structural landmark codex pins BELOW the composer and nowhere else: the status
|
|
743
|
+
* bar ({@link CODEX_STATUS_BAR_PATTERN}, `model · /path`). Requiring it means a
|
|
744
|
+
* frame with no bar — a pane mid-redraw, an overlay — yields `-1` and the
|
|
745
|
+
* pre-#2400 reading, which is the direction that costs nothing.
|
|
746
|
+
*
|
|
747
|
+
* @param lines - Captured pane lines, ANSI-bearing or not; trailing blanks tolerated
|
|
748
|
+
* @returns Index of the composer row, or -1 when no composer chrome is present
|
|
749
|
+
*/
|
|
750
|
+
function findCodexChromeStart(lines) {
|
|
751
|
+
let lastRow = lines.length - 1;
|
|
752
|
+
while (lastRow >= 0 && (0, ansi_1.stripAnsi)(lines[lastRow]).trim() === '')
|
|
753
|
+
lastRow--;
|
|
754
|
+
if (lastRow < 0)
|
|
755
|
+
return -1;
|
|
756
|
+
// Bottom-most `›` row within the band codex reserves for its chrome. Anything
|
|
757
|
+
// further up is transcript, and latching onto an echo there would cut the
|
|
758
|
+
// reply this whole reader exists to keep.
|
|
759
|
+
let glyphRow = -1;
|
|
760
|
+
for (let i = lastRow; i >= Math.max(0, lastRow - CODEX_CHROME_SEARCH_ROWS); i--) {
|
|
761
|
+
if (CODEX_CHROME_GLYPH_ROW_PATTERN.test((0, ansi_1.stripAnsi)(lines[i]))) {
|
|
762
|
+
glyphRow = i;
|
|
763
|
+
break;
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
if (glyphRow < 0)
|
|
767
|
+
return -1;
|
|
768
|
+
const kind = (0, cli_patterns_1.readCodexGlyphRowKind)(lines[glyphRow]);
|
|
769
|
+
if (kind === 'composer')
|
|
770
|
+
return glyphRow;
|
|
771
|
+
// A dialog is up (no composer drawn) or the bottom-most `›` is a transcript
|
|
772
|
+
// echo mid-redraw. Neither is chrome to trim.
|
|
773
|
+
if (kind !== null)
|
|
774
|
+
return -1;
|
|
775
|
+
// Stripped capture: no attributes to read. Accept the row as the composer only
|
|
776
|
+
// when codex's status bar is drawn below it, which is where it always sits and
|
|
777
|
+
// where a transcript echo can never be.
|
|
778
|
+
for (let i = glyphRow + 1; i <= lastRow; i++) {
|
|
779
|
+
if (exports.CODEX_STATUS_BAR_PATTERN.test((0, ansi_1.stripAnsi)(lines[i])))
|
|
780
|
+
return glyphRow;
|
|
781
|
+
}
|
|
782
|
+
return -1;
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* The shape of a codex row that could be the echo of a message the user sent.
|
|
786
|
+
*
|
|
787
|
+
* Shape only — `›` at column 0 with text after it — which all three of codex's
|
|
788
|
+
* `›` uses share. {@link findCodexUserEchoIndex} is what tells them apart.
|
|
789
|
+
*/
|
|
790
|
+
exports.CODEX_USER_ECHO_PATTERN = /^›\s+\S/;
|
|
791
|
+
/**
|
|
792
|
+
* Find the newest transcript echo of an operator message in a codex capture.
|
|
793
|
+
*
|
|
794
|
+
* The reader `findRecentUserPromptIndex` anchors codex turns on (Issue #2400).
|
|
795
|
+
* It replaces a negative lookahead over composer placeholder strings
|
|
796
|
+
* (`(?!Implement|Find and fix|Type|Summarize)`) written against codex 0.1x:
|
|
797
|
+
* 0.15x draws `Ask Codex to do anything`, so the guard matched nothing it was
|
|
798
|
+
* written for. The composer became the newest "echo", and on a saturated pane —
|
|
799
|
+
* the one path where this anchor decides where extraction STARTS (#1670) — the
|
|
800
|
+
* reply saved for every turn was the single status-bar row below it.
|
|
801
|
+
*
|
|
802
|
+
* ## What the attributes can and cannot separate
|
|
803
|
+
*
|
|
804
|
+
* #2310 measured the three uses of `›` and this reader adds the fourth reading
|
|
805
|
+
* they left open, captured for #2400 on codex-cli 0.153.4
|
|
806
|
+
* (`tests/fixtures/codex-live-2310/turn-submitted-no-status.txt`): the echo of
|
|
807
|
+
* a message the operator has JUST submitted is drawn `ESC[1m› ESC[0m<text>` —
|
|
808
|
+
* bold glyph, plain label — and only becomes the dim `ESC[1;2m› ` of the
|
|
809
|
+
* measured frames once the turn settles. That shape is indistinguishable from a
|
|
810
|
+
* composer holding typed text, so no per-row attribute rule can separate them.
|
|
811
|
+
*
|
|
812
|
+
* What separates them is position, which codex's layout fixes: the composer is
|
|
813
|
+
* the BOTTOM-MOST `›` row of a frame. So the reader takes the boundary from its
|
|
814
|
+
* caller:
|
|
815
|
+
*
|
|
816
|
+
* - `composerTrimmed` — `findCodexChromeStart` located the chrome and `lines`
|
|
817
|
+
* has already been cut above it, so every `›` row left is transcript and the
|
|
818
|
+
* newest one wins outright.
|
|
819
|
+
* - otherwise — the composer may still be the bottom-most `›` row, so the first
|
|
820
|
+
* candidate is stepped over. This is the structural spelling of the guard the
|
|
821
|
+
* placeholder list used to be, and unlike that list it cannot go stale.
|
|
822
|
+
*
|
|
823
|
+
* Dialog option rows are refused wherever they appear: codex renders inline, so
|
|
824
|
+
* a dialog answered minutes ago is still in the scrollback with its options
|
|
825
|
+
* intact (#1160), and anchoring on one would cut the reply mid-way.
|
|
826
|
+
*
|
|
827
|
+
* @param lines - Captured pane rows, ANSI intact where the caller has it
|
|
828
|
+
* @param contentEnd - Exclusive end of the conversation region
|
|
829
|
+
* @param windowSize - How many rows above `contentEnd` to search
|
|
830
|
+
* @param composerTrimmed - Whether `contentEnd` already excludes the composer
|
|
831
|
+
* @returns Index of the newest echo row, or -1 when none is in the window
|
|
832
|
+
*/
|
|
833
|
+
function findCodexUserEchoIndex(lines, contentEnd, windowSize, composerTrimmed) {
|
|
834
|
+
let composerHandled = composerTrimmed;
|
|
835
|
+
for (let i = Math.min(contentEnd, lines.length) - 1; i >= Math.max(0, contentEnd - windowSize); i--) {
|
|
836
|
+
if (!exports.CODEX_USER_ECHO_PATTERN.test((0, ansi_1.stripAnsi)(lines[i])))
|
|
837
|
+
continue;
|
|
838
|
+
const kind = (0, cli_patterns_1.readCodexGlyphRowKind)(lines[i]);
|
|
839
|
+
// An option row of a dialog still sitting in the scrollback.
|
|
840
|
+
if (kind === 'option')
|
|
841
|
+
continue;
|
|
842
|
+
// Positively an echo: codex has settled the row and drawn its glyph dim.
|
|
843
|
+
if (kind === 'transcript-echo')
|
|
844
|
+
return i;
|
|
845
|
+
// `composer` (bold glyph) or `null` (an ANSI-stripped capture, where all
|
|
846
|
+
// three uses are one byte). Either could be the input box, and the input box
|
|
847
|
+
// is always the bottom-most `›` row.
|
|
848
|
+
if (!composerHandled) {
|
|
849
|
+
composerHandled = true;
|
|
850
|
+
continue;
|
|
851
|
+
}
|
|
852
|
+
return i;
|
|
853
|
+
}
|
|
854
|
+
return -1;
|
|
855
|
+
}
|