commandmate 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +259 -238
- package/.next/app-path-routes-manifest.json +28 -26
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +12 -12
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +18 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update/route.js +5 -3
- package/.next/server/app/api/app/update/route.js.nft.json +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.js.nft.json +1 -1
- package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/conversation/route.js +1 -1
- package/.next/server/app/api/assistant/conversation/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/current-output/route.js +1 -1
- package/.next/server/app/api/assistant/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/messages/route.js +1 -1
- package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/session/route.js +1 -1
- package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/start/route.js +1 -1
- package/.next/server/app/api/assistant/start/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/terminal/route.js +1 -1
- package/.next/server/app/api/assistant/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/tools/route.js +1 -1
- package/.next/server/app/api/assistant/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/route.js +1 -1
- package/.next/server/app/api/auth/login/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/route.js +1 -1
- package/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/status/route.js +1 -1
- package/.next/server/app/api/auth/status/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/status/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.js +1 -1
- package/.next/server/app/api/external-apps/[id]/health/route.js.nft.json +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.js.nft.json +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.js.nft.json +1 -1
- package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/browse/route.js +2 -2
- package/.next/server/app/api/fs/browse/route.js.nft.json +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.js +2 -2
- package/.next/server/app/api/fs/recent-paths/route.js.nft.json +1 -1
- package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/agent-event/route.js +1 -1
- package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/claude-done/route.js +1 -1
- package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/metrics/vibe/route.js +2 -2
- package/.next/server/app/api/metrics/vibe/route.js.nft.json +1 -1
- package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ollama/models/route.js +1 -1
- package/.next/server/app/api/ollama/models/route.js.nft.json +1 -1
- package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/subscriptions/route.js +1 -1
- package/.next/server/app/api/push/subscriptions/route.js.nft.json +1 -1
- 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.js.nft.json +1 -1
- package/.next/server/app/api/push/vapid/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.js.nft.json +1 -1
- package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/excluded/route.js +1 -1
- package/.next/server/app/api/repositories/excluded/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/repositories/validate-path/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sidebar/group-order/route.js +2 -2
- package/.next/server/app/api/sidebar/group-order/route.js.nft.json +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.js.nft.json +1 -1
- package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/installations/route.js +1 -1
- package/.next/server/app/api/skills/installations/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/operations/route.js +3 -3
- package/.next/server/app/api/skills/operations/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/reindex/route.js +1 -1
- package/.next/server/app/api/skills/reindex/route.js.nft.json +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.js.nft.json +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/slash-commands/route.js +1 -1
- package/.next/server/app/api/slash-commands/route.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.js +2 -2
- package/.next/server/app/api/tasks/[taskId]/cancel/route.js.nft.json +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.js +2 -2
- package/.next/server/app/api/tasks/[taskId]/route.js.nft.json +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.js.nft.json +1 -1
- 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.js.nft.json +1 -1
- package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/todos/route.js +1 -1
- package/.next/server/app/api/todos/route.js.nft.json +1 -1
- package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/verification/runs/route.js.nft.json +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]/cli-tool/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route.js.nft.json +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 +2 -2
- 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]/execution-logs/[logId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route.js.nft.json +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.js.nft.json +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.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route.js.nft.json +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.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js.nft.json +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.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route.js.nft.json +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.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js.nft.json +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]/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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js.nft.json +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.js +2 -2
- package/.next/server/app/api/worktrees/[id]/logs/route.js.nft.json +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 +6 -6
- package/.next/server/app/api/worktrees/[id]/marp-render/route.js.nft.json +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.js.nft.json +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.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/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]/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 +1 -1
- 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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route.js.nft.json +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 +1 -1
- 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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js.nft.json +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.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js.nft.json +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.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/skills/route.js.nft.json +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.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]/start-polling/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/start-polling/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route.js +4 -4
- package/.next/server/app/api/worktrees/[id]/tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route.js.nft.json +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.js.nft.json +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.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route.js.nft.json +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/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +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]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/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/apple-icon.png/route.js +1 -1
- package/.next/server/app/apple-icon.png/route.js.nft.json +1 -1
- package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
- package/.next/server/app/icon.png/route.js +1 -1
- package/.next/server/app/icon.png/route.js.nft.json +1 -1
- package/.next/server/app/icon1.png/route.js +1 -1
- package/.next/server/app/icon1.png/route.js.nft.json +1 -1
- package/.next/server/app/icon2.png/route.js +1 -1
- package/.next/server/app/icon2.png/route.js.nft.json +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/.next/server/app/manifest.webmanifest/route.js.nft.json +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.js +1 -1
- package/.next/server/app/proxy/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/repositories/page.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.js +2 -2
- package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -1
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/installed/page_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.js +2 -2
- package/.next/server/app/worktrees/[id]/files/[...path]/page.js.nft.json +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 +8 -8
- 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.js +3 -3
- package/.next/server/app/worktrees/[id]/terminal/page.js.nft.json +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +28 -26
- package/.next/server/chunks/1029.js +1 -0
- package/.next/server/chunks/1068.js +1 -1
- package/.next/server/chunks/1503.js +1 -1
- package/.next/server/chunks/1598.js +4 -0
- package/.next/server/chunks/22.js +1 -1
- package/.next/server/chunks/2328.js +1 -1
- package/.next/server/chunks/2546.js +1 -0
- package/.next/server/chunks/2710.js +2 -2
- package/.next/server/chunks/28.js +2 -2
- package/.next/server/chunks/3417.js +1 -0
- package/.next/server/chunks/3451.js +1 -1
- package/.next/server/chunks/3543.js +1 -1
- package/.next/server/chunks/365.js +1 -0
- package/.next/server/chunks/3736.js +1 -1
- package/.next/server/chunks/3753.js +33 -20
- package/.next/server/chunks/3945.js +1 -1
- package/.next/server/chunks/406.js +5 -5
- package/.next/server/chunks/4444.js +1 -1
- package/.next/server/chunks/{1185.js → 5048.js} +1 -1
- package/.next/server/chunks/5064.js +1 -1
- package/.next/server/chunks/5737.js +1 -1
- package/.next/server/chunks/5959.js +10 -3
- package/.next/server/chunks/{5381.js → 5998.js} +2 -2
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/6274.js +5 -5
- package/.next/server/chunks/6283.js +1 -1
- package/.next/server/chunks/6401.js +1 -0
- package/.next/server/chunks/641.js +1 -0
- package/.next/server/chunks/848.js +1 -0
- package/.next/server/chunks/8536.js +1 -0
- package/.next/server/chunks/8543.js +1 -0
- package/.next/server/chunks/8584.js +1 -1
- package/.next/server/chunks/8807.js +157 -143
- package/.next/server/chunks/8856.js +2 -2
- package/.next/server/chunks/9058.js +1 -0
- package/.next/server/chunks/9067.js +1 -0
- package/.next/server/chunks/9123.js +1 -1
- package/.next/server/chunks/9360.js +2 -0
- package/.next/server/chunks/9687.js +1 -1
- 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/server/src/middleware.js +1 -1
- package/.next/server/src/middleware.js.map +1 -1
- package/.next/static/chunks/{8562-6e2ab32452f4fa5b.js → 2053-52d3c82014e1cd54.js} +1 -1
- package/.next/static/chunks/2751-9ef0f4b450bd4ef0.js +1 -0
- package/.next/static/chunks/{6488-2c412c29258637b6.js → 6488-b5e707dfdd33d633.js} +1 -1
- package/.next/static/chunks/744-fa8c0ae444c8338c.js +1 -0
- package/.next/static/chunks/app/api/app/update/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/app/update-check/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/assistant/conversation/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/assistant/current-output/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/assistant/messages/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/assistant/session/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/assistant/start/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/assistant/terminal/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/assistant/tools/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/fs/browse/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/fs/recent-paths/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/hooks/agent-event/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/metrics/vibe/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/repositories/validate-path/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/skills/installations/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/skills/operations/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/skills/reindex/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/skills/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/templates/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/todos/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/proxy/[...path]/route-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/repositories/page-202680fe6ec169c8.js +1 -0
- package/.next/static/chunks/app/skills/[skillId]/page-10d6f983e5f06ffb.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/layout-be21650964d61b1d.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-b73ac6531829c698.js +1 -0
- package/.next/trace +12 -12
- package/.next/types/app/api/worktrees/[id]/skills/[skillId]/update/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.ts +347 -0
- package/.next/types/routes.d.ts +5 -2
- package/.next/types/validator.ts +27 -0
- package/README.md +10 -1
- package/dist/cli/commands/auto-yes.d.ts.map +1 -1
- package/dist/cli/commands/auto-yes.js +4 -3
- package/dist/cli/commands/capture.d.ts +1 -0
- package/dist/cli/commands/capture.d.ts.map +1 -1
- package/dist/cli/commands/capture.js +112 -2
- package/dist/cli/commands/ls.d.ts.map +1 -1
- package/dist/cli/commands/ls.js +9 -3
- package/dist/cli/commands/respond.d.ts.map +1 -1
- package/dist/cli/commands/respond.js +34 -8
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +6 -5
- package/dist/cli/commands/skill-format.d.ts +7 -1
- package/dist/cli/commands/skill-format.d.ts.map +1 -1
- package/dist/cli/commands/skill-format.js +67 -0
- package/dist/cli/commands/skill.d.ts +2 -0
- package/dist/cli/commands/skill.d.ts.map +1 -1
- package/dist/cli/commands/skill.js +149 -0
- package/dist/cli/commands/sync.d.ts +14 -0
- package/dist/cli/commands/sync.d.ts.map +1 -0
- package/dist/cli/commands/sync.js +53 -0
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +66 -0
- package/dist/cli/commands/wait.d.ts.map +1 -1
- package/dist/cli/commands/wait.js +3 -2
- package/dist/cli/config/agent-target-options.d.ts +46 -0
- package/dist/cli/config/agent-target-options.d.ts.map +1 -0
- package/dist/cli/config/agent-target-options.js +54 -0
- package/dist/cli/docs/agent-operations.d.ts +2 -2
- package/dist/cli/docs/agent-operations.d.ts.map +1 -1
- package/dist/cli/docs/agent-operations.js +72 -17
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +3 -0
- package/dist/cli/types/api-responses.d.ts +174 -0
- package/dist/cli/types/api-responses.d.ts.map +1 -1
- package/dist/cli/types/index.d.ts +31 -0
- package/dist/cli/types/index.d.ts.map +1 -1
- package/dist/cli/utils/api-client.d.ts +4 -1
- package/dist/cli/utils/api-client.d.ts.map +1 -1
- package/dist/cli/utils/api-client.js +43 -5
- package/dist/cli/utils/npm-runner.d.ts +24 -0
- package/dist/cli/utils/npm-runner.d.ts.map +1 -1
- package/dist/cli/utils/npm-runner.js +51 -1
- package/dist/cli/utils/pid-manager.d.ts +12 -2
- package/dist/cli/utils/pid-manager.d.ts.map +1 -1
- package/dist/cli/utils/pid-manager.js +76 -13
- package/dist/cli/utils/verify-runner.d.ts +9 -0
- package/dist/cli/utils/verify-runner.d.ts.map +1 -1
- package/dist/cli/utils/verify-runner.js +28 -2
- package/dist/config/history-display-config.d.ts +61 -0
- package/dist/config/history-display-config.d.ts.map +1 -0
- package/dist/config/history-display-config.js +62 -0
- package/dist/server/server.js +107 -14
- package/dist/server/src/lib/auto-yes-poller.js +49 -0
- package/dist/server/src/lib/auto-yes-state.js +64 -0
- package/dist/server/src/lib/db/chat-db.js +75 -1
- package/dist/server/src/lib/db/db-repository.js +66 -2
- package/dist/server/src/lib/db/db.js +13 -3
- package/dist/server/src/lib/db/migrations/index.js +6 -0
- package/dist/server/src/lib/db/migrations/runner.js +1 -1
- package/dist/server/src/lib/db/migrations/v53-worktree-aliases.js +53 -0
- package/dist/server/src/lib/db/migrations/v54-worktree-id-path-derived.js +204 -0
- package/dist/server/src/lib/db/migrations/v55-compact-churned-worktree-ids.js +207 -0
- package/dist/server/src/lib/db/migrations/worktree-id-rename.js +153 -0
- package/dist/server/src/lib/db/worktree-alias-db.js +155 -0
- package/dist/server/src/lib/db/worktree-db.js +53 -71
- package/dist/server/src/lib/detection/cli-patterns.js +86 -2
- package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +10 -1
- package/dist/server/src/lib/git/worktree-id.js +145 -0
- package/dist/server/src/lib/git/worktree-redirect.js +155 -0
- package/dist/server/src/lib/git/worktrees.js +173 -27
- package/dist/server/src/lib/logger.js +13 -1
- package/dist/server/src/lib/polling/auto-yes-manager.js +3 -1
- package/dist/server/src/lib/polling/auto-yes-suppression-state.js +54 -0
- package/dist/server/src/lib/polling/prompt-dedup.js +22 -0
- package/dist/server/src/lib/polling/response-checker.js +53 -13
- package/dist/server/src/lib/polling/response-dedup.js +22 -0
- package/dist/server/src/lib/polling/response-poller-core.js +107 -0
- package/dist/server/src/lib/polling/response-poller.js +4 -1
- package/dist/server/src/lib/response-extractor.js +22 -2
- package/dist/server/src/lib/session/claude-session.js +117 -35
- package/dist/server/src/lib/session/current-output-builder.js +16 -1
- package/dist/server/src/lib/session/session-start-error.js +125 -0
- package/dist/server/src/lib/session/worktree-session-reconcile.js +603 -0
- package/dist/server/src/lib/skills/install-apply.js +63 -23
- package/dist/server/src/lib/skills/operation-audit.js +5 -6
- package/dist/server/src/lib/skills/startup-reconcile.js +26 -5
- package/dist/server/src/lib/skills/updater.js +830 -0
- package/dist/server/src/lib/tasks/contract-parser.js +17 -1
- package/dist/server/src/lib/tasks/task-state-machine.js +23 -1
- package/dist/server/src/lib/tmux/control-mode-tmux-transport.js +7 -0
- package/dist/server/src/lib/tmux/read-mode.js +22 -2
- package/dist/server/src/lib/tmux/tmux-capture-cache.js +33 -0
- package/dist/server/src/lib/tmux/tmux-control-client.js +12 -0
- package/dist/server/src/lib/tmux/tmux-control-registry.js +55 -11
- package/dist/server/src/lib/tmux/tmux.js +61 -0
- package/dist/server/src/lib/ws-server.js +104 -1
- package/package.json +1 -1
- package/.next/server/chunks/1117.js +0 -1
- package/.next/server/chunks/1356.js +0 -4
- package/.next/server/chunks/1692.js +0 -1
- package/.next/server/chunks/3042.js +0 -1
- package/.next/server/chunks/4018.js +0 -1
- package/.next/server/chunks/4390.js +0 -1
- package/.next/server/chunks/4440.js +0 -2
- package/.next/server/chunks/4548.js +0 -1
- package/.next/server/chunks/5793.js +0 -1
- package/.next/server/chunks/8681.js +0 -1
- package/.next/static/chunks/2751-7fabd91275b14ca3.js +0 -1
- package/.next/static/chunks/744-d5e47fe16e7b9e06.js +0 -1
- package/.next/static/chunks/app/api/app/update/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/app/update-check/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/assistant/conversation/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/assistant/current-output/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/assistant/messages/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/assistant/session/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/assistant/start/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/assistant/terminal/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/assistant/tools/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/fs/browse/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/fs/recent-paths/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/hooks/agent-event/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/metrics/vibe/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/validate-path/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/skills/[id]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/skills/installations/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/skills/operations/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/skills/reindex/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/skills/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/templates/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/todos/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/repositories/page-1ed1e5a542ecc168.js +0 -1
- package/.next/static/chunks/app/skills/[skillId]/page-6008b904225ebb25.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-f6e09d25cd3b56f9.js +0 -1
- /package/.next/static/{-E7I667pJDTBamyG8M_Z- → _AR-TSCnEog5nL9JjjCna}/_buildManifest.js +0 -0
- /package/.next/static/{-E7I667pJDTBamyG8M_Z- → _AR-TSCnEog5nL9JjjCna}/_ssgManifest.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
exports.id=5959,exports.ids=[1296,5959,9358],exports.modules={60:(a,b,c)=>{"use strict";c.d(b,{Q:()=>f,b:()=>e});var d=c(26283);function e(a){return d.Md.test(a)&&!d.kD.test(a)}function f(a,b,c,d,e){if(a=Math.max(0,a),"opencode"===d||"copilot"===d){let a=e(b);return a>=0?a+1:0}if("antigravity"===d){let c=e(b);return c>=0?c+1:Math.max(0,a)}if(a>=b||c){let a=e(40);return a>=0?a+1:0}if("codex"===d)return Math.max(0,a);if(a>=b-5){let a=e(50);return a>=0?a+1:Math.max(0,b-40)}return Math.max(0,a)}},3523:(a,b,c)=>{"use strict";c.d(b,{z$:()=>B,zX:()=>C});var d=c(31766),e=c(88807),f=c(56791),g=c(69297),h=c(25129),i=c(18778),j=c(15194),k=c(8988),l=c(26283),m=c(72626),n=c(46423),o=c(60),p=c(82450),q=c(56263),r=c(13033),s=c(72457),t=c(71080),u=c(45146),v=c(63865),w=c(2924);let x=(0,m.h)("response-poller");function y(a){return{response:"",isComplete:!1,lineCount:a}}function z(a,b,c,d,e,f,g){let h=(0,o.Q)(b,c,d,e,f),i=a.slice(h);return{response:(0,l.aJ)(i.join("\n")),isComplete:!0,lineCount:c,promptDetection:g,bufferReset:d}}function A(a,b){let c=(0,l.KO)(b);return(0,h.gF)((0,l._A)((0,l.aJ)(a)),c)}function B(a,b,c){let d=a.split("\n"),e=d.length;for(;e>0&&""===d[e-1].trim();)e--;let f=d.slice(0,e),g=f.length,h="claude"===c?(0,l.GT)(f):-1,i=h>=0?h:g,j=g>0&&b>25&&g+25<b,k=g>0&&b>50&&g<50,m=j||k;if(!m&&g<b-5)return null;let p=Math.max(0,g-20),q=f.slice(p),r="opencode"===c?(0,l.aJ)(f.join("\n")):q.join("\n"),{promptPattern:s,separatorPattern:t,thinkingPattern:v,skipPatterns:w}=(0,l._X)(c),x=(a=60)=>{let b;if("codex"===c)b=/^›\s+(?!Implement|Find and fix|Type|Summarize)/;else if("opencode"===c){let b=0;for(let c=g-1;c>=Math.max(0,g-a);c--){let a=(0,l.aJ)(f[c]);if(l.Md.test(a)&&2==++b)return c}return -1}else b=/^[>❯]\s+\S/;for(let c=i-1;c>=Math.max(0,i-a);c--){let a=(0,l.aJ)(f[c]);if(b.test(a))return c}return -1};if("claude"===c||"codex"===c||"copilot"===c){let a=A(f.join("\n"),c);if(a.isPrompt)return z(f,b,g,m,c,x,a)}let B=(0,l.aJ)(r),C=s.test(B),D=t.test(B),E=v.test(B),F=("codex"===c||"gemini"===c||"vibe-local"===c||"copilot"===c||"antigravity"===c)&&C&&!E,G="claude"===c&&C&&D&&!E,H="opencode"===c&&(0,o.b)(B);if(F||G||H){let a=[],d=(0,o.Q)(b,g,m,c,x),e=g;for(let b=d;b<i;b++){let d=f[b],g=(0,l.aJ)(d);if("codex"===c&&/^›\s+/.test(g)||"gemini"===c&&/^(%|\$|.*@.*[%$#])\s*$/.test(g)||"antigravity"===c&&/^>\s*$/.test(g)||"opencode"===c&&(l.sy.test(g)||l.uA.test(g))){e=b;break}w.some(a=>a.test(g))||a.push(d)}let h=a.join("\n").trim(),j=h.split("\n").slice(-n.$).join("\n");if(v.test(j))return y(g);if("claude"===c){let a=(0,l.aJ)(h),b=/[╭╮╰╯│]/.test(a)||/░{3,}/.test(a)||/▓{3,}/.test(a),c=/Claude Code|claude\/|v\d+\.\d+/.test(a),d=/Tip:|for shortcuts|\?\s*for help/.test(a),e=/^\s*\/Users\/.*$/m.test(a)&&a.split("\n").length<30,f=a.match(/^[>❯]\s+(\S.*)$/m);if(f){let b=a.indexOf(f[0]);if(0===a.substring(b+f[0].length).trim().split("\n").filter(a=>{let b=a.trim();return b&&!w.some(a=>a.test(b))&&!/^─+$/.test(b)}).length)return y(g)}else if((b||c||d||e)&&h.length<2e3)return y(g)}if("gemini"===c&&((h.match(/[░███]/g)||[]).length>.3*h.length||u.SI.some(a=>h.includes(a))||!h.includes("✦")&&h.length<10))return y(g);if("opencode"===c){let a=(0,l.aJ)(h);if((a.length<50||!l.Md.test(B))&&0===a.split("\n").filter(a=>{let b=a.trim();return b&&!l.sx.some(a=>a.test(b))}).length)return y(g)}return{response:h,isComplete:!0,lineCount:e,bufferReset:m}}if("opencode"!==c){let a=A(f.join("\n"),c);if(a.isPrompt)return z(f,b,g,m,c,x,a)}let I=[],J=m||b>=g-5,K=J?x(80):-1,L=J?K>=0?K+1:Math.max(0,g-80):Math.max(0,b);for(let a=L;a<Math.min(g,i);a++){let b=f[a],c=(0,l.aJ)(b);w.some(a=>a.test(c))||I.push(b)}let M=I.join("\n").trim();return M?{response:M,isComplete:!1,lineCount:g}:y(g)}async function C(a,b,c){let h=(0,e.getDbInstance)(),m=c??b;try{let e=(0,f.Uim)(h,a);if(!e)return x.error("worktree-worktreeid-not"),(0,u.Et)(a,b,c),!1;if(!await (0,d.K1)(a,b,c))return x.info("session-not-running"),(0,u.Et)(a,b,c),!1;let o=(0,f.y1O)(h,a,m),y=o?.lastCapturedLine||0,z=await (0,d.Wh)(a,b,1e4,c);if("opencode"===b||"copilot"===b){let d=(0,u.MN)(a,b,c);(0,r.IZ)(d,z,b)}let C=B(z,y,b);if(!C||!C.isComplete){let{thinkingPattern:c}=(0,l._X)(b),d=(0,l.aJ)(z).split("\n").slice(-n.$).join("\n");return c.test(d)&&(0,f.PLg)(h,a,b,m)>0&&x.info("marked-answeredcount-pending"),!1}let D="opencode"===b||"copilot"===b,E=!(0,j.VA)(b);if(E&&!C.bufferReset&&C.lineCount===y&&!o?.inProgressMessageId)return!1;if(E&&!C.bufferReset&&C.lineCount<=y)return x.info("already-saved-up-to-line-lastcapturedlin"),!1;let F=C.promptDetection??A(C.response,b);if(F.isPrompt){let d=F.rawContent||F.cleanContent,i=(0,u.MN)(a,b,c),j=(0,s.zm)(d,b);if((0,s.gv)(i,j))return x.info("duplicate-prompt-skipped",{worktreeId:a,cliToolId:b}),!1;let k=d;"copilot"===b&&(k=(0,p.LH)(d),k=(0,p.Sj)(k,q.Rf,q.ky)),(0,f.YXK)(h,a,b,m);let l=(0,f.oHS)(h,{worktreeId:a,role:"assistant",content:k,messageType:"prompt",promptData:F.promptData,timestamp:new Date,cliToolId:b,instanceId:m});return(0,f.PPx)(h,a,b,C.lineCount,m),(0,g.Lo)("message",{worktreeId:a,message:l}),(0,w.r)(h,a,b,m,"prompt_detected",{promptType:F.promptData?.type}),(0,v.J$)({worktreeId:a,worktreeName:e.name,kind:"prompt",agentName:m,excerpt:F.promptData?.question??k}).catch(()=>{}),D||(0,u.Et)(a,b,c),!0}if(!C.response||""===C.response.trim())return(0,f.PPx)(h,a,b,C.lineCount,m),!1;let G="claude"===b?(0,k.R)(C.response):void 0,H=C.response;if("gemini"===b)H=(0,p.IS)(C.response);else if("claude"===b)H=(0,p.NN)(C.response);else if("copilot"===b){let d=(0,u.MN)(a,b,c),e=(0,r.Uz)(d)||C.response;H=(0,p.LH)(e),H=(0,p.Sj)(H,q.Rf,q.ky),(0,r.q1)(d)}else if("opencode"===b){H=(0,p.aW)(C.response);let d=(0,u.MN)(a,b,c);(0,r.q1)(d)}if(!H||""===H.trim()||"[No content]"===H)return(0,f.PPx)(h,a,b,C.lineCount,m),(0,f.YXK)(h,a,b,m),!1;if((0,j.VA)(b)){let d=(0,u.MN)(a,b,c);if((0,t.j)(d,H))return(0,f.PPx)(h,a,b,C.lineCount,m),!1}H&&await (0,i.T)(h,a,H,b),(0,f.PLg)(h,a,b,m)>0&&x.info("marked-answeredcount-pending");let I=(0,f.y1O)(h,a,m);if(E&&I&&C.lineCount<=I.lastCapturedLine)return x.info("race-condition-detected-skipping-save-re"),!1;let J=(0,f.oHS)(h,{worktreeId:a,role:"assistant",content:H,messageType:"normal",timestamp:new Date,cliToolId:b,instanceId:m,summary:G?.summary,logFileName:G?.logFileName,requestId:G?.requestId});return(0,g.Lo)("message",{worktreeId:a,message:J}),(0,v.J$)({worktreeId:a,worktreeName:e.name,kind:"completion",agentName:m,excerpt:H}).catch(()=>{}),(0,f.PPx)(h,a,b,C.lineCount,m),D&&(0,u.Et)(a,b,c),!0}catch(a){return x.error("response:check-failed",{error:a instanceof Error?a.message:String(a)}),!1}}},7015:(a,b,c)=>{"use strict";c.d(b,{Ds:()=>g});var d=c(81719);class e{constructor(a,b=3e4){this.cache=new Map,this.allAppsCache=null,this.lastRefresh=0,this.db=a,this.ttl=b}getTTL(){return this.ttl}isStale(){return Date.now()-this.lastRefresh>this.ttl}async refresh(){let a=(0,d.$i)(this.db);for(let b of(this.cache.clear(),a))this.cache.set(b.pathPrefix,b);this.allAppsCache=a,this.lastRefresh=Date.now()}async getByPathPrefix(a){return this.isStale()&&await this.refresh(),this.cache.get(a)??null}async getAll(){return this.isStale()&&await this.refresh(),this.allAppsCache??[]}invalidate(){this.cache.clear(),this.allAppsCache=null,this.lastRefresh=0}invalidateByIssueNo(a){this.invalidate()}}let f=null;function g(a){if(!f){if(!a)throw Error("Database instance required to initialize cache");f=new e(a)}return f}},8988:(a,b,c)=>{"use strict";c.d(b,{R:()=>g});let d=/📄 Session log: (.+?\/([^\/\s]+\.jsonl))/,e=/Request ID: ([^\s\n]+)/,f=/Summary: (.+?)(?:\n─|$)/s;function g(a){let b={content:a},c=d.exec(a);c&&(b.logFileName=c[2]);let g=e.exec(a);g&&(b.requestId=g[1]);let h=f.exec(a);return h&&(b.summary=h[1].trim()),b}},11508:(a,b,c)=>{"use strict";c.d(b,{H:()=>m,m:()=>n});var d=c(44265),e=c(11665),f=c(40236),g=c(93997),h=c(26283),i=c(72626),j=c(20610);let k=(0,i.h)("cli-tools/gemini");function l(a){return a instanceof Error?a.message:String(a)}let m=200;class n extends d.M{async isRunning(a,b){let c=this.getSessionName(a,b);return await (0,e.N)(c)}async startSession(a,b,c){if(!await this.isInstalled())throw Error("Gemini CLI is not installed or not in PATH");let d=this.getSessionName(a,c);if(await (0,e.N)(d)){await this.reconcileExistingSession(d),k.info("gemini-session-sessionname");return}try{await (0,e.jw)({sessionName:d,workingDirectory:b}),await new Promise(a=>setTimeout(a,j.Uc)),await (0,e.V1)(d,"gemini",!0),await new Promise(a=>setTimeout(a,6e3)),await this.waitForReady(d),k.info("started-gemini-session:sessionname")}catch(b){let a=l(b);throw Error(`Failed to start Gemini session: ${a}`)}}async waitForReady(a){let b=!1;for(let c=0;c<30;c++){try{let c=await (0,e.Xg)(a,m),d=(0,h.aJ)(c);if(h.wN.test(d))return void k.info("gemini-prompt-detected");!b&&d.includes("Do you trust this folder?")&&(await (0,e.ds)(a,"Enter"),b=!0,k.info("auto-trusted-folder-for"))}catch{}await new Promise(a=>setTimeout(a,1e3))}k.info("gemini-prompt-detection")}async waitForPrompt(a){let b=Date.now();for(;Date.now()-b<15e3;){try{let b=await (0,e.Xg)(a,m),c=(0,h.aJ)(b);if(h.wN.test(c))return}catch{}await new Promise(a=>setTimeout(a,500))}k.info("gemini-prompt-not")}async sendMessage(a,b,c){let d=this.getSessionName(a,c);if(!await (0,e.N)(d))throw Error(`Gemini session ${d} does not exist. Start the session first.`);try{await this.waitForPrompt(d),await (0,f.FW)({sessionName:d,message:b,cliToolId:"gemini"}),(0,g.gm)(d),k.info("sent-message-to-gemini-session:sessionna")}catch(b){let a=l(b);throw Error(`Failed to send message to Gemini: ${a}`)}}async killSession(a,b){let c=this.getSessionName(a,b);try{await (0,e.N)(c)&&(await (0,e.ds)(c,"C-c"),await new Promise(a=>setTimeout(a,j.Is)),await (0,e.V1)(c,"/quit",!0),await new Promise(a=>setTimeout(a,j.Zf))),await (0,e.fY)(c)&&k.info("stopped-gemini-session:sessionname")}catch(a){throw k.error("session:stop-failed",{error:l(a)}),a}}constructor(...a){super(...a),this.id="gemini",this.name="Gemini CLI",this.command="gemini"}}},11665:(a,b,c)=>{"use strict";c.d(b,{Ce:()=>w,GW:()=>n,KB:()=>r,N:()=>m,N6:()=>y,Sb:()=>z,V1:()=>p,Xg:()=>s,ds:()=>v,fY:()=>t,jw:()=>o,lA:()=>k,zT:()=>l});var d=c(79646),e=c(28354),f=c(93997),g=c(16983),h=c(72626);let i=(0,e.promisify)(d.execFile),j=(0,h.h)("tmux");function k(a){return`=${a}:`}async function l(a,b={}){let c,d,e,f=b.windowWidth??g.Jn,h=b.windowHeight??g.sO,m=k(a);try{c=(await i("tmux",["show-window-options","-v","-t",m,"window-size"],{timeout:5e3})).stdout.trim();let[a,b]=(await i("tmux",["display-message","-p","-t",m,"#{window_width}|#{window_height}"],{timeout:5e3})).stdout.trim().split("|").map(Number);Number.isFinite(a)&&(d=a),Number.isFinite(b)&&(e=b)}catch{}let n="manual"===c,o=d===f&&e===h;if(n&&o)return!1;try{return n||await i("tmux",["set-window-option","-t",m,"window-size","manual"],{timeout:5e3}),o||await i("tmux",["resize-window","-t",m,"-x",String(f),"-y",String(h)],{timeout:5e3}),!0}catch(b){return j.warn("session-geometry:reconcile-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)}),!1}}async function m(a){try{return await i("tmux",["has-session","-t",k(a)],{timeout:5e3}),!0}catch{return!1}}async function n(){try{let{stdout:a}=await i("tmux",["list-sessions","-F","#{session_name}|#{session_windows}|#{session_attached}"],{timeout:5e3});if(!a||""===a.trim())return[];return a.trim().split("\n").map(a=>{let[b,c,d]=a.split("|");return{name:b,windows:parseInt(c,10)||0,attached:"1"===d}})}catch{return[]}}async function o(a,b){let c,d,e,f,h;"string"==typeof a?(c=a,d=b,e=g.eu,f=g.Jn,h=g.sO):(c=a.sessionName,d=a.workingDirectory,e=a.historyLimit||g.eu,f=a.windowWidth||g.Jn,h=a.windowHeight||g.sO);try{await i("tmux",["new-session","-d","-s",c,"-c",d,"-x",String(f),"-y",String(h)],{timeout:5e3}),await i("tmux",["set-option","-t",k(c),"history-limit",String(e)],{timeout:5e3});try{await i("tmux",["new-window","-k","-t",`${k(c)}0`,"-c",d],{timeout:5e3})}catch(a){j.warn("session-history-limit:window-rebuild-failed",{sessionName:c,historyLimit:e,error:a instanceof Error?a.message:String(a)})}await l(c,{windowWidth:f,windowHeight:h})}catch(b){let a=b instanceof Error?b.message:String(b);throw Error(`Failed to create tmux session: ${a}`)}}async function p(a,b,c=!0){let d=c?["send-keys","-t",k(a),b,"C-m"]:["send-keys","-t",k(a),b];try{await i("tmux",d,{timeout:5e3})}catch(b){let a=b instanceof Error?b.message:String(b);throw Error(`Failed to send keys to tmux session: ${a}`)}}let q=new Set(["Up","Down","Left","Right","Enter","Space","Tab","Escape","BSpace","DC","PageUp","PageDown","Home","End","q"]);async function r(a,b){if(0!==b.length){for(let a of b)if(!q.has(a))throw Error(`Invalid special key: ${a}`);try{for(let c=0;c<b.length;c++)await i("tmux",["send-keys","-t",k(a),b[c]],{timeout:5e3}),c<b.length-1&&await new Promise(a=>setTimeout(a,100))}catch(b){let a=b instanceof Error?b.message:String(b);throw Error(`Failed to send special keys to tmux session: ${a}`)}}}async function s(a,b){let c,d;"number"==typeof b?(c=-b,d="-"):b?(c=b.startLine??-1e4,d=b.endLine??"-"):(c=-1e3,d="-");try{let{stdout:b}=await i("tmux",["capture-pane","-t",k(a),"-p","-e","-S",String(c),"-E",String(d)],{timeout:5e3,maxBuffer:0xa00000});return b}catch(b){let a=b instanceof Error?b.message:String(b);throw Error(`Failed to capture pane: ${a}`)}}async function t(a){try{return await i("tmux",["kill-session","-t",k(a)],{timeout:5e3}),!0}catch(b){let a=b instanceof Error?b.message:String(b);if(a?.includes("no server running")||a?.includes("can't find session"))return!1;throw Error(`Failed to kill tmux session: ${a}`)}}let u=new Set(["Escape","C-c","C-d","C-m","Enter"]);async function v(a,b){if(!u.has(b))throw Error(`Invalid special key: ${b}`);try{await i("tmux",["send-keys","-t",k(a),b],{timeout:5e3})}catch(b){let a=b instanceof Error?b.message:String(b);throw Error(`Failed to send special key: ${a}`)}}async function w(a){try{await i("tmux",["send-keys","-t",k(a),"C-u"],{timeout:5e3})}catch(b){let a=b instanceof Error?b.message:String(b);throw Error(`Failed to clear tmux input line: ${a}`)}}let x=["Up","Down","Left","Right","Enter","Escape","Tab","BTab","PageUp","PageDown","Home","End","q"];function y(a){return x.includes(a)}async function z(a,b){await r(a,b),(0,f.gm)(a)}},13033:(a,b,c)=>{"use strict";c.d(b,{IW:()=>h,IZ:()=>l,K0:()=>g,Uz:()=>m,l1:()=>f,o0:()=>i,q1:()=>n,tb:()=>k,vQ:()=>j});var d=c(26283);let e=new Map;function f(a){return(0,d._A)((0,d.aJ)(a)).replace(/^\u2503\s?/,"").replace(/\s*\u2503$/,"").trim()}function g(a){let b=a.split("\n"),c=[];for(let a of b){let b=f(a);!(!b||d.sx.some(a=>a.test(b)))&&(d.Md.test(b)||c.push(b))}return c}function h(a){return a.replace(/[\u2500-\u257F]/g,"").replace(/\s{2,}/g," ").trim()}function i(a){let b=(0,d.aJ)(a).split("\n"),c=[];for(let a of b){let b=h(a);b&&(d.J7.some(a=>a.test(b))||c.push(b))}return c}function j(a,b){if(0===a.length||0===b.length)return 0;let c=Math.min(a.length,b.length);for(let d=c;d>=1;d--){let c=a.slice(-d),e=b.slice(0,d),f=!0;for(let a=0;a<d;a++)if(c[a]!==e[a]){f=!1;break}if(f)return d}return 0}function k(a){e.set(a,{lines:[],lastFingerprint:[],pollCount:0})}function l(a,b,c="opencode"){let d=e.get(a);if(!d)return;let f="copilot"===c?i(b):g(b);if(0!==f.length){if(d.pollCount++,0===d.lines.length)d.lines=[...f];else{let a=j(d.lastFingerprint,f);if(a>0){let b=f.slice(a);d.lines.push(...b)}else d.lines.push(...f)}d.lastFingerprint=f.slice(-10)}}function m(a){let b=e.get(a);return b&&0!==b.lines.length?b.lines.join("\n"):""}function n(a){e.delete(a)}},18778:(a,b,c)=>{"use strict";c.d(b,{T:()=>g});var d=c(56791),e=c(41364);let f=(0,c(72626).h)("conversation-logger");async function g(a,b,c,h="claude"){let i=(0,d.r8U)(a,b);if(i)try{await (0,e.hM)(b,i.content,c,h)}catch(a){f.error("conversation:log-failed",{error:a instanceof Error?a.message:String(a)})}}},18896:(a,b,c)=>{"use strict";c.d(b,{v7:()=>d.v7,LP:()=>d.LP,pL:()=>d.pL,GE:()=>d.GE,aq:()=>d.aq,kC:()=>d.kC,xU:()=>w,bZ:()=>x,W8:()=>d.W8,W5:()=>D,_i:()=>E,_C:()=>F});var d=c(24455),e=c(31766),f=c(25129),g=c(68901),h=c(56791),i=c(88807),j=c(72626);let k=(0,j.h)("auto-yes-policy"),l=new Map;var m=c(2924),n=c(63869),o=c(31268),p=c(26283),q=c(77093),r=c(93997),s=c(66007);let t=(0,j.h)("auto-yes-poller"),u=globalThis.__autoYesPollerStates??(globalThis.__autoYesPollerStates=new Map);function v(a){return u.get(a)}function w(a){let b=v(a);return b?.lastServerResponseTimestamp??null}function x(a){return u.has(a)}function y(a){let b=v(a);if(b&&(b.consecutiveErrors++,b.currentInterval=(0,d.G)(b.consecutiveErrors),b.consecutiveErrors>=g.ul)){let b=(0,d.Ue)(a),c=(0,d.pL)(a);c&&(0,d.XK)(b,c,"consecutive_errors",(0,d.GE)(a)??void 0),E(a)}}async function z(a,b,c,d){let f=c??g.FW,h=await (0,e.Wh)(a,b,f,d);return(0,p._A)((0,p.aJ)(h))}async function A(a,b,e,j,q,s){let u=(0,d.v7)(a,e,s);try{let y=(0,p.KO)(e),z=(0,f.gF)(j,{...y,...q&&{precomputedLines:q}});if(!z.isPrompt||!z.promptData)return b.lastAnsweredPromptKey=null,b.lastAnsweredAt=null,"no_prompt";let A=(w=z.promptData,`${w.type}:${w.question}`);if(b.lastAnsweredPromptKey===A&&null!==b.lastAnsweredAt&&Date.now()-b.lastAnsweredAt<d.UL)return"duplicate";let B=function(a,b,c){let e=c??b,f=(0,d.v7)(a,b,e),g=Date.now(),j=l.get(f);if(j&&j.expiresAt>g)return j.policy;let m=function(a,b,c){try{let d=(0,h.MHq)((0,i.getDbInstance)(),a,b,c);if(!d)return null;return d.contract.autoYes}catch(d){return k.warn("policy-lookup-failed",{worktreeId:a,cliToolId:b,instanceId:c,error:d instanceof Error?d.message:String(d)}),null}}(a,b,e);return l.size>=200&&function(a){for(let[b,c]of l.entries())c.expiresAt<=a&&l.delete(b)}(g),l.set(f,{policy:m,expiresAt:g+5e3}),m}(a,e,s),C=function(a,b){let c=function(a){if("yes_no"===a.type)return"y";if("multiple_choice"===a.type){let b=a.options.find(a=>a.isDefault)??a.options[0];return!b||b.requiresTextInput?null:b.number.toString()}return null}(a);if(null===c)return{answer:null,suppressedBy:null};let d=function(a,b){if(!b)return null;if("off"===b.mode)return{reason:"mode-off"};let c=function(a,b){if(0===b.length)return{outcome:"no-match"};let c=function(a){let b=[a.question];if(a.instructionText&&b.push(a.instructionText),"multiple_choice"===a.type)for(let c of a.options)b.push(c.label);else b.push(...a.options);return b.map(a=>a.length>2e4?a.slice(0,2e4):a)}(a);for(let a of b){if(a.length>200||!(0,g.P0)(a).valid)return{outcome:"unusable",pattern:a};let b=new RegExp(a);for(let d of c){let c=(0,g.eJ)(b,d);if(null===c)return{outcome:"unusable",pattern:a};if(c)return{outcome:"match",pattern:a}}}return{outcome:"no-match"}}(a,b.denyPatterns);return"match"===c.outcome?{reason:"deny-pattern",pattern:c.pattern}:"unusable"===c.outcome?{reason:"deny-pattern-unusable",pattern:c.pattern}:"safe"===b.mode?"yes_no"===a.type?null:{reason:"type-not-allowed"}:"allow-listed"===b.mode?b.allowPromptTypes.includes(a.type)?null:{reason:"type-not-allowed"}:null}(a,b);return d?{answer:null,suppressedBy:d.reason,pattern:d.pattern}:{answer:c,suppressedBy:null}}(z.promptData,B);C.suppressedBy&&t.warn("poller:auto-yes-suppressed-by-policy",{worktreeId:a,cliToolId:e,instanceId:s,reason:C.suppressedBy,mode:B?.mode??null,pattern:C.pattern,promptType:z.promptData.type});let D=C.answer;if(null===D)return"no_answer";let E=o.s.getInstance().getTool(e).getSessionName(a,s);try{await (0,n.t)({sessionName:E,answer:D,cliToolId:e,promptData:z.promptData})}finally{(0,r.gm)(E)}var w,x=Date.now();let F=v(u);F&&(F.lastServerResponseTimestamp=x);let G=v(u);G&&(G.consecutiveErrors=0,G.currentInterval=d.ps),b.lastAnsweredPromptKey=A,b.lastAnsweredAt=Date.now(),t.info("poller:response-sent",{worktreeId:a,cliToolId:e,instanceId:s}),(0,m.r)((0,i.getDbInstance)(),a,e,s??e,"prompt_answered_auto",{promptType:z.promptData.type});let[{startPolling:H},{broadcastTerminalSnapshotAfterInteraction:I}]=await Promise.all([Promise.resolve().then(c.bind(c,95220)),Promise.resolve().then(c.bind(c,99508))]);return H(a,e,s),I(a,e,s),"responded"}catch{return y(u),t.warn("poller:detect-respond-error",{worktreeId:a,cliToolId:e,instanceId:s}),"error"}}async function B(a,b,c){let e=(0,d.v7)(a,b,c),f=v(e);if("valid"===function(a,b){if(!b)return"stopped";let c=(0,d.Ue)(a),e=(0,d.pL)(a);if(!e)return E(a),"expired";let f=(0,d.GE)(a)??void 0,g=(0,d.aq)(c,e,f);return g?.enabled?"valid":(E(a),"expired")}(e,f)){try{let h=(0,d.aq)(a,b,c),i=h?.stopPattern?g.FW:g.Ke,j=await z(a,b,i,c),k=j.split("\n");if(function(a,b,c){if(b.stopCheckBaselineLength<0)return b.stopCheckBaselineLength=c.length,!1;let e=b.stopCheckBaselineLength;if(c.length>e){let f=c.substring(e);return b.stopCheckBaselineLength=c.length,(0,d.Cs)(a,f,E)}return c.length<e&&(b.stopCheckBaselineLength=c.length),!1}(e,f,j))return;let l=await A(a,f,b,j,k,c);if("responded"===l)return void C(a,b,c,d.ZO);if("no_prompt"===l){let e=k.slice(-d.Re).join("\n");if((0,p.ut)(b,e))return void C(a,b,c,g.QN)}}catch(d){y(e),t.warn("poller:poll-error",{worktreeId:a,cliToolId:b,instanceId:c,error:(0,q.u1)(d)})}C(a,b,c)}}function C(a,b,c,e){let f=v((0,d.v7)(a,b,c));if(!f)return;let g=Math.max(e??f.currentInterval,d.ps);f.timerId=setTimeout(()=>{B(a,b,c)},g)}function D(a,b,c){if(!(0,s.h6)(a))return{started:!1,reason:"invalid worktree ID"};let e=c??b,f=(0,d.aq)(a,b,e);if(!f?.enabled)return{started:!1,reason:"auto-yes not enabled"};let g=(0,d.v7)(a,b,e),h=v(g);if(!h&&u.size>=d.fC)return{started:!1,reason:"max concurrent pollers reached"};if(h&&h.cliToolId===b)return{started:!0,reason:"already_running"};h&&E(g);let i={timerId:null,cliToolId:b,instanceId:e,consecutiveErrors:0,currentInterval:d.ps,lastServerResponseTimestamp:null,lastAnsweredPromptKey:null,lastAnsweredAt:null,stopCheckBaselineLength:-1};return u.set(g,i),l.delete(g),i.timerId=setTimeout(()=>{B(a,b,e)},d.ps),t.info("poller:started",{worktreeId:a,cliToolId:b,instanceId:e}),{started:!0}}function E(a){let b=v(a);b&&(b.timerId&&clearTimeout(b.timerId),u.delete(a),l.delete(a),t.info("poller:stopped",{compositeKey:a}))}function F(a){(0,d._9)(Array.from(u.keys()),a).forEach(a=>E(a))}},20610:(a,b,c)=>{"use strict";c.d(b,{CV:()=>i,Em:()=>l,Is:()=>g,KI:()=>j,PY:()=>k,Uc:()=>d,Zf:()=>h,pL:()=>e,x9:()=>f});let d=100,e=100,f=200,g=300,h=500,i=500,j=2e3,k=200,l=100},21684:(a,b,c)=>{"use strict";c.d(b,{U:()=>g});var d=c(33873),e=c.n(d),f=c(87447);function g(){return(0,f._p)("CM_LOG_DIR")||e().join(process.cwd(),"data","logs")}},25129:(a,b,c)=>{"use strict";c.d(b,{gF:()=>B,xn:()=>v});var d=c(72626),e=c(68652),f=c(26283);let g=/^\s*[\u276F\u25CF\u203A][^\d]*(\d+)(?:\.(?!\d)|\s{2,})\s*(.+)$/,h=/^\s*[^\d]{0,3}(\d+)(?:\.(?!\d)|\s+)\s*(.+)$/,i=/^[-─]+$/,j=/^\s*\[[^\]]*\d+\s+lines?\]/i,k=/^\s*[…]?\s*[+\-↑↓⏵⏷]?\s*\d+\s+(?:pending|more)\b/i,l=/Esc\s+to\s+cancel\s*[·•]\s*Tab\s+to\s+amend/i,m=/Enter\s+to\s+select\b.*\bnavigate\b/i,n=/press\s+(?:enter|number)\s+to\s+confirm/i,o=/press\s+number\s+to\s+confirm/i,p=/(?:select|choose|pick|which|what|how|where|enter|type|specify|confirm|approve|accept|reject|decide|preference|option)/i,q=[/type\s+here/i,/tell\s+(me|claude)/i,/enter\s+/i,/custom/i,/differently/i];function r(a,b){if(0===b.length)return!0;let c=b[0].number;return a<c&&a>=c-2}function s(a){return{isPrompt:!1,cleanContent:a.trim()}}function t(a){return 0!==a.length&&!!(a.includes("?")||a.includes("?")||p.test(a))}function u(a,b){let c=b.endsWith("?")||b.endsWith("?");return!!(!c&&/^\s{2,}[^\d]/.test(a)&&!/^\s*\d+\./.test(a)||!c&&/^\s{4,}/.test(a)&&!/^\s*\d+\.\s/.test(a)||b.length<5&&!c||/^[\/~]/.test(b)||b.length>=2&&/^[a-zA-Z0-9_-]+$/.test(b))}function v(a,b="yes_no"){let c=a.toLowerCase().trim();if("multiple_choice"===b){if(/^\d+$/.test(c))return c;throw Error("Invalid answer for multiple choice prompt. Expected a number.")}if("yes"===c||"y"===c)return"y";if("no"===c||"n"===c)return"n";throw Error("Invalid answer for yes/no prompt. Expected 'yes', 'no', 'y', or 'n'.")}let w=(0,d.h)("prompt-detector"),x=null;function y(a){let b=a.split("\n"),c=(b.length>200?b.slice(-200):b).join("\n");return c.length>5e3&&(c=c.slice(-5e3)),c}let z=[{regex:/^(.+)\s+\(y\/n\)\s*$/m},{regex:/^(.+)\s+\[y\/N\]\s*$/m,defaultOption:"no"},{regex:/^(.+)\s+\[Y\/n\]\s*$/m,defaultOption:"yes"},{regex:/^(.+)\s+\(yes\/no\)\s*$/m}];function A(a,b,c,d){return{isPrompt:!0,promptData:{type:"yes_no",question:a,options:["yes","no"],status:"pending",...void 0!==d&&{defaultOption:d},instructionText:c},cleanContent:b,rawContent:c}}function B(a,b){let c=(0,e.N)(a),d=c===a&&b?.precomputedLines?b.precomputedLines:c.split("\n"),p=d.slice(-50).join("\n"),v=p===x;v||w.debug("detectPrompt:start",{outputLength:c.length}),x=p;let B=d.slice(-20).join("\n"),C=function(a,b,c){var d,p;a=(0,e.N)(a);let v=b?.requireDefaultIndicator??!0,w=a.split("\n"),x=w.length;for(;x>0&&""===w[x-1].trim();)x--;let y=Math.max(0,x-50),z=!1;for(let a=x-1;a>=y;a--){let b=m.test(w[a]);if(l.test(w[a])||b){x=a,z=b;break}}let A=w.slice(y,x);for(let b of A)if(f.l8.test(b))return s(a);let B=!1,C=!1;for(let a of A){let b=a.trim();if(!B&&n.test(b)){B=!0,o.test(b)&&(C=!0);break}}if(v){let b=!1;for(let a of A){let c=a.trim();if(g.test(c)){b=!0;break}}if(!b&&!B)return s(a)}let D=[],E=-1,F=0;for(let b=x-1;b>=y;b--){let c=w[b].trim();if(j.test(c)||k.test(c)){F++;continue}let d=c.match(g);if(d){let a=parseInt(d[1],10);if(a<=20&&r(a,D)){let b=d[2].trim();D.unshift({number:a,label:b,isDefault:!0}),F=0;continue}}let e=c.match(h);if(e){let a=parseInt(e[1],10);if(a>20);else if(r(a,D)){let b=e[2].trim();D.unshift({number:a,label:b,isDefault:!1}),F=0;continue}}if(0===D.length&&(c.startsWith("❯")||c.startsWith("●")||c.startsWith("›")))return s(a);if(D.length>0&&c&&!i.test(c)){let a=w[b];if(/^\s{4,}/.test(a)&&u(a,c)){if(++F>25){E=b;break}continue}if(t(c)){E=b;break}if(u(a,c)){if(++F>(/^\s{4,}/.test(a)?25:5)){E=b;break}continue}E=b;break}}if(!function(a){if(0===a.length||1!==a[0])return!1;let b=0;for(let c=1;c<a.length;c++){let d=a[c]-a[c-1];if(d<1||d>2||(2===d&&b++,b>1))return!1}return!0}(D.map(a=>a.number)))return s(a);let G=D.some(a=>a.isDefault),H=v&&B;if(D.length<2||v&&!G&&!H||!v&&(-1===E||!t(w[E]?.trim()??"")&&!function(a,b,c,d){let e=Math.max(d,b-3);for(let c=b-1;c>=e;c--){let b=a[c]?.trim()??"";if(!(!b||i.test(b))&&t(b))return!0}return!1}(w,E,0,y)))return s(a);let I=function(a,b){if(b<0)return"Please select an option:";let c=[];for(let d=Math.max(0,b-5);d<=b;d++){let b=a[d].trim();b&&!i.test(b)&&c.push(b)}return c.join(" ")}(w,E),J=function(a,b,c){if(b<0)return;let d=Math.max(0,b-19),e=a.slice(d,c).map(a=>a.trimEnd()).join("\n").trim();return e.length>0?e:void 0}(w,E,x),K=B?C?"answer_only":"answer_then_enter":void 0;return d=a,p=z,{isPrompt:!0,promptData:{type:"multiple_choice",question:I.trim(),options:D.map(a=>{let b=q.some(b=>b.test(a.label));return{number:a.number,label:a.label,isDefault:a.isDefault,requiresTextInput:b}}),status:"pending",instructionText:J,...K?{submitMode:K}:{},...p?{isAskUserQuestion:!0}:{}},cleanContent:I.trim(),rawContent:c(d.trim())}}(c,b,y);if(C.isPrompt)return v||w.info("detectPrompt:multipleChoice",{isPrompt:!0,question:C.promptData?.question,optionsCount:C.promptData?.options?.length}),C;let D=B.trim();for(let a of z){let b=B.match(a.regex);if(b){let c=b[1].trim();return A(c,c,D,a.defaultOption)}}let E=B.match(/^(.*?)Approve\?\s*$/m);if(E){let a=E[1].trim();return A(a?`${a} Approve?`:"Approve?",a||"Approve?",D)}return v||w.debug("detectPrompt:complete",{isPrompt:!1}),{isPrompt:!1,cleanContent:c.trim()}}},25754:(a,b,c)=>{"use strict";c.d(b,{Xn:()=>e,d9:()=>g,gB:()=>f,rv:()=>h});let d=["en","ja"],e="en",f="locale";function g(a){return"string"==typeof a&&d.includes(a)}function h(a,b){return g(a)?a:d.find(a=>(b??"").includes(a))??e}},26838:(a,b,c)=>{"use strict";c.d(b,{Mj:()=>k,Sw:()=>j,lX:()=>l});var d=c(29021),e=c(33873),f=c(90164);let g=/^v?\d+\.\d+\.\d+$/,h=/^[a-zA-Z0-9.\-\s_v]+$/,i=globalThis.__versionCheckCache??(globalThis.__versionCheckCache={result:null,fetchedAt:0,rateLimitResetAt:null});function j(){return function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),"package.json"),"utf-8"),b=JSON.parse(a);if("commandmate"===b.name&&"string"==typeof b.version&&b.version.length>0)return b.version;return null}catch{return null}}()??"0.19.0"}function k(){return j()}async function l(){try{var a,b,c;if(null!==i.result&&Date.now()-i.fetchedAt<36e5||i.rateLimitResetAt&&(!(Date.now()>=i.rateLimitResetAt)||(i.rateLimitResetAt=null,0)))return i.result;let d=await fetch("https://api.github.com/repos/Kewton/CommandMate/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":`CommandMate/${k()}`},cache:"no-store",signal:AbortSignal.timeout(5e3)});if(403===d.status)return function(a){let b=a.headers.get("X-RateLimit-Reset");b?i.rateLimitResetAt=1e3*parseInt(b,10):i.rateLimitResetAt=Date.now()+36e5}(d),i.result;if(!d.ok)return i.result;let e=await d.json(),j=k(),l=e.tag_name.replace(/^v/,""),m={hasUpdate:function(a,b){if(!g.test(a)||!g.test(b))return!1;let c=a=>a.replace(/^v/,"").split(".").map(Number),[d,e,f]=c(a),[h,i,j]=c(b);return h!==d?h>d:i!==e?i>e:j>f}(j,e.tag_name),currentVersion:j,latestVersion:l,releaseUrl:(a=e.html_url).startsWith(f.Dk)?a:null,releaseName:(b=e.name,c=e.tag_name,h.test(b)&&b.length<=128?b:c),publishedAt:e.published_at};return i.result=m,i.fetchedAt=Date.now(),m}catch{return i.result}}},30618:(a,b,c)=>{"use strict";c.d(b,{xT:()=>w,Ui:()=>x});var d=c(44265),e=c(11665),f=c(40236),g=c(93997),h=c(29021),i=c(33873),j=c(72626);let k=(0,j.h)("cli-tools/opencode-config"),l=/^[a-zA-Z0-9._:/-]{1,100}$/,m=/^[a-zA-Z0-9._:/@-]{1,200}$/;async function n(){let a={};try{let b=new AbortController,c=setTimeout(()=>b.abort(),3e3),d=await fetch("http://localhost:11434/api/tags",{signal:b.signal}).finally(()=>{clearTimeout(c)});if(!d.ok)return k.warn("ollama-api-returned"),{};let e=await d.text();if(e.length>1048576)return k.warn("ollama-api-response"),{};let f=JSON.parse(e);if(!f||!Array.isArray(f.models))return k.warn("invalid-ollama-api"),{};for(let b of f.models.slice(0,100))"string"==typeof b?.name&&l.test(b.name)&&(a[b.name]={name:function(a){let b=String(a.name),c=a.details;if(!c)return b;let d=[b];return"string"==typeof c.parameter_size&&/^[\d.]+[BKMGT]?B?$/i.test(c.parameter_size)&&d.push(c.parameter_size),"string"==typeof c.quantization_level&&/^[A-Z0-9_]{1,20}$/i.test(c.quantization_level)&&d.push(c.quantization_level),d.length>1?`${b} (${d.slice(1).join(", ")})`:b}(b)})}catch(a){a instanceof Error&&"AbortError"===a.name?k.warn("ollama-api-timeout"):k.warn("failed-to-fetch")}return a}async function o(){let a={};try{let b=new AbortController,c=setTimeout(()=>b.abort(),3e3),d=await fetch("http://localhost:1234/v1/models",{signal:b.signal}).finally(()=>{clearTimeout(c)});if(!d.ok)return k.warn("lm-studio-api"),{};let e=await d.text();if(e.length>1048576)return k.warn("lm-studio-api"),{};let f=JSON.parse(e);if(!f||!Array.isArray(f.data))return k.warn("invalid-lm-studio"),{};for(let b of f.data.slice(0,100))"string"==typeof b?.id&&m.test(b.id)&&(a[b.id]={name:b.id})}catch(a){a instanceof Error&&"AbortError"===a.name?k.warn("lm-studio-api"):k.warn("failed-to-fetch")}return a}async function p(a){let b=function(a){let b=i.resolve(a);try{if(!h.lstatSync(b).isDirectory())throw Error(`Path is not a directory: ${b}`)}catch(a){if("ENOENT"===a.code)throw Error(`Path does not exist: ${b}`);throw a}return h.realpathSync(b)}(a),c=i.join(b,"opencode.json");if(h.existsSync(c))return;let[d,e]=await Promise.all([n(),o()]),f={};if(Object.keys(d).length>0&&(f.ollama={npm:"@ai-sdk/openai-compatible",name:"Ollama (local)",options:{baseURL:"http://localhost:11434/v1"},models:d}),Object.keys(e).length>0&&(f.lmstudio={npm:"@ai-sdk/openai-compatible",name:"LM Studio (local)",options:{baseURL:"http://localhost:1234/v1"},models:e}),0!==Object.keys(f).length)try{h.writeFileSync(c,JSON.stringify({$schema:"https://opencode.ai/config.json",provider:f},null,2),{encoding:"utf-8",flag:"wx"})}catch(a){if("EEXIST"===a.code)return;k.warn("failed-to-write-opencodejson:error-insta")}}var q=c(79646),r=c(28354),s=c(20610);let t=(0,j.h)("cli-tools/opencode"),u=(0,r.promisify)(q.execFile);function v(a){return a instanceof Error?a.message:String(a)}let w=200;class x extends d.M{async isRunning(a,b){let c=this.getSessionName(a,b);return await (0,e.N)(c)}async startSession(a,b,c){if(!await this.isInstalled())throw Error("OpenCode is not installed or not in PATH");let d=this.getSessionName(a,c);if(await (0,e.N)(d)){await this.reconcileExistingSession(d,{windowWidth:80,windowHeight:w}),t.info("opencode-session-sessionname");return}try{await p(b),await (0,e.jw)({sessionName:d,workingDirectory:b}),await new Promise(a=>setTimeout(a,s.Uc));try{await u("tmux",["resize-window","-t",(0,e.lA)(d),"-x","80","-y",String(w)])}catch{}await (0,e.V1)(d,"opencode",!0),await new Promise(a=>setTimeout(a,15e3)),t.info("started-opencode-session:sessionname")}catch(b){let a=v(b);throw Error(`Failed to start OpenCode session: ${a}`)}}async sendMessage(a,b,c){let d=this.getSessionName(a,c);if(!await (0,e.N)(d))throw Error(`OpenCode session ${d} does not exist. Start the session first.`);try{await (0,f.FW)({sessionName:d,message:b,cliToolId:"opencode"}),(0,g.gm)(d),t.info("sent-message-to-opencode-session:session")}catch(b){let a=v(b);throw Error(`Failed to send message to OpenCode: ${a}`)}}async killSession(a,b){let c=this.getSessionName(a,b);try{await (0,e.N)(c)?(await (0,e.V1)(c,"/exit",!0),await new Promise(a=>setTimeout(a,s.KI)),await (0,e.N)(c)&&await (0,e.fY)(c)):await (0,e.fY)(c),(0,g.gm)(c),t.info("stopped-opencode-session:sessionname")}catch(a){throw t.error("session:stop-failed",{error:v(a)}),a}}constructor(...a){super(...a),this.id="opencode",this.name="OpenCode",this.command="opencode"}}},31268:(a,b,c)=>{"use strict";c.d(b,{s:()=>K});var d=c(44265),e=c(57905);class f extends d.M{async isInstalled(){return await (0,e.zw)()}async isRunning(a,b){return await (0,e.Yq)(a,b)}async startSession(a,b,c){await (0,e.R7)({worktreeId:a,worktreePath:b,instanceId:c})}async sendMessage(a,b,c){await (0,e.pU)(a,b,c)}supportsImage(){return!0}async sendMessageWithImage(a,b,c,d){let e=`
|
|
2
|
-
`,f=b?`${b}${e}`:e;await this.sendMessage(a,f,d)}async killSession(a,b){await (0,e.VU)(a,b)}constructor(...a){super(...a),this.id="claude",this.name="Claude Code",this.command="claude"}}var g=c(11665),h=c(40236),i=c(93997),j=c(26283),k=c(72626),l=c(20610);let m=(0,k.h)("cli-tools/codex");function n(a){return a instanceof Error?a.message:String(a)}class o extends d.M{async isRunning(a,b){let c=this.getSessionName(a,b);return await (0,g.N)(c)}async startSession(a,b,c){if(!await this.isInstalled())throw Error("Codex CLI is not installed or not in PATH");let d=this.getSessionName(a,c);if(await (0,g.N)(d)){await this.reconcileExistingSession(d),m.info("codex-session-sessionname");return}try{await (0,g.jw)({sessionName:d,workingDirectory:b}),await new Promise(a=>setTimeout(a,l.Uc)),await (0,g.V1)(d,"codex",!0),await new Promise(a=>setTimeout(a,3e3)),await this.waitForReady(d),m.info("started-codex-session:sessionname")}catch(b){let a=n(b);throw Error(`Failed to start Codex session: ${a}`)}}async waitForReady(a){let b=!1,c=!1;for(let d=0;d<30;d++){try{let d=await (0,g.Xg)(a,50),e=(0,j.aJ)(d);if((0,j.zZ)(e))return void m.info("codex-prompt-detected");let f=(0,j.Qh)(e);if("update"===f&&!b){await (0,g.V1)(a,"2",!1),b=!0,m.info("skipped-codex-update"),await new Promise(a=>setTimeout(a,l.CV));continue}if("press-enter"===f){await (0,g.ds)(a,"Enter"),m.info("dismissed-codex-notification"),await new Promise(a=>setTimeout(a,l.CV));continue}if("trust"===f&&!c){await (0,g.V1)(a,"1",!1),c=!0,m.info("auto-trusted-folder-for"),await new Promise(a=>setTimeout(a,l.CV));continue}}catch{}await new Promise(a=>setTimeout(a,1e3))}m.info("codex-prompt-detection")}async waitForPrompt(a){let b=Date.now();for(;Date.now()-b<15e3;){try{let b=await (0,g.Xg)(a,50),c=(0,j.aJ)(b);if((0,j.zZ)(c))return}catch{}await new Promise(a=>setTimeout(a,500))}throw m.info("codex-prompt-not"),Error("Codex prompt not ready: timed out waiting for the input prompt before sending")}async sendMessage(a,b,c){let d=this.getSessionName(a,c);if(!await (0,g.N)(d))throw Error(`Codex session ${d} does not exist. Start the session first.`);try{await this.waitForPrompt(d),await (0,h.FW)({sessionName:d,message:b,cliToolId:"codex"}),(0,i.gm)(d),m.info("sent-message-to-codex-session:sessionnam")}catch(b){let a=n(b);throw Error(`Failed to send message to Codex: ${a}`)}}async killSession(a,b){let c=this.getSessionName(a,b);try{await (0,g.N)(c)&&(await (0,g.ds)(c,"C-d"),await new Promise(a=>setTimeout(a,l.Zf))),await (0,g.fY)(c)&&m.info("stopped-codex-session:sessionname")}catch(a){throw m.error("session:stop-failed",{error:n(a)}),a}}constructor(...a){super(...a),this.id="codex",this.name="Codex CLI",this.command="codex"}}var p=c(11508),q=c(15194),r=c(88807),s=c(56791);let t=(0,k.h)("cli-tools/vibe-local");function u(a){return a instanceof Error?a.message:String(a)}class v extends d.M{async isRunning(a,b){let c=this.getSessionName(a,b);return await (0,g.N)(c)}async startSession(a,b,c){if(!await this.isInstalled())throw Error("vibe-local is not installed or not in PATH");let d=this.getSessionName(a,c);if(await (0,g.N)(d)){await this.reconcileExistingSession(d),t.info("vibe-local-session");return}try{await (0,g.jw)({sessionName:d,workingDirectory:b}),await new Promise(a=>setTimeout(a,l.Uc));let c="vibe-local -y";try{let b=(0,r.getDbInstance)(),d=(0,s.Uim)(b,a);d?.vibeLocalModel&&q.QP.test(d.vibeLocalModel)&&(c+=` -m ${d.vibeLocalModel}`);let e=d?.vibeLocalContextWindow;(0,q.FV)(e)&&(c+=` --context-window ${Number(e)}`)}catch{}await (0,g.V1)(d,c,!0),await new Promise(a=>setTimeout(a,5e3)),t.info("started-vibe-local-session:sessionname")}catch(b){let a=u(b);throw Error(`Failed to start Vibe Local session: ${a}`)}}async sendMessage(a,b,c){let d=this.getSessionName(a,c);if(!await (0,g.N)(d))throw Error(`Vibe Local session ${d} does not exist. Start the session first.`);try{await (0,h.FW)({sessionName:d,message:b,cliToolId:"vibe-local",submitEnterCount:2,interEnterWaitMs:l.PY}),(0,i.gm)(d),t.info("sent-message-to-vibe-local-session:sessi")}catch(b){let a=u(b);throw Error(`Failed to send message to Vibe Local: ${a}`)}}async killSession(a,b){let c=this.getSessionName(a,b);try{await (0,g.N)(c)&&(await (0,g.ds)(c,"C-c"),await new Promise(a=>setTimeout(a,l.Is)),await (0,g.ds)(c,"C-c"),await new Promise(a=>setTimeout(a,l.Zf))),await (0,g.fY)(c)&&t.info("stopped-vibe-local-session:sessionname")}catch(a){throw t.error("session:stop-failed",{error:u(a)}),a}}constructor(...a){super(...a),this.id="vibe-local",this.name="Vibe Local",this.command="vibe-local"}}var w=c(30618),x=c(79646),y=c(56263),z=c(77093);let A=(0,k.h)("cli-tools/copilot"),B=new Set(["model","agent","theme"]);class C extends d.M{async isInstalled(){try{return await new Promise((a,b)=>{(0,x.execFile)("gh",["--version"],{timeout:5e3},c=>{c?b(c):a()})}),await new Promise((a,b)=>{(0,x.execFile)("gh",["copilot","--help"],{timeout:5e3},c=>{c?b(c):a()})}),!0}catch{return!1}}async isRunning(a,b){let c=this.getSessionName(a,b);return await (0,g.N)(c)}async startSession(a,b,c){if(!await this.isInstalled())throw Error("GitHub Copilot CLI is not installed. Install with: gh extension install github/gh-copilot");let d=this.getSessionName(a,c);if(await (0,g.N)(d)){await this.reconcileExistingSession(d),A.info("copilot-session-exists");return}try{await (0,g.jw)({sessionName:d,workingDirectory:b}),await new Promise(a=>setTimeout(a,l.Uc)),await (0,g.V1)(d,"gh copilot",!0),await new Promise(a=>setTimeout(a,4e3)),await this.waitForReady(d),A.info("started-copilot-session")}catch(b){let a=(0,z.u1)(b);throw Error(`Failed to start Copilot session: ${a}`)}}async waitForReady(a){for(let b=0;b<30;b++){try{let b=await (0,g.Xg)(a,50),c=(0,j.aJ)(b);if(j.Du.test(c))return void A.info("copilot-prompt-detected")}catch{}await new Promise(a=>setTimeout(a,1e3))}A.info("copilot-prompt-detection-timeout")}async waitForPrompt(a,b=15e3){let c=Date.now();for(;Date.now()-c<b;){try{let b=await (0,g.Xg)(a,50),c=(0,j.aJ)(b);if(j.Du.test(c))return}catch{}await new Promise(a=>setTimeout(a,500))}A.info("copilot-prompt-not-detected")}extractSlashCommand(a){let b=a.trim();if(!b.startsWith("/"))return null;let c=b.match(/^\/(\S+)/);return c?c[1]:null}async waitForSelectionList(a){let b=Date.now();for(;Date.now()-b<5e3;){await new Promise(a=>setTimeout(a,300));try{let b=await (0,g.Xg)(a,50),c=(0,j.aJ)(b);if(j.Mi.test(c))return A.info("copilot-selection-list-detected"),!0}catch{}}return A.info("copilot-selection-list-not-detected-timeout"),!1}async sendMessage(a,b,c){let d=this.getSessionName(a,c);if(!await (0,g.N)(d))throw Error(`Copilot session ${d} does not exist. Start the session first.`);try{await this.waitForPrompt(d);let a=this.extractSlashCommand(b);if(a&&B.has(a)){await (0,g.V1)(d,b,!0),await this.waitForSelectionList(d),(0,i.gm)(d),A.info("sent-selection-list-command-to-copilot",{command:a});return}await (0,h.FW)({sessionName:d,message:b,cliToolId:"copilot",textInputWaitMs:y.L1,verifyDelayMs:y.wp}),(0,i.gm)(d),A.info("sent-message-to-copilot-session")}catch(b){let a=(0,z.u1)(b);throw Error(`Failed to send message to Copilot: ${a}`)}}async sendModelCommand(a,b,c){let d=this.getSessionName(a,c);if(!await (0,g.N)(d))throw Error(`Copilot session ${d} does not exist. Start the session first.`);try{await (0,g.V1)(d,`/model ${b}`,!0),await this.waitForSelectionList(d)&&await (0,g.ds)(d,"C-m"),await this.waitForPrompt(d,y.pL),(0,i.gm)(d),A.info("copilot-model-switched",{model:b})}catch(c){let a=(0,z.u1)(c);throw Error(`Failed to switch Copilot model to ${b}: ${a}`)}}async killSession(a,b){let c=this.getSessionName(a,b);try{await (0,g.N)(c)&&(await (0,g.ds)(c,"C-c"),await new Promise(a=>setTimeout(a,l.Is)),await (0,g.V1)(c,"exit",!0),await new Promise(a=>setTimeout(a,l.Zf))),await (0,g.fY)(c)&&A.info("stopped-copilot-session")}catch(a){throw A.error("session:stop-failed",{error:(0,z.u1)(a)}),a}}constructor(...a){super(...a),this.id="copilot",this.name="Copilot",this.command="gh"}}let D=(0,k.h)("cli-tools/antigravity");function E(a){return a instanceof Error?a.message:String(a)}let F=/\?\s+for\s+shortcuts/,G=/Do you trust the contents of this project\?/;function H(a){return F.test(a)&&!G.test(a)}class I extends d.M{async isRunning(a,b){let c=this.getSessionName(a,b);return await (0,g.N)(c)}async startSession(a,b,c,d){if(!await this.isInstalled())throw Error("Antigravity CLI (agy) is not installed or not in PATH");let e=this.getSessionName(a,c);if(await (0,g.N)(e)){await this.reconcileExistingSession(e),D.info("antigravity-session-exists");return}try{await (0,g.jw)({sessionName:e,workingDirectory:b}),await new Promise(a=>setTimeout(a,l.Uc));let a=d?`agy --model '${d.replace(/'/g,"'\\''")}'`:"agy";await (0,g.V1)(e,a,!0),await new Promise(a=>setTimeout(a,3e3)),await this.waitForReady(e),D.info("started-antigravity-session")}catch(b){let a=E(b);throw Error(`Failed to start Antigravity session: ${a}`)}}async waitForReady(a){let b=!1;for(let c=0;c<30;c++){try{let c=await (0,g.Xg)(a,50),d=(0,j.aJ)(c);if(H(d))return void D.info("antigravity-prompt-detected");if(!b&&G.test(d)){await (0,g.ds)(a,"Enter"),b=!0,D.info("auto-trusted-folder-for-antigravity"),await new Promise(a=>setTimeout(a,500));continue}}catch{}await new Promise(a=>setTimeout(a,1e3))}D.info("antigravity-prompt-detection-timeout")}async waitForPrompt(a){let b=Date.now();for(;Date.now()-b<15e3;){try{let b=await (0,g.Xg)(a,50),c=(0,j.aJ)(b);if(H(c))return}catch{}await new Promise(a=>setTimeout(a,500))}throw D.info("antigravity-prompt-not-ready"),Error("Antigravity prompt not ready: timed out waiting for the input prompt before sending")}async sendMessage(a,b,c){let d=this.getSessionName(a,c);if(!await (0,g.N)(d))throw Error(`Antigravity session ${d} does not exist. Start the session first.`);try{await this.waitForPrompt(d),await (0,h.FW)({sessionName:d,message:b,cliToolId:"antigravity"}),(0,i.gm)(d),D.info("sent-message-to-antigravity-session")}catch(b){let a=E(b);throw Error(`Failed to send message to Antigravity: ${a}`)}}async killSession(a,b){let c=this.getSessionName(a,b);try{await (0,g.N)(c)&&(await (0,g.ds)(c,"C-d"),await new Promise(a=>setTimeout(a,l.Zf)));let a=await (0,g.fY)(c);(0,i.gm)(c),a&&D.info("stopped-antigravity-session")}catch(a){throw D.error("session:stop-failed",{error:E(a)}),a}}constructor(...a){super(...a),this.id="antigravity",this.name="Antigravity CLI",this.command="agy"}}var J=c(95220);class K{constructor(){this.tools=new Map,this.tools.set("claude",new f),this.tools.set("codex",new o),this.tools.set("gemini",new p.m),this.tools.set("vibe-local",new v),this.tools.set("opencode",new w.Ui),this.tools.set("copilot",new C),this.tools.set("antigravity",new I)}static getInstance(){return K.instance||(K.instance=new K),K.instance}getTool(a){let b=this.tools.get(a);if(!b)throw Error(`CLI tool '${a}' not found`);return b}getAllTools(){return Array.from(this.tools.values())}async getToolInfo(a){let b=this.getTool(a),c=await b.isInstalled();return{id:b.id,name:b.name,command:b.command,installed:c}}async getAllToolsInfo(){return Promise.all(this.getAllTools().map(async a=>{let b=await a.isInstalled();return{id:a.id,name:a.name,command:a.command,installed:b}}))}async getInstalledTools(){return(await this.getAllToolsInfo()).filter(a=>a.installed)}stopPollers(a,b,c){(0,J.stopPolling)(a,b,c)}}},31766:(a,b,c)=>{"use strict";c.d(b,{Wh:()=>p,WD:()=>q,K1:()=>o});var d=c(31268),e=c(72626),f=c(11665);let g={streamingOutput:!1,explicitResize:!1,snapshotFallback:!0};class h{async unsubscribe(){}}class i{async ensureSession(a,b){await (0,f.N)(a)||await (0,f.jw)(a,b)}async sessionExists(a){return(0,f.N)(a)}async sendInput(a,b){await (0,f.V1)(a,b)}async sendSpecialKey(a,b){if("Escape"!==b&&"C-c"!==b&&"C-d"!==b&&"C-m"!==b&&"Enter"!==b)throw Error(`Unsupported special key for PollingTmuxTransport: ${b}`);await (0,f.ds)(a,b)}async resize(){throw Error("PollingTmuxTransport does not support explicit resize")}async captureSnapshot(a,b){return(0,f.Xg)(a,b)}async subscribe(){return new h}getCapabilities(){return g}async killSession(a){return(0,f.fY)(a)}}let j=null;var k=c(93997);let l=(0,e.h)("cli-session");function m(){return j||(j=new i),j}function n(a,b,c){let e=d.s.getInstance().getTool(b),f=e.getSessionName(a,c);return{cliTool:e,sessionName:f}}async function o(a,b,c){let{sessionName:d}=n(a,b,c);return m().sessionExists(d)}async function p(a,b,c=1e3,d){let e=l.withContext({worktreeId:a,cliToolId:b});e.debug("captureSessionOutput:start",{requestedLines:c});let{cliTool:f,sessionName:g}=n(a,b,d),h=m();try{let a=await (0,k.aq)(g,c,async()=>{if(!await h.sessionExists(g))throw Error(`${f.name} session ${g} does not exist`);return await h.captureSnapshot(g,{startLine:-k.xE})});return e.debug("captureSessionOutput:success",{actualLines:a.split("\n").length,lastFewLines:a.split("\n").slice(-3).join(" | ")}),a}catch(b){let a=b instanceof Error?b.message:String(b);if(a.includes("does not exist"))throw e.debug("captureSessionOutput:sessionNotFound",{sessionName:g}),b;throw e.error("captureSessionOutput:failed",{error:a}),Error(`Failed to capture ${f.name} output: ${a}`)}}async function q(a,b,c=5e3,d){let e=l.withContext({worktreeId:a,cliToolId:b});e.debug("captureSessionOutputFresh:start",{requestedLines:c});let{cliTool:f,sessionName:g}=n(a,b,d),h=m();try{let a=await h.captureSnapshot(g,{startLine:-c});return a.length>0?(0,k.vF)(g,a,c):(0,k.gm)(g),(0,k.wd)(a,c)}catch(b){(0,k.gm)(g);let a=b instanceof Error?b.message:String(b);throw e.error("captureSessionOutputFresh:failed",{error:a}),Error(`Failed to capture ${f.name} output: ${a}`)}}},34405:(a,b,c)=>{"use strict";c.d(b,{G:()=>e,_:()=>d});let d=1e4,e=1e3},34892:(a,b,c)=>{"use strict";c.d(b,{$:()=>k});var d=c(56791),e=c(31268),f=c(31766),g=c(95595),h=c(18896),i=c(34405),j=c(48083);async function k(a,b,c,k){let l=k??c,m=e.s.getInstance().getTool(c),n=(0,j.CE)(b,c,k);if(!await m.isRunning(b,k))return{isRunning:!1,content:"",lineCount:0,cliToolId:c,sessionStatus:"idle",sessionStatusReason:"session_not_running",lastStopEventAt:n};let o=(0,d.y1O)(a,b,l),p=o?.lastCapturedLine||0,q=await (0,f.Wh)(b,c,i._,k),r=q.split("\n"),s=r.length,t=r.slice(Math.max(0,p)).join("\n"),u=(0,h.v7)(b,c,k),v=(0,h.xU)(u),w=v?new Date(v):void 0,x=(0,g.WC)(q,c,w),y="running"===x.status&&x.reason===g.gv.THINKING_INDICATOR,z=x.hasActivePrompt,A="waiting"===x.status&&g.ug.has(x.reason),B=x.reason===g.gv.CODEX_PAGER,C="running"===x.status&&x.reason===g.gv.DEFAULT||"ready"===x.status&&x.reason===g.gv.NO_RECENT_OUTPUT,D=r.slice(-100).join("\n"),E=(0,h.aq)(b,c,k);return{isRunning:!0,cliToolId:c,sessionStatus:x.status,sessionStatusReason:x.reason,content:t,fullOutput:q,realtimeSnippet:D,lineCount:s,lastCapturedLine:p,isComplete:z,isGenerating:y,thinking:y,thinkingMessage:y?"Claude is thinking...":null,isPromptWaiting:z,promptData:z?x.promptDetection.promptData??null:null,autoYes:{enabled:E?.enabled??!1,expiresAt:E?.enabled?E.expiresAt:null,stopReason:E?.stopReason},isSelectionListActive:A,isPagerActive:B,isUnclassifiedActive:C,lastServerResponseTimestamp:v,serverPollerActive:(0,h.bZ)(u),lastStopEventAt:n}}},39727:()=>{},40236:(a,b,c)=>{"use strict";c.d(b,{FW:()=>l});var d=c(11665),e=c(93997),f=c(26283),g=c(20610);let h=(0,c(72626).h)("cli-tools/submit-verified-sender"),i=/\[Pasted text[\s#]/,j=/^\/[A-Za-z]/,k=/^\s*(?:ctx:\d+%\s*)?[>❯›]/;async function l(a){let{sessionName:b,message:c,cliToolId:l,textInputWaitMs:m=g.pL,submitEnterCount:n=1,interEnterWaitMs:o=g.pL,verifyAttempts:p=4,verifyDelayMs:q=g.x9}=a;await (0,d.V1)(b,c,!1),await new Promise(a=>setTimeout(a,m));for(let a=0;a<Math.max(1,n);a++)await (0,d.KB)(b,["Enter"]),a<n-1&&await new Promise(a=>setTimeout(a,o));let r=Math.max(1,p);for(let a=0;a<r;a++){await new Promise(a=>setTimeout(a,q));let g=function(a,b,c){let d=(0,f.aJ)(a).split("\n").slice(-12),e=d.join("\n");if((0,f.ut)(b,e))return"submitted";let g=function(a){for(let b=a.length-1;b>=0;b--)if(k.test(a[b]))return a[b];return null}(d);if(!g)return"submitted";let h=g.replace(k,"").trim();return 0===h.length?"submitted":i.test(g)||function(a,b){let c=b.split("\n").map(a=>a.trim()).find(a=>a.length>0)??"";return 0!==c.length&&c.startsWith(a)}(h,c)?"pending":j.test(h)?"replaced":"submitted"}(await (0,d.Xg)(b,{startLine:-12}),l,c);if("submitted"===g)return void(0,e.gm)(b);if("replaced"===g){try{await (0,d.Ce)(b)}catch(a){h.error("submit-clear-input-failed",{sessionName:b,cliToolId:l,error:a instanceof Error?a.message:String(a)})}throw(0,e.gm)(b),h.error("submit-replaced-by-tui-completion",{sessionName:b,cliToolId:l,attempt:a}),Error(`Message was replaced by a TUI autocompletion for session ${b}; the input no longer matches the sent text. Cleared the input line without submitting to avoid executing a different command.`)}h.warn("submit-not-confirmed:resending-enter",{sessionName:b,cliToolId:l,attempt:a}),await (0,d.KB)(b,["Enter"])}throw(0,e.gm)(b),h.error("submit-verification-failed",{sessionName:b,cliToolId:l,attempts:r}),Error(`Message submit could not be confirmed for session ${b} after ${r} attempts (typed but unsent)`)}},41364:(a,b,c)=>{"use strict";c.d(b,{Gv:()=>o,hM:()=>n});var d=c(79748),e=c.n(d),f=c(33873),g=c.n(f),h=c(1634),i=c(21684),j=c(72626),k=c(15194);function l(a="claude"){return g().join((0,i.U)(),a)}async function m(a="claude"){let b=l(a);try{await e().access(b)}catch{await e().mkdir(b,{recursive:!0})}}async function n(a,b,c,d="claude"){await m(d);let f=function(a,b="claude"){let c=(0,h.GP)(new Date,"yyyy-MM-dd"),d=`${a}-${c}.md`,e=l(b);return g().join(e,d)}(a,d),i=(0,h.GP)(new Date,"yyyy-MM-dd HH:mm:ss"),j="";try{j=await e().readFile(f,"utf-8")}catch{let b=(0,k.hR)(d)?k.ef[d]:d;j=`# ${b} Conversation Log: ${a}
|
|
1
|
+
exports.id=5959,exports.ids=[1296,5959,9358],exports.modules={60:(a,b,c)=>{"use strict";c.d(b,{Q:()=>f,b:()=>e});var d=c(26283);function e(a){return d.Md.test(a)&&!d.kD.test(a)}function f(a,b,c,d,e,g=!1){if(a=Math.max(0,a),"opencode"===d||"copilot"===d||g){let a=e(b);return a>=0?a+1:0}if("antigravity"===d){let c=e(b);return c>=0?c+1:Math.max(0,a)}if(a>=b||c){let a=e(40);return a>=0?a+1:0}if("codex"===d)return Math.max(0,a);if(a>=b-5){let a=e(50);return a>=0?a+1:Math.max(0,b-40)}return Math.max(0,a)}},2669:(a,b,c)=>{"use strict";c.d(b,{M7:()=>d,Sr:()=>g,mR:()=>h,su:()=>j,wQ:()=>i});let d="SESSION_STARTING",e="SESSION_START_FAILED",f=[d,e];class g extends Error{constructor(a,b,c){super(`${a} did not reach its input prompt within ${Math.round(c/1e3)}s (initialization timeout). The tmux session '${b}' and its process are still running, so this is a slow start, not a failed one — the message was not delivered, but nothing needs repairing. Retry the send in a few seconds, or run \`commandmate capture <worktree-id>\` to see what it is waiting on.`),this.toolName=a,this.sessionName=b,this.timeoutMs=c,this.code=d,this.name="SessionStartTimeoutError"}}class h extends Error{constructor(a,b,c){super(`${a} reported an error while starting in tmux session '${b}': "${c}". Retrying will not help until that is resolved; run \`commandmate capture <worktree-id>\` to see the session output.`),this.toolName=a,this.sessionName=b,this.detectedPattern=c,this.code=e,this.name="SessionStartFailedError"}}function i(a){return k(a)===d}function j(a){let b=k(a);return void 0!==b&&f.includes(b)}function k(a){if("object"!=typeof a||null===a)return;let b=a.code;return"string"==typeof b?b:void 0}},3523:(a,b,c)=>{"use strict";c.d(b,{z$:()=>C,zX:()=>D});var d=c(31766),e=c(88807),f=c(56791),g=c(69297),h=c(25129),i=c(18778),j=c(15194),k=c(8988),l=c(26283),m=c(72626),n=c(46423),o=c(93997),p=c(60),q=c(82450),r=c(56263),s=c(13033),t=c(72457),u=c(71080),v=c(45146),w=c(63865),x=c(2924);let y=(0,m.h)("response-poller");function z(a){return{response:"",isComplete:!1,lineCount:a}}function A(a,b,c,d,e,f,g,h=!1){let i=(0,p.Q)(b,c,d,e,f,h),j=a.slice(i);return{response:(0,l.aJ)(j.join("\n")),isComplete:!0,lineCount:c,promptDetection:g,bufferReset:d,captureWindowSaturated:h}}function B(a,b){let c=(0,l.KO)(b);return(0,h.gF)((0,l._A)((0,l.aJ)(a)),c)}function C(a,b,c,d=o.xE){let e=a.split("\n"),f=e.length;for(;f>0&&""===e[f-1].trim();)f--;let g=e.slice(0,f),h=g.length,i=(0,o.sl)(e.length,d),j="claude"===c?(0,l.GT)(g):-1,k=j>=0?j:h,m=h>0&&b>25&&h+25<b,q=h>0&&b>50&&h<50,r=m||q;if(!r&&h<b-5)return null;let s=Math.max(0,h-20),t=g.slice(s),u="opencode"===c?(0,l.aJ)(g.join("\n")):t.join("\n"),{promptPattern:w,separatorPattern:x,thinkingPattern:y,skipPatterns:D}=(0,l._X)(c),E=(a=60)=>{let b;if("codex"===c)b=/^›\s+(?!Implement|Find and fix|Type|Summarize)/;else if("opencode"===c){let b=0;for(let c=h-1;c>=Math.max(0,h-a);c--){let a=(0,l.aJ)(g[c]);if(l.Md.test(a)&&2==++b)return c}return -1}else b=/^[>❯]\s+\S/;for(let c=k-1;c>=Math.max(0,k-a);c--){let a=(0,l.aJ)(g[c]);if(b.test(a))return c}return -1};if("claude"===c||"codex"===c||"copilot"===c){let a=B(g.join("\n"),c);if(a.isPrompt)return A(g,b,h,r,c,E,a,i)}let F=(0,l.aJ)(u),G=w.test(F),H=x.test(F),I="codex"===c?(0,l.DR)(g,20):y.test(F),J=("codex"===c||"gemini"===c||"vibe-local"===c||"copilot"===c||"antigravity"===c)&&G&&!I,K="claude"===c&&G&&H&&!I,L="opencode"===c&&(0,p.b)(F);if(J||K||L){let a=[],d=(0,p.Q)(b,h,r,c,E,i),e=h;for(let b=d;b<k;b++){let d=g[b],f=(0,l.aJ)(d);if("codex"===c&&/^›\s+/.test(f)||"gemini"===c&&/^(%|\$|.*@.*[%$#])\s*$/.test(f)||"antigravity"===c&&/^>\s*$/.test(f)||"opencode"===c&&(l.sy.test(f)||l.uA.test(f))){e=b;break}D.some(a=>a.test(f))||a.push(d)}let f=a.join("\n").trim(),j=f.split("\n").slice(-n.$).join("\n");if(y.test(j))return z(h);if("claude"===c){let a=(0,l.aJ)(f),b=/[╭╮╰╯│]/.test(a)||/░{3,}/.test(a)||/▓{3,}/.test(a),c=/Claude Code|claude\/|v\d+\.\d+/.test(a),d=/Tip:|for shortcuts|\?\s*for help/.test(a),e=/^\s*\/Users\/.*$/m.test(a)&&a.split("\n").length<30,g=a.match(/^[>❯]\s+(\S.*)$/m);if(g){let b=a.indexOf(g[0]);if(0===a.substring(b+g[0].length).trim().split("\n").filter(a=>{let b=a.trim();return b&&!D.some(a=>a.test(b))&&!/^─+$/.test(b)}).length)return z(h)}else if((b||c||d||e)&&f.length<2e3)return z(h)}if("gemini"===c&&((f.match(/[░███]/g)||[]).length>.3*f.length||v.SI.some(a=>f.includes(a))||!f.includes("✦")&&f.length<10))return z(h);if("opencode"===c){let a=(0,l.aJ)(f);if((a.length<50||!l.Md.test(F))&&0===a.split("\n").filter(a=>{let b=a.trim();return b&&!l.sx.some(a=>a.test(b))}).length)return z(h)}return{response:f,isComplete:!0,lineCount:e,bufferReset:r,captureWindowSaturated:i}}if("opencode"!==c){let a=B(g.join("\n"),c);if(a.isPrompt)return A(g,b,h,r,c,E,a,i)}let M=[],N=r||i||b>=h-5,O=N?E(80):-1,P=N?O>=0?O+1:Math.max(0,h-80):Math.max(0,b);for(let a=P;a<Math.min(h,k);a++){let b=g[a],c=(0,l.aJ)(b);D.some(a=>a.test(c))||M.push(b)}let Q=M.join("\n").trim();return Q?{response:Q,isComplete:!1,lineCount:h}:z(h)}async function D(a,b,c){let h=(0,e.getDbInstance)(),m=c??b;try{let e=(0,f.Uim)(h,a);if(!e)return y.error("worktree-worktreeid-not"),(0,v.Et)(a,b,c),!1;if(!await (0,d.K1)(a,b,c))return y.info("session-not-running"),(0,v.Et)(a,b,c),!1;let p=(0,f.y1O)(h,a,m),z=p?.lastCapturedLine||0,A=await (0,d.Wh)(a,b,o.xE,c);if("opencode"===b||"copilot"===b){let d=(0,v.MN)(a,b,c);(0,s.IZ)(d,A,b)}let D=C(A,z,b,o.xE);if(!D||!D.isComplete){let{thinkingPattern:c}=(0,l._X)(b),d=(0,l.aJ)(A).split("\n").slice(-n.$).join("\n");return c.test(d)&&(0,f.PLg)(h,a,b,m)>0&&y.info("marked-answeredcount-pending"),!1}let E="opencode"===b||"copilot"===b,F=!(0,j.VA)(b)&&!D.captureWindowSaturated;if(F&&!D.bufferReset&&D.lineCount===z&&!p?.inProgressMessageId)return!1;if(F&&!D.bufferReset&&D.lineCount<=z)return y.info("already-saved-up-to-line-lastcapturedlin"),!1;let G=D.promptDetection??B(D.response,b);if(G.isPrompt){let d=G.rawContent||G.cleanContent,i=(0,v.MN)(a,b,c),j=(0,t.zm)(d,b);if((0,t.gv)(i,j))return y.info("duplicate-prompt-skipped",{worktreeId:a,cliToolId:b}),!1;let k=d;"copilot"===b&&(k=(0,q.LH)(d),k=(0,q.Sj)(k,r.Rf,r.ky)),(0,f.YXK)(h,a,b,m);let l=(0,f.oHS)(h,{worktreeId:a,role:"assistant",content:k,messageType:"prompt",promptData:G.promptData,timestamp:new Date,cliToolId:b,instanceId:m});return(0,f.PPx)(h,a,b,D.lineCount,m),(0,g.broadcastMessage)("message",{worktreeId:a,message:l}),(0,x.r)(h,a,b,m,"prompt_detected",{promptType:G.promptData?.type}),(0,w.J$)({worktreeId:a,worktreeName:e.name,kind:"prompt",agentName:m,excerpt:G.promptData?.question??k}).catch(()=>{}),E||(0,v.Et)(a,b,c),!0}if(!D.response||""===D.response.trim())return(0,f.PPx)(h,a,b,D.lineCount,m),!1;let H="claude"===b?(0,k.R)(D.response):void 0,I=D.response;if("gemini"===b)I=(0,q.IS)(D.response);else if("claude"===b)I=(0,q.NN)(D.response);else if("copilot"===b){let d=(0,v.MN)(a,b,c),e=(0,s.Uz)(d)||D.response;I=(0,q.LH)(e),I=(0,q.Sj)(I,r.Rf,r.ky),(0,s.q1)(d)}else if("opencode"===b){I=(0,q.aW)(D.response);let d=(0,v.MN)(a,b,c);(0,s.q1)(d)}if(!I||""===I.trim()||"[No content]"===I)return(0,f.PPx)(h,a,b,D.lineCount,m),(0,f.YXK)(h,a,b,m),!1;if(!F){let d=(0,v.MN)(a,b,c);if((0,u.j7)(d,I))return(0,f.PPx)(h,a,b,D.lineCount,m),!1}I&&await (0,i.T)(h,a,I,b),(0,f.PLg)(h,a,b,m)>0&&y.info("marked-answeredcount-pending");let J=(0,f.y1O)(h,a,m);if(F&&J&&D.lineCount<=J.lastCapturedLine)return y.info("race-condition-detected-skipping-save-re"),!1;let K=(0,f.oHS)(h,{worktreeId:a,role:"assistant",content:I,messageType:"normal",timestamp:new Date,cliToolId:b,instanceId:m,summary:H?.summary,logFileName:H?.logFileName,requestId:H?.requestId});return(0,g.broadcastMessage)("message",{worktreeId:a,message:K}),(0,w.J$)({worktreeId:a,worktreeName:e.name,kind:"completion",agentName:m,excerpt:I}).catch(()=>{}),(0,f.PPx)(h,a,b,D.lineCount,m),E&&(0,v.Et)(a,b,c),!0}catch(a){return y.error("response:check-failed",{error:a instanceof Error?a.message:String(a)}),!1}}},7015:(a,b,c)=>{"use strict";c.d(b,{Ds:()=>g});var d=c(81719);class e{constructor(a,b=3e4){this.cache=new Map,this.allAppsCache=null,this.lastRefresh=0,this.db=a,this.ttl=b}getTTL(){return this.ttl}isStale(){return Date.now()-this.lastRefresh>this.ttl}async refresh(){let a=(0,d.$i)(this.db);for(let b of(this.cache.clear(),a))this.cache.set(b.pathPrefix,b);this.allAppsCache=a,this.lastRefresh=Date.now()}async getByPathPrefix(a){return this.isStale()&&await this.refresh(),this.cache.get(a)??null}async getAll(){return this.isStale()&&await this.refresh(),this.allAppsCache??[]}invalidate(){this.cache.clear(),this.allAppsCache=null,this.lastRefresh=0}invalidateByIssueNo(a){this.invalidate()}}let f=null;function g(a){if(!f){if(!a)throw Error("Database instance required to initialize cache");f=new e(a)}return f}},8988:(a,b,c)=>{"use strict";c.d(b,{R:()=>g});let d=/📄 Session log: (.+?\/([^\/\s]+\.jsonl))/,e=/Request ID: ([^\s\n]+)/,f=/Summary: (.+?)(?:\n─|$)/s;function g(a){let b={content:a},c=d.exec(a);c&&(b.logFileName=c[2]);let g=e.exec(a);g&&(b.requestId=g[1]);let h=f.exec(a);return h&&(b.summary=h[1].trim()),b}},11508:(a,b,c)=>{"use strict";c.d(b,{H:()=>m,m:()=>n});var d=c(44265),e=c(11665),f=c(40236),g=c(93997),h=c(26283),i=c(72626),j=c(20610);let k=(0,i.h)("cli-tools/gemini");function l(a){return a instanceof Error?a.message:String(a)}let m=200;class n extends d.M{async isRunning(a,b){let c=this.getSessionName(a,b);return await (0,e.N)(c)}async startSession(a,b,c){if(!await this.isInstalled())throw Error("Gemini CLI is not installed or not in PATH");let d=this.getSessionName(a,c);if(await (0,e.N)(d)){await this.reconcileExistingSession(d),k.info("gemini-session-sessionname");return}try{await (0,e.jw)({sessionName:d,workingDirectory:b}),await new Promise(a=>setTimeout(a,j.Uc)),await (0,e.V1)(d,"gemini",!0),await new Promise(a=>setTimeout(a,6e3)),await this.waitForReady(d),k.info("started-gemini-session:sessionname")}catch(b){let a=l(b);throw Error(`Failed to start Gemini session: ${a}`)}}async waitForReady(a){let b=!1;for(let c=0;c<30;c++){try{let c=await (0,e.Xg)(a,m),d=(0,h.aJ)(c);if(h.wN.test(d))return void k.info("gemini-prompt-detected");!b&&d.includes("Do you trust this folder?")&&(await (0,e.ds)(a,"Enter"),b=!0,k.info("auto-trusted-folder-for"))}catch{}await new Promise(a=>setTimeout(a,1e3))}k.info("gemini-prompt-detection")}async waitForPrompt(a){let b=Date.now();for(;Date.now()-b<15e3;){try{let b=await (0,e.Xg)(a,m),c=(0,h.aJ)(b);if(h.wN.test(c))return}catch{}await new Promise(a=>setTimeout(a,500))}k.info("gemini-prompt-not")}async sendMessage(a,b,c){let d=this.getSessionName(a,c);if(!await (0,e.N)(d))throw Error(`Gemini session ${d} does not exist. Start the session first.`);try{await this.waitForPrompt(d),await (0,f.FW)({sessionName:d,message:b,cliToolId:"gemini"}),(0,g.gm)(d),k.info("sent-message-to-gemini-session:sessionna")}catch(b){let a=l(b);throw Error(`Failed to send message to Gemini: ${a}`)}}async killSession(a,b){let c=this.getSessionName(a,b);try{await (0,e.N)(c)&&(await (0,e.ds)(c,"C-c"),await new Promise(a=>setTimeout(a,j.Is)),await (0,e.V1)(c,"/quit",!0),await new Promise(a=>setTimeout(a,j.Zf))),await (0,e.fY)(c)&&k.info("stopped-gemini-session:sessionname")}catch(a){throw k.error("session:stop-failed",{error:l(a)}),a}}constructor(...a){super(...a),this.id="gemini",this.name="Gemini CLI",this.command="gemini"}}},11665:(a,b,c)=>{"use strict";c.d(b,{Ce:()=>w,GW:()=>n,KB:()=>r,N:()=>m,N6:()=>y,Sb:()=>z,V1:()=>p,Xg:()=>s,ds:()=>v,fY:()=>t,jw:()=>o,lA:()=>k,zT:()=>l});var d=c(79646),e=c(28354),f=c(93997),g=c(16983),h=c(72626);let i=(0,e.promisify)(d.execFile),j=(0,h.h)("tmux");function k(a){return`=${a}:`}async function l(a,b={}){let c,d,e,f=b.windowWidth??g.Jn,h=b.windowHeight??g.sO,m=k(a);try{c=(await i("tmux",["show-window-options","-v","-t",m,"window-size"],{timeout:5e3})).stdout.trim();let[a,b]=(await i("tmux",["display-message","-p","-t",m,"#{window_width}|#{window_height}"],{timeout:5e3})).stdout.trim().split("|").map(Number);Number.isFinite(a)&&(d=a),Number.isFinite(b)&&(e=b)}catch{}let n="manual"===c,o=d===f&&e===h;if(n&&o)return!1;try{return n||await i("tmux",["set-window-option","-t",m,"window-size","manual"],{timeout:5e3}),o||await i("tmux",["resize-window","-t",m,"-x",String(f),"-y",String(h)],{timeout:5e3}),!0}catch(b){return j.warn("session-geometry:reconcile-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)}),!1}}async function m(a){try{return await i("tmux",["has-session","-t",k(a)],{timeout:5e3}),!0}catch{return!1}}async function n(){try{let{stdout:a}=await i("tmux",["list-sessions","-F","#{session_name}|#{session_windows}|#{session_attached}"],{timeout:5e3});if(!a||""===a.trim())return[];return a.trim().split("\n").map(a=>{let[b,c,d]=a.split("|");return{name:b,windows:parseInt(c,10)||0,attached:"1"===d}})}catch{return[]}}async function o(a,b){let c,d,e,f,h;"string"==typeof a?(c=a,d=b,e=g.eu,f=g.Jn,h=g.sO):(c=a.sessionName,d=a.workingDirectory,e=a.historyLimit||g.eu,f=a.windowWidth||g.Jn,h=a.windowHeight||g.sO);try{await i("tmux",["new-session","-d","-s",c,"-c",d,"-x",String(f),"-y",String(h)],{timeout:5e3}),await i("tmux",["set-option","-t",k(c),"history-limit",String(e)],{timeout:5e3});try{await i("tmux",["new-window","-k","-t",`${k(c)}0`,"-c",d],{timeout:5e3})}catch(a){j.warn("session-history-limit:window-rebuild-failed",{sessionName:c,historyLimit:e,error:a instanceof Error?a.message:String(a)})}await l(c,{windowWidth:f,windowHeight:h})}catch(b){let a=b instanceof Error?b.message:String(b);throw Error(`Failed to create tmux session: ${a}`)}}async function p(a,b,c=!0){let d=c?["send-keys","-t",k(a),b,"C-m"]:["send-keys","-t",k(a),b];try{await i("tmux",d,{timeout:5e3})}catch(b){let a=b instanceof Error?b.message:String(b);throw Error(`Failed to send keys to tmux session: ${a}`)}}let q=new Set(["Up","Down","Left","Right","Enter","Space","Tab","Escape","BSpace","DC","PageUp","PageDown","Home","End","q"]);async function r(a,b){if(0!==b.length){for(let a of b)if(!q.has(a))throw Error(`Invalid special key: ${a}`);try{for(let c=0;c<b.length;c++)await i("tmux",["send-keys","-t",k(a),b[c]],{timeout:5e3}),c<b.length-1&&await new Promise(a=>setTimeout(a,100))}catch(b){let a=b instanceof Error?b.message:String(b);throw Error(`Failed to send special keys to tmux session: ${a}`)}}}async function s(a,b){let c,d;"number"==typeof b?(c=-b,d="-"):b?(c=b.startLine??-1e4,d=b.endLine??"-"):(c=-1e3,d="-");try{let{stdout:b}=await i("tmux",["capture-pane","-t",k(a),"-p","-e","-S",String(c),"-E",String(d)],{timeout:5e3,maxBuffer:0xa00000});return b}catch(b){let a=b instanceof Error?b.message:String(b);throw Error(`Failed to capture pane: ${a}`)}}async function t(a){try{return await i("tmux",["kill-session","-t",k(a)],{timeout:5e3}),!0}catch(b){let a=b instanceof Error?b.message:String(b);if(a?.includes("no server running")||a?.includes("can't find session"))return!1;throw Error(`Failed to kill tmux session: ${a}`)}}let u=new Set(["Escape","C-c","C-d","C-m","Enter"]);async function v(a,b){if(!u.has(b))throw Error(`Invalid special key: ${b}`);try{await i("tmux",["send-keys","-t",k(a),b],{timeout:5e3})}catch(b){let a=b instanceof Error?b.message:String(b);throw Error(`Failed to send special key: ${a}`)}}async function w(a){try{await i("tmux",["send-keys","-t",k(a),"C-u"],{timeout:5e3})}catch(b){let a=b instanceof Error?b.message:String(b);throw Error(`Failed to clear tmux input line: ${a}`)}}let x=["Up","Down","Left","Right","Enter","Escape","Tab","BTab","PageUp","PageDown","Home","End","q"];function y(a){return x.includes(a)}async function z(a,b){await r(a,b),(0,f.gm)(a)}},13033:(a,b,c)=>{"use strict";c.d(b,{IW:()=>h,IZ:()=>l,K0:()=>g,Uz:()=>m,l1:()=>f,o0:()=>i,q1:()=>n,tb:()=>k,vQ:()=>j});var d=c(26283);let e=new Map;function f(a){return(0,d._A)((0,d.aJ)(a)).replace(/^\u2503\s?/,"").replace(/\s*\u2503$/,"").trim()}function g(a){let b=a.split("\n"),c=[];for(let a of b){let b=f(a);!(!b||d.sx.some(a=>a.test(b)))&&(d.Md.test(b)||c.push(b))}return c}function h(a){return a.replace(/[\u2500-\u257F]/g,"").replace(/\s{2,}/g," ").trim()}function i(a){let b=(0,d.aJ)(a).split("\n"),c=[];for(let a of b){let b=h(a);b&&(d.J7.some(a=>a.test(b))||c.push(b))}return c}function j(a,b){if(0===a.length||0===b.length)return 0;let c=Math.min(a.length,b.length);for(let d=c;d>=1;d--){let c=a.slice(-d),e=b.slice(0,d),f=!0;for(let a=0;a<d;a++)if(c[a]!==e[a]){f=!1;break}if(f)return d}return 0}function k(a){e.set(a,{lines:[],lastFingerprint:[],pollCount:0})}function l(a,b,c="opencode"){let d=e.get(a);if(!d)return;let f="copilot"===c?i(b):g(b);if(0!==f.length){if(d.pollCount++,0===d.lines.length)d.lines=[...f];else{let a=j(d.lastFingerprint,f);if(a>0){let b=f.slice(a);d.lines.push(...b)}else d.lines.push(...f)}d.lastFingerprint=f.slice(-10)}}function m(a){let b=e.get(a);return b&&0!==b.lines.length?b.lines.join("\n"):""}function n(a){e.delete(a)}},18778:(a,b,c)=>{"use strict";c.d(b,{T:()=>g});var d=c(56791),e=c(41364);let f=(0,c(72626).h)("conversation-logger");async function g(a,b,c,h="claude"){let i=(0,d.r8U)(a,b);if(i)try{await (0,e.hM)(b,i.content,c,h)}catch(a){f.error("conversation:log-failed",{error:a instanceof Error?a.message:String(a)})}}},18896:(a,b,c)=>{"use strict";c.d(b,{v7:()=>d.v7,LP:()=>d.LP,pL:()=>d.pL,GE:()=>d.GE,aq:()=>d.aq,kC:()=>d.kC,xU:()=>y,bZ:()=>z,W8:()=>d.W8,W5:()=>F,_i:()=>G,_C:()=>H});var d=c(24455),e=c(31766),f=c(25129),g=c(68901),h=c(56791),i=c(88807),j=c(72626);let k=(0,j.h)("auto-yes-policy"),l=new Map;var m=c(52277),n=c(2924),o=c(52660),p=c(63869),q=c(31268),r=c(26283),s=c(77093),t=c(93997),u=c(66007);let v=(0,j.h)("auto-yes-poller"),w=globalThis.__autoYesPollerStates??(globalThis.__autoYesPollerStates=new Map);function x(a){return w.get(a)}function y(a){let b=x(a);return b?.lastServerResponseTimestamp??null}function z(a){return w.has(a)}function A(a){let b=x(a);if(b&&(b.consecutiveErrors++,b.currentInterval=(0,d.G)(b.consecutiveErrors),b.consecutiveErrors>=g.ul)){let b=(0,d.Ue)(a),c=(0,d.pL)(a);c&&(0,d.XK)(b,c,"consecutive_errors",(0,d.GE)(a)??void 0),G(a)}}async function B(a,b,c,d){let f=c??g.FW,h=await (0,e.Wh)(a,b,f,d);return(0,r._A)((0,r.aJ)(h))}async function C(a,b,e,j,u,w){let y=(0,d.v7)(a,e,w);try{let A=(0,r.KO)(e),C=(0,f.gF)(j,{...A,...u&&{precomputedLines:u}});if(!C.isPrompt||!C.promptData)return b.lastAnsweredPromptKey=null,b.lastAnsweredAt=null,"no_prompt";let D=(z=C.promptData,`${z.type}:${z.question}`);if(b.lastAnsweredPromptKey===D&&null!==b.lastAnsweredAt&&Date.now()-b.lastAnsweredAt<d.UL)return"duplicate";let E=function(a,b,c){let e=c??b,f=(0,d.v7)(a,b,e),g=Date.now(),j=l.get(f);if(j&&j.expiresAt>g)return j.policy;let m=function(a,b,c){try{let d=(0,h.MHq)((0,i.getDbInstance)(),a,b,c);if(!d)return null;return d.contract.autoYes}catch(d){return k.warn("policy-lookup-failed",{worktreeId:a,cliToolId:b,instanceId:c,error:d instanceof Error?d.message:String(d)}),null}}(a,b,e);return l.size>=200&&function(a){for(let[b,c]of l.entries())c.expiresAt<=a&&l.delete(b)}(g),l.set(f,{policy:m,expiresAt:g+5e3}),m}(a,e,w),F=function(a,b){let c=function(a){if("yes_no"===a.type)return"y";if("multiple_choice"===a.type){let b=a.options.find(a=>a.isDefault)??a.options[0];return!b||b.requiresTextInput?null:b.number.toString()}return null}(a);if(null===c)return{answer:null,suppressedBy:null};let d=function(a,b){if(!b)return null;if("off"===b.mode)return{reason:"mode-off"};let c=function(a,b){if(0===b.length)return{outcome:"no-match"};let c=function(a){let b=[a.question];if(a.instructionText&&b.push(a.instructionText),"multiple_choice"===a.type)for(let c of a.options)b.push(c.label);else b.push(...a.options);return b.map(a=>a.length>2e4?a.slice(0,2e4):a)}(a);for(let a of b){if(a.length>200||!(0,g.P0)(a).valid)return{outcome:"unusable",pattern:a};let b=new RegExp(a);for(let d of c){let c=(0,g.eJ)(b,d);if(null===c)return{outcome:"unusable",pattern:a};if(c)return{outcome:"match",pattern:a}}}return{outcome:"no-match"}}(a,b.denyPatterns);return"match"===c.outcome?{reason:"deny-pattern",pattern:c.pattern}:"unusable"===c.outcome?{reason:"deny-pattern-unusable",pattern:c.pattern}:"safe"===b.mode?"yes_no"===a.type?null:{reason:"type-not-allowed"}:"allow-listed"===b.mode?b.allowPromptTypes.includes(a.type)?null:{reason:"type-not-allowed"}:null}(a,b);return d?{answer:null,suppressedBy:d.reason,pattern:d.pattern}:{answer:c,suppressedBy:null}}(C.promptData,E);F.suppressedBy&&((0,m.ZS)(a,e,w,{reason:F.suppressedBy,mode:E?.mode??null,promptType:C.promptData.type,pattern:F.pattern}),v.warn("poller:auto-yes-suppressed-by-policy",{worktreeId:a,cliToolId:e,instanceId:w,reason:F.suppressedBy,mode:E?.mode??null,pattern:F.pattern,promptType:C.promptData.type}));let G=F.answer;if(null===G)return"no_answer";let H=q.s.getInstance().getTool(e).getSessionName(a,w);try{await (0,p.t)({sessionName:H,answer:G,cliToolId:e,promptData:C.promptData})}finally{(0,t.gm)(H)}var z,B=Date.now();let I=x(y);I&&(I.lastServerResponseTimestamp=B);let J=x(y);J&&(J.consecutiveErrors=0,J.currentInterval=d.ps),b.lastAnsweredPromptKey=D,b.lastAnsweredAt=Date.now(),v.info("poller:response-sent",{worktreeId:a,cliToolId:e,instanceId:w}),(0,n.r)((0,i.getDbInstance)(),a,e,w??e,"prompt_answered_auto",{promptType:C.promptData.type});let K=null;try{K=(0,o.pG)((0,i.getDbInstance)(),{worktreeId:a,cliToolId:e,instanceId:w??e,promptData:C.promptData,answer:G,answeredBy:"auto",content:C.rawContent||C.cleanContent})}catch(b){v.warn("poller:prompt-audit-record-failed",{worktreeId:a,cliToolId:e,instanceId:w,error:(0,s.u1)(b)})}if(K){let b=K;Promise.resolve().then(c.bind(c,69297)).then(({broadcastMessage:c})=>{c(b.created?"message":"message_updated",{worktreeId:a,message:b.message})}).catch(()=>{})}let[{startPolling:L},{broadcastTerminalSnapshotAfterInteraction:M}]=await Promise.all([Promise.resolve().then(c.bind(c,95220)),Promise.resolve().then(c.bind(c,99508))]);return L(a,e,w),M(a,e,w),"responded"}catch{return A(y),v.warn("poller:detect-respond-error",{worktreeId:a,cliToolId:e,instanceId:w}),"error"}}async function D(a,b,c){let e=(0,d.v7)(a,b,c),f=x(e);if("valid"===function(a,b){if(!b)return"stopped";let c=(0,d.Ue)(a),e=(0,d.pL)(a);if(!e)return G(a),"expired";let f=(0,d.GE)(a)??void 0,g=(0,d.aq)(c,e,f);return g?.enabled?"valid":(G(a),"expired")}(e,f)){try{let h=(0,d.aq)(a,b,c),i=h?.stopPattern?g.FW:g.Ke,j=await B(a,b,i,c),k=j.split("\n");if(function(a,b,c){if(b.stopCheckBaselineLength<0)return b.stopCheckBaselineLength=c.length,!1;let e=b.stopCheckBaselineLength;if(c.length>e){let f=c.substring(e);return b.stopCheckBaselineLength=c.length,(0,d.Cs)(a,f,G)}return c.length<e&&(b.stopCheckBaselineLength=c.length),!1}(e,f,j))return;let l=await C(a,f,b,j,k,c);if("responded"===l)return void E(a,b,c,d.ZO);if("no_prompt"===l){let e=k.slice(-d.Re).join("\n");if((0,r.ut)(b,e))return void E(a,b,c,g.QN)}}catch(d){A(e),v.warn("poller:poll-error",{worktreeId:a,cliToolId:b,instanceId:c,error:(0,s.u1)(d)})}E(a,b,c)}}function E(a,b,c,e){let f=x((0,d.v7)(a,b,c));if(!f)return;let g=Math.max(e??f.currentInterval,d.ps);f.timerId=setTimeout(()=>{D(a,b,c)},g)}function F(a,b,c){if(!(0,u.h6)(a))return{started:!1,reason:"invalid worktree ID"};let e=c??b,f=(0,d.aq)(a,b,e);if(!f?.enabled)return{started:!1,reason:"auto-yes not enabled"};let g=(0,d.v7)(a,b,e),h=x(g);if(!h&&w.size>=d.fC)return{started:!1,reason:"max concurrent pollers reached"};if(h&&h.cliToolId===b)return{started:!0,reason:"already_running"};h&&G(g);let i={timerId:null,cliToolId:b,instanceId:e,consecutiveErrors:0,currentInterval:d.ps,lastServerResponseTimestamp:null,lastAnsweredPromptKey:null,lastAnsweredAt:null,stopCheckBaselineLength:-1};return w.set(g,i),l.delete(g),i.timerId=setTimeout(()=>{D(a,b,e)},d.ps),v.info("poller:started",{worktreeId:a,cliToolId:b,instanceId:e}),{started:!0}}function G(a){let b=x(a);b&&(b.timerId&&clearTimeout(b.timerId),w.delete(a),l.delete(a),v.info("poller:stopped",{compositeKey:a}))}function H(a){(0,d._9)(Array.from(w.keys()),a).forEach(a=>G(a))}},20610:(a,b,c)=>{"use strict";c.d(b,{CV:()=>i,Em:()=>l,Is:()=>g,KI:()=>j,PY:()=>k,Uc:()=>d,Zf:()=>h,pL:()=>e,x9:()=>f});let d=100,e=100,f=200,g=300,h=500,i=500,j=2e3,k=200,l=100},21684:(a,b,c)=>{"use strict";c.d(b,{U:()=>g});var d=c(33873),e=c.n(d),f=c(87447);function g(){return(0,f._p)("CM_LOG_DIR")||e().join(process.cwd(),"data","logs")}},25129:(a,b,c)=>{"use strict";c.d(b,{gF:()=>B,xn:()=>v});var d=c(72626),e=c(68652),f=c(26283);let g=/^\s*[\u276F\u25CF\u203A][^\d]*(\d+)(?:\.(?!\d)|\s{2,})\s*(.+)$/,h=/^\s*[^\d]{0,3}(\d+)(?:\.(?!\d)|\s+)\s*(.+)$/,i=/^[-─]+$/,j=/^\s*\[[^\]]*\d+\s+lines?\]/i,k=/^\s*[…]?\s*[+\-↑↓⏵⏷]?\s*\d+\s+(?:pending|more)\b/i,l=/Esc\s+to\s+cancel\s*[·•]\s*Tab\s+to\s+amend/i,m=/Enter\s+to\s+select\b.*\bnavigate\b/i,n=/press\s+(?:enter|number)\s+to\s+confirm/i,o=/press\s+number\s+to\s+confirm/i,p=/(?:select|choose|pick|which|what|how|where|enter|type|specify|confirm|approve|accept|reject|decide|preference|option)/i,q=[/type\s+here/i,/tell\s+(me|claude)/i,/enter\s+/i,/custom/i,/differently/i];function r(a,b){if(0===b.length)return!0;let c=b[0].number;return a<c&&a>=c-2}function s(a){return{isPrompt:!1,cleanContent:a.trim()}}function t(a){return 0!==a.length&&!!(a.includes("?")||a.includes("?")||p.test(a))}function u(a,b){let c=b.endsWith("?")||b.endsWith("?");return!!(!c&&/^\s{2,}[^\d]/.test(a)&&!/^\s*\d+\./.test(a)||!c&&/^\s{4,}/.test(a)&&!/^\s*\d+\.\s/.test(a)||b.length<5&&!c||/^[\/~]/.test(b)||b.length>=2&&/^[a-zA-Z0-9_-]+$/.test(b))}function v(a,b="yes_no"){let c=a.toLowerCase().trim();if("multiple_choice"===b){if(/^\d+$/.test(c))return c;throw Error("Invalid answer for multiple choice prompt. Expected a number.")}if("yes"===c||"y"===c)return"y";if("no"===c||"n"===c)return"n";throw Error("Invalid answer for yes/no prompt. Expected 'yes', 'no', 'y', or 'n'.")}let w=(0,d.h)("prompt-detector"),x=null;function y(a){let b=a.split("\n"),c=(b.length>200?b.slice(-200):b).join("\n");return c.length>5e3&&(c=c.slice(-5e3)),c}let z=[{regex:/^(.+)\s+\(y\/n\)\s*$/m},{regex:/^(.+)\s+\[y\/N\]\s*$/m,defaultOption:"no"},{regex:/^(.+)\s+\[Y\/n\]\s*$/m,defaultOption:"yes"},{regex:/^(.+)\s+\(yes\/no\)\s*$/m}];function A(a,b,c,d){return{isPrompt:!0,promptData:{type:"yes_no",question:a,options:["yes","no"],status:"pending",...void 0!==d&&{defaultOption:d},instructionText:c},cleanContent:b,rawContent:c}}function B(a,b){let c=(0,e.N)(a),d=c===a&&b?.precomputedLines?b.precomputedLines:c.split("\n"),p=d.slice(-50).join("\n"),v=p===x;v||w.debug("detectPrompt:start",{outputLength:c.length}),x=p;let B=d.slice(-20).join("\n"),C=function(a,b,c){var d,p;a=(0,e.N)(a);let v=b?.requireDefaultIndicator??!0,w=a.split("\n"),x=w.length;for(;x>0&&""===w[x-1].trim();)x--;let y=Math.max(0,x-50),z=!1;for(let a=x-1;a>=y;a--){let b=m.test(w[a]);if(l.test(w[a])||b){x=a,z=b;break}}let A=w.slice(y,x);for(let b of A)if(f.l8.test(b))return s(a);let B=!1,C=!1;for(let a of A){let b=a.trim();if(!B&&n.test(b)){B=!0,o.test(b)&&(C=!0);break}}if(v){let b=!1;for(let a of A){let c=a.trim();if(g.test(c)){b=!0;break}}if(!b&&!B)return s(a)}let D=[],E=-1,F=0;for(let b=x-1;b>=y;b--){let c=w[b].trim();if(j.test(c)||k.test(c)){F++;continue}let d=c.match(g);if(d){let a=parseInt(d[1],10);if(a<=20&&r(a,D)){let b=d[2].trim();D.unshift({number:a,label:b,isDefault:!0}),F=0;continue}}let e=c.match(h);if(e){let a=parseInt(e[1],10);if(a>20);else if(r(a,D)){let b=e[2].trim();D.unshift({number:a,label:b,isDefault:!1}),F=0;continue}}if(0===D.length&&(c.startsWith("❯")||c.startsWith("●")||c.startsWith("›")))return s(a);if(D.length>0&&c&&!i.test(c)){let a=w[b];if(/^\s{4,}/.test(a)&&u(a,c)){if(++F>25){E=b;break}continue}if(t(c)){E=b;break}if(u(a,c)){if(++F>(/^\s{4,}/.test(a)?25:5)){E=b;break}continue}E=b;break}}if(!function(a){if(0===a.length||1!==a[0])return!1;let b=0;for(let c=1;c<a.length;c++){let d=a[c]-a[c-1];if(d<1||d>2||(2===d&&b++,b>1))return!1}return!0}(D.map(a=>a.number)))return s(a);let G=D.some(a=>a.isDefault),H=v&&B;if(D.length<2||v&&!G&&!H||!v&&!G&&(-1===E||!t(w[E]?.trim()??"")&&!function(a,b,c,d){let e=Math.max(d,b-3);for(let c=b-1;c>=e;c--){let b=a[c]?.trim()??"";if(!(!b||i.test(b))&&t(b))return!0}return!1}(w,E,0,y)))return s(a);let I=function(a,b){if(b<0)return"Please select an option:";let c=[];for(let d=Math.max(0,b-5);d<=b;d++){let b=a[d].trim();b&&!i.test(b)&&c.push(b)}return c.join(" ")}(w,E),J=function(a,b,c){if(b<0)return;let d=Math.max(0,b-19),e=a.slice(d,c).map(a=>a.trimEnd()).join("\n").trim();return e.length>0?e:void 0}(w,E,x),K=B?C?"answer_only":"answer_then_enter":void 0;return d=a,p=z,{isPrompt:!0,promptData:{type:"multiple_choice",question:I.trim(),options:D.map(a=>{let b=q.some(b=>b.test(a.label));return{number:a.number,label:a.label,isDefault:a.isDefault,requiresTextInput:b}}),status:"pending",instructionText:J,...K?{submitMode:K}:{},...p?{isAskUserQuestion:!0}:{}},cleanContent:I.trim(),rawContent:c(d.trim())}}(c,b,y);if(C.isPrompt)return v||w.info("detectPrompt:multipleChoice",{isPrompt:!0,question:C.promptData?.question,optionsCount:C.promptData?.options?.length}),C;let D=B.trim();for(let a of z){let b=B.match(a.regex);if(b){let c=b[1].trim();return A(c,c,D,a.defaultOption)}}let E=B.match(/^(.*?)Approve\?\s*$/m);if(E){let a=E[1].trim();return A(a?`${a} Approve?`:"Approve?",a||"Approve?",D)}return v||w.debug("detectPrompt:complete",{isPrompt:!1}),{isPrompt:!1,cleanContent:c.trim()}}},25754:(a,b,c)=>{"use strict";c.d(b,{Xn:()=>e,d9:()=>g,gB:()=>f,rv:()=>h});let d=["en","ja"],e="en",f="locale";function g(a){return"string"==typeof a&&d.includes(a)}function h(a,b){return g(a)?a:d.find(a=>(b??"").includes(a))??e}},26838:(a,b,c)=>{"use strict";c.d(b,{Mj:()=>k,Sw:()=>j,lX:()=>l});var d=c(29021),e=c(33873),f=c(90164);let g=/^v?\d+\.\d+\.\d+$/,h=/^[a-zA-Z0-9.\-\s_v]+$/,i=globalThis.__versionCheckCache??(globalThis.__versionCheckCache={result:null,fetchedAt:0,rateLimitResetAt:null});function j(){return function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),"package.json"),"utf-8"),b=JSON.parse(a);if("commandmate"===b.name&&"string"==typeof b.version&&b.version.length>0)return b.version;return null}catch{return null}}()??"0.21.0"}function k(){return j()}async function l(){try{var a,b,c;if(null!==i.result&&Date.now()-i.fetchedAt<36e5||i.rateLimitResetAt&&(!(Date.now()>=i.rateLimitResetAt)||(i.rateLimitResetAt=null,0)))return i.result;let d=await fetch("https://api.github.com/repos/Kewton/CommandMate/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":`CommandMate/${k()}`},cache:"no-store",signal:AbortSignal.timeout(5e3)});if(403===d.status)return function(a){let b=a.headers.get("X-RateLimit-Reset");b?i.rateLimitResetAt=1e3*parseInt(b,10):i.rateLimitResetAt=Date.now()+36e5}(d),i.result;if(!d.ok)return i.result;let e=await d.json(),j=k(),l=e.tag_name.replace(/^v/,""),m={hasUpdate:function(a,b){if(!g.test(a)||!g.test(b))return!1;let c=a=>a.replace(/^v/,"").split(".").map(Number),[d,e,f]=c(a),[h,i,j]=c(b);return h!==d?h>d:i!==e?i>e:j>f}(j,e.tag_name),currentVersion:j,latestVersion:l,releaseUrl:(a=e.html_url).startsWith(f.Dk)?a:null,releaseName:(b=e.name,c=e.tag_name,h.test(b)&&b.length<=128?b:c),publishedAt:e.published_at};return i.result=m,i.fetchedAt=Date.now(),m}catch{return i.result}}},30618:(a,b,c)=>{"use strict";c.d(b,{xT:()=>w,Ui:()=>x});var d=c(44265),e=c(11665),f=c(40236),g=c(93997),h=c(29021),i=c(33873),j=c(72626);let k=(0,j.h)("cli-tools/opencode-config"),l=/^[a-zA-Z0-9._:/-]{1,100}$/,m=/^[a-zA-Z0-9._:/@-]{1,200}$/;async function n(){let a={};try{let b=new AbortController,c=setTimeout(()=>b.abort(),3e3),d=await fetch("http://localhost:11434/api/tags",{signal:b.signal}).finally(()=>{clearTimeout(c)});if(!d.ok)return k.warn("ollama-api-returned"),{};let e=await d.text();if(e.length>1048576)return k.warn("ollama-api-response"),{};let f=JSON.parse(e);if(!f||!Array.isArray(f.models))return k.warn("invalid-ollama-api"),{};for(let b of f.models.slice(0,100))"string"==typeof b?.name&&l.test(b.name)&&(a[b.name]={name:function(a){let b=String(a.name),c=a.details;if(!c)return b;let d=[b];return"string"==typeof c.parameter_size&&/^[\d.]+[BKMGT]?B?$/i.test(c.parameter_size)&&d.push(c.parameter_size),"string"==typeof c.quantization_level&&/^[A-Z0-9_]{1,20}$/i.test(c.quantization_level)&&d.push(c.quantization_level),d.length>1?`${b} (${d.slice(1).join(", ")})`:b}(b)})}catch(a){a instanceof Error&&"AbortError"===a.name?k.warn("ollama-api-timeout"):k.warn("failed-to-fetch")}return a}async function o(){let a={};try{let b=new AbortController,c=setTimeout(()=>b.abort(),3e3),d=await fetch("http://localhost:1234/v1/models",{signal:b.signal}).finally(()=>{clearTimeout(c)});if(!d.ok)return k.warn("lm-studio-api"),{};let e=await d.text();if(e.length>1048576)return k.warn("lm-studio-api"),{};let f=JSON.parse(e);if(!f||!Array.isArray(f.data))return k.warn("invalid-lm-studio"),{};for(let b of f.data.slice(0,100))"string"==typeof b?.id&&m.test(b.id)&&(a[b.id]={name:b.id})}catch(a){a instanceof Error&&"AbortError"===a.name?k.warn("lm-studio-api"):k.warn("failed-to-fetch")}return a}async function p(a){let b=function(a){let b=i.resolve(a);try{if(!h.lstatSync(b).isDirectory())throw Error(`Path is not a directory: ${b}`)}catch(a){if("ENOENT"===a.code)throw Error(`Path does not exist: ${b}`);throw a}return h.realpathSync(b)}(a),c=i.join(b,"opencode.json");if(h.existsSync(c))return;let[d,e]=await Promise.all([n(),o()]),f={};if(Object.keys(d).length>0&&(f.ollama={npm:"@ai-sdk/openai-compatible",name:"Ollama (local)",options:{baseURL:"http://localhost:11434/v1"},models:d}),Object.keys(e).length>0&&(f.lmstudio={npm:"@ai-sdk/openai-compatible",name:"LM Studio (local)",options:{baseURL:"http://localhost:1234/v1"},models:e}),0!==Object.keys(f).length)try{h.writeFileSync(c,JSON.stringify({$schema:"https://opencode.ai/config.json",provider:f},null,2),{encoding:"utf-8",flag:"wx"})}catch(a){if("EEXIST"===a.code)return;k.warn("failed-to-write-opencodejson:error-insta")}}var q=c(79646),r=c(28354),s=c(20610);let t=(0,j.h)("cli-tools/opencode"),u=(0,r.promisify)(q.execFile);function v(a){return a instanceof Error?a.message:String(a)}let w=200;class x extends d.M{async isRunning(a,b){let c=this.getSessionName(a,b);return await (0,e.N)(c)}async startSession(a,b,c){if(!await this.isInstalled())throw Error("OpenCode is not installed or not in PATH");let d=this.getSessionName(a,c);if(await (0,e.N)(d)){await this.reconcileExistingSession(d,{windowWidth:80,windowHeight:w}),t.info("opencode-session-sessionname");return}try{await p(b),await (0,e.jw)({sessionName:d,workingDirectory:b}),await new Promise(a=>setTimeout(a,s.Uc));try{await u("tmux",["resize-window","-t",(0,e.lA)(d),"-x","80","-y",String(w)])}catch{}await (0,e.V1)(d,"opencode",!0),await new Promise(a=>setTimeout(a,15e3)),t.info("started-opencode-session:sessionname")}catch(b){let a=v(b);throw Error(`Failed to start OpenCode session: ${a}`)}}async sendMessage(a,b,c){let d=this.getSessionName(a,c);if(!await (0,e.N)(d))throw Error(`OpenCode session ${d} does not exist. Start the session first.`);try{await (0,f.FW)({sessionName:d,message:b,cliToolId:"opencode"}),(0,g.gm)(d),t.info("sent-message-to-opencode-session:session")}catch(b){let a=v(b);throw Error(`Failed to send message to OpenCode: ${a}`)}}async killSession(a,b){let c=this.getSessionName(a,b);try{await (0,e.N)(c)?(await (0,e.V1)(c,"/exit",!0),await new Promise(a=>setTimeout(a,s.KI)),await (0,e.N)(c)&&await (0,e.fY)(c)):await (0,e.fY)(c),(0,g.gm)(c),t.info("stopped-opencode-session:sessionname")}catch(a){throw t.error("session:stop-failed",{error:v(a)}),a}}constructor(...a){super(...a),this.id="opencode",this.name="OpenCode",this.command="opencode"}}},31268:(a,b,c)=>{"use strict";c.d(b,{s:()=>K});var d=c(44265),e=c(57905);class f extends d.M{async isInstalled(){return await (0,e.zw)()}async isRunning(a,b){return await (0,e.Yq)(a,b)}async startSession(a,b,c){await (0,e.R7)({worktreeId:a,worktreePath:b,instanceId:c})}async sendMessage(a,b,c){await (0,e.pU)(a,b,c)}supportsImage(){return!0}async sendMessageWithImage(a,b,c,d){let e=`
|
|
2
|
+
`,f=b?`${b}${e}`:e;await this.sendMessage(a,f,d)}async killSession(a,b){await (0,e.VU)(a,b)}constructor(...a){super(...a),this.id="claude",this.name="Claude Code",this.command="claude"}}var g=c(11665),h=c(40236),i=c(93997),j=c(26283),k=c(72626),l=c(20610);let m=(0,k.h)("cli-tools/codex");function n(a){return a instanceof Error?a.message:String(a)}class o extends d.M{async isRunning(a,b){let c=this.getSessionName(a,b);return await (0,g.N)(c)}async startSession(a,b,c){if(!await this.isInstalled())throw Error("Codex CLI is not installed or not in PATH");let d=this.getSessionName(a,c);if(await (0,g.N)(d)){await this.reconcileExistingSession(d),m.info("codex-session-sessionname");return}try{await (0,g.jw)({sessionName:d,workingDirectory:b}),await new Promise(a=>setTimeout(a,l.Uc)),await (0,g.V1)(d,"codex",!0),await new Promise(a=>setTimeout(a,3e3)),await this.waitForReady(d),m.info("started-codex-session:sessionname")}catch(b){let a=n(b);throw Error(`Failed to start Codex session: ${a}`)}}async waitForReady(a){let b=!1,c=!1;for(let d=0;d<30;d++){try{let d=await (0,g.Xg)(a,50),e=(0,j.aJ)(d);if((0,j.zZ)(e))return void m.info("codex-prompt-detected");let f=(0,j.Qh)(e);if("update"===f&&!b){await (0,g.V1)(a,"2",!1),b=!0,m.info("skipped-codex-update"),await new Promise(a=>setTimeout(a,l.CV));continue}if("press-enter"===f){await (0,g.ds)(a,"Enter"),m.info("dismissed-codex-notification"),await new Promise(a=>setTimeout(a,l.CV));continue}if("trust"===f&&!c){await (0,g.V1)(a,"1",!1),c=!0,m.info("auto-trusted-folder-for"),await new Promise(a=>setTimeout(a,l.CV));continue}}catch{}await new Promise(a=>setTimeout(a,1e3))}m.info("codex-prompt-detection")}async waitForPrompt(a){let b=Date.now();for(;Date.now()-b<15e3;){try{let b=await (0,g.Xg)(a,50),c=(0,j.aJ)(b);if((0,j.zZ)(c))return}catch{}await new Promise(a=>setTimeout(a,500))}throw m.info("codex-prompt-not"),Error("Codex prompt not ready: timed out waiting for the input prompt before sending")}async sendMessage(a,b,c){let d=this.getSessionName(a,c);if(!await (0,g.N)(d))throw Error(`Codex session ${d} does not exist. Start the session first.`);try{await this.waitForPrompt(d),await (0,h.FW)({sessionName:d,message:b,cliToolId:"codex"}),(0,i.gm)(d),m.info("sent-message-to-codex-session:sessionnam")}catch(b){let a=n(b);throw Error(`Failed to send message to Codex: ${a}`)}}async killSession(a,b){let c=this.getSessionName(a,b);try{await (0,g.N)(c)&&(await (0,g.ds)(c,"C-d"),await new Promise(a=>setTimeout(a,l.Zf))),await (0,g.fY)(c)&&m.info("stopped-codex-session:sessionname")}catch(a){throw m.error("session:stop-failed",{error:n(a)}),a}}constructor(...a){super(...a),this.id="codex",this.name="Codex CLI",this.command="codex"}}var p=c(11508),q=c(15194),r=c(88807),s=c(56791);let t=(0,k.h)("cli-tools/vibe-local");function u(a){return a instanceof Error?a.message:String(a)}class v extends d.M{async isRunning(a,b){let c=this.getSessionName(a,b);return await (0,g.N)(c)}async startSession(a,b,c){if(!await this.isInstalled())throw Error("vibe-local is not installed or not in PATH");let d=this.getSessionName(a,c);if(await (0,g.N)(d)){await this.reconcileExistingSession(d),t.info("vibe-local-session");return}try{await (0,g.jw)({sessionName:d,workingDirectory:b}),await new Promise(a=>setTimeout(a,l.Uc));let c="vibe-local -y";try{let b=(0,r.getDbInstance)(),d=(0,s.Uim)(b,a);d?.vibeLocalModel&&q.QP.test(d.vibeLocalModel)&&(c+=` -m ${d.vibeLocalModel}`);let e=d?.vibeLocalContextWindow;(0,q.FV)(e)&&(c+=` --context-window ${Number(e)}`)}catch{}await (0,g.V1)(d,c,!0),await new Promise(a=>setTimeout(a,5e3)),t.info("started-vibe-local-session:sessionname")}catch(b){let a=u(b);throw Error(`Failed to start Vibe Local session: ${a}`)}}async sendMessage(a,b,c){let d=this.getSessionName(a,c);if(!await (0,g.N)(d))throw Error(`Vibe Local session ${d} does not exist. Start the session first.`);try{await (0,h.FW)({sessionName:d,message:b,cliToolId:"vibe-local",submitEnterCount:2,interEnterWaitMs:l.PY}),(0,i.gm)(d),t.info("sent-message-to-vibe-local-session:sessi")}catch(b){let a=u(b);throw Error(`Failed to send message to Vibe Local: ${a}`)}}async killSession(a,b){let c=this.getSessionName(a,b);try{await (0,g.N)(c)&&(await (0,g.ds)(c,"C-c"),await new Promise(a=>setTimeout(a,l.Is)),await (0,g.ds)(c,"C-c"),await new Promise(a=>setTimeout(a,l.Zf))),await (0,g.fY)(c)&&t.info("stopped-vibe-local-session:sessionname")}catch(a){throw t.error("session:stop-failed",{error:u(a)}),a}}constructor(...a){super(...a),this.id="vibe-local",this.name="Vibe Local",this.command="vibe-local"}}var w=c(30618),x=c(79646),y=c(56263),z=c(77093);let A=(0,k.h)("cli-tools/copilot"),B=new Set(["model","agent","theme"]);class C extends d.M{async isInstalled(){try{return await new Promise((a,b)=>{(0,x.execFile)("gh",["--version"],{timeout:5e3},c=>{c?b(c):a()})}),await new Promise((a,b)=>{(0,x.execFile)("gh",["copilot","--help"],{timeout:5e3},c=>{c?b(c):a()})}),!0}catch{return!1}}async isRunning(a,b){let c=this.getSessionName(a,b);return await (0,g.N)(c)}async startSession(a,b,c){if(!await this.isInstalled())throw Error("GitHub Copilot CLI is not installed. Install with: gh extension install github/gh-copilot");let d=this.getSessionName(a,c);if(await (0,g.N)(d)){await this.reconcileExistingSession(d),A.info("copilot-session-exists");return}try{await (0,g.jw)({sessionName:d,workingDirectory:b}),await new Promise(a=>setTimeout(a,l.Uc)),await (0,g.V1)(d,"gh copilot",!0),await new Promise(a=>setTimeout(a,4e3)),await this.waitForReady(d),A.info("started-copilot-session")}catch(b){let a=(0,z.u1)(b);throw Error(`Failed to start Copilot session: ${a}`)}}async waitForReady(a){for(let b=0;b<30;b++){try{let b=await (0,g.Xg)(a,50),c=(0,j.aJ)(b);if(j.Du.test(c))return void A.info("copilot-prompt-detected")}catch{}await new Promise(a=>setTimeout(a,1e3))}A.info("copilot-prompt-detection-timeout")}async waitForPrompt(a,b=15e3){let c=Date.now();for(;Date.now()-c<b;){try{let b=await (0,g.Xg)(a,50),c=(0,j.aJ)(b);if(j.Du.test(c))return}catch{}await new Promise(a=>setTimeout(a,500))}A.info("copilot-prompt-not-detected")}extractSlashCommand(a){let b=a.trim();if(!b.startsWith("/"))return null;let c=b.match(/^\/(\S+)/);return c?c[1]:null}async waitForSelectionList(a){let b=Date.now();for(;Date.now()-b<5e3;){await new Promise(a=>setTimeout(a,300));try{let b=await (0,g.Xg)(a,50),c=(0,j.aJ)(b);if(j.Mi.test(c))return A.info("copilot-selection-list-detected"),!0}catch{}}return A.info("copilot-selection-list-not-detected-timeout"),!1}async sendMessage(a,b,c){let d=this.getSessionName(a,c);if(!await (0,g.N)(d))throw Error(`Copilot session ${d} does not exist. Start the session first.`);try{await this.waitForPrompt(d);let a=this.extractSlashCommand(b);if(a&&B.has(a)){await (0,g.V1)(d,b,!0),await this.waitForSelectionList(d),(0,i.gm)(d),A.info("sent-selection-list-command-to-copilot",{command:a});return}await (0,h.FW)({sessionName:d,message:b,cliToolId:"copilot",textInputWaitMs:y.L1,verifyDelayMs:y.wp}),(0,i.gm)(d),A.info("sent-message-to-copilot-session")}catch(b){let a=(0,z.u1)(b);throw Error(`Failed to send message to Copilot: ${a}`)}}async sendModelCommand(a,b,c){let d=this.getSessionName(a,c);if(!await (0,g.N)(d))throw Error(`Copilot session ${d} does not exist. Start the session first.`);try{await (0,g.V1)(d,`/model ${b}`,!0),await this.waitForSelectionList(d)&&await (0,g.ds)(d,"C-m"),await this.waitForPrompt(d,y.pL),(0,i.gm)(d),A.info("copilot-model-switched",{model:b})}catch(c){let a=(0,z.u1)(c);throw Error(`Failed to switch Copilot model to ${b}: ${a}`)}}async killSession(a,b){let c=this.getSessionName(a,b);try{await (0,g.N)(c)&&(await (0,g.ds)(c,"C-c"),await new Promise(a=>setTimeout(a,l.Is)),await (0,g.V1)(c,"exit",!0),await new Promise(a=>setTimeout(a,l.Zf))),await (0,g.fY)(c)&&A.info("stopped-copilot-session")}catch(a){throw A.error("session:stop-failed",{error:(0,z.u1)(a)}),a}}constructor(...a){super(...a),this.id="copilot",this.name="Copilot",this.command="gh"}}let D=(0,k.h)("cli-tools/antigravity");function E(a){return a instanceof Error?a.message:String(a)}let F=/\?\s+for\s+shortcuts/,G=/Do you trust the contents of this project\?/;function H(a){return F.test(a)&&!G.test(a)}class I extends d.M{async isRunning(a,b){let c=this.getSessionName(a,b);return await (0,g.N)(c)}async startSession(a,b,c,d){if(!await this.isInstalled())throw Error("Antigravity CLI (agy) is not installed or not in PATH");let e=this.getSessionName(a,c);if(await (0,g.N)(e)){await this.reconcileExistingSession(e),D.info("antigravity-session-exists");return}try{await (0,g.jw)({sessionName:e,workingDirectory:b}),await new Promise(a=>setTimeout(a,l.Uc));let a=d?`agy --model '${d.replace(/'/g,"'\\''")}'`:"agy";await (0,g.V1)(e,a,!0),await new Promise(a=>setTimeout(a,3e3)),await this.waitForReady(e),D.info("started-antigravity-session")}catch(b){let a=E(b);throw Error(`Failed to start Antigravity session: ${a}`)}}async waitForReady(a){let b=!1;for(let c=0;c<30;c++){try{let c=await (0,g.Xg)(a,50),d=(0,j.aJ)(c);if(H(d))return void D.info("antigravity-prompt-detected");if(!b&&G.test(d)){await (0,g.ds)(a,"Enter"),b=!0,D.info("auto-trusted-folder-for-antigravity"),await new Promise(a=>setTimeout(a,500));continue}}catch{}await new Promise(a=>setTimeout(a,1e3))}D.info("antigravity-prompt-detection-timeout")}async waitForPrompt(a){let b=Date.now();for(;Date.now()-b<15e3;){try{let b=await (0,g.Xg)(a,50),c=(0,j.aJ)(b);if(H(c))return}catch{}await new Promise(a=>setTimeout(a,500))}throw D.info("antigravity-prompt-not-ready"),Error("Antigravity prompt not ready: timed out waiting for the input prompt before sending")}async sendMessage(a,b,c){let d=this.getSessionName(a,c);if(!await (0,g.N)(d))throw Error(`Antigravity session ${d} does not exist. Start the session first.`);try{await this.waitForPrompt(d),await (0,h.FW)({sessionName:d,message:b,cliToolId:"antigravity"}),(0,i.gm)(d),D.info("sent-message-to-antigravity-session")}catch(b){let a=E(b);throw Error(`Failed to send message to Antigravity: ${a}`)}}async killSession(a,b){let c=this.getSessionName(a,b);try{await (0,g.N)(c)&&(await (0,g.ds)(c,"C-d"),await new Promise(a=>setTimeout(a,l.Zf)));let a=await (0,g.fY)(c);(0,i.gm)(c),a&&D.info("stopped-antigravity-session")}catch(a){throw D.error("session:stop-failed",{error:E(a)}),a}}constructor(...a){super(...a),this.id="antigravity",this.name="Antigravity CLI",this.command="agy"}}var J=c(95220);class K{constructor(){this.tools=new Map,this.tools.set("claude",new f),this.tools.set("codex",new o),this.tools.set("gemini",new p.m),this.tools.set("vibe-local",new v),this.tools.set("opencode",new w.Ui),this.tools.set("copilot",new C),this.tools.set("antigravity",new I)}static getInstance(){return K.instance||(K.instance=new K),K.instance}getTool(a){let b=this.tools.get(a);if(!b)throw Error(`CLI tool '${a}' not found`);return b}getAllTools(){return Array.from(this.tools.values())}async getToolInfo(a){let b=this.getTool(a),c=await b.isInstalled();return{id:b.id,name:b.name,command:b.command,installed:c}}async getAllToolsInfo(){return Promise.all(this.getAllTools().map(async a=>{let b=await a.isInstalled();return{id:a.id,name:a.name,command:a.command,installed:b}}))}async getInstalledTools(){return(await this.getAllToolsInfo()).filter(a=>a.installed)}stopPollers(a,b,c){(0,J.stopPolling)(a,b,c)}}},31766:(a,b,c)=>{"use strict";c.d(b,{Wh:()=>p,WD:()=>q,K1:()=>o});var d=c(31268),e=c(72626),f=c(11665);let g={streamingOutput:!1,explicitResize:!1,snapshotFallback:!0};class h{async unsubscribe(){}}class i{async ensureSession(a,b){await (0,f.N)(a)||await (0,f.jw)(a,b)}async sessionExists(a){return(0,f.N)(a)}async sendInput(a,b){await (0,f.V1)(a,b)}async sendSpecialKey(a,b){if("Escape"!==b&&"C-c"!==b&&"C-d"!==b&&"C-m"!==b&&"Enter"!==b)throw Error(`Unsupported special key for PollingTmuxTransport: ${b}`);await (0,f.ds)(a,b)}async resize(){throw Error("PollingTmuxTransport does not support explicit resize")}async captureSnapshot(a,b){return(0,f.Xg)(a,b)}async subscribe(){return new h}getCapabilities(){return g}async killSession(a){return(0,f.fY)(a)}}let j=null;var k=c(93997);let l=(0,e.h)("cli-session");function m(){return j||(j=new i),j}function n(a,b,c){let e=d.s.getInstance().getTool(b),f=e.getSessionName(a,c);return{cliTool:e,sessionName:f}}async function o(a,b,c){let{sessionName:d}=n(a,b,c);return m().sessionExists(d)}async function p(a,b,c=1e3,d){let e=l.withContext({worktreeId:a,cliToolId:b});e.debug("captureSessionOutput:start",{requestedLines:c});let{cliTool:f,sessionName:g}=n(a,b,d),h=m();try{let a=await (0,k.aq)(g,c,async()=>{if(!await h.sessionExists(g))throw Error(`${f.name} session ${g} does not exist`);return await h.captureSnapshot(g,{startLine:-k.xE})});return e.debug("captureSessionOutput:success",{actualLines:a.split("\n").length,lastFewLines:a.split("\n").slice(-3).join(" | ")}),a}catch(b){let a=b instanceof Error?b.message:String(b);if(a.includes("does not exist"))throw e.debug("captureSessionOutput:sessionNotFound",{sessionName:g}),b;throw e.error("captureSessionOutput:failed",{error:a}),Error(`Failed to capture ${f.name} output: ${a}`)}}async function q(a,b,c=5e3,d){let e=l.withContext({worktreeId:a,cliToolId:b});e.debug("captureSessionOutputFresh:start",{requestedLines:c});let{cliTool:f,sessionName:g}=n(a,b,d),h=m();try{let a=await h.captureSnapshot(g,{startLine:-c});return a.length>0?(0,k.vF)(g,a,c):(0,k.gm)(g),(0,k.wd)(a,c)}catch(b){(0,k.gm)(g);let a=b instanceof Error?b.message:String(b);throw e.error("captureSessionOutputFresh:failed",{error:a}),Error(`Failed to capture ${f.name} output: ${a}`)}}},34405:(a,b,c)=>{"use strict";c.d(b,{G:()=>e,_:()=>d});let d=1e4,e=1e3},34892:(a,b,c)=>{"use strict";c.d(b,{$:()=>m});var d=c(56791),e=c(31268),f=c(31766),g=c(95595),h=c(18896),i=c(52277),j=c(34405),k=c(93997),l=c(48083);async function m(a,b,c,m){let n=m??c,o=e.s.getInstance().getTool(c),p=(0,l.CE)(b,c,m);if(!await o.isRunning(b,m))return{isRunning:!1,content:"",lineCount:0,cliToolId:c,sessionStatus:"idle",sessionStatusReason:"session_not_running",lastStopEventAt:p};let q=(0,d.y1O)(a,b,n),r=q?.lastCapturedLine||0,s=await (0,f.Wh)(b,c,j._,m),t=s.split("\n"),u=t.length,v=((0,k.sl)(u,Math.min(j._,k.xE))?t:t.slice(Math.max(0,r))).join("\n"),w=(0,h.v7)(b,c,m),x=(0,h.xU)(w),y=x?new Date(x):void 0,z=(0,g.WC)(s,c,y),A="running"===z.status&&z.reason===g.gv.THINKING_INDICATOR,B=z.hasActivePrompt,C="waiting"===z.status&&g.ug.has(z.reason),D=z.reason===g.gv.CODEX_PAGER,E="running"===z.status&&z.reason===g.gv.DEFAULT||"ready"===z.status&&z.reason===g.gv.NO_RECENT_OUTPUT,F=t.slice(-100).join("\n"),G=(0,h.aq)(b,c,m);return{isRunning:!0,cliToolId:c,sessionStatus:z.status,sessionStatusReason:z.reason,content:v,fullOutput:s,realtimeSnippet:F,lineCount:u,lastCapturedLine:r,isComplete:B,isGenerating:A,thinking:A,thinkingMessage:A?"Claude is thinking...":null,isPromptWaiting:B,promptData:B?z.promptDetection.promptData??null:null,autoYes:{enabled:G?.enabled??!1,expiresAt:G?.enabled?G.expiresAt:null,stopReason:G?.stopReason,lastSuppression:(0,i.gb)(b,c,m)},isSelectionListActive:C,isPagerActive:D,isUnclassifiedActive:E,lastServerResponseTimestamp:x,serverPollerActive:(0,h.bZ)(w),lastStopEventAt:p}}},39727:()=>{},40236:(a,b,c)=>{"use strict";c.d(b,{FW:()=>l});var d=c(11665),e=c(93997),f=c(26283),g=c(20610);let h=(0,c(72626).h)("cli-tools/submit-verified-sender"),i=/\[Pasted text[\s#]/,j=/^\/[A-Za-z]/,k=/^\s*(?:ctx:\d+%\s*)?[>❯›]/;async function l(a){let{sessionName:b,message:c,cliToolId:l,textInputWaitMs:m=g.pL,submitEnterCount:n=1,interEnterWaitMs:o=g.pL,verifyAttempts:p=4,verifyDelayMs:q=g.x9}=a;await (0,d.V1)(b,c,!1),await new Promise(a=>setTimeout(a,m));for(let a=0;a<Math.max(1,n);a++)await (0,d.KB)(b,["Enter"]),a<n-1&&await new Promise(a=>setTimeout(a,o));let r=Math.max(1,p);for(let a=0;a<r;a++){await new Promise(a=>setTimeout(a,q));let g=function(a,b,c){let d=(0,f.aJ)(a).split("\n").slice(-12),e=d.join("\n");if((0,f.ut)(b,e))return"submitted";let g=function(a){for(let b=a.length-1;b>=0;b--)if(k.test(a[b]))return a[b];return null}(d);if(!g)return"submitted";let h=g.replace(k,"").trim();return 0===h.length?"submitted":i.test(g)||function(a,b){let c=b.split("\n").map(a=>a.trim()).find(a=>a.length>0)??"";return 0!==c.length&&c.startsWith(a)}(h,c)?"pending":j.test(h)?"replaced":"submitted"}(await (0,d.Xg)(b,{startLine:-12}),l,c);if("submitted"===g)return void(0,e.gm)(b);if("replaced"===g){try{await (0,d.Ce)(b)}catch(a){h.error("submit-clear-input-failed",{sessionName:b,cliToolId:l,error:a instanceof Error?a.message:String(a)})}throw(0,e.gm)(b),h.error("submit-replaced-by-tui-completion",{sessionName:b,cliToolId:l,attempt:a}),Error(`Message was replaced by a TUI autocompletion for session ${b}; the input no longer matches the sent text. Cleared the input line without submitting to avoid executing a different command.`)}h.warn("submit-not-confirmed:resending-enter",{sessionName:b,cliToolId:l,attempt:a}),await (0,d.KB)(b,["Enter"])}throw(0,e.gm)(b),h.error("submit-verification-failed",{sessionName:b,cliToolId:l,attempts:r}),Error(`Message submit could not be confirmed for session ${b} after ${r} attempts (typed but unsent)`)}},41364:(a,b,c)=>{"use strict";c.d(b,{Gv:()=>o,hM:()=>n});var d=c(79748),e=c.n(d),f=c(33873),g=c.n(f),h=c(1634),i=c(21684),j=c(72626),k=c(15194);function l(a="claude"){return g().join((0,i.U)(),a)}async function m(a="claude"){let b=l(a);try{await e().access(b)}catch{await e().mkdir(b,{recursive:!0})}}async function n(a,b,c,d="claude"){await m(d);let f=function(a,b="claude"){let c=(0,h.GP)(new Date,"yyyy-MM-dd"),d=`${a}-${c}.md`,e=l(b);return g().join(e,d)}(a,d),i=(0,h.GP)(new Date,"yyyy-MM-dd HH:mm:ss"),j="";try{j=await e().readFile(f,"utf-8")}catch{let b=(0,k.hR)(d)?k.ef[d]:d;j=`# ${b} Conversation Log: ${a}
|
|
3
3
|
|
|
4
4
|
Created: ${i}
|
|
5
5
|
|
|
@@ -17,4 +17,11 @@ Created: ${i}
|
|
|
17
17
|
|
|
18
18
|
`,j+=`---
|
|
19
19
|
|
|
20
|
-
`,await e().writeFile(f,j,"utf-8"),f}async function o(a,b="all"){let c="all"===b?[...k.XH]:[b],d=[];for(let b of c){await m(b);let c=l(b);try{let b=(await e().readdir(c)).filter(b=>b.startsWith(`${a}-`)&&b.endsWith(".md")).map(a=>g().join(c,a));d.push(...b)}catch{}}return d.sort().reverse()}(0,j.h)("log-manager")},44265:(a,b,c)=>{"use strict";c.d(b,{M:()=>k});var d=c(79646),e=c(28354),f=c(15194);let g=/^[a-zA-Z0-9_-]+$/;function h(a){if(!g.test(a))throw Error(`Invalid session name format: ${a}`)}var i=c(11665);let j=(0,e.promisify)(d.exec);class k{async isInstalled(){try{return await j(`which ${this.command}`,{timeout:5e3}),!0}catch{return!1}}getSessionName(a,b){let c=`mcbd-${this.id}-${a}`;if(!b||b===this.id)return h(c),c;let d=(0,f.pL)(b,this.id),e=d?`${c}-${d}`:c;return h(e),e}async reconcileExistingSession(a,b){await (0,i.zT)(a,b)}async interrupt(a,b){let c=this.getSessionName(a,b);await (0,i.ds)(c,"Escape")}}},45146:(a,b,c)=>{"use strict";c.d(b,{Et:()=>q,KQ:()=>s,MN:()=>n,SI:()=>k,fq:()=>r,g8:()=>o});var d=c(72626),e=c(13033),f=c(72457),g=c(71080),h=c(3523),i=c(99508);let j=(0,d.h)("response-poller"),k=["Waiting for auth","⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"],l=new Map,m=new Map;function n(a,b,c){return`${a}:${c??b}`}function o(a,b,c){let d=n(a,b,c);q(a,b,c),m.set(d,Date.now()),("opencode"===b||"copilot"===b)&&(0,e.tb)(d),function a(b,c,d){let e=n(b,c,d),f=setTimeout(async()=>{let f=m.get(e);if(f&&Date.now()-f>18e5)return void q(b,c,d);try{await (0,h.zX)(b,c,d)}catch(a){j.error("error:",{error:a instanceof Error?a.message:String(a)})}(0,i.broadcastTerminalSnapshot)(b,c,d),l.has(e)&&a(b,c,d)},2e3);l.set(e,f)}(a,b,c)}function p(a){let b=l.get(a);b&&(clearTimeout(b),l.delete(a),m.delete(a)),(0,e.q1)(a),(0,f.iX)(a),(0,g.L)(a)}function q(a,b,c){p(n(a,b,c))}function r(){for(let a of Array.from(l.keys()))p(a)}function s(){return Array.from(l.keys())}},46423:(a,b,c)=>{"use strict";c.d(b,{$:()=>d});let d=5},47990:()=>{},49358:a=>{"use strict";a.exports=JSON.parse('{"title":"Notifications","description":"Get a push notification when an agent is waiting for you or finishes a session — even when the app is closed.","enable":"Enable notifications","enabling":"Enabling…","enabledOnThisDevice":"Notifications are enabled on this device.","unsubscribe":"Unsubscribe this device","types":{"heading":"Notify me about","promptWaiting":"Prompt waiting","promptWaitingDesc":"When an agent is waiting for your reply","completion":"Session complete","completionDesc":"When an agent finishes a session"},"permission":{"denied":"Notifications are blocked in your browser settings. Allow them for this site to receive push notifications."},"unsupported":"This browser does not support push notifications.","notConfigured":"Push notifications are not configured on this server. Set the VAPID keys to enable them.","ios":{"guidance":"On iPhone/iPad, add this app to your Home Screen and open it from there to enable notifications."},"toast":{"enabled":"Notifications enabled on this device","disabled":"Notifications turned off on this device","error":"Could not enable notifications","updated":"Notification settings updated"},"push":{"promptWaitingWithExcerpt":"Waiting for reply: {excerpt}","promptWaiting":"Waiting for your reply","completionWithExcerpt":"Done: {excerpt}","completion":"Session complete"}}')},56263:(a,b,c)=>{"use strict";c.d(b,{L1:()=>e,MJ:()=>j,Rf:()=>f,ky:()=>g,lM:()=>i,pL:()=>h,wp:()=>d});let d=200,e=100,f=1e5,g="[... truncated ...]",h=3e4,i=/^[a-zA-Z0-9][a-zA-Z0-9\-._/:]*$/,j=128},57905:(a,b,c)=>{"use strict";c.d(b,{c0:()=>I,zw:()=>E,Yq:()=>F,oV:()=>B,pU:()=>H,R7:()=>G,VU:()=>J});var d=c(11665),e=c(26283),f=c(40236),g=c(93997),h=c(77093),i=c(20610),j=c(79646),k=c(28354),l=c(72626);let m=(0,l.h)("session-key-sender"),n=(0,k.promisify)(j.exec);async function o(a,b=50){let c=await (0,d.Xg)(a,{startLine:-b});return(0,e.aJ)(c)}async function p(a){await n("tmux set-environment -g -u CLAUDECODE 2>/dev/null || true"),await (0,d.V1)(a,"unset CLAUDECODE",!0),await new Promise(a=>setTimeout(a,i.Em))}async function q(a,b){let c=Date.now();for(;Date.now()-c<b;){let b=await o(a);if(e.hx.test(b))return;await new Promise(a=>setTimeout(a,200))}throw Error(`Prompt detection timeout (${b}ms)`)}async function r(a,b,c,h){if(!await (0,d.N)(a))throw Error(`Claude session ${a} does not exist. Start the session first.`);let i=await o(a);e.hx.test(i)||await q(a,h),await new Promise(a=>setTimeout(a,c)),await (0,f.FW)({sessionName:a,message:b,cliToolId:"claude"}),(0,g.gm)(a),m.info("sent-message-to-session",{sessionName:a})}async function s(a){try{await (0,d.N)(a)&&(await (0,d.V1)(a,"",!1),await (0,d.ds)(a,"C-d"),(0,g.gm)(a),await new Promise(a=>setTimeout(a,i.Zf)));let b=await (0,d.fY)(a);return b&&m.info("stopped-session",{sessionName:a}),b}catch(a){return m.error("session:stop-failed",{error:(0,h.u1)(a)}),!1}}var t=c(79748),u=c(15194);let v=(0,l.h)("claude-session"),w=(0,k.promisify)(j.exec),x=["$","%","#"],y=null;async function z(){if(y)return y;let a=process.env.CLAUDE_PATH;if(a&&(/^[/a-zA-Z0-9._-]+$/.test(a)?!a.includes("..")||(v.info("claudepath-contains-path"),!1):(v.info("claudepath-contains-invalid-characters-i"),!1)))try{return await (0,t.access)(a,t.constants.X_OK),y=a}catch{v.info("claudepath-is-not-executable:envclaudepa")}try{let{stdout:a}=await w("which claude",{timeout:5e3});return y=a.trim()}catch{for(let a of["/opt/homebrew/bin/claude","/usr/local/bin/claude","/usr/bin/claude"])try{return await w(`test -x "${a}"`,{timeout:1e3}),y=a}catch{}throw Error("Claude CLI not found. Set CLAUDE_PATH environment variable or install Claude CLI.")}}async function A(a,b=50){let c=await (0,d.Xg)(a,{startLine:-b});return(0,e.aJ)(c)}async function B(a){try{let b=(await A(a)).trim();if(""===b)return{healthy:!1,reason:"empty output"};if(e.hx.test(b))return{healthy:!0};let c=b.split("\n").filter(a=>""!==a.trim()),d=c.slice(-10).join("\n");for(let a of e.F0)if(d.includes(a))return{healthy:!1,reason:`error pattern: ${a}`};for(let a of e.Fw)if(a.test(d))return{healthy:!1,reason:`error pattern: ${a.source}`};let f=c[c.length-1]?.trim()??"";if(f.length>=40)return{healthy:!0};if(x.some(a=>!(!f.endsWith(a)||"%"===a&&/\d+%$/.test(f))))return{healthy:!1,reason:`shell prompt ending detected: ${f}`};return{healthy:!0}}catch{return{healthy:!1,reason:"capture error"}}}async function C(a){return!!(await B(a)).healthy||(v.warn("session-sessionname-unhealthy:resultreas"),await (0,d.fY)(a),!1)}function D(a,b){let c=`mcbd-claude-${a}`;if(!b||"claude"===b)return c;let d=(0,u.pL)(b,"claude");return d?`${c}-${d}`:c}async function E(){try{return await w("which claude",{timeout:5e3}),!0}catch{return!1}}async function F(a,b){let c=D(a,b);return!!await (0,d.N)(c)&&(!!(await B(c)).healthy||(v.warn("session-sessionname-unhealthy:resultreas"),!1))}async function G(a){let{worktreeId:b,worktreePath:c,instanceId:f}=a;if(!await E())throw Error("Claude CLI is not installed or not in PATH");let g=D(b,f);if(await (0,d.N)(g)&&await C(g)){await (0,d.zT)(g),v.info("claude-session-sessionname");return}try{await (0,d.jw)({sessionName:g,workingDirectory:c}),await p(g);let a=await z();await (0,d.V1)(g,a,!0);let b=Date.now(),f=!1,h=!1;for(;Date.now()-b<15e3;){await new Promise(a=>setTimeout(a,300));try{let a=await A(g);if(e.hx.test(a)){await new Promise(a=>setTimeout(a,500)),v.info("claude-initialized-in"),f=!0;break}!h&&e.CX.test(a)&&(await (0,d.V1)(g,"",!0),h=!0,v.info("trust-dialog-detected"))}catch{}}if(!f)throw Error("Claude initialization timeout (15000ms)");v.info("started-claude-session:sessionname")}catch(a){throw y=null,v.error("session:start-failed",{error:a instanceof Error?a.message:String(a)}),Error("Failed to start Claude session")}}async function H(a,b,c){let d=D(a,c);await r(d,b,500,1e4)}async function I(a,b=1e3,c){let e=D(a,c);if(!await (0,d.N)(e))throw Error(`Claude session ${e} does not exist`);try{return await (0,d.Xg)(e,{startLine:-b})}catch(a){throw Error(`Failed to capture Claude output: ${a instanceof Error?a.message:String(a)}`)}}async function J(a,b){return s(D(a,b))}},61296:a=>{"use strict";a.exports=JSON.parse('{"title":"通知","description":"エージェントが応答待ちになったり、セッションが完了したときに、アプリを開いていなくてもプッシュ通知を受け取れます。","enable":"通知を有効にする","enabling":"有効化中…","enabledOnThisDevice":"この端末で通知が有効です。","unsubscribe":"この端末の通知を解除","types":{"heading":"通知する種別","promptWaiting":"応答待ち","promptWaitingDesc":"エージェントがあなたの応答を待っているとき","completion":"セッション完了","completionDesc":"エージェントがセッションを完了したとき"},"permission":{"denied":"ブラウザの設定で通知がブロックされています。このサイトの通知を許可してください。"},"unsupported":"このブラウザはプッシュ通知に対応していません。","notConfigured":"このサーバーではプッシュ通知が設定されていません。VAPID鍵を設定すると有効になります。","ios":{"guidance":"iPhone/iPadでは、このアプリをホーム画面に追加し、そこから開くと通知を有効にできます。"},"toast":{"enabled":"この端末で通知を有効にしました","disabled":"この端末の通知をオフにしました","error":"通知を有効にできませんでした","updated":"通知設定を更新しました"},"push":{"promptWaitingWithExcerpt":"応答待ち: {excerpt}","promptWaiting":"応答待ちです","completionWithExcerpt":"完了: {excerpt}","completion":"セッションが完了しました"}}')},63865:(a,b,c)=>{"use strict";function d(){let a=process.env.CM_VAPID_PUBLIC_KEY?.trim(),b=process.env.CM_VAPID_PRIVATE_KEY?.trim();return a&&b?{publicKey:a,privateKey:b,subject:process.env.CM_VAPID_SUBJECT?.trim()||"mailto:commandmate@localhost"}:null}function e(){return d()?.publicKey??null}c.d(b,{HR:()=>e,J$:()=>t});var f=c(48975),g=c.n(f),h=c(88807),i=c(43167),j=c(72626),k=c(25754),l=c(49358),m=c(61296),n=c(55511);let o=new Map,p=(0,j.h)("push/sender"),q={en:l.push,ja:m.push};function r(a){return(0,k.d9)(a)?a:k.Xn}async function s(a,b){try{await g().sendNotification({endpoint:a.endpoint,keys:a.keys},b)}catch(c){let b=c.statusCode;if(404===b||410===b){(0,i.th)((0,h.getDbInstance)(),a.endpoint),p.info("push-subscription-removed",{statusCode:b});return}p.warn("push-send-failed",{statusCode:b??"unknown"})}}async function t(a){try{let b=d();if(!b||!function(a,b=Date.now(),c=3e4){var d;let e=`${a.worktreeId}:${a.kind}`,f=(d=a.content??"",(0,n.createHash)("sha256").update(d).digest("hex")),g=o.get(e);return(!g||g.hash!==f||!(b-g.at<c))&&(o.set(e,{hash:f,at:b}),!0)}({worktreeId:a.worktreeId,kind:a.kind,content:a.excerpt}))return;let c=(0,h.getDbInstance)(),e=(0,i.gn)(c,a.kind);if(0===e.length)return;g().setVapidDetails(b.subject,b.publicKey,b.privateKey);let f=new Map;for(let a of e){let b=r(a.locale),c=f.get(b);c?c.push(a):f.set(b,[a])}await Promise.all(Array.from(f,([b,c])=>{let d=JSON.stringify(function(a,b=k.Xn,c=Date.now()){let d=function(a,b=120){if(!a)return"";let c=a.replace(/\s+/g," ").trim();return c.length<=b?c:c.slice(0,b-1).trimEnd()+"…"}(a.excerpt),e=a.agentName?` (${a.agentName})`:"",f=`${a.worktreeName}${e}`,g=q[r(b)],h="prompt"===a.kind?d?g.promptWaitingWithExcerpt.replace("{excerpt}",d):g.promptWaiting:d?g.completionWithExcerpt.replace("{excerpt}",d):g.completion;return{kind:a.kind,title:f,body:h,worktreeId:a.worktreeId,url:`/worktrees/${a.worktreeId}`,tag:`${a.worktreeId}:${a.kind}`,timestamp:c}}(a,b));return Promise.all(c.map(a=>s(a,d)))}))}catch(a){p.warn("push-fanout-error",{error:a instanceof Error?a.message:String(a)})}}},63869:(a,b,c)=>{"use strict";c.d(b,{t:()=>j});var d=c(11665),e=c(81254),f=c(93997),g=c(20610);let h=/^\[[ x]\] /;function i(a){if(0===a)return[];let b=a>0?"Down":"Up";return Array.from({length:Math.abs(a)},()=>b)}async function j(a){let{sessionName:b,answer:c,cliToolId:j,promptData:k,fallbackPromptType:l,fallbackDefaultOptionNumber:m}=a;if(("claude"===j||"antigravity"===j)&&(k?.type==="multiple_choice"||"multiple_choice"===l)&&/^\d+$/.test(c)){let a,e=parseInt(c,10),f=null;if(k?.type==="multiple_choice"){let b=(f=k.options).find(a=>a.isDefault);a=b?.number??1}else a=m??1;let g=e-a;if(null!==f&&f.some(a=>h.test(a.label))&&null!==f){let a=f.filter(a=>h.test(a.label)).length,c=[...i(g),"Space"];c.push(...i(a-e+1)),c.push("Enter"),await (0,d.KB)(b,c)}else{let a=i(g),c=k?.type==="multiple_choice"&&!0===k.isAskUserQuestion&&0===g?["Down","Up","Enter"]:[...a,"Enter"];await (0,d.KB)(b,c)}}else{await (0,d.V1)(b,c,!1);let f=function(a){let b=(a.promptData?.type==="multiple_choice"?a.promptData.submitMode:void 0)??a.fallbackSubmitMode??"answer_then_enter";return(0,e.M)(b)?b:"answer_then_enter"}(a);"answer_only"===f&&(a.promptData?.type==="multiple_choice"||"multiple_choice"===a.fallbackPromptType)&&/^\d+$/.test(a.answer)||(await new Promise(a=>setTimeout(a,g.pL)),await (0,d.V1)(b,"",!0))}(0,f.gm)(b)}},68652:(a,b,c)=>{"use strict";c.d(b,{N:()=>g});let d=/Esc\s+to\s+cancel\s*[·•]\s*Tab\s+to\s+amend/i,e=/Enter\s+to\s+select\b.*\bnavigate\b/i,f=/^\s*[>❯]\s*(?:\d{1,2}[.)])?|esc\s+to\s+interrupt|[✻✽✶✢✳⦿◉●⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]\s+.+…/i;function g(a){if(""===a)return"";let b=a.split("\n"),c=-1;for(let a=b.length-1;a>=0;a--){var g;if(g=b[a],d.test(g)||e.test(g)){c=a;break}}let h=b;return c>=0&&(h=b.slice(c+1).some(a=>f.test(a))?b.slice(c+1):b.slice(0,c+1)),(function(a){let b=[],c=!1;for(let d of a){let a=""===d.trim();a&&c||(b.push(d),c=a)}for(;b.length>0&&""===b[b.length-1].trim();)b.pop();return b})(h).join("\n")}},69297:(a,b,c)=>{"use strict";c.d(b,{mq:()=>l,Lo:()=>n,TB:()=>o,h7:()=>m});var d=c(81503);c(91645),c(93390),c(3453);c(15194),c(31268),c(88807),c(56791);var e=c(11665),f=c(72626),g=c(79646);(0,f.h)("tmux-control-client");(0,f.h)("tmux-control-registry");c(7015),c(26838);let h=(0,f.h)("ws-server"),i=new Map,j=new Map;function k(a,b){let c=j.get(a);if(c&&0!==c.size)try{let e=JSON.stringify({type:"broadcast",worktreeId:a,data:b});c.forEach(a=>{if(a.readyState===d.kb.OPEN)try{a.send(e)}catch(a){h.error("broadcast:send-failed",{error:a instanceof Error?a.message:String(a)})}})}catch(b){h.error("broadcast:failed",{worktreeId:a,error:b instanceof Error?b.message:String(b)});try{let b=JSON.stringify({type:"broadcast",worktreeId:a,data:{error:"Message encoding error"}});c.forEach(a=>{if(a.readyState===d.kb.OPEN)try{a.send(b)}catch{}})}catch(a){h.error("fallback:send-failed",{error:a instanceof Error?a.message:String(a)})}}}function l(a,b){k(a,b)}function m(a){let b=j.get(a);return!!b&&b.size>0}function n(a,b){b.worktreeId?k(b.worktreeId,{type:a,...b}):h.warn("broadcast:missing-worktree-id")}function o(a){for(let b of a){let a=j.get(b);a&&(a.forEach(a=>{let c=i.get(a);c&&c.worktreeIds.delete(b)}),j.delete(b))}}},71080:(a,b,c)=>{"use strict";c.d(b,{L:()=>g,j:()=>f});var d=c(55511);let e=new Map;function f(a,b){let c=(0,d.createHash)("sha256").update(b).digest("hex");return e.get(a)===c||(e.set(a,c),!1)}function g(a){e.delete(a)}},72457:(a,b,c)=>{"use strict";c.d(b,{gv:()=>f,iX:()=>g,zm:()=>h});var d=c(55511);let e=new Map;function f(a,b){let c=(0,d.createHash)("sha256").update(b).digest("hex");return e.get(a)===c||(e.set(a,c),!1)}function g(a){e.delete(a)}function h(a,b){return"copilot"!==b?a:a.replace(/^[❯>]\s/gm," ")}},77093:(a,b,c)=>{"use strict";function d(a){return a instanceof Error?a.message:String(a)}c.d(b,{u1:()=>d})},81254:(a,b,c)=>{"use strict";function d(a){return"answer_only"===a||"answer_then_enter"===a}c.d(b,{M:()=>d})},82450:(a,b,c)=>{"use strict";c.d(b,{IS:()=>h,LH:()=>m,NN:()=>g,Sj:()=>o,aW:()=>n});var d=c(26283),e=c(13033),f=c(56263);function g(a){let b=(0,d.aJ)(a).split("\n"),c=(0,d.GT)(b),e=c>=0?b.slice(0,c):b,f=-1;for(let a=e.length-1;a>=0;a--)if(/^❯\s+\S/.test(e[a])){f=a;break}let g=f>=0?f+1:0,h=e.slice(g),i=[/CLAUDE_HOOKS_/,/\/bin\/claude/,/^claude\s*$/,/@.*\s+%\s*$/,/^[^⏺]*curl.*POST/,/^[^⏺]*Content-Type/,/^[^⏺]*export\s+CLAUDE_/,/^\s*$/,/^[╭╮╰╯│─\s]+$/,/^[│╭╮╰╯].*[│╭╮╰╯]$/,/Claude Code v[\d.]+/,/^Tips for getting started/,/^Welcome back/,/Run \/init to create/,/^Recent activity/,/^No recent activity/,/▐▛███▜▌|▝▜█████▛▘|▘▘ ▝▝/,/^\s*Opus \d+\.\d+\s*·\s*Claude Max/,/\.com's Organization/,/\?\s*for shortcuts\s*$/,/^─{10,}$/,/^❯\s*$/,d.fW],j=[];for(let a of h)!i.some(b=>b.test(a))&&a.trim()&&j.push(a);return j.join("\n").trim()}function h(a){let b=(0,d.aJ)(a).split("\n"),c=[],e=[/^maenokota@.*%/,/^zsh:/,/^feature-issue-\d+/,/^\s*$/],f=!1,g=[];for(let a of b){if(a.includes("✦")){f=!0;let b=a.indexOf("✦"),c=a.substring(b+1).trim();c&&g.push(c);continue}if(f){if(e.some(b=>b.test(a)))continue;g.push(a)}}if(g.length>0)return g.join("\n").trim();for(let a of b)e.some(b=>b.test(a))||c.push(a);return c.join("\n").trim()}let i=/^●\s+(?:Get |Read |Run |Search |Write |Delete |Edit |List |Create |Check |Fetch |Map |Explore |Execute |Find |Install |Update |Open |Close |Copy |Move |Rename |Set |Test |Build |Deploy |Start |Stop |Restart |Kill |Call |Send |Upload |Download |Compile |Analyze |Scan |Apply |Revert |Reset |Push |Pull |Clone |Merge |Commit |Checkout |Branch |Tag |Diff |Log |Show |Status |Init |Config |Add |Remove |Index |Query |Connect |Disconnect |Ping |Trace |Debug |Validate |Verify |Inspect |Monitor |Watch |Clean |Purge |Flush |Load |Save |Export |Import |Format |Lint |Parse |Generate |Transform |Convert |Migrate |Upgrade |Patch |Enable |Disable |Grant |Revoke |Approve |Deny |Lock |Unlock |Mount |Unmount |Attach |Detach |Register |Unregister |Subscribe |Unsubscribe |Publish |Unpublish |Encrypt |Decrypt |Sign |Hash |Encode |Decode |Compress |Decompress |Archive |Extract |Backup |Restore |Dump |Model changed to:)/,j=/^\d+\s+lines\.\.\.$/,k=/^[◐◑◒◓]/,l=/^(?:git\s+--no-pager|git\s+(?:log|diff|show|status|branch|remote|fetch|pull|push|merge|rebase|checkout|reset|stash|tag|config|clone|init|add|commit|rm|mv|bisect|grep|ls-files|rev-parse|describe|shortlog|blame|reflog|cherry-pick|revert|submodule|worktree)\b|npm\s+|npx\s+|node\s+|yarn\s+|pnpm\s+|cargo\s+|pip\s+|python\s+|ruby\s+|go\s+|rustc\s+|make\s+|cmake\s+|docker\s+|kubectl\s+|aws\s+|gcloud\s+|az\s+|terraform\s+|ansible\s+|curl\s+|wget\s+|ssh\s+|scp\s+|rsync\s+|find\s+|grep\s+|sed\s+|awk\s+|cat\s+|ls\s+|cd\s+|mkdir\s+|rm\s+|cp\s+|mv\s+|chmod\s+|chown\s+|echo\s+)/;function m(a){let b=(0,d.aJ)(a).split("\n"),c=-1;for(let a=b.length-1;a>=0;a--){let d=(0,e.IW)(b[a]);if(d&&/^❯\s+\S/.test(d)){c=a;break}}let f=c>=0?c+1:0,g=b.slice(f),h=[],m=!1,n=!1;for(let a of g){let b=(0,e.IW)(a);if(!(!b||d.J7.some(a=>a.test(b)))){if(i.test(b)){n=!0,m=!1;continue}if(k.test(b)){m=!0,n=!1;continue}if(!(j.test(b)||l.test(b)||/^❯\s*/.test(b)||/^[│└]/.test(b))){if(/^●/.test(b)){m=!1,n=!1,h.push(b.replace(/^●\s*/,""));continue}m||n||h.push(b)}}}return h.join("\n").trim()}function n(a){let b=a.split("\n"),c=[];for(let a=0;a<b.length;a++){let f=(0,e.l1)(b[a]);f&&d.Md.test(f)&&c.push(a)}let f=0;c.length>=2&&(f=c[c.length-2]+1);let g=[];for(let a=f;a<b.length;a++){let c=(0,e.l1)(b[a]);!(!c||d.sx.some(a=>a.test(c)))&&(d.Md.test(c)||g.push(c))}return g.join("\n").trim()}function o(a,b=f.Rf,c=f.ky){if(!a||a.length<=b)return a;let d=c+"\n",e=b-d.length;if(e<=0)return c.slice(0,b);let g=a.length-e;if(g>0&&g<a.length){let b=a.charCodeAt(g);b>=56320&&b<=57343&&(g+=1)}return d+a.slice(g)}},90164:(a,b,c)=>{"use strict";c.d(b,{Dk:()=>e,kD:()=>f});let d="https://github.com/Kewton/CommandMate",e=`${d}/releases/`,f=`${d}/blob/main/docs/security-guide.md`},93997:(a,b,c)=>{"use strict";c.d(b,{aq:()=>l,gm:()=>j,pc:()=>k,vF:()=>i,wd:()=>h,xE:()=>e});let d=(0,c(72626).h)("tmux-capture-cache"),e=1e4;function f(){return globalThis.__tmuxCaptureCache??=new Map}function g(){return globalThis.__tmuxCaptureCacheInflight??=new Map}function h(a,b){if(""===a)return"";let c=a.split("\n");return b>=c.length?a:c.slice(-b).join("\n")}function i(a,b,c){let d=f(),e=Date.now();for(let[a,b]of d)e-b.timestamp>5e3&&d.delete(a);if(d.size>=100&&!d.has(a)){let a=null,b=1/0;for(let[c,e]of d)e.timestamp<b&&(b=e.timestamp,a=c);a&&d.delete(a)}d.set(a,{output:b,capturedLines:c,timestamp:e})}function j(a){f().delete(a),d.debug("cache:invalidate",{sessionName:a})}function k(){f().clear(),g().clear()}async function l(a,b,c){let d=function(a,b){let c=f(),d=c.get(a);return d?Date.now()-d.timestamp>5e3?(c.delete(a),null):b>d.capturedLines?null:h(d.output,b):null}(a,b);if(null!==d)return d;let j=g(),k=j.get(a);if(k)return h(await k,b);let l=c();j.set(a,l);try{let c=await l;return c.length>0&&i(a,c,e),h(c,b)}finally{j.delete(a)}}},95220:(a,b,c)=>{"use strict";c.r(b),c.d(b,{accumulateTuiContent:()=>g.IZ,cleanClaudeResponse:()=>f.NN,cleanCopilotResponse:()=>f.LH,cleanGeminiResponse:()=>f.IS,cleanOpenCodeResponse:()=>f.aW,clearPromptHashCache:()=>h.iX,clearTuiAccumulator:()=>g.q1,extractCopilotContentLines:()=>g.o0,extractTuiContentLines:()=>g.K0,findOverlapIndex:()=>g.vQ,getAccumulatedContent:()=>g.Uz,getActivePollers:()=>d.KQ,initTuiAccumulator:()=>g.tb,isDuplicatePrompt:()=>h.gv,isOpenCodeComplete:()=>e.b,normalizeCopilotLine:()=>g.IW,normalizePromptForDedup:()=>h.zm,resolveExtractionStartIndex:()=>e.Q,startPolling:()=>d.g8,stopAllPolling:()=>d.fq,stopPolling:()=>d.Et,truncateMessage:()=>f.Sj});var d=c(45146),e=c(60),f=c(82450),g=c(13033),h=c(72457)},95595:(a,b,c)=>{"use strict";c.d(b,{WC:()=>m,gv:()=>h,ug:()=>i});var d=c(26283),e=c(25129),f=c(68652),g=c(46423);let h={PROMPT_DETECTED:"prompt_detected",THINKING_INDICATOR:"thinking_indicator",OPENCODE_PROCESSING_INDICATOR:"opencode_processing_indicator",OPENCODE_SELECTION_LIST:"opencode_selection_list",CLAUDE_SELECTION_LIST:"claude_selection_list",COPILOT_SELECTION_LIST:"copilot_selection_list",CODEX_SELECTION_LIST:"codex_selection_list",CODEX_PAGER:"codex_pager",ANTIGRAVITY_SELECTION_LIST:"antigravity_selection_list",OPENCODE_RESPONSE_COMPLETE:"opencode_response_complete",INPUT_PROMPT:"input_prompt",NO_RECENT_OUTPUT:"no_recent_output",DEFAULT:"default"},i=new Set([h.OPENCODE_SELECTION_LIST,h.CLAUDE_SELECTION_LIST,h.COPILOT_SELECTION_LIST,h.CODEX_SELECTION_LIST,h.CODEX_PAGER,h.ANTIGRAVITY_SELECTION_LIST]),j=/press\s+(?:number|enter)\s+to\s+confirm/i,k=/^\s*[❯›●]?\s*\d{1,2}[.)]\s/;function l(a){let b=-1;for(let c=a.length-1;c>=Math.max(0,a.length-10);c--)if(d.aW.test(a[c])){b=c;break}let c=b>=0?b:a.length,e=-1,f=-1;for(let b=0;b<c;b++){let c=a[b],g=c.trim();""!==g&&((j.test(g)||k.test(g))&&(e=b),(0,d.ut)("codex",c)&&(f=b))}return e>=0&&f>e}function m(a,b,c){let i=(0,f.N)((0,d.aJ)(a)),j=i.split("\n"),k=j.length-1;for(;k>=0&&""===j[k].trim();)k--;let m=j.slice(0,k+1),n=m.slice(-15).join("\n"),o=m.slice(-g.$).join("\n"),p=m.slice(-30).join("\n");if("copilot"===b&&d.Mi.test(p)){let a=(0,d.KO)(b),c=(0,e.gF)((0,d._A)(i),a);return c.isPrompt&&(c.promptData?.options?.length??0)<=3?{status:"waiting",confidence:"high",reason:"prompt_detected",hasActivePrompt:!0,promptDetection:c}:{status:"waiting",confidence:"high",reason:h.COPILOT_SELECTION_LIST,hasActivePrompt:!1,promptDetection:c}}let q=m.slice(-15).join("\n");if("copilot"===b&&(0,d.ut)(b,q)){let a=(0,d.KO)(b);return{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:(0,e.gF)((0,d._A)(i),a)}}if("codex"===b&&d.pn.test(n)){let a=(0,d.KO)(b),c=(0,e.gF)((0,d._A)(i),a);return{status:"waiting",confidence:"high",reason:h.CODEX_PAGER,hasActivePrompt:!1,promptDetection:c}}if("codex"===b){let a=-1;for(let b=m.length-1;b>=Math.max(0,m.length-10);b--)if(d.aW.test(m[b])){a=b;break}let c=a>=0?a-1:m.length-1;for(;c>=0&&""===m[c].trim();)c--;if(c>=0){let a=m.slice(Math.max(0,c-15+1),c+1).join("\n");if(d.Jn.test(a)){let c=(0,d.KO)(b),f=(0,e.gF)((0,d._A)(i),c);return f.isPrompt&&((f.promptData?.question?.trim()??"").endsWith("?")||d.Dd.test(a))&&!l(m)?{status:"waiting",confidence:"high",reason:h.PROMPT_DETECTED,hasActivePrompt:!0,promptDetection:f}:{status:"waiting",confidence:"high",reason:h.CODEX_SELECTION_LIST,hasActivePrompt:!1,promptDetection:f}}}}if("antigravity"===b&&d.kT.test(n)){let a=(0,d.KO)(b),c=(0,e.gF)((0,d._A)(i),a);return{status:"waiting",confidence:"high",reason:h.ANTIGRAVITY_SELECTION_LIST,hasActivePrompt:!1,promptDetection:c}}let r=(0,d.KO)(b),s="opencode"===b||"codex"===b||"claude"===b||"copilot"===b?(0,d._A)(i):(0,d._A)(n),t=(0,e.gF)(s,r);if(t.isPrompt)if(!("codex"===b&&l(m)))return{status:"waiting",confidence:"high",reason:"prompt_detected",hasActivePrompt:!0,promptDetection:t};else t={...t,isPrompt:!1,promptData:void 0};if("claude"===b&&d.XY.test(n))return{status:"waiting",confidence:"high",reason:h.CLAUDE_SELECTION_LIST,hasActivePrompt:!1,promptDetection:t};if((0,d.ut)(b,o))return{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:t};if("claude"===b&&d.aU.test(n))return{status:"running",confidence:"high",reason:h.THINKING_INDICATOR,hasActivePrompt:!1,promptDetection:t};if("opencode"===b){if(d.kD.test(n))return{status:"running",confidence:"high",reason:"opencode_processing_indicator",hasActivePrompt:!1,promptDetection:t};let a=(0,d._A)(i).split("\n"),b=Math.max(0,a.length-7);for(let c=a.length-1;c>=Math.max(0,a.length-10);c--)if(/ctrl\+[tp]/.test(a[c])){b=Math.max(0,c-2);break}let c=a.slice(0,b),e=c.length-1;for(;e>=0&&""===c[e].trim();)e--;if(e>=0){let a=c.slice(Math.max(0,e-g.$+1),e+1).join("\n");if((0,d.ut)("opencode",a))return{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:t};let b=c.slice(Math.max(0,e-15+1),e+1).join("\n"),f=c.join("\n");if(d.LO.test(f))return{status:"waiting",confidence:"high",reason:h.OPENCODE_SELECTION_LIST,hasActivePrompt:!1,promptDetection:t};if(d.Md.test(b))return{status:"ready",confidence:"high",reason:h.OPENCODE_RESPONSE_COMPLETE,hasActivePrompt:!1,promptDetection:t};let{promptPattern:i}=(0,d._X)("opencode");if(i.test(b))return{status:"ready",confidence:"high",reason:h.PROMPT_DETECTED,hasActivePrompt:!0,promptDetection:t}}}if("codex"===b){let a=-1;for(let b=m.length-1;b>=Math.max(0,m.length-10);b--)if(d.aW.test(m[b])){a=b;break}if(a>=0){let b=a-1;for(;b>=0&&""===m[b].trim();)b--;if(b>=0){let a=m.slice(Math.max(0,b-g.$+1),b+1).join("\n");if((0,d.ut)("codex",a))return{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:t};let c=m[b].trim();return d.gm.test(c)?{status:"ready",confidence:"high",reason:"input_prompt",hasActivePrompt:!1,promptDetection:t}:{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:t}}}else{let a=m.length-1;for(;a>=0&&""===m[a].trim();)a--;if(!(a>=0&&d.gm.test(m[a].trim()))&&(0,d.ut)("codex",n))return{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:t}}}if("antigravity"===b){if((0,d.ut)("antigravity",n))return{status:"running",confidence:"high",reason:h.THINKING_INDICATOR,hasActivePrompt:!1,promptDetection:t};let{promptPattern:a}=(0,d._X)("antigravity");if(a.test(n))return{status:"ready",confidence:"high",reason:h.INPUT_PROMPT,hasActivePrompt:!1,promptDetection:t}}let{promptPattern:u}=(0,d._X)(b);return u.test(n)?{status:"ready",confidence:"high",reason:"input_prompt",hasActivePrompt:!1,promptDetection:t}:c&&Date.now()-c.getTime()>5e3?{status:"ready",confidence:"low",reason:"no_recent_output",hasActivePrompt:!1,promptDetection:t}:{status:"running",confidence:"low",reason:"default",hasActivePrompt:!1,promptDetection:t}}},99508:(a,b,c)=>{"use strict";c.r(b),c.d(b,{INTERACTION_SNAPSHOT_RETRY_DELAYS_MS:()=>l,__resetTerminalBroadcastState:()=>s,broadcastSessionStatus:()=>r,broadcastTerminalSnapshot:()=>m,broadcastTerminalSnapshotAfterInteraction:()=>q});var d=c(69297),e=c(88807),f=c(34892),g=c(72626),h=c(31268),i=c(93997);let j=(0,g.h)("terminal-broadcast"),k=new Map,l=[100,250,500,750];async function m(a,b,c){if((0,d.h7)(a))try{let d=(0,e.getDbInstance)(),g=await (0,f.$)(d,a,b,c);p(a,b,g,c)}catch(b){j.error("terminal-snapshot:failed",{worktreeId:a,error:b instanceof Error?b.message:String(b)})}}function n(a){return JSON.stringify([a.fullOutput??"",a.isRunning,a.thinking??!1,a.isPromptWaiting??!1,a.isSelectionListActive??!1,a.isPagerActive??!1,a.isUnclassifiedActive??!1])}async function o(a,b,c){let d=h.s.getInstance().getTool(b);return(0,i.gm)(d.getSessionName(a,c)),(0,f.$)((0,e.getDbInstance)(),a,b,c)}function p(a,b,c,e){let f=e??b,g=`${a}:${b}:${f}`;(0,d.mq)(a,{type:"terminal_snapshot",worktreeId:a,cliToolId:b,instanceId:f,output:c.fullOutput??"",isRunning:c.isRunning,thinking:c.thinking??!1,isPromptWaiting:c.isPromptWaiting??!1,promptData:c.promptData??null,isSelectionListActive:c.isSelectionListActive??!1,isPagerActive:c.isPagerActive??!1,isUnclassifiedActive:c.isUnclassifiedActive??!1,version:function(a){let b=(k.get(a)??0)+1;return k.set(a,b),b}(g)})}async function q(a,b,c,e=l){if((0,d.h7)(a))try{let d=await o(a,b,c),f=n(d);for(let g of(p(a,b,d,c),e)){await new Promise(a=>setTimeout(a,g));let d=await o(a,b,c);if(n(d)!==f)return void p(a,b,d,c)}}catch(d){j.error("terminal-snapshot:interaction-refresh-failed",{worktreeId:a,cliToolId:b,instanceId:c,error:d instanceof Error?d.message:String(d)})}}function r(a,b,c){(0,d.mq)(a,{type:"session_status_changed",worktreeId:a,isRunning:b,cliTool:c?.cliTool??null,instance:c?.instance??null})}function s(){k.clear()}}};
|
|
20
|
+
`,await e().writeFile(f,j,"utf-8"),f}async function o(a,b="all"){let c="all"===b?[...k.XH]:[b],d=[];for(let b of c){await m(b);let c=l(b);try{let b=(await e().readdir(c)).filter(b=>b.startsWith(`${a}-`)&&b.endsWith(".md")).map(a=>g().join(c,a));d.push(...b)}catch{}}return d.sort().reverse()}(0,j.h)("log-manager")},44265:(a,b,c)=>{"use strict";c.d(b,{M:()=>k});var d=c(79646),e=c(28354),f=c(15194);let g=/^[a-zA-Z0-9_-]+$/;function h(a){if(!g.test(a))throw Error(`Invalid session name format: ${a}`)}var i=c(11665);let j=(0,e.promisify)(d.exec);class k{async isInstalled(){try{return await j(`which ${this.command}`,{timeout:5e3}),!0}catch{return!1}}getSessionName(a,b){let c=`mcbd-${this.id}-${a}`;if(!b||b===this.id)return h(c),c;let d=(0,f.pL)(b,this.id),e=d?`${c}-${d}`:c;return h(e),e}async reconcileExistingSession(a,b){await (0,i.zT)(a,b)}async interrupt(a,b){let c=this.getSessionName(a,b);await (0,i.ds)(c,"Escape")}}},45146:(a,b,c)=>{"use strict";c.d(b,{Et:()=>r,KQ:()=>t,MN:()=>n,SI:()=>k,fq:()=>s,g8:()=>o,sR:()=>u});var d=c(72626),e=c(13033),f=c(72457),g=c(71080),h=c(3523),i=c(99508);let j=(0,d.h)("response-poller"),k=["Waiting for auth","⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"],l=new Map,m=new Map;function n(a,b,c){return`${a}:${c??b}`}function o(a,b,c){let d=n(a,b,c);r(a,b,c),m.set(d,Date.now()),("opencode"===b||"copilot"===b)&&(0,e.tb)(d),p(a,b,c)}function p(a,b,c){let d=n(a,b,c),e=setTimeout(async()=>{let e=m.get(d);if(e&&Date.now()-e>18e5)return void r(a,b,c);try{await (0,h.zX)(a,b,c)}catch(a){j.error("error:",{error:a instanceof Error?a.message:String(a)})}(0,i.broadcastTerminalSnapshot)(a,b,c),l.has(d)&&p(a,b,c)},2e3);l.set(d,e)}function q(a){let b=l.get(a);b&&(clearTimeout(b),l.delete(a),m.delete(a)),(0,e.q1)(a),(0,f.iX)(a),(0,g.L1)(a)}function r(a,b,c){q(n(a,b,c))}function s(){for(let a of Array.from(l.keys()))q(a)}function t(){return Array.from(l.keys())}function u(a,b){let c=new Map;for(let{oldId:b,newId:d}of a)b&&d&&b!==d&&c.set(b,d);if(0===c.size)return[];let d=[],h=[];for(let a of Array.from(l.keys())){let e=function(a){let b=a.indexOf(":");return b<=0||b===a.length-1?null:{worktreeId:a.slice(0,b),instanceId:a.slice(b+1)}}(a);if(!e)continue;let f=c.get(e.worktreeId);if(!f)continue;let g=b(e.worktreeId,e.instanceId);if(!g){h.push(a);continue}d.push({oldKey:a,newKey:n(f,g,e.instanceId),newWorktreeId:f,cliToolId:g,instanceId:e.instanceId})}let i=new Map;for(let a of d){let b=l.get(a.oldKey);b&&clearTimeout(b),l.delete(a.oldKey),i.set(a.newKey,{startedAt:m.get(a.oldKey)}),m.delete(a.oldKey),(0,f.i2)(a.oldKey,a.newKey),(0,g.Re)(a.oldKey,a.newKey),(0,e.q1)(a.oldKey)}for(let a of h)q(a),j.warn("poller:migrate-abandoned",{pollerKey:a});for(let a of d){let b=i.get(a.newKey)?.startedAt;m.set(a.newKey,b??Date.now()),("opencode"===a.cliToolId||"copilot"===a.cliToolId)&&(0,e.tb)(a.newKey),p(a.newWorktreeId,a.cliToolId,a.instanceId)}return d}},47990:()=>{},49358:a=>{"use strict";a.exports=JSON.parse('{"title":"Notifications","description":"Get a push notification when an agent is waiting for you or finishes a session — even when the app is closed.","enable":"Enable notifications","enabling":"Enabling…","enabledOnThisDevice":"Notifications are enabled on this device.","unsubscribe":"Unsubscribe this device","types":{"heading":"Notify me about","promptWaiting":"Prompt waiting","promptWaitingDesc":"When an agent is waiting for your reply","completion":"Session complete","completionDesc":"When an agent finishes a session"},"permission":{"denied":"Notifications are blocked in your browser settings. Allow them for this site to receive push notifications."},"unsupported":"This browser does not support push notifications.","notConfigured":"Push notifications are not configured on this server. Set the VAPID keys to enable them.","ios":{"guidance":"On iPhone/iPad, add this app to your Home Screen and open it from there to enable notifications."},"toast":{"enabled":"Notifications enabled on this device","disabled":"Notifications turned off on this device","error":"Could not enable notifications","updated":"Notification settings updated"},"push":{"promptWaitingWithExcerpt":"Waiting for reply: {excerpt}","promptWaiting":"Waiting for your reply","completionWithExcerpt":"Done: {excerpt}","completion":"Session complete"}}')},52277:(a,b,c)=>{"use strict";c.d(b,{ZS:()=>f,gb:()=>g});var d=c(24455);let e=new Map;function f(a,b,c,g,h=Date.now()){e.set((0,d.v7)(a,b,c),{...g,at:h})}function g(a,b,c){return e.get((0,d.v7)(a,b,c))??null}},56263:(a,b,c)=>{"use strict";c.d(b,{L1:()=>e,MJ:()=>j,Rf:()=>f,ky:()=>g,lM:()=>i,pL:()=>h,wp:()=>d});let d=200,e=100,f=1e5,g="[... truncated ...]",h=3e4,i=/^[a-zA-Z0-9][a-zA-Z0-9\-._/:]*$/,j=128},57905:(a,b,c)=>{"use strict";c.d(b,{c0:()=>K,zw:()=>G,Yq:()=>H,oV:()=>D,pU:()=>J,R7:()=>I,VU:()=>L});var d=c(11665),e=c(26283),f=c(40236),g=c(93997),h=c(77093),i=c(20610),j=c(79646),k=c(28354),l=c(72626);let m=(0,l.h)("session-key-sender"),n=(0,k.promisify)(j.exec);async function o(a,b=50){let c=await (0,d.Xg)(a,{startLine:-b});return(0,e.aJ)(c)}async function p(a){await n("tmux set-environment -g -u CLAUDECODE 2>/dev/null || true"),await (0,d.V1)(a,"unset CLAUDECODE",!0),await new Promise(a=>setTimeout(a,i.Em))}async function q(a,b){let c=Date.now();for(;Date.now()-c<b;){let b=await o(a);if(e.hx.test(b))return;await new Promise(a=>setTimeout(a,200))}throw Error(`Prompt detection timeout (${b}ms)`)}async function r(a,b,c,h){if(!await (0,d.N)(a))throw Error(`Claude session ${a} does not exist. Start the session first.`);let i=await o(a);e.hx.test(i)||await q(a,h),await new Promise(a=>setTimeout(a,c)),await (0,f.FW)({sessionName:a,message:b,cliToolId:"claude"}),(0,g.gm)(a),m.info("sent-message-to-session",{sessionName:a})}async function s(a){try{await (0,d.N)(a)&&(await (0,d.V1)(a,"",!1),await (0,d.ds)(a,"C-d"),(0,g.gm)(a),await new Promise(a=>setTimeout(a,i.Zf)));let b=await (0,d.fY)(a);return b&&m.info("stopped-session",{sessionName:a}),b}catch(a){return m.error("session:stop-failed",{error:(0,h.u1)(a)}),!1}}var t=c(79748),u=c(15194),v=c(2669);let w=(0,l.h)("claude-session"),x=(0,k.promisify)(j.exec),y=["$","%","#"],z=null;async function A(){if(z)return z;let a=process.env.CLAUDE_PATH;if(a&&(/^[/a-zA-Z0-9._-]+$/.test(a)?!a.includes("..")||(w.info("claudepath-contains-path"),!1):(w.info("claudepath-contains-invalid-characters-i"),!1)))try{return await (0,t.access)(a,t.constants.X_OK),z=a}catch{w.info("claudepath-is-not-executable:envclaudepa")}try{let{stdout:a}=await x("which claude",{timeout:5e3});return z=a.trim()}catch{for(let a of["/opt/homebrew/bin/claude","/usr/local/bin/claude","/usr/bin/claude"])try{return await x(`test -x "${a}"`,{timeout:1e3}),z=a}catch{}throw Error("Claude CLI not found. Set CLAUDE_PATH environment variable or install Claude CLI.")}}async function B(a,b=50){let c=await (0,d.Xg)(a,{startLine:-b});return(0,e.aJ)(c)}function C(a){let b=a.trim().split("\n").filter(a=>""!==a.trim()).slice(-10).join("\n");for(let a of e.F0)if(b.includes(a))return a;for(let a of e.Fw)if(a.test(b))return a.source;return null}async function D(a){try{let b=(await B(a)).trim();if(""===b)return{healthy:!1,reason:"empty output"};if(e.hx.test(b))return{healthy:!0};let c=b.split("\n").filter(a=>""!==a.trim()),d=C(b);if(null!==d)return{healthy:!1,reason:`error pattern: ${d}`};let f=c[c.length-1]?.trim()??"";if(f.length>=40)return{healthy:!0};if(y.some(a=>!(!f.endsWith(a)||"%"===a&&/\d+%$/.test(f))))return{healthy:!1,reason:`shell prompt ending detected: ${f}`};return{healthy:!0}}catch{return{healthy:!1,reason:"capture error"}}}async function E(a){return!!(await D(a)).healthy||(w.warn("session-sessionname-unhealthy:resultreas"),await (0,d.fY)(a),!1)}function F(a,b){let c=`mcbd-claude-${a}`;if(!b||"claude"===b)return c;let d=(0,u.pL)(b,"claude");return d?`${c}-${d}`:c}async function G(){try{return await x("which claude",{timeout:5e3}),!0}catch{return!1}}async function H(a,b){let c=F(a,b);return!!await (0,d.N)(c)&&(!!(await D(c)).healthy||(w.warn("session-sessionname-unhealthy:resultreas"),!1))}async function I(a){let{worktreeId:b,worktreePath:c,instanceId:f}=a;if(!await G())throw Error("Claude CLI is not installed or not in PATH");let g=F(b,f);if(await (0,d.N)(g)&&await E(g)){await (0,d.zT)(g),w.info("claude-session-sessionname");return}try{await (0,d.jw)({sessionName:g,workingDirectory:c}),await p(g);let a=await A();await (0,d.V1)(g,a,!0);let b=Date.now(),f=!1,h=!1;for(;Date.now()-b<6e4;){await new Promise(a=>setTimeout(a,300));let a=null;try{a=await B(g)}catch{}if(null===a)continue;if(e.hx.test(a)){await new Promise(a=>setTimeout(a,500)),w.info("claude-initialized-in"),f=!0;break}if(!h&&e.CX.test(a))try{await (0,d.V1)(g,"",!0),h=!0,w.info("trust-dialog-detected")}catch{}let b=C(a);if(null!==b)throw new v.mR("Claude Code",g,b)}if(!f)throw new v.Sr("Claude Code",g,6e4);w.info("started-claude-session:sessionname")}catch(a){if(z=null,w.error("session:start-failed",{error:a instanceof Error?a.message:String(a)}),(0,v.su)(a))throw a;throw Error("Failed to start Claude session")}}async function J(a,b,c){let d=F(a,c);await r(d,b,500,1e4)}async function K(a,b=1e3,c){let e=F(a,c);if(!await (0,d.N)(e))throw Error(`Claude session ${e} does not exist`);try{return await (0,d.Xg)(e,{startLine:-b})}catch(a){throw Error(`Failed to capture Claude output: ${a instanceof Error?a.message:String(a)}`)}}async function L(a,b){return s(F(a,b))}},61296:a=>{"use strict";a.exports=JSON.parse('{"title":"通知","description":"エージェントが応答待ちになったり、セッションが完了したときに、アプリを開いていなくてもプッシュ通知を受け取れます。","enable":"通知を有効にする","enabling":"有効化中…","enabledOnThisDevice":"この端末で通知が有効です。","unsubscribe":"この端末の通知を解除","types":{"heading":"通知する種別","promptWaiting":"応答待ち","promptWaitingDesc":"エージェントがあなたの応答を待っているとき","completion":"セッション完了","completionDesc":"エージェントがセッションを完了したとき"},"permission":{"denied":"ブラウザの設定で通知がブロックされています。このサイトの通知を許可してください。"},"unsupported":"このブラウザはプッシュ通知に対応していません。","notConfigured":"このサーバーではプッシュ通知が設定されていません。VAPID鍵を設定すると有効になります。","ios":{"guidance":"iPhone/iPadでは、このアプリをホーム画面に追加し、そこから開くと通知を有効にできます。"},"toast":{"enabled":"この端末で通知を有効にしました","disabled":"この端末の通知をオフにしました","error":"通知を有効にできませんでした","updated":"通知設定を更新しました"},"push":{"promptWaitingWithExcerpt":"応答待ち: {excerpt}","promptWaiting":"応答待ちです","completionWithExcerpt":"完了: {excerpt}","completion":"セッションが完了しました"}}')},63865:(a,b,c)=>{"use strict";function d(){let a=process.env.CM_VAPID_PUBLIC_KEY?.trim(),b=process.env.CM_VAPID_PRIVATE_KEY?.trim();return a&&b?{publicKey:a,privateKey:b,subject:process.env.CM_VAPID_SUBJECT?.trim()||"mailto:commandmate@localhost"}:null}function e(){return d()?.publicKey??null}c.d(b,{HR:()=>e,J$:()=>t});var f=c(48975),g=c.n(f),h=c(88807),i=c(43167),j=c(72626),k=c(25754),l=c(49358),m=c(61296),n=c(55511);let o=new Map,p=(0,j.h)("push/sender"),q={en:l.push,ja:m.push};function r(a){return(0,k.d9)(a)?a:k.Xn}async function s(a,b){try{await g().sendNotification({endpoint:a.endpoint,keys:a.keys},b)}catch(c){let b=c.statusCode;if(404===b||410===b){(0,i.th)((0,h.getDbInstance)(),a.endpoint),p.info("push-subscription-removed",{statusCode:b});return}p.warn("push-send-failed",{statusCode:b??"unknown"})}}async function t(a){try{let b=d();if(!b||!function(a,b=Date.now(),c=3e4){var d;let e=`${a.worktreeId}:${a.kind}`,f=(d=a.content??"",(0,n.createHash)("sha256").update(d).digest("hex")),g=o.get(e);return(!g||g.hash!==f||!(b-g.at<c))&&(o.set(e,{hash:f,at:b}),!0)}({worktreeId:a.worktreeId,kind:a.kind,content:a.excerpt}))return;let c=(0,h.getDbInstance)(),e=(0,i.gn)(c,a.kind);if(0===e.length)return;g().setVapidDetails(b.subject,b.publicKey,b.privateKey);let f=new Map;for(let a of e){let b=r(a.locale),c=f.get(b);c?c.push(a):f.set(b,[a])}await Promise.all(Array.from(f,([b,c])=>{let d=JSON.stringify(function(a,b=k.Xn,c=Date.now()){let d=function(a,b=120){if(!a)return"";let c=a.replace(/\s+/g," ").trim();return c.length<=b?c:c.slice(0,b-1).trimEnd()+"…"}(a.excerpt),e=a.agentName?` (${a.agentName})`:"",f=`${a.worktreeName}${e}`,g=q[r(b)],h="prompt"===a.kind?d?g.promptWaitingWithExcerpt.replace("{excerpt}",d):g.promptWaiting:d?g.completionWithExcerpt.replace("{excerpt}",d):g.completion;return{kind:a.kind,title:f,body:h,worktreeId:a.worktreeId,url:`/worktrees/${a.worktreeId}`,tag:`${a.worktreeId}:${a.kind}`,timestamp:c}}(a,b));return Promise.all(c.map(a=>s(a,d)))}))}catch(a){p.warn("push-fanout-error",{error:a instanceof Error?a.message:String(a)})}}},63869:(a,b,c)=>{"use strict";c.d(b,{t:()=>j});var d=c(11665),e=c(81254),f=c(93997),g=c(20610);let h=/^\[[ x]\] /;function i(a){if(0===a)return[];let b=a>0?"Down":"Up";return Array.from({length:Math.abs(a)},()=>b)}async function j(a){let{sessionName:b,answer:c,cliToolId:j,promptData:k,fallbackPromptType:l,fallbackDefaultOptionNumber:m}=a;if(("claude"===j||"antigravity"===j)&&(k?.type==="multiple_choice"||"multiple_choice"===l)&&/^\d+$/.test(c)){let a,e=parseInt(c,10),f=null;if(k?.type==="multiple_choice"){let b=(f=k.options).find(a=>a.isDefault);a=b?.number??1}else a=m??1;let g=e-a;if(null!==f&&f.some(a=>h.test(a.label))&&null!==f){let a=f.filter(a=>h.test(a.label)).length,c=[...i(g),"Space"];c.push(...i(a-e+1)),c.push("Enter"),await (0,d.KB)(b,c)}else{let a=i(g),c=k?.type==="multiple_choice"&&!0===k.isAskUserQuestion&&0===g?["Down","Up","Enter"]:[...a,"Enter"];await (0,d.KB)(b,c)}}else{await (0,d.V1)(b,c,!1);let f=function(a){let b=(a.promptData?.type==="multiple_choice"?a.promptData.submitMode:void 0)??a.fallbackSubmitMode??"answer_then_enter";return(0,e.M)(b)?b:"answer_then_enter"}(a);"answer_only"===f&&(a.promptData?.type==="multiple_choice"||"multiple_choice"===a.fallbackPromptType)&&/^\d+$/.test(a.answer)||(await new Promise(a=>setTimeout(a,g.pL)),await (0,d.V1)(b,"",!0))}(0,f.gm)(b)}},68652:(a,b,c)=>{"use strict";c.d(b,{N:()=>g});let d=/Esc\s+to\s+cancel\s*[·•]\s*Tab\s+to\s+amend/i,e=/Enter\s+to\s+select\b.*\bnavigate\b/i,f=/^\s*[>❯]\s*(?:\d{1,2}[.)])?|esc\s+to\s+interrupt|[✻✽✶✢✳⦿◉●⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]\s+.+…/i;function g(a){if(""===a)return"";let b=a.split("\n"),c=-1;for(let a=b.length-1;a>=0;a--){var g;if(g=b[a],d.test(g)||e.test(g)){c=a;break}}let h=b;return c>=0&&(h=b.slice(c+1).some(a=>f.test(a))?b.slice(c+1):b.slice(0,c+1)),(function(a){let b=[],c=!1;for(let d of a){let a=""===d.trim();a&&c||(b.push(d),c=a)}for(;b.length>0&&""===b[b.length-1].trim();)b.pop();return b})(h).join("\n")}},69297:(a,b,c)=>{"use strict";c.r(b),c.d(b,{WORKTREE_RENAMED_EVENT_TYPE:()=>V,__internal:()=>Z,broadcast:()=>S,broadcastMessage:()=>U,cleanupRooms:()=>X,closeWebSocket:()=>Y,handleProxyUpgrade:()=>H,hasRoomSubscribers:()=>T,migrateWorktreeRooms:()=>W,setupWebSocket:()=>I});var d=c(81503),e=c(91645),f=c(93390),g=c(3453),h=c(15194),i=c(31268),j=c(88807),k=c(56791);let l={capturePaneCalls:0,activeControlSessions:0,subscriberCount:0,cleanupCount:0,firstOutputLatencyCount:0,firstOutputLatencyTotalMs:0,firstOutputLatencyLastMs:null,firstOutputLatencyMinMs:null,firstOutputLatencyMaxMs:null};var m=c(11665),n=c(72626),o=c(79646);class p{push(a){if(0===a.length)return[];let b=(this.remainder+a).split("\n");this.remainder=b.pop()??"";let c=[];for(let a of b){let b=a.endsWith("\r")?a.slice(0,-1):a,d=this.parseLine(b);d&&c.push(d)}return c}flush(){if(0===this.remainder.length)return[];let a=this.parseLine(this.remainder);return this.remainder="",a?[a]:[]}parseLine(a){return 0===a.length?{type:"output",data:"\n"}:a.startsWith("%output ")?{type:"output",data:`${a.slice(8)}
|
|
21
|
+
`}:"%exit"===a||a.startsWith("%exit ")?{type:"exit",exitCode:null}:a.startsWith("%error ")?{type:"error",error:Error(a.slice(7))}:a.startsWith("%")?null:{type:"output",data:`${a}
|
|
22
|
+
`}}constructor(){this.remainder=""}}let q=(0,n.h)("tmux-control-client");class r{constructor(a={}){this.parser=new p,this.handlers=new Set,this.child=null,this.sessionName=null,this.idleTimer=null,this.started=!1,this.spawnProcess=a.spawnProcess??((a,b,c)=>(0,o.spawn)(a,b,c)),this.tmuxBinary=a.tmuxBinary??"tmux",this.idleTimeoutMs=a.idleTimeoutMs??3e4}start(a){this.started||(this.sessionName=a,this.child=this.spawnProcess(this.tmuxBinary,["-C","attach-session","-t",(0,m.lA)(a)],{stdio:"pipe"}),this.started=!0,this.child.stdout.setEncoding("utf8"),this.child.stdout.on("data",a=>{this.touch();let b="string"==typeof a?a:a.toString("utf8");for(let a of this.parser.push(b))this.emit(a)}),this.child.stderr.setEncoding("utf8"),this.child.stderr.on("data",a=>{let b="string"==typeof a?a:a.toString("utf8");this.emit({type:"error",error:Error(b.trim()||"tmux control stderr")})}),this.child.on("close",a=>{for(let a of this.parser.flush())this.emit(a);this.emit({type:"exit",exitCode:a}),this.stop()}),this.child.on("error",a=>{this.emit({type:"error",error:a}),this.stop()}),this.resetIdleTimer(),q.debug("start",{sessionName:a}))}onEvent(a){return this.handlers.add(a),()=>{this.handlers.delete(a)}}sendInput(a){if(!this.child?.stdin.writable)throw Error("Tmux control client is not writable");this.touch(),this.child.stdin.write(a)}resize(a,b){if(!this.child?.stdin.writable)throw Error("Tmux control client is not writable");this.touch(),this.child.stdin.write(`refresh-client -C ${a}x${b}
|
|
23
|
+
`)}stop(){this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null),this.child&&(this.child.removeAllListeners(),this.child.stdout.removeAllListeners(),this.child.stderr.removeAllListeners(),this.child.kill(),this.child=null),this.started=!1}isStarted(){return this.started}setSessionName(a){this.sessionName=a}emit(a){for(let b of this.handlers)b(a)}touch(){this.resetIdleTimer()}resetIdleTimer(){this.idleTimeoutMs<=0||(this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=setTimeout(()=>{q.debug("idle-timeout",{sessionName:this.sessionName}),this.stop()},this.idleTimeoutMs))}}let s=(0,n.h)("tmux-control-registry");class t{constructor(a={}){this.entries=new Map,this.handlers=new Map,this.idleTimeoutMs=a.idleTimeoutMs??15e3,this.createClient=a.createClient??(()=>new r(a))}subscribe(a,b,c){let d=this.ensureEntry(a);d.subscribers.add(b),this.cancelIdleCleanup(d),this.updateMetrics();let e=this.handlers.get(a);return e||(e=new Set,this.handlers.set(a,e)),e.add(c),()=>{e?.delete(c),this.unsubscribe(a,b)}}sendInput(a,b){let c=this.entries.get(a);if(!c)throw Error(`No control client registered for ${a}`);c.client.sendInput(b)}resize(a,b,c){let d=this.entries.get(a);if(!d)throw Error(`No control client registered for ${a}`);d.client.resize(b,c)}hasSession(a){return this.entries.has(a)}getSubscriberCount(a){return this.entries.get(a)?.subscribers.size??0}getTotalSubscriberCount(){let a=0;for(let b of this.entries.values())a+=b.subscribers.size;return a}getSessionCount(){return this.entries.size}shutdown(){for(let[a,b]of this.entries)this.teardownEntry(a,b);this.entries.clear(),this.handlers.clear(),this.updateMetrics()}renameSession(a,b){if(a===b)return!1;let c=this.entries.get(a);if(!c)return!1;if(this.entries.has(b))return s.warn("rename:destination-occupied",{oldName:a,newName:b}),!1;this.entries.delete(a),c.sessionName=b,this.entries.set(b,c),c.client.setSessionName(b);let d=this.handlers.get(a);return d&&(this.handlers.delete(a),this.handlers.set(b,d)),s.debug("rename",{oldName:a,newName:b}),!0}ensureEntry(a){let b=this.entries.get(a);if(b)return b;let c=this.createClient(a);c.start(a);let d={client:c,subscribers:new Set,unsubscribeClientEvent:()=>{},idleTimer:null,sessionName:a};return d.unsubscribeClientEvent=c.onEvent(a=>{let b=this.handlers.get(d.sessionName);if(b)for(let c of b)c(a);("exit"===a.type||"error"===a.type)&&this.deleteEntry(d.sessionName)}),this.entries.set(a,d),this.updateMetrics(),d}unsubscribe(a,b){let c=this.entries.get(a);c&&(c.subscribers.delete(b),this.updateMetrics(),0===c.subscribers.size&&this.scheduleIdleCleanup(a,c))}scheduleIdleCleanup(a,b){if(this.idleTimeoutMs<=0)return void this.deleteEntry(a);this.cancelIdleCleanup(b),b.idleTimer=setTimeout(()=>{s.debug("idle-cleanup",{sessionName:b.sessionName}),this.deleteEntry(b.sessionName)},this.idleTimeoutMs)}cancelIdleCleanup(a){a.idleTimer&&(clearTimeout(a.idleTimer),a.idleTimer=null)}deleteEntry(a){let b=this.entries.get(a);b&&(this.teardownEntry(a,b),this.entries.delete(a),this.handlers.delete(a),this.updateMetrics())}teardownEntry(a,b){this.cancelIdleCleanup(b),b.unsubscribeClientEvent(),b.client.stop(),l.cleanupCount+=1}updateMetrics(){l.activeControlSessions=Math.max(0,this.getSessionCount()),l.subscriberCount=Math.max(0,this.getTotalSubscriberCount())}}let u=null,v={streamingOutput:!0,explicitResize:!0,snapshotFallback:!0};class w{constructor(a={}){this.registry=a.registry??(u||(u=new t),u)}async ensureSession(a,b){await (0,m.N)(a)||await (0,m.jw)(a,b)}async sessionExists(a){return(0,m.N)(a)}async sendInput(a,b){if(this.registry.hasSession(a))return void this.registry.sendInput(a,b);await (0,m.V1)(a,b)}async sendSpecialKey(a,b){if("Escape"!==b&&"C-c"!==b&&"C-d"!==b&&"C-m"!==b&&"Enter"!==b)throw Error(`Unsupported special key for ControlModeTmuxTransport: ${b}`);await (0,m.ds)(a,b)}async resize(a,b,c){this.registry.resize(a,b,c)}async captureSnapshot(a,b){return l.capturePaneCalls+=1,(0,m.Xg)(a,b)}async subscribe(a,b){let c=`sub-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,d=this.registry.subscribe(a,c,a=>{"output"===a.type?b.onOutput(a.data):"exit"===a.type?b.onExit?.({exitCode:a.exitCode}):b.onError(a.error)});return{async unsubscribe(){d()}}}getCapabilities(){return v}getSubscriberCount(a){return this.registry.getSubscriberCount(a)}renameSession(a,b){return this.registry.renameSession(a,b)}async killSession(a){return(0,m.fY)(a)}}let x=null;function y(){return x||(x=new w),x}var z=c(7015),A=c(26838);let B=(0,n.h)("ws-server"),C=null,D=new Map,E=new Map,F=new Set(["localhost","127.0.0.1"]);function G(a,b){try{a.write(`HTTP/1.1 ${b}\r
|
|
24
|
+
Content-Length: 0\r
|
|
25
|
+
Connection: close\r
|
|
26
|
+
\r
|
|
27
|
+
`)}catch{}a.destroy()}async function H(a,b,c,d){let e,f=(a.url||"/").split("?")[0].split("/")[2]||"";if(!f)return void G(b,"400 Bad Request");try{let a=d.getDb(),b=d.getCache(a);e=await b.getByPathPrefix(f)}catch(a){B.error("ws-proxy:cache-error",{pathPrefix:f,error:a instanceof Error?a.message:String(a)}),!b.destroyed&&b.writable&&G(b,"502 Bad Gateway");return}if(b.destroyed||!b.writable)return;if(!e)return void G(b,"404 Not Found");if(!e.enabled)return void G(b,"503 Service Unavailable");if(!e.websocketEnabled)return void G(b,"403 Forbidden");if(!F.has(e.targetHost)){B.warn("ws-proxy:ssrf-blocked",{pathPrefix:f}),G(b,"403 Forbidden");return}let g=d.netConnect({host:e.targetHost,port:e.targetPort}),h=!1,i=!1,j=()=>{if(!i){i=!0;try{g.destroy()}catch{}try{b.destroy()}catch{}}};g.on("connect",()=>{h=!0;try{let b=function(a){let b=a.method||"GET",c=a.url||"/",d=a.httpVersion||"1.1",e=[`${b} ${c} HTTP/${d}`];for(let[b,c]of Object.entries(a.headers))if(void 0!==c)if(Array.isArray(c))for(let a of c)e.push(`${b}: ${a}`);else e.push(`${b}: ${c}`);return e.join("\r\n")+"\r\n\r\n"}(a);g.write(b)}catch(a){B.error("ws-proxy:upstream-write-error",{pathPrefix:f,error:a instanceof Error?a.message:String(a)}),j();return}b.pipe(g),g.pipe(b)}),g.on("error",a=>{B.error("ws-proxy:upstream-error",{pathPrefix:f,error:a.message}),h||b.destroyed||!b.writable?j():G(b,"502 Bad Gateway")}),g.on("close",()=>{j()}),b.on("error",a=>{B.error("ws-proxy:client-error",{pathPrefix:f,error:a.message}),j()}),b.on("close",()=>{j()})}function I(a){C=new d.zu({noServer:!0}),a.on("upgrade",(a,b,c)=>{let d=a.url||"/";if(d.startsWith("/_next/")){b.write("HTTP/1.1 426 Upgrade Required\r\nContent-Length: 0\r\nConnection: close\r\n\r\n"),b.destroy();return}if((0,g.Rh)()){let c=(0,g.Z2)(a.socket.remoteAddress||"");if(!(0,g.c$)(c,(0,g.nu)())){let a=c.substring(0,45);B.warn("websocket:denied",{ip:a}),b.write("HTTP/1.1 403 Forbidden\r\n\r\n"),b.destroy();return}}if((0,f.y2)()){let c=a.headers.cookie||"",d=(0,f.JT)(c)[f.aq];if(!d||!(0,f.nr)(d)){b.write("HTTP/1.1 401 Unauthorized\r\nContent-Length: 0\r\nConnection: close\r\n\r\n"),b.destroy();return}}if(d.startsWith("/proxy/"))return void(async()=>{try{await H(a,b,c,{getDb:()=>(0,j.getDbInstance)(),getCache:a=>(0,z.Ds)(a),netConnect:a=>(0,e.connect)(a)})}catch(a){if(B.error("ws-proxy:unhandled-error",{error:a instanceof Error?a.message:String(a)}),!b.destroyed&&b.writable){try{b.write("HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\nConnection: close\r\n\r\n")}catch{}b.destroy()}}})();C.handleUpgrade(a,b,c,b=>{C.emit("connection",b,a)})}),C.on("error",a=>{B.error("server:error",{error:a.message})}),C.on("connection",a=>{let b={ws:a,worktreeIds:new Set,terminalSubscription:null};D.set(a,b),a.on("message",b=>{try{let c=JSON.parse(b.toString());J(a,c)}catch(a){B.error("message:parse-failed",{error:a instanceof Error?a.message:String(a)})}}),a.on("close",()=>{M(a)}),a.on("error",b=>{"WS_ERR_INVALID_CLOSE_CODE"===b.code||b.message?.includes("Invalid WebSocket frame")||b.message?.includes("write after end")||b.message?.includes("ECONNRESET")||b.message?.includes("EPIPE")||B.error("websocket:error",{error:b.message});try{a.terminate()}catch{}M(a)})})}function J(a,b){switch(b.type){case"subscribe":if(!b.worktreeId)return;var c=a,d=b.worktreeId;let e=D.get(c);e&&(e.worktreeIds.add(d),E.has(d)||E.set(d,new Set),E.get(d).add(c));break;case"unsubscribe":if(!b.worktreeId)return;!function(a,b){let c=D.get(a);if(!c)return;c.worktreeIds.delete(b);let d=E.get(b);d&&(d.delete(a),0===d.size&&E.delete(b))}(a,b.worktreeId);break;case"broadcast":if(!b.worktreeId)return;L(b.worktreeId,b.data);break;case"client_version":K(a,b);break;case"terminal_subscribe":O(a,b);break;case"terminal_input":P(a,b);break;case"terminal_resize":Q(a,b);break;case"terminal_unsubscribe":R(a);break;default:B.warn("message:unknown-type")}}function K(a,b){let c="string"==typeof b.version?b.version:"";if(!c)return;let e=(0,A.Sw)();if(e&&c&&"0.0.0"!==e&&"0.0.0"!==c&&e!==c&&a.readyState===d.kb.OPEN)try{a.send(JSON.stringify({type:"version_mismatch",serverVersion:e,clientVersion:c}))}catch(a){B.error("version:notify-failed",{error:a instanceof Error?a.message:String(a)})}}function L(a,b){let c=E.get(a);if(c&&0!==c.size)try{let e=JSON.stringify({type:"broadcast",worktreeId:a,data:b});c.forEach(a=>{if(a.readyState===d.kb.OPEN)try{a.send(e)}catch(a){B.error("broadcast:send-failed",{error:a instanceof Error?a.message:String(a)})}})}catch(b){B.error("broadcast:failed",{worktreeId:a,error:b instanceof Error?b.message:String(b)});try{let b=JSON.stringify({type:"broadcast",worktreeId:a,data:{error:"Message encoding error"}});c.forEach(a=>{if(a.readyState===d.kb.OPEN)try{a.send(b)}catch{}})}catch(a){B.error("fallback:send-failed",{error:a instanceof Error?a.message:String(a)})}}}function M(a){let b=D.get(a);b&&(b.worktreeIds.forEach(b=>{let c=E.get(b);c&&(c.delete(a),0===c.size&&E.delete(b))}),b.terminalSubscription&&(b.terminalSubscription.unsubscribe(),b.terminalSubscription=null),D.delete(a))}function N(a,b){a.readyState===d.kb.OPEN&&a.send(JSON.stringify(b))}async function O(a,b){let c=D.get(a);if(!c)return void N(a,{type:"terminal_error",error:"Unauthorized WebSocket client"});if("true"!==process.env.TMUX_CONTROL_MODE_ENABLED)return void N(a,{type:"terminal_error",error:"Tmux control mode is disabled"});let{worktreeId:d,cliToolId:e}=b;if(!d||!e||!(0,h.hR)(e))return void N(a,{type:"terminal_error",error:"Invalid terminal subscription parameters"});let f=(0,j.getDbInstance)();if(!(0,k.Uim)(f,d))return void N(a,{type:"terminal_error",error:"Worktree not found"});c.terminalSubscription&&(await c.terminalSubscription.unsubscribe(),c.terminalSubscription=null);let g=i.s.getInstance().getTool(e).getSessionName(d),m=y();if(m.getSubscriberCount(g)>=4)return void N(a,{type:"terminal_error",error:"Terminal subscriber limit reached"});let n=!1,o=Date.now(),p=await m.subscribe(g,{onOutput:b=>{if(!n){n=!0;let a=Math.max(0,Math.round(Date.now()-o));l.firstOutputLatencyCount+=1,l.firstOutputLatencyTotalMs+=a,l.firstOutputLatencyLastMs=a,l.firstOutputLatencyMinMs=null===l.firstOutputLatencyMinMs?a:Math.min(l.firstOutputLatencyMinMs,a),l.firstOutputLatencyMaxMs=null===l.firstOutputLatencyMaxMs?a:Math.max(l.firstOutputLatencyMaxMs,a)}N(a,{type:"terminal_output",data:b})},onExit:({exitCode:b})=>{N(a,{type:"terminal_exit",exitCode:b})},onError:b=>{(async()=>{try{let b=await m.captureSnapshot(g,{startLine:-200});b.length>0&&N(a,{type:"terminal_output",data:b,fallback:!0})}catch{}N(a,{type:"terminal_error",error:b.message,fallback:!0})})()}});c.terminalSubscription={worktreeId:d,cliToolId:e,sessionName:g,startedAt:o,unsubscribe:p.unsubscribe},N(a,{type:"terminal_status",connected:!0,worktreeId:d,cliToolId:e})}async function P(a,b){let c=D.get(a),d=c?.terminalSubscription;if(!d)return void N(a,{type:"terminal_error",error:"No active terminal subscription"});let e="string"==typeof b.data?b.data:"";if(0===e.length||e.length>4096)return void N(a,{type:"terminal_error",error:"Invalid terminal input"});try{await y().sendInput(d.sessionName,e)}catch(b){N(a,{type:"terminal_error",error:b instanceof Error?b.message:"Failed to send terminal input"})}}async function Q(a,b){let c=D.get(a),d=c?.terminalSubscription;if(d){if("number"!=typeof b.cols||!Number.isInteger(b.cols)||b.cols<20||b.cols>500||"number"!=typeof b.rows||!Number.isInteger(b.rows)||b.rows<5||b.rows>200)return void N(a,{type:"terminal_error",error:"Invalid terminal resize payload"});try{await y().resize(d.sessionName,b.cols,b.rows)}catch(b){N(a,{type:"terminal_error",error:b instanceof Error?b.message:"Failed to resize terminal"})}}}async function R(a){let b=D.get(a);if(b?.terminalSubscription){try{await b.terminalSubscription.unsubscribe()}catch{}b.terminalSubscription=null,N(a,{type:"terminal_status",connected:!1})}}function S(a,b){L(a,b)}function T(a){let b=E.get(a);return!!b&&b.size>0}function U(a,b){b.worktreeId?L(b.worktreeId,{type:a,...b}):B.warn("broadcast:missing-worktree-id")}let V="worktree_renamed";function W(a){let b=new Map;for(let{oldId:c,newId:d}of a)c&&d&&c!==d&&b.set(c,d);if(0===b.size)return[];let c=[];for(let[a,d]of b){let b=E.get(a);b&&0!==b.size&&(E.delete(a),c.push({oldId:a,newId:d,sockets:b}))}let d=[];for(let{oldId:a,newId:b,sockets:e}of c){let c=E.get(b)??new Set;for(let d of e){c.add(d);let e=D.get(d);e&&(e.worktreeIds.delete(a),e.worktreeIds.add(b)),N(d,{type:V,worktreeId:b,previousWorktreeId:a})}E.set(b,c),d.push({oldId:a,newId:b,subscribers:e.size})}for(let a of D.values()){let c=a.terminalSubscription;if(!c)continue;let d=b.get(c.worktreeId);if(d)try{if(!(0,h.hR)(c.cliToolId))continue;let a=i.s.getInstance().getTool(c.cliToolId);c.sessionName=a.getSessionName(d),c.worktreeId=d}catch(a){B.warn("terminal:rename-failed",{worktreeId:c.worktreeId,newId:d,error:a instanceof Error?a.message:String(a)})}}return d.length>0&&B.info("rooms:migrated",{count:d.length}),d}function X(a){for(let b of a){let a=E.get(b);a&&(a.forEach(a=>{let c=D.get(a);c&&c.worktreeIds.delete(b)}),E.delete(b))}}function Y(){C&&(D.forEach(a=>{a.ws.close()}),D.clear(),E.clear(),C.close(),C=null)}let Z={handleMessage:J,handleClientVersion:K,handleProxyUpgrade:H,handleTerminalSubscribe:O,handleTerminalInput:P,handleTerminalResize:Q,handleTerminalUnsubscribe:R,handleDisconnect:M,registerClientForTest(a){D.set(a,{ws:a,worktreeIds:new Set,terminalSubscription:null})},getClientInfoForTest:a=>D.get(a),resetStateForTest(){D.clear(),E.clear()}}},71080:(a,b,c)=>{"use strict";c.d(b,{L1:()=>g,Re:()=>h,j7:()=>f});var d=c(55511);let e=new Map;function f(a,b){let c=(0,d.createHash)("sha256").update(b).digest("hex");return e.get(a)===c||(e.set(a,c),!1)}function g(a){e.delete(a)}function h(a,b){if(a===b)return;let c=e.get(a);e.delete(a),void 0!==c&&e.set(b,c)}},72457:(a,b,c)=>{"use strict";c.d(b,{gv:()=>f,i2:()=>h,iX:()=>g,zm:()=>i});var d=c(55511);let e=new Map;function f(a,b){let c=(0,d.createHash)("sha256").update(b).digest("hex");return e.get(a)===c||(e.set(a,c),!1)}function g(a){e.delete(a)}function h(a,b){if(a===b)return;let c=e.get(a);e.delete(a),void 0!==c&&e.set(b,c)}function i(a,b){return"copilot"!==b?a:a.replace(/^[❯>]\s/gm," ")}},77093:(a,b,c)=>{"use strict";function d(a){return a instanceof Error?a.message:String(a)}c.d(b,{u1:()=>d})},81254:(a,b,c)=>{"use strict";function d(a){return"answer_only"===a||"answer_then_enter"===a}c.d(b,{M:()=>d})},82450:(a,b,c)=>{"use strict";c.d(b,{IS:()=>h,LH:()=>m,NN:()=>g,Sj:()=>o,aW:()=>n});var d=c(26283),e=c(13033),f=c(56263);function g(a){let b=(0,d.aJ)(a).split("\n"),c=(0,d.GT)(b),e=c>=0?b.slice(0,c):b,f=-1;for(let a=e.length-1;a>=0;a--)if(/^❯\s+\S/.test(e[a])){f=a;break}let g=f>=0?f+1:0,h=e.slice(g),i=[/CLAUDE_HOOKS_/,/\/bin\/claude/,/^claude\s*$/,/@.*\s+%\s*$/,/^[^⏺]*curl.*POST/,/^[^⏺]*Content-Type/,/^[^⏺]*export\s+CLAUDE_/,/^\s*$/,/^[╭╮╰╯│─\s]+$/,/^[│╭╮╰╯].*[│╭╮╰╯]$/,/Claude Code v[\d.]+/,/^Tips for getting started/,/^Welcome back/,/Run \/init to create/,/^Recent activity/,/^No recent activity/,/▐▛███▜▌|▝▜█████▛▘|▘▘ ▝▝/,/^\s*Opus \d+\.\d+\s*·\s*Claude Max/,/\.com's Organization/,/\?\s*for shortcuts\s*$/,/^─{10,}$/,/^❯\s*$/,d.fW],j=[];for(let a of h)!i.some(b=>b.test(a))&&a.trim()&&j.push(a);return j.join("\n").trim()}function h(a){let b=(0,d.aJ)(a).split("\n"),c=[],e=[/^maenokota@.*%/,/^zsh:/,/^feature-issue-\d+/,/^\s*$/],f=!1,g=[];for(let a of b){if(a.includes("✦")){f=!0;let b=a.indexOf("✦"),c=a.substring(b+1).trim();c&&g.push(c);continue}if(f){if(e.some(b=>b.test(a)))continue;g.push(a)}}if(g.length>0)return g.join("\n").trim();for(let a of b)e.some(b=>b.test(a))||c.push(a);return c.join("\n").trim()}let i=/^●\s+(?:Get |Read |Run |Search |Write |Delete |Edit |List |Create |Check |Fetch |Map |Explore |Execute |Find |Install |Update |Open |Close |Copy |Move |Rename |Set |Test |Build |Deploy |Start |Stop |Restart |Kill |Call |Send |Upload |Download |Compile |Analyze |Scan |Apply |Revert |Reset |Push |Pull |Clone |Merge |Commit |Checkout |Branch |Tag |Diff |Log |Show |Status |Init |Config |Add |Remove |Index |Query |Connect |Disconnect |Ping |Trace |Debug |Validate |Verify |Inspect |Monitor |Watch |Clean |Purge |Flush |Load |Save |Export |Import |Format |Lint |Parse |Generate |Transform |Convert |Migrate |Upgrade |Patch |Enable |Disable |Grant |Revoke |Approve |Deny |Lock |Unlock |Mount |Unmount |Attach |Detach |Register |Unregister |Subscribe |Unsubscribe |Publish |Unpublish |Encrypt |Decrypt |Sign |Hash |Encode |Decode |Compress |Decompress |Archive |Extract |Backup |Restore |Dump |Model changed to:)/,j=/^\d+\s+lines\.\.\.$/,k=/^[◐◑◒◓]/,l=/^(?:git\s+--no-pager|git\s+(?:log|diff|show|status|branch|remote|fetch|pull|push|merge|rebase|checkout|reset|stash|tag|config|clone|init|add|commit|rm|mv|bisect|grep|ls-files|rev-parse|describe|shortlog|blame|reflog|cherry-pick|revert|submodule|worktree)\b|npm\s+|npx\s+|node\s+|yarn\s+|pnpm\s+|cargo\s+|pip\s+|python\s+|ruby\s+|go\s+|rustc\s+|make\s+|cmake\s+|docker\s+|kubectl\s+|aws\s+|gcloud\s+|az\s+|terraform\s+|ansible\s+|curl\s+|wget\s+|ssh\s+|scp\s+|rsync\s+|find\s+|grep\s+|sed\s+|awk\s+|cat\s+|ls\s+|cd\s+|mkdir\s+|rm\s+|cp\s+|mv\s+|chmod\s+|chown\s+|echo\s+)/;function m(a){let b=(0,d.aJ)(a).split("\n"),c=-1;for(let a=b.length-1;a>=0;a--){let d=(0,e.IW)(b[a]);if(d&&/^❯\s+\S/.test(d)){c=a;break}}let f=c>=0?c+1:0,g=b.slice(f),h=[],m=!1,n=!1;for(let a of g){let b=(0,e.IW)(a);if(!(!b||d.J7.some(a=>a.test(b)))){if(i.test(b)){n=!0,m=!1;continue}if(k.test(b)){m=!0,n=!1;continue}if(!(j.test(b)||l.test(b)||/^❯\s*/.test(b)||/^[│└]/.test(b))){if(/^●/.test(b)){m=!1,n=!1,h.push(b.replace(/^●\s*/,""));continue}m||n||h.push(b)}}}return h.join("\n").trim()}function n(a){let b=a.split("\n"),c=[];for(let a=0;a<b.length;a++){let f=(0,e.l1)(b[a]);f&&d.Md.test(f)&&c.push(a)}let f=0;c.length>=2&&(f=c[c.length-2]+1);let g=[];for(let a=f;a<b.length;a++){let c=(0,e.l1)(b[a]);!(!c||d.sx.some(a=>a.test(c)))&&(d.Md.test(c)||g.push(c))}return g.join("\n").trim()}function o(a,b=f.Rf,c=f.ky){if(!a||a.length<=b)return a;let d=c+"\n",e=b-d.length;if(e<=0)return c.slice(0,b);let g=a.length-e;if(g>0&&g<a.length){let b=a.charCodeAt(g);b>=56320&&b<=57343&&(g+=1)}return d+a.slice(g)}},90164:(a,b,c)=>{"use strict";c.d(b,{Dk:()=>e,kD:()=>f});let d="https://github.com/Kewton/CommandMate",e=`${d}/releases/`,f=`${d}/blob/main/docs/security-guide.md`},93997:(a,b,c)=>{"use strict";c.d(b,{aq:()=>m,gm:()=>k,pc:()=>l,sl:()=>f,vF:()=>j,wd:()=>i,xE:()=>e});let d=(0,c(72626).h)("tmux-capture-cache"),e=1e4;function f(a,b=e){return b>0&&a>=b}function g(){return globalThis.__tmuxCaptureCache??=new Map}function h(){return globalThis.__tmuxCaptureCacheInflight??=new Map}function i(a,b){if(""===a)return"";let c=a.split("\n");return b>=c.length?a:c.slice(-b).join("\n")}function j(a,b,c){let d=g(),e=Date.now();for(let[a,b]of d)e-b.timestamp>5e3&&d.delete(a);if(d.size>=100&&!d.has(a)){let a=null,b=1/0;for(let[c,e]of d)e.timestamp<b&&(b=e.timestamp,a=c);a&&d.delete(a)}d.set(a,{output:b,capturedLines:c,timestamp:e})}function k(a){g().delete(a),d.debug("cache:invalidate",{sessionName:a})}function l(){g().clear(),h().clear()}async function m(a,b,c){let d=function(a,b){let c=g(),d=c.get(a);return d?Date.now()-d.timestamp>5e3?(c.delete(a),null):b>d.capturedLines?null:i(d.output,b):null}(a,b);if(null!==d)return d;let f=h(),k=f.get(a);if(k)return i(await k,b);let l=c();f.set(a,l);try{let c=await l;return c.length>0&&j(a,c,e),i(c,b)}finally{f.delete(a)}}},95220:(a,b,c)=>{"use strict";c.r(b),c.d(b,{accumulateTuiContent:()=>g.IZ,cleanClaudeResponse:()=>f.NN,cleanCopilotResponse:()=>f.LH,cleanGeminiResponse:()=>f.IS,cleanOpenCodeResponse:()=>f.aW,clearPromptHashCache:()=>h.iX,clearTuiAccumulator:()=>g.q1,extractCopilotContentLines:()=>g.o0,extractTuiContentLines:()=>g.K0,findOverlapIndex:()=>g.vQ,getAccumulatedContent:()=>g.Uz,getActivePollers:()=>d.KQ,initTuiAccumulator:()=>g.tb,isDuplicatePrompt:()=>h.gv,isOpenCodeComplete:()=>e.b,migrateResponsePollerWorktreeIds:()=>d.sR,normalizeCopilotLine:()=>g.IW,normalizePromptForDedup:()=>h.zm,renamePromptHashCacheKey:()=>h.i2,resolveExtractionStartIndex:()=>e.Q,startPolling:()=>d.g8,stopAllPolling:()=>d.fq,stopPolling:()=>d.Et,truncateMessage:()=>f.Sj});var d=c(45146),e=c(60),f=c(82450),g=c(13033),h=c(72457)},95595:(a,b,c)=>{"use strict";c.d(b,{WC:()=>m,gv:()=>h,ug:()=>i});var d=c(26283),e=c(25129),f=c(68652),g=c(46423);let h={PROMPT_DETECTED:"prompt_detected",THINKING_INDICATOR:"thinking_indicator",OPENCODE_PROCESSING_INDICATOR:"opencode_processing_indicator",OPENCODE_SELECTION_LIST:"opencode_selection_list",CLAUDE_SELECTION_LIST:"claude_selection_list",COPILOT_SELECTION_LIST:"copilot_selection_list",CODEX_SELECTION_LIST:"codex_selection_list",CODEX_PAGER:"codex_pager",ANTIGRAVITY_SELECTION_LIST:"antigravity_selection_list",OPENCODE_RESPONSE_COMPLETE:"opencode_response_complete",INPUT_PROMPT:"input_prompt",NO_RECENT_OUTPUT:"no_recent_output",DEFAULT:"default"},i=new Set([h.OPENCODE_SELECTION_LIST,h.CLAUDE_SELECTION_LIST,h.COPILOT_SELECTION_LIST,h.CODEX_SELECTION_LIST,h.CODEX_PAGER,h.ANTIGRAVITY_SELECTION_LIST]),j=/press\s+(?:number|enter)\s+to\s+confirm/i,k=/^\s*[❯›●]?\s*\d{1,2}[.)]\s/;function l(a){let b=-1;for(let c=a.length-1;c>=Math.max(0,a.length-10);c--)if(d.aW.test(a[c])){b=c;break}let c=b>=0?b:a.length,e=-1,f=-1;for(let b=0;b<c;b++){let c=a[b],g=c.trim();""!==g&&((j.test(g)||k.test(g))&&(e=b),(0,d.ut)("codex",c)&&(f=b))}return e>=0&&f>e}function m(a,b,c){let i=(0,f.N)((0,d.aJ)(a)),j=i.split("\n"),k=j.length-1;for(;k>=0&&""===j[k].trim();)k--;let m=j.slice(0,k+1),n=m.slice(-15).join("\n"),o=m.slice(-g.$).join("\n"),p=m.slice(-30).join("\n");if("copilot"===b&&d.Mi.test(p)){let a=(0,d.KO)(b),c=(0,e.gF)((0,d._A)(i),a);return c.isPrompt&&(c.promptData?.options?.length??0)<=3?{status:"waiting",confidence:"high",reason:"prompt_detected",hasActivePrompt:!0,promptDetection:c}:{status:"waiting",confidence:"high",reason:h.COPILOT_SELECTION_LIST,hasActivePrompt:!1,promptDetection:c}}let q=m.slice(-15).join("\n");if("copilot"===b&&(0,d.ut)(b,q)){let a=(0,d.KO)(b);return{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:(0,e.gF)((0,d._A)(i),a)}}if("codex"===b&&d.pn.test(n)){let a=(0,d.KO)(b),c=(0,e.gF)((0,d._A)(i),a);return{status:"waiting",confidence:"high",reason:h.CODEX_PAGER,hasActivePrompt:!1,promptDetection:c}}if("codex"===b){let a=-1;for(let b=m.length-1;b>=Math.max(0,m.length-10);b--)if(d.aW.test(m[b])){a=b;break}let c=a>=0?a-1:m.length-1;for(;c>=0&&""===m[c].trim();)c--;if(c>=0){let a=m.slice(Math.max(0,c-15+1),c+1).join("\n");if(d.Jn.test(a)){let c=(0,d.KO)(b),f=(0,e.gF)((0,d._A)(i),c);return f.isPrompt&&((f.promptData?.question?.trim()??"").endsWith("?")||d.Dd.test(a))&&!l(m)?{status:"waiting",confidence:"high",reason:h.PROMPT_DETECTED,hasActivePrompt:!0,promptDetection:f}:{status:"waiting",confidence:"high",reason:h.CODEX_SELECTION_LIST,hasActivePrompt:!1,promptDetection:f}}}}if("antigravity"===b&&d.kT.test(n)){let a=(0,d.KO)(b),c=(0,e.gF)((0,d._A)(i),a);return{status:"waiting",confidence:"high",reason:h.ANTIGRAVITY_SELECTION_LIST,hasActivePrompt:!1,promptDetection:c}}let r=(0,d.KO)(b),s="opencode"===b||"codex"===b||"claude"===b||"copilot"===b?(0,d._A)(i):(0,d._A)(n),t=(0,e.gF)(s,r);if(t.isPrompt)if(!("codex"===b&&l(m)))return{status:"waiting",confidence:"high",reason:"prompt_detected",hasActivePrompt:!0,promptDetection:t};else t={...t,isPrompt:!1,promptData:void 0};if("claude"===b&&d.XY.test(n))return{status:"waiting",confidence:"high",reason:h.CLAUDE_SELECTION_LIST,hasActivePrompt:!1,promptDetection:t};if((0,d.ut)(b,o))return{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:t};if("claude"===b&&d.aU.test(n))return{status:"running",confidence:"high",reason:h.THINKING_INDICATOR,hasActivePrompt:!1,promptDetection:t};if("opencode"===b){if(d.kD.test(n))return{status:"running",confidence:"high",reason:"opencode_processing_indicator",hasActivePrompt:!1,promptDetection:t};let a=(0,d._A)(i).split("\n"),b=Math.max(0,a.length-7);for(let c=a.length-1;c>=Math.max(0,a.length-10);c--)if(/ctrl\+[tp]/.test(a[c])){b=Math.max(0,c-2);break}let c=a.slice(0,b),e=c.length-1;for(;e>=0&&""===c[e].trim();)e--;if(e>=0){let a=c.slice(Math.max(0,e-g.$+1),e+1).join("\n");if((0,d.ut)("opencode",a))return{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:t};let b=c.slice(Math.max(0,e-15+1),e+1).join("\n"),f=c.join("\n");if(d.LO.test(f))return{status:"waiting",confidence:"high",reason:h.OPENCODE_SELECTION_LIST,hasActivePrompt:!1,promptDetection:t};if(d.Md.test(b))return{status:"ready",confidence:"high",reason:h.OPENCODE_RESPONSE_COMPLETE,hasActivePrompt:!1,promptDetection:t};let{promptPattern:i}=(0,d._X)("opencode");if(i.test(b))return{status:"ready",confidence:"high",reason:h.PROMPT_DETECTED,hasActivePrompt:!0,promptDetection:t}}}if("codex"===b){let a=-1;for(let b=m.length-1;b>=Math.max(0,m.length-10);b--)if(d.aW.test(m[b])){a=b;break}if(a>=0){let b=a-1;for(;b>=0&&""===m[b].trim();)b--;if(b>=0){let a=m.slice(Math.max(0,b-g.$+1),b+1).join("\n");if((0,d.ut)("codex",a))return{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:t};let c=m[b].trim();return d.gm.test(c)?{status:"ready",confidence:"high",reason:"input_prompt",hasActivePrompt:!1,promptDetection:t}:{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:t}}}else{let a=m.length-1;for(;a>=0&&""===m[a].trim();)a--;if(!(a>=0&&d.gm.test(m[a].trim()))&&(0,d.ut)("codex",n))return{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:t}}}if("antigravity"===b){if((0,d.ut)("antigravity",n))return{status:"running",confidence:"high",reason:h.THINKING_INDICATOR,hasActivePrompt:!1,promptDetection:t};let{promptPattern:a}=(0,d._X)("antigravity");if(a.test(n))return{status:"ready",confidence:"high",reason:h.INPUT_PROMPT,hasActivePrompt:!1,promptDetection:t}}let{promptPattern:u}=(0,d._X)(b);return u.test(n)?{status:"ready",confidence:"high",reason:"input_prompt",hasActivePrompt:!1,promptDetection:t}:c&&Date.now()-c.getTime()>5e3?{status:"ready",confidence:"low",reason:"no_recent_output",hasActivePrompt:!1,promptDetection:t}:{status:"running",confidence:"low",reason:"default",hasActivePrompt:!1,promptDetection:t}}},99508:(a,b,c)=>{"use strict";c.r(b),c.d(b,{INTERACTION_SNAPSHOT_RETRY_DELAYS_MS:()=>l,__resetTerminalBroadcastState:()=>s,broadcastSessionStatus:()=>r,broadcastTerminalSnapshot:()=>m,broadcastTerminalSnapshotAfterInteraction:()=>q});var d=c(69297),e=c(88807),f=c(34892),g=c(72626),h=c(31268),i=c(93997);let j=(0,g.h)("terminal-broadcast"),k=new Map,l=[100,250,500,750];async function m(a,b,c){if((0,d.hasRoomSubscribers)(a))try{let d=(0,e.getDbInstance)(),g=await (0,f.$)(d,a,b,c);p(a,b,g,c)}catch(b){j.error("terminal-snapshot:failed",{worktreeId:a,error:b instanceof Error?b.message:String(b)})}}function n(a){return JSON.stringify([a.fullOutput??"",a.isRunning,a.thinking??!1,a.isPromptWaiting??!1,a.isSelectionListActive??!1,a.isPagerActive??!1,a.isUnclassifiedActive??!1])}async function o(a,b,c){let d=h.s.getInstance().getTool(b);return(0,i.gm)(d.getSessionName(a,c)),(0,f.$)((0,e.getDbInstance)(),a,b,c)}function p(a,b,c,e){let f=e??b,g=`${a}:${b}:${f}`;(0,d.broadcast)(a,{type:"terminal_snapshot",worktreeId:a,cliToolId:b,instanceId:f,output:c.fullOutput??"",isRunning:c.isRunning,thinking:c.thinking??!1,isPromptWaiting:c.isPromptWaiting??!1,promptData:c.promptData??null,isSelectionListActive:c.isSelectionListActive??!1,isPagerActive:c.isPagerActive??!1,isUnclassifiedActive:c.isUnclassifiedActive??!1,version:function(a){let b=(k.get(a)??0)+1;return k.set(a,b),b}(g)})}async function q(a,b,c,e=l){if((0,d.hasRoomSubscribers)(a))try{let d=await o(a,b,c),f=n(d);for(let g of(p(a,b,d,c),e)){await new Promise(a=>setTimeout(a,g));let d=await o(a,b,c);if(n(d)!==f)return void p(a,b,d,c)}}catch(d){j.error("terminal-snapshot:interaction-refresh-failed",{worktreeId:a,cliToolId:b,instanceId:c,error:d instanceof Error?d.message:String(d)})}}function r(a,b,c){(0,d.broadcast)(a,{type:"session_status_changed",worktreeId:a,isRunning:b,cliTool:c?.cliTool??null,instance:c?.instance??null})}function s(){k.clear()}}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=
|
|
1
|
+
"use strict";exports.id=5998,exports.ids=[5998],exports.modules={3421:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71237),e=c(55088),f=c(17679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},4868:(a,b,c)=>{function d(a,b){let c=a.prepare(`
|
|
2
2
|
SELECT date, content, generated_by_tool, model, created_at, updated_at
|
|
3
3
|
FROM daily_reports
|
|
4
4
|
WHERE date = ?
|
|
@@ -82,4 +82,4 @@ ${d}`:""].join("\n"))),exitCode:"number"==typeof e?e:null,status:h?"timeout":"fa
|
|
|
82
82
|
WHERE created_at >= ? AND created_at < ?
|
|
83
83
|
AND event IN ('prompt_answered_human', 'prompt_answered_auto')
|
|
84
84
|
GROUP BY event
|
|
85
|
-
`).all(b,c));return{humanResponds:d.get("prompt_answered_human")??0,autoAnswered:d.get("prompt_answered_auto")??0}}(a,l,k):{humanResponds:0,autoAnswered:0},suppressedByPolicy:null}}}},70673:(a,b,c)=>{function d(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function e(a,b=30){return a.length<=b?a:`${a.substring(0,b-3)}...`}c.d(b,{Nt:()=>d,W5:()=>e,wj:()=>g});class f extends Error{constructor(a){super(a),this.name="TimeoutError"}}function g(a,b,c){return new Promise((d,e)=>{let g=setTimeout(()=>{void 0!==c?d(c):e(new f(`Operation timed out after ${b}ms`))},b);a.then(a=>{clearTimeout(g),d(a)},a=>{clearTimeout(g),e(a)})})}},73434:(a,b,c)=>{c.d(b,{h:()=>e});let d=["CLAUDECODE","CM_AUTH_TOKEN_HASH","CM_AUTH_EXPIRE","CM_HTTPS_KEY","CM_HTTPS_CERT","CM_ALLOWED_IPS","CM_TRUST_PROXY","CM_DB_PATH","GH_DEBUG"];function e(){let a={...process.env};for(let b of d)delete a[b];return a}}};
|
|
85
|
+
`).all(b,c));return{humanResponds:d.get("prompt_answered_human")??0,autoAnswered:d.get("prompt_answered_auto")??0}}(a,l,k):{humanResponds:0,autoAnswered:0},suppressedByPolicy:null}}}},70673:(a,b,c)=>{function d(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function e(a,b=30){return a.length<=b?a:`${a.substring(0,b-3)}...`}c.d(b,{Nt:()=>d,W5:()=>e,wj:()=>g});class f extends Error{constructor(a){super(a),this.name="TimeoutError"}}function g(a,b,c){return new Promise((d,e)=>{let g=setTimeout(()=>{void 0!==c?d(c):e(new f(`Operation timed out after ${b}ms`))},b);a.then(a=>{clearTimeout(g),d(a)},a=>{clearTimeout(g),e(a)})})}},73434:(a,b,c)=>{c.d(b,{h:()=>e});let d=["CLAUDECODE","CM_AUTH_TOKEN_HASH","CM_AUTH_EXPIRE","CM_HTTPS_KEY","CM_HTTPS_CERT","CM_ALLOWED_IPS","CM_TRUST_PROXY","CM_DB_PATH","GH_DEBUG"];function e(){let a={...process.env};for(let b of d)delete a[b];return a}},95736:(a,b,c)=>{a.exports=c(44870)}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=6130,exports.ids=[6130],exports.modules={26838:(a,b,c)=>{c.d(b,{Mj:()=>k,Sw:()=>j,lX:()=>l});var d=c(29021),e=c(33873),f=c(90164);let g=/^v?\d+\.\d+\.\d+$/,h=/^[a-zA-Z0-9.\-\s_v]+$/,i=globalThis.__versionCheckCache??(globalThis.__versionCheckCache={result:null,fetchedAt:0,rateLimitResetAt:null});function j(){return function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),"package.json"),"utf-8"),b=JSON.parse(a);if("commandmate"===b.name&&"string"==typeof b.version&&b.version.length>0)return b.version;return null}catch{return null}}()??"0.
|
|
1
|
+
"use strict";exports.id=6130,exports.ids=[6130],exports.modules={26838:(a,b,c)=>{c.d(b,{Mj:()=>k,Sw:()=>j,lX:()=>l});var d=c(29021),e=c(33873),f=c(90164);let g=/^v?\d+\.\d+\.\d+$/,h=/^[a-zA-Z0-9.\-\s_v]+$/,i=globalThis.__versionCheckCache??(globalThis.__versionCheckCache={result:null,fetchedAt:0,rateLimitResetAt:null});function j(){return function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),"package.json"),"utf-8"),b=JSON.parse(a);if("commandmate"===b.name&&"string"==typeof b.version&&b.version.length>0)return b.version;return null}catch{return null}}()??"0.21.0"}function k(){return j()}async function l(){try{var a,b,c;if(null!==i.result&&Date.now()-i.fetchedAt<36e5||i.rateLimitResetAt&&(!(Date.now()>=i.rateLimitResetAt)||(i.rateLimitResetAt=null,0)))return i.result;let d=await fetch("https://api.github.com/repos/Kewton/CommandMate/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":`CommandMate/${k()}`},cache:"no-store",signal:AbortSignal.timeout(5e3)});if(403===d.status)return function(a){let b=a.headers.get("X-RateLimit-Reset");b?i.rateLimitResetAt=1e3*parseInt(b,10):i.rateLimitResetAt=Date.now()+36e5}(d),i.result;if(!d.ok)return i.result;let e=await d.json(),j=k(),l=e.tag_name.replace(/^v/,""),m={hasUpdate:function(a,b){if(!g.test(a)||!g.test(b))return!1;let c=a=>a.replace(/^v/,"").split(".").map(Number),[d,e,f]=c(a),[h,i,j]=c(b);return h!==d?h>d:i!==e?i>e:j>f}(j,e.tag_name),currentVersion:j,latestVersion:l,releaseUrl:(a=e.html_url).startsWith(f.Dk)?a:null,releaseName:(b=e.name,c=e.tag_name,h.test(b)&&b.length<=128?b:c),publishedAt:e.published_at};return i.result=m,i.fetchedAt=Date.now(),m}catch{return i.result}}},88573:(a,b,c)=>{c.d(b,{Lw:()=>s});let d="https://raw.githubusercontent.com/Kewton/commandmate-skills/main/catalog/v1/catalog.json",e=[d],f=/^[A-Za-z0-9/+=_."-]{1,128}$/;var g=c(72626),h=c(13075);let i=(0,g.h)("lib/skills/catalog-client"),j={FETCH_FAILED:"SKILL_CATALOG_FETCH_FAILED",RATE_LIMITED:"SKILL_CATALOG_RATE_LIMITED",OVERSIZED:"SKILL_CATALOG_OVERSIZED",MALFORMED:"SKILL_CATALOG_MALFORMED",INVALID_SCHEMA:"SKILL_CATALOG_INVALID_SCHEMA"},k=globalThis.__skillCatalogCache??={catalog:null,validatedAt:0,confirmedAt:0,etag:null,revision:null,rateLimitResetAt:null,inflight:null};class l extends Error{}let m={[j.FETCH_FAILED]:"The Skill Catalog could not be retrieved.",[j.RATE_LIMITED]:"The Skill Catalog origin is rate limiting requests.",[j.OVERSIZED]:"The Skill Catalog response exceeded the allowed size.",[j.MALFORMED]:"The Skill Catalog response was not valid JSON.",[j.INVALID_SCHEMA]:"The Skill Catalog response did not match the supported Catalog schema."};function n(a){return new Date(a).toISOString()}function o(a,b,c){return{catalog:a,fetchedAt:n(k.validatedAt),revalidatedAt:n(k.confirmedAt),state:b,stale:"stale"===b,offline:"stale"===b,staleReason:c,source:{repository:"Kewton/commandmate-skills",ref:"main",revision:k.revision}}}function p(a,b=[]){return k.catalog?{ok:!0,snapshot:o(k.catalog,"stale",a)}:{ok:!1,failure:{code:a,message:m[a],errors:b}}}async function q(a,b){let c=a.headers.get("Content-Length");if(null!==c){let a=Number(c);if(!Number.isFinite(a)||a<0||a>b)throw new l("content-length out of bounds")}let d=a.body;if(!d||"function"!=typeof d.getReader){let c=await a.text();if(new TextEncoder().encode(c).length>b)throw new l("body exceeded size cap");return c}let e=d.getReader(),f=[],g=0;for(;;){let{done:a,value:c}=await e.read();if(a)break;if(c){if((g+=c.byteLength)>b)throw await e.cancel(),new l("body exceeded size cap");f.push(c)}}let h=new Uint8Array(g),i=0;for(let a of f)h.set(a,i),i+=a.byteLength;return new TextDecoder("utf-8").decode(h)}async function r(a){let b,c,g;if(!e.includes(d))return p(j.FETCH_FAILED);let m={Accept:"application/json","User-Agent":`CommandMate/${a}`};null!==k.catalog&&null!==k.etag&&(m["If-None-Match"]=k.etag);try{b=await fetch(d,{headers:m,cache:"no-store",signal:AbortSignal.timeout(5e3)})}catch{return i.warn("catalog-fetch-failed",{reason:j.FETCH_FAILED}),p(j.FETCH_FAILED)}if(304===b.status&&null!==k.catalog)return k.confirmedAt=Date.now(),{ok:!0,snapshot:o(k.catalog,"revalidated",null)};if(403===b.status||429===b.status)return!function(a){let b=Date.now(),c=b+864e5,d=a.headers.get("X-RateLimit-Reset");if(null!==d){let a=Number(d);if(Number.isFinite(a)&&a>0){k.rateLimitResetAt=Math.min(1e3*a,c);return}}let e=a.headers.get("Retry-After");if(null!==e){let a=Number(e);if(Number.isFinite(a)&&a>0){k.rateLimitResetAt=Math.min(b+1e3*a,c);return}}k.rateLimitResetAt=b+36e5}(b),i.warn("catalog-rate-limited",{status:b.status}),p(j.RATE_LIMITED);if(!b.ok)return i.warn("catalog-fetch-failed",{status:b.status}),p(j.FETCH_FAILED);try{c=await q(b,1048576)}catch(b){let a=b instanceof l?j.OVERSIZED:j.FETCH_FAILED;return i.warn("catalog-body-rejected",{reason:a}),p(a)}try{g=JSON.parse(c)}catch{return i.warn("catalog-malformed",{reason:j.MALFORMED}),p(j.MALFORMED)}let n=(0,h.JJ)(g);if(!n.ok)return i.warn("catalog-invalid-schema",{errorCount:n.errors.length}),p(j.INVALID_SCHEMA,n.errors);let r=Date.now();return k.catalog=n.value,k.validatedAt=r,k.confirmedAt=r,k.etag=b.headers.get("ETag"),k.revision=function(a){if(null===a)return null;let b=a.trim();return f.test(b)?b:null}(k.etag),{ok:!0,snapshot:o(n.value,"fresh",null)}}async function s(a={}){let{hostVersion:b="0.0.0",forceRevalidate:c=!1}=a;return!c&&null!==k.catalog&&Date.now()-k.confirmedAt<9e5&&null!==k.catalog?{ok:!0,snapshot:o(k.catalog,"cached",null)}:null!==k.rateLimitResetAt&&(!(Date.now()>=k.rateLimitResetAt)||(k.rateLimitResetAt=null,0))?p(j.RATE_LIMITED):(null===k.inflight&&(k.inflight=r(b).finally(()=>{k.inflight=null})),k.inflight)}},90164:(a,b,c)=>{c.d(b,{Dk:()=>e,kD:()=>f});let d="https://github.com/Kewton/CommandMate",e=`${d}/releases/`,f=`${d}/blob/main/docs/security-guide.md`}};
|