commandmate 0.14.1 → 0.16.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/.env.example +7 -0
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +418 -354
- package/.next/app-path-routes-manifest.json +42 -34
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +9 -9
- package/.next/react-loadable-manifest.json +22 -24
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +15 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update-check/route.js +1 -1
- package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/conversation/route.js +1 -1
- package/.next/server/app/api/assistant/conversation/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/current-output/route.js +1 -1
- package/.next/server/app/api/assistant/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/messages/route.js +1 -1
- package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/session/route.js +1 -1
- package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/start/route.js +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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/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 +7 -0
- package/.next/server/app/api/fs/browse/route.js.nft.json +1 -0
- package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/fs/recent-paths/route.js +7 -0
- package/.next/server/app/api/fs/recent-paths/route.js.nft.json +1 -0
- package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -0
- 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/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 -0
- package/.next/server/app/api/repositories/validate-path/route.js.nft.json +1 -0
- package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -0
- 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 +23 -0
- package/.next/server/app/api/skills/installations/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/operations/route.js +13 -0
- package/.next/server/app/api/skills/operations/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/reindex/route.js +23 -0
- package/.next/server/app/api/skills/reindex/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -0
- 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/templates/[id]/route.js +1 -1
- 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 +1 -1
- 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/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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +2 -2
- 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 +18 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -0
- 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/route.js +1 -1
- 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]/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]/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/chat/page.js +1 -1
- package/.next/server/app/chat/page.js.nft.json +1 -1
- package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/more/page.js +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 +2 -2
- 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.js +2 -0
- package/.next/server/app/skills/installed/page.js.nft.json +1 -0
- package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -0
- package/.next/server/app/skills/page.js +2 -2
- package/.next/server/app/skills/page.js.nft.json +1 -1
- package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page.js +1 -1
- 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 +9 -9
- package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
- package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +42 -34
- package/.next/server/chunks/1117.js +1 -1
- package/.next/server/chunks/1185.js +1 -0
- package/.next/server/chunks/1239.js +1 -0
- package/.next/server/chunks/1355.js +1 -0
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/22.js +1 -1
- package/.next/server/chunks/2328.js +1 -1
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/2710.js +2 -0
- package/.next/server/chunks/28.js +35 -0
- package/.next/server/chunks/3042.js +1 -2
- package/.next/server/chunks/3543.js +1 -1
- package/.next/server/chunks/3722.js +1 -1
- package/.next/server/chunks/3736.js +1 -1
- package/.next/server/chunks/3753.js +1 -1
- package/.next/server/chunks/3945.js +1 -1
- package/.next/server/chunks/4390.js +1 -0
- package/.next/server/chunks/4440.js +2 -0
- package/.next/server/chunks/4444.js +1 -1
- package/.next/server/chunks/4548.js +1 -0
- package/.next/server/chunks/5064.js +1 -1
- package/.next/server/chunks/5326.js +1 -1
- package/.next/server/chunks/5381.js +1 -1
- package/.next/server/chunks/5456.js +1 -1
- package/.next/server/chunks/5737.js +1 -0
- package/.next/server/chunks/5793.js +1 -0
- package/.next/server/chunks/5959.js +2 -2
- package/.next/server/chunks/6065.js +1 -1
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/646.js +2 -2
- package/.next/server/chunks/7593.js +1 -0
- package/.next/server/chunks/8356.js +1 -1
- package/.next/server/chunks/8681.js +1 -1
- package/.next/server/chunks/8807.js +66 -3
- package/.next/server/chunks/9051.js +1 -0
- package/.next/server/chunks/9123.js +1 -1
- package/.next/server/chunks/9687.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/server/src/middleware.js.map +1 -1
- package/.next/static/AKqbAyuzbFfg05qpbCI_K/_buildManifest.js +1 -0
- package/.next/static/chunks/1191-b7dfdfe86b1d31d1.js +1 -0
- package/.next/static/chunks/2751-7fabd91275b14ca3.js +1 -0
- package/.next/static/chunks/{4459.03172449db395039.js → 4459.a94b52985a76509a.js} +1 -1
- package/.next/static/chunks/{4560-04e5aebcab96bfa1.js → 4560-8ffb0bb19f2ba998.js} +1 -1
- package/.next/static/chunks/530.e31cc754677fed0f.js +1 -0
- package/.next/static/chunks/5542-b6457f305d724a6b.js +1 -0
- package/.next/static/chunks/{6488-74d2f443e43c07b7.js → 6488-c2a968ec806975c2.js} +1 -1
- package/.next/static/chunks/{7485.43871aedf3dbb980.js → 7485.442b21101fca7257.js} +1 -1
- package/.next/static/chunks/8562-6e2ab32452f4fa5b.js +1 -0
- package/.next/static/chunks/8566-a6a7c70558927410.js +1 -0
- package/.next/static/chunks/9263.5259f73f89220d64.js +1 -0
- package/.next/static/chunks/9599-d29d2f8eeaf7c249.js +1 -0
- package/.next/static/chunks/app/api/app/update/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/app/update-check/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/assistant/conversation/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/assistant/current-output/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/assistant/messages/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/assistant/session/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/assistant/start/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/assistant/terminal/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/assistant/tools/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/fs/browse/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/fs/recent-paths/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/validate-path/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/skills/installations/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/skills/operations/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/skills/reindex/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/skills/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/templates/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/todos/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/chat/page-83a2238ab453afaa.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/more/{page-082d4ae496f9a36e.js → page-1619018cac999bbc.js} +1 -1
- package/.next/static/chunks/app/proxy/[...path]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/repositories/page-3c4fb889da48ce24.js +1 -0
- package/.next/static/chunks/app/skills/[skillId]/page-6008b904225ebb25.js +1 -0
- package/.next/static/chunks/app/skills/installed/page-6641f95e6a6e5f9d.js +1 -0
- package/.next/static/chunks/app/skills/page-184f8e23e31a3667.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/files/[...path]/{page-6a45f3744da50d95.js → page-6041d3c3db326317.js} +1 -1
- package/.next/static/chunks/app/worktrees/[id]/page-59a63a2c013ec1eb.js +1 -0
- package/.next/static/chunks/webpack-180bebdee221b6f4.js +1 -0
- package/.next/static/css/d3453a6876553d32.css +1 -0
- package/.next/trace +11 -11
- package/.next/types/app/api/fs/browse/route.ts +347 -0
- package/.next/types/app/api/fs/recent-paths/route.ts +347 -0
- package/.next/types/app/api/repositories/validate-path/route.ts +347 -0
- package/.next/types/app/api/skills/installations/route.ts +347 -0
- package/.next/types/app/api/skills/operations/route.ts +347 -0
- package/.next/types/app/api/skills/reindex/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.ts +347 -0
- package/.next/types/app/skills/installed/page.ts +84 -0
- package/.next/types/routes.d.ts +10 -2
- package/.next/types/validator.ts +72 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +15 -0
- package/dist/cli/commands/skill.d.ts +2 -1
- package/dist/cli/commands/skill.d.ts.map +1 -1
- package/dist/cli/commands/skill.js +136 -2
- package/dist/cli/types/api-responses.d.ts +40 -0
- package/dist/cli/types/api-responses.d.ts.map +1 -1
- package/dist/cli/types/index.d.ts +12 -0
- package/dist/cli/types/index.d.ts.map +1 -1
- package/dist/cli/utils/env-setup.d.ts +8 -0
- package/dist/cli/utils/env-setup.d.ts.map +1 -1
- package/dist/cli/utils/env-setup.js +23 -0
- package/dist/server/src/lib/db/migrations/index.js +2 -0
- package/dist/server/src/lib/db/migrations/runner.js +1 -1
- package/dist/server/src/lib/db/migrations/v48-skill-operations-audit-index.js +117 -0
- package/dist/server/src/lib/git/git-exec.js +48 -1
- package/dist/server/src/lib/selected-agents-validator.js +3 -2
- package/dist/server/src/lib/skills/compatibility-matrix.js +256 -0
- package/dist/server/src/lib/skills/compatibility.js +132 -11
- package/dist/server/src/lib/skills/operation-audit.js +85 -15
- package/dist/server/src/lib/skills/operation-journal.js +14 -1
- package/dist/server/src/types/markdown-editor.js +13 -1
- package/package.json +1 -1
- package/.next/server/chunks/1808.js +0 -1
- package/.next/server/chunks/186.js +0 -1
- package/.next/server/chunks/5226.js +0 -28
- package/.next/server/chunks/5306.js +0 -2
- package/.next/server/chunks/7013.js +0 -1
- package/.next/server/chunks/9067.js +0 -1
- package/.next/server/chunks/9192.js +0 -1
- package/.next/static/1WyelLMRgPnhvA2HmhZmm/_buildManifest.js +0 -1
- package/.next/static/chunks/1668-e703b8b55775844b.js +0 -1
- package/.next/static/chunks/2069-c55de93eb6403961.js +0 -1
- package/.next/static/chunks/3418-7e47651340d940b0.js +0 -1
- package/.next/static/chunks/4027-000402aee1e3520b.js +0 -1
- package/.next/static/chunks/530.e377b0f1a7a89620.js +0 -1
- package/.next/static/chunks/6007-de36119357dcd418.js +0 -1
- package/.next/static/chunks/6497-ea466b22a6c1ae89.js +0 -1
- package/.next/static/chunks/8361.4bf062be2d2962f4.js +0 -1
- package/.next/static/chunks/8566-9da32e46c9d3fd54.js +0 -1
- package/.next/static/chunks/934-a37509667baa86ee.js +0 -1
- package/.next/static/chunks/app/api/app/update/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/app/update-check/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/assistant/conversation/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/assistant/current-output/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/assistant/messages/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/assistant/session/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/assistant/start/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/assistant/terminal/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/assistant/tools/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/skills/[id]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/skills/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/templates/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/todos/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/chat/page-623f5cb9040de639.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/repositories/page-70d4b997492884b8.js +0 -1
- package/.next/static/chunks/app/skills/[skillId]/page-68ed5e9186efe56d.js +0 -1
- package/.next/static/chunks/app/skills/page-46242c428ee8bccf.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-983a80ece6289026.js +0 -1
- package/.next/static/chunks/webpack-e655374fed175528.js +0 -1
- package/.next/static/css/b4bdb1f3457fe9a7.css +0 -1
- /package/.next/static/{1WyelLMRgPnhvA2HmhZmm → AKqbAyuzbFfg05qpbCI_K}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
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$:()=>A,zX:()=>B});var d=c(31766),e=c(88807),f=c(56791),g=c(49997),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);let w=(0,m.h)("response-poller");function x(a){return{response:"",isComplete:!1,lineCount:a}}function y(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 z(a,b){let c=(0,l.KO)(b);return(0,h.gF)((0,l._A)((0,l.aJ)(a)),c)}function A(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),A=(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=z(f.join("\n"),c);if(a.isPrompt)return y(f,b,g,m,c,A,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,A),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 x(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 x(g)}else if((b||c||d||e)&&h.length<2e3)return x(g)}if("gemini"===c&&((h.match(/[░███]/g)||[]).length>.3*h.length||u.SI.some(a=>h.includes(a))||!h.includes("✦")&&h.length<10))return x(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 x(g)}return{response:h,isComplete:!0,lineCount:e,bufferReset:m}}if("opencode"!==c){let a=z(f.join("\n"),c);if(a.isPrompt)return y(f,b,g,m,c,A,a)}let I=[],J=m||b>=g-5,K=J?A(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}:x(g)}async function B(a,b,c){let h=(0,e.getDbInstance)(),m=c??b;try{let e=(0,f.Ui)(h,a);if(!e)return w.error("worktree-worktreeid-not"),(0,u.Et)(a,b,c),!1;if(!await (0,d.K1)(a,b,c))return w.info("session-not-running"),(0,u.Et)(a,b,c),!1;let o=(0,f.y1)(h,a,m),x=o?.lastCapturedLine||0,y=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,y,b)}let B=A(y,x,b);if(!B||!B.isComplete){let{thinkingPattern:c}=(0,l._X)(b),d=(0,l.aJ)(y).split("\n").slice(-n.$).join("\n");return c.test(d)&&(0,f.PL)(h,a,b,m)>0&&w.info("marked-answeredcount-pending"),!1}let C="opencode"===b||"copilot"===b,D=!(0,j.VA)(b);if(D&&!B.bufferReset&&B.lineCount===x&&!o?.inProgressMessageId)return!1;if(D&&!B.bufferReset&&B.lineCount<=x)return w.info("already-saved-up-to-line-lastcapturedlin"),!1;let E=B.promptDetection??z(B.response,b);if(E.isPrompt){let d=E.rawContent||E.cleanContent,i=(0,u.MN)(a,b,c),j=(0,s.zm)(d,b);if((0,s.gv)(i,j))return w.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.YX)(h,a,b,m);let l=(0,f.oH)(h,{worktreeId:a,role:"assistant",content:k,messageType:"prompt",promptData:E.promptData,timestamp:new Date,cliToolId:b,instanceId:m});return(0,f.gb)(h,a,b,B.lineCount,m),(0,g.Lo)("message",{worktreeId:a,message:l}),(0,v.J$)({worktreeId:a,worktreeName:e.name,kind:"prompt",agentName:m,excerpt:E.promptData?.question??k}).catch(()=>{}),C||(0,u.Et)(a,b,c),!0}if(!B.response||""===B.response.trim())return(0,f.gb)(h,a,b,B.lineCount,m),!1;let F="claude"===b?(0,k.R)(B.response):void 0,G=B.response;if("gemini"===b)G=(0,p.IS)(B.response);else if("claude"===b)G=(0,p.NN)(B.response);else if("copilot"===b){let d=(0,u.MN)(a,b,c),e=(0,r.Uz)(d)||B.response;G=(0,p.LH)(e),G=(0,p.Sj)(G,q.Rf,q.ky),(0,r.q1)(d)}else if("opencode"===b){G=(0,p.aW)(B.response);let d=(0,u.MN)(a,b,c);(0,r.q1)(d)}if(!G||""===G.trim()||"[No content]"===G)return(0,f.gb)(h,a,b,B.lineCount,m),(0,f.YX)(h,a,b,m),!1;if((0,j.VA)(b)){let d=(0,u.MN)(a,b,c);if((0,t.j)(d,G))return(0,f.gb)(h,a,b,B.lineCount,m),!1}G&&await (0,i.T)(h,a,G,b),(0,f.PL)(h,a,b,m)>0&&w.info("marked-answeredcount-pending");let H=(0,f.y1)(h,a,m);if(D&&H&&B.lineCount<=H.lastCapturedLine)return w.info("race-condition-detected-skipping-save-re"),!1;let I=(0,f.oH)(h,{worktreeId:a,role:"assistant",content:G,messageType:"normal",timestamp:new Date,cliToolId:b,instanceId:m,summary:F?.summary,logFileName:F?.logFileName,requestId:F?.requestId});return(0,g.Lo)("message",{worktreeId:a,message:I}),(0,v.J$)({worktreeId:a,worktreeName:e.name,kind:"completion",agentName:m,excerpt:G}).catch(()=>{}),(0,f.gb)(h,a,b,B.lineCount,m),C&&(0,u.Et)(a,b,c),!0}catch(a){return w.error("response:check-failed",{error:a instanceof Error?a.message:String(a)}),!1}}},5344:(a,b,c)=>{"use strict";c.d(b,{v7:()=>i,LP:()=>s,pL:()=>k,GE:()=>l,aq:()=>n,kC:()=>r,xU:()=>D,bZ:()=>E,W8:()=>o,W5:()=>K,_i:()=>L,_C:()=>M});var d=c(68901),e=c(66007),f=c(15194),g=c(72626);let h=(0,g.h)("auto-yes-state");function i(a,b,c){if(a.includes(":"))throw Error(`worktreeId must not contain ':': ${a}`);if(!c||c===b)return`${a}:${b}`;if(c.includes(":"))throw Error(`instanceId must not contain ':': ${c}`);return`${a}:${b}:${c}`}function j(a){let b=a.indexOf(":");return -1===b?a:a.substring(0,b)}function k(a){let b=a.split(":")[1];return void 0===b?null:(0,f.hR)(b)?b:null}function l(a){let b=a.split(":");return b[2]??b[1]??null}let m=globalThis.__autoYesStates??(globalThis.__autoYesStates=new Map);function n(a,b="claude",c){let d=i(a,b,c),e=m.get(d);return e?Date.now()>=e.expiresAt?p(a,b,"expired",c):e:null}function o(a,b,c,e,f,g){let h=i(a,b,g);if(!c)return p(a,b,void 0,g);{let a=Date.now(),b={enabled:!0,enabledAt:a,expiresAt:a+(e??d.t6),stopPattern:f};return m.set(h,b),b}}function p(a,b="claude",c,d){let e=i(a,b,d),f=m.get(e),g={enabled:!1,enabledAt:f?.enabledAt??0,expiresAt:f?.expiresAt??0,stopPattern:f?.stopPattern,stopReason:c};return m.set(e,g),g}function q(a,b){return a.filter(a=>j(a)===b)}function r(a){return q(Array.from(m.keys()),a)}function s(a){let b=r(a);return b.forEach(a=>m.delete(a)),b.length}var t=c(31766),u=c(25129),v=c(63869),w=c(31268),x=c(26283),y=c(77093),z=c(93997);let A=(0,g.h)("auto-yes-poller"),B=globalThis.__autoYesPollerStates??(globalThis.__autoYesPollerStates=new Map);function C(a){return B.get(a)}function D(a){let b=C(a);return b?.lastServerResponseTimestamp??null}function E(a){return B.has(a)}function F(a){let b=C(a);if(b){var c;if(b.consecutiveErrors++,b.currentInterval=(c=b.consecutiveErrors)<5?2e3:Math.min(2e3*Math.pow(2,c-5+1),6e4),b.consecutiveErrors>=d.ul){let b=j(a),c=k(a);c&&p(b,c,"consecutive_errors",l(a)??void 0),L(a)}}}async function G(a,b,c,e){let f=c??d.FW,g=await (0,t.Wh)(a,b,f,e);return(0,x._A)((0,x.aJ)(g))}async function H(a,b,d,e,f,g){let h=i(a,d,g);try{let i=(0,x.KO)(d),l=(0,u.gF)(e,{...i,...f&&{precomputedLines:f}});if(!l.isPrompt||!l.promptData)return b.lastAnsweredPromptKey=null,b.lastAnsweredAt=null,"no_prompt";let m=(j=l.promptData,`${j.type}:${j.question}`);if(b.lastAnsweredPromptKey===m&&null!==b.lastAnsweredAt&&Date.now()-b.lastAnsweredAt<1e4)return"duplicate";let n=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}(l.promptData);if(null===n)return"no_answer";let o=w.s.getInstance().getTool(d).getSessionName(a,g);try{await (0,v.t)({sessionName:o,answer:n,cliToolId:d,promptData:l.promptData})}finally{(0,z.gm)(o)}var j,k=Date.now();let p=C(h);p&&(p.lastServerResponseTimestamp=k);let q=C(h);q&&(q.consecutiveErrors=0,q.currentInterval=2e3),b.lastAnsweredPromptKey=m,b.lastAnsweredAt=Date.now(),A.info("poller:response-sent",{worktreeId:a,cliToolId:d,instanceId:g});let[{startPolling:r},{broadcastTerminalSnapshotAfterInteraction:s}]=await Promise.all([Promise.resolve().then(c.bind(c,95220)),Promise.resolve().then(c.bind(c,99508))]);return r(a,d,g),s(a,d,g),"responded"}catch{return F(h),A.warn("poller:detect-respond-error",{worktreeId:a,cliToolId:d,instanceId:g}),"error"}}async function I(a,b,c){let e=i(a,b,c),f=C(e);if("valid"===function(a,b){if(!b)return"stopped";let c=j(a),d=k(a);if(!d)return L(a),"expired";let e=n(c,d,l(a)??void 0);return e?.enabled?"valid":(L(a),"expired")}(e,f)){try{let g=n(a,b,c),i=g?.stopPattern?d.FW:d.Ke,m=await G(a,b,i,c),o=m.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,function(a,b,c){let e=j(a),f=k(a);if(!f)return!1;let g=l(a)??void 0,i=n(e,f,g);if(!i?.stopPattern)return!1;if(!(0,d.P0)(i.stopPattern).valid)return h.warn("invalid-stop-pattern",{detail:String({compositeKey:a})}),p(e,f,void 0,g),!1;try{let d=new RegExp(i.stopPattern),j=function(a,b,c=100){try{return a.test(b)}catch{return null}}(d,b);if(null===j)return h.warn("stop-condition-check",{detail:String({compositeKey:a})}),p(e,f,void 0,g),!1;if(j)return p(e,f,"stop_pattern_matched",g),c&&c(a),h.warn("stop-condition-matched",{detail:String({compositeKey:a})}),!0}catch{h.warn("stop-condition-check",{detail:String({compositeKey:a})})}return!1}(a,f,L)}return c.length<e&&(b.stopCheckBaselineLength=c.length),!1}(e,f,m))return;let q=await H(a,f,b,m,o,c);if("responded"===q)return void J(a,b,c,5e3);if("no_prompt"===q){let e=o.slice(-50).join("\n");if((0,x.ut)(b,e))return void J(a,b,c,d.QN)}}catch(d){F(e),A.warn("poller:poll-error",{worktreeId:a,cliToolId:b,instanceId:c,error:(0,y.u1)(d)})}J(a,b,c)}}function J(a,b,c,d){let e=C(i(a,b,c));if(!e)return;let f=Math.max(d??e.currentInterval,2e3);e.timerId=setTimeout(()=>{I(a,b,c)},f)}function K(a,b,c){if(!(0,e.h6)(a))return{started:!1,reason:"invalid worktree ID"};let d=c??b,f=n(a,b,d);if(!f?.enabled)return{started:!1,reason:"auto-yes not enabled"};let g=i(a,b,d),h=C(g);if(!h&&B.size>=50)return{started:!1,reason:"max concurrent pollers reached"};if(h&&h.cliToolId===b)return{started:!0,reason:"already_running"};h&&L(g);let j={timerId:null,cliToolId:b,instanceId:d,consecutiveErrors:0,currentInterval:2e3,lastServerResponseTimestamp:null,lastAnsweredPromptKey:null,lastAnsweredAt:null,stopCheckBaselineLength:-1};return B.set(g,j),j.timerId=setTimeout(()=>{I(a,b,d)},2e3),A.info("poller:started",{worktreeId:a,cliToolId:b,instanceId:d}),{started:!0}}function L(a){let b=C(a);b&&(b.timerId&&clearTimeout(b.timerId),B.delete(a),A.info("poller:stopped",{compositeKey:a}))}function M(a){q(Array.from(B.keys()),a).forEach(a=>L(a))}},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,historyLimit:5e4}),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.J,h=b.windowHeight??g.s,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=5e4,f=g.J,h=g.s):(c=a.sessionName,d=a.workingDirectory,e=a.historyLimit||5e4,f=a.windowWidth||g.J,h=a.windowHeight||g.s);try{await i("tmux",["new-session","-d","-s",c,"-c",d,"-x",String(f),"-y",String(h)],{timeout:5e3}),await l(c,{windowWidth:f,windowHeight:h}),await i("tmux",["set-option","-t",k(c),"history-limit",String(e)],{timeout:5e3})}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)}},16983:(a,b,c)=>{"use strict";c.d(b,{J:()=>e,s:()=>d});let d=1e3,e=200},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.r8)(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)})}}},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.14.1"}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,historyLimit:5e4}),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=`
|
|
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$:()=>A,zX:()=>B});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);let w=(0,m.h)("response-poller");function x(a){return{response:"",isComplete:!1,lineCount:a}}function y(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 z(a,b){let c=(0,l.KO)(b);return(0,h.gF)((0,l._A)((0,l.aJ)(a)),c)}function A(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),A=(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=z(f.join("\n"),c);if(a.isPrompt)return y(f,b,g,m,c,A,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,A),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 x(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 x(g)}else if((b||c||d||e)&&h.length<2e3)return x(g)}if("gemini"===c&&((h.match(/[░███]/g)||[]).length>.3*h.length||u.SI.some(a=>h.includes(a))||!h.includes("✦")&&h.length<10))return x(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 x(g)}return{response:h,isComplete:!0,lineCount:e,bufferReset:m}}if("opencode"!==c){let a=z(f.join("\n"),c);if(a.isPrompt)return y(f,b,g,m,c,A,a)}let I=[],J=m||b>=g-5,K=J?A(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}:x(g)}async function B(a,b,c){let h=(0,e.getDbInstance)(),m=c??b;try{let e=(0,f.Ui)(h,a);if(!e)return w.error("worktree-worktreeid-not"),(0,u.Et)(a,b,c),!1;if(!await (0,d.K1)(a,b,c))return w.info("session-not-running"),(0,u.Et)(a,b,c),!1;let o=(0,f.y1)(h,a,m),x=o?.lastCapturedLine||0,y=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,y,b)}let B=A(y,x,b);if(!B||!B.isComplete){let{thinkingPattern:c}=(0,l._X)(b),d=(0,l.aJ)(y).split("\n").slice(-n.$).join("\n");return c.test(d)&&(0,f.PL)(h,a,b,m)>0&&w.info("marked-answeredcount-pending"),!1}let C="opencode"===b||"copilot"===b,D=!(0,j.VA)(b);if(D&&!B.bufferReset&&B.lineCount===x&&!o?.inProgressMessageId)return!1;if(D&&!B.bufferReset&&B.lineCount<=x)return w.info("already-saved-up-to-line-lastcapturedlin"),!1;let E=B.promptDetection??z(B.response,b);if(E.isPrompt){let d=E.rawContent||E.cleanContent,i=(0,u.MN)(a,b,c),j=(0,s.zm)(d,b);if((0,s.gv)(i,j))return w.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.YX)(h,a,b,m);let l=(0,f.oH)(h,{worktreeId:a,role:"assistant",content:k,messageType:"prompt",promptData:E.promptData,timestamp:new Date,cliToolId:b,instanceId:m});return(0,f.gb)(h,a,b,B.lineCount,m),(0,g.Lo)("message",{worktreeId:a,message:l}),(0,v.J$)({worktreeId:a,worktreeName:e.name,kind:"prompt",agentName:m,excerpt:E.promptData?.question??k}).catch(()=>{}),C||(0,u.Et)(a,b,c),!0}if(!B.response||""===B.response.trim())return(0,f.gb)(h,a,b,B.lineCount,m),!1;let F="claude"===b?(0,k.R)(B.response):void 0,G=B.response;if("gemini"===b)G=(0,p.IS)(B.response);else if("claude"===b)G=(0,p.NN)(B.response);else if("copilot"===b){let d=(0,u.MN)(a,b,c),e=(0,r.Uz)(d)||B.response;G=(0,p.LH)(e),G=(0,p.Sj)(G,q.Rf,q.ky),(0,r.q1)(d)}else if("opencode"===b){G=(0,p.aW)(B.response);let d=(0,u.MN)(a,b,c);(0,r.q1)(d)}if(!G||""===G.trim()||"[No content]"===G)return(0,f.gb)(h,a,b,B.lineCount,m),(0,f.YX)(h,a,b,m),!1;if((0,j.VA)(b)){let d=(0,u.MN)(a,b,c);if((0,t.j)(d,G))return(0,f.gb)(h,a,b,B.lineCount,m),!1}G&&await (0,i.T)(h,a,G,b),(0,f.PL)(h,a,b,m)>0&&w.info("marked-answeredcount-pending");let H=(0,f.y1)(h,a,m);if(D&&H&&B.lineCount<=H.lastCapturedLine)return w.info("race-condition-detected-skipping-save-re"),!1;let I=(0,f.oH)(h,{worktreeId:a,role:"assistant",content:G,messageType:"normal",timestamp:new Date,cliToolId:b,instanceId:m,summary:F?.summary,logFileName:F?.logFileName,requestId:F?.requestId});return(0,g.Lo)("message",{worktreeId:a,message:I}),(0,v.J$)({worktreeId:a,worktreeName:e.name,kind:"completion",agentName:m,excerpt:G}).catch(()=>{}),(0,f.gb)(h,a,b,B.lineCount,m),C&&(0,u.Et)(a,b,c),!0}catch(a){return w.error("response:check-failed",{error:a instanceof Error?a.message:String(a)}),!1}}},5344:(a,b,c)=>{"use strict";c.d(b,{v7:()=>i,LP:()=>s,pL:()=>k,GE:()=>l,aq:()=>n,kC:()=>r,xU:()=>D,bZ:()=>E,W8:()=>o,W5:()=>K,_i:()=>L,_C:()=>M});var d=c(68901),e=c(66007),f=c(15194),g=c(72626);let h=(0,g.h)("auto-yes-state");function i(a,b,c){if(a.includes(":"))throw Error(`worktreeId must not contain ':': ${a}`);if(!c||c===b)return`${a}:${b}`;if(c.includes(":"))throw Error(`instanceId must not contain ':': ${c}`);return`${a}:${b}:${c}`}function j(a){let b=a.indexOf(":");return -1===b?a:a.substring(0,b)}function k(a){let b=a.split(":")[1];return void 0===b?null:(0,f.hR)(b)?b:null}function l(a){let b=a.split(":");return b[2]??b[1]??null}let m=globalThis.__autoYesStates??(globalThis.__autoYesStates=new Map);function n(a,b="claude",c){let d=i(a,b,c),e=m.get(d);return e?Date.now()>=e.expiresAt?p(a,b,"expired",c):e:null}function o(a,b,c,e,f,g){let h=i(a,b,g);if(!c)return p(a,b,void 0,g);{let a=Date.now(),b={enabled:!0,enabledAt:a,expiresAt:a+(e??d.t6),stopPattern:f};return m.set(h,b),b}}function p(a,b="claude",c,d){let e=i(a,b,d),f=m.get(e),g={enabled:!1,enabledAt:f?.enabledAt??0,expiresAt:f?.expiresAt??0,stopPattern:f?.stopPattern,stopReason:c};return m.set(e,g),g}function q(a,b){return a.filter(a=>j(a)===b)}function r(a){return q(Array.from(m.keys()),a)}function s(a){let b=r(a);return b.forEach(a=>m.delete(a)),b.length}var t=c(31766),u=c(25129),v=c(63869),w=c(31268),x=c(26283),y=c(77093),z=c(93997);let A=(0,g.h)("auto-yes-poller"),B=globalThis.__autoYesPollerStates??(globalThis.__autoYesPollerStates=new Map);function C(a){return B.get(a)}function D(a){let b=C(a);return b?.lastServerResponseTimestamp??null}function E(a){return B.has(a)}function F(a){let b=C(a);if(b){var c;if(b.consecutiveErrors++,b.currentInterval=(c=b.consecutiveErrors)<5?2e3:Math.min(2e3*Math.pow(2,c-5+1),6e4),b.consecutiveErrors>=d.ul){let b=j(a),c=k(a);c&&p(b,c,"consecutive_errors",l(a)??void 0),L(a)}}}async function G(a,b,c,e){let f=c??d.FW,g=await (0,t.Wh)(a,b,f,e);return(0,x._A)((0,x.aJ)(g))}async function H(a,b,d,e,f,g){let h=i(a,d,g);try{let i=(0,x.KO)(d),l=(0,u.gF)(e,{...i,...f&&{precomputedLines:f}});if(!l.isPrompt||!l.promptData)return b.lastAnsweredPromptKey=null,b.lastAnsweredAt=null,"no_prompt";let m=(j=l.promptData,`${j.type}:${j.question}`);if(b.lastAnsweredPromptKey===m&&null!==b.lastAnsweredAt&&Date.now()-b.lastAnsweredAt<1e4)return"duplicate";let n=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}(l.promptData);if(null===n)return"no_answer";let o=w.s.getInstance().getTool(d).getSessionName(a,g);try{await (0,v.t)({sessionName:o,answer:n,cliToolId:d,promptData:l.promptData})}finally{(0,z.gm)(o)}var j,k=Date.now();let p=C(h);p&&(p.lastServerResponseTimestamp=k);let q=C(h);q&&(q.consecutiveErrors=0,q.currentInterval=2e3),b.lastAnsweredPromptKey=m,b.lastAnsweredAt=Date.now(),A.info("poller:response-sent",{worktreeId:a,cliToolId:d,instanceId:g});let[{startPolling:r},{broadcastTerminalSnapshotAfterInteraction:s}]=await Promise.all([Promise.resolve().then(c.bind(c,95220)),Promise.resolve().then(c.bind(c,99508))]);return r(a,d,g),s(a,d,g),"responded"}catch{return F(h),A.warn("poller:detect-respond-error",{worktreeId:a,cliToolId:d,instanceId:g}),"error"}}async function I(a,b,c){let e=i(a,b,c),f=C(e);if("valid"===function(a,b){if(!b)return"stopped";let c=j(a),d=k(a);if(!d)return L(a),"expired";let e=n(c,d,l(a)??void 0);return e?.enabled?"valid":(L(a),"expired")}(e,f)){try{let g=n(a,b,c),i=g?.stopPattern?d.FW:d.Ke,m=await G(a,b,i,c),o=m.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,function(a,b,c){let e=j(a),f=k(a);if(!f)return!1;let g=l(a)??void 0,i=n(e,f,g);if(!i?.stopPattern)return!1;if(!(0,d.P0)(i.stopPattern).valid)return h.warn("invalid-stop-pattern",{detail:String({compositeKey:a})}),p(e,f,void 0,g),!1;try{let d=new RegExp(i.stopPattern),j=function(a,b,c=100){try{return a.test(b)}catch{return null}}(d,b);if(null===j)return h.warn("stop-condition-check",{detail:String({compositeKey:a})}),p(e,f,void 0,g),!1;if(j)return p(e,f,"stop_pattern_matched",g),c&&c(a),h.warn("stop-condition-matched",{detail:String({compositeKey:a})}),!0}catch{h.warn("stop-condition-check",{detail:String({compositeKey:a})})}return!1}(a,f,L)}return c.length<e&&(b.stopCheckBaselineLength=c.length),!1}(e,f,m))return;let q=await H(a,f,b,m,o,c);if("responded"===q)return void J(a,b,c,5e3);if("no_prompt"===q){let e=o.slice(-50).join("\n");if((0,x.ut)(b,e))return void J(a,b,c,d.QN)}}catch(d){F(e),A.warn("poller:poll-error",{worktreeId:a,cliToolId:b,instanceId:c,error:(0,y.u1)(d)})}J(a,b,c)}}function J(a,b,c,d){let e=C(i(a,b,c));if(!e)return;let f=Math.max(d??e.currentInterval,2e3);e.timerId=setTimeout(()=>{I(a,b,c)},f)}function K(a,b,c){if(!(0,e.h6)(a))return{started:!1,reason:"invalid worktree ID"};let d=c??b,f=n(a,b,d);if(!f?.enabled)return{started:!1,reason:"auto-yes not enabled"};let g=i(a,b,d),h=C(g);if(!h&&B.size>=50)return{started:!1,reason:"max concurrent pollers reached"};if(h&&h.cliToolId===b)return{started:!0,reason:"already_running"};h&&L(g);let j={timerId:null,cliToolId:b,instanceId:d,consecutiveErrors:0,currentInterval:2e3,lastServerResponseTimestamp:null,lastAnsweredPromptKey:null,lastAnsweredAt:null,stopCheckBaselineLength:-1};return B.set(g,j),j.timerId=setTimeout(()=>{I(a,b,d)},2e3),A.info("poller:started",{worktreeId:a,cliToolId:b,instanceId:d}),{started:!0}}function L(a){let b=C(a);b&&(b.timerId&&clearTimeout(b.timerId),B.delete(a),A.info("poller:stopped",{compositeKey:a}))}function M(a){q(Array.from(B.keys()),a).forEach(a=>L(a))}},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,historyLimit:5e4}),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.J,h=b.windowHeight??g.s,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=5e4,f=g.J,h=g.s):(c=a.sessionName,d=a.workingDirectory,e=a.historyLimit||5e4,f=a.windowWidth||g.J,h=a.windowHeight||g.s);try{await i("tmux",["new-session","-d","-s",c,"-c",d,"-x",String(f),"-y",String(h)],{timeout:5e3}),await l(c,{windowWidth:f,windowHeight:h}),await i("tmux",["set-option","-t",k(c),"history-limit",String(e)],{timeout:5e3})}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)}},16983:(a,b,c)=>{"use strict";c.d(b,{J:()=>e,s:()=>d});let d=1e3,e=200},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.r8)(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)})}}},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.16.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,historyLimit:5e4}),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
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,historyLimit:5e4}),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,historyLimit:5e4}),await new Promise(a=>setTimeout(a,l.Uc));let c="vibe-local -y";try{let b=(0,r.getDbInstance)(),d=(0,s.Ui)(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,historyLimit:5e4}),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,historyLimit:5e4}),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,{$:()=>j});var d=c(56791),e=c(31268),f=c(31766),g=c(95595),h=c(5344),i=c(34405);async function j(a,b,c,j){let k=j??c,l=e.s.getInstance().getTool(c);if(!await l.isRunning(b,j))return{isRunning:!1,content:"",lineCount:0,cliToolId:c,sessionStatus:"idle",sessionStatusReason:"session_not_running"};let m=(0,d.y1)(a,b,k),n=m?.lastCapturedLine||0,o=await (0,f.Wh)(b,c,i._,j),p=o.split("\n"),q=p.length,r=p.slice(Math.max(0,n)).join("\n"),s=(0,h.v7)(b,c,j),t=(0,h.xU)(s),u=t?new Date(t):void 0,v=(0,g.WC)(o,c,u),w="running"===v.status&&v.reason===g.gv.THINKING_INDICATOR,x=v.hasActivePrompt,y="waiting"===v.status&&g.ug.has(v.reason),z=v.reason===g.gv.CODEX_PAGER,A="running"===v.status&&v.reason===g.gv.DEFAULT||"ready"===v.status&&v.reason===g.gv.NO_RECENT_OUTPUT,B=p.slice(-100).join("\n"),C=(0,h.aq)(b,c,j);return{isRunning:!0,cliToolId:c,sessionStatus:v.status,sessionStatusReason:v.reason,content:r,fullOutput:o,realtimeSnippet:B,lineCount:q,lastCapturedLine:n,isComplete:x,isGenerating:w,thinking:w,thinkingMessage:w?"Claude is thinking...":null,isPromptWaiting:x,promptData:x?v.promptDetection.promptData??null:null,autoYes:{enabled:C?.enabled??!1,expiresAt:C?.enabled?C.expiresAt:null,stopReason:C?.stopReason},isSelectionListActive:y,isPagerActive:z,isUnclassifiedActive:A,lastServerResponseTimestamp:t,serverPollerActive:(0,h.bZ)(s)}}},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}
|
|
@@ -17,4 +17,4 @@ 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"}}')},49997:(a,b,c)=>{"use strict";c.d(b,{mq:()=>p,Lo:()=>r,TB:()=>s,h7:()=>q});var d=c(81503);c(91645),c(93390);var e=c(72626),f=c(80438);let g=(0,e.h)("ip-restriction"),h=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,i=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\/(\d{1,2})$/,j=process.env.CM_ALLOWED_IPS?.trim()||"",k=process.env.CM_TRUST_PROXY?.trim()||"";""!==k&&"true"!==k&&"false"!==k&&(0,f.h)(g,"trust-proxy-unexpected",{value:k}),j.length>0&&function(a){let b=a.trim();if(0===b.length)return;let c=b.split(",").map(a=>a.trim()).filter(a=>a.length>0);if(c.length>256)throw Error(`CM_ALLOWED_IPS: too many entries (${c.length}). Maximum is 256.`);let d=[];for(let a of c){if(a.length>18)throw Error(`CM_ALLOWED_IPS: entry "${a}" exceeds maximum length of 18 characters.`);let b=a.match(i);if(b){let c=[parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10),parseInt(b[4],10)],e=parseInt(b[5],10);for(let b of c)if(b<0||b>255)throw Error(`CM_ALLOWED_IPS: invalid octet in "${a}". Octets must be 0-255.`);if(e<0||e>32)throw Error(`CM_ALLOWED_IPS: invalid prefix length in "${a}". Must be 0-32.`);let f=(c[0]<<24|c[1]<<16|c[2]<<8|c[3])>>>0,g=0===e?0:0xffffffff<<32-e>>>0;d.push({network:(f&g)>>>0,mask:g});continue}let c=a.match(h);if(c){let b=[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10),parseInt(c[4],10)];for(let c of b)if(c<0||c>255)throw Error(`CM_ALLOWED_IPS: invalid octet in "${a}". Octets must be 0-255.`);let e=(b[0]<<24|b[1]<<16|b[2]<<8|b[3])>>>0;d.push({network:e,mask:0xffffffff});continue}throw Error(`CM_ALLOWED_IPS: invalid entry "${a}". Expected IPv4 address or CIDR notation.`)}}(j);c(15194),c(31268),c(88807),c(56791);c(11665),c(79646);(0,e.h)("tmux-control-client");(0,e.h)("tmux-control-registry");c(7015),c(26838);let l=(0,e.h)("ws-server"),m=new Map,n=new Map;function o(a,b){let c=n.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){l.error("broadcast:send-failed",{error:a instanceof Error?a.message:String(a)})}})}catch(b){l.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){l.error("fallback:send-failed",{error:a instanceof Error?a.message:String(a)})}}}function p(a,b){o(a,b)}function q(a){let b=n.get(a);return!!b&&b.size>0}function r(a,b){b.worktreeId?o(b.worktreeId,{type:a,...b}):l.warn("broadcast:missing-worktree-id")}function s(a){for(let b of a){let a=n.get(b);a&&(a.forEach(a=>{let c=m.get(a);c&&c.worktreeIds.delete(b)}),n.delete(b))}}},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},56791:(a,b,c)=>{"use strict";c.d(b,{AC:()=>d.AC,ug:()=>d.ug,lm:()=>d.lm,KG:()=>d.KG,cD:()=>d.cD,Jj:()=>d.Jj,YX:()=>d.YX,G4:()=>d.G4,hL:()=>d.hL,qp:()=>d.qp,To:()=>d.To,oH:()=>d.oH,py:()=>d.py,yy:()=>d.yy,pE:()=>d.pE,z2:()=>d.z2,cP:()=>d.cP,DF:()=>d.DF,lA:()=>d.lA,Qp:()=>d.Qp,th:()=>d.th,oZ:()=>d.oZ,ZP:()=>d.ZP,Ys:()=>d.Ys,vg:()=>d.vg,Rm:()=>d.Rm,BN:()=>d.BN,m0:()=>d.m0,Tk:()=>d.Tk,iT:()=>d.iT,gp:()=>d.gp,yE:()=>d.yE,BE:()=>d.BE,qK:()=>d.qK,p4:()=>d.p4,r8:()=>d.r8,of:()=>d.of,DN:()=>d.DN,pZ:()=>d.pZ,kA:()=>d.kA,VL:()=>d.VL,CF:()=>d.CF,NV:()=>d.NV,ce:()=>d.ce,y1:()=>d.y1,Nr:()=>d.Nr,ob:()=>d.ob,fr:()=>d.fr,Ui:()=>d.Ui,P9:()=>d.P9,eN:()=>d.eN,vi:()=>d.vi,uJ:()=>d.uJ,yT:()=>d.yT,PL:()=>d.PL,jp:()=>d.jp,nQ:()=>d.nQ,yb:()=>d.yb,GA:()=>d.GA,Cs:()=>d.Cs,xR:()=>d.xR,az:()=>d.az,nZ:()=>d.nZ,PP:()=>d.PP,Dx:()=>d.Dx,O:()=>d.O,EU:()=>d.EU,HZ:()=>d.HZ,UY:()=>d.UY,cw:()=>d.cw,jJ:()=>d.jJ,DC:()=>d.DC,gb:()=>d.gb,yB:()=>d.yB,uy:()=>d.uy,s:()=>d.s,iu:()=>d.iu,hq:()=>d.hq,z1:()=>d.z1,bl:()=>d.bl,jA:()=>d.jA,ZL:()=>d.ZL});var d=c(25537);c(88807),c(80499),c(20416),c(10406),c(29021),c(33873),c(21820),c(7956),(0,c(72626).h)("db-migration-path")},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,historyLimit:5e4}),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)}},66007:(a,b,c)=>{"use strict";c.d(b,{B9:()=>m,Px:()=>o,b$:()=>n,h6:()=>k});var d=c(33873),e=c.n(d),f=c(29021),g=c(72626),h=c(80438);let i=(0,g.h)("path-validator"),j=/^[a-zA-Z0-9_-]+$/;function k(a){return!!a&&0!==a.length&&j.test(a)}function l(a,b){return a===b||a.startsWith(b+e().sep)}function m(a,b){if(!a||""===a.trim()||a.includes("\0"))return!1;let c=a;try{c=decodeURIComponent(a)}catch{c=a}if(c.includes("\0"))return!1;let d=e().resolve(b),f=e().resolve(b,c),g=e().relative(d,f);return!(g.startsWith("..")||e().isAbsolute(g))}function n(a,b){if(!a||""===a.trim())throw Error("Invalid path: Path cannot be empty");if(a.includes("\0"))throw Error("Invalid path: Null bytes not allowed");if(!m(a,b))throw Error(`Path is outside allowed directory: ${a} (allowed root: ${b})`);let c=a;try{c=decodeURIComponent(a)}catch{c=a}return e().resolve(b,c)}function o(a,b){let c;try{c=(0,f.realpathSync)(b)}catch{return!1}let d=e().resolve(b,a);if((0,f.existsSync)(d))try{let b=(0,f.realpathSync)(d),e=l(b,c);return e||(0,h.h)(i,"symlink-rejected",{targetPath:a,resolvedTarget:b}),e}catch{return!1}try{if((0,f.lstatSync)(d).isSymbolicLink())try{let b=(0,f.readlinkSync)(d),g=e().resolve(e().dirname(d),b),j=l(g,c);return j||(0,h.h)(i,"dangling-symlink-rejected",{targetPath:a,resolvedLinkTarget:g}),j}catch{return!1}}catch{}let g=e().dirname(d);for(;g!==e().dirname(g);){if((0,f.existsSync)(g))try{let a=(0,f.realpathSync)(g),b=l(a,c);return b||(0,h.h)(i,"symlink-ancestor-rejected",{currentPath:g,resolvedAncestor:a}),b}catch{break}g=e().dirname(g)}return!1}},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")}},68901:(a,b,c)=>{"use strict";c.d(b,{FW:()=>l,Ke:()=>k,P0:()=>n,QN:()=>j,dR:()=>i,t6:()=>h,ul:()=>m});var d=c(82366),e=c.n(d),f=c(16983);let g=[36e5,108e5,288e5],h=36e5;function i(a){return"number"==typeof a&&g.includes(a)}let j=5e3,k=f.s,l=5e3,m=20;function n(a){if(a.length>500)return{valid:!1,error:"Pattern must be 500 characters or less"};if(!e()(a))return{valid:!1,error:"Pattern may cause performance issues (catastrophic backtracking detected)"};try{return new RegExp(a),{valid:!0}}catch{return{valid:!1,error:"Invalid regular expression syntax"}}}},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})},80438:(a,b,c)=>{"use strict";function d(a,b,c){a.warn(`security:${b}`,c)}c.d(b,{h:()=>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`},93390:(a,b,c)=>{"use strict";c.d(b,{aq:()=>f,sO:()=>j,r0:()=>p,x:()=>q,zr:()=>o,y2:()=>n,nr:()=>m});var d=c(55511),e=c.n(d);let f="cm_auth_token",g=/^[0-9a-f]{64}$/,h=2592e6,i={maxAttempts:5,lockoutDuration:9e5,cleanupInterval:36e5},j=86400,k=(()=>{let a=process.env.CM_AUTH_TOKEN_HASH||void 0;return a?!function(a){return!!a&&g.test(a)}(a)?void console.error("[auth] CM_AUTH_TOKEN_HASH is not a valid SHA-256 hash"):a:void 0})(),l=function(){let a=process.env.CM_AUTH_EXPIRE,b=Date.now();if(a)try{return b+function(a){let b=a.match(/^(\d+)([hdm])$/);if(!b)throw Error(`Invalid duration format: "${a}". Use Nh, Nd, or Nm (e.g., "24h", "7d", "90m")`);let c=parseInt(b[1],10),d=b[2],e={h:36e5,d:864e5,m:6e4}[d];if(void 0===e)throw Error(`Invalid duration unit: "${d}"`);let f=c*e;if(f<36e5)throw Error(`Duration too short: minimum is 1h (60m). Got: "${a}"`);if(f>h)throw Error(`Duration too long: maximum is 30d (720h). Got: "${a}"`);return f}(a)}catch{return b+864e5}return process.env.CM_AUTH_TOKEN_HASH?b+864e5:null}();function m(a){if(!k||!a||"string"!=typeof a||null!==l&&Date.now()>l)return!1;let b=e().createHash("sha256").update(a).digest("hex"),c=Buffer.from(b,"hex"),d=Buffer.from(k,"hex");return c.length===d.length&&e().timingSafeEqual(c,d)}function n(){return!!k}function o(){if(null===l)return 0;let a=l-Date.now();return a<=0?0:Math.floor(a/1e3)}function p(a){return{httpOnly:!0,sameSite:"strict",secure:!!process.env.CM_HTTPS_CERT,maxAge:a,path:"/"}}function q(){let a=new Map,b=setInterval(()=>{let b=Date.now();for(let[c,d]of a){let e=null===d.lockedUntil||b>d.lockedUntil,f=b-d.lastAttempt>i.lockoutDuration;e&&f&&a.delete(c)}},i.cleanupInterval);return b.unref&&b.unref(),{checkLimit(b){let c=a.get(b);if(!c)return{allowed:!0};if(null!==c.lockedUntil){let a=Date.now();if(a<c.lockedUntil)return{allowed:!1,retryAfter:Math.ceil((c.lockedUntil-a)/1e3)};c.attempts=0,c.lockedUntil=null}return{allowed:!0}},recordFailure(b){let c=Date.now(),d=a.get(b)||{attempts:0,lockedUntil:null,lastAttempt:c};d.attempts++,d.lastAttempt=c,d.attempts>=i.maxAttempts&&(d.lockedUntil=c+i.lockoutDuration),a.set(b,d)},recordSuccess(b){a.delete(b)},destroy(){clearInterval(b),a.clear()}}}},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:()=>l,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,b,c){let i=(0,f.N)((0,d.aJ)(a)),l=i.split("\n"),m=l.length-1;for(;m>=0&&""===l[m].trim();)m--;let n=l.slice(0,m+1),o=n.slice(-15).join("\n"),p=n.slice(-g.$).join("\n"),q=n.slice(-30).join("\n");if("copilot"===b&&d.Mi.test(q)){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 r=n.slice(-15).join("\n");if("copilot"===b&&(0,d.ut)(b,r)){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(o)){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=n.length-1;b>=Math.max(0,n.length-10);b--)if(d.aW.test(n[b])){a=b;break}let c=a>=0?a-1:n.length-1;for(;c>=0&&""===n[c].trim();)c--;if(c>=0){let a=n.slice(Math.max(0,c-15+1),c+1).join("\n");if(d.Jn.test(a)){let a=(0,d.KO)(b),c=(0,e.gF)((0,d._A)(i),a);return{status:"waiting",confidence:"high",reason:h.CODEX_SELECTION_LIST,hasActivePrompt:!1,promptDetection:c}}}}if("antigravity"===b&&d.kT.test(o)){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 s=(0,d.KO)(b),t="opencode"===b||"codex"===b||"claude"===b||"copilot"===b?(0,d._A)(i):(0,d._A)(o),u=(0,e.gF)(t,s);if(u.isPrompt)if(!("codex"===b&&function(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}(n)))return{status:"waiting",confidence:"high",reason:"prompt_detected",hasActivePrompt:!0,promptDetection:u};else u={...u,isPrompt:!1,promptData:void 0};if("claude"===b&&d.XY.test(o))return{status:"waiting",confidence:"high",reason:h.CLAUDE_SELECTION_LIST,hasActivePrompt:!1,promptDetection:u};if((0,d.ut)(b,p))return{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:u};if("claude"===b&&d.aU.test(o))return{status:"running",confidence:"high",reason:h.THINKING_INDICATOR,hasActivePrompt:!1,promptDetection:u};if("opencode"===b){if(d.kD.test(o))return{status:"running",confidence:"high",reason:"opencode_processing_indicator",hasActivePrompt:!1,promptDetection:u};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:u};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:u};if(d.Md.test(b))return{status:"ready",confidence:"high",reason:h.OPENCODE_RESPONSE_COMPLETE,hasActivePrompt:!1,promptDetection:u};let{promptPattern:i}=(0,d._X)("opencode");if(i.test(b))return{status:"ready",confidence:"high",reason:h.PROMPT_DETECTED,hasActivePrompt:!0,promptDetection:u}}}if("codex"===b){let a=-1;for(let b=n.length-1;b>=Math.max(0,n.length-10);b--)if(d.aW.test(n[b])){a=b;break}if(a>=0){let b=a-1;for(;b>=0&&""===n[b].trim();)b--;if(b>=0){let a=n.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:u};let c=n[b].trim();return d.gm.test(c)?{status:"ready",confidence:"high",reason:"input_prompt",hasActivePrompt:!1,promptDetection:u}:{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:u}}}else{let a=n.length-1;for(;a>=0&&""===n[a].trim();)a--;if(!(a>=0&&d.gm.test(n[a].trim()))&&(0,d.ut)("codex",o))return{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:u}}}if("antigravity"===b){if((0,d.ut)("antigravity",o))return{status:"running",confidence:"high",reason:h.THINKING_INDICATOR,hasActivePrompt:!1,promptDetection:u};let{promptPattern:a}=(0,d._X)("antigravity");if(a.test(o))return{status:"ready",confidence:"high",reason:h.INPUT_PROMPT,hasActivePrompt:!1,promptDetection:u}}let{promptPattern:v}=(0,d._X)(b);return v.test(o)?{status:"ready",confidence:"high",reason:"input_prompt",hasActivePrompt:!1,promptDetection:u}:c&&Date.now()-c.getTime()>5e3?{status:"ready",confidence:"low",reason:"no_recent_output",hasActivePrompt:!1,promptDetection:u}:{status:"running",confidence:"low",reason:"default",hasActivePrompt:!1,promptDetection:u}}},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(49997),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:()=>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},56791:(a,b,c)=>{"use strict";c.d(b,{AC:()=>d.AC,ug:()=>d.ug,lm:()=>d.lm,KG:()=>d.KG,cD:()=>d.cD,Jj:()=>d.Jj,YX:()=>d.YX,G4:()=>d.G4,hL:()=>d.hL,qp:()=>d.qp,To:()=>d.To,oH:()=>d.oH,py:()=>d.py,yy:()=>d.yy,pE:()=>d.pE,z2:()=>d.z2,cP:()=>d.cP,DF:()=>d.DF,lA:()=>d.lA,Qp:()=>d.Qp,th:()=>d.th,oZ:()=>d.oZ,ZP:()=>d.ZP,Ys:()=>d.Ys,vg:()=>d.vg,Rm:()=>d.Rm,BN:()=>d.BN,m0:()=>d.m0,Tk:()=>d.Tk,iT:()=>d.iT,gp:()=>d.gp,yE:()=>d.yE,BE:()=>d.BE,qK:()=>d.qK,p4:()=>d.p4,r8:()=>d.r8,of:()=>d.of,DN:()=>d.DN,pZ:()=>d.pZ,kA:()=>d.kA,VL:()=>d.VL,CF:()=>d.CF,NV:()=>d.NV,ce:()=>d.ce,y1:()=>d.y1,Nr:()=>d.Nr,ob:()=>d.ob,fr:()=>d.fr,Ui:()=>d.Ui,P9:()=>d.P9,eN:()=>d.eN,vi:()=>d.vi,uJ:()=>d.uJ,yT:()=>d.yT,PL:()=>d.PL,jp:()=>d.jp,nQ:()=>d.nQ,yb:()=>d.yb,GA:()=>d.GA,Cs:()=>d.Cs,xR:()=>d.xR,az:()=>d.az,nZ:()=>d.nZ,PP:()=>d.PP,Dx:()=>d.Dx,O:()=>d.O,EU:()=>d.EU,HZ:()=>d.HZ,UY:()=>d.UY,cw:()=>d.cw,jJ:()=>d.jJ,DC:()=>d.DC,gb:()=>d.gb,yB:()=>d.yB,uy:()=>d.uy,s:()=>d.s,iu:()=>d.iu,hq:()=>d.hq,z1:()=>d.z1,bl:()=>d.bl,jA:()=>d.jA,ZL:()=>d.ZL});var d=c(25537);c(88807),c(71634),c(20416),c(10406),c(29021),c(33873),c(21820),c(7956),(0,c(72626).h)("db-migration-path")},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,historyLimit:5e4}),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")}},68901:(a,b,c)=>{"use strict";c.d(b,{FW:()=>l,Ke:()=>k,P0:()=>n,QN:()=>j,dR:()=>i,t6:()=>h,ul:()=>m});var d=c(82366),e=c.n(d),f=c(16983);let g=[36e5,108e5,288e5],h=36e5;function i(a){return"number"==typeof a&&g.includes(a)}let j=5e3,k=f.s,l=5e3,m=20;function n(a){if(a.length>500)return{valid:!1,error:"Pattern must be 500 characters or less"};if(!e()(a))return{valid:!1,error:"Pattern may cause performance issues (catastrophic backtracking detected)"};try{return new RegExp(a),{valid:!0}}catch{return{valid:!1,error:"Invalid regular expression syntax"}}}},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:()=>l,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,b,c){let i=(0,f.N)((0,d.aJ)(a)),l=i.split("\n"),m=l.length-1;for(;m>=0&&""===l[m].trim();)m--;let n=l.slice(0,m+1),o=n.slice(-15).join("\n"),p=n.slice(-g.$).join("\n"),q=n.slice(-30).join("\n");if("copilot"===b&&d.Mi.test(q)){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 r=n.slice(-15).join("\n");if("copilot"===b&&(0,d.ut)(b,r)){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(o)){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=n.length-1;b>=Math.max(0,n.length-10);b--)if(d.aW.test(n[b])){a=b;break}let c=a>=0?a-1:n.length-1;for(;c>=0&&""===n[c].trim();)c--;if(c>=0){let a=n.slice(Math.max(0,c-15+1),c+1).join("\n");if(d.Jn.test(a)){let a=(0,d.KO)(b),c=(0,e.gF)((0,d._A)(i),a);return{status:"waiting",confidence:"high",reason:h.CODEX_SELECTION_LIST,hasActivePrompt:!1,promptDetection:c}}}}if("antigravity"===b&&d.kT.test(o)){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 s=(0,d.KO)(b),t="opencode"===b||"codex"===b||"claude"===b||"copilot"===b?(0,d._A)(i):(0,d._A)(o),u=(0,e.gF)(t,s);if(u.isPrompt)if(!("codex"===b&&function(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}(n)))return{status:"waiting",confidence:"high",reason:"prompt_detected",hasActivePrompt:!0,promptDetection:u};else u={...u,isPrompt:!1,promptData:void 0};if("claude"===b&&d.XY.test(o))return{status:"waiting",confidence:"high",reason:h.CLAUDE_SELECTION_LIST,hasActivePrompt:!1,promptDetection:u};if((0,d.ut)(b,p))return{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:u};if("claude"===b&&d.aU.test(o))return{status:"running",confidence:"high",reason:h.THINKING_INDICATOR,hasActivePrompt:!1,promptDetection:u};if("opencode"===b){if(d.kD.test(o))return{status:"running",confidence:"high",reason:"opencode_processing_indicator",hasActivePrompt:!1,promptDetection:u};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:u};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:u};if(d.Md.test(b))return{status:"ready",confidence:"high",reason:h.OPENCODE_RESPONSE_COMPLETE,hasActivePrompt:!1,promptDetection:u};let{promptPattern:i}=(0,d._X)("opencode");if(i.test(b))return{status:"ready",confidence:"high",reason:h.PROMPT_DETECTED,hasActivePrompt:!0,promptDetection:u}}}if("codex"===b){let a=-1;for(let b=n.length-1;b>=Math.max(0,n.length-10);b--)if(d.aW.test(n[b])){a=b;break}if(a>=0){let b=a-1;for(;b>=0&&""===n[b].trim();)b--;if(b>=0){let a=n.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:u};let c=n[b].trim();return d.gm.test(c)?{status:"ready",confidence:"high",reason:"input_prompt",hasActivePrompt:!1,promptDetection:u}:{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:u}}}else{let a=n.length-1;for(;a>=0&&""===n[a].trim();)a--;if(!(a>=0&&d.gm.test(n[a].trim()))&&(0,d.ut)("codex",o))return{status:"running",confidence:"high",reason:"thinking_indicator",hasActivePrompt:!1,promptDetection:u}}}if("antigravity"===b){if((0,d.ut)("antigravity",o))return{status:"running",confidence:"high",reason:h.THINKING_INDICATOR,hasActivePrompt:!1,promptDetection:u};let{promptPattern:a}=(0,d._X)("antigravity");if(a.test(o))return{status:"ready",confidence:"high",reason:h.INPUT_PROMPT,hasActivePrompt:!1,promptDetection:u}}let{promptPattern:v}=(0,d._X)(b);return v.test(o)?{status:"ready",confidence:"high",reason:"input_prompt",hasActivePrompt:!1,promptDetection:u}:c&&Date.now()-c.getTime()>5e3?{status:"ready",confidence:"low",reason:"no_recent_output",hasActivePrompt:!1,promptDetection:u}:{status:"running",confidence:"low",reason:"default",hasActivePrompt:!1,promptDetection:u}}},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()}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=6065,exports.ids=[6065],exports.modules={46065:(a,b,c)=>{c.d(b,{Bc:()=>p,dX:()=>
|
|
1
|
+
"use strict";exports.id=6065,exports.ids=[6065],exports.modules={46065:(a,b,c)=>{c.d(b,{Bc:()=>p,TT:()=>q,dX:()=>t,mY:()=>u,mf:()=>n,rS:()=>r,sl:()=>v,t1:()=>o});var d=c(79646),e=c(28354),f=c(29021),g=c.n(f),h=c(33873),i=c.n(h),j=c(72626),k=c(65417),l=c(63271);let m=(0,j.h)("git-exec"),n=(0,e.promisify)(d.execFile),o=3e3;async function p(a,b){try{let{stdout:c}=await n("git",a,{cwd:b,timeout:1e3});return c.trim()}catch(b){return m.error("git:command-failed",{args:a.join(" "),error:b instanceof Error?b.message:"Unknown error"}),null}}async function q(a,b,c=1e3){try{let{stdout:d,stderr:e}=await n("git",a,{cwd:b,timeout:c});return{ok:!0,stdout:d.trim(),stderr:e??"",timedOut:!1}}catch(b){let a=!0===b.killed||"ERR_CHILD_PROCESS_EXEC_TIMEOUT"===b.code||"ETIMEDOUT"===b.code;return{ok:!1,stdout:"",stderr:`${b.stderr??""} ${b.message??""}`,timedOut:a}}}async function r(a,b,c){try{let{stdout:d}=await n("git",a,{cwd:b,timeout:c});return d}catch(d){if(d.killed||"ERR_CHILD_PROCESS_EXEC_TIMEOUT"===d.code||"ETIMEDOUT"===d.code)throw new l.y0(`Git command timed out after ${c}ms`);if((d.stderr||d.message||"").includes("not a git repository"))throw new l.wo("Not a git repository");let b=`${d.stderr||""} ${d.message||""}`;if(b.includes("unknown revision")||b.includes("bad object")||/nothing to commit|no changes added to commit|nothing added to commit/i.test(b)||/No local changes to save|No local changes/i.test(b)||/did not match|not a valid ref|not found|invalid reference|not fully merged|couldn't find remote ref/i.test(b))throw Error(b.trim());throw m.error("git:command-failed",{args:a.join(" "),error:d.message}),Error("Failed to execute git command")}}let s=new Map;async function t(a,b){let c=(s.get(a)??Promise.resolve()).catch(()=>void 0).then(()=>{let c=i().join(a,".git","index.lock"),d=!1;try{d=g().existsSync(c)}catch{d=!1}if(d)throw new l.rI("Git index is locked (.git/index.lock exists)");return b()}),d=c.then(()=>void 0,()=>void 0);s.set(a,d);try{return await c}finally{s.get(a)===d&&s.delete(a)}}async function u(a,b,c=k.Ev,d=!1){try{return await n("git",a,{cwd:b,timeout:c}),{conflict:!1}}catch(f){if(f.killed||"ERR_CHILD_PROCESS_EXEC_TIMEOUT"===f.code||"ETIMEDOUT"===f.code)throw new l.y0(`Git command timed out after ${c}ms`);let b=`${f.stderr||""} ${f.message||""}`;if(b.includes("not a git repository"))throw new l.wo("Not a git repository");let e="string"==typeof f.stdout?f.stdout:"";if(e.includes("CONFLICT"))return{conflict:!0,conflictFiles:function(a){let b=[];for(let c of a.split("\n")){let a=c.match(/^CONFLICT \([^)]*\): Merge conflict in (.+)$/);a&&b.push(a[1].trim())}return b}(e)};if(d)throw(0,l.RD)(b);throw m.error("git:conflict-aware-failed",{args:a.join(" "),error:f.message}),Error("Failed to execute git command")}}async function v(a,b,c){try{let{stdout:d}=await n("git",a,{cwd:b,timeout:c,env:{...process.env,GIT_TERMINAL_PROMPT:"0"}});return d}catch(b){if(b.killed||"ERR_CHILD_PROCESS_EXEC_TIMEOUT"===b.code||"ETIMEDOUT"===b.code)throw new l.y0(`Git command timed out after ${c}ms`);let a=`${b.stderr||""} ${b.message||""}`;if(a.includes("not a git repository"))throw new l.wo("Not a git repository");throw(0,l.RD)(a)}}},63271:(a,b,c)=>{c.d(b,{A6:()=>k,BN:()=>q,MC:()=>n,RD:()=>y,d_:()=>m,mZ:()=>i,oK:()=>l,qb:()=>o,rI:()=>h,rm:()=>u,s$:()=>p,ur:()=>j,wo:()=>g,x7:()=>x,y0:()=>f});var d=c(10641);let e=(0,c(72626).h)("git-errors");class f extends Error{constructor(a){super(a),this.name="GitTimeoutError"}}class g extends Error{constructor(a){super(a),this.name="GitNotRepoError"}}class h extends Error{constructor(a){super(a),this.name="GitIndexLockedError"}}class i extends Error{constructor(a){super(a),this.name="GitNothingToCommitError"}}class j extends Error{constructor(a){super(a),this.name="GitBranchNotFoundError"}}class k extends Error{constructor(a){super(a),this.name="GitBranchNotMergedError"}}class l extends Error{constructor(a,b){super(a),this.name="GitBranchCheckedOutElsewhereError",this.worktreePath=b}}class m extends Error{constructor(a){super(a),this.name="GitDirtyError"}}class n extends Error{constructor(a){super(a),this.name="GitCurrentBranchError"}}class o extends Error{constructor(a){super(a),this.name="GitDefaultBranchError"}}class p extends Error{constructor(a){super(a),this.name="GitNothingToStashError"}}class q extends Error{constructor(a){super(a),this.name="GitResetDefaultBranchError"}}class r extends Error{constructor(){super("Authentication failed"),this.name="GitAuthFailedError"}}class s extends Error{constructor(){super("Non-fast-forward"),this.name="GitNonFastForwardError"}}class t extends Error{constructor(){super("No upstream"),this.name="GitNoUpstreamError"}}class u extends Error{constructor(){super("Protected branch"),this.name="GitProtectedBranchError"}}class v extends Error{constructor(){super("Stale info"),this.name="GitForceWithLeaseStaleError"}}class w extends Error{constructor(){super("Network error"),this.name="GitNetworkError"}}function x(a,b){return a instanceof g?d.NextResponse.json({error:"Not a git repository"},{status:400}):a instanceof h?d.NextResponse.json({error:"Git index is locked by another operation"},{status:409}):a instanceof i?d.NextResponse.json({error:"Nothing to commit"},{status:400}):a instanceof j?d.NextResponse.json({error:"Branch not found",reason:"branch_not_found"},{status:404}):a instanceof k?d.NextResponse.json({error:"Branch is not fully merged",reason:"not_merged"},{status:409}):a instanceof n?d.NextResponse.json({error:"Cannot operate on the current branch",reason:"current_branch"},{status:409}):a instanceof o?d.NextResponse.json({error:"Cannot delete the default branch",reason:"default_branch"},{status:409}):a instanceof m?d.NextResponse.json({error:"Working tree has uncommitted changes",reason:"dirty"},{status:409}):a instanceof l?d.NextResponse.json({error:"Branch is checked out in another worktree",reason:"checked_out_elsewhere",worktreePath:a.worktreePath},{status:409}):a instanceof p?d.NextResponse.json({error:"No local changes to stash",reason:"nothing_to_stash"},{status:400}):a instanceof q?d.NextResponse.json({error:"Cannot hard-reset the default branch",reason:"default_branch"},{status:409}):a instanceof r?d.NextResponse.json({error:"Authentication failed; configure credentials in the terminal",reason:"auth_failed"},{status:401}):a instanceof s?d.NextResponse.json({error:"Push rejected (non-fast-forward); pull/rebase first",reason:"non_fast_forward"},{status:409}):a instanceof t?d.NextResponse.json({error:"No upstream branch configured",reason:"no_upstream"},{status:400}):a instanceof u?d.NextResponse.json({error:"Force push to the default branch is not allowed",reason:"protected_branch"},{status:409}):a instanceof v?d.NextResponse.json({error:"Stale info; remote has new commits",reason:"force_with_lease_stale"},{status:409}):a instanceof w?d.NextResponse.json({error:"Could not reach the remote",reason:"network"},{status:502}):a instanceof f?d.NextResponse.json({error:"Git command timed out"},{status:504}):(e.error("git:api-error",{prefix:b,error:a instanceof Error?a.message:String(a)}),d.NextResponse.json({error:"Failed to execute git command"},{status:500}))}function y(a){let b=a||"";return/Authentication failed|could not read Username|could not read Password/i.test(b)?new r:/stale info/i.test(b)?new v:/has no upstream branch|no upstream/i.test(b)?new t:/\[rejected\][\s\S]*\(fetch first\)|non-fast-forward/i.test(b)?new s:/Could not resolve host|unable to access|Could not read from remote|Connection (?:refused|timed out)|network is unreachable|Could not connect/i.test(b)?new w:Error("Failed to execute git command")}},65417:(a,b,c)=>{c.d(b,{A$:()=>i,EL:()=>f,Ev:()=>d,Kq:()=>g,Mo:()=>e,dw:()=>h,fL:()=>j});let d=3e4,e=1e3,f=1e4,g=1e3,h=3e4,i=6e4,j=6e4}};
|
|
@@ -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.16.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`}};
|