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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ask.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/ask.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"ask.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/ask.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiTpC,wBAAgB,gBAAgB,IAAI,OAAO,CAwI1C"}
|
package/dist/cli/commands/ask.js
CHANGED
|
@@ -40,17 +40,11 @@ const reply_ledger_1 = require("../utils/reply-ledger");
|
|
|
40
40
|
const cli_tool_ids_1 = require("../config/cli-tool-ids");
|
|
41
41
|
const agent_target_options_1 = require("../config/agent-target-options");
|
|
42
42
|
const instances_1 = require("./instances");
|
|
43
|
+
const command_target_1 = require("./command-target");
|
|
43
44
|
const wait_1 = require("./wait");
|
|
44
45
|
const capture_1 = require("./capture");
|
|
45
46
|
const relays_1 = require("./relays");
|
|
46
|
-
|
|
47
|
-
* Code the send API returns when the session is blocked on a prompt.
|
|
48
|
-
*
|
|
49
|
-
* Mirrors `PROMPT_WAITING_CODE` in `send.ts`, which mirrors the server's own —
|
|
50
|
-
* the CLI bundle keeps its own copies of API strings rather than importing the
|
|
51
|
-
* server's tmux/detection graph for one of them.
|
|
52
|
-
*/
|
|
53
|
-
const PROMPT_WAITING_CODE = 'PROMPT_WAITING';
|
|
47
|
+
const message_dispatch_1 = require("./message-dispatch");
|
|
54
48
|
/** Default `--timeout`, in seconds. Matches the GUI's delegation brief. */
|
|
55
49
|
const DEFAULT_ASK_TIMEOUT_SECONDS = 1800;
|
|
56
50
|
/** Squeezed pane lines kept for the fallback reply. */
|
|
@@ -164,6 +158,104 @@ async function readLatestReply(client, worktreeId, instanceId, since, cliToolId)
|
|
|
164
158
|
async function readPaneTail(client, worktreeId, cliToolId, instanceId) {
|
|
165
159
|
return (0, capture_1.readSqueezedPaneTail)(client, worktreeId, cliToolId, instanceId, PANE_FALLBACK_TAIL);
|
|
166
160
|
}
|
|
161
|
+
/** Argument checks. A mocked `process.exit` returns, so nothing here stops early. */
|
|
162
|
+
function validateAskArgs(worktreeId, message, options) {
|
|
163
|
+
if (!(0, api_client_1.isValidWorktreeId)(worktreeId)) {
|
|
164
|
+
console.error('Error: Invalid worktree ID format.');
|
|
165
|
+
process.exit(types_1.ExitCode.CONFIG_ERROR);
|
|
166
|
+
}
|
|
167
|
+
if (message.trim() === '') {
|
|
168
|
+
console.error('Error: Message cannot be empty.');
|
|
169
|
+
process.exit(types_1.ExitCode.CONFIG_ERROR);
|
|
170
|
+
}
|
|
171
|
+
if (options.agent && !(0, cli_tool_ids_1.isCliToolId)(options.agent)) {
|
|
172
|
+
console.error(`Error: Invalid agent. Must be one of: ${cli_tool_ids_1.CLI_TOOL_IDS.join(', ')}`);
|
|
173
|
+
process.exit(types_1.ExitCode.CONFIG_ERROR);
|
|
174
|
+
}
|
|
175
|
+
if (options.instance && !(0, instances_1.isInstanceSelector)(options.instance)) {
|
|
176
|
+
console.error(instances_1.INSTANCE_SELECTOR_ERROR);
|
|
177
|
+
process.exit(types_1.ExitCode.CONFIG_ERROR);
|
|
178
|
+
}
|
|
179
|
+
// `--reply-to` / `--allow-relay-chain` only mean something under
|
|
180
|
+
// `--async`: without it `ask` returns the reply on stdout, and a second
|
|
181
|
+
// copy arriving in somebody's composer is a surprise, not a feature.
|
|
182
|
+
if (!options.async && (options.replyTo || options.allowRelayChain)) {
|
|
183
|
+
console.error('Error: --reply-to and --allow-relay-chain require --async.');
|
|
184
|
+
process.exit(types_1.ExitCode.CONFIG_ERROR);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/** `--async`: prints the relay id (or its JSON) and exits 0. */
|
|
188
|
+
function printAsyncAck(worktreeId, instanceId, agent, relayId, options) {
|
|
189
|
+
if (options.json) {
|
|
190
|
+
console.log(JSON.stringify({
|
|
191
|
+
worktreeId,
|
|
192
|
+
instanceId: instanceId ?? null,
|
|
193
|
+
cliToolId: agent ?? null,
|
|
194
|
+
relayId,
|
|
195
|
+
mode: 'async',
|
|
196
|
+
}, null, 2));
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
console.log(relayId);
|
|
200
|
+
}
|
|
201
|
+
console.error('Message sent. The reply will be delivered when the turn ends; '
|
|
202
|
+
+ 'watch it with `commandmate relays`.');
|
|
203
|
+
process.exit(types_1.ExitCode.SUCCESS);
|
|
204
|
+
}
|
|
205
|
+
/** A non-success wait: prints the payload and exits with wait's code. */
|
|
206
|
+
function reportWaitFailure(result, worktreeId, instanceId, agent, options) {
|
|
207
|
+
// Same stdout contract as `wait`: the prompt payload, and nothing
|
|
208
|
+
// else, so a caller can parse it without stripping progress lines.
|
|
209
|
+
if (result.output) {
|
|
210
|
+
console.log(JSON.stringify(result.output));
|
|
211
|
+
}
|
|
212
|
+
if (result.upstreamFault && options.json) {
|
|
213
|
+
console.log(JSON.stringify({
|
|
214
|
+
worktreeId,
|
|
215
|
+
instanceId: instanceId ?? null,
|
|
216
|
+
cliToolId: agent ?? null,
|
|
217
|
+
upstreamFault: result.upstreamFault,
|
|
218
|
+
}, null, 2));
|
|
219
|
+
}
|
|
220
|
+
process.exit(result.exitCode);
|
|
221
|
+
}
|
|
222
|
+
/** Reads the reply from the transcript, falling back to the pane. */
|
|
223
|
+
async function readAskReply(client, worktreeId, instanceId, askedAt, agent) {
|
|
224
|
+
let source = 'history';
|
|
225
|
+
let reply = await readLatestReply(client, worktreeId, instanceId, askedAt, agent);
|
|
226
|
+
if (reply === null && agent) {
|
|
227
|
+
source = 'pane';
|
|
228
|
+
const pane = await readPaneTail(client, worktreeId, agent, instanceId);
|
|
229
|
+
const cleaned = pane === null ? '' : (0, reply_ledger_1.sanitizeReply)(pane);
|
|
230
|
+
reply = cleaned === '' ? null : cleaned;
|
|
231
|
+
}
|
|
232
|
+
if (reply === null) {
|
|
233
|
+
source = 'none';
|
|
234
|
+
}
|
|
235
|
+
return { source, reply };
|
|
236
|
+
}
|
|
237
|
+
/** Prints the reply (or its JSON, or the no-reply warning). */
|
|
238
|
+
function printAskReply(worktreeId, instanceId, agent, source, reply, options) {
|
|
239
|
+
if (options.json) {
|
|
240
|
+
console.log(JSON.stringify({
|
|
241
|
+
worktreeId,
|
|
242
|
+
instanceId: instanceId ?? null,
|
|
243
|
+
cliToolId: agent ?? null,
|
|
244
|
+
source,
|
|
245
|
+
reply,
|
|
246
|
+
}, null, 2));
|
|
247
|
+
}
|
|
248
|
+
else if (reply === null) {
|
|
249
|
+
// Not an error exit: the turn DID end, and saying so on stderr keeps
|
|
250
|
+
// stdout empty rather than filling it with an apology a caller would
|
|
251
|
+
// paste into a report as the agent's answer.
|
|
252
|
+
console.error('Warning: the turn completed but no reply could be read '
|
|
253
|
+
+ '(no transcript row and no readable pane).');
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
console.log(reply);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
167
259
|
function createAskCommand() {
|
|
168
260
|
const cmd = new commander_1.Command('ask');
|
|
169
261
|
cmd
|
|
@@ -204,29 +296,7 @@ a decision about that session's guard rails, not part of asking it a question.
|
|
|
204
296
|
`)
|
|
205
297
|
.action(async (worktreeId, message, options) => {
|
|
206
298
|
try {
|
|
207
|
-
|
|
208
|
-
console.error('Error: Invalid worktree ID format.');
|
|
209
|
-
process.exit(types_1.ExitCode.CONFIG_ERROR);
|
|
210
|
-
}
|
|
211
|
-
if (message.trim() === '') {
|
|
212
|
-
console.error('Error: Message cannot be empty.');
|
|
213
|
-
process.exit(types_1.ExitCode.CONFIG_ERROR);
|
|
214
|
-
}
|
|
215
|
-
if (options.agent && !(0, cli_tool_ids_1.isCliToolId)(options.agent)) {
|
|
216
|
-
console.error(`Error: Invalid agent. Must be one of: ${cli_tool_ids_1.CLI_TOOL_IDS.join(', ')}`);
|
|
217
|
-
process.exit(types_1.ExitCode.CONFIG_ERROR);
|
|
218
|
-
}
|
|
219
|
-
if (options.instance && !(0, instances_1.isInstanceSelector)(options.instance)) {
|
|
220
|
-
console.error(instances_1.INSTANCE_SELECTOR_ERROR);
|
|
221
|
-
process.exit(types_1.ExitCode.CONFIG_ERROR);
|
|
222
|
-
}
|
|
223
|
-
// `--reply-to` / `--allow-relay-chain` only mean something under
|
|
224
|
-
// `--async`: without it `ask` returns the reply on stdout, and a second
|
|
225
|
-
// copy arriving in somebody's composer is a surprise, not a feature.
|
|
226
|
-
if (!options.async && (options.replyTo || options.allowRelayChain)) {
|
|
227
|
-
console.error('Error: --reply-to and --allow-relay-chain require --async.');
|
|
228
|
-
process.exit(types_1.ExitCode.CONFIG_ERROR);
|
|
229
|
-
}
|
|
299
|
+
validateAskArgs(worktreeId, message, options);
|
|
230
300
|
const timeout = parseTimeout(options.timeout);
|
|
231
301
|
const client = new api_client_1.ApiClient({ token: options.token });
|
|
232
302
|
// Resolved once, before the send, and reused for the wait and both
|
|
@@ -242,11 +312,7 @@ a decision about that session's guard rails, not part of asking it a question.
|
|
|
242
312
|
// worktree default: exit 21 while the default was not running, and the
|
|
243
313
|
// default's turn instead of <tool>'s while it was.
|
|
244
314
|
const selector = options.instance ?? options.agent;
|
|
245
|
-
const
|
|
246
|
-
? await (0, instances_1.resolveInstanceTarget)(client, worktreeId, selector, options.agent)
|
|
247
|
-
: null;
|
|
248
|
-
const agent = target ? target.cliToolId : options.agent;
|
|
249
|
-
const instanceId = target?.instanceId;
|
|
315
|
+
const { agent, instanceId } = await (0, command_target_1.resolveCommandTarget)(client, worktreeId, selector, options.agent);
|
|
250
316
|
// Taken BEFORE the send so a reply written by the previous turn cannot
|
|
251
317
|
// be read as this one's. Milliseconds, compared against the row's own
|
|
252
318
|
// timestamp rather than against a re-derived clock.
|
|
@@ -256,11 +322,11 @@ a decision about that session's guard rails, not part of asking it a question.
|
|
|
256
322
|
// and the ledger row. A refusal exits 2 having sent nothing.
|
|
257
323
|
let relayId;
|
|
258
324
|
if (options.async) {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
325
|
+
relayId = await (0, message_dispatch_1.registerRelayForMessage)(client, {
|
|
326
|
+
worktreeId,
|
|
327
|
+
replyTo: options.replyTo ?? 'self',
|
|
328
|
+
instance: options.instance,
|
|
329
|
+
agent: options.agent,
|
|
264
330
|
allowRelayChain: options.allowRelayChain,
|
|
265
331
|
});
|
|
266
332
|
}
|
|
@@ -269,44 +335,20 @@ a decision about that session's guard rails, not part of asking it a question.
|
|
|
269
335
|
sendBody.cliToolId = agent;
|
|
270
336
|
if (instanceId)
|
|
271
337
|
sendBody.instanceId = instanceId;
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
// A relay whose message never arrived can never be answered.
|
|
282
|
-
if (relayId)
|
|
283
|
-
await (0, relays_1.cancelRelayQuietly)(client, relayId);
|
|
284
|
-
if (error instanceof api_client_1.ApiError && error.apiCode === PROMPT_WAITING_CODE) {
|
|
285
|
-
console.error(`Error: ${error.payload?.error
|
|
286
|
-
?? `${worktreeId} is waiting on a prompt; the message was not sent.`}`);
|
|
287
|
-
process.exit(types_1.ExitCode.CONFIG_ERROR);
|
|
288
|
-
}
|
|
289
|
-
throw error;
|
|
290
|
-
}
|
|
338
|
+
// The other session may be sitting on a dialog (Issue #1708): the
|
|
339
|
+
// message would be typed into the dialog's input line instead of
|
|
340
|
+
// reaching the agent. Reported as a config error with the server's
|
|
341
|
+
// own sentence: the answer is to look at that session, never to
|
|
342
|
+
// re-send.
|
|
343
|
+
await (0, message_dispatch_1.postMessage)(client, worktreeId, sendBody, {
|
|
344
|
+
relayId,
|
|
345
|
+
promptWaitingFallback: `${worktreeId} is waiting on a prompt; the message was not sent.`,
|
|
346
|
+
});
|
|
291
347
|
// Issue #2377: the whole point of `--async`. Nothing is waited on, so
|
|
292
348
|
// the caller's own turn ends here and the answer arrives later, in their
|
|
293
349
|
// composer, as a `relay` row.
|
|
294
350
|
if (relayId) {
|
|
295
|
-
|
|
296
|
-
console.log(JSON.stringify({
|
|
297
|
-
worktreeId,
|
|
298
|
-
instanceId: instanceId ?? null,
|
|
299
|
-
cliToolId: agent ?? null,
|
|
300
|
-
relayId,
|
|
301
|
-
mode: 'async',
|
|
302
|
-
}, null, 2));
|
|
303
|
-
}
|
|
304
|
-
else {
|
|
305
|
-
console.log(relayId);
|
|
306
|
-
}
|
|
307
|
-
console.error('Message sent. The reply will be delivered when the turn ends; '
|
|
308
|
-
+ 'watch it with `commandmate relays`.');
|
|
309
|
-
process.exit(types_1.ExitCode.SUCCESS);
|
|
351
|
+
printAsyncAck(worktreeId, instanceId, agent, relayId, options);
|
|
310
352
|
return;
|
|
311
353
|
}
|
|
312
354
|
console.error('Message sent. Waiting for the reply...');
|
|
@@ -321,52 +363,11 @@ a decision about that session's guard rails, not part of asking it a question.
|
|
|
321
363
|
failOnUpstreamFault: true,
|
|
322
364
|
});
|
|
323
365
|
if (result.exitCode !== types_1.WaitExitCode.SUCCESS) {
|
|
324
|
-
|
|
325
|
-
// else, so a caller can parse it without stripping progress lines.
|
|
326
|
-
if (result.output) {
|
|
327
|
-
console.log(JSON.stringify(result.output));
|
|
328
|
-
}
|
|
329
|
-
if (result.upstreamFault && options.json) {
|
|
330
|
-
console.log(JSON.stringify({
|
|
331
|
-
worktreeId,
|
|
332
|
-
instanceId: instanceId ?? null,
|
|
333
|
-
cliToolId: agent ?? null,
|
|
334
|
-
upstreamFault: result.upstreamFault,
|
|
335
|
-
}, null, 2));
|
|
336
|
-
}
|
|
337
|
-
process.exit(result.exitCode);
|
|
366
|
+
reportWaitFailure(result, worktreeId, instanceId, agent, options);
|
|
338
367
|
return;
|
|
339
368
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
if (reply === null && agent) {
|
|
343
|
-
source = 'pane';
|
|
344
|
-
const pane = await readPaneTail(client, worktreeId, agent, instanceId);
|
|
345
|
-
const cleaned = pane === null ? '' : (0, reply_ledger_1.sanitizeReply)(pane);
|
|
346
|
-
reply = cleaned === '' ? null : cleaned;
|
|
347
|
-
}
|
|
348
|
-
if (reply === null) {
|
|
349
|
-
source = 'none';
|
|
350
|
-
}
|
|
351
|
-
if (options.json) {
|
|
352
|
-
console.log(JSON.stringify({
|
|
353
|
-
worktreeId,
|
|
354
|
-
instanceId: instanceId ?? null,
|
|
355
|
-
cliToolId: agent ?? null,
|
|
356
|
-
source,
|
|
357
|
-
reply,
|
|
358
|
-
}, null, 2));
|
|
359
|
-
}
|
|
360
|
-
else if (reply === null) {
|
|
361
|
-
// Not an error exit: the turn DID end, and saying so on stderr keeps
|
|
362
|
-
// stdout empty rather than filling it with an apology a caller would
|
|
363
|
-
// paste into a report as the agent's answer.
|
|
364
|
-
console.error('Warning: the turn completed but no reply could be read '
|
|
365
|
-
+ '(no transcript row and no readable pane).');
|
|
366
|
-
}
|
|
367
|
-
else {
|
|
368
|
-
console.log(reply);
|
|
369
|
-
}
|
|
369
|
+
const { source, reply } = await readAskReply(client, worktreeId, instanceId, askedAt, agent);
|
|
370
|
+
printAskReply(worktreeId, instanceId, agent, source, reply, options);
|
|
370
371
|
process.exit(types_1.ExitCode.SUCCESS);
|
|
371
372
|
}
|
|
372
373
|
catch (error) {
|
|
@@ -30,6 +30,100 @@
|
|
|
30
30
|
* 200x1000, or cannot survive a width change at all.
|
|
31
31
|
*/
|
|
32
32
|
import { Command } from 'commander';
|
|
33
|
+
import { ApiClient } from '../utils/api-client';
|
|
34
|
+
import type { ApiErrorPayload } from '../utils/api-client';
|
|
35
|
+
/** The name `attach` will connect to, and whether the server published it. */
|
|
36
|
+
export interface AttachSessionTarget {
|
|
37
|
+
sessionName: string;
|
|
38
|
+
/**
|
|
39
|
+
* True when the name came from the server's roster (Issue #2867); false when
|
|
40
|
+
* it is the legacy name assembled here because the roster could not supply
|
|
41
|
+
* one. Only a published name is the one the server's own routes address, so
|
|
42
|
+
* only a published name can be vouched for by them (Issue #3334).
|
|
43
|
+
*/
|
|
44
|
+
published: boolean;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* What the server could say about the session `attach` is about to open.
|
|
48
|
+
*
|
|
49
|
+
* - `owned`: the server's ownership check passed, for this very name.
|
|
50
|
+
* - `foreign`: the server answered 409 `session_owned_by_other_server` for
|
|
51
|
+
* this very name.
|
|
52
|
+
* - `unconfirmed`: anything else — the owner is not known. The server answered
|
|
53
|
+
* about a DIFFERENT name than the one `attach` connects to (`other-name`), or
|
|
54
|
+
* gave no ownership answer at all (`no-answer`: any non-2xx such as the 404
|
|
55
|
+
* for a namespaced session that does not exist, a server older than #2865,
|
|
56
|
+
* no server).
|
|
57
|
+
*/
|
|
58
|
+
export type AttachOwnership = {
|
|
59
|
+
verdict: 'owned';
|
|
60
|
+
} | {
|
|
61
|
+
verdict: 'foreign';
|
|
62
|
+
payload: ApiErrorPayload;
|
|
63
|
+
} | {
|
|
64
|
+
verdict: 'unconfirmed';
|
|
65
|
+
why: 'other-name' | 'no-answer';
|
|
66
|
+
checkedName: string | null;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Ask the server whether the session `attach` is about to open is its own
|
|
70
|
+
* (Issue #3334).
|
|
71
|
+
*
|
|
72
|
+
* ## Why ask the server, and why through `capture`
|
|
73
|
+
*
|
|
74
|
+
* `has-session` answers by name, and a name is all two servers on one tmux
|
|
75
|
+
* socket have in common (Issue #2865): a worktree directory called the same on
|
|
76
|
+
* both resolves to the same `mcbd-…` name. Only the server that holds the
|
|
77
|
+
* worktree row knows the directory its own session was started in, and every
|
|
78
|
+
* session route already compares that with tmux's `#{session_path}` and
|
|
79
|
+
* answers 409 `session_owned_by_other_server` when they differ. `capture` with
|
|
80
|
+
* `lines: 1` is the cheapest of them, reads nothing it would not show anyway,
|
|
81
|
+
* and sends tmux no key.
|
|
82
|
+
*
|
|
83
|
+
* ## The name has to be the same one
|
|
84
|
+
*
|
|
85
|
+
* The route checks the name IT resolves — the namespaced one, or the legacy
|
|
86
|
+
* one it adopted — which is exactly the name the roster publishes. When the
|
|
87
|
+
* roster could not be read, `attach` falls back to the legacy name, and a 200
|
|
88
|
+
* from `capture` is then about a different session: the namespaced name and
|
|
89
|
+
* the legacy name can both exist, one this server's and one another's. So a
|
|
90
|
+
* 200 counts as `owned` only for a published name, and a 409 counts as
|
|
91
|
+
* `foreign` only when the name it reports is the one being opened.
|
|
92
|
+
*
|
|
93
|
+
* Every other outcome is `unconfirmed`, including no answer at all. A 404
|
|
94
|
+
* from `capture` is the common case of that: the roster could not be read, the
|
|
95
|
+
* name fell back to the legacy form, and the server's namespaced session does
|
|
96
|
+
* not exist — so the legacy session `has-session` found belongs to nobody this
|
|
97
|
+
* server can vouch for. Only a confirmed owner gets a writable attach.
|
|
98
|
+
*/
|
|
99
|
+
export declare function checkAttachOwnership(client: ApiClient, worktreeId: string, cliToolId: string, instanceId: string | undefined, target: AttachSessionTarget): Promise<AttachOwnership>;
|
|
100
|
+
/**
|
|
101
|
+
* What to do with an attach the server did not vouch for (Issue #3334): a
|
|
102
|
+
* session another server owns (`foreign`), or one whose owner could not be
|
|
103
|
+
* confirmed because the server checked a different name (`unconfirmed`).
|
|
104
|
+
*
|
|
105
|
+
* Attaching is the one path where the operator named the session themselves,
|
|
106
|
+
* and looking at it can be what they came for — so the attach is not refused,
|
|
107
|
+
* it is made read-only: tmux then delivers no key but the detach one. The two
|
|
108
|
+
* forms that cannot be made read-only are refused before tmux is touched:
|
|
109
|
+
*
|
|
110
|
+
* - `--live` re-lays the session out (`set-option` / `resize-window`), which
|
|
111
|
+
* changes the other server's pane whether or not a key is typed;
|
|
112
|
+
* - inside tmux, `switch-client` has no read-only form (its `-r` TOGGLES the
|
|
113
|
+
* client's mode, so it can just as well turn read-only off), and the manual
|
|
114
|
+
* `attach -r` from outside tmux is printed instead.
|
|
115
|
+
*
|
|
116
|
+
* @returns the lines for stderr and whether to go on (read-only)
|
|
117
|
+
*/
|
|
118
|
+
export declare function planGuardedAttach(ownership: Extract<AttachOwnership, {
|
|
119
|
+
verdict: 'foreign' | 'unconfirmed';
|
|
120
|
+
}>, sessionName: string, options: {
|
|
121
|
+
live?: boolean;
|
|
122
|
+
insideTmux: boolean;
|
|
123
|
+
}): {
|
|
124
|
+
proceedReadOnly: boolean;
|
|
125
|
+
lines: string[];
|
|
126
|
+
};
|
|
33
127
|
/**
|
|
34
128
|
* The lines printed to stderr before the terminal is handed to tmux.
|
|
35
129
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attach.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/attach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"attach.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/attach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EACL,SAAS,EAMV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAsD3D,8EAA8E;AAC9E,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB;AAqCD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,eAAe,GACvB;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GACpB;IAAE,OAAO,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,eAAe,CAAA;CAAE,GAChD;IAAE,OAAO,EAAE,aAAa,CAAC;IAAC,GAAG,EAAE,YAAY,GAAG,WAAW,CAAC;IAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAE5F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,eAAe,CAAC,CAqB1B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,OAAO,CAAC,eAAe,EAAE;IAAE,OAAO,EAAE,SAAS,GAAG,aAAa,CAAA;CAAE,CAAC,EAC3E,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,GAC/C;IAAE,eAAe,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CA0C/C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAC9C,MAAM,EAAE,CAmCV;AAiDD,wBAAgB,mBAAmB,IAAI,OAAO,CAoF7C"}
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
* 200x1000, or cannot survive a width change at all.
|
|
32
32
|
*/
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
exports.checkAttachOwnership = checkAttachOwnership;
|
|
35
|
+
exports.planGuardedAttach = planGuardedAttach;
|
|
34
36
|
exports.buildAttachHints = buildAttachHints;
|
|
35
37
|
exports.createAttachCommand = createAttachCommand;
|
|
36
38
|
const child_process_1 = require("child_process");
|
|
@@ -93,13 +95,131 @@ async function resolveAttachSessionName(client, worktreeId, cliToolId, instanceI
|
|
|
93
95
|
const published = instances.find((inst) => inst.id === targetId)?.sessionName;
|
|
94
96
|
if (published) {
|
|
95
97
|
(0, validation_1.validateSessionName)(published);
|
|
96
|
-
return published;
|
|
98
|
+
return { sessionName: published, published: true };
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
catch {
|
|
100
102
|
// Fall through to the legacy name.
|
|
101
103
|
}
|
|
102
|
-
return
|
|
104
|
+
return {
|
|
105
|
+
sessionName: (0, session_name_1.resolveLegacySessionName)(cliToolId, worktreeId, instanceId),
|
|
106
|
+
published: false,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Ask the server whether the session `attach` is about to open is its own
|
|
111
|
+
* (Issue #3334).
|
|
112
|
+
*
|
|
113
|
+
* ## Why ask the server, and why through `capture`
|
|
114
|
+
*
|
|
115
|
+
* `has-session` answers by name, and a name is all two servers on one tmux
|
|
116
|
+
* socket have in common (Issue #2865): a worktree directory called the same on
|
|
117
|
+
* both resolves to the same `mcbd-…` name. Only the server that holds the
|
|
118
|
+
* worktree row knows the directory its own session was started in, and every
|
|
119
|
+
* session route already compares that with tmux's `#{session_path}` and
|
|
120
|
+
* answers 409 `session_owned_by_other_server` when they differ. `capture` with
|
|
121
|
+
* `lines: 1` is the cheapest of them, reads nothing it would not show anyway,
|
|
122
|
+
* and sends tmux no key.
|
|
123
|
+
*
|
|
124
|
+
* ## The name has to be the same one
|
|
125
|
+
*
|
|
126
|
+
* The route checks the name IT resolves — the namespaced one, or the legacy
|
|
127
|
+
* one it adopted — which is exactly the name the roster publishes. When the
|
|
128
|
+
* roster could not be read, `attach` falls back to the legacy name, and a 200
|
|
129
|
+
* from `capture` is then about a different session: the namespaced name and
|
|
130
|
+
* the legacy name can both exist, one this server's and one another's. So a
|
|
131
|
+
* 200 counts as `owned` only for a published name, and a 409 counts as
|
|
132
|
+
* `foreign` only when the name it reports is the one being opened.
|
|
133
|
+
*
|
|
134
|
+
* Every other outcome is `unconfirmed`, including no answer at all. A 404
|
|
135
|
+
* from `capture` is the common case of that: the roster could not be read, the
|
|
136
|
+
* name fell back to the legacy form, and the server's namespaced session does
|
|
137
|
+
* not exist — so the legacy session `has-session` found belongs to nobody this
|
|
138
|
+
* server can vouch for. Only a confirmed owner gets a writable attach.
|
|
139
|
+
*/
|
|
140
|
+
async function checkAttachOwnership(client, worktreeId, cliToolId, instanceId, target) {
|
|
141
|
+
try {
|
|
142
|
+
await client.post(`/api/worktrees/${worktreeId}/capture`, {
|
|
143
|
+
cliToolId,
|
|
144
|
+
lines: 1,
|
|
145
|
+
...(instanceId !== undefined && instanceId !== cliToolId ? { instanceId } : {}),
|
|
146
|
+
});
|
|
147
|
+
return target.published
|
|
148
|
+
? { verdict: 'owned' }
|
|
149
|
+
: { verdict: 'unconfirmed', why: 'other-name', checkedName: null };
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
if (error instanceof api_client_1.ApiError && error.statusCode === 409 && error.apiCode === api_client_1.FOREIGN_SESSION_ERROR_CODE) {
|
|
153
|
+
const payload = error.payload ?? { code: api_client_1.FOREIGN_SESSION_ERROR_CODE };
|
|
154
|
+
const checkedName = typeof payload.sessionName === 'string' ? payload.sessionName : null;
|
|
155
|
+
if (checkedName === target.sessionName || (checkedName === null && target.published)) {
|
|
156
|
+
return { verdict: 'foreign', payload };
|
|
157
|
+
}
|
|
158
|
+
return { verdict: 'unconfirmed', why: 'other-name', checkedName };
|
|
159
|
+
}
|
|
160
|
+
return { verdict: 'unconfirmed', why: 'no-answer', checkedName: null };
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* What to do with an attach the server did not vouch for (Issue #3334): a
|
|
165
|
+
* session another server owns (`foreign`), or one whose owner could not be
|
|
166
|
+
* confirmed because the server checked a different name (`unconfirmed`).
|
|
167
|
+
*
|
|
168
|
+
* Attaching is the one path where the operator named the session themselves,
|
|
169
|
+
* and looking at it can be what they came for — so the attach is not refused,
|
|
170
|
+
* it is made read-only: tmux then delivers no key but the detach one. The two
|
|
171
|
+
* forms that cannot be made read-only are refused before tmux is touched:
|
|
172
|
+
*
|
|
173
|
+
* - `--live` re-lays the session out (`set-option` / `resize-window`), which
|
|
174
|
+
* changes the other server's pane whether or not a key is typed;
|
|
175
|
+
* - inside tmux, `switch-client` has no read-only form (its `-r` TOGGLES the
|
|
176
|
+
* client's mode, so it can just as well turn read-only off), and the manual
|
|
177
|
+
* `attach -r` from outside tmux is printed instead.
|
|
178
|
+
*
|
|
179
|
+
* @returns the lines for stderr and whether to go on (read-only)
|
|
180
|
+
*/
|
|
181
|
+
function planGuardedAttach(ownership, sessionName, options) {
|
|
182
|
+
const reason = ownership.verdict === 'foreign'
|
|
183
|
+
? (0, api_client_1.foreignSessionMessage)(ownership.payload)
|
|
184
|
+
: `Could not confirm that tmux session "${sessionName}" is this CommandMate server's: `
|
|
185
|
+
+ (ownership.why === 'no-answer'
|
|
186
|
+
? 'the server gave no ownership answer for it (an older server, a session it does not have, or no server).'
|
|
187
|
+
: ownership.checkedName
|
|
188
|
+
? `the server checked "${ownership.checkedName}", not that name.`
|
|
189
|
+
: 'the server did not publish the session name it uses, so its check was about a different name.');
|
|
190
|
+
if (options.live) {
|
|
191
|
+
return {
|
|
192
|
+
proceedReadOnly: false,
|
|
193
|
+
lines: [`Error: ${reason}`, '--live would re-lay that session out, so it was not attached.'],
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
if (options.insideTmux) {
|
|
197
|
+
return {
|
|
198
|
+
proceedReadOnly: false,
|
|
199
|
+
lines: [
|
|
200
|
+
`Error: ${reason}`,
|
|
201
|
+
'Inside tmux this client can only switch to it with keys enabled, so it was not switched. '
|
|
202
|
+
+ 'To look at it read-only, from a terminal outside tmux run:',
|
|
203
|
+
` tmux attach -r -t '${(0, tmux_session_surface_1.exactSessionTarget)(sessionName)}'`,
|
|
204
|
+
],
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
if (ownership.verdict === 'unconfirmed') {
|
|
208
|
+
return {
|
|
209
|
+
proceedReadOnly: true,
|
|
210
|
+
lines: [`Warning: ${reason}`, 'Attaching READ-ONLY, so no key you type reaches it.'],
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
const where = typeof ownership.payload.sessionPath === 'string' && ownership.payload.sessionPath !== ''
|
|
214
|
+
? ` (it was started in ${ownership.payload.sessionPath})`
|
|
215
|
+
: '';
|
|
216
|
+
return {
|
|
217
|
+
proceedReadOnly: true,
|
|
218
|
+
lines: [
|
|
219
|
+
`Warning: tmux session "${sessionName}" belongs to another CommandMate server${where}.`,
|
|
220
|
+
'Attaching READ-ONLY, so no key you type reaches it. To work in it, use the server that started it.',
|
|
221
|
+
],
|
|
222
|
+
};
|
|
103
223
|
}
|
|
104
224
|
/**
|
|
105
225
|
* The lines printed to stderr before the terminal is handed to tmux.
|
|
@@ -194,7 +314,7 @@ function createAttachCommand() {
|
|
|
194
314
|
process.exit(types_1.ExitCode.CONFIG_ERROR);
|
|
195
315
|
}
|
|
196
316
|
if (options.agent && !(0, cli_tool_ids_1.isCliToolId)(options.agent)) {
|
|
197
|
-
console.error(
|
|
317
|
+
console.error(`Error: Invalid agent. Must be one of: ${cli_tool_ids_1.CLI_TOOL_IDS.join(', ')}`);
|
|
198
318
|
process.exit(types_1.ExitCode.CONFIG_ERROR);
|
|
199
319
|
}
|
|
200
320
|
if (options.instance && !(0, api_client_1.isValidInstanceId)(options.instance)) {
|
|
@@ -209,22 +329,40 @@ function createAttachCommand() {
|
|
|
209
329
|
+ `Attach without it, or read with: commandmate capture ${worktreeId} --pane --follow`);
|
|
210
330
|
process.exit(types_1.ExitCode.CONFIG_ERROR);
|
|
211
331
|
}
|
|
212
|
-
const
|
|
332
|
+
const target = await resolveAttachSessionName(client, worktreeId, cliToolId, instanceId);
|
|
333
|
+
const { sessionName } = target;
|
|
213
334
|
if (!runTmux(['has-session', '-t', (0, tmux_session_surface_1.exactSessionTarget)(sessionName)])) {
|
|
214
335
|
console.error(`Error: no tmux session named ${sessionName}.\n`
|
|
215
336
|
+ ` commandmate ls which worktrees have a running session\n`
|
|
216
337
|
+ ` commandmate instances ${worktreeId} which agents this worktree runs`);
|
|
217
338
|
process.exit(types_1.ExitCode.UNEXPECTED_ERROR);
|
|
218
339
|
}
|
|
340
|
+
// Issue #3334: the name exists, but it may be another server's session,
|
|
341
|
+
// and the server's check has to be about this very name.
|
|
342
|
+
let readOnly = Boolean(options.readOnly);
|
|
343
|
+
// Only a confirmed owner attaches writable; everything else is read-only
|
|
344
|
+
// or refused (`planGuardedAttach`).
|
|
345
|
+
const ownership = await checkAttachOwnership(client, worktreeId, cliToolId, instanceId, target);
|
|
346
|
+
if (ownership.verdict !== 'owned') {
|
|
347
|
+
const plan = planGuardedAttach(ownership, sessionName, {
|
|
348
|
+
live: options.live,
|
|
349
|
+
insideTmux: Boolean(process.env.TMUX),
|
|
350
|
+
});
|
|
351
|
+
for (const line of plan.lines)
|
|
352
|
+
console.error(line);
|
|
353
|
+
if (!plan.proceedReadOnly)
|
|
354
|
+
process.exit(types_1.ExitCode.UNEXPECTED_ERROR);
|
|
355
|
+
readOnly = true;
|
|
356
|
+
}
|
|
219
357
|
for (const line of buildAttachHints(cliToolId, worktreeId, sessionName, {
|
|
220
|
-
readOnly
|
|
358
|
+
readOnly,
|
|
221
359
|
live: options.live,
|
|
222
360
|
})) {
|
|
223
361
|
console.error(line);
|
|
224
362
|
}
|
|
225
363
|
const status = options.live
|
|
226
|
-
? attachLive(sessionName,
|
|
227
|
-
: attachOrSwitch(sessionName,
|
|
364
|
+
? attachLive(sessionName, readOnly)
|
|
365
|
+
: attachOrSwitch(sessionName, readOnly);
|
|
228
366
|
process.exit(status);
|
|
229
367
|
}
|
|
230
368
|
catch (error) {
|
|
@@ -80,7 +80,7 @@ function createAutoYesCommand() {
|
|
|
80
80
|
process.exit(types_1.ExitCode.CONFIG_ERROR);
|
|
81
81
|
}
|
|
82
82
|
if (options.agent && !(0, cli_tool_ids_1.isCliToolId)(options.agent)) {
|
|
83
|
-
console.error(
|
|
83
|
+
console.error(`Error: Invalid agent. Must be one of: ${cli_tool_ids_1.CLI_TOOL_IDS.join(', ')}`);
|
|
84
84
|
process.exit(types_1.ExitCode.CONFIG_ERROR);
|
|
85
85
|
}
|
|
86
86
|
// Issue #896: Validate instance ID if provided
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/capture.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,OAAO,EAAE,SAAS,EAAqB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/capture.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,OAAO,EAAE,SAAS,EAAqB,MAAM,qBAAqB,CAAC;AAuVnE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAexB;AA2ED,wBAAgB,oBAAoB,IAAI,OAAO,CAiI9C"}
|