commandmate 0.41.1 → 0.42.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +134 -134
- package/.next/app-path-routes-manifest.json +24 -24
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +9 -9
- package/.next/required-server-files.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/update/route.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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update-check/route.js +1 -1
- package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/capabilities/route.js +1 -1
- package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/agent-event/route.js +1 -1
- package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/claude-done/route.js +2 -2
- package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route.js +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/route.js +1 -1
- package/.next/server/app/api/relays/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/route.js +1 -1
- package/.next/server/app/api/repositories/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/default-agents/route.js +1 -1
- package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/slash-commands/route.js.nft.json +1 -1
- package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js +103 -1
- package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js +103 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +1 -103
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route.js.nft.json +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 +2 -2
- package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -103
- package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/config/route.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_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 +9 -9
- 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 +24 -24
- package/.next/server/chunks/1068.js +1 -0
- package/.next/server/chunks/1210.js +1 -1
- package/.next/server/chunks/1501.js +5 -5
- package/.next/server/chunks/1990.js +103 -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/3241.js +1 -1
- package/.next/server/chunks/3707.js +1 -1
- package/.next/server/chunks/3718.js +1 -0
- package/.next/server/chunks/434.js +1 -1
- package/.next/server/chunks/4443.js +1 -1
- package/.next/server/chunks/5164.js +1 -1
- package/.next/server/chunks/5775.js +1 -0
- package/.next/server/chunks/611.js +1 -0
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/650.js +1 -1
- package/.next/server/chunks/6781.js +1 -1
- package/.next/server/chunks/7905.js +1 -1
- package/.next/server/chunks/8581.js +1 -1
- package/.next/server/chunks/8583.js +1 -1
- package/.next/server/chunks/8673.js +2 -2
- package/.next/server/chunks/8728.js +3 -3
- package/.next/server/chunks/8791.js +1 -0
- package/.next/server/chunks/8800.js +1 -1
- package/.next/server/chunks/8918.js +1 -103
- package/.next/server/chunks/9130.js +2 -2
- package/.next/server/chunks/964.js +1 -1
- package/.next/server/chunks/9731.js +3 -3
- package/.next/server/chunks/9882.js +3 -3
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{2407-7bd75de2f6be3692.js → 2407-21fbf12d753b8d4d.js} +1 -1
- package/.next/static/chunks/7705-2a2936551b0cf9a3.js +1 -0
- package/.next/static/chunks/8165-934ee7ff3b4ddfd4.js +1 -0
- package/.next/static/chunks/app/{layout-51fa91ea833c97fc.js → layout-8ff4c7c08ef1f621.js} +1 -1
- package/.next/static/chunks/app/worktrees/[id]/page-3c946bd2875391fd.js +1 -0
- package/.next/static/css/{974314e796232f53.css → b3f433d52b8ed5c8.css} +1 -1
- package/.next/trace +13 -13
- package/dist/cli/commands/attach.d.ts +6 -4
- package/dist/cli/commands/attach.d.ts.map +1 -1
- package/dist/cli/commands/attach.js +36 -5
- package/dist/cli/commands/instances.d.ts.map +1 -1
- package/dist/cli/commands/instances.js +5 -0
- package/dist/cli/commands/ls.d.ts.map +1 -1
- package/dist/cli/commands/ls.js +19 -9
- package/dist/cli/commands/whoami.d.ts +9 -25
- package/dist/cli/commands/whoami.d.ts.map +1 -1
- package/dist/cli/commands/whoami.js +18 -42
- package/dist/cli/types/api-responses.d.ts +37 -0
- package/dist/cli/types/api-responses.d.ts.map +1 -1
- package/dist/lib/cli-tools/session-name.d.ts +72 -4
- package/dist/lib/cli-tools/session-name.d.ts.map +1 -1
- package/dist/lib/cli-tools/session-name.js +115 -12
- package/dist/lib/detection/tools/verified-against.d.ts +11 -2
- package/dist/lib/detection/tools/verified-against.d.ts.map +1 -1
- package/dist/lib/detection/tools/verified-against.js +11 -2
- package/dist/lib/session/tmux-session-surface.d.ts +9 -7
- package/dist/lib/session/tmux-session-surface.d.ts.map +1 -1
- package/dist/lib/session/tmux-session-surface.js +15 -8
- package/dist/lib/tmux/legacy-session-alias.d.ts +43 -0
- package/dist/lib/tmux/legacy-session-alias.d.ts.map +1 -0
- package/dist/lib/tmux/legacy-session-alias.js +64 -0
- package/dist/lib/verification/verify-config.d.ts +21 -0
- package/dist/lib/verification/verify-config.d.ts.map +1 -1
- package/dist/lib/verification/verify-config.js +54 -1
- package/dist/server/locales/en/worktree.json +60 -17
- package/dist/server/locales/ja/worktree.json +63 -20
- package/dist/server/server.js +29 -0
- package/dist/server/src/lib/auto-yes-poller.js +15 -0
- package/dist/server/src/lib/cli-tools/antigravity.js +1 -1
- package/dist/server/src/lib/cli-tools/base.js +10 -1
- package/dist/server/src/lib/cli-tools/codex.js +1 -1
- package/dist/server/src/lib/cli-tools/command-code.js +1 -1
- package/dist/server/src/lib/cli-tools/copilot.js +1 -1
- package/dist/server/src/lib/cli-tools/gemini.js +1 -1
- package/dist/server/src/lib/cli-tools/legacy-session-adoption.js +19 -0
- package/dist/server/src/lib/cli-tools/opencode.js +1 -1
- package/dist/server/src/lib/cli-tools/session-name.js +115 -12
- package/dist/server/src/lib/cli-tools/session-namespace.js +55 -0
- package/dist/server/src/lib/cli-tools/session-ownership.js +21 -0
- package/dist/server/src/lib/cli-tools/vibe-local.js +1 -1
- package/dist/server/src/lib/cli-tools/worktree-session-ownership.js +28 -0
- package/dist/server/src/lib/db/app-settings-db.js +29 -0
- package/dist/server/src/lib/detection/cli-patterns.js +51 -10
- package/dist/server/src/lib/detection/tools/codex/cli-patterns.js +8 -2
- package/dist/server/src/lib/detection/tools/codex/detect.js +8 -1
- package/dist/server/src/lib/detection/tools/codex/prompt.js +6 -2
- package/dist/server/src/lib/detection/tools/verified-against.js +11 -2
- package/dist/server/src/lib/hooks/sources/codex/hooks-config.js +77 -2
- package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +77 -1
- package/dist/server/src/lib/realtime/terminal-broadcast.js +11 -0
- package/dist/server/src/lib/session/adopt-legacy-sessions.js +89 -0
- package/dist/server/src/lib/session/claude-session.js +13 -10
- package/dist/server/src/lib/session/current-output-builder.js +18 -0
- package/dist/server/src/lib/session/send-user-message.js +26 -0
- package/dist/server/src/lib/session/session-instance-targets.js +53 -0
- package/dist/server/src/lib/session/tmux-session-surface.js +15 -8
- package/dist/server/src/lib/session/worktree-session-reconcile.js +101 -56
- package/dist/server/src/lib/session-cleanup.js +33 -3
- package/dist/server/src/lib/tmux/legacy-session-alias.js +64 -0
- package/dist/server/src/lib/tmux/session-hook-scripts.js +12 -4
- package/dist/server/src/lib/tmux/session-ownership.js +174 -0
- package/dist/server/src/lib/tmux/tmux.js +13 -3
- package/dist/server/src/lib/verification/env-clean-gate.js +46 -14
- package/dist/server/src/lib/verification/gate-runner.js +1 -0
- package/dist/server/src/lib/verification/verify-config.js +54 -1
- package/dist/server/src/lib/ws-server.js +11 -0
- package/package.json +1 -1
- package/release-notes/0.42.0.json +62 -0
- package/release-notes/0.42.1.json +16 -0
- package/.next/server/chunks/3323.js +0 -1
- package/.next/server/chunks/7075.js +0 -1
- package/.next/server/chunks/9080.js +0 -1
- package/.next/static/chunks/7705-25076b57224da370.js +0 -1
- package/.next/static/chunks/8165-d3b7c8a7aa776bc7.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-1e6300dd50cd9a4d.js +0 -1
- /package/.next/static/{_fBjTkjoWfOqdjl2SeMIN → 3M_S0B7dhEDdVE2XSJz1Y}/_buildManifest.js +0 -0
- /package/.next/static/{_fBjTkjoWfOqdjl2SeMIN → 3M_S0B7dhEDdVE2XSJz1Y}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Gateway re-export for legacy session adoption (Issue #2866).
|
|
4
|
+
*
|
|
5
|
+
* `adoptLegacySessions` lives in `src/lib/session/`, which may not import
|
|
6
|
+
* `src/lib/tmux/**` directly (Issue #1922, `.eslintrc.json`
|
|
7
|
+
* `no-restricted-imports`). The CLITool layer is a sanctioned gateway, so the
|
|
8
|
+
* one session listing and the adoption table it needs are reached through here
|
|
9
|
+
* — the same arrangement as `session-ownership.ts` (Issue #2865).
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.registerLegacyAlias = exports.lookupLegacyAlias = exports.dropLegacyAliasByLegacyName = exports.clearLegacyAliasesForTests = exports.listSessions = void 0;
|
|
13
|
+
var tmux_1 = require("../tmux/tmux");
|
|
14
|
+
Object.defineProperty(exports, "listSessions", { enumerable: true, get: function () { return tmux_1.listSessions; } });
|
|
15
|
+
var legacy_session_alias_1 = require("../tmux/legacy-session-alias");
|
|
16
|
+
Object.defineProperty(exports, "clearLegacyAliasesForTests", { enumerable: true, get: function () { return legacy_session_alias_1.clearLegacyAliasesForTests; } });
|
|
17
|
+
Object.defineProperty(exports, "dropLegacyAliasByLegacyName", { enumerable: true, get: function () { return legacy_session_alias_1.dropLegacyAliasByLegacyName; } });
|
|
18
|
+
Object.defineProperty(exports, "lookupLegacyAlias", { enumerable: true, get: function () { return legacy_session_alias_1.lookupLegacyAlias; } });
|
|
19
|
+
Object.defineProperty(exports, "registerLegacyAlias", { enumerable: true, get: function () { return legacy_session_alias_1.registerLegacyAlias; } });
|
|
@@ -255,7 +255,7 @@ class OpenCodeTool extends base_1.BaseCLITool {
|
|
|
255
255
|
// 200 wide, reconnected ones are 80" ships without anyone noticing —
|
|
256
256
|
// a reconnect would silently hand the detectors a geometry the creation
|
|
257
257
|
// path had been moved away from.
|
|
258
|
-
await this.reconcileExistingSession(sessionName, {
|
|
258
|
+
await this.reconcileExistingSession(sessionName, worktreePath, {
|
|
259
259
|
windowWidth: resolveOpencodePaneWidthChecked(),
|
|
260
260
|
windowHeight: tmux_pane_config_1.OPENCODE_PANE_HEIGHT,
|
|
261
261
|
});
|
|
@@ -16,18 +16,87 @@
|
|
|
16
16
|
* `import('../../lib/ws-server')` の 458ms のうち 234ms を占めていた。
|
|
17
17
|
*
|
|
18
18
|
* 規則そのものは 1 箇所に保つ — `BaseCLITool.getSessionName()` はこの関数へ委譲する。
|
|
19
|
+
*
|
|
20
|
+
* ## Issue #2866: 名前空間(ns)
|
|
21
|
+
*
|
|
22
|
+
* worktree ID はディレクトリ名から作られるので、DB が別の 2 台のサーバでも
|
|
23
|
+
* `mcbd-{cli}-{worktreeId}` が重なる。サーバ起動時に `initSessionNamespace()`
|
|
24
|
+
* (`session-namespace.ts`)が ns(16 進 8 桁)を決めると、以後の名前は
|
|
25
|
+
* `mcbd-{ns}-{cli}-{worktreeId}[-{suffix}]` になる。ns 未設定(CLI・テスト・
|
|
26
|
+
* 初期化失敗時)は従来形式のまま。ns はどの CLI ツール ID とも一致しないので、
|
|
27
|
+
* `mcbd-` の直後の区切りで新旧を見分けられる({@link parseSessionName})。
|
|
28
|
+
*
|
|
29
|
+
* このモジュールは CLI バンドル(`tsconfig.cli.json` は paths なし)にも入るので、
|
|
30
|
+
* `@/` を使わず、DB にも触らない。ns の保持だけをここで行い、DB からの読み書きは
|
|
31
|
+
* `session-namespace.ts` が受け持つ。
|
|
19
32
|
*/
|
|
20
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
exports.SESSION_NAMESPACE_PATTERN = void 0;
|
|
35
|
+
exports.getActiveSessionNamespace = getActiveSessionNamespace;
|
|
36
|
+
exports.setActiveSessionNamespace = setActiveSessionNamespace;
|
|
37
|
+
exports.resolveNamespacedSessionName = resolveNamespacedSessionName;
|
|
21
38
|
exports.resolveSessionName = resolveSessionName;
|
|
39
|
+
exports.resolveLegacySessionName = resolveLegacySessionName;
|
|
40
|
+
exports.parseSessionName = parseSessionName;
|
|
22
41
|
const types_1 = require("./types");
|
|
23
42
|
const validation_1 = require("./validation");
|
|
43
|
+
const legacy_session_alias_1 = require("../tmux/legacy-session-alias");
|
|
44
|
+
const SESSION_NAME_PREFIX = 'mcbd-';
|
|
45
|
+
/** Shape of a session-name namespace: 8 lowercase hex digits (Issue #2866). */
|
|
46
|
+
exports.SESSION_NAMESPACE_PATTERN = /^[0-9a-f]{8}$/;
|
|
47
|
+
/** CLI tool ids, longest first, so a longer id is never read as a shorter one. */
|
|
48
|
+
const CLI_TOOL_IDS_LONGEST_FIRST = [...types_1.CLI_TOOL_IDS].sort((a, b) => b.length - a.length);
|
|
49
|
+
/**
|
|
50
|
+
* The namespace this process names its sessions with, or null (legacy names).
|
|
51
|
+
*
|
|
52
|
+
* @internal Read through `getSessionNamespace()` in `session-namespace.ts`.
|
|
53
|
+
* Kept on `globalThis` because the custom server sets it at startup while the
|
|
54
|
+
* Next route bundles — a separate module graph (Issue #2223) — read it.
|
|
55
|
+
*/
|
|
56
|
+
function getActiveSessionNamespace() {
|
|
57
|
+
return globalThis.__cmTmuxSessionNamespace ?? null;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @internal Set by `initSessionNamespace()` / reset by tests only.
|
|
61
|
+
*/
|
|
62
|
+
function setActiveSessionNamespace(namespace) {
|
|
63
|
+
if (namespace !== null && !exports.SESSION_NAMESPACE_PATTERN.test(namespace)) {
|
|
64
|
+
throw new Error(`Invalid session namespace: ${namespace}`);
|
|
65
|
+
}
|
|
66
|
+
globalThis.__cmTmuxSessionNamespace = namespace;
|
|
67
|
+
}
|
|
68
|
+
function buildSessionName(head, cliToolId, worktreeId, instanceId) {
|
|
69
|
+
const base = `${head}${cliToolId}-${worktreeId}`;
|
|
70
|
+
if (!instanceId || instanceId === cliToolId) {
|
|
71
|
+
(0, validation_1.validateSessionName)(base);
|
|
72
|
+
return base;
|
|
73
|
+
}
|
|
74
|
+
const suffix = (0, types_1.deriveSessionSuffix)(instanceId, cliToolId);
|
|
75
|
+
const sessionName = suffix ? `${base}-${suffix}` : base;
|
|
76
|
+
(0, validation_1.validateSessionName)(sessionName);
|
|
77
|
+
return sessionName;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The session name in the given namespace, ignoring legacy adoptions
|
|
81
|
+
* (Issue #2866). `namespace === null` is the legacy form.
|
|
82
|
+
*
|
|
83
|
+
* @throws Error if the resulting session name is invalid
|
|
84
|
+
*/
|
|
85
|
+
function resolveNamespacedSessionName(namespace, cliToolId, worktreeId, instanceId) {
|
|
86
|
+
const head = namespace === null ? SESSION_NAME_PREFIX : `${SESSION_NAME_PREFIX}${namespace}-`;
|
|
87
|
+
return buildSessionName(head, cliToolId, worktreeId, instanceId);
|
|
88
|
+
}
|
|
24
89
|
/**
|
|
25
90
|
* Resolve the tmux session name for a (worktree, CLI tool, instance) triple.
|
|
26
91
|
*
|
|
27
|
-
* Format (Issue #868):
|
|
28
|
-
* -
|
|
29
|
-
* `
|
|
30
|
-
*
|
|
92
|
+
* Format (Issue #868, #2866):
|
|
93
|
+
* - namespace set: `mcbd-{ns}-{cli_tool_id}-{worktree_id}[-{suffix}]` — unless a
|
|
94
|
+
* legacy session was adopted for that name (`adoptLegacySessions`), in which
|
|
95
|
+
* case the adopted legacy name is returned
|
|
96
|
+
* - namespace unset: `mcbd-{cli_tool_id}-{worktree_id}[-{suffix}]`
|
|
97
|
+
*
|
|
98
|
+
* The primary instance (`instanceId` omitted or `=== cliToolId`) carries no
|
|
99
|
+
* suffix.
|
|
31
100
|
*
|
|
32
101
|
* T2.3 (MF4-001): the result is validated to keep shell metacharacters out of
|
|
33
102
|
* the tmux command line.
|
|
@@ -40,18 +109,52 @@ const validation_1 = require("./validation");
|
|
|
40
109
|
*
|
|
41
110
|
* @example
|
|
42
111
|
* ```typescript
|
|
112
|
+
* // namespace unset
|
|
43
113
|
* resolveSessionName('claude', 'wt-1'); // 'mcbd-claude-wt-1'
|
|
44
114
|
* resolveSessionName('claude', 'wt-1', 'claude-2'); // 'mcbd-claude-wt-1-2'
|
|
115
|
+
* // namespace '0a1b2c3d'
|
|
116
|
+
* resolveSessionName('claude', 'wt-1'); // 'mcbd-0a1b2c3d-claude-wt-1'
|
|
45
117
|
* ```
|
|
46
118
|
*/
|
|
47
119
|
function resolveSessionName(cliToolId, worktreeId, instanceId) {
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return
|
|
120
|
+
const namespace = getActiveSessionNamespace();
|
|
121
|
+
const name = resolveNamespacedSessionName(namespace, cliToolId, worktreeId, instanceId);
|
|
122
|
+
if (namespace === null)
|
|
123
|
+
return name;
|
|
124
|
+
return (0, legacy_session_alias_1.lookupLegacyAlias)(name) ?? name;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The legacy (pre-#2866) session name, whatever the namespace:
|
|
128
|
+
* `mcbd-{cli_tool_id}-{worktree_id}[-{suffix}]`.
|
|
129
|
+
*
|
|
130
|
+
* @throws Error if the resulting session name is invalid
|
|
131
|
+
*/
|
|
132
|
+
function resolveLegacySessionName(cliToolId, worktreeId, instanceId) {
|
|
133
|
+
return resolveNamespacedSessionName(null, cliToolId, worktreeId, instanceId);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Split a session name of either form. The worktree ID and the instance suffix
|
|
137
|
+
* are NOT separated — worktree IDs may contain `-`, so only the caller (who
|
|
138
|
+
* knows the set of worktree IDs) can tell them apart.
|
|
139
|
+
*
|
|
140
|
+
* @returns null when the name does not start with `mcbd-`, names no known CLI
|
|
141
|
+
* tool, or has nothing after the tool
|
|
142
|
+
*/
|
|
143
|
+
function parseSessionName(name) {
|
|
144
|
+
if (!name.startsWith(SESSION_NAME_PREFIX))
|
|
145
|
+
return null;
|
|
146
|
+
let body = name.slice(SESSION_NAME_PREFIX.length);
|
|
147
|
+
let namespace = null;
|
|
148
|
+
const dash = body.indexOf('-');
|
|
149
|
+
if (dash > 0 && exports.SESSION_NAMESPACE_PATTERN.test(body.slice(0, dash))) {
|
|
150
|
+
namespace = body.slice(0, dash);
|
|
151
|
+
body = body.slice(dash + 1);
|
|
52
152
|
}
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
153
|
+
const cliToolId = CLI_TOOL_IDS_LONGEST_FIRST.find((id) => body.startsWith(`${id}-`));
|
|
154
|
+
if (!cliToolId)
|
|
155
|
+
return null;
|
|
156
|
+
const rest = body.slice(cliToolId.length + 1);
|
|
157
|
+
if (rest === '')
|
|
158
|
+
return null;
|
|
159
|
+
return { namespace, cliToolId, rest };
|
|
57
160
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The tmux session-name namespace of this server (Issue #2866).
|
|
4
|
+
*
|
|
5
|
+
* Two CommandMate servers with different databases resolve the same
|
|
6
|
+
* `mcbd-{cli}-{worktreeId}` whenever their worktree directories share a name,
|
|
7
|
+
* because worktree IDs are derived from the directory name. Each server
|
|
8
|
+
* therefore mints a random namespace once, keeps it in `app_settings`
|
|
9
|
+
* (`tmux_session_namespace`), and puts it into every session name it creates:
|
|
10
|
+
* `mcbd-{ns}-{cli}-{worktreeId}[-{suffix}]` (`session-name.ts`).
|
|
11
|
+
*
|
|
12
|
+
* Initialized once at server startup, before the startup session reconcile.
|
|
13
|
+
* Until then — and in the CLI, in tests, or when initialization failed — the
|
|
14
|
+
* namespace is unset and names keep the legacy form.
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.initSessionNamespace = initSessionNamespace;
|
|
18
|
+
exports.getSessionNamespace = getSessionNamespace;
|
|
19
|
+
exports.resetSessionNamespaceForTests = resetSessionNamespaceForTests;
|
|
20
|
+
const crypto_1 = require("crypto");
|
|
21
|
+
const app_settings_db_1 = require("../../lib/db/app-settings-db");
|
|
22
|
+
const logger_1 = require("../../lib/logger");
|
|
23
|
+
const session_name_1 = require("./session-name");
|
|
24
|
+
const logger = (0, logger_1.createLogger)('session-namespace');
|
|
25
|
+
/**
|
|
26
|
+
* Read the namespace from the DB, minting and saving one when it is absent or
|
|
27
|
+
* ill-formed, and make it the namespace every later session name uses.
|
|
28
|
+
*
|
|
29
|
+
* @param db - The server's database
|
|
30
|
+
* @returns The namespace now in effect
|
|
31
|
+
* @throws when the DB cannot be written; the namespace then stays unset
|
|
32
|
+
*/
|
|
33
|
+
function initSessionNamespace(db) {
|
|
34
|
+
const stored = (0, app_settings_db_1.getTmuxSessionNamespace)(db);
|
|
35
|
+
if (stored !== null && session_name_1.SESSION_NAMESPACE_PATTERN.test(stored)) {
|
|
36
|
+
(0, session_name_1.setActiveSessionNamespace)(stored);
|
|
37
|
+
return stored;
|
|
38
|
+
}
|
|
39
|
+
const namespace = (0, crypto_1.randomBytes)(4).toString('hex');
|
|
40
|
+
if (stored !== null) {
|
|
41
|
+
logger.warn('session-namespace:invalid-stored-value', { stored, replacement: namespace });
|
|
42
|
+
}
|
|
43
|
+
(0, app_settings_db_1.setTmuxSessionNamespace)(db, namespace);
|
|
44
|
+
(0, session_name_1.setActiveSessionNamespace)(namespace);
|
|
45
|
+
logger.info('session-namespace:initialized', { namespace, minted: true });
|
|
46
|
+
return namespace;
|
|
47
|
+
}
|
|
48
|
+
/** The namespace in effect, or null when not initialized. */
|
|
49
|
+
function getSessionNamespace() {
|
|
50
|
+
return (0, session_name_1.getActiveSessionNamespace)();
|
|
51
|
+
}
|
|
52
|
+
/** Test-only: back to "not initialized". */
|
|
53
|
+
function resetSessionNamespaceForTests() {
|
|
54
|
+
(0, session_name_1.setActiveSessionNamespace)(null);
|
|
55
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Gateway re-export of the tmux session-ownership check (Issue #2865).
|
|
4
|
+
*
|
|
5
|
+
* Routes, pollers and the WebSocket server may not import `src/lib/tmux/**`
|
|
6
|
+
* directly (Issue #1922, `.eslintrc.json` `no-restricted-imports`); the
|
|
7
|
+
* CLITool layer is one of the sanctioned gateways, so the ownership check is
|
|
8
|
+
* reached through here. The implementation lives in
|
|
9
|
+
* `src/lib/tmux/session-ownership.ts`.
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ownedSessionNameSet = exports.isSessionPathOwnedBy = exports.foreignSessionErrorBody = exports.createCachedOwnershipMatcher = exports.checkSessionOwnership = exports.assertSessionNotForeign = exports.ForeignSessionError = exports.FOREIGN_SESSION_ERROR_CODE = void 0;
|
|
13
|
+
var session_ownership_1 = require("../tmux/session-ownership");
|
|
14
|
+
Object.defineProperty(exports, "FOREIGN_SESSION_ERROR_CODE", { enumerable: true, get: function () { return session_ownership_1.FOREIGN_SESSION_ERROR_CODE; } });
|
|
15
|
+
Object.defineProperty(exports, "ForeignSessionError", { enumerable: true, get: function () { return session_ownership_1.ForeignSessionError; } });
|
|
16
|
+
Object.defineProperty(exports, "assertSessionNotForeign", { enumerable: true, get: function () { return session_ownership_1.assertSessionNotForeign; } });
|
|
17
|
+
Object.defineProperty(exports, "checkSessionOwnership", { enumerable: true, get: function () { return session_ownership_1.checkSessionOwnership; } });
|
|
18
|
+
Object.defineProperty(exports, "createCachedOwnershipMatcher", { enumerable: true, get: function () { return session_ownership_1.createCachedOwnershipMatcher; } });
|
|
19
|
+
Object.defineProperty(exports, "foreignSessionErrorBody", { enumerable: true, get: function () { return session_ownership_1.foreignSessionErrorBody; } });
|
|
20
|
+
Object.defineProperty(exports, "isSessionPathOwnedBy", { enumerable: true, get: function () { return session_ownership_1.isSessionPathOwnedBy; } });
|
|
21
|
+
Object.defineProperty(exports, "ownedSessionNameSet", { enumerable: true, get: function () { return session_ownership_1.ownedSessionNameSet; } });
|
|
@@ -63,7 +63,7 @@ class VibeLocalTool extends base_1.BaseCLITool {
|
|
|
63
63
|
const sessionName = this.getSessionName(worktreeId, instanceId);
|
|
64
64
|
const exists = await (0, tmux_1.hasSession)(sessionName);
|
|
65
65
|
if (exists) {
|
|
66
|
-
await this.reconcileExistingSession(sessionName);
|
|
66
|
+
await this.reconcileExistingSession(sessionName, worktreePath);
|
|
67
67
|
// Issue #2070: this branch used to return unconditionally. A tmux session
|
|
68
68
|
// outlives the agent that was launched into it — a quit, a self-update, a
|
|
69
69
|
// crash — and the launch was then skipped for a pane holding nothing but a
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Session ownership by worktree id (Issue #2865).
|
|
4
|
+
*
|
|
5
|
+
* For callers that hold only a worktree id — the Auto-Yes poller and
|
|
6
|
+
* `sendUserMessage` (timer / relay sends) — and would
|
|
7
|
+
* otherwise have to reach into the DB and the tmux gateway separately. Kept out
|
|
8
|
+
* of `session-ownership.ts` so the plain ownership check does not drag the DB
|
|
9
|
+
* layer into every module that imports it.
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.checkWorktreeSessionOwnership = checkWorktreeSessionOwnership;
|
|
13
|
+
const db_instance_1 = require("../db/db-instance");
|
|
14
|
+
const worktree_db_1 = require("../db/worktree-db");
|
|
15
|
+
const session_ownership_1 = require("../tmux/session-ownership");
|
|
16
|
+
/**
|
|
17
|
+
* Ownership of `sessionName` against the worktree row `worktreeId`. `null` when
|
|
18
|
+
* the row does not exist — the caller cannot vouch for the session and must not
|
|
19
|
+
* drive it.
|
|
20
|
+
*
|
|
21
|
+
* @param db - The handle to read the row from; defaults to the server's
|
|
22
|
+
*/
|
|
23
|
+
async function checkWorktreeSessionOwnership(worktreeId, sessionName, db = (0, db_instance_1.getDbInstance)()) {
|
|
24
|
+
const worktree = (0, worktree_db_1.getWorktreeById)(db, worktreeId);
|
|
25
|
+
if (!worktree)
|
|
26
|
+
return null;
|
|
27
|
+
return (0, session_ownership_1.checkSessionOwnership)(sessionName, worktree.path);
|
|
28
|
+
}
|
|
@@ -16,6 +16,8 @@ exports.setDefaultSelectedAgents = setDefaultSelectedAgents;
|
|
|
16
16
|
exports.clearDefaultSelectedAgents = clearDefaultSelectedAgents;
|
|
17
17
|
exports.getDefaultSurfaceMode = getDefaultSurfaceMode;
|
|
18
18
|
exports.setDefaultSurfaceMode = setDefaultSurfaceMode;
|
|
19
|
+
exports.getTmuxSessionNamespace = getTmuxSessionNamespace;
|
|
20
|
+
exports.setTmuxSessionNamespace = setTmuxSessionNamespace;
|
|
19
21
|
const selected_agents_validator_1 = require("../../lib/selected-agents-validator");
|
|
20
22
|
const ui_state_1 = require("../../types/ui-state");
|
|
21
23
|
// ============================================================================
|
|
@@ -45,6 +47,14 @@ const KEY_DEFAULT_SELECTED_AGENTS = 'default_selected_agents';
|
|
|
45
47
|
* reaches an install that never chose.
|
|
46
48
|
*/
|
|
47
49
|
const KEY_DEFAULT_SURFACE_MODE = 'default_surface_mode';
|
|
50
|
+
/**
|
|
51
|
+
* Storage key for this server's tmux session-name namespace (Issue #2866).
|
|
52
|
+
*
|
|
53
|
+
* 8 lowercase hex digits, minted once at first startup. Validated by
|
|
54
|
+
* `initSessionNamespace()` rather than here: an ill-formed row has to be seen
|
|
55
|
+
* (and warned about) before it is replaced, not silently read as "unset".
|
|
56
|
+
*/
|
|
57
|
+
const KEY_TMUX_SESSION_NAMESPACE = 'tmux_session_namespace';
|
|
48
58
|
/** How many recently used directories to remember (Issue #1517) */
|
|
49
59
|
exports.RECENT_BROWSE_PATHS_LIMIT = 5;
|
|
50
60
|
// ============================================================================
|
|
@@ -200,3 +210,22 @@ function getDefaultSurfaceMode(db) {
|
|
|
200
210
|
function setDefaultSurfaceMode(db, mode) {
|
|
201
211
|
writeScalar(db, KEY_DEFAULT_SURFACE_MODE, mode);
|
|
202
212
|
}
|
|
213
|
+
// ============================================================================
|
|
214
|
+
// tmux session namespace (Issue #2866)
|
|
215
|
+
// ============================================================================
|
|
216
|
+
/**
|
|
217
|
+
* Get the stored tmux session-name namespace, unvalidated.
|
|
218
|
+
*
|
|
219
|
+
* @returns The raw stored value, or null when unset
|
|
220
|
+
*/
|
|
221
|
+
function getTmuxSessionNamespace(db) {
|
|
222
|
+
return readScalar(db, KEY_TMUX_SESSION_NAMESPACE);
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Save the tmux session-name namespace.
|
|
226
|
+
*
|
|
227
|
+
* @param namespace - Already-validated namespace (`^[0-9a-f]{8}$`)
|
|
228
|
+
*/
|
|
229
|
+
function setTmuxSessionNamespace(db, namespace) {
|
|
230
|
+
writeScalar(db, KEY_TMUX_SESSION_NAMESPACE, namespace);
|
|
231
|
+
}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Shared between response-poller.ts and API routes
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
8
|
-
exports.CLAUDE_SESSION_ERROR_REGEX_PATTERNS = exports.CLAUDE_SESSION_ERROR_PATTERNS = exports.extractAnsiSequences = exports.stripAnsi = exports.COMMAND_CODE_SKIP_PATTERNS = exports.COMMAND_CODE_HOOK_NOTICE_PATTERN = exports.COMMAND_CODE_BANNER_PATTERNS = exports.COMMAND_CODE_MODE_INDICATOR_PATTERN = exports.COMMAND_CODE_COMPLETION_PATTERN = exports.COMMAND_CODE_RESPONSE_MARKER_PATTERN = exports.COMMAND_CODE_THINKING_PATTERN = exports.COMMAND_CODE_INTERRUPT_HINT_PATTERN = exports.COMMAND_CODE_SEPARATOR_PATTERN = exports.COMMAND_CODE_PROMPT_PATTERN = exports.COMMAND_CODE_SPINNER_CHARS = exports.ANTIGRAVITY_SKIP_PATTERNS = exports.ANTIGRAVITY_SURVEY_PATTERN = exports.ANTIGRAVITY_DIALOG_MAX_ROWS = exports.ANTIGRAVITY_DIALOG_BOUNDARY_PATTERN = exports.ANTIGRAVITY_SWITCH_MODEL_HEADER_PATTERN = exports.ANTIGRAVITY_NUMBERED_OPTION_PATTERN = exports.ANTIGRAVITY_NAVIGATE_FOOTER_PATTERN = exports.ANTIGRAVITY_SELECTION_LIST_PATTERN = exports.ANTIGRAVITY_SEPARATOR_PATTERN = exports.ANTIGRAVITY_THINKING_PATTERN = exports.ANTIGRAVITY_PROMPT_PATTERN = exports.ANTIGRAVITY_COMPOSER_MODE_BANNER_PATTERN = exports.ANTIGRAVITY_COMPOSER_MODE_BANNER_SOURCE = exports.VIBE_LOCAL_THINKING_PATTERN = exports.VIBE_LOCAL_PROMPT_PATTERN = exports.COPILOT_SKIP_PATTERNS = exports.COPILOT_FOLDER_TRUST_ANSWER_KEY = exports.COPILOT_FOLDER_TRUST_SESSION_OPTION_PATTERN = exports.COPILOT_FOLDER_TRUST_ANCHORS = exports.COPILOT_SELECTION_FOOTER_PATTERN = exports.COPILOT_BOOT_BANNER_ANCHORS = exports.COPILOT_TRANSCRIPT_CONTINUATION_PATTERN = exports.COPILOT_TOOL_ROW_PATTERN = exports.COPILOT_TOOL_VERBS = exports.COPILOT_TRANSCRIPT_DIVIDER_PATTERN = void 0;
|
|
7
|
+
exports.COPILOT_SEPARATOR_PATTERN = exports.COPILOT_IDLE_STATUS_PATTERN = exports.COPILOT_WORKING_STATUS_PATTERN = exports.COPILOT_THINKING_PATTERN = exports.COPILOT_PROMPT_PATTERN = exports.OPENCODE_SKIP_PATTERNS = exports.OPENCODE_SEPARATOR_PATTERN = exports.CLAUDE_SELECTION_LIST_FOOTER = exports.CLAUDE_MODEL_OVERLAY_FOOTER_PATTERN = exports.OPENCODE_SELECTION_LIST_PATTERN = exports.OPENCODE_FOOTER_STATUS_PATTERN = exports.OPENCODE_USER_ECHO_PATTERN = exports.OPENCODE_GUTTER_ROW_PATTERN = exports.OPENCODE_COMPOSER_BOTTOM_BORDER = exports.OPENCODE_PROCESSING_INDICATOR = exports.OPENCODE_PERMISSION_PATTERN = exports.OPENCODE_TURN_COMPLETE_PATTERN = exports.OPENCODE_RESPONSE_COMPLETE = exports.OPENCODE_LOADING_PATTERN = exports.OPENCODE_THINKING_PATTERN = exports.OPENCODE_PROMPT_AFTER_RESPONSE = exports.OPENCODE_IDLE_COMPOSER_PATTERN = exports.OPENCODE_PROMPT_PATTERN = exports.GEMINI_THINKING_PATTERN = exports.GEMINI_PROMPT_PATTERN = exports.MAX_PASTED_TEXT_RETRIES = exports.PASTED_TEXT_DETECT_DELAY = exports.PASTED_TEXT_PATTERN = 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_DIALOG_PATTERN = exports.CODEX_TRUST_QUESTION_PATTERN = exports.CODEX_PROMPT_PATTERN = exports.CLAUDE_TRUST_DIALOG_PATTERN = exports.CLAUDE_SEPARATOR_PATTERN = exports.CLAUDE_PROMPT_PATTERN = exports.CODEX_INTERRUPT_HINT_PATTERN = exports.CODEX_THINKING_PATTERN = exports.CLAUDE_INTERRUPT_HINT_PATTERN = exports.CLAUDE_THINKING_PATTERN = exports.CLAUDE_SPINNER_CHARS = void 0;
|
|
8
|
+
exports.CLAUDE_SESSION_ERROR_REGEX_PATTERNS = exports.CLAUDE_SESSION_ERROR_PATTERNS = exports.extractAnsiSequences = exports.stripAnsi = exports.COMMAND_CODE_SKIP_PATTERNS = exports.COMMAND_CODE_HOOK_NOTICE_PATTERN = exports.COMMAND_CODE_BANNER_PATTERNS = exports.COMMAND_CODE_MODE_INDICATOR_PATTERN = exports.COMMAND_CODE_COMPLETION_PATTERN = exports.COMMAND_CODE_RESPONSE_MARKER_PATTERN = exports.COMMAND_CODE_THINKING_PATTERN = exports.COMMAND_CODE_INTERRUPT_HINT_PATTERN = exports.COMMAND_CODE_SEPARATOR_PATTERN = exports.COMMAND_CODE_PROMPT_PATTERN = exports.COMMAND_CODE_SPINNER_CHARS = exports.ANTIGRAVITY_SKIP_PATTERNS = exports.ANTIGRAVITY_SURVEY_PATTERN = exports.ANTIGRAVITY_DIALOG_MAX_ROWS = exports.ANTIGRAVITY_DIALOG_BOUNDARY_PATTERN = exports.ANTIGRAVITY_SWITCH_MODEL_HEADER_PATTERN = exports.ANTIGRAVITY_NUMBERED_OPTION_PATTERN = exports.ANTIGRAVITY_NAVIGATE_FOOTER_PATTERN = exports.ANTIGRAVITY_SELECTION_LIST_PATTERN = exports.ANTIGRAVITY_SEPARATOR_PATTERN = exports.ANTIGRAVITY_THINKING_PATTERN = exports.ANTIGRAVITY_PROMPT_PATTERN = exports.ANTIGRAVITY_COMPOSER_MODE_BANNER_PATTERN = exports.ANTIGRAVITY_COMPOSER_MODE_BANNER_SOURCE = exports.VIBE_LOCAL_THINKING_PATTERN = exports.VIBE_LOCAL_PROMPT_PATTERN = exports.COPILOT_SKIP_PATTERNS = exports.COPILOT_FOLDER_TRUST_ANSWER_KEY = exports.COPILOT_FOLDER_TRUST_SESSION_OPTION_PATTERN = exports.COPILOT_FOLDER_TRUST_ANCHORS = exports.COPILOT_SELECTION_FOOTER_PATTERN = exports.COPILOT_BOOT_BANNER_ANCHORS = exports.COPILOT_TRANSCRIPT_CONTINUATION_PATTERN = exports.COPILOT_TOOL_ROW_PATTERN = exports.COPILOT_TOOL_VERBS = exports.COPILOT_TRANSCRIPT_DIVIDER_PATTERN = exports.COPILOT_USER_ECHO_PATTERN = exports.COPILOT_REASONING_HEADER_PATTERN = exports.COPILOT_BOX_ROW_PATTERN = void 0;
|
|
9
9
|
exports.isCodexTurnActive = isCodexTurnActive;
|
|
10
10
|
exports.findClaudeChromeStart = findClaudeChromeStart;
|
|
11
11
|
exports.isCodexPromptReady = isCodexPromptReady;
|
|
@@ -233,6 +233,17 @@ exports.CLAUDE_TRUST_DIALOG_PATTERN = /Yes, I trust this folder/m;
|
|
|
233
233
|
* T1.2: Improved to detect empty prompts as well
|
|
234
234
|
*/
|
|
235
235
|
exports.CODEX_PROMPT_PATTERN = /^›\s*/m;
|
|
236
|
+
/**
|
|
237
|
+
* The directory/folder trust dialog's question line, across codex builds
|
|
238
|
+
* (Issue #2884): `Do you trust the contents of this directory?` (<=0.155.1)
|
|
239
|
+
* and `Trust this folder?` (0.157.1, which dropped the "Do you trust" wording
|
|
240
|
+
* entirely -- `tests/fixtures/codex-dialogs-0157/trust.txt`). The two variants
|
|
241
|
+
* are kept as alternatives of one pattern -- rather than duplicated across
|
|
242
|
+
* {@link CODEX_DIALOG_PATTERN}, `getCodexActiveDialog` and
|
|
243
|
+
* `getCodexLifecycleDialog` -- so those three cannot drift into disagreeing
|
|
244
|
+
* about what counts as the trust dialog.
|
|
245
|
+
*/
|
|
246
|
+
exports.CODEX_TRUST_QUESTION_PATTERN = /Do you trust|Trust this folder\?/;
|
|
236
247
|
/**
|
|
237
248
|
* Codex INTERACTIVE startup dialog pattern (Issue #890)
|
|
238
249
|
*
|
|
@@ -243,7 +254,7 @@ exports.CODEX_PROMPT_PATTERN = /^›\s*/m;
|
|
|
243
254
|
* also confirm no INTERACTIVE dialog is still active. This pattern matches markers
|
|
244
255
|
* that appear ONLY in interactive dialogs:
|
|
245
256
|
* - Interactive update dialog: "Skip until next version" (the option-3 label)
|
|
246
|
-
* - Trust dialog:
|
|
257
|
+
* - Trust dialog: {@link CODEX_TRUST_QUESTION_PATTERN}
|
|
247
258
|
* - Dialog confirm footer: "Press enter to continue"
|
|
248
259
|
* - Numbered selection option: "› 1. ..." (leading ›, a digit, a dot)
|
|
249
260
|
*
|
|
@@ -259,7 +270,7 @@ exports.CODEX_PROMPT_PATTERN = /^›\s*/m;
|
|
|
259
270
|
*
|
|
260
271
|
* No /g flag (would make .test() stateful); no nested quantifiers (ReDoS-safe).
|
|
261
272
|
*/
|
|
262
|
-
exports.CODEX_DIALOG_PATTERN =
|
|
273
|
+
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');
|
|
263
274
|
/**
|
|
264
275
|
* Codex genuine input-prompt line (Issue #892).
|
|
265
276
|
*
|
|
@@ -353,7 +364,7 @@ function getCodexActiveDialog(output) {
|
|
|
353
364
|
(active.includes('Update') && active.includes('Skip'))) {
|
|
354
365
|
return 'update';
|
|
355
366
|
}
|
|
356
|
-
if (
|
|
367
|
+
if (exports.CODEX_TRUST_QUESTION_PATTERN.test(active)) {
|
|
357
368
|
return 'trust';
|
|
358
369
|
}
|
|
359
370
|
if (active.includes('Press enter to continue')) {
|
|
@@ -427,8 +438,6 @@ const CODEX_UPDATE_DIALOG_ANCHORS = [
|
|
|
427
438
|
/skip until next version/i,
|
|
428
439
|
/^\s*[›❯]?\s*\d+\.\s*Update now/im,
|
|
429
440
|
];
|
|
430
|
-
/** The directory-trust dialog's question line. */
|
|
431
|
-
const CODEX_TRUST_DIALOG_ANCHOR = /Do you trust/;
|
|
432
441
|
/**
|
|
433
442
|
* Classify the bottom-most ACTIVE codex lifecycle screen (Issue #1829).
|
|
434
443
|
*
|
|
@@ -480,7 +489,7 @@ function getCodexLifecycleDialog(output) {
|
|
|
480
489
|
return null;
|
|
481
490
|
if (CODEX_UPDATE_DIALOG_ANCHORS.some((pattern) => pattern.test(line)))
|
|
482
491
|
return 'update';
|
|
483
|
-
if (
|
|
492
|
+
if (exports.CODEX_TRUST_QUESTION_PATTERN.test(line))
|
|
484
493
|
return 'trust';
|
|
485
494
|
// Both anchors required, so a stray "hooks" mention cannot claim the screen.
|
|
486
495
|
if (line.includes(exports.CODEX_HOOKS_REVIEW_ANCHORS[1]) && text.includes(exports.CODEX_HOOKS_REVIEW_ANCHORS[0])) {
|
|
@@ -569,6 +578,35 @@ exports.CODEX_APPROVAL_FOOTER_PATTERN = /esc\s+to\s+cancel/i;
|
|
|
569
578
|
* No /g flag (keeps .test() stateless), no nested quantifiers (ReDoS-safe).
|
|
570
579
|
*/
|
|
571
580
|
exports.CODEX_FORM_SUBMIT_FOOTER_PATTERN = /^enter\s+to\s+submit\s*\|\s*esc\s+to\s+cancel$/im;
|
|
581
|
+
/**
|
|
582
|
+
* Codex CLI 0.157 picker footer pattern (Issue #2868).
|
|
583
|
+
*
|
|
584
|
+
* codex-cli 0.157.1 retitled `/model` ("Select Model and Effort") and replaced
|
|
585
|
+
* its "Press enter to confirm or esc to go back" footer with the terse
|
|
586
|
+
* `enter select · esc back` row (measured: `tests/fixtures/codex-dialogs-0157/`).
|
|
587
|
+
* CODEX_SELECTION_LIST_PATTERN no longer matched, so branch 0.8 missed the
|
|
588
|
+
* picker and the dialog entry gate refused the answer (`prompt_no_longer_active`).
|
|
589
|
+
*
|
|
590
|
+
* Same construction as CODEX_FORM_SUBMIT_FOOTER_PATTERN: the whole measured row
|
|
591
|
+
* (`/m` + `^…$`), tested only against a trimmed single footer row — never a
|
|
592
|
+
* window — so a transcript quoting the words does not vouch for anything.
|
|
593
|
+
* CODEX_SELECTION_LIST_PATTERN is deliberately left as is (#2774 / #2841).
|
|
594
|
+
*
|
|
595
|
+
* No /g flag (keeps .test() stateless), no nested quantifiers (ReDoS-safe).
|
|
596
|
+
*/
|
|
597
|
+
exports.CODEX_PICKER_FOOTER_PATTERN = /^enter\s+select\s*·\s*esc\s+back$/im;
|
|
598
|
+
/**
|
|
599
|
+
* Codex CLI 0.157 effort-picker footer pattern (Issue #2868).
|
|
600
|
+
*
|
|
601
|
+
* The second `/model` step ("Select Reasoning Level for …") closes with
|
|
602
|
+
* `enter default · s session · esc back` (measured:
|
|
603
|
+
* `tests/fixtures/codex-dialogs-0157/model-picker-effort.txt`). Same
|
|
604
|
+
* construction and rules as CODEX_PICKER_FOOTER_PATTERN: the whole row, tested
|
|
605
|
+
* only against a single trimmed footer row.
|
|
606
|
+
*
|
|
607
|
+
* No /g flag (keeps .test() stateless), no nested quantifiers (ReDoS-safe).
|
|
608
|
+
*/
|
|
609
|
+
exports.CODEX_EFFORT_PICKER_FOOTER_PATTERN = /^enter\s+default\s*·\s*s\s+session\s*·\s*esc\s+back$/im;
|
|
572
610
|
/**
|
|
573
611
|
* Codex CLI pager / edit-previous (transcript) mode footer pattern (Issue #1017)
|
|
574
612
|
*
|
|
@@ -934,7 +972,7 @@ exports.GEMINI_THINKING_PATTERN = /[\u2800-\u28FF]|Thinking\.\.\./;
|
|
|
934
972
|
* OpenCode TUI shows "Ask anything..." in the input area when waiting for user input.
|
|
935
973
|
* Unlike Claude/Codex (which use > or ❯), OpenCode uses a text-based prompt indicator.
|
|
936
974
|
*/
|
|
937
|
-
exports.OPENCODE_PROMPT_PATTERN = /Ask anything
|
|
975
|
+
exports.OPENCODE_PROMPT_PATTERN = /Ask anything(?:\.\.\.|\u2026)/;
|
|
938
976
|
/**
|
|
939
977
|
* OpenCode idle composer pattern (Issue #1883).
|
|
940
978
|
*
|
|
@@ -963,8 +1001,11 @@ exports.OPENCODE_PROMPT_PATTERN = /Ask anything\.\.\./;
|
|
|
963
1001
|
* {@link OPENCODE_PROMPT_PATTERN} stays as it is: `response-checker` and
|
|
964
1002
|
* `OPENCODE_SKIP_PATTERNS` want the bare phrase wherever it lands, because they
|
|
965
1003
|
* are deleting the row from an extracted response, not judging a session.
|
|
1004
|
+
*
|
|
1005
|
+
* opencode 1.18.31 以降は見本文を U+2026(`…`)で描く。ASCII の `...` も実行ファイルに
|
|
1006
|
+
* 残っているので両方を受け付ける(Issue #2915、2026-09-28 に実行ファイルから確認)。
|
|
966
1007
|
*/
|
|
967
|
-
exports.OPENCODE_IDLE_COMPOSER_PATTERN = /^[^\S\n]*[\u2502\u2503][^\S\n]*Ask anything
|
|
1008
|
+
exports.OPENCODE_IDLE_COMPOSER_PATTERN = /^[^\S\n]*[\u2502\u2503][^\S\n]*Ask anything(?:\.\.\.|\u2026)/m;
|
|
968
1009
|
/**
|
|
969
1010
|
* OpenCode prompt pattern after response completion (Issue #379)
|
|
970
1011
|
* Shows "tab agents ctrl+p commands" in the TUI status bar after a response finishes.
|
|
@@ -121,10 +121,16 @@ exports.CODEX_GLYPH = '›';
|
|
|
121
121
|
* the command approval, `/model`, `/experimental`, `/keymap` and the
|
|
122
122
|
* directory-trust screen are `waiting`, and every highlighted row is the
|
|
123
123
|
* one-span shape these rules key on. The rules were first read off 0.153.2.
|
|
124
|
+
*
|
|
125
|
+
* Advanced to 0.157.1 by Issue #2884: the 0.157.1 dialog screens
|
|
126
|
+
* (`codex-dialogs-0157/`) read correctly too, including the directory-trust
|
|
127
|
+
* screen once its WORDING anchor (`CODEX_TRUST_QUESTION_PATTERN` in
|
|
128
|
+
* `../../cli-patterns`) learned that build's reworded question line
|
|
129
|
+
* (`Trust this folder?`) -- see `tests/unit/lib/detection/codex-dialogs-0157.test.ts`.
|
|
124
130
|
*/
|
|
125
131
|
exports.CODEX_DIALOG_RULES_VERIFIED_AGAINST = {
|
|
126
|
-
version: '0.
|
|
127
|
-
capturedAt: '2026-09-
|
|
132
|
+
version: '0.157.1',
|
|
133
|
+
capturedAt: '2026-09-27',
|
|
128
134
|
paneGeometry: '200x1000',
|
|
129
135
|
};
|
|
130
136
|
/**
|
|
@@ -245,7 +245,14 @@ exports.codexStatusDetector = (0, run_detection_1.createToolStatusDetector)({
|
|
|
245
245
|
const codexSelectionWindow = contentLines
|
|
246
246
|
.slice(Math.max(0, codexContentEnd - frame_1.STATUS_CHECK_LINE_COUNT + 1), codexContentEnd + 1)
|
|
247
247
|
.join('\n');
|
|
248
|
-
|
|
248
|
+
// Issue #2868: codex 0.157's `/model` steps close with `enter select · esc
|
|
249
|
+
// back` and `enter default · s session · esc back`. Only the window's LAST
|
|
250
|
+
// non-blank row is tested against them (never the whole window), so the
|
|
251
|
+
// same words quoted in a transcript do not count.
|
|
252
|
+
const codexLastRow = contentLines[codexContentEnd].trim();
|
|
253
|
+
if (cli_patterns_1.CODEX_SELECTION_LIST_PATTERN.test(codexSelectionWindow) ||
|
|
254
|
+
cli_patterns_1.CODEX_PICKER_FOOTER_PATTERN.test(codexLastRow) ||
|
|
255
|
+
cli_patterns_1.CODEX_EFFORT_PICKER_FOOTER_PATTERN.test(codexLastRow)) {
|
|
249
256
|
const codexPromptDetection = (0, prompt_detector_1.detectPrompt)((0, cli_patterns_1.stripBoxDrawing)(frame.clean), (0, cli_patterns_1.buildDetectPromptOptions)('codex'));
|
|
250
257
|
// Issue #1628: an approval request wears the same footer as a menu but is the
|
|
251
258
|
// agent blocked on the human, so it must surface as an active prompt (exit 10
|
|
@@ -96,9 +96,13 @@ function detectCodexDialog(frame, context) {
|
|
|
96
96
|
//
|
|
97
97
|
// Issue #2609: the approval form's footer is admitted as its own measured row,
|
|
98
98
|
// not by widening the list pattern — an `esc to cancel` alone still vouches
|
|
99
|
-
// for nothing.
|
|
99
|
+
// for nothing. Issue #2868: 0.157's two `/model` footers (`enter select ·
|
|
100
|
+
// esc back`, then `enter default · s session · esc back`) are admitted the
|
|
101
|
+
// same way.
|
|
100
102
|
if (!cli_patterns_1.CODEX_SELECTION_LIST_PATTERN.test(block.footer) &&
|
|
101
|
-
!cli_patterns_1.CODEX_FORM_SUBMIT_FOOTER_PATTERN.test(block.footer)
|
|
103
|
+
!cli_patterns_1.CODEX_FORM_SUBMIT_FOOTER_PATTERN.test(block.footer) &&
|
|
104
|
+
!cli_patterns_1.CODEX_PICKER_FOOTER_PATTERN.test(block.footer) &&
|
|
105
|
+
!cli_patterns_1.CODEX_EFFORT_PICKER_FOOTER_PATTERN.test(block.footer)) {
|
|
102
106
|
return null;
|
|
103
107
|
}
|
|
104
108
|
// Issue #1160: an already-answered block still inside the window is not a
|
|
@@ -60,10 +60,19 @@ exports.CLAUDE_VERIFIED_AGAINST = {
|
|
|
60
60
|
* verdict. **The stamp moved to 0.155.1 because every 0.155.1 frame now reads
|
|
61
61
|
* correctly** (`codex-thread-title-bar-2818.test.ts`,
|
|
62
62
|
* `codex-dialogs-0155-2808.test.ts`).
|
|
63
|
+
*
|
|
64
|
+
* ## Advanced to 0.157.1 by Issue #2868
|
|
65
|
+
*
|
|
66
|
+
* 0.157.1 reworded the `/model` picker's footer to `enter select · esc back`, so
|
|
67
|
+
* the picker read `prompt_detected` and `/prompt-response` refused its answers.
|
|
68
|
+
* #2868 ran the #2842 probe (`tests/fixtures/codex-dialogs-0157/`, 2026-09-27):
|
|
69
|
+
* of the six standard screens only `model-picker.txt` failed, and it reads
|
|
70
|
+
* `codex_selection_list` again via `CODEX_PICKER_FOOTER_PATTERN`
|
|
71
|
+
* (`codex-dialogs-0157.test.ts`).
|
|
63
72
|
*/
|
|
64
73
|
exports.CODEX_VERIFIED_AGAINST = {
|
|
65
|
-
version: '0.
|
|
66
|
-
capturedAt: '2026-09-
|
|
74
|
+
version: '0.157.1',
|
|
75
|
+
capturedAt: '2026-09-27',
|
|
67
76
|
paneGeometry: '200x1000',
|
|
68
77
|
};
|
|
69
78
|
/**
|