commandmate 0.49.2 → 0.49.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +241 -234
- package/.next/app-path-routes-manifest.json +19 -18
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +8 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/release-notes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/capabilities/route.js +1 -1
- package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/route.js +1 -1
- package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
- package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/status/route.js +1 -1
- package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
- package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/agent-event/route.js +2 -2
- package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/claude-done/route.js +2 -2
- package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/escalation/route.js +1 -1
- package/.next/server/app/api/push/escalation/route.js.nft.json +1 -1
- package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/subscriptions/route.js +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/relays/[relayId]/cancel/route.js +4 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/[relayId]/resolve/route.js +1 -0
- package/.next/server/app/api/relays/[relayId]/resolve/route.js.nft.json +1 -0
- package/.next/server/app/api/relays/[relayId]/resolve/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/relays/[relayId]/route.js +1 -1
- package/.next/server/app/api/relays/[relayId]/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/[relayId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/route.js +4 -1
- package/.next/server/app/api/relays/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/route.js +1 -1
- package/.next/server/app/api/repositories/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/default-agents/route.js +1 -1
- package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/route.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/route.js +1 -1
- package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-reference/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/env/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/execution-logs/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/notes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route.js +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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js +1 -144
- package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -3
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/more/page_client-reference-manifest.js +1 -1
- package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/page.js +10 -10
- 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 +19 -18
- package/.next/server/chunks/1308.js +1 -0
- package/.next/server/chunks/1656.js +2 -2
- package/.next/server/chunks/1957.js +2 -2
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/2897.js +1 -1
- package/.next/server/chunks/3417.js +1 -1
- package/.next/server/chunks/3801.js +7 -7
- package/.next/server/chunks/4207.js +1 -1
- package/.next/server/chunks/4490.js +1 -0
- package/.next/server/chunks/4911.js +1 -1
- package/.next/server/chunks/4936.js +1 -1
- package/.next/server/chunks/5209.js +2 -2
- package/.next/server/chunks/5350.js +212 -0
- package/.next/server/chunks/5354.js +1 -1
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/6401.js +1 -1
- package/.next/server/chunks/7023.js +3 -3
- package/.next/server/chunks/7905.js +1 -1
- package/.next/server/chunks/7926.js +1 -0
- package/.next/server/chunks/8581.js +1 -1
- package/.next/server/chunks/8728.js +2 -2
- package/.next/server/chunks/8782.js +1 -1
- package/.next/server/chunks/8807.js +89 -88
- package/.next/server/chunks/8918.js +3 -3
- package/.next/server/chunks/9169.js +1 -0
- package/.next/server/chunks/9390.js +1 -1
- package/.next/server/chunks/9584.js +1 -1
- package/.next/server/chunks/9627.js +5 -5
- package/.next/server/chunks/9702.js +1 -0
- package/.next/server/chunks/9731.js +3 -3
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{2407-07a237575e1ceb9e.js → 2407-87ec01332344ec2b.js} +1 -1
- package/.next/static/chunks/3931-3ef48b8d97357282.js +1 -0
- package/.next/static/chunks/app/api/agents/update/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/agents/versions/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/app/release-notes/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/app/update/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/app/update-check/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/capabilities/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/fs/browse/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/fs/recent-paths/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/hooks/agent-event/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/hooks/permission-request/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/metrics/vibe/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/push/escalation/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/resolve/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/relays/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/remote/pair/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/validate-path/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/settings/default-agents/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/skills/installations/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/skills/operations/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/skills/reindex/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/skills/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/templates/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/{layout-4f64316957b0a8e5.js → layout-b9d8aef70e4f17b2.js} +1 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/proxy/[...path]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/layout-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-f6a151304860b549.js +1 -0
- package/.next/trace +13 -13
- package/.next/types/app/api/relays/[relayId]/resolve/route.ts +347 -0
- package/.next/types/routes.d.ts +2 -1
- package/.next/types/validator.ts +9 -0
- package/dist/cli/commands/prompt.d.ts.map +1 -1
- package/dist/cli/commands/prompt.js +2 -1
- package/dist/cli/commands/relays.d.ts +2 -0
- package/dist/cli/commands/relays.d.ts.map +1 -1
- package/dist/cli/commands/relays.js +142 -5
- package/dist/cli/commands/report.d.ts +7 -2
- package/dist/cli/commands/report.d.ts.map +1 -1
- package/dist/cli/commands/report.js +19 -6
- package/dist/cli/commands/respond-strict.d.ts.map +1 -1
- package/dist/cli/commands/respond-strict.js +9 -2
- package/dist/cli/commands/task.d.ts +22 -0
- package/dist/cli/commands/task.d.ts.map +1 -1
- package/dist/cli/commands/task.js +26 -18
- package/dist/cli/types/api-responses.d.ts +52 -0
- package/dist/cli/types/api-responses.d.ts.map +1 -1
- package/dist/cli/utils/api-client-deadline.d.ts +28 -0
- package/dist/cli/utils/api-client-deadline.d.ts.map +1 -0
- package/dist/cli/utils/api-client-deadline.js +46 -0
- package/dist/cli/utils/api-client-errors.d.ts +118 -0
- package/dist/cli/utils/api-client-errors.d.ts.map +1 -0
- package/dist/cli/utils/api-client-errors.js +210 -0
- package/dist/cli/utils/api-client.d.ts +3 -133
- package/dist/cli/utils/api-client.d.ts.map +1 -1
- package/dist/cli/utils/api-client.js +30 -257
- package/dist/lib/cli-tools/types.d.ts +6 -0
- package/dist/lib/cli-tools/types.d.ts.map +1 -1
- package/dist/server/locales/en/worktree.json +7 -0
- package/dist/server/locales/ja/worktree.json +7 -0
- package/dist/server/src/lib/cli-tools/claude.js +8 -2
- package/dist/server/src/lib/cli-tools/command-code.js +7 -15
- package/dist/server/src/lib/cli-tools/copilot.js +154 -25
- package/dist/server/src/lib/cli-tools/opencode.js +157 -6
- package/dist/server/src/lib/cli-tools/prompt-wait-dialog.js +115 -0
- package/dist/server/src/lib/cli-tools/submit-composer-read.js +41 -8
- package/dist/server/src/lib/cli-tools/submit-verified-sender-composer.js +78 -0
- package/dist/server/src/lib/cli-tools/submit-verified-sender-lock.js +116 -0
- package/dist/server/src/lib/cli-tools/submit-verified-sender-report.js +250 -0
- package/dist/server/src/lib/cli-tools/submit-verified-sender-shared.js +106 -0
- package/dist/server/src/lib/cli-tools/submit-verified-sender.js +94 -295
- package/dist/server/src/lib/cli-tools/vibe-local.js +87 -0
- package/dist/server/src/lib/db/chat-db.js +14 -1
- package/dist/server/src/lib/db/db-instance.js +114 -2
- 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/v63-session-relays-delivery-attempt.js +61 -0
- package/dist/server/src/lib/db/relay-bind-db-base.js +89 -0
- package/dist/server/src/lib/db/relay-bind-db-delivery.js +223 -0
- package/dist/server/src/lib/db/relay-bind-db-pending.js +183 -0
- package/dist/server/src/lib/db/relay-bind-db.js +88 -167
- package/dist/server/src/lib/db/relay-db-base.js +20 -0
- package/dist/server/src/lib/db/relay-db-count.js +49 -0
- package/dist/server/src/lib/db/relay-db-delivery.js +104 -0
- package/dist/server/src/lib/db/relay-db-hold.js +250 -0
- package/dist/server/src/lib/db/relay-db.js +33 -92
- package/dist/server/src/lib/detection/tools/opencode/composer-own-text.js +119 -0
- package/dist/server/src/lib/detection/tools/opencode/readiness.js +62 -0
- package/dist/server/src/lib/detection/tools/vibe-local/readiness.js +70 -0
- package/dist/server/src/lib/relay/relay-bound-reply.js +20 -9
- package/dist/server/src/lib/relay/relay-delivery.js +359 -79
- package/dist/server/src/lib/relay/relay-messages.js +13 -0
- package/dist/server/src/lib/relay/relay-system-line.js +28 -15
- package/dist/server/src/lib/relay/types.js +14 -2
- package/dist/server/src/lib/session/claude-session.js +4 -1
- package/dist/server/src/lib/session/current-output-builder.js +7 -5
- package/dist/server/src/lib/session/instance-input-lock.js +47 -2
- package/dist/server/src/lib/session/prompt-submit-receipt.js +87 -18
- package/dist/server/src/lib/session/prompt-waiting-guard.js +8 -2
- package/dist/server/src/lib/session/respond-target.js +82 -0
- package/dist/server/src/lib/session/send-attempt-state.js +130 -3
- package/dist/server/src/lib/session/send-user-message.js +78 -7
- package/dist/server/src/lib/session/structured-prompt.js +12 -7
- package/dist/server/src/lib/session/worktree-session-reconcile.js +10 -0
- package/dist/server/src/lib/session-key-sender.js +6 -1
- package/package.json +1 -1
- package/release-notes/0.49.3.json +52 -0
- package/.next/server/chunks/1062.js +0 -1
- package/.next/server/chunks/110.js +0 -1
- package/.next/server/chunks/2422.js +0 -1
- package/.next/server/chunks/3756.js +0 -1
- package/.next/server/chunks/5630.js +0 -1
- package/.next/server/chunks/6808.js +0 -4
- package/.next/server/chunks/9198.js +0 -144
- package/.next/static/chunks/3931-61ad1a4fc0208d0e.js +0 -1
- package/.next/static/chunks/app/api/agents/update/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/agents/versions/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/app/release-notes/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/app/update/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/app/update-check/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/capabilities/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/fs/browse/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/fs/recent-paths/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/hooks/agent-event/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/hooks/permission-request/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/metrics/vibe/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/push/escalation/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/relays/[relayId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/relays/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/remote/pair/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/validate-path/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/settings/default-agents/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/skills/[id]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/skills/installations/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/skills/operations/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/skills/reindex/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/skills/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/templates/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/layout-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-33afc6aa96289fb0.js +0 -1
- /package/.next/static/{yGatWDsS532awSs51kXyd → LNfVZiq6FZwKsV7L9Mi6M}/_buildManifest.js +0 -0
- /package/.next/static/{yGatWDsS532awSs51kXyd → LNfVZiq6FZwKsV7L9Mi6M}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=2897,exports.ids=[2897],exports.modules={56791:(a,b,c)=>{c.r(b),c.d(b,{ACTIVE_FILTER:()=>d.ks,ACTIVE_TASK_STATUSES:()=>d.EL,AgentInstanceLimitError:()=>d.AC,CURRENT_SCHEMA_VERSION:()=>f.FT,DEFAULT_RUN_HISTORY_LIMIT:()=>d.Tu,InvalidAgentInstanceError:()=>d.ug,MAX_DISABLED_REPOSITORIES:()=>h.nc,MAX_RUN_HISTORY_DAYS:()=>d.eP,MAX_RUN_HISTORY_LIMIT:()=>d.mg,MemoDbError:()=>d.lm,NEW_SUBSCRIPTION_DEFAULTS:()=>d.s6,PUSH_DEFAULTS_VERSION:()=>d.VP,RepositoryDbError:()=>h.j8,TASK_STATUSES:()=>d.Hi,TERMINAL_TASK_STATUSES:()=>d.sA,VERIFICATION_GATE_SOURCES:()=>d.Dx,VERIFICATION_TRIGGERS:()=>d.af,WORKTREE_TODO_STATUSES:()=>d.KG,addAgentInstance:()=>d.Uq,cancelTimer:()=>d.Ud,cancelTimersByWorktree:()=>d.$$,cleanupOldTimers:()=>d.ul,clearInProgressMessageId:()=>d.YX,clearLastUserMessage:()=>d.cf,clearTimerHistory:()=>d.jf,closeDbInstance:()=>e.closeDbInstance,countAgentInstances:()=>d.fs,countDisabledRepositories:()=>h.QJ,countPushSubscriptionsForKind:()=>d.rC,countWorktreesByRepositoryPath:()=>h.kp,createCloneJob:()=>h.tw,createGateResult:()=>d.hl,createMemo:()=>d.To,createMessage:()=>d.oH,createRepository:()=>h.vB,createTask:()=>d.UT,createTimer:()=>d.CR,createVerificationRun:()=>d.rY,createWorktreeTodo:()=>d.yy,deleteAllMessages:()=>d.pE,deleteMemo:()=>d.cP,deleteMessageById:()=>d.DF,deleteMessagesByCliTool:()=>d.lA,deleteMessagesByInstance:()=>d.Qp,deletePushSubscriptionByEndpoint:()=>d.th,deleteRepository:()=>h.oG,deleteRepositoryWorktrees:()=>d.oZ,deleteSessionState:()=>d.ZP,deleteWorktreeTodo:()=>d.vg,deleteWorktreesByIds:()=>d.Rm,disableExistingRepository:()=>h.eP,disableRepository:()=>h.l$,ensureEnvRepositoriesRegistered:()=>h.ES,filterExcludedPaths:()=>h.Ho,findMessageByRequestId:()=>d.Ow,finishGateResult:()=>d.C8,finishVerificationRun:()=>d.u$,getActiveCloneJobByUrl:()=>h.fD,getActiveTask:()=>d.__,getActiveTaskForInstance:()=>d.MH,getAgentInstance:()=>d.BN,getAgentInstances:()=>d.m0,getAliasedWorktreeIds:()=>d.r3,getAllPushSubscriptions:()=>d.Se,getAllRepositories:()=>h.Yg,getAllRepositoriesWithWorktreeCount:()=>h._D,getAllWorktreeAliases:()=>d.fX,getAllWorktreeIds:()=>d.nO,getAllWorktreePathIds:()=>d.Sj,getCloneJob:()=>h.bM,getCloneJobsByStatus:()=>h.n_,getCurrentVersion:()=>f.Mj,getDailyReport:()=>d.ap,getDbInstance:()=>e.getDbInstance,getDefaultDbPath:()=>g.$b,getExcludedRepositories:()=>h.lS,getExcludedRepositoryPaths:()=>h.pr,getInitialBranch:()=>d.p4,getIssueDbPath:()=>g.zm,getLastAssistantMessageAt:()=>d.nP,getLastMessage:()=>d.sy,getLastUserMessage:()=>d.r8,getLegacyDbPaths:()=>u,getMemoById:()=>d.DN,getMemosByWorktreeId:()=>d.pZ,getMessageById:()=>d.kA,getMessages:()=>d.VL,getMessagesByDateRange:()=>d.lr,getMigrationHistory:()=>f.PS,getPendingTimerCountByWorktree:()=>d.GF,getPendingTimers:()=>d._O,getPushSubscriptionByEndpoint:()=>d.CF,getPushSubscriptionsForKind:()=>d.gn,getRepositories:()=>d.NV,getRepositoryById:()=>h.r,getRepositoryByNormalizedUrl:()=>h.Uj,getRepositoryByPath:()=>h.Dp,getRunningVerificationRun:()=>d.WZ,getSessionState:()=>d.y1,getTask:()=>d.gg,getTimerById:()=>d.kx,getTimersByWorktree:()=>d.DP,getTodosByWorktreeId:()=>d.fr,getVerificationRun:()=>d.J6,getWorktreeAliases:()=>d.Q2,getWorktreeById:()=>d.Ui,getWorktreeIdsByRepository:()=>d.P9,getWorktreeTodoById:()=>d.eN,getWorktrees:()=>d.vi,getWorktreesByRepository:()=>d.uJ,initDatabase:()=>d.s4,isTerminalTaskStatus:()=>d.uB,isWorktreeTodoStatus:()=>d.yT,listRunningVerificationRuns:()=>d.Fi,listTaskEvents:()=>d.HB,listTasks:()=>d.Vk,listVerificationRuns:()=>d.Mt,listVerificationRunsForPeriod:()=>d.UE,markPendingPromptsAsAnswered:()=>d.PL,migrateDbIfNeeded:()=>w,migrateWorktreeIdPreservingChildren:()=>d._h,pushSubscriptionNeedsDefaultsNotice:()=>d.Zj,recomputeLastUserMessage:()=>d.jp,recordAnsweredPrompt:()=>d.pG,recordWorktreeAlias:()=>d.xJ,recoverStuckSendingTimers:()=>d.Xm,registerAndFilterRepositories:()=>h.$G,removeAgentInstance:()=>d.NU,reorderMemos:()=>d.nQ,reorderWorktreeTodos:()=>d.yb,resolveAndValidatePath:()=>t,resolveRepositoryPath:()=>h.mE,resolveWorktreeIdWithAlias:()=>d.l0,restoreRepository:()=>h.RS,rollbackMigrations:()=>f.Wy,runMigrations:()=>f.vI,saveDailyReport:()=>d.tt,saveInitialBranch:()=>d.GA,setAgentInstances:()=>d.Cs,setInProgressMessageId:()=>d.OF,setRepositoryEnabled:()=>h.iQ,updateCliToolId:()=>d.WU,updateCloneJob:()=>h.k5,updateDailyReportContent:()=>d.IF,updateFavorite:()=>d.O,updateLastUserMessage:()=>d.EU,updateLastViewedAt:()=>d.HZ,updateMemo:()=>d.UY,updateMessageContent:()=>d.e8,updatePromptData:()=>d.cw,updatePushSubscriptionPreferences:()=>d.jJ,updateRepository:()=>h.Ir,updateSelectedAgents:()=>d.DC,updateSessionState:()=>d.PP,updateStatus:()=>d.yB,updateTimerStatus:()=>d.j2,updateVibeLocalContextWindow:()=>d.s,updateVibeLocalModel:()=>d.iu,updateWorktreeDescription:()=>d.hq,updateWorktreeLink:()=>d.z1,updateWorktreeTodo:()=>d.bl,upsertPushSubscription:()=>d.jA,upsertWorktree:()=>d.ZL,validateDbPath:()=>g.Sv,validateRepositoryPath:()=>h.Ux,validateSchema:()=>f.i6});var d=c(683),e=c(88807),f=c(
|
|
1
|
+
"use strict";exports.id=2897,exports.ids=[2897],exports.modules={56791:(a,b,c)=>{c.r(b),c.d(b,{ACTIVE_FILTER:()=>d.ks,ACTIVE_TASK_STATUSES:()=>d.EL,AgentInstanceLimitError:()=>d.AC,CURRENT_SCHEMA_VERSION:()=>f.FT,DEFAULT_RUN_HISTORY_LIMIT:()=>d.Tu,InvalidAgentInstanceError:()=>d.ug,MAX_DISABLED_REPOSITORIES:()=>h.nc,MAX_RUN_HISTORY_DAYS:()=>d.eP,MAX_RUN_HISTORY_LIMIT:()=>d.mg,MemoDbError:()=>d.lm,NEW_SUBSCRIPTION_DEFAULTS:()=>d.s6,PUSH_DEFAULTS_VERSION:()=>d.VP,RepositoryDbError:()=>h.j8,TASK_STATUSES:()=>d.Hi,TERMINAL_TASK_STATUSES:()=>d.sA,TEST_DB_ROOT_ENV:()=>e.TEST_DB_ROOT_ENV,VERIFICATION_GATE_SOURCES:()=>d.Dx,VERIFICATION_TRIGGERS:()=>d.af,WORKTREE_TODO_STATUSES:()=>d.KG,addAgentInstance:()=>d.Uq,assertTestDatabasePathIsolated:()=>e.assertTestDatabasePathIsolated,cancelTimer:()=>d.Ud,cancelTimersByWorktree:()=>d.$$,cleanupOldTimers:()=>d.ul,clearInProgressMessageId:()=>d.YX,clearLastUserMessage:()=>d.cf,clearTimerHistory:()=>d.jf,closeDbInstance:()=>e.closeDbInstance,countAgentInstances:()=>d.fs,countDisabledRepositories:()=>h.QJ,countPushSubscriptionsForKind:()=>d.rC,countWorktreesByRepositoryPath:()=>h.kp,createCloneJob:()=>h.tw,createGateResult:()=>d.hl,createMemo:()=>d.To,createMessage:()=>d.oH,createRepository:()=>h.vB,createTask:()=>d.UT,createTimer:()=>d.CR,createVerificationRun:()=>d.rY,createWorktreeTodo:()=>d.yy,deleteAllMessages:()=>d.pE,deleteMemo:()=>d.cP,deleteMessageById:()=>d.DF,deleteMessagesByCliTool:()=>d.lA,deleteMessagesByInstance:()=>d.Qp,deletePushSubscriptionByEndpoint:()=>d.th,deleteRepository:()=>h.oG,deleteRepositoryWorktrees:()=>d.oZ,deleteSessionState:()=>d.ZP,deleteWorktreeTodo:()=>d.vg,deleteWorktreesByIds:()=>d.Rm,disableExistingRepository:()=>h.eP,disableRepository:()=>h.l$,ensureEnvRepositoriesRegistered:()=>h.ES,filterExcludedPaths:()=>h.Ho,findMessageByRequestId:()=>d.Ow,finishGateResult:()=>d.C8,finishVerificationRun:()=>d.u$,getActiveCloneJobByUrl:()=>h.fD,getActiveTask:()=>d.__,getActiveTaskForInstance:()=>d.MH,getAgentInstance:()=>d.BN,getAgentInstances:()=>d.m0,getAliasedWorktreeIds:()=>d.r3,getAllPushSubscriptions:()=>d.Se,getAllRepositories:()=>h.Yg,getAllRepositoriesWithWorktreeCount:()=>h._D,getAllWorktreeAliases:()=>d.fX,getAllWorktreeIds:()=>d.nO,getAllWorktreePathIds:()=>d.Sj,getCloneJob:()=>h.bM,getCloneJobsByStatus:()=>h.n_,getCurrentVersion:()=>f.Mj,getDailyReport:()=>d.ap,getDbInstance:()=>e.getDbInstance,getDefaultDbPath:()=>g.$b,getExcludedRepositories:()=>h.lS,getExcludedRepositoryPaths:()=>h.pr,getInitialBranch:()=>d.p4,getIssueDbPath:()=>g.zm,getLastAssistantMessageAt:()=>d.nP,getLastMessage:()=>d.sy,getLastUserMessage:()=>d.r8,getLegacyDbPaths:()=>u,getMemoById:()=>d.DN,getMemosByWorktreeId:()=>d.pZ,getMessageById:()=>d.kA,getMessages:()=>d.VL,getMessagesByDateRange:()=>d.lr,getMigrationHistory:()=>f.PS,getPendingTimerCountByWorktree:()=>d.GF,getPendingTimers:()=>d._O,getPushSubscriptionByEndpoint:()=>d.CF,getPushSubscriptionsForKind:()=>d.gn,getRepositories:()=>d.NV,getRepositoryById:()=>h.r,getRepositoryByNormalizedUrl:()=>h.Uj,getRepositoryByPath:()=>h.Dp,getRunningVerificationRun:()=>d.WZ,getSessionState:()=>d.y1,getTask:()=>d.gg,getTimerById:()=>d.kx,getTimersByWorktree:()=>d.DP,getTodosByWorktreeId:()=>d.fr,getVerificationRun:()=>d.J6,getWorktreeAliases:()=>d.Q2,getWorktreeById:()=>d.Ui,getWorktreeIdsByRepository:()=>d.P9,getWorktreeTodoById:()=>d.eN,getWorktrees:()=>d.vi,getWorktreesByRepository:()=>d.uJ,initDatabase:()=>d.s4,isInsideVitestWorker:()=>e.isInsideVitestWorker,isTerminalTaskStatus:()=>d.uB,isWorktreeTodoStatus:()=>d.yT,listRunningVerificationRuns:()=>d.Fi,listTaskEvents:()=>d.HB,listTasks:()=>d.Vk,listVerificationRuns:()=>d.Mt,listVerificationRunsForPeriod:()=>d.UE,markPendingPromptsAsAnswered:()=>d.PL,migrateDbIfNeeded:()=>w,migrateWorktreeIdPreservingChildren:()=>d._h,pushSubscriptionNeedsDefaultsNotice:()=>d.Zj,recomputeLastUserMessage:()=>d.jp,recordAnsweredPrompt:()=>d.pG,recordWorktreeAlias:()=>d.xJ,recoverStuckSendingTimers:()=>d.Xm,registerAndFilterRepositories:()=>h.$G,removeAgentInstance:()=>d.NU,reorderMemos:()=>d.nQ,reorderWorktreeTodos:()=>d.yb,resolveAndValidatePath:()=>t,resolveRepositoryPath:()=>h.mE,resolveWorktreeIdWithAlias:()=>d.l0,restoreRepository:()=>h.RS,rollbackMigrations:()=>f.Wy,runMigrations:()=>f.vI,saveDailyReport:()=>d.tt,saveInitialBranch:()=>d.GA,setAgentInstances:()=>d.Cs,setInProgressMessageId:()=>d.OF,setRepositoryEnabled:()=>h.iQ,updateCliToolId:()=>d.WU,updateCloneJob:()=>h.k5,updateDailyReportContent:()=>d.IF,updateFavorite:()=>d.O,updateLastUserMessage:()=>d.EU,updateLastViewedAt:()=>d.HZ,updateMemo:()=>d.UY,updateMessageContent:()=>d.e8,updatePromptData:()=>d.cw,updatePushSubscriptionPreferences:()=>d.jJ,updateRepository:()=>h.Ir,updateSelectedAgents:()=>d.DC,updateSessionState:()=>d.PP,updateStatus:()=>d.yB,updateTimerStatus:()=>d.j2,updateVibeLocalContextWindow:()=>d.s,updateVibeLocalModel:()=>d.iu,updateWorktreeDescription:()=>d.hq,updateWorktreeLink:()=>d.z1,updateWorktreeTodo:()=>d.bl,upsertPushSubscription:()=>d.jA,upsertWorktree:()=>d.ZL,validateDbPath:()=>g.Sv,validateRepositoryPath:()=>h.Ux,validateSchema:()=>f.i6});var d=c(683),e=c(88807),f=c(28445),g=c(20416),h=c(10406),i=c(87550),j=c.n(i),k=c(55511),l=c.n(k),m=c(29021),n=c.n(m),o=c(33873),p=c.n(o),q=c(21820),r=c(7956);let s=(0,c(72626).h)("db-migration-path");function t(a,b){try{if(!n().existsSync(a))return null;let c=n().realpathSync(a);if((0,r.fW)(c))return s.warn(`[Security] ${b} points to system directory, skipping: ${c}`),null;return c}catch{return s.warn(`[Security] Failed to resolve ${b}: ${a}`),null}}function u(){let a=[];a.push(p().join(process.cwd(),"data","db.sqlite")),a.push(p().join(process.cwd(),"data","cm.db")),a.push(p().join((0,q.homedir)(),".commandmate","data","db.sqlite"));let b=process.env.DATABASE_PATH;if(b)try{let c=p().resolve(b);(0,r.fW)(c)?s.warn(`[Security] Skipping DATABASE_PATH in system directory: ${c}`):a.push(b)}catch{s.warn(`[Security] Invalid DATABASE_PATH: ${b}`)}return a}function v(a,b){if(function(a){try{return n().statSync(`${a}-wal`).size>0}catch{return!1}}(a)){let c=`${b}.${l().randomBytes(4).toString("hex")}.partial`;try{n().closeSync(n().openSync(c,"wx",384));let d=new(j())(a,{readonly:!0,fileMustExist:!0});try{d.prepare("VACUUM INTO ?").run(c)}finally{d.close()}n().renameSync(c,b)}catch(a){throw n().rmSync(c,{force:!0}),a}}else n().copyFileSync(a,b)}function w(a){let b=p().resolve(a);if((0,r.fW)(b))throw Error(`Security error: Target path cannot be in system directory: ${b}`);if(n().existsSync(a)){let b=t(a,"target path");if(b)return{migrated:!1,targetPath:b}}for(let a of u()){let c=t(a,"legacy path");if(!c)continue;let d=`${c}.bak`;v(c,d),n().chmodSync(d,384);let e=p().dirname(b);return n().existsSync(e)||n().mkdirSync(e,{recursive:!0,mode:448}),v(c,b),s.info(`[Migration] Database migrated from ${c} to ${b}`),s.info(`[Migration] Backup created at ${d}`),{migrated:!0,sourcePath:c,targetPath:b,backupPath:d}}return{migrated:!1,targetPath:b}}},62171:(a,b,c)=>{c.d(b,{HL:()=>r,WC:()=>s,hf:()=>q,ki:()=>v,pw:()=>w,rn:()=>t,t2:()=>u});var d=c(72626),e=c(24455),f=c(85322),g=c(84574),h=c(49791),i=c(36925);let j=(0,d.h)("lib/hooks/sources/opencode/diff"),k=(0,i.v)("__opencodeSessionDiff",()=>new Map),l=(0,i.v)("__opencodeSessionDiffRefreshes",()=>new Set);function m(a){return(0,e.v7)(a.worktreeId,a.cliToolId,a.instanceId)}function n(a){return{sessionId:null,turnMessageId:null,files:[],filesAt:null,revertedFiles:[],revertedMessageId:null,at:a}}function o(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function p(a,b){let c=a[b];return"string"!=typeof c||0===c.length?null:c.slice(0,128)}function q(a,b,c){let d=m(a),e=k.get(d)??n(c),f=function(a){if("message.updated"!==a.type)return null;let b=o(a.properties)?a.properties:null,c=b&&o(b.info)?b.info:null;if(!c||"user"!==c.role)return null;let d=p(c,"id");return d?{sessionId:p(c,"sessionID"),messageId:d}:null}(b);if(f){if(f.messageId===e.turnMessageId)return;k.set(d,{...e,sessionId:f.sessionId??e.sessionId,turnMessageId:f.messageId,files:[],filesAt:null,at:c});return}let g=function(a){let b=a.type,c=o(a.properties)?a.properties:null;if(!c)return null;if("session.diff"===b)return{kind:"files",sessionId:p(c,"sessionID"),files:(0,h.M)(c.diff)};if("session.updated"===b){let a=o(c.info)?c.info:null;if(!a||"string"==typeof a.parentID&&a.parentID.length>0)return null;let b=o(a.revert)?a.revert:null;return{kind:"held",sessionId:p(a,"id"),messageId:b?p(b,"messageID"):null}}return null}(b);if(g){if("files"===g.kind)return void k.set(d,{...e,sessionId:g.sessionId??e.sessionId,revertedFiles:g.files,at:c});k.set(d,{...e,sessionId:g.sessionId??e.sessionId,revertedMessageId:g.messageId,revertedFiles:null===g.messageId?[]:e.revertedFiles,at:c})}}function r(a,b,c){return b!==f.k?null:k.get((0,e.v7)(a,b,c))??null}function s(a){let b=m(a);k.delete(b),l.delete(b)}function t(a){if(a.cliToolId!==f.k)return null;let b=m(a),c=k.get(b);if(!c)return null;if(null!==c.filesAt||null===c.sessionId||null===c.turnMessageId||l.has(b))return c;let d=(0,g.hC)(a);return null===d||(l.add(b),u(a,d,c.sessionId,c.turnMessageId).finally(()=>{l.delete(b)})),c}async function u(a,b,c,d){let e=await (0,h.iv)(b,c,d);if(null===e)return j.debug("opencode-turn-diff-unavailable",{worktreeId:a.worktreeId,instanceId:a.instanceId??a.cliToolId,sessionId:c}),null;let f=m(a),g=k.get(f);return g&&g.turnMessageId===d&&k.set(f,{...g,files:e,filesAt:Date.now()}),e}function v(a,b,c){let d=m(a),e=Date.now(),f=k.get(d)??n(e);k.set(d,{...f,revertedMessageId:b,revertedFiles:c,at:e})}function w(a,b){let c=r(a,f.k,b);if(!c)return null;let d=new Set;for(let a of[...c.files,...c.revertedFiles])null!==a.file&&d.add(a.file);let e=[...c.files,...c.revertedFiles].filter(a=>null===a.file).length;return d.size+e}},85322:(a,b,c)=>{c.d(b,{k:()=>d});let d="opencode"}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=3417,exports.ids=[3417],exports.modules={429:(a,b,c)=>{function d(a,b){let{logLevel:c="info",maxResponseBodyLength:d=1024,skipResponseBody:e=!1}=b??{};return async(b,c)=>a(b,c)}c.d(b,{e:()=>d}),(0,c(72626).h)("api")},3421:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71237),e=c(55088),f=c(17679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},21684:(a,b,c)=>{c.d(b,{U:()=>h});var d=c(33873),e=c.n(d),f=c(87447),g=c(8004);function h(){let a=e().join(process.cwd(),"data","logs");return(0,g.T)((0,f._p)("CM_LOG_DIR"),a,"CM_LOG_DIR")}},27289:(a,b,c)=>{c.d(b,{t:()=>j,z:()=>i});var d=c(10641),e=c(88807),f=c(56791),g=c(95506),h=c(66007);function i(a){if(!a)return a;try{if(!(0,h.h6)(a))return a;let b=(0,e.getDbInstance)();return(0,g.l0)(b,a)??a}catch{return a}}function j(a){if(!(0,h.h6)(a))return d.NextResponse.json({error:"Invalid worktree ID format"},{status:400});let b=(0,e.getDbInstance)(),c=(0,f.getWorktreeById)(b,i(a));return c||d.NextResponse.json({error:"Worktree not found"},{status:404})}},56791:(a,b,c)=>{c.r(b),c.d(b,{ACTIVE_FILTER:()=>d.ks,ACTIVE_TASK_STATUSES:()=>d.EL,AgentInstanceLimitError:()=>d.AC,CURRENT_SCHEMA_VERSION:()=>f.FT,DEFAULT_RUN_HISTORY_LIMIT:()=>d.Tu,InvalidAgentInstanceError:()=>d.ug,MAX_DISABLED_REPOSITORIES:()=>h.nc,MAX_RUN_HISTORY_DAYS:()=>d.eP,MAX_RUN_HISTORY_LIMIT:()=>d.mg,MemoDbError:()=>d.lm,NEW_SUBSCRIPTION_DEFAULTS:()=>d.s6,PUSH_DEFAULTS_VERSION:()=>d.VP,RepositoryDbError:()=>h.j8,TASK_STATUSES:()=>d.Hi,TERMINAL_TASK_STATUSES:()=>d.sA,VERIFICATION_GATE_SOURCES:()=>d.Dx,VERIFICATION_TRIGGERS:()=>d.af,WORKTREE_TODO_STATUSES:()=>d.KG,addAgentInstance:()=>d.Uq,cancelTimer:()=>d.Ud,cancelTimersByWorktree:()=>d.$$,cleanupOldTimers:()=>d.ul,clearInProgressMessageId:()=>d.YX,clearLastUserMessage:()=>d.cf,clearTimerHistory:()=>d.jf,closeDbInstance:()=>e.closeDbInstance,countAgentInstances:()=>d.fs,countDisabledRepositories:()=>h.QJ,countPushSubscriptionsForKind:()=>d.rC,countWorktreesByRepositoryPath:()=>h.kp,createCloneJob:()=>h.tw,createGateResult:()=>d.hl,createMemo:()=>d.To,createMessage:()=>d.oH,createRepository:()=>h.vB,createTask:()=>d.UT,createTimer:()=>d.CR,createVerificationRun:()=>d.rY,createWorktreeTodo:()=>d.yy,deleteAllMessages:()=>d.pE,deleteMemo:()=>d.cP,deleteMessageById:()=>d.DF,deleteMessagesByCliTool:()=>d.lA,deleteMessagesByInstance:()=>d.Qp,deletePushSubscriptionByEndpoint:()=>d.th,deleteRepository:()=>h.oG,deleteRepositoryWorktrees:()=>d.oZ,deleteSessionState:()=>d.ZP,deleteWorktreeTodo:()=>d.vg,deleteWorktreesByIds:()=>d.Rm,disableExistingRepository:()=>h.eP,disableRepository:()=>h.l$,ensureEnvRepositoriesRegistered:()=>h.ES,filterExcludedPaths:()=>h.Ho,findMessageByRequestId:()=>d.Ow,finishGateResult:()=>d.C8,finishVerificationRun:()=>d.u$,getActiveCloneJobByUrl:()=>h.fD,getActiveTask:()=>d.__,getActiveTaskForInstance:()=>d.MH,getAgentInstance:()=>d.BN,getAgentInstances:()=>d.m0,getAliasedWorktreeIds:()=>d.r3,getAllPushSubscriptions:()=>d.Se,getAllRepositories:()=>h.Yg,getAllRepositoriesWithWorktreeCount:()=>h._D,getAllWorktreeAliases:()=>d.fX,getAllWorktreeIds:()=>d.nO,getAllWorktreePathIds:()=>d.Sj,getCloneJob:()=>h.bM,getCloneJobsByStatus:()=>h.n_,getCurrentVersion:()=>f.Mj,getDailyReport:()=>d.ap,getDbInstance:()=>e.getDbInstance,getDefaultDbPath:()=>g.$b,getExcludedRepositories:()=>h.lS,getExcludedRepositoryPaths:()=>h.pr,getInitialBranch:()=>d.p4,getIssueDbPath:()=>g.zm,getLastAssistantMessageAt:()=>d.nP,getLastMessage:()=>d.sy,getLastUserMessage:()=>d.r8,getLegacyDbPaths:()=>u,getMemoById:()=>d.DN,getMemosByWorktreeId:()=>d.pZ,getMessageById:()=>d.kA,getMessages:()=>d.VL,getMessagesByDateRange:()=>d.lr,getMigrationHistory:()=>f.PS,getPendingTimerCountByWorktree:()=>d.GF,getPendingTimers:()=>d._O,getPushSubscriptionByEndpoint:()=>d.CF,getPushSubscriptionsForKind:()=>d.gn,getRepositories:()=>d.NV,getRepositoryById:()=>h.r,getRepositoryByNormalizedUrl:()=>h.Uj,getRepositoryByPath:()=>h.Dp,getRunningVerificationRun:()=>d.WZ,getSessionState:()=>d.y1,getTask:()=>d.gg,getTimerById:()=>d.kx,getTimersByWorktree:()=>d.DP,getTodosByWorktreeId:()=>d.fr,getVerificationRun:()=>d.J6,getWorktreeAliases:()=>d.Q2,getWorktreeById:()=>d.Ui,getWorktreeIdsByRepository:()=>d.P9,getWorktreeTodoById:()=>d.eN,getWorktrees:()=>d.vi,getWorktreesByRepository:()=>d.uJ,initDatabase:()=>d.s4,isTerminalTaskStatus:()=>d.uB,isWorktreeTodoStatus:()=>d.yT,listRunningVerificationRuns:()=>d.Fi,listTaskEvents:()=>d.HB,listTasks:()=>d.Vk,listVerificationRuns:()=>d.Mt,listVerificationRunsForPeriod:()=>d.UE,markPendingPromptsAsAnswered:()=>d.PL,migrateDbIfNeeded:()=>w,migrateWorktreeIdPreservingChildren:()=>d._h,pushSubscriptionNeedsDefaultsNotice:()=>d.Zj,recomputeLastUserMessage:()=>d.jp,recordAnsweredPrompt:()=>d.pG,recordWorktreeAlias:()=>d.xJ,recoverStuckSendingTimers:()=>d.Xm,registerAndFilterRepositories:()=>h.$G,removeAgentInstance:()=>d.NU,reorderMemos:()=>d.nQ,reorderWorktreeTodos:()=>d.yb,resolveAndValidatePath:()=>t,resolveRepositoryPath:()=>h.mE,resolveWorktreeIdWithAlias:()=>d.l0,restoreRepository:()=>h.RS,rollbackMigrations:()=>f.Wy,runMigrations:()=>f.vI,saveDailyReport:()=>d.tt,saveInitialBranch:()=>d.GA,setAgentInstances:()=>d.Cs,setInProgressMessageId:()=>d.OF,setRepositoryEnabled:()=>h.iQ,updateCliToolId:()=>d.WU,updateCloneJob:()=>h.k5,updateDailyReportContent:()=>d.IF,updateFavorite:()=>d.O,updateLastUserMessage:()=>d.EU,updateLastViewedAt:()=>d.HZ,updateMemo:()=>d.UY,updateMessageContent:()=>d.e8,updatePromptData:()=>d.cw,updatePushSubscriptionPreferences:()=>d.jJ,updateRepository:()=>h.Ir,updateSelectedAgents:()=>d.DC,updateSessionState:()=>d.PP,updateStatus:()=>d.yB,updateTimerStatus:()=>d.j2,updateVibeLocalContextWindow:()=>d.s,updateVibeLocalModel:()=>d.iu,updateWorktreeDescription:()=>d.hq,updateWorktreeLink:()=>d.z1,updateWorktreeTodo:()=>d.bl,upsertPushSubscription:()=>d.jA,upsertWorktree:()=>d.ZL,validateDbPath:()=>g.Sv,validateRepositoryPath:()=>h.Ux,validateSchema:()=>f.i6});var d=c(683),e=c(88807),f=c(
|
|
1
|
+
"use strict";exports.id=3417,exports.ids=[3417],exports.modules={429:(a,b,c)=>{function d(a,b){let{logLevel:c="info",maxResponseBodyLength:d=1024,skipResponseBody:e=!1}=b??{};return async(b,c)=>a(b,c)}c.d(b,{e:()=>d}),(0,c(72626).h)("api")},3421:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71237),e=c(55088),f=c(17679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},21684:(a,b,c)=>{c.d(b,{U:()=>h});var d=c(33873),e=c.n(d),f=c(87447),g=c(8004);function h(){let a=e().join(process.cwd(),"data","logs");return(0,g.T)((0,f._p)("CM_LOG_DIR"),a,"CM_LOG_DIR")}},27289:(a,b,c)=>{c.d(b,{t:()=>j,z:()=>i});var d=c(10641),e=c(88807),f=c(56791),g=c(95506),h=c(66007);function i(a){if(!a)return a;try{if(!(0,h.h6)(a))return a;let b=(0,e.getDbInstance)();return(0,g.l0)(b,a)??a}catch{return a}}function j(a){if(!(0,h.h6)(a))return d.NextResponse.json({error:"Invalid worktree ID format"},{status:400});let b=(0,e.getDbInstance)(),c=(0,f.getWorktreeById)(b,i(a));return c||d.NextResponse.json({error:"Worktree not found"},{status:404})}},56791:(a,b,c)=>{c.r(b),c.d(b,{ACTIVE_FILTER:()=>d.ks,ACTIVE_TASK_STATUSES:()=>d.EL,AgentInstanceLimitError:()=>d.AC,CURRENT_SCHEMA_VERSION:()=>f.FT,DEFAULT_RUN_HISTORY_LIMIT:()=>d.Tu,InvalidAgentInstanceError:()=>d.ug,MAX_DISABLED_REPOSITORIES:()=>h.nc,MAX_RUN_HISTORY_DAYS:()=>d.eP,MAX_RUN_HISTORY_LIMIT:()=>d.mg,MemoDbError:()=>d.lm,NEW_SUBSCRIPTION_DEFAULTS:()=>d.s6,PUSH_DEFAULTS_VERSION:()=>d.VP,RepositoryDbError:()=>h.j8,TASK_STATUSES:()=>d.Hi,TERMINAL_TASK_STATUSES:()=>d.sA,TEST_DB_ROOT_ENV:()=>e.TEST_DB_ROOT_ENV,VERIFICATION_GATE_SOURCES:()=>d.Dx,VERIFICATION_TRIGGERS:()=>d.af,WORKTREE_TODO_STATUSES:()=>d.KG,addAgentInstance:()=>d.Uq,assertTestDatabasePathIsolated:()=>e.assertTestDatabasePathIsolated,cancelTimer:()=>d.Ud,cancelTimersByWorktree:()=>d.$$,cleanupOldTimers:()=>d.ul,clearInProgressMessageId:()=>d.YX,clearLastUserMessage:()=>d.cf,clearTimerHistory:()=>d.jf,closeDbInstance:()=>e.closeDbInstance,countAgentInstances:()=>d.fs,countDisabledRepositories:()=>h.QJ,countPushSubscriptionsForKind:()=>d.rC,countWorktreesByRepositoryPath:()=>h.kp,createCloneJob:()=>h.tw,createGateResult:()=>d.hl,createMemo:()=>d.To,createMessage:()=>d.oH,createRepository:()=>h.vB,createTask:()=>d.UT,createTimer:()=>d.CR,createVerificationRun:()=>d.rY,createWorktreeTodo:()=>d.yy,deleteAllMessages:()=>d.pE,deleteMemo:()=>d.cP,deleteMessageById:()=>d.DF,deleteMessagesByCliTool:()=>d.lA,deleteMessagesByInstance:()=>d.Qp,deletePushSubscriptionByEndpoint:()=>d.th,deleteRepository:()=>h.oG,deleteRepositoryWorktrees:()=>d.oZ,deleteSessionState:()=>d.ZP,deleteWorktreeTodo:()=>d.vg,deleteWorktreesByIds:()=>d.Rm,disableExistingRepository:()=>h.eP,disableRepository:()=>h.l$,ensureEnvRepositoriesRegistered:()=>h.ES,filterExcludedPaths:()=>h.Ho,findMessageByRequestId:()=>d.Ow,finishGateResult:()=>d.C8,finishVerificationRun:()=>d.u$,getActiveCloneJobByUrl:()=>h.fD,getActiveTask:()=>d.__,getActiveTaskForInstance:()=>d.MH,getAgentInstance:()=>d.BN,getAgentInstances:()=>d.m0,getAliasedWorktreeIds:()=>d.r3,getAllPushSubscriptions:()=>d.Se,getAllRepositories:()=>h.Yg,getAllRepositoriesWithWorktreeCount:()=>h._D,getAllWorktreeAliases:()=>d.fX,getAllWorktreeIds:()=>d.nO,getAllWorktreePathIds:()=>d.Sj,getCloneJob:()=>h.bM,getCloneJobsByStatus:()=>h.n_,getCurrentVersion:()=>f.Mj,getDailyReport:()=>d.ap,getDbInstance:()=>e.getDbInstance,getDefaultDbPath:()=>g.$b,getExcludedRepositories:()=>h.lS,getExcludedRepositoryPaths:()=>h.pr,getInitialBranch:()=>d.p4,getIssueDbPath:()=>g.zm,getLastAssistantMessageAt:()=>d.nP,getLastMessage:()=>d.sy,getLastUserMessage:()=>d.r8,getLegacyDbPaths:()=>u,getMemoById:()=>d.DN,getMemosByWorktreeId:()=>d.pZ,getMessageById:()=>d.kA,getMessages:()=>d.VL,getMessagesByDateRange:()=>d.lr,getMigrationHistory:()=>f.PS,getPendingTimerCountByWorktree:()=>d.GF,getPendingTimers:()=>d._O,getPushSubscriptionByEndpoint:()=>d.CF,getPushSubscriptionsForKind:()=>d.gn,getRepositories:()=>d.NV,getRepositoryById:()=>h.r,getRepositoryByNormalizedUrl:()=>h.Uj,getRepositoryByPath:()=>h.Dp,getRunningVerificationRun:()=>d.WZ,getSessionState:()=>d.y1,getTask:()=>d.gg,getTimerById:()=>d.kx,getTimersByWorktree:()=>d.DP,getTodosByWorktreeId:()=>d.fr,getVerificationRun:()=>d.J6,getWorktreeAliases:()=>d.Q2,getWorktreeById:()=>d.Ui,getWorktreeIdsByRepository:()=>d.P9,getWorktreeTodoById:()=>d.eN,getWorktrees:()=>d.vi,getWorktreesByRepository:()=>d.uJ,initDatabase:()=>d.s4,isInsideVitestWorker:()=>e.isInsideVitestWorker,isTerminalTaskStatus:()=>d.uB,isWorktreeTodoStatus:()=>d.yT,listRunningVerificationRuns:()=>d.Fi,listTaskEvents:()=>d.HB,listTasks:()=>d.Vk,listVerificationRuns:()=>d.Mt,listVerificationRunsForPeriod:()=>d.UE,markPendingPromptsAsAnswered:()=>d.PL,migrateDbIfNeeded:()=>w,migrateWorktreeIdPreservingChildren:()=>d._h,pushSubscriptionNeedsDefaultsNotice:()=>d.Zj,recomputeLastUserMessage:()=>d.jp,recordAnsweredPrompt:()=>d.pG,recordWorktreeAlias:()=>d.xJ,recoverStuckSendingTimers:()=>d.Xm,registerAndFilterRepositories:()=>h.$G,removeAgentInstance:()=>d.NU,reorderMemos:()=>d.nQ,reorderWorktreeTodos:()=>d.yb,resolveAndValidatePath:()=>t,resolveRepositoryPath:()=>h.mE,resolveWorktreeIdWithAlias:()=>d.l0,restoreRepository:()=>h.RS,rollbackMigrations:()=>f.Wy,runMigrations:()=>f.vI,saveDailyReport:()=>d.tt,saveInitialBranch:()=>d.GA,setAgentInstances:()=>d.Cs,setInProgressMessageId:()=>d.OF,setRepositoryEnabled:()=>h.iQ,updateCliToolId:()=>d.WU,updateCloneJob:()=>h.k5,updateDailyReportContent:()=>d.IF,updateFavorite:()=>d.O,updateLastUserMessage:()=>d.EU,updateLastViewedAt:()=>d.HZ,updateMemo:()=>d.UY,updateMessageContent:()=>d.e8,updatePromptData:()=>d.cw,updatePushSubscriptionPreferences:()=>d.jJ,updateRepository:()=>h.Ir,updateSelectedAgents:()=>d.DC,updateSessionState:()=>d.PP,updateStatus:()=>d.yB,updateTimerStatus:()=>d.j2,updateVibeLocalContextWindow:()=>d.s,updateVibeLocalModel:()=>d.iu,updateWorktreeDescription:()=>d.hq,updateWorktreeLink:()=>d.z1,updateWorktreeTodo:()=>d.bl,upsertPushSubscription:()=>d.jA,upsertWorktree:()=>d.ZL,validateDbPath:()=>g.Sv,validateRepositoryPath:()=>h.Ux,validateSchema:()=>f.i6});var d=c(683),e=c(88807),f=c(28445),g=c(20416),h=c(10406),i=c(87550),j=c.n(i),k=c(55511),l=c.n(k),m=c(29021),n=c.n(m),o=c(33873),p=c.n(o),q=c(21820),r=c(7956);let s=(0,c(72626).h)("db-migration-path");function t(a,b){try{if(!n().existsSync(a))return null;let c=n().realpathSync(a);if((0,r.fW)(c))return s.warn(`[Security] ${b} points to system directory, skipping: ${c}`),null;return c}catch{return s.warn(`[Security] Failed to resolve ${b}: ${a}`),null}}function u(){let a=[];a.push(p().join(process.cwd(),"data","db.sqlite")),a.push(p().join(process.cwd(),"data","cm.db")),a.push(p().join((0,q.homedir)(),".commandmate","data","db.sqlite"));let b=process.env.DATABASE_PATH;if(b)try{let c=p().resolve(b);(0,r.fW)(c)?s.warn(`[Security] Skipping DATABASE_PATH in system directory: ${c}`):a.push(b)}catch{s.warn(`[Security] Invalid DATABASE_PATH: ${b}`)}return a}function v(a,b){if(function(a){try{return n().statSync(`${a}-wal`).size>0}catch{return!1}}(a)){let c=`${b}.${l().randomBytes(4).toString("hex")}.partial`;try{n().closeSync(n().openSync(c,"wx",384));let d=new(j())(a,{readonly:!0,fileMustExist:!0});try{d.prepare("VACUUM INTO ?").run(c)}finally{d.close()}n().renameSync(c,b)}catch(a){throw n().rmSync(c,{force:!0}),a}}else n().copyFileSync(a,b)}function w(a){let b=p().resolve(a);if((0,r.fW)(b))throw Error(`Security error: Target path cannot be in system directory: ${b}`);if(n().existsSync(a)){let b=t(a,"target path");if(b)return{migrated:!1,targetPath:b}}for(let a of u()){let c=t(a,"legacy path");if(!c)continue;let d=`${c}.bak`;v(c,d),n().chmodSync(d,384);let e=p().dirname(b);return n().existsSync(e)||n().mkdirSync(e,{recursive:!0,mode:448}),v(c,b),s.info(`[Migration] Database migrated from ${c} to ${b}`),s.info(`[Migration] Backup created at ${d}`),{migrated:!0,sourcePath:c,targetPath:b,backupPath:d}}return{migrated:!1,targetPath:b}}},95736:(a,b,c)=>{a.exports=c(44870)}};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";exports.id=3801,exports.ids=[3801],exports.modules={640:(a,b,c)=>{function d(a){return`[from ${a.alias} / ${a.worktreeId}]`}function e(a,b,c=null){let f=b.trim();return null!==c?`${d(a)}
|
|
2
2
|
${c}
|
|
3
3
|
${""===f?"(no reply body)":f}`:""===f?`${d(a)} (no reply body)`:`${d(a)} ${f}`}c.d(b,{Hr:()=>j,KA:()=>l,Nl:()=>n,Py:()=>g,z0:()=>e});let f={en:"Note: this reply may have been processed in the same turn as another request (overlap={overlap}).",ja:"注意: この返答は、別の依頼と同じターンで処理された可能性があります(overlap={overlap})。"};function g(a,b){return null===b||"none"===b?null:`[CommandMate relay] ${f[a].replace("{overlap}",b)}`}function h(a,b){let c=a.replace(/\s+/g," ").trim();return c.length<=b?c:`${c.slice(0,b-1)}…`}let i={en:{waiting:"is waiting for a confirmation:",options:"Options:",more:"(+{n} more)"},ja:{waiting:"確認待ちです:",options:"選択肢:",more:"(他 {n} 件)"}};function j(a,b,c){let e=i[a],f=`${d(b)} ${e.waiting} ${h(c.question,200)}`;if(0===c.options.length)return f;let g=c.options.slice(0,9),j=c.options.length-g.length,k=g.map(a=>`${a.key}) ${h(a.label,60)}`).join(" "),l=j>0?` ${e.more.replace("{n}",String(j))}`:"";return`${f}
|
|
4
|
-
${e.options} ${k}${l}`}let k={en:"The reply you were waiting for did not arrive within {hours}h; the relay has expired.",ja:"待っていた返信が {hours} 時間以内に届かなかったため、委任は期限切れになりました。"};function l(a,b,c){let e=Math.max(1,Math.round(c/36e5));return`${d(b)} ${k[a].replace("{hours}",String(e))}`}let m={en:{requested:"Delegated to {alias}; waiting for the reply.",replied:"Reply from {alias}.",waiting:"{alias} is waiting for a confirmation.",expired:"The delegation to {alias} expired without a reply."},ja:{requested:"{alias} へ委任、返信待ち",replied:"{alias} から返信",waiting:"{alias} が確認待ち",expired:"{alias} への委任が返信のないまま期限切れ"}};function n(a,b,c,d={}){let e=m[a][b].replace("{alias}",c),f=[];return d.overlap&&f.push(`overlap=${d.overlap}`),d.holdReason&&f.push(`hold=${d.holdReason}`),0===f.length?e:`${e} (${f.join(", ")})`}},10168:(a,b,c)=>{c.d(b,{BR:()=>j,Vg:()=>i,YT:()=>h});var d=c(55511),e=c(24455),f=c(91631),g=c(36925);function h(){return(0,g.v)("__relayServerBootId",()=>(0,d.randomUUID)())}function i(a,b,c){let d=(0,f.Ev)((0,e.v7)(a,b,c));return`${h()}#${d??"-"}`}function j(a){if(null===a)return null;let b=a.lastIndexOf("#");return b<=0?null:a.slice(0,b)}},14887:(a,b,c)=>{c.d(b,{E6:()=>j,yk:()=>i});var d=c(55511),e=c(
|
|
4
|
+
${e.options} ${k}${l}`}let k={en:"The reply you were waiting for did not arrive within {hours}h; the relay has expired.",ja:"待っていた返信が {hours} 時間以内に届かなかったため、委任は期限切れになりました。"};function l(a,b,c){let e=Math.max(1,Math.round(c/36e5));return`${d(b)} ${k[a].replace("{hours}",String(e))}`}let m={en:{requested:"Delegated to {alias}; waiting for the reply.",replied:"Reply from {alias}.",waiting:"{alias} is waiting for a confirmation.",expired:"The delegation to {alias} expired without a reply.",held:"Could not confirm that the relay from {alias} reached this session; it will not be resent automatically. Check this pane, then settle it with commandmate relays resolve.","reply-discarded":"The reply from {alias} that waited behind the settled confirmation notice was discarded: the delegation had already closed, so it is not delivered."},ja:{requested:"{alias} へ委任、返信待ち",replied:"{alias} から返信",waiting:"{alias} が確認待ち",expired:"{alias} への委任が返信のないまま期限切れ",held:"{alias} からの relay がこのセッションへ届いたか確認できません(自動では再送しません)。この画面を確かめてから commandmate relays resolve で片付けてください","reply-discarded":"片付けた確認の通知の後ろで待っていた {alias} の返信は、委任が既に閉じていたため破棄しました(配送しません)"}};function n(a,b,c,d={}){let e=m[a][b].replace("{alias}",c),f=[];return d.overlap&&f.push(`overlap=${d.overlap}`),d.holdReason&&f.push(`hold=${d.holdReason}`),d.relayId&&f.push(`relay=${d.relayId}`),d.payload&&f.push(`payload=${d.payload}`),d.attemptId&&f.push(`attempt=${d.attemptId}`),d.deliveryReason&&f.push(`reason=${d.deliveryReason}`),0===f.length?e:`${e} (${f.join(", ")})`}},10168:(a,b,c)=>{c.d(b,{BR:()=>j,Vg:()=>i,YT:()=>h});var d=c(55511),e=c(24455),f=c(91631),g=c(36925);function h(){return(0,g.v)("__relayServerBootId",()=>(0,d.randomUUID)())}function i(a,b,c){let d=(0,f.Ev)((0,e.v7)(a,b,c));return`${h()}#${d??"-"}`}function j(a){if(null===a)return null;let b=a.lastIndexOf("#");return b<=0?null:a.slice(0,b)}},14887:(a,b,c)=>{c.d(b,{E6:()=>j,yk:()=>i});var d=c(55511),e=c(5350),f=c(10168);let g=(0,c(72626).h)("relay-bind"),h=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,i={sendUnknown:"send_unknown",dispatchUnknown:"dispatch_unknown",generationChanged:"generation_changed",noInputBoundary:"no_input_boundary",serverRestarted:"server_restarted",serverRestartedBeforeInput:"server_restarted_before_input"};function j(a,b,c=Date.now()){if(!h.test(b.relayId))return{ok:!1,refusal:{status:400,code:"RELAY_BIND_INVALID",message:"relayId must be a relay id"}};let i=(0,d.randomUUID)();try{if(!(0,e.ZR)(a,{relayId:b.relayId,attemptId:i,owner:(0,f.YT)(),worktreeId:b.worktreeId,instanceId:b.instanceId,now:c}))return{ok:!1,refusal:(0,e.C$)(a,b.relayId,b.worktreeId,b.instanceId,c)}}catch(a){return g.warn("relay-bind-reserve-failed",{relayId:b.relayId,error:a instanceof Error?a.message:String(a)}),{ok:!1,refusal:{status:500,code:"RELAY_BIND_FAILED",message:"Failed to reserve the relay"}}}return g.info("relay-bind-reserved",{relayId:b.relayId,attemptId:i}),{ok:!0,binding:new k(a,b,i)}}class k{constructor(a,b,c){this.db=a,this.target=b,this.attemptId=c,this.generationBefore=null,this.boundaryWritten=!1,this.observationInvalid=!1,this.refused=!1,this.dispatch="none",this.retryDispatchOpen=!1}get relayId(){return this.target.relayId}begin(a){this.generationBefore=a}hooks(){return{beforeInput:(a,b)=>this.beforeInput(a,b),onDispatchFailed:a=>this.onDispatchFailed(a)}}beforeInput(a,b){let c;if("unknown"===this.dispatch){"dispatch"===b&&(this.retryDispatchOpen=!0);return}let d=this.target.readTurn(),g=d.generation===this.generationBefore,h=g?this.target.hooksReportTurns?"valid":"turn_unknown":"invalid",i=this.target.hooksReportTurns&&g?d.open:null;try{c=(0,e.bT)(this.db,{relayId:this.target.relayId,attemptId:this.attemptId,at:a.getTime(),kind:b,turnOpenAtSend:i,obsState:h,obsSource:(0,f.Vg)(this.target.worktreeId,this.target.cliToolId,this.target.instanceId),replaceDispatch:"not_sent"===this.dispatch})}catch(a){throw this.refused=!0,a}if(!c)throw this.refused=!0,Error(`relay ${this.target.relayId} is no longer reserved for this send`);this.boundaryWritten=!0,this.observationInvalid="invalid"===h,"dispatch"===b&&(this.dispatch="pending")}onDispatchFailed(a){if("unknown"===this.dispatch){this.retryDispatchOpen=!1;return}if("not_sent"===a){this.dispatch="not_sent";return}this.dispatch="unknown",(0,e.ky)(this.db,{relayId:this.target.relayId,attemptId:this.attemptId,from:["input_started"],to:"unknown",holdReason:i.dispatchUnknown})}finish(a){try{return this.settle(a)}catch(b){return g.warn("relay-bind-settle-failed",{relayId:this.target.relayId,error:b instanceof Error?b.message:String(b)}),"sent"===a.kind?"sent":"unknown"}}settle(a){let b={relayId:this.target.relayId,attemptId:this.attemptId};if("unknown"===this.dispatch){if("sent"===a.kind&&this.retryDispatchOpen){let c=this.observationInvalid||a.generationAfter!==this.generationBefore;return(0,e.ky)(this.db,{...b,from:["unknown"],to:"sent",inputMessageId:a.messageId,...c?{holdReason:i.generationChanged,invalidateObservation:!0}:{clearHoldReason:!0}}),"sent"}return"unknown"}if("sent"===a.kind){if(!this.boundaryWritten)return(0,e.ky)(this.db,{...b,from:["awaiting"],to:"unknown",holdReason:i.noInputBoundary}),"unknown";let c=this.observationInvalid||a.generationAfter!==this.generationBefore;return(0,e.ky)(this.db,{...b,from:["input_started"],to:"sent",inputMessageId:a.messageId,holdReason:c?i.generationChanged:null,invalidateObservation:c}),"sent"}return"sent"===a.attempt?((0,e.ky)(this.db,{...b,from:["awaiting","input_started"],to:"unknown",holdReason:i.sendUnknown}),"unknown"):!this.boundaryWritten||this.refused||"not-sent"===a.attempt?((0,e.ky)(this.db,{...b,from:["awaiting","input_started"],to:"failed"}),"not_sent"):((0,e.ky)(this.db,{...b,from:["input_started"],to:"unknown",holdReason:i.sendUnknown}),"unknown")}}},49798:(a,b,c)=>{c.d(b,{S:()=>h,r:()=>i});var d=c(28274),e=c(73753),f=c(83530);let g=(0,c(72626).h)("relay-session-ref");function h(a,b){let c="claude",e=b.instanceId;try{c=(0,f.iK)(a,b.worktreeId,{instanceId:b.instanceId}).cliToolId;let g=(0,d.BN)(a,b.worktreeId,b.instanceId);g?.alias&&(e=g.alias)}catch(a){g.warn("relay-session-resolve-failed",{worktreeId:b.worktreeId,instanceId:b.instanceId,error:a instanceof Error?a.message:String(a)})}return{worktreeId:b.worktreeId,instanceId:b.instanceId,cliToolId:c,alias:e}}function i(a,b){try{return null!==(0,e.getWorktreeById)(a,b)}catch{return!1}}},53801:(a,b,c)=>{c.d(b,{xK:()=>W,notifyRelayPromptWaiting:()=>_,notifyRelayTurnCompleted:()=>$,Ph:()=>ae,runRelayMaintenanceTick:()=>af});var d=c(55511),e=c(88807),f=c(5350),g=c(52660),h=c(55233),i=c(39687),j=c(640),k=c(10168),l=c(81254),m=c(14887),n=c(18201),o=c(36261),p=c(30008),q=c(70096),r=c(49798),s=c(85016),t=c(25539),u=c(72626);let v=(0,u.h)("relay-delivery"),w=/-turn:/,x=[g.RELAY_SYSTEM_REQUEST_ID_PREFIX,g.MODEL_CHANGE_REQUEST_ID_PREFIX],y={claude:!0,codex:!0,antigravity:!0,"command-code":!0,opencode:!0,copilot:!1,gemini:!1,"vibe-local":!1,"opencode-v2":!0};function z(a,b){let c=(0,r.S)(a,b.to);return{alias:c.alias,worktreeId:c.worktreeId}}function A(a){return!0===y[a]}function B(a,b,c){let d=(0,g.getMessages)(a,b.worktreeId,{limit:40,cliToolId:b.cliToolId,instanceId:b.instanceId,matchResolvedInstance:!0}),e=A(b.cliToolId);for(let a of d){var f;if(!("assistant"!==a.role||"prompt"===a.messageType||function(a){return"string"==typeof a&&x.some(b=>a.startsWith(b))}(a.requestId))){if((!e||"string"==typeof(f=a.requestId)&&w.test(f))&&""!==a.content.trim())return a.timestamp.getTime()<c?null:a}}return null}function C(a,b,c){let d=(0,f.ix)(a,{worktreeId:b.worktreeId,instanceId:b.instanceId});if(0===d.length)return 0;let e=0;for(let g of d){if("bound"===g.bindMode){(function(a,b,c,d){if("awaiting"===c.sendState||"input_started"===c.sendState){for(let e of F(a,b,c.inputBoundaryAt??c.createdAt))(0,f.EG)(a,c.id,{messageId:e.row.id,timestamp:e.orderAt,requestId:e.row.requestId??null},d);return!1}if("sent"!==c.sendState||null===c.inputBoundaryAt)return!1;let e=(0,f.TN)(a,c.id);if(!e||!E(a,b,e))return!1;let[g]=F(a,b,c.inputBoundaryAt);return!!g&&G(a,b,e,g.row,d)})(a,b,g,c)&&(e+=1);continue}let d=B(a,b,g.createdAt);if(!d)continue;let h=(0,j.z0)(z(a,g),d.content);null!==D(a,g.id,{candidateId:d.id,body:h,overlap:null,basis:"legacy"},c)&&(e+=1)}return e}function D(a,b,c,e){let g={...c,payloadId:(0,d.randomUUID)()};if((0,f.be)(a,b,"reply",g.body,e,{payloadId:g.payloadId,overlap:g.overlap??void 0}))return"stashed";let h=(0,f.V9)(a,b);if(!h||"prompt"!==h.kind)return null;if(!(0,s.p5)(b)){let d=(0,f.Iq)(a,b,h.payloadId,g,e);if("reply"===d)return"stashed";if("waiting-reply"===d)return v.info("relay-earlier-reply-kept",{relayId:b,laterCandidateId:c.candidateId}),"earlier-reply"}return(0,f.nR)(a,b,g,e)?"stashed":null}function E(a,b,c){if("invalid"===c.relay.obsState)return!1;let d=(0,k.Vg)(b.worktreeId,b.cliToolId,b.instanceId);if(c.obsSource===d)return!0;let e=(0,k.BR)(c.obsSource)!==(0,k.YT)();return(0,f.FO)(a,c.relay.id,e?m.yk.serverRestarted:m.yk.generationChanged,{invalidate:!0}),v.info("relay-observation-mismatch",{relayId:c.relay.id,restarted:e}),!1}function F(a,b,c){let d=A(b.cliToolId),e=x.map(()=>"request_id NOT LIKE ?").join(" AND "),f=a.prepare(`
|
|
5
5
|
SELECT id, request_id, timestamp FROM chat_messages
|
|
6
|
-
WHERE worktree_id = ? ${
|
|
6
|
+
WHERE worktree_id = ? ${g.ACTIVE_FILTER}
|
|
7
7
|
AND COALESCE(cli_tool_id, 'claude') = ?
|
|
8
8
|
AND COALESCE(instance_id, cli_tool_id, 'claude') = ?
|
|
9
9
|
AND role = 'assistant' AND COALESCE(message_type, 'normal') != 'prompt'
|
|
@@ -13,19 +13,19 @@ ${e.options} ${k}${l}`}let k={en:"The reply you were waiting for did not arrive
|
|
|
13
13
|
AND timestamp >= ?
|
|
14
14
|
ORDER BY timestamp ASC, rowid ASC
|
|
15
15
|
LIMIT ?
|
|
16
|
-
`).all(b.worktreeId,b.cliToolId,b.instanceId,...x.map(a=>`${a}%`),c,500),h=[],i=new Set;for(let c of
|
|
16
|
+
`).all(b.worktreeId,b.cliToolId,b.instanceId,...x.map(a=>`${a}%`),c,500),h=[],i=new Set;for(let c of f){if(null!==c.request_id){if(i.has(c.request_id))continue;i.add(c.request_id);let d=function(a,b,c){let d=a.prepare(`
|
|
17
17
|
SELECT id FROM chat_messages
|
|
18
|
-
WHERE worktree_id = ? ${
|
|
18
|
+
WHERE worktree_id = ? ${g.ACTIVE_FILTER}
|
|
19
19
|
AND COALESCE(cli_tool_id, 'claude') = ?
|
|
20
20
|
AND COALESCE(instance_id, cli_tool_id, 'claude') = ?
|
|
21
21
|
AND role = 'assistant' AND request_id = ?
|
|
22
22
|
AND TRIM(content, ' ' || char(9, 10, 13)) != ''
|
|
23
23
|
ORDER BY timestamp DESC, rowid DESC
|
|
24
24
|
LIMIT 1
|
|
25
|
-
`).get(b.worktreeId,b.cliToolId,b.instanceId,c);return d?(0,
|
|
25
|
+
`).get(b.worktreeId,b.cliToolId,b.instanceId,c);return d?(0,g.getMessageById)(a,d.id):null}(a,b,c.request_id);d&&h.push({row:d,orderAt:c.timestamp});continue}let d=(0,g.getMessageById)(a,c.id);d&&h.push({row:d,orderAt:c.timestamp})}return h}function G(a,b,c,d,e){let f=function(a,b,c,d){let{relay:e}=b,f=!0===e.turnOpenAtSend,h=!1===e.turnOpenAtSend&&"valid"===e.obsState,i=function(a,b,c,d){let e=b.relay.inputBoundaryAt;if(null===e)return"ambiguous";let f=a.prepare("SELECT rowid AS seq FROM chat_messages WHERE id = ?").get(d.id);if(!f)return"ambiguous";let h=a.prepare(`
|
|
26
26
|
SELECT id, content, rowid AS seq FROM chat_messages
|
|
27
|
-
WHERE worktree_id = ? AND role = 'user' ${
|
|
27
|
+
WHERE worktree_id = ? AND role = 'user' ${g.ACTIVE_FILTER}
|
|
28
28
|
AND COALESCE(cli_tool_id, 'claude') = ?
|
|
29
29
|
AND COALESCE(instance_id, cli_tool_id, 'claude') = ?
|
|
30
30
|
AND timestamp >= ? AND timestamp < ?
|
|
31
|
-
`).all(c.worktreeId,c.cliToolId,c.instanceId,e,d.timestamp.getTime()),i=b.inputMessageId?(0,f.getMessageById)(a,b.inputMessageId):null,j=i?(0,n.pk)(i.content):null,k=!1;for(let a of h)if(a.id!==b.inputMessageId){if(null===j||(0,n.pk)(a.content)===j||a.seq>g.seq){k=!0;continue}return"proven"}return k?"ambiguous":"none"}(a,b,c,d);return g&&"proven"===i?{overlap:"both",basis:"turn-open-at-send+foreign-input"}:g?{overlap:"later",basis:"turn-open-at-send"}:"proven"===i?{overlap:"earlier",basis:"foreign-input"}:h&&"none"===i?{overlap:"none",basis:"no-open-turn+no-other-input"}:{overlap:"unknown",basis:h?"other-input-unproven":"turn-state-unknown"}}(a,c,b,d),j=(0,i.Py)((0,g.dV)(a),h.overlap),k=(0,i.z0)(z(a,c.relay),d.content,j),l=D(a,c.relay.id,{candidateId:d.id,body:k,overlap:h.overlap,basis:h.basis},e);return l&&v.info("relay-reply-decided",{relayId:c.relay.id,candidateId:d.id,overlap:h.overlap,basis:h.basis}),l}function H(a,b,c,d){if(!function(a,b,c,d){if("bound"!==c.bindMode)return!0;if("sent"!==c.sendState||null===c.inputBoundaryAt||d.timestamp.getTime()<c.inputBoundaryAt)return!1;let f=(0,e.TN)(a,c.id);return null!==f&&E(a,b,f)}(a,b,c,d)||(0,e.GC)(a,c.id)===d.id)return!1;let f=(0,g.dV)(a),h=function(a){let b=a.promptData;return(0,l.XF)(b)?"yes_no"===b.type?b.options.map(a=>({key:a,label:a})):b.options.map(a=>({key:String(a.number),label:a.label})):[]}(d),j=(0,l.XF)(d.promptData)?d.promptData.question:d.promptData?.question??d.content,k=(0,i.Hr)(f,z(a,c),{question:j,options:h});return!!(0,e.be)(a,c.id,"prompt",k)&&((0,e.UC)(a,c.id,d.id),!0)}var I=c(23854),J=c(8360),K=c(40964),L=c(34331),M=c(31990),N=c(95595),O=c(64501),P=c(34405);let Q=(0,u.h)("relay-readiness");async function R(a,b,c,d){try{let e=(0,K.mf)(b,a,c),f=await (0,L.L)(a,e,d);if(null===f||"foreign"===f.verdict)return"foreign_session";if("absent"===f.verdict)return"session_stopped";let g=J.CLIToolManager.getInstance().getTool(b);if(!await g.isRunning(a,c))return"session_stopped";let h=await (0,M.Wh)(a,b,P._,c);if((0,O.NV)(a,b,c,h))return"generating";let i=(0,N.WC)(h,b);return"running"===i.status?"generating":null}catch(d){return Q.warn("relay-readiness-check-failed",{worktreeId:a,cliToolId:b,instanceId:c,error:d instanceof Error?d.message:String(d)}),null}}var S=c(67164),T=c(36925);let U=(0,u.h)("relay-delivery"),V=(0,T.v)("__relayDeliveryInFlight",()=>new Set);function W(a){try{let b=(0,d.getDbInstance)(),c=(0,e.TN)(b,a);if(!c)return;let{relay:g}=c;if("sent"!==g.sendState||!(0,t.Lo)(g.state)||null===g.inputBoundaryAt)return;let h=(0,r.S)(b,g.to),i={worktreeId:h.worktreeId,cliToolId:h.cliToolId,instanceId:h.instanceId},j=g.inputBoundaryAt,k=Date.now(),l=b.transaction(()=>{if((0,e.UA)(b,a),!E(b,i,c))return!1;let[d]=F(b,i,j);return!!d&&G(b,i,c,d.row,k)})(),m=!l&&function(a,b,c){let d=(0,o.Jp)(b.worktreeId,b.cliToolId,b.instanceId);if(!d||"prompt"!==d.kind||(0,p.yg)(b.worktreeId,b.cliToolId,b.instanceId,(0,q.VM)(b.cliToolId).capabilities.eventIdentity))return!1;let g=(0,f.getLatestOpenPromptMessage)(a,b.worktreeId,b.cliToolId,b.instanceId);if(!g)return!1;let h=(0,e.Ip)(a,c);return!!h&&!!(0,t.Lo)(h.state)&&H(a,b,h,g)}(b,i,a);(l||m)&&ab()}catch(b){U.warn("relay-after-send-failed",{relayId:a,error:b instanceof Error?b.message:String(b)})}}function X(a){let b=(0,j.YT)();if(globalThis.__relayRecoveredBootId!==b){globalThis.__relayRecoveredBootId=b;try{!function(a,b=Date.now()){let c=(0,j.YT)(),d=0;for(let f of(0,e.hA)(a)){let{relay:g}=f;if("awaiting"===g.sendState){if(null===f.bindAttemptId||f.bindOwner===c)continue;(0,e.Yt)(a,g.id,f.bindAttemptId,m.yk.serverRestartedBeforeInput,b)&&(d+=1);continue}if("input_started"===g.sendState){if(f.bindOwner===c||null===f.bindAttemptId)continue;(0,e.ky)(a,{relayId:g.id,attemptId:f.bindAttemptId,from:["input_started"],to:"unknown",holdReason:m.yk.serverRestarted,now:b})&&(d+=1);continue}if("sent"===g.sendState){if(null!==f.pendingKind)continue;if(null!==f.pendingReply){(0,e.jn)(a,g.id,b)&&(d+=1);continue}if((0,j.BR)(f.obsSource)===c||"invalid"===g.obsState)continue;(0,e.FO)(a,g.id,m.yk.serverRestarted,{invalidate:!0,now:b}),d+=1}}d>0&&v.info("relay-bound-recovered",{recovered:d})}(a)}catch(a){U.warn("relay-recovery-failed",{error:a instanceof Error?a.message:String(a)})}}}function Y(a){return new Promise(b=>{setTimeout(b,a)})}async function Z(a,b){let c=Date.now()+15e3;for(;;){if(C(a,b,Date.now())>0)return void ab();if(Date.now()>=c)break;await Y(1e3)}U.info("relay-scrape-row-not-transcript-backed",{worktreeId:b.worktreeId,cliToolId:b.cliToolId,instanceId:b.instanceId,graceMs:15e3})}async function $(a,b){try{let c=(0,d.getDbInstance)(),f=(0,e.ix)(c,{worktreeId:a.worktreeId,instanceId:a.instanceId});if(0===f.length)return;if(b.settled){C(c,a,Date.now())>0&&ab();return}if(A(a.cliToolId))return void await Z(c,a);let g=null;for(let b=0;b<3;b+=1){let b=B(c,a,0);g=b?.id??null,await Y(I.DZ);let d=B(c,a,0);if((d?.id??null)===g){C(c,a,Date.now())>0&&ab();return}}U.info("relay-scrape-never-settled",{worktreeId:a.worktreeId,instanceId:a.instanceId,attempts:3})}catch(b){U.warn("relay-turn-completed-failed",{worktreeId:a.worktreeId,instanceId:a.instanceId,error:b instanceof Error?b.message:String(b)})}}function _(a){try{let b=(0,d.getDbInstance)(),c=(0,e.ix)(b,{worktreeId:a.worktreeId,instanceId:a.instanceId});if(0===c.length)return;let g=(0,f.getLatestOpenPromptMessage)(b,a.worktreeId,a.cliToolId,a.instanceId);if(!g)return;let h=0;for(let d of c)H(b,a,d,g)&&(h+=1);h>0&&ab()}catch(b){U.warn("relay-prompt-notify-failed",{worktreeId:a.worktreeId,instanceId:a.instanceId,error:b instanceof Error?b.message:String(b)})}}async function aa(a,b,c,d){let g=(0,e.Ip)(a,b);if(!g)return"skipped";let i=(0,r.S)(a,g.from),j=await R(i.worktreeId,i.cliToolId,i.instanceId,a);if(j)return U.debug("relay-delivery-held",{relayId:b,kind:c,reason:j}),"held";let k=(0,e.V9)(a,b);if(!k||k.kind!==c||k.body!==d)return U.info("relay-delivery-superseded",{relayId:b,kind:c}),"skipped";if("expired"!==c&&!(0,t.Lo)(k.relay.state))return U.info("relay-delivery-closed",{relayId:b,kind:c,state:k.relay.state}),"skipped";let l=k.relay,m=(0,r.S)(a,l.from);(0,s.o5)(b);let n=!1;try{let g=await (0,h.d)(a,{worktreeId:m.worktreeId,content:d,cliToolId:m.cliToolId,instanceId:m.instanceId,messageType:"relay",requestId:"reply"===c?(0,f.relayRequestId)(l.id):void 0});if(!g.ok)return U.info("relay-delivery-refused",{relayId:b,kind:c,stage:g.stage}),"prompt_waiting"===g.stage?"held":"failed";let i=Date.now();return"reply"===c?((0,e.Bf)(a,l.id,(0,f.relayRequestId)(l.id),i)||U.info("relay-already-closed-on-deliver",{relayId:b}),(0,S._)(a,l.id,"replied",m,(0,r.S)(a,l.to),i,{overlap:l.overlap,holdReason:l.holdReason})):"prompt"===c&&(0,S._)(a,l.id,"waiting",m,(0,r.S)(a,l.to),i),(0,e.uJ)(a,l.id,i,k.payloadId),"prompt"===c&&(0,e.jn)(a,l.id,i)&&(globalThis.__relayPumpAgain=!0),U.info("relay-delivered",{relayId:b,kind:c,to:`${m.worktreeId}/${m.instanceId}`}),n=!0,"delivered"}finally{if(!n&&"prompt"===c)try{(0,e.T)(a,l.id,k.payloadId)&&(U.info("relay-prompt-superseded-after-failed-delivery",{relayId:b}),globalThis.__relayPumpAgain=!0)}catch(a){U.warn("relay-prompt-supersede-failed",{relayId:b,error:a instanceof Error?a.message:String(a)})}(0,s.dJ)(b)}}async function ab(){if(!globalThis.__relayPumpRunning){globalThis.__relayPumpRunning=!0;try{let a=(0,d.getDbInstance)();X(a);for(let b=0;b<3;b+=1){for(let b of(globalThis.__relayPumpAgain=!1,(0,e.uG)(a)))if(!V.has(b.relay.id)){V.add(b.relay.id);try{await aa(a,b.relay.id,b.kind,b.body)}catch(a){U.warn("relay-delivery-failed",{relayId:b.relay.id,error:a instanceof Error?a.message:String(a)})}finally{V.delete(b.relay.id)}}if(!globalThis.__relayPumpAgain)break}}catch(a){U.warn("relay-pump-failed",{error:a instanceof Error?a.message:String(a)})}finally{globalThis.__relayPumpRunning=!1}}}async function ac(){try{X((0,d.getDbInstance)()),function(a,b=Date.now()){for(let c of(0,e.s7)(a,b))if(!(0,s.p5)(c.id))try{let d=(0,g.dV)(a);(0,e.uJ)(a,c.id,b),(0,e.wE)(a,c.id,b);let f=(0,i.KA)(d,z(a,c),c.expiresAt-c.createdAt),h=(0,e.be)(a,c.id,"expired",f,b);if(!(0,e.Cz)(a,c.id,b)){h&&(0,e.uJ)(a,c.id,b);continue}(0,S._)(a,c.id,"expired",(0,r.S)(a,c.from),(0,r.S)(a,c.to),b)}catch(a){U.warn("relay-expire-failed",{relayId:c.id,error:a instanceof Error?a.message:String(a)})}}((0,d.getDbInstance)())}catch(a){U.warn("relay-sweep-failed",{error:a instanceof Error?a.message:String(a)})}await ab()}},67164:(a,b,c)=>{c.d(b,{_:()=>i});var d=c(52660),e=c(55233),f=c(43015),g=c(640);let h=(0,c(72626).h)("relay-system-line");function i(a,b,c,j,k,l=Date.now(),m={}){let n=`${d.RELAY_SYSTEM_REQUEST_ID_PREFIX}${b}:${c}`;try{if((0,d.findMessageByRequestId)(a,j.worktreeId,n))return!1;let i=(0,e.dV)(a),o=(0,d.createRelaySystemMessage)(a,{worktreeId:j.worktreeId,cliToolId:j.cliToolId,instanceId:j.instanceId,content:(0,g.Nl)(i,c,k.alias,m),relayId:b,kind:c,at:l});try{(0,f.broadcastMessage)("message",{worktreeId:j.worktreeId,message:{...o,cliToolId:j.cliToolId,instanceId:j.instanceId}})}catch(a){h.warn("relay-system-line-broadcast-failed",{relayId:b,kind:c,error:a instanceof Error?a.message:String(a)})}return!0}catch(a){return h.warn("relay-system-line-failed",{relayId:b,kind:c,error:a instanceof Error?a.message:String(a)}),!1}}},85016:(a,b,c)=>{c.d(b,{dJ:()=>f,o5:()=>e,p5:()=>g});let d=(0,c(36925).v)("__relayDeliveryClaims",()=>new Set);function e(a){d.add(a)}function f(a){d.delete(a)}function g(a){return d.has(a)}}};
|
|
31
|
+
`).all(c.worktreeId,c.cliToolId,c.instanceId,e,d.timestamp.getTime()),i=b.inputMessageId?(0,g.getMessageById)(a,b.inputMessageId):null,j=i?(0,n.pk)(i.content):null,k=!1;for(let a of h)if(a.id!==b.inputMessageId){if(null===j||(0,n.pk)(a.content)===j||a.seq>f.seq){k=!0;continue}return"proven"}return k?"ambiguous":"none"}(a,b,c,d);return f&&"proven"===i?{overlap:"both",basis:"turn-open-at-send+foreign-input"}:f?{overlap:"later",basis:"turn-open-at-send"}:"proven"===i?{overlap:"earlier",basis:"foreign-input"}:h&&"none"===i?{overlap:"none",basis:"no-open-turn+no-other-input"}:{overlap:"unknown",basis:h?"other-input-unproven":"turn-state-unknown"}}(a,c,b,d),i=(0,j.Py)((0,h.dV)(a),f.overlap),k=(0,j.z0)(z(a,c.relay),d.content,i),l=D(a,c.relay.id,{candidateId:d.id,body:k,overlap:f.overlap,basis:f.basis},e);return"stashed"===l&&v.info("relay-reply-decided",{relayId:c.relay.id,candidateId:d.id,overlap:f.overlap,basis:f.basis}),null!==l}function H(a,b,c,d){if(!function(a,b,c,d){if("bound"!==c.bindMode)return!0;if("sent"!==c.sendState||null===c.inputBoundaryAt||d.timestamp.getTime()<c.inputBoundaryAt)return!1;let e=(0,f.TN)(a,c.id);return null!==e&&E(a,b,e)}(a,b,c,d)||(0,f.GC)(a,c.id)===d.id)return!1;let e=(0,h.dV)(a),g=function(a){let b=a.promptData;return(0,l.XF)(b)?"yes_no"===b.type?b.options.map(a=>({key:a,label:a})):b.options.map(a=>({key:String(a.number),label:a.label})):[]}(d),i=(0,l.XF)(d.promptData)?d.promptData.question:d.promptData?.question??d.content,k=(0,j.Hr)(e,z(a,c),{question:i,options:g});return!!(0,f.be)(a,c.id,"prompt",k)&&((0,f.UC)(a,c.id,d.id),!0)}var I=c(23854),J=c(12693),K=c(40964),L=c(34331),M=c(31990),N=c(95595),O=c(64501),P=c(34405);let Q=(0,u.h)("relay-readiness");async function R(a,b,c,d){try{let e=(0,K.mf)(b,a,c),f=await (0,L.L)(a,e,d);if(null===f||"foreign"===f.verdict)return"foreign_session";if("absent"===f.verdict)return"session_stopped";let g=J.CLIToolManager.getInstance().getTool(b);if(!await g.isRunning(a,c))return"session_stopped";let h=await (0,M.Wh)(a,b,P._,c);if((0,O.NV)(a,b,c,h))return"generating";let i=(0,N.WC)(h,b);return"running"===i.status?"generating":null}catch(d){return Q.warn("relay-readiness-check-failed",{worktreeId:a,cliToolId:b,instanceId:c,error:d instanceof Error?d.message:String(d)}),null}}var S=c(67164),T=c(36925);let U=(0,u.h)("relay-delivery"),V=(0,T.v)("__relayDeliveryInFlight",()=>new Set);function W(a){try{let b=(0,e.getDbInstance)(),c=(0,f.TN)(b,a);if(!c)return;let{relay:d}=c;if("sent"!==d.sendState||!(0,t.Lo)(d.state)||null===d.inputBoundaryAt)return;let h=(0,r.S)(b,d.to),i={worktreeId:h.worktreeId,cliToolId:h.cliToolId,instanceId:h.instanceId},j=d.inputBoundaryAt,k=Date.now(),l=b.transaction(()=>{if((0,f.UA)(b,a),!E(b,i,c))return!1;let[d]=F(b,i,j);return!!d&&G(b,i,c,d.row,k)})(),m=!l&&function(a,b,c){let d=(0,o.Jp)(b.worktreeId,b.cliToolId,b.instanceId);if(!d||"prompt"!==d.kind||(0,p.yg)(b.worktreeId,b.cliToolId,b.instanceId,(0,q.VM)(b.cliToolId).capabilities.eventIdentity))return!1;let e=(0,g.getLatestOpenPromptMessage)(a,b.worktreeId,b.cliToolId,b.instanceId);if(!e)return!1;let h=(0,f.Ip)(a,c);return!!h&&!!(0,t.Lo)(h.state)&&H(a,b,h,e)}(b,i,a);(l||m)&&ad()}catch(b){U.warn("relay-after-send-failed",{relayId:a,error:b instanceof Error?b.message:String(b)})}}function X(a){let b=(0,k.YT)();if(globalThis.__relayAttemptsRecoveredBootId!==b)try{let c=(0,f.Yu)(a,b);for(let d of(globalThis.__relayAttemptsRecoveredBootId=b,c.length>0&&U.info("relay-interrupted-deliveries-held",{held:c.length}),c)){let b=(0,f.Ip)(a,d.relayId);b&&ac(a,b,(0,r.S)(a,b.from),d,b.deliveryHold?.kind??null,f.eH)}}catch(a){U.warn("relay-delivery-recovery-failed",{error:a instanceof Error?a.message:String(a)})}if(globalThis.__relayRecoveredBootId!==b){globalThis.__relayRecoveredBootId=b;try{!function(a,b=Date.now()){let c=(0,k.YT)(),d=0;for(let e of(0,f.hA)(a)){let{relay:g}=e;if("awaiting"===g.sendState){if(null===e.bindAttemptId||e.bindOwner===c)continue;(0,f.Yt)(a,g.id,e.bindAttemptId,m.yk.serverRestartedBeforeInput,b)&&(d+=1);continue}if("input_started"===g.sendState){if(e.bindOwner===c||null===e.bindAttemptId)continue;(0,f.ky)(a,{relayId:g.id,attemptId:e.bindAttemptId,from:["input_started"],to:"unknown",holdReason:m.yk.serverRestarted,now:b})&&(d+=1);continue}if("sent"===g.sendState){if(null!==e.pendingKind)continue;if(null!==e.pendingReply){(0,f.jn)(a,g.id,b)&&(d+=1);continue}if((0,k.BR)(e.obsSource)===c||"invalid"===g.obsState)continue;(0,f.FO)(a,g.id,m.yk.serverRestarted,{invalidate:!0,now:b}),d+=1}}d>0&&v.info("relay-bound-recovered",{recovered:d})}(a)}catch(a){U.warn("relay-recovery-failed",{error:a instanceof Error?a.message:String(a)})}}}function Y(a){return new Promise(b=>{setTimeout(b,a)})}async function Z(a,b){let c=Date.now()+15e3;for(;;){if(C(a,b,Date.now())>0)return void ad();if(Date.now()>=c)break;await Y(1e3)}U.info("relay-scrape-row-not-transcript-backed",{worktreeId:b.worktreeId,cliToolId:b.cliToolId,instanceId:b.instanceId,graceMs:15e3})}async function $(a,b){try{let c=(0,e.getDbInstance)(),d=(0,f.ix)(c,{worktreeId:a.worktreeId,instanceId:a.instanceId});if(0===d.length)return;if(b.settled){C(c,a,Date.now())>0&&ad();return}if(A(a.cliToolId))return void await Z(c,a);let g=null;for(let b=0;b<3;b+=1){let b=B(c,a,0);g=b?.id??null,await Y(I.DZ);let d=B(c,a,0);if((d?.id??null)===g){C(c,a,Date.now())>0&&ad();return}}U.info("relay-scrape-never-settled",{worktreeId:a.worktreeId,instanceId:a.instanceId,attempts:3})}catch(b){U.warn("relay-turn-completed-failed",{worktreeId:a.worktreeId,instanceId:a.instanceId,error:b instanceof Error?b.message:String(b)})}}function _(a){try{let b=(0,e.getDbInstance)(),c=(0,f.ix)(b,{worktreeId:a.worktreeId,instanceId:a.instanceId});if(0===c.length)return;let d=(0,g.getLatestOpenPromptMessage)(b,a.worktreeId,a.cliToolId,a.instanceId);if(!d)return;let h=0;for(let e of c)H(b,a,e,d)&&(h+=1);h>0&&ad()}catch(b){U.warn("relay-prompt-notify-failed",{worktreeId:a.worktreeId,instanceId:a.instanceId,error:b instanceof Error?b.message:String(b)})}}async function aa(a,b,c,e,h){let j,l=(0,f.Ip)(a,b);if(!l)return"skipped";let m=(0,r.S)(a,l.from),n=await R(m.worktreeId,m.cliToolId,m.instanceId,a);if(n)return U.debug("relay-delivery-held",{relayId:b,kind:c,reason:n}),"held";let o=function(a,b,c,d,e){let g=(0,f.V9)(a,b);return g&&g.kind===c&&g.body===d&&g.payloadId===e?"expired"===c||(0,t.Lo)(g.relay.state)?g:(U.info("relay-delivery-closed",{relayId:b,kind:c,state:g.relay.state}),null):(U.info("relay-delivery-superseded",{relayId:b,kind:c}),null)}(a,b,c,e,h);if(!o)return"skipped";let p=o.relay,q=(0,r.S)(a,p.from),u=(0,d.randomUUID)();try{j=(0,f.ud)(a,{relayId:b,payloadId:o.payloadId,kind:c,body:e,attemptId:u,owner:(0,k.YT)(),mintPayloadId:(0,d.randomUUID)()})}catch(a){return U.warn("relay-delivery-claim-failed",{relayId:b,kind:c,error:a instanceof Error?a.message:String(a)}),"failed"}if(null===j)return U.info("relay-delivery-taken",{relayId:b,kind:c}),"skipped";let v={relayId:b,payloadId:j,attemptId:u};(0,s.o5)(b);let w=!1;try{let d,h=null;try{d=await (0,i.d)(a,{worktreeId:q.worktreeId,content:e,cliToolId:q.cliToolId,instanceId:q.instanceId,messageType:"relay",requestId:"reply"===c?(0,g.relayRequestId)(p.id):void 0,onAttempt:a=>{h=a}})}catch(e){var x;let d=(x=h,null===x?"send-threw":"sent"===x.state?"threw-after-sent":x.reason);return U.warn("relay-delivery-uncertain",{relayId:b,kind:c,reason:d,error:e instanceof Error?e.message:String(e)}),ab(a,v,d)&&ac(a,p,q,v,c,d),"uncertain"}if(!d.ok){let b=function(a,b,c,d,e,g,h){let i=b.relayId;return null!==h&&"not-sent"!==h.state?(U.info("relay-delivery-uncertain",{relayId:i,kind:e,stage:g,reason:h.reason}),ab(a,b,h.reason)&&ac(a,c,d,b,e,h.reason),{outcome:"uncertain",requeued:!1}):(U.info("relay-delivery-refused",{relayId:i,kind:e,stage:g}),{outcome:"prompt_waiting"===g?"held":"failed",requeued:function(a,b){try{return(0,f.ZJ)(a,b)}catch(a){return U.warn("relay-delivery-release-failed",{relayId:b.relayId,error:a instanceof Error?a.message:String(a)}),!1}}(a,b)})}(a,v,p,q,c,d.stage,h);return w=b.requeued,b.outcome}let j=Date.now(),{completed:k,promoted:l}=function(a,b,c,d,e){let h,i=!1;if("reply"===d){let d=(0,f.vp)(a,{...b,sentRequestId:(0,g.relayRequestId)(c.id),now:e});(h=d.completed)&&!d.closed&&U.info("relay-already-closed-on-deliver",{relayId:b.relayId})}else"prompt"===d?{completed:h,promoted:i}=(0,f.jl)(a,{...b,now:e}):h=(0,f.Tw)(a,{...b,now:e});return{completed:h,promoted:i}}(a,v,p,c,j);if(!k)return U.warn("relay-delivery-result-stale",{relayId:b,kind:c,attemptId:u}),"skipped";return l&&(globalThis.__relayPumpAgain=!0),function(a,b,c,d,e){let f=b.id;try{"reply"===d?(0,S._)(a,b.id,"replied",c,(0,r.S)(a,b.to),e,{overlap:b.overlap,holdReason:b.holdReason}):"prompt"===d&&(0,S._)(a,b.id,"waiting",c,(0,r.S)(a,b.to),e)}catch(a){U.warn("relay-delivery-record-failed",{relayId:f,kind:d,error:a instanceof Error?a.message:String(a)})}}(a,p,q,c,j),U.info("relay-delivered",{relayId:b,kind:c,to:`${q.worktreeId}/${q.instanceId}`}),"delivered"}finally{w&&"prompt"===c&&function(a,b,c){let d=b.id;try{(0,f.T)(a,b.id,c)&&(U.info("relay-prompt-superseded-after-failed-delivery",{relayId:d}),globalThis.__relayPumpAgain=!0)}catch(a){U.warn("relay-prompt-supersede-failed",{relayId:d,error:a instanceof Error?a.message:String(a)})}}(a,p,j),(0,s.dJ)(b)}}function ab(a,b,c){try{return(0,f.pk)(a,{...b,reason:c})}catch(a){return U.warn("relay-delivery-hold-failed",{relayId:b.relayId,error:a instanceof Error?a.message:String(a)}),!1}}function ac(a,b,c,d,e,f){try{(0,S._)(a,b.id,"held",c,(0,r.S)(a,b.to),d.now??Date.now(),{relayId:b.id,payload:`${e??"-"}:${d.payloadId}`,attemptId:d.attemptId,deliveryReason:f},`${d.payloadId}:${d.attemptId}`)}catch(a){U.warn("relay-held-line-failed",{relayId:d.relayId,error:a instanceof Error?a.message:String(a)})}}async function ad(){if(!globalThis.__relayPumpRunning){globalThis.__relayPumpRunning=!0;try{let a=(0,e.getDbInstance)();X(a);for(let b=0;b<3;b+=1){for(let b of(globalThis.__relayPumpAgain=!1,(0,f.sB)(a)))if(!V.has(b.relay.id)){V.add(b.relay.id);try{await aa(a,b.relay.id,b.kind,b.body,b.payloadId)}catch(a){U.warn("relay-delivery-failed",{relayId:b.relay.id,error:a instanceof Error?a.message:String(a)})}finally{V.delete(b.relay.id)}}if(!globalThis.__relayPumpAgain)break}}catch(a){U.warn("relay-pump-failed",{error:a instanceof Error?a.message:String(a)})}finally{globalThis.__relayPumpRunning=!1}}}function ae(){globalThis.__relayPumpAgain=!0,ad()}async function af(){try{X((0,e.getDbInstance)()),function(a,b=Date.now()){for(let c of(0,f.s7)(a,b))if(!(0,s.p5)(c.id))try{let d=(0,h.dV)(a);(0,f.uJ)(a,c.id,b),(0,f.zM)(a,c.id,b);let e=(0,j.KA)(d,z(a,c),c.expiresAt-c.createdAt),g=(0,f.be)(a,c.id,"expired",e,b);if(!(0,f.Cz)(a,c.id,b)){g&&(0,f.uJ)(a,c.id,b);continue}(0,S._)(a,c.id,"expired",(0,r.S)(a,c.from),(0,r.S)(a,c.to),b)}catch(a){U.warn("relay-expire-failed",{relayId:c.id,error:a instanceof Error?a.message:String(a)})}}((0,e.getDbInstance)())}catch(a){U.warn("relay-sweep-failed",{error:a instanceof Error?a.message:String(a)})}await ad()}},67164:(a,b,c)=>{c.d(b,{_:()=>i});var d=c(52660),e=c(55233),f=c(43015),g=c(640);let h=(0,c(72626).h)("relay-system-line");function i(a,b,c,j,k,l=Date.now(),m={},n=null){let o=(0,d.relaySystemRequestId)(b,c,n);try{let i=a.transaction(()=>{if((0,d.findMessageByRequestId)(a,j.worktreeId,o))return null;let f=(0,e.dV)(a);return(0,d.createRelaySystemMessage)(a,{worktreeId:j.worktreeId,cliToolId:j.cliToolId,instanceId:j.instanceId,content:(0,g.Nl)(f,c,k.alias,m),relayId:b,kind:c,scope:n,at:l})}).immediate();if(null===i)return!1;try{(0,f.broadcastMessage)("message",{worktreeId:j.worktreeId,message:{...i,cliToolId:j.cliToolId,instanceId:j.instanceId}})}catch(a){h.warn("relay-system-line-broadcast-failed",{relayId:b,kind:c,error:a instanceof Error?a.message:String(a)})}return!0}catch(a){return h.warn("relay-system-line-failed",{relayId:b,kind:c,error:a instanceof Error?a.message:String(a)}),!1}}},85016:(a,b,c)=>{c.d(b,{dJ:()=>f,o5:()=>e,p5:()=>g});let d=(0,c(36925).v)("__relayDeliveryClaims",()=>new Set);function e(a){d.add(a)}function f(a){d.delete(a)}function g(a){return d.has(a)}}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=4207,exports.ids=[4207],exports.modules={20137:(a,b,c)=>{c.d(b,{Ar:()=>d,Cb:()=>v,En:()=>k,Fs:()=>q,Hf:()=>t,Tp:()=>j,Ww:()=>e,XI:()=>w,dq:()=>l,eb:()=>i,iI:()=>y,kd:()=>f,o1:()=>g,oN:()=>h,u7:()=>r});let d=100,e=1e4,f=["default","acceptEdits","plan","dontAsk","bypassPermissions"],g=["read-only","workspace-write","danger-full-access"],h=["allow-all-tools","yolo"],i=["--dangerously-skip-permissions"],j=["default","standard","plan","auto-accept","dont-ask"],k="yolo",l=[k,...j],m=[],n=[],o=[],p="default",q="auto",r=[p,q],s=[],t={claude:"acceptEdits",codex:"workspace-write",gemini:"","vibe-local":"",opencode:"",copilot:"allow-all-tools",antigravity:"--dangerously-skip-permissions","command-code":k,"opencode-v2":p},u=[];function v(a){return!u.includes(a)}function w(a){switch(a){case"claude":return f;case"codex":return g;case"copilot":return h;case"antigravity":return i;case"command-code":return l;case"gemini":return m;case"vibe-local":return n;case"opencode":return o;case"opencode-v2":return r;default:return s}}let x=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function y(a){return x.test(a)}},34207:(a,b,c)=>{c.d(b,{$2:()=>u,$g:()=>y,To:()=>t,V$:()=>B,iv:()=>m,uv:()=>l});var d=c(79646),e=c(67548),f=c(73434),g=c(
|
|
1
|
+
"use strict";exports.id=4207,exports.ids=[4207],exports.modules={20137:(a,b,c)=>{c.d(b,{Ar:()=>d,Cb:()=>v,En:()=>k,Fs:()=>q,Hf:()=>t,Tp:()=>j,Ww:()=>e,XI:()=>w,dq:()=>l,eb:()=>i,iI:()=>y,kd:()=>f,o1:()=>g,oN:()=>h,u7:()=>r});let d=100,e=1e4,f=["default","acceptEdits","plan","dontAsk","bypassPermissions"],g=["read-only","workspace-write","danger-full-access"],h=["allow-all-tools","yolo"],i=["--dangerously-skip-permissions"],j=["default","standard","plan","auto-accept","dont-ask"],k="yolo",l=[k,...j],m=[],n=[],o=[],p="default",q="auto",r=[p,q],s=[],t={claude:"acceptEdits",codex:"workspace-write",gemini:"","vibe-local":"",opencode:"",copilot:"allow-all-tools",antigravity:"--dangerously-skip-permissions","command-code":k,"opencode-v2":p},u=[];function v(a){return!u.includes(a)}function w(a){switch(a){case"claude":return f;case"codex":return g;case"copilot":return h;case"antigravity":return i;case"command-code":return l;case"gemini":return m;case"vibe-local":return n;case"opencode":return o;case"opencode-v2":return r;default:return s}}let x=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function y(a){return x.test(a)}},34207:(a,b,c)=>{c.d(b,{$2:()=>u,$g:()=>y,To:()=>t,V$:()=>B,iv:()=>m,uv:()=>l});var d=c(79646),e=c(67548),f=c(73434),g=c(54490),h=c(15194),i=c(20137),j=c(18140),k=c(36925);let l=1e4,m=new Set(h.XH);function n(a){return 102400>=Buffer.byteLength(a,"utf-8")?a:Buffer.from(a,"utf-8").subarray(0,102400).toString("utf-8")+"\n\n--- Output truncated (exceeded 100KB limit) ---"}function o(a){let b=[],c=null;for(let d of a.split("\n")){let a,e=d.trim();if(!e.startsWith("{"))continue;try{a=JSON.parse(e)}catch{continue}if("object"!=typeof a||null===a)continue;let f=a,g="object"==typeof f.part&&null!==f.part?f.part:null;if("text"===f.type&&g&&"string"==typeof g.text){b.push({messageId:"string"==typeof g.messageID?g.messageID:null,text:g.text});continue}"error"===f.type&&(c=p(f))}if(b.length>0){let a=b[b.length-1].messageId;return(null===a?[b[b.length-1]]:b.filter(b=>b.messageId===a)).map(a=>a.text).join("\n\n")}return c}function p(a){let b="object"==typeof a.error&&null!==a.error?a.error:{},c="string"==typeof b.name?b.name:"string"==typeof b.type?b.type:"error",d="object"==typeof b.data&&null!==b.data?b.data:{},e="string"==typeof d.message?d.message:"string"==typeof b.message?b.message:"";return e?`opencode error: ${c}: ${e}`:`opencode error: ${c}`}function q(a){let b=null;for(let c of a.split("\n")){let a=c.trim();if(a.startsWith("{"))try{let c=JSON.parse(a);"object"==typeof c&&null!==c&&(b=c)}catch{continue}}return b&&"error"===b.type?p(b):null}let r={1:"error",3:"authentication failed",4:"permission denied",5:"rate limited",6:"connection error",7:"server error",8:"max turns reached",9:"no response",10:"insufficient credits",130:"interrupted"};function s(a){let b=null,c=[],d=0;for(let e of a.split("\n")){let a,f=e.trim();if(!f.startsWith("{"))continue;try{a=JSON.parse(f)}catch{continue}if("object"!=typeof a||null===a)continue;let g=a;if("result"===g.type){if("string"!=typeof g.subtype)continue;b={subtype:g.subtype,finalText:"string"==typeof g.finalText?g.finalText:"",..."string"==typeof g.error?{error:g.error}:{}};continue}if("event"!==g.type||"object"!=typeof g.event||null===g.event)continue;let h=g.event;if("tool_running"===h.type){d+=1;continue}"tool_hook_blocked"===h.type&&c.push({toolCallId:"string"==typeof h.toolCallId?h.toolCallId:null,toolName:"string"==typeof h.toolName&&""!==h.toolName?h.toolName:"(unnamed tool)",hookOutput:"string"==typeof h.hookOutput?h.hookOutput:""})}return{result:b,blockedToolCalls:c,startedToolCalls:d}}let t="Warning: command-code blocked ",u=1024,v=/^Warning: command-code blocked \d+ tool call\(s\) \(tool_hook_blocked\): /;function w(a,b){let c=(0,g.aJ)(a).replace(/[\x00-\x1f\x7f\s]+/g," ").trim();return c.length>b?`${c.slice(0,b)}…`:c}function x(a){let{blockedToolCalls:b,startedToolCalls:c}=a;if(0===b.length)return null;let d=new Map,e=new Map;for(let a of b){let b=w(a.toolName,80);d.set(b,(d.get(b)??0)+1);let c=w(a.hookOutput,300)||"(no hook output)",f=JSON.stringify([b,c]);e.has(f)||e.set(f,`Blocked ${b}: ${c}`)}let f=[...d].slice(0,5).map(([a,b])=>`${a} (${b})`);d.size>5&&f.push(`+${d.size-5} more`);let g=`${t}${b.length} tool call(s) (tool_hook_blocked): ${f.join(", ")}; ${c} tool call(s) ran`,h=[...e.values()].slice(0,5);return e.size>5&&h.push(`Blocked: +${e.size-5} more distinct reason(s)`),[g,...h]}function y(a){if("string"!=typeof a)return null;let b=a.indexOf("\n"),c=-1===b?a:a.slice(0,b);return v.test(c)?c:null}function z(a,b){let c=null!==b&&"success"!==b.subtype;if((null===a||0===a)&&!c)return null;let d=[];if(null!==a&&0!==a){let b=r[a];d.push(b?`exit ${a} (${b})`:`exit ${a}`)}return b&&(d.push(`subtype=${b.subtype}`),b.error&&d.push(b.error)),`Reason: command-code ${d.join(" / ")}`}let A={codex:"$CODEX_HOME/hooks.json",antigravity:"~/.gemini/config/hooks.json"};async function B(a,b,c="claude",h,p){if(!m.has(c))return{output:"",exitCode:null,status:"failed",error:`Invalid CLI tool: ${c}`};let r=function(a){if(!(0,e.WM)())return null;let b=A[a];return b?new e.ci(`a headless ${a} run`,`it reads the shared ${b} and its hooks post to the relay's default port (the production server); see docs/user-guide/uat-isolation.md`,"Headless codex / antigravity runs (Schedules, daily summary) cannot be isolated; skip those scenarios in a UAT.").message:null}(c);if(r)return{output:r,exitCode:null,status:"failed",error:r};let t=function(a,b,c,d){switch(b){case"codex":return["exec",a,"--sandbox",c??"workspace-write"];case"gemini":return["-p",a];case"vibe-local":if(d?.model)return["--model",d.model,"-p",a,"-y"];return["-p",a,"-y"];case"opencode":{let b=["run","--format","json"];return d?.model&&b.push("-m",d.model),d?.agent&&b.push("--agent",d.agent),d?.variant&&b.push("--variant",d.variant),d?.continueSession&&b.push("-c"),d?.title&&b.push("--title",d.title),b.push(a),b}case"opencode-v2":{let b=["run","--standalone","--format","json"];return c===i.Fs&&b.push("--auto"),d?.model&&b.push("-m",d.variant?`${d.model}#${d.variant}`:d.model),d?.agent&&b.push("--agent",d.agent),d?.continueSession&&b.push("-c"),d?.title&&b.push("--title",d.title),b.push("--",a),b}case"command-code":{let b=["-p",a,"--output-format","json"];return c===i.En?b.push("--yolo"):i.Tp.includes(c)?b.push("--permission-mode",c):b.push("--yolo"),b.push("--no-auto-update"),b}case"antigravity":return["-p",a,"--dangerously-skip-permissions"];case"copilot":{let b=i.oN.includes(c)?c:"allow-all-tools",e=["copilot"];return d?.model&&e.push("--model",d.model),e.push("-p",a,`--${b}`),e}default:{let b=["-p",a,"--output-format","text","--permission-mode",c??"acceptEdits"];return(0,e.WM)()&&b.push("--setting-sources",e.mc),b}}}(a.length>l?a.substring(0,l):a,c,h,p),u=function(a){switch(a){case"copilot":return"gh";case"antigravity":return"agy";case"command-code":return"commandcode";case"opencode-v2":return j.b6;default:return a}}(c);if("opencode-v2"===c){let a=await (0,j.Qq)();if(!a.executable){let a="OpenCode V2 not found: no `opencode2` (or `opencode` reporting v2) on PATH";return{output:a,exitCode:null,status:"failed",error:a}}u=a.executable.path}let v="opencode-v2"===c?{...(0,f.hh)(),PWD:b}:(0,f.hh)();return new Promise(a=>{let e=(0,d.execFile)(u,t,{cwd:b,env:v,maxBuffer:0xa00000,timeout:p?.timeoutMs??18e5},(b,d,e)=>{if(b){let f=b.code,h="ERR_CHILD_PROCESS_STDIO_MAXBUFFER"===f,i=b.killed||"ETIMEDOUT"===f,j="command-code"===c?s(d||""):null,k=j?j.result:null,l=j?x(j):null,m="number"==typeof f?f:null,p="opencode-v2"===c,r=[...l??[],`Error: ${b.message}`,`Code: ${f??"unknown"}`,`Signal: ${b.signal??"none"}`,h?"Reason: stdout exceeded execFile maxBuffer (output_limit)":null,"command-code"===c?z(m,k):null,p?function(a,b){if(/permission requested: .*auto-rejecting/.test((0,g.aJ)(b)))return"Reason: opencode-v2 auto-rejected a permission request (an `ask` rule); set the schedule's Permission to `auto` to approve it unattended";let c=q(a);return c?`Reason: ${c}`:null}(d||"",e||""):null].filter(a=>null!==a).join("\n"),t=k?k.finalText:p?o(d||"")??(d||""):d||"";a({output:n((0,g.aJ)([r,t?`
|
|
2
2
|
--- stdout ---
|
|
3
3
|
${t}`:"",e?`
|
|
4
4
|
--- stderr ---
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=4490,exports.ids=[4490],exports.modules={682:(a,b,c)=>{c.d(b,{T:()=>f,c:()=>h});var d=c(23479);let e=/^[^\S\n]*[│┃]?[^\S\n]*([❯›●>])?[^\S\n]*(\d{1,2})[.)][^\S\n]+(\S.*?)[^\S\n]*[│┃]?$/;function f(a){return g(a)}function g(a){let b=e.exec(a);if(!b)return null;let c=Number(b[2]);return!Number.isInteger(c)||c<1?null:{glyph:b[1],number:c,label:b[3].trim()}}function h(a,b,c=8){let e=Math.min(b,a.length)-1,f=0,i=[],j=null;for(;e>=0&&f<=c;){let b=a[e];if(""===b.trim()){e--;continue}if(f++,j=g(b))break;i.unshift(b.trim()),e--}if(!j)return null;let k=e,l=[j],m=[!1],n=j.number-1,o=e-1,p=1,q=[];for(;n>=1&&o>=0&&p<=60;){let b=a[o];if(p++,""===b.trim()){o--;continue}let c=g(b);if(c&&c.number===n){l.unshift({...c,label:[c.label,...q].join(" ").trim()}),m.unshift(q.length>0),q=[],n--,o--;continue}if(c)break;q.unshift(b.trim()),o--}if(0!==n||l.length<2)return null;let r=l.findIndex(a=>void 0!==a.glyph);return{options:l.map(a=>a.label),selectedIndex:r,selectedGlyph:r<0?null:l[r].glyph??null,firstRow:o+1,lastRow:k,footer:i.join("\n"),optionRecommendations:l.map((a,b)=>m[b]?"unknown":(0,d.e3)(a.label))}}},1804:(a,b,c)=>{c.d(b,{BG:()=>g,MJ:()=>f,_:()=>l,hB:()=>k,iE:()=>d,jP:()=>e,ji:()=>i,u3:()=>j,yh:()=>h});let d={version:"2.1.240",capturedAt:"2026-08-23",paneGeometry:"200x1000"},e={version:"0.157.1",capturedAt:"2026-09-27",paneGeometry:"200x1000"},f={version:"1.0.82",capturedAt:"2026-09-04",paneGeometry:"200x1000"},g={version:"1.18.22",capturedAt:"2026-08-26",paneGeometry:"80x200"},h={version:"1.1.27",capturedAt:"2026-09-06",paneGeometry:"200x1000"},i={version:"1.54.1",capturedAt:"2026-09-20",paneGeometry:"200x1000"},j={version:"2.0.18",capturedAt:"2026-09-28",paneGeometry:"80x200"},k={version:"unmeasured",capturedAt:"never",paneGeometry:"unmeasured"},l={claude:d,codex:e,copilot:f,opencode:g,antigravity:h,"command-code":i,"opencode-v2":j,gemini:k,"vibe-local":k}},23479:(a,b,c)=>{c.d(b,{GP:()=>k,JF:()=>j,e3:()=>e,iU:()=>g});let d=/(?:^|[^A-Za-z0-9])(?:\(Recommended\)|(推奨)|\(推奨\))$/;function e(a){return d.test(a.trim())}let f=new Set(["(Recommended)","(推奨)","(推奨)"]);function g(a){return f.has(a.trim())}let h=/^\p{M}$/u;function i(a){let b=0;for(let c of a){let a=c.codePointAt(0)??0;a>=32&&a<127?b+=1:h.test(c)||(b+=2)}return b}function j(a){let b=0;for(let c of a){let a=0;for(let b of c.trimEnd())h.test(b)||(a+=1);a>b&&(b=a)}return b}function k(a,b,c){let d=b.trim().split(/\s+/,1)[0]??"";return""!==d&&i(a.trimEnd())+1+i(d)<=c}},27789:(a,b,c)=>{c.d(b,{$I:()=>C,DR:()=>m,Dd:()=>B,E6:()=>y,Jn:()=>A,Mt:()=>g,Nc:()=>L,Qh:()=>u,RK:()=>s,UO:()=>H,X3:()=>z,Y7:()=>l,Zu:()=>J,aW:()=>G,bh:()=>E,gm:()=>n,ir:()=>D,mk:()=>i,pn:()=>F,sB:()=>p,zZ:()=>r});var d=c(51297),e=c(46423),f=c(65912);let g=/•\s*(Planning|Searching|Exploring|Running|Thinking|Working|Reading|Writing|Analyzing|Ran|Deciding)/m,h=/esc to interrupt/,i=/^[•◦]\s.*\((?:\d+h\s*)?(?:\d+m\s*)?\d+s\s*•\s*esc to interrupt\)/m,j=/^■ Conversation interrupted\b/,k=/^\d+ background terminals? running\b/;function l(a){let b=s(a);if(b<0)return!1;for(let c=b-1;c>=0;c--){let b=a[c].trim();if(!(""===b||k.test(b)))return j.test(b)}return!1}function m(a,b){let c=(0,d.aJ)(a.slice(Math.max(0,a.length-b)).join("\n"));if(h.test(c))return!0;let f=-1;for(let b=a.length-1;b>=Math.max(0,a.length-8);b--)if(n.test((0,d.aJ)(a[b]))){f=b;break}if(f<0)return g.test(c);let i=Math.max(0,f-e.$+1),j=(0,d.aJ)(a.slice(i,f+1).join("\n"));return g.test(j)}let n=/^›\s*/m,o=/Do you trust|Trust this folder\?/,p=RegExp(`Skip until next version|${o.source}|Press enter to continue|^\\s*›\\s*\\d+\\.\\s`,"m"),q=/^\s*›(?!\s*\d+\.)/;function r(a){let b=a.split("\n"),c=-1,d=-1;for(let a=0;a<b.length;a++){let e=b[a];if(p.test(e)){c=a;continue}q.test(e)&&(d=a)}return d>=0&&d>c}function s(a){for(let b=a.length-1;b>=0;b--)if(q.test(a[b]))return b;return -1}function t(a){if("string"!=typeof a){let b=a.liveRegion;return"codex"===b.tool?"composer"===b.anchor?a.contentLines.slice((b.composerEndRow??b.startRow)+1):a.contentLines:t(a.clean)}let b=a.split("\n");return b.slice(s(b)+1)}function u(a){let b=t(a).join("\n");return""===b?null:b.includes("Skip until next version")||b.includes("Update")&&b.includes("Skip")?"update":o.test(b)?"trust":b.includes("Press enter to continue")?"press-enter":null}let v=/press\s+t\s+to\s+trust\s+all\s*;/i,w=/press\s+t\s+to\s+trust\s*;/i,x=[/skip until next version/i,/^\s*[›❯]?\s*\d+\.\s*Update now/im];function y(a){let b=t(a),c=[];for(let a=b.length-1;a>=0&&c.length<12;a--)""!==b[a].trim()&&c.unshift(b[a]);if(0===c.length)return null;let d=c.join("\n");for(let a=c.length-1;a>=0;a--){let b=c[a];if(v.test(b))return"hooks-list";if(w.test(b))return"hooks-detail";if(B.test(b))break;if(x.some(a=>a.test(b)))return"update";if(o.test(b))return"trust";if(b.includes("Continue without trusting")&&d.includes("Hooks need review"))return"hooks-review"}return null}let z=/^─.*Worked for.*─+$/m,A=/press\s+enter\s+to\s+(?:confirm|select)/i,B=/esc\s+to\s+cancel/i,C=/^enter\s+to\s+submit\s*\|\s*esc\s+to\s+cancel$/im,D=/^enter\s+select\s*·\s*esc\s+back$/im,E=/^enter\s+default\s*·\s*s\s+session\s*·\s*esc\s+back$/im,F=/(?:↑\/↓|pgup\/pgdn|home\/end)\s+to\s+(?:scroll|page|jump)|to\s+edit\s+(?:prev|next|message)/i,G=/^\s*\S.*·\s*~?\/\S*\s*$/,H=/^\s*\S[^·]*·\s*~?\/\S*(?:\s*·[^\n]*|[^\S\n]{2,}\S[^\n]*)$/,I=/^›(\s|$)/;function J(a){let b=a.length-1;for(;b>=0&&""===(0,d.aJ)(a[b]).trim();)b--;if(b<0)return -1;let c=-1;for(let e=b;e>=Math.max(0,b-12);e--)if(I.test((0,d.aJ)(a[e]))){c=e;break}if(c<0)return -1;let e=(0,f.kT)(a[c]);if("composer"===e)return c;if(null!==e)return -1;for(let e=c+1;e<=b;e++)if(G.test((0,d.aJ)(a[e])))return c;return -1}let K=/^›\s+\S/;function L(a,b,c,e){let g=e;for(let e=Math.min(b,a.length)-1;e>=Math.max(0,b-c);e--){if(!K.test((0,d.aJ)(a[e])))continue;let b=(0,f.kT)(a[e]);if("option"!==b){if("transcript-echo"===b)return e;if(!g){g=!0;continue}return e}}return -1}},46423:(a,b,c)=>{c.d(b,{$:()=>d});let d=5},47165:(a,b,c)=>{c.d(b,{_:()=>d});function d(a){return a.split("\n").map(a=>/^[\u2502\u2503\u256D\u256E\u256F\u2570\u2500\u2579\u2580\u2588\s]+$/.test(a)?"":a.replace(/^\s*[\u2502\u2503]\s?/,"").replace(/\s*[\u2502\u2503\u2588]$/,"")).join("\n")}},47893:(a,b,c)=>{c.d(b,{$t:()=>j,Cc:()=>p,LO:()=>u,M4:()=>r,Md:()=>i,Th:()=>v,Ty:()=>k,Wl:()=>m,a2:()=>h,kD:()=>l,mu:()=>s,pV:()=>t,sx:()=>w,sy:()=>e,uA:()=>g,vU:()=>f,x7:()=>q});var d=c(74099);let e=/Ask anything(?:\.\.\.|\u2026)/,f=/^[^\S\n]*[\u2502\u2503][^\S\n]*Ask anything(?:\.\.\.|\u2026)/m,g=/tab agents\s+ctrl\+p commands/,h=/Thinking:/,i=/\u25A3\s+\w+\s+·\s+\S+(?:\s+·\s+(?:[\d]+h\s*)?(?:[\d]+m\s*)?[\d.]+s)?/,j=/\u25A3\s+\w+\s+·\s+[^·\n]+·\s+(?:\d+h\s*)?(?:\d+m\s*)?[\d.]+s/,k=/^[^\S\n]*[\u2502\u2503][^\S\n]*Allow once[^\S\n]+Allow always[^\S\n]+Reject\b/m,l=/esc (?:again to )?interrupt/,m=/^[^\S\n]*╹▀{4,}/,n=/^[^\S\n]*[│┃]/,o=/^[^\S\n]*[│┃][^\S\n]*\S/,p=/\d+(?:\.\d+)?[KMGT]?\s+\(\d+%\)\s+·\s+\$/;function q(a){let b=a.length-1;for(;b>=0&&""===a[b].trim();)b--;if(b<0)return -1;let c=b=>{let c=b;for(;c-1>=0&&n.test(a[c-1]);)c--;return c};for(let d=b;d>=0;d--)if(m.test(a[d]))return c(d);return n.test(a[b])?c(b):-1}function r(a,b){let c=b>=0?b:a.length;for(let b=c-1;b>=0;b--){if(!o.test(a[b]))continue;let d=b;for(;d+1<c&&n.test(a[d+1]);)d++;return d}return -1}function s(a){let b=-1;for(let c=a.length-1;c>=0;c--)if(m.test(a[c])){b=c;break}if(b<0)return null;let c=b;for(;c-1>=0&&n.test(a[c-1]);)c--;let d=b-1;return d<c?null:a.slice(c,d)}function t(a){return a.replace(n,"").trim()}let u=/^[^\S\n]*(?:Select[^\S\n]+(?:model|provider)|Connect[^\S\n]+a[^\S\n]+provider)[^\S\n]{2,}esc[^\S\n]*$/m,v=/^[\u2503\u2579\u25A3\u2580\u2500\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C]+$/,w=[v,/\u2B1D{4,}/,/^Build\s+/,g,l,e,p,d.fW]},51297:(a,b,c)=>{c.d(b,{aJ:()=>f});let d="\\x1b\\][^\\x07\\x1b]*(?:\\x07|\\x1b\\\\)";RegExp(d,"g");let e=RegExp(`\\x1b\\[[0-9;]*[a-zA-Z]|${d}|\\[[0-9;]*m`,"g");function f(a){return a.replace(e,"")}},54490:(a,b,c)=>{c.d(b,{OM:()=>u.OM,Ly:()=>u.Ly,lE:()=>u.lE,kT:()=>u.kT,kn:()=>u.kn,HR:()=>u.HR,d0:()=>u.d0,VF:()=>u.VF,aU:()=>o.aU,l8:()=>o.l8,hx:()=>o.hx,XY:()=>o.XY,F0:()=>o.F0,Fw:()=>o.Fw,Dd:()=>h.Dd,sB:()=>h.sB,bh:()=>h.bh,$I:()=>h.$I,pn:()=>h.pn,ir:()=>h.ir,gm:()=>h.gm,Jn:()=>h.Jn,aW:()=>h.aW,Mt:()=>h.Mt,UO:()=>h.UO,jk:()=>y,WK:()=>w,k0:()=>x,E0:()=>t.E0,JN:()=>t.JN,rX:()=>t.Ki,oD:()=>t.oD,Ub:()=>t.Ub,Du:()=>t.Du,V:()=>t.V,A:()=>t.A,J7:()=>t.J7,rb:()=>t.rb,Jr:()=>t.Jr,Fg:()=>t.Fg,y:()=>t.y,tJ:()=>t.tJ,wN:()=>p,s0:()=>q,Cc:()=>i.Cc,vU:()=>i.vU,Ty:()=>i.Ty,kD:()=>i.kD,uA:()=>i.uA,sy:()=>i.sy,Md:()=>i.Md,LO:()=>i.LO,sx:()=>i.sx,a2:()=>i.a2,$t:()=>i.$t,c7:()=>k,wK:()=>j,xL:()=>l,fW:()=>f.fW,Dj:()=>r,b2:()=>s,KO:()=>J,ut:()=>H,GT:()=>o.GT,Zu:()=>h.Zu,RK:()=>h.RK,Nc:()=>h.Nc,I$:()=>z,wv:()=>t.wv,x7:()=>i.x7,M4:()=>i.M4,dF:()=>C,_X:()=>I,Qh:()=>h.Qh,E6:()=>h.E6,bH:()=>u.bH,lX:()=>o.lX,zZ:()=>h.zZ,DR:()=>h.DR,Rx:()=>t.Rx,gT:()=>t.gT,Ok:()=>m,U1:()=>e.U,dx:()=>u.dx,Wn:()=>t.Wn,lQ:()=>o.lQ,aJ:()=>v.aJ,_A:()=>g._,c:()=>K});var d=c(72626),e=c(56993),f=c(74099),g=c(47165),h=c(27789),i=c(47893);let j=/^[^\S\n]*[\u2502\u2503][^\S\n]*Ask anything(?:\.\.\.|\u2026)/m,k=/ctrl\+p commands/,l=/esc interrupt/;function m(a){return j.test(a)||k.test(a)}let n=[i.Th,k,l,/Ask anything(?:\.\.\.|\u2026)/,/^Build\s+·/,f.fW];var o=c(79204);let p=/^[>❯]\s*$|^\s*[>❯]\s+Type your message.*$/m,q=/[\u2800-\u28FF]|Thinking\.\.\./,r=/ctx:\d+%\s*[>❯]/m,s=/[\u2800-\u28FF]|Thinking|⠋|⠙|⠹|⠸|⠼|⠴|⠦|⠧|⠇|⠏|Running|Executing/;var t=c(71188),u=c(69082),v=c(51297);let w=/^❯(\s*$|\s+\S)/m,x=RegExp(`^[^\\S\\n]*[\xb7○◇☆✧⌘][^\\S\\n]+[A-Za-z]+…|^[^\\S\\n]*✻ Thinking…|${/esc to interrupt/.source}`,"m"),y=/\?\s+for\s+shortcuts|»\s+accept edits on|»\s+permission bypass on|»\s+don't-ask on|^[^\S\n]*plan mode\s/m;function z(a){let b=a=>/^─{10,}$/.test((0,v.aJ)(a??"").trimEnd()),c=a.length-1;for(;c>=0&&""===a[c].trim();)c--;if(c<0)return -1;let d=-1;for(let e=c;e>=Math.max(0,c-4);e--)if(b(a[e])){d=e;break}if(d<0)return -1;let e=-1;for(let c=d-1;c>=Math.max(0,d-40);c--)if(b(a[c])){e=c;break}return e<0||!/^❯/.test((0,v.aJ)(a[e+1]??""))?-1:e}let A=[/^─{10,}$/,/^❯\s*$/,/^❯\s+Ask your question\.\.\./,y,x,/^[^\S\n]*✻\s+(?:Worked|Thought)\s+for\b/,/^[^\S\n]*◼\s+Ran\s+\d+\s+.*hooks?\b/,/^#\s+Command Code v\d/,/^#\s+models:\s/,/^#\s+[~/]/,/^[^\S\n]*[█▀▄▌▐]{3,}/,f.fW],B=/^[^\S\n]*[^\s\u2502\u2503\u2579\u2580][^\n]*?[^\S\n]{8,}esc[^\S\n]*$/m;function C(a){let b=B.exec(a);return null===b?null:b[0].trim().replace(/\s+esc$/,"")}let D=(0,d.h)("cli-patterns"),E={claude:{promptPattern:o.hx,separatorPattern:o.g0,thinkingPattern:o.j7,skipPatterns:[/^─{10,}$/,/^[>❯]\s*$/,o.j7,/^\s*[⎿⏋]\s+Tip:/,/^\s*Tip:/,/^\s*\?\s*for shortcuts/,/to interrupt\)/,f.fW],promptOptions:{requireDefaultIndicator:!1},fullFramePrompt:!0},codex:{promptPattern:h.gm,separatorPattern:h.X3,thinkingPattern:h.Mt,skipPatterns:[/^─.*─+$/,/^›\s*$/,/^›\s+(Implement|Find and fix|Type)/,h.Mt,/^\s*\d+%\s+context left/,/^\s*for shortcuts$/,/╭─+╮/,/╰─+╯/,/•\s*Ran\s+/,/^\s*└/,/^\s*│/,/\(.*esc to interrupt\)/,f.fW],promptOptions:void 0,fullFramePrompt:!0},gemini:{promptPattern:p,separatorPattern:/^[─━]{3,}$/m,thinkingPattern:q,skipPatterns:[p,q,/^\s*$/,/Gemini\s+\d+\.\d+/,f.fW],promptOptions:void 0,fullFramePrompt:!1},"vibe-local":{promptPattern:r,separatorPattern:/^[·]{10,}$/m,thinkingPattern:s,skipPatterns:[r,s,/^\s*$/,/vibe-local|vibe-coder/,/ctx:\s*\d+%/,/Model\s+\w/,/Engine\s+\w/,/Mode\s+/,/RAM\s+/,/CWD\s+/,/^[·]{10,}$/,/✦\s*Ready/,/ESC:\s*stop/,f.fW],promptOptions:void 0,fullFramePrompt:!1},opencode:{promptPattern:i.sy,separatorPattern:i.Th,thinkingPattern:i.a2,skipPatterns:i.sx,promptOptions:{requireDefaultIndicator:!1,hasNumberedDialogs:!1},fullFramePrompt:!0},copilot:{promptPattern:t.Du,separatorPattern:t.A,thinkingPattern:t.rb,skipPatterns:t.J7,promptOptions:{requireDefaultIndicator:!1},fullFramePrompt:!0},antigravity:{promptPattern:u.lE,separatorPattern:u.kn,thinkingPattern:u.VF,skipPatterns:u.Z6,promptOptions:{requireDefaultIndicator:!1},fullFramePrompt:!1},"command-code":{promptPattern:w,separatorPattern:/^─{10,}$/m,thinkingPattern:x,skipPatterns:A,promptOptions:void 0,fullFramePrompt:!1},"opencode-v2":{promptPattern:j,separatorPattern:i.Th,thinkingPattern:l,skipPatterns:n,promptOptions:void 0,fullFramePrompt:!1}};function F(a){return Object.prototype.hasOwnProperty.call(E,a)?E[a]:void 0}function G(a){return F(a)??E.claude}function H(a,b){let c=D.withContext({cliToolId:a});c.debug("detectThinking:check",{contentLength:b.length});let d=G(a).thinkingPattern.test(b);return c.debug("detectThinking:result",{isThinking:d}),d}function I(a){let b=G(a);return{promptPattern:b.promptPattern,separatorPattern:b.separatorPattern,thinkingPattern:b.thinkingPattern,skipPatterns:[...b.skipPatterns]}}function J(a){let b=F(a)?.promptOptions;return void 0===b?void 0:{...b}}function K(a){return F(a)?.fullFramePrompt??!1}},56993:(a,b,c)=>{c.d(b,{U:()=>e});let d=new Set(["sh","bash","zsh","fish","dash","ksh","tcsh","csh"]);function e(a){return d.has(a.trim().replace(/^-/,""))}},65912:(a,b,c)=>{c.d(b,{AT:()=>p,Gs:()=>n,kT:()=>j,kp:()=>k,t:()=>l});var d=c(72626),e=c(682);let f=(0,d.h)("codex-dialog-rules"),g={version:"0.157.1"},h=/press\s+\S+\s+to\s+\S|esc\s+(?:to\s+)?(?:cancel|close|dismiss|quit|exit|back|go\s+back|skip)/i,i={bold:!1,dim:!1,fg:null};function j(a){if(!a.includes("\x1b"))return null;let b=function(a){let b=[],c=i,d=0;for(;d<a.length;){let e=a[d];if("\x1b"!==e){b.push({ch:e,attrs:c}),d++;continue}let f=a[d+1];if("["===f){let b=d+2;for(;b<a.length&&!/[A-Za-z]/.test(a[b]);)b++;if(b>=a.length)break;"m"===a[b]&&(c=function(a,b){let c=""===a?["0"]:a.split(";"),{bold:d,dim:e,fg:f}=b;for(let a=0;a<c.length;a++){let b=""===c[a]?0:Number(c[a]);if(!Number.isNaN(b)){if(38===b){let b=""===c[a+1]||void 0===c[a+1]?-1:Number(c[a+1]),d=5===b?2:2===b?4:1;f=c.slice(a+1,a+1+d).join(";"),a+=d;continue}if(48===b||58===b){let b=""===c[a+1]||void 0===c[a+1]?-1:Number(c[a+1]);5===b?a+=2:2===b?a+=4:a+=1;continue}0===b?(d=!1,e=!1,f=null):1===b?d=!0:2===b?e=!0:22===b?(d=!1,e=!1):39===b?f=null:(b>=30&&b<=37||b>=90&&b<=97)&&(f=String(b))}}return{bold:d,dim:e,fg:f}}(a.slice(d+2,b),c)),d=b+1;continue}if("]"===f){let b=d+2;for(;b<a.length;){if("\x07"===a[b]){b++;break}if("\x1b"===a[b]&&"\\"===a[b+1]){b+=2;break}b++}d=b;continue}d+=2}return b}(a),c=b.findIndex(a=>""!==a.ch.trim());if(c<0||"›"!==b[c].ch)return null;let d=b[c].attrs;if(d.dim)return"transcript-echo";let e=b.slice(c+1).find(a=>""!==a.ch.trim());return e?.attrs.bold?"option":e?.attrs.dim?"composer":null!==d.fg&&e?.attrs.fg===d.fg?"option":"composer"}function k(a){let b=a.split("\n");for(let a=b.length-1;a>=0;a--){let c=j(b[a]);if(null!==c)return{kind:c,row:a}}return null}function l(a,b,c){let d=k(a),f=(0,e.c)(b,c),g=null!==f&&"›"===f.selectedGlyph,i=d?.kind==="option"?"glyph":g&&d?.kind!=="composer"&&d?.kind!=="transcript-echo"?"numbered-block":null;if(null===i)return null;let j=null!==f?f.footer:function(a,b,c){let d=[];for(let e=b+1;e<c&&d.length<8;e++){let b=a[e].trim();""!==b&&d.push(b)}return d.join("\n")}(b,function(a,b){for(let c=Math.min(b,a.length)-1;c>=0;c--)if(a[c].trimStart().startsWith("›"))return c;return -1}(b,c),c);return{by:i,options:f?.options??[],footer:j,footerRecognised:h.test(j)}}let m=/^\s*›\s*\d{1,2}[.)]\s/;function n(a,b,c){let d=k(a);if(null!==d)return"composer"===d.kind;let e=Math.min(c,b.length)-1;for(;e>=0&&""===b[e].trim();)e--;if(e<0)return!1;let f=b[e];return f.trimStart().startsWith("›")&&!m.test(f)}let o=new Set;function p(a){let b=a.slice(0,200);!o.has(b)&&(o.size>=64||(o.add(b),f.warn("codexDialogFooterUnrecognised",{footer:b,verifiedAgainst:g.version,hint:"codex reworded a dialog footer; widen CODEX_DIALOG_FOOTER_PATTERN after re-capturing the frame"})))}},69082:(a,b,c)=>{c.d(b,{HR:()=>o,Ly:()=>l,OM:()=>n,VF:()=>g,VI:()=>q,YH:()=>j,Z6:()=>t,bH:()=>s,cR:()=>k,d0:()=>m,dx:()=>r,kT:()=>i,kn:()=>h,lE:()=>f,wf:()=>p});var d=c(74099);let e=">[^\\S\\n]+[A-Z][A-Za-z-]*[^\\S\\n]mode:[^\\n]*\\(shift\\+tab to cycle\\)[^\\S\\n]*";RegExp(`^${e}$`,"m");let f=RegExp(`^(?:>\\s*|${e})$`,"m"),g=/[\u2800-\u28FF]|Generating|esc to cancel/,h=/^─{3,}$/m,i=/Switch Model|↑\/↓\s*Navigate/m,j=/↑\/↓\s*Navigate/,k=/↑\/↓\s*Navigate\s*·\s*tab Amend\b/,l=/^\s*>?\s*\d+\.\s+\S/m,m=/^\s*Switch Model\s*$/,n=/^\s*(?:─{3,}\s*$|[●⎿▸]|>(?!\s*\d+\.\s+\S))/,o=/^\s*\[1\]\s*Good\s+\[2\]\s*Fine\s+\[3\]\s*Bad\s+\[0\]\s*Skip\s*$/m,p=/Do you trust the contents of this project\?/;function q(a){return p.test(a)&&j.test(a)}function r(a){let b=-1;for(let c=a.length-1;c>=0;c--)if(j.test(a[c])){b=c;break}if(b<0)return null;for(let c=b+1;c<a.length;c++)if(f.test(a[c]))return null;let c=Math.max(0,b-60),d=c;for(let e=b-1;e>=c;e--)if(n.test(a[e])){d=e+1;break}return{start:d,footer:b}}function s(a){let b=a.split("\n"),c=r(b);if(null===c)return!1;let d=0;for(let a=c.start;a<c.footer;a++){let c=b[a];if(m.test(c))return!1;l.test(c)&&d++}return d>=2}let t=[h,/^>\s*$/,/^\?\s+for\s+shortcuts/,g,/[▄▀█▌▐]/,d.fW]},71188:(a,b,c)=>{c.d(b,{A:()=>l,Du:()=>g,E0:()=>u,Fg:()=>t,J7:()=>C,JN:()=>p,Jr:()=>r,Ki:()=>x,Rx:()=>B,Ub:()=>j,V:()=>v,Wn:()=>k,gT:()=>w,oD:()=>A,rb:()=>h,rc:()=>z,tJ:()=>i,wv:()=>o,y:()=>q});var d=c(51297),e=c(74099),f=c(47165);let g=/^[>❯]\s|^\?\s+/m,h=/[\u2800-\u28FF]|\(Esc to cancel|Reasoning\s+[■▪▮]|\.\.\.\s+Thinking/,i=/\besc\s+interrupt\b/,j=/\/\s+commands\b|\?\s+(?:help\b|for\s+shortcuts\b)/;function k(a){for(let b=a.length-1;b>=0;b--){let c=a[b];if(""!==c.trim()){if(i.test(c))return"working";if(j.test(c))return"idle";break}}return null}let l=/^─{10,}$/m,m=/^(?:─{10,}|╻▄{10,}|╹▀{10,})$/,n=/^ {0,2}[>❯┃]/;function o(a){let b=a=>m.test((0,d.aJ)(a).trim()),c=a.length-1;for(;c>=0&&""===(0,d.aJ)(a[c]).trim();)c--;if(c<0)return -1;let e=-1;for(let d=c;d>=Math.max(0,c-2);d--)if(b(a[d])){e=d;break}if(e<0)return -1;let f=-1;for(let c=e-1;c>=Math.max(0,e-40);c--)if(b(a[c])){f=c;break}return f<0||!n.test((0,d.aJ)(a[f+1]??""))?-1:Math.max(0,f-1)}let p=/^\s*[│└╰╭╮╯├┤┬┴┼]/,q=/^ {0,2}[>❯]\s+\S/,r="Get|Read|Run|Search|Write|Edit|Delete|List|Create|Fetch|Explore|Execute|Install|Asked user|Asking user|Model changed to:",s=RegExp(`^\\s*(?:\\/|\\{\\}|[A-Z][A-Z0-9+#]{1,3})\\s+(?:${r})[\\s:]`),t=/^ {2,}\S/,u=[/No copilot-instructions\.md found/,/Copilot uses AI, so always check for mistakes\./,/Copilot v\d[\w.]*\s+uses AI/,/^\s*(?:●\s+)?GitHub Copilot\s+v\d/m,/^\s*(?:●\s+)?Tip:\s*\//m,/Describe a task to get started/,/Prefer a visual workspace\?/,/what would you like to work on\?/i],v=/^(?=[^\n]*·)[^\n]*(?:↑\/?↓|\besc\s+(?:to\s+)?(?:cancel|close)\b)/m;function w(a){if(null!==k(a))return!1;let b=0;for(let c=a.length-1;c>=0;c--){let d=a[c],e=d.trim();if(""!==e){if(++b>3)break;if(!(e.startsWith("│")||e.endsWith("│"))&&v.test(d))return!0}}return!1}let x=["Confirm folder trust","Do you trust the files in this folder?"],y=/^[ \t]*(?:[>❯][ \t]*)?1\.[ \t]+Yes[ \t]*$/m,z=/^(?:Yes|Yes, and remember this folder for future sessions|No \(Esc\))$/,A="1";function B(a){return!!x.every(b=>a.includes(b))&&y.test((0,f._)(a))}let C=[e.fW,l,h,v,/^\s*⌄\s/,/^\s*[╻╹]?[▀▄]{10,}\s*$/,s,p,/^GitHub Copilot\s+v/,/[█▘▝▖▗▔▄▌▐]/,/[╭╮╰╯│]/,/\[⎇\s+\w[^\]]*\]/,/^shift\+tab\s/,/^\?\s+for\s+shortcuts/,/^ctrl\+[a-z]\s+\w/,/^[❯>]\s*(Type\s+@|$)/,/^\s*(?:●\s+)?Tip:\s*\//,/^\s*Current\s+Sessions\s+Issues\s+Pull requests\s+Gists\s*$/,/^Describe a task to get started/,/^Copilot uses AI, so always check for mistakes\.$/,/^● 💡/,/^● Environment loaded:/]},74099:(a,b,c)=>{c.d(b,{fW:()=>d});let d=/\[Pasted text #\d+/},79204:(a,b,c)=>{c.d(b,{F0:()=>v,Fw:()=>w,GT:()=>n,Tk:()=>h,V2:()=>e.iE,W1:()=>f,Wq:()=>i,XY:()=>u,aU:()=>k,g0:()=>m,hx:()=>l,j7:()=>j,ji:()=>g,l8:()=>t,lQ:()=>q,lX:()=>r});var d=c(94154),e=c(1804);let f=/^\s*[✻✽✶✢✳⦿◉●·⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]\s+\S+\s+for\s+(?:\d+m\s*)?\d+(?:\.\d+)?s(?:\s|$|\s*·)/,g=/^\s*╭─+\s*Claude Code v/,h=/^\s*[>❯]\s+\S/,i=/·\s*\/effort\s*$/,j=RegExp(`[✻✽⏺\xb7∴✢✳✶⦿◉●○◌◎⊙⊚⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]\\s+.+…|esc to interrupt`,"m"),k=/esc to interrupt/,l=/^[>❯](\s*$|\s+\S)/m,m=/^─{10,}$/m;function n(a){let b=(0,d.p4)(a);return null===b?-1:Math.max(0,b.openingSeparator-1)}let o=/Yes, I trust this folder/m,p=/^\s*[>❯]\s+\S/;function q(a){let b=a.split("\n"),c=s(b);if(-1===c)return null;for(let a=0;a<=3;a++)for(let d of 0===a?[0]:[-1,1]){let e=c+d*a;if(e<0||e>=b.length||!p.test(b[e]))continue;let f=d<0?"Down":"Up";return[...Array(a).fill(f),"Enter"]}return null}function r(a){return -1!==s(a.split("\n"))}function s(a){for(let b=a.length-1;b>=0;b--)if(o.test(a[b]))return a.slice(b+1).some(a=>m.test(a))?-1:b;return -1}let t=/Enter\s+to\s+set\s+as\s+default\b/i,u=/Enter\s+to\s+(?:select\s+.*to\s+navigate|confirm\s+·\s+(?:Esc|s\s+for\s+this\s+session\s+only)|set\s+as\s+default)/,v=["Claude Code cannot be launched inside another Claude Code session"],w=[/^Error:.*Claude Code/]},94154:(a,b,c)=>{c.d(b,{Di:()=>l,Zs:()=>r,ji:()=>q,mO:()=>n,p4:()=>f,q9:()=>s,wn:()=>p,zF:()=>m});var d=c(51297);let e=/^[>❯]/;function f(a){let b=a=>/^─{10,}$/.test((0,d.aJ)(a).trimEnd()),c=a.length-1;for(;c>=0&&""===a[c].trim();)c--;if(c<0)return null;let f=-1;for(let d=c;d>=Math.max(0,c-4);d--)if(b(a[d])){f=d;break}if(f<0)return null;let g=-1;for(let c=f-1;c>=Math.max(0,f-40);c--)if(b(a[c])){g=c;break}return g<0||!e.test((0,d.aJ)(a[g+1]??""))?null:{openingSeparator:g,closingSeparator:f}}let g=/^\u203A/;function h(a){return void 0===a||""===(0,d.aJ)(a).trim()}function i(a){if(void 0===a)return!1;let b=o(a);if(0===b.length||"›"!==b[0].ch||b[0].dim||b.length>1&&" "!==b[1].ch)return!1;let c=b.slice(2).find(a=>" "!==a.ch);return void 0===c||!c.bold}function j(a){if(!a.includes("\x1b"))return null;let b=o(a),c=b.findIndex(a=>""!==a.ch.trim());if(c<0||"›"!==b[c].ch)return null;let d=b[c];if(d.dim)return"transcript-echo";let e=b.slice(c+1).find(a=>""!==a.ch.trim());return e?.bold?"option":e?.dim?"composer":null!==d.fg&&e?.fg===d.fg?"option":"composer"}function k(a){return i(a)&&!function(a){if(void 0===a)return!1;let b=o(a);return b.length>1&&"›"===b[0].ch&&" "===b[1].ch&&b[1].bold}(a)}function l(a){for(let b=a.length-1;b>=0;b--){let c=j(a[b]);if("option"===c)break;if("composer"===c&&k(a[b]))return b}return -1}function m(a,b){for(let c=a.length-1;c>b;c--){let b=j(a[c]);if("option"===b)return!0;if("composer"===b&&k(a[c]))break}return!1}function n(a){let b=a.length-1;for(;b>=0&&h(a[b]);)b--;if(b<0)return null;for(let c=0;c<4&&b>=0;c++){let c=b,d=b;for(;d>0&&!h(a[d-1]);)d--;if(i(a[d]))return{firstRow:d,lastRow:Math.min(c,d+40-1)};for(b=d-1;b>=0&&h(a[b]);)b--}return null}function o(a){let b=[],c={dim:!1,bold:!1,fg:null},d=0;for(;d<a.length;){let e=a[d];if("\x1b"!==e){b.push({ch:e,dim:c.dim,bold:c.bold,fg:c.fg}),d++;continue}let f=a[d+1];if("["===f){let b=d+2;for(;b<a.length&&!/[A-Za-z]/.test(a[b]);)b++;if(b>=a.length)break;"m"===a[b]&&(c=function(a,b){let c=""===a?["0"]:a.split(";"),{dim:d,bold:e,fg:f}=b;for(let a=0;a<c.length;a++){let b=""===c[a]?0:Number(c[a]);if(!Number.isNaN(b)){if(38===b||48===b||58===b){let d=""===c[a+1]||void 0===c[a+1]?-1:Number(c[a+1]),e=5===d?2:2===d?4:1;38===b&&(f=c.slice(a+1,a+1+e).join(";")),a+=e;continue}0===b?(d=!1,e=!1,f=null):22===b?(d=!1,e=!1):1===b?e=!0:2===b?d=!0:39===b?f=null:(b>=30&&b<=37||b>=90&&b<=97)&&(f=String(b))}}return{dim:d,bold:e,fg:f}}(a.slice(d+2,b),c)),d=b+1;continue}if("]"===f){let b=d+2;for(;b<a.length;){if("\x07"===a[b]){b++;break}if("\x1b"===a[b]&&"\\"===a[b+1]){b+=2;break}b++}d=b;continue}d+=2}return b}let p=new Set(["claude","codex"]);function q(a,b){if(!p.has(b))return{text:"",state:"unsupported_tool"};let c=a.split("\n"),d=function(a,b){if("claude"===b){let b=f(a);return null===b?null:{firstRow:b.openingSeparator+1,lastRow:b.closingSeparator-1,glyph:e}}let c=n(a);return null===c?null:{firstRow:c.firstRow,lastRow:c.lastRow,glyph:g}}(c,b);return null===d?{text:"",state:"no_composer"}:t(c,d)}function r(a,b){let c=q(a,b);if("codex"!==b||"no_composer"===c.state||"unsupported_tool"===c.state)return c;let d=a.split("\n"),e=n(d);return null!==e&&m(d,e.firstRow)?{text:"",state:"no_composer"}:c}function s(a,b){let c=a.length-1;for(;c>=0&&h(a[c]);)c--;let d=c;for(;d>0&&!h(a[d-1]);)d--;let e=b;for(;e+1<a.length&&!h(a[e+1]);)e++;return t(a,{firstRow:b,lastRow:d>e?d-1:c,glyph:g})}function t(a,b){let c=[],d=[];for(let e=b.firstRow;e<=b.lastRow;e++){let f=function(a,b,c){if(b){let b=a.findIndex(a=>c.test(a.ch));if(b<0)return a;let d=b+1;return d<a.length&&/\s/.test(a[d].ch)&&d++,a.slice(d)}let d=0;for(;d<2&&d<a.length&&" "===a[d].ch;)d++;return a.slice(d)}(o(a[e]??""),e===b.firstRow,b.glyph);c.push(f.filter(a=>!a.dim).map(a=>a.ch).join("").trimEnd()),d.push(f.map(a=>a.ch).join("").trimEnd())}let e=u(c).join("\n");return""!==e.trim()?{text:e.slice(0,2e3),state:"content"}:{text:"",state:""===u(d).join("\n").trim()?"empty":"ghost"}}function u(a){let b=a.length;for(;b>0&&""===a[b-1].trim();)b--;return a.slice(0,b)}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=4911,exports.ids=[4911],exports.modules={3421:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71237),e=c(55088),f=c(17679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},5007:(a,b,c)=>{c.d(b,{Sw:()=>g,nE:()=>e,of:()=>f});var d=c(10641);async function e(a){try{return{ok:!0,body:await a.json()}}catch{return{ok:!1,response:d.NextResponse.json({error:"Invalid request body"},{status:400})}}}async function f(a){let b=await e(a);if(!b.ok)return b;let c=b.body;return"object"!=typeof c||null===c||Array.isArray(c)?{ok:!1,response:d.NextResponse.json({error:"Invalid request body"},{status:400})}:{ok:!0,body:c}}async function g(a){let b;try{b=await a.json()}catch{return{ok:!0,body:{}}}return"object"!=typeof b||null===b||Array.isArray(b)?{ok:!1,response:d.NextResponse.json({error:"Invalid request body"},{status:400})}:{ok:!0,body:b}}},27289:(a,b,c)=>{c.d(b,{t:()=>j,z:()=>i});var d=c(10641),e=c(88807),f=c(56791),g=c(95506),h=c(66007);function i(a){if(!a)return a;try{if(!(0,h.h6)(a))return a;let b=(0,e.getDbInstance)();return(0,g.l0)(b,a)??a}catch{return a}}function j(a){if(!(0,h.h6)(a))return d.NextResponse.json({error:"Invalid worktree ID format"},{status:400});let b=(0,e.getDbInstance)(),c=(0,f.getWorktreeById)(b,i(a));return c||d.NextResponse.json({error:"Worktree not found"},{status:404})}},56791:(a,b,c)=>{c.r(b),c.d(b,{ACTIVE_FILTER:()=>d.ks,ACTIVE_TASK_STATUSES:()=>d.EL,AgentInstanceLimitError:()=>d.AC,CURRENT_SCHEMA_VERSION:()=>f.FT,DEFAULT_RUN_HISTORY_LIMIT:()=>d.Tu,InvalidAgentInstanceError:()=>d.ug,MAX_DISABLED_REPOSITORIES:()=>h.nc,MAX_RUN_HISTORY_DAYS:()=>d.eP,MAX_RUN_HISTORY_LIMIT:()=>d.mg,MemoDbError:()=>d.lm,NEW_SUBSCRIPTION_DEFAULTS:()=>d.s6,PUSH_DEFAULTS_VERSION:()=>d.VP,RepositoryDbError:()=>h.j8,TASK_STATUSES:()=>d.Hi,TERMINAL_TASK_STATUSES:()=>d.sA,VERIFICATION_GATE_SOURCES:()=>d.Dx,VERIFICATION_TRIGGERS:()=>d.af,WORKTREE_TODO_STATUSES:()=>d.KG,addAgentInstance:()=>d.Uq,cancelTimer:()=>d.Ud,cancelTimersByWorktree:()=>d.$$,cleanupOldTimers:()=>d.ul,clearInProgressMessageId:()=>d.YX,clearLastUserMessage:()=>d.cf,clearTimerHistory:()=>d.jf,closeDbInstance:()=>e.closeDbInstance,countAgentInstances:()=>d.fs,countDisabledRepositories:()=>h.QJ,countPushSubscriptionsForKind:()=>d.rC,countWorktreesByRepositoryPath:()=>h.kp,createCloneJob:()=>h.tw,createGateResult:()=>d.hl,createMemo:()=>d.To,createMessage:()=>d.oH,createRepository:()=>h.vB,createTask:()=>d.UT,createTimer:()=>d.CR,createVerificationRun:()=>d.rY,createWorktreeTodo:()=>d.yy,deleteAllMessages:()=>d.pE,deleteMemo:()=>d.cP,deleteMessageById:()=>d.DF,deleteMessagesByCliTool:()=>d.lA,deleteMessagesByInstance:()=>d.Qp,deletePushSubscriptionByEndpoint:()=>d.th,deleteRepository:()=>h.oG,deleteRepositoryWorktrees:()=>d.oZ,deleteSessionState:()=>d.ZP,deleteWorktreeTodo:()=>d.vg,deleteWorktreesByIds:()=>d.Rm,disableExistingRepository:()=>h.eP,disableRepository:()=>h.l$,ensureEnvRepositoriesRegistered:()=>h.ES,filterExcludedPaths:()=>h.Ho,findMessageByRequestId:()=>d.Ow,finishGateResult:()=>d.C8,finishVerificationRun:()=>d.u$,getActiveCloneJobByUrl:()=>h.fD,getActiveTask:()=>d.__,getActiveTaskForInstance:()=>d.MH,getAgentInstance:()=>d.BN,getAgentInstances:()=>d.m0,getAliasedWorktreeIds:()=>d.r3,getAllPushSubscriptions:()=>d.Se,getAllRepositories:()=>h.Yg,getAllRepositoriesWithWorktreeCount:()=>h._D,getAllWorktreeAliases:()=>d.fX,getAllWorktreeIds:()=>d.nO,getAllWorktreePathIds:()=>d.Sj,getCloneJob:()=>h.bM,getCloneJobsByStatus:()=>h.n_,getCurrentVersion:()=>f.Mj,getDailyReport:()=>d.ap,getDbInstance:()=>e.getDbInstance,getDefaultDbPath:()=>g.$b,getExcludedRepositories:()=>h.lS,getExcludedRepositoryPaths:()=>h.pr,getInitialBranch:()=>d.p4,getIssueDbPath:()=>g.zm,getLastAssistantMessageAt:()=>d.nP,getLastMessage:()=>d.sy,getLastUserMessage:()=>d.r8,getLegacyDbPaths:()=>u,getMemoById:()=>d.DN,getMemosByWorktreeId:()=>d.pZ,getMessageById:()=>d.kA,getMessages:()=>d.VL,getMessagesByDateRange:()=>d.lr,getMigrationHistory:()=>f.PS,getPendingTimerCountByWorktree:()=>d.GF,getPendingTimers:()=>d._O,getPushSubscriptionByEndpoint:()=>d.CF,getPushSubscriptionsForKind:()=>d.gn,getRepositories:()=>d.NV,getRepositoryById:()=>h.r,getRepositoryByNormalizedUrl:()=>h.Uj,getRepositoryByPath:()=>h.Dp,getRunningVerificationRun:()=>d.WZ,getSessionState:()=>d.y1,getTask:()=>d.gg,getTimerById:()=>d.kx,getTimersByWorktree:()=>d.DP,getTodosByWorktreeId:()=>d.fr,getVerificationRun:()=>d.J6,getWorktreeAliases:()=>d.Q2,getWorktreeById:()=>d.Ui,getWorktreeIdsByRepository:()=>d.P9,getWorktreeTodoById:()=>d.eN,getWorktrees:()=>d.vi,getWorktreesByRepository:()=>d.uJ,initDatabase:()=>d.s4,isTerminalTaskStatus:()=>d.uB,isWorktreeTodoStatus:()=>d.yT,listRunningVerificationRuns:()=>d.Fi,listTaskEvents:()=>d.HB,listTasks:()=>d.Vk,listVerificationRuns:()=>d.Mt,listVerificationRunsForPeriod:()=>d.UE,markPendingPromptsAsAnswered:()=>d.PL,migrateDbIfNeeded:()=>w,migrateWorktreeIdPreservingChildren:()=>d._h,pushSubscriptionNeedsDefaultsNotice:()=>d.Zj,recomputeLastUserMessage:()=>d.jp,recordAnsweredPrompt:()=>d.pG,recordWorktreeAlias:()=>d.xJ,recoverStuckSendingTimers:()=>d.Xm,registerAndFilterRepositories:()=>h.$G,removeAgentInstance:()=>d.NU,reorderMemos:()=>d.nQ,reorderWorktreeTodos:()=>d.yb,resolveAndValidatePath:()=>t,resolveRepositoryPath:()=>h.mE,resolveWorktreeIdWithAlias:()=>d.l0,restoreRepository:()=>h.RS,rollbackMigrations:()=>f.Wy,runMigrations:()=>f.vI,saveDailyReport:()=>d.tt,saveInitialBranch:()=>d.GA,setAgentInstances:()=>d.Cs,setInProgressMessageId:()=>d.OF,setRepositoryEnabled:()=>h.iQ,updateCliToolId:()=>d.WU,updateCloneJob:()=>h.k5,updateDailyReportContent:()=>d.IF,updateFavorite:()=>d.O,updateLastUserMessage:()=>d.EU,updateLastViewedAt:()=>d.HZ,updateMemo:()=>d.UY,updateMessageContent:()=>d.e8,updatePromptData:()=>d.cw,updatePushSubscriptionPreferences:()=>d.jJ,updateRepository:()=>h.Ir,updateSelectedAgents:()=>d.DC,updateSessionState:()=>d.PP,updateStatus:()=>d.yB,updateTimerStatus:()=>d.j2,updateVibeLocalContextWindow:()=>d.s,updateVibeLocalModel:()=>d.iu,updateWorktreeDescription:()=>d.hq,updateWorktreeLink:()=>d.z1,updateWorktreeTodo:()=>d.bl,upsertPushSubscription:()=>d.jA,upsertWorktree:()=>d.ZL,validateDbPath:()=>g.Sv,validateRepositoryPath:()=>h.Ux,validateSchema:()=>f.i6});var d=c(683),e=c(88807),f=c(
|
|
1
|
+
"use strict";exports.id=4911,exports.ids=[4911],exports.modules={3421:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71237),e=c(55088),f=c(17679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},5007:(a,b,c)=>{c.d(b,{Sw:()=>g,nE:()=>e,of:()=>f});var d=c(10641);async function e(a){try{return{ok:!0,body:await a.json()}}catch{return{ok:!1,response:d.NextResponse.json({error:"Invalid request body"},{status:400})}}}async function f(a){let b=await e(a);if(!b.ok)return b;let c=b.body;return"object"!=typeof c||null===c||Array.isArray(c)?{ok:!1,response:d.NextResponse.json({error:"Invalid request body"},{status:400})}:{ok:!0,body:c}}async function g(a){let b;try{b=await a.json()}catch{return{ok:!0,body:{}}}return"object"!=typeof b||null===b||Array.isArray(b)?{ok:!1,response:d.NextResponse.json({error:"Invalid request body"},{status:400})}:{ok:!0,body:b}}},27289:(a,b,c)=>{c.d(b,{t:()=>j,z:()=>i});var d=c(10641),e=c(88807),f=c(56791),g=c(95506),h=c(66007);function i(a){if(!a)return a;try{if(!(0,h.h6)(a))return a;let b=(0,e.getDbInstance)();return(0,g.l0)(b,a)??a}catch{return a}}function j(a){if(!(0,h.h6)(a))return d.NextResponse.json({error:"Invalid worktree ID format"},{status:400});let b=(0,e.getDbInstance)(),c=(0,f.getWorktreeById)(b,i(a));return c||d.NextResponse.json({error:"Worktree not found"},{status:404})}},56791:(a,b,c)=>{c.r(b),c.d(b,{ACTIVE_FILTER:()=>d.ks,ACTIVE_TASK_STATUSES:()=>d.EL,AgentInstanceLimitError:()=>d.AC,CURRENT_SCHEMA_VERSION:()=>f.FT,DEFAULT_RUN_HISTORY_LIMIT:()=>d.Tu,InvalidAgentInstanceError:()=>d.ug,MAX_DISABLED_REPOSITORIES:()=>h.nc,MAX_RUN_HISTORY_DAYS:()=>d.eP,MAX_RUN_HISTORY_LIMIT:()=>d.mg,MemoDbError:()=>d.lm,NEW_SUBSCRIPTION_DEFAULTS:()=>d.s6,PUSH_DEFAULTS_VERSION:()=>d.VP,RepositoryDbError:()=>h.j8,TASK_STATUSES:()=>d.Hi,TERMINAL_TASK_STATUSES:()=>d.sA,TEST_DB_ROOT_ENV:()=>e.TEST_DB_ROOT_ENV,VERIFICATION_GATE_SOURCES:()=>d.Dx,VERIFICATION_TRIGGERS:()=>d.af,WORKTREE_TODO_STATUSES:()=>d.KG,addAgentInstance:()=>d.Uq,assertTestDatabasePathIsolated:()=>e.assertTestDatabasePathIsolated,cancelTimer:()=>d.Ud,cancelTimersByWorktree:()=>d.$$,cleanupOldTimers:()=>d.ul,clearInProgressMessageId:()=>d.YX,clearLastUserMessage:()=>d.cf,clearTimerHistory:()=>d.jf,closeDbInstance:()=>e.closeDbInstance,countAgentInstances:()=>d.fs,countDisabledRepositories:()=>h.QJ,countPushSubscriptionsForKind:()=>d.rC,countWorktreesByRepositoryPath:()=>h.kp,createCloneJob:()=>h.tw,createGateResult:()=>d.hl,createMemo:()=>d.To,createMessage:()=>d.oH,createRepository:()=>h.vB,createTask:()=>d.UT,createTimer:()=>d.CR,createVerificationRun:()=>d.rY,createWorktreeTodo:()=>d.yy,deleteAllMessages:()=>d.pE,deleteMemo:()=>d.cP,deleteMessageById:()=>d.DF,deleteMessagesByCliTool:()=>d.lA,deleteMessagesByInstance:()=>d.Qp,deletePushSubscriptionByEndpoint:()=>d.th,deleteRepository:()=>h.oG,deleteRepositoryWorktrees:()=>d.oZ,deleteSessionState:()=>d.ZP,deleteWorktreeTodo:()=>d.vg,deleteWorktreesByIds:()=>d.Rm,disableExistingRepository:()=>h.eP,disableRepository:()=>h.l$,ensureEnvRepositoriesRegistered:()=>h.ES,filterExcludedPaths:()=>h.Ho,findMessageByRequestId:()=>d.Ow,finishGateResult:()=>d.C8,finishVerificationRun:()=>d.u$,getActiveCloneJobByUrl:()=>h.fD,getActiveTask:()=>d.__,getActiveTaskForInstance:()=>d.MH,getAgentInstance:()=>d.BN,getAgentInstances:()=>d.m0,getAliasedWorktreeIds:()=>d.r3,getAllPushSubscriptions:()=>d.Se,getAllRepositories:()=>h.Yg,getAllRepositoriesWithWorktreeCount:()=>h._D,getAllWorktreeAliases:()=>d.fX,getAllWorktreeIds:()=>d.nO,getAllWorktreePathIds:()=>d.Sj,getCloneJob:()=>h.bM,getCloneJobsByStatus:()=>h.n_,getCurrentVersion:()=>f.Mj,getDailyReport:()=>d.ap,getDbInstance:()=>e.getDbInstance,getDefaultDbPath:()=>g.$b,getExcludedRepositories:()=>h.lS,getExcludedRepositoryPaths:()=>h.pr,getInitialBranch:()=>d.p4,getIssueDbPath:()=>g.zm,getLastAssistantMessageAt:()=>d.nP,getLastMessage:()=>d.sy,getLastUserMessage:()=>d.r8,getLegacyDbPaths:()=>u,getMemoById:()=>d.DN,getMemosByWorktreeId:()=>d.pZ,getMessageById:()=>d.kA,getMessages:()=>d.VL,getMessagesByDateRange:()=>d.lr,getMigrationHistory:()=>f.PS,getPendingTimerCountByWorktree:()=>d.GF,getPendingTimers:()=>d._O,getPushSubscriptionByEndpoint:()=>d.CF,getPushSubscriptionsForKind:()=>d.gn,getRepositories:()=>d.NV,getRepositoryById:()=>h.r,getRepositoryByNormalizedUrl:()=>h.Uj,getRepositoryByPath:()=>h.Dp,getRunningVerificationRun:()=>d.WZ,getSessionState:()=>d.y1,getTask:()=>d.gg,getTimerById:()=>d.kx,getTimersByWorktree:()=>d.DP,getTodosByWorktreeId:()=>d.fr,getVerificationRun:()=>d.J6,getWorktreeAliases:()=>d.Q2,getWorktreeById:()=>d.Ui,getWorktreeIdsByRepository:()=>d.P9,getWorktreeTodoById:()=>d.eN,getWorktrees:()=>d.vi,getWorktreesByRepository:()=>d.uJ,initDatabase:()=>d.s4,isInsideVitestWorker:()=>e.isInsideVitestWorker,isTerminalTaskStatus:()=>d.uB,isWorktreeTodoStatus:()=>d.yT,listRunningVerificationRuns:()=>d.Fi,listTaskEvents:()=>d.HB,listTasks:()=>d.Vk,listVerificationRuns:()=>d.Mt,listVerificationRunsForPeriod:()=>d.UE,markPendingPromptsAsAnswered:()=>d.PL,migrateDbIfNeeded:()=>w,migrateWorktreeIdPreservingChildren:()=>d._h,pushSubscriptionNeedsDefaultsNotice:()=>d.Zj,recomputeLastUserMessage:()=>d.jp,recordAnsweredPrompt:()=>d.pG,recordWorktreeAlias:()=>d.xJ,recoverStuckSendingTimers:()=>d.Xm,registerAndFilterRepositories:()=>h.$G,removeAgentInstance:()=>d.NU,reorderMemos:()=>d.nQ,reorderWorktreeTodos:()=>d.yb,resolveAndValidatePath:()=>t,resolveRepositoryPath:()=>h.mE,resolveWorktreeIdWithAlias:()=>d.l0,restoreRepository:()=>h.RS,rollbackMigrations:()=>f.Wy,runMigrations:()=>f.vI,saveDailyReport:()=>d.tt,saveInitialBranch:()=>d.GA,setAgentInstances:()=>d.Cs,setInProgressMessageId:()=>d.OF,setRepositoryEnabled:()=>h.iQ,updateCliToolId:()=>d.WU,updateCloneJob:()=>h.k5,updateDailyReportContent:()=>d.IF,updateFavorite:()=>d.O,updateLastUserMessage:()=>d.EU,updateLastViewedAt:()=>d.HZ,updateMemo:()=>d.UY,updateMessageContent:()=>d.e8,updatePromptData:()=>d.cw,updatePushSubscriptionPreferences:()=>d.jJ,updateRepository:()=>h.Ir,updateSelectedAgents:()=>d.DC,updateSessionState:()=>d.PP,updateStatus:()=>d.yB,updateTimerStatus:()=>d.j2,updateVibeLocalContextWindow:()=>d.s,updateVibeLocalModel:()=>d.iu,updateWorktreeDescription:()=>d.hq,updateWorktreeLink:()=>d.z1,updateWorktreeTodo:()=>d.bl,upsertPushSubscription:()=>d.jA,upsertWorktree:()=>d.ZL,validateDbPath:()=>g.Sv,validateRepositoryPath:()=>h.Ux,validateSchema:()=>f.i6});var d=c(683),e=c(88807),f=c(28445),g=c(20416),h=c(10406),i=c(87550),j=c.n(i),k=c(55511),l=c.n(k),m=c(29021),n=c.n(m),o=c(33873),p=c.n(o),q=c(21820),r=c(7956);let s=(0,c(72626).h)("db-migration-path");function t(a,b){try{if(!n().existsSync(a))return null;let c=n().realpathSync(a);if((0,r.fW)(c))return s.warn(`[Security] ${b} points to system directory, skipping: ${c}`),null;return c}catch{return s.warn(`[Security] Failed to resolve ${b}: ${a}`),null}}function u(){let a=[];a.push(p().join(process.cwd(),"data","db.sqlite")),a.push(p().join(process.cwd(),"data","cm.db")),a.push(p().join((0,q.homedir)(),".commandmate","data","db.sqlite"));let b=process.env.DATABASE_PATH;if(b)try{let c=p().resolve(b);(0,r.fW)(c)?s.warn(`[Security] Skipping DATABASE_PATH in system directory: ${c}`):a.push(b)}catch{s.warn(`[Security] Invalid DATABASE_PATH: ${b}`)}return a}function v(a,b){if(function(a){try{return n().statSync(`${a}-wal`).size>0}catch{return!1}}(a)){let c=`${b}.${l().randomBytes(4).toString("hex")}.partial`;try{n().closeSync(n().openSync(c,"wx",384));let d=new(j())(a,{readonly:!0,fileMustExist:!0});try{d.prepare("VACUUM INTO ?").run(c)}finally{d.close()}n().renameSync(c,b)}catch(a){throw n().rmSync(c,{force:!0}),a}}else n().copyFileSync(a,b)}function w(a){let b=p().resolve(a);if((0,r.fW)(b))throw Error(`Security error: Target path cannot be in system directory: ${b}`);if(n().existsSync(a)){let b=t(a,"target path");if(b)return{migrated:!1,targetPath:b}}for(let a of u()){let c=t(a,"legacy path");if(!c)continue;let d=`${c}.bak`;v(c,d),n().chmodSync(d,384);let e=p().dirname(b);return n().existsSync(e)||n().mkdirSync(e,{recursive:!0,mode:448}),v(c,b),s.info(`[Migration] Database migrated from ${c} to ${b}`),s.info(`[Migration] Backup created at ${d}`),{migrated:!0,sourcePath:c,targetPath:b,backupPath:d}}return{migrated:!1,targetPath:b}}},79498:(a,b,c)=>{c.d(b,{Ll:()=>e,Z:()=>d,bu:()=>f});let d=50,e=2e3,f=4e3},95736:(a,b,c)=>{a.exports=c(44870)}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=4936,exports.ids=[2839,4936,5220,5630],exports.modules={2669:(a,b,c)=>{c.d(b,{JI:()=>n,M7:()=>d,Sr:()=>h,Zf:()=>f,c7:()=>e,lU:()=>k,mR:()=>j,qO:()=>i,su:()=>m,wQ:()=>l});let d="SESSION_STARTING",e="SESSION_START_FAILED",f="SESSION_START_UNAVAILABLE",g=[d,e];class h extends Error{constructor(a,b,c){super(`${a} did not reach its input prompt within ${Math.round(c/1e3)}s (initialization timeout). The tmux session '${b}' and its process are still running, so this is a slow start, not a failed one — the message was not delivered, but nothing needs repairing. Retry the send in a few seconds, or run \`commandmate capture <worktree-id>\` to see what it is waiting on.`),this.toolName=a,this.sessionName=b,this.timeoutMs=c,this.code=d,this.name="SessionStartTimeoutError"}}function i(a,b){return`${a} exited before reaching its input prompt: the tmux session '${b}' is back at a shell, so this is not a slow start and waiting will not help. The message was not delivered. Run \`commandmate capture <worktree-id>\` to see why it exited (for example a startup dialog answered with exit, or a missing login), fix that, then send again.`}class j extends Error{constructor(a,b,c){super(`${a} reported an error while starting in tmux session '${b}': "${c}". Retrying will not help until that is resolved; run \`commandmate capture <worktree-id>\` to see the session output.`),this.toolName=a,this.sessionName=b,this.detectedPattern=c,this.code=e,this.name="SessionStartFailedError"}}class k extends Error{constructor(a,b=`${a} is not installed. Please install it first.`){super(b),this.toolName=a,this.code=f,this.name="SessionStartUnavailableError"}}function l(a){return o(a)===d}function m(a){let b=o(a);return void 0!==b&&g.includes(b)}function n(a){return o(a)===f}function o(a){if("object"!=typeof a||null===a)return;let b=a.code;return"string"==typeof b?b:void 0}},22354:(a,b,c)=>{c.d(b,{F0:()=>j.F,K9:()=>e.K9,VM:()=>d.VM,_0:()=>f._0,c1:()=>k.c,o:()=>i.o,vm:()=>h.v,y_:()=>g.y_});var d=c(70096);c(66101);var e=c(45567);c(57510),c(38367);var f=c(25071),g=c(50474),h=c(70997),i=c(77904),j=c(76835),k=c(2734)},39687:(a,b,c)=>{c.d(b,{d:()=>A});var d=c(56791),e=c(8360),f=c(15194),g=c(95220),h=c(12462),i=c(43015),j=c(54325),k=c(72626),l=c(34331),m=c(40964),n=c(58707),o=c(2669),p=c(31990),q=c(20029),r=c(7321),s=c(94154),t=c(34405),u=c(49973),v=c(49319);let w=(0,k.h)("session/send-user-message");function x(a){return a instanceof Error?a.message:String(a)}async function y(a,b){let c=`${a}:${b}`,d=Date.now()+5e3;for(;(0,g.getActivePollers)().includes(c);){if(Date.now()>=d)return!1;await new Promise(a=>setTimeout(a,100))}return!0}async function z(a,b,c,d){if(!s.wn.has(b))return!1;try{let e=await (0,p.WD)(a,b,t._,c),f=(0,s.ji)(e,b);return"content"===f.state&&(0,q.C7)(f.text,d)}catch(a){return w.warn("send-composer-residue-read-failed",{error:x(a)}),!1}}async function A(a,b){let{worktreeId:c,content:k,cliToolId:p,instanceId:t,absoluteImagePath:A,copilotModel:B}=b,C=b.messageType??"normal",D=t??p,E=e.CLIToolManager.getInstance().getTool(p),F=(a,d)=>{(0,q.zE)({worktreeId:c,cliToolId:p,instanceId:D},{state:a,reason:d,content:k}),b.onAttempt?.({state:a,reason:d})},G=(0,m.mf)(p,c,t),H=await (0,l.L)(c,G,a);if(null===H||"foreign"===H.verdict)return F("not-sent","foreign-session"),w.warn("send-refused-foreign-session",{worktreeId:c,cliToolId:p,instanceId:D,sessionName:G,sessionPath:H?.sessionPath??null,reason:H?"foreign":"worktree_not_found"}),{ok:!1,stage:"foreign_session",error:H?`tmux session "${G}" belongs to another CommandMate server`:`Worktree '${c}' not found; cannot confirm tmux session "${G}" is this server's`};let I=await (0,n.a3)(c,p,t,{ignoreStructured:b.ignoreStructuredPromptGuard});if(I.waiting)return F("not-sent","prompt-waiting"),w.info("send-refused-prompt-waiting",{worktreeId:c,cliToolId:p,reason:I.reason,blockedBy:I.blockedBy}),{ok:!1,stage:"prompt_waiting",error:(0,n.br)(c,I.blockedBy,t)};if(B&&"copilot"===p){try{await E.sendModelCommand(c,B,t),w.info("copilot-model-command-sent",{model:B})}catch(b){w.error("failed-to-send-model-command:",{error:x(b)});let a=b?.code;if(a===r.a9)return F("not-sent","prompt-waiting"),{ok:!1,stage:"prompt_waiting",error:(0,n.br)(c,void 0,t)};return F("not-sent",a===r.$_?"recheck-failed":"model-switch-failed"),{ok:!1,stage:"model",error:x(b)}}await y(c,D)||w.warn("previous-turn-poller-still-running",{worktreeId:c,instanceId:D,waitedMs:5e3})}let J=new Date;try{await (0,h.o4)(a,c,p,J,t)}catch(a){w.error("failed-to-save-pending-assistant-response:",{error:x(a)})}let K=null;try{let b=(0,d.getMessages)(a,c,{limit:1,cliToolId:p,instanceId:D,matchResolvedInstance:!0});b.length>0&&"user"===b[0].role&&b[0].content===k&&(K=b[0].id)}catch(a){w.error("failed-to-detect-orphaned-messages:",{error:x(a)})}async function L(){try{let{inputStartedAt:a}=await (0,u.x1)(M,b.onInputStart,b.inputBoundary);return{sent:!0,inputStartedAt:a}}catch(b){if(w.error("failed-to-send-message-to:",{error:x(b)}),(0,u.fi)(b))return{error:b,failure:{state:"not-sent",reason:"relay-reservation-lost"}};let a=(0,q.Nq)(b);return("submit-unconfirmed"===a.reason||"prompt-unreported"===a.reason)&&await z(c,p,t,k)&&(a={state:"indeterminate",reason:"composer-residue"}),{error:b,failure:a}}}async function M(){A?(0,f._J)(E)?await E.sendMessageWithImage(c,k,A,t):await E.sendMessage(c,(0,v.TZ)(k,A),t):await E.sendMessage(c,k,t)}let N=s.wn.has(p)?await (0,u.hC)(G,()=>L()).catch(a=>({error:a,failure:(0,q.Nq)(a)})):await L();if(!("sent"in N)){let{error:a,failure:b}=N;return(F(b.state,b.reason),"prompt-waiting"===b.reason)?{ok:!1,stage:"prompt_waiting",error:(0,n.br)(c,void 0,t)}:(0,o.wQ)(a)?{ok:!1,stage:"send",error:a.message,code:o.M7}:{ok:!1,stage:"send",error:x(a)}}F("sent","submitted");let O=N.inputStartedAt,P=null!==O&&O.getTime()>J.getTime()?O:J,Q=(0,d.createMessage)(a,{worktreeId:c,role:"user",content:k,messageType:C,timestamp:P,cliToolId:p,instanceId:t,requestId:b.requestId});try{(0,i.broadcastMessage)("message",{worktreeId:c,message:{...Q,cliToolId:p,instanceId:D}})}catch(a){w.warn("user-message-broadcast-failed",{error:x(a)})}if(K)try{if((0,d.deleteMessageById)(a,K)){w.info("cleaned-up-orphaned-user");try{(0,i.broadcastMessage)(j.dz,{worktreeId:c,cliToolId:p,instanceId:D,reason:"orphan_cleanup"})}catch(a){w.warn("orphan-cleanup-broadcast-failed",{error:x(a)})}}}catch(a){w.error("failed-to-clean-up-orphaned-message:",{error:x(a)})}return(0,d.updateLastUserMessage)(a,c,k,P),(0,d.clearInProgressMessageId)(a,c,p,t),w.info("cleared-in-progress-message"),(0,g.startPolling)(c,p,t),{ok:!0,message:Q}}},50474:(a,b,c)=>{c.d(b,{y_:()=>d});function d(a){var b=a.noDecision;switch(b.kind){case"proceeds":return{safe:!0,blocksForMs:0,summary:"the agent continues with its own approval flow"};case"blocks":return{safe:!1,blocksForMs:null,summary:"the agent waits indefinitely; nothing else will unblock it"};case"blocksUntil":return{safe:!1,blocksForMs:b.timeoutMs,summary:`the agent waits up to ${b.timeoutMs}ms before continuing`}}}},58707:(a,b,c)=>{c.d(b,{$n:()=>k,a3:()=>l,br:()=>m});var d=c(8360),e=c(31990),f=c(95595),g=c(34405),h=c(72626),i=c(30008);let j=(0,h.h)("prompt-waiting-guard"),k="PROMPT_WAITING";async function l(a,b,c,h){try{let k=d.CLIToolManager.getInstance().getTool(b);if(!await k.isRunning(a,c))return{waiting:!1};let l=await (0,e.Wh)(a,b,g._,c),m=(0,f.WC)(l,b),n=(0,i._G)({worktreeId:a,cliToolId:b,instanceId:c,scraper:{status:m.status,reason:m.reason,hasActivePrompt:m.hasActivePrompt},ignoreStructured:h?.ignoreStructured});if(!n.blocksSend)return null!==n.structuredSendBlockSuppressed&&j.info("structured-send-guard-not-applied",{worktreeId:a,cliToolId:b,instanceId:c,suppressed:n.structuredSendBlockSuppressed,promptWaitingSince:n.structured?.at??null}),{waiting:!1};return{waiting:!0,reason:n.blockReason??void 0,blockedBy:n.blockedBy??void 0}}catch(c){return j.warn("prompt-waiting-check-failed",{worktreeId:a,cliToolId:b,error:c instanceof Error?c.message:String(c)}),{waiting:!1}}}function m(a,b,c){let d=c?` --instance ${c}`:"",e=`${a} is waiting on a prompt. Sending now would type into the prompt's input line instead of reaching the agent, and would leave that text in place for the next answer. Answer the prompt first: \`commandmate respond ${a} <answer>${d}\`.`;if("structured"!==b)return e;let f=Math.round(i.j0/6e4);return`${e} This dialog was reported by the agent's own hooks and is not visible to the terminal scraper, so if the pane looks idle the record has outlived its dialog: it stops blocking sends ${f} minutes after it was reported, or immediately with \`commandmate send ${a} <message>${d} --ignore-structured-prompt\` (server-wide: ${i.F1}=off).`}},73495:(a,b,c)=>{c.d(b,{Me:()=>h});let d="don['’]t",e=["deny",/^No(?:,|$)/],f={claude:[["allow-once",/^Yes$/],["allow-persistent",/^Yes, and always allow\b/],["mode-change",/^Yes, allow all edits\b/],["mode-change",/^Yes, and switch to\b/],e],codex:[["allow-once",/^Yes$/],["allow-once",/^Yes, proceed\b/],["allow-once",/^Allow(?:\s{2,}|$)/],["allow-persistent",RegExp(`^Yes, and ${d} ask again\\b`)],["allow-persistent",/^Always allow\b/],["mode-change",/^Ask for approval\b/],["mode-change",/^Approve for me\b/],["mode-change",/^Full Access\b/],["deny",/^Cancel\b/],e],antigravity:[["allow-once",/^Yes$/],["allow-once",/^Yes, run command$/],["allow-once",/^Yes, allow creation$/],["allow-persistent",/^Yes, and always allow\b/],e],"command-code":[["allow-once",/^Yes$/],["allow-persistent",RegExp(`^Yes, ${d} ask again\\b`)],["mode-change",/^Yes, allow all edits\b/],e],copilot:[["allow-once",/^Yes$/],["allow-persistent",RegExp(`^Yes, and ${d} ask again\\b`)],["mode-change",/^Manual\b/],["mode-change",/^Allow all\b/],e]},g=Object.values(f).flat();function h(a,b){let c=void 0===b?g:f[b]??null;if(null===c)return{kind:"not-a-permission-dialog"};let d=a.map(a=>(function(a,b){let c=b.trim();for(let[b,d]of a)if(d.test(c))return b;return"unknown"})(c,a.label));if(!d.some(a=>"allow-once"===a||"allow-persistent"===a||"mode-change"===a))return{kind:"not-a-permission-dialog"};let e=a.filter((a,b)=>"allow-once"===d[b]);return 1===e.length?{kind:"allow-once",option:e[0]}:{kind:"unidentified",allowOnceCount:e.length}}Object.keys(f)},95220:(a,b,c)=>{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.bE,migrateResponsePollerWorktreeIds:()=>d.sR,normalizeCopilotLine:()=>g.IW,normalizePromptForDedup:()=>h.zm,renamePromptHashCacheKey:()=>h.i2,resolveExtractionStartIndex:()=>e.QM,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)}};
|
|
1
|
+
"use strict";exports.id=4936,exports.ids=[2839,4936,5220,7926],exports.modules={22354:(a,b,c)=>{c.d(b,{F0:()=>j.F,K9:()=>e.K9,VM:()=>d.VM,_0:()=>f._0,c1:()=>k.c,o:()=>i.o,vm:()=>h.v,y_:()=>g.y_});var d=c(70096);c(66101);var e=c(45567);c(57510),c(38367);var f=c(25071),g=c(50474),h=c(70997),i=c(77904),j=c(76835),k=c(2734)},39687:(a,b,c)=>{c.d(b,{d:()=>A});var d=c(56791),e=c(12693),f=c(15194),g=c(95220),h=c(12462),i=c(43015),j=c(54325),k=c(72626),l=c(34331),m=c(40964),n=c(58707),o=c(2669),p=c(31990),q=c(20029),r=c(7321),s=c(94154),t=c(34405),u=c(49973),v=c(90580);let w=(0,k.h)("session/send-user-message");function x(a){return a instanceof Error?a.message:String(a)}async function y(a,b){let c=`${a}:${b}`,d=Date.now()+5e3;for(;(0,g.getActivePollers)().includes(c);){if(Date.now()>=d)return!1;await new Promise(a=>setTimeout(a,100))}return!0}async function z(a,b,c,d){if(!s.wn.has(b))return!1;try{let e=await (0,p.WD)(a,b,t._,c),f=(0,s.ji)(e,b);return"content"===f.state&&(0,q.C7)(f.text,d)}catch(a){return w.warn("send-composer-residue-read-failed",{error:x(a)}),!1}}async function A(a,b){let c,{worktreeId:k,content:p,cliToolId:t,instanceId:A,absoluteImagePath:B,copilotModel:C,respondAgent:D}=b,E=b.observedInputGeneration??(0,u.RW)(),F=b.messageType??"normal",G=A??t,H=e.CLIToolManager.getInstance().getTool(t),I=B?(0,f._J)(H)?H.imageMessageBody?.(p,B)??p:(0,v.TZ)(p,B):p,J=!1,K=!1,L=(a,d)=>{let e=K||void 0===c&&J?{}:void 0!==c?{inputGeneration:c}:"not-sent"===a?{observedGeneration:E}:{};(0,q.zE)({worktreeId:k,cliToolId:t,instanceId:G},{state:a,reason:d,content:p,...I!==p?{typedContent:I}:{},...e}),b.onAttempt?.({state:a,reason:d})},M=(0,m.mf)(t,k,A),N=await (0,l.L)(k,M,a);if(null===N||"foreign"===N.verdict)return L("not-sent","foreign-session"),w.warn("send-refused-foreign-session",{worktreeId:k,cliToolId:t,instanceId:G,sessionName:M,sessionPath:N?.sessionPath??null,reason:N?"foreign":"worktree_not_found"}),{ok:!1,stage:"foreign_session",error:N?`tmux session "${M}" belongs to another CommandMate server`:`Worktree '${k}' not found; cannot confirm tmux session "${M}" is this server's`};let O=await (0,n.a3)(k,t,A,{ignoreStructured:b.ignoreStructuredPromptGuard});if(O.waiting)return L("not-sent","prompt-waiting"),w.info("send-refused-prompt-waiting",{worktreeId:k,cliToolId:t,reason:O.reason,blockedBy:O.blockedBy}),{ok:!1,stage:"prompt_waiting",error:(0,n.br)(k,O.blockedBy,A,D)};if(C&&"copilot"===t){try{await H.sendModelCommand(k,C,A),w.info("copilot-model-command-sent",{model:C})}catch(b){w.error("failed-to-send-model-command:",{error:x(b)});let a=b?.code;if(a===r.a9)return L("not-sent","prompt-waiting"),{ok:!1,stage:"prompt_waiting",error:(0,n.br)(k,void 0,A,D)};return L("not-sent",a===r.$_?"recheck-failed":"model-switch-failed"),{ok:!1,stage:"model",error:x(b)}}await y(k,G)||w.warn("previous-turn-poller-still-running",{worktreeId:k,instanceId:G,waitedMs:5e3})}let P=new Date;try{await (0,h.o4)(a,k,t,P,A)}catch(a){w.error("failed-to-save-pending-assistant-response:",{error:x(a)})}let Q=null;try{let b=(0,d.getMessages)(a,k,{limit:1,cliToolId:t,instanceId:G,matchResolvedInstance:!0});b.length>0&&"user"===b[0].role&&b[0].content===p&&(Q=b[0].id)}catch(a){w.error("failed-to-detect-orphaned-messages:",{error:x(a)})}async function R(){try{let{inputStartedAt:a}=await (0,u.x1)(S,a=>{void 0===c&&(J=!0),b.onInputStart?.(a)},b.inputBoundary,{onTicket:a=>{c=void 0===c?a:Math.max(c,a)},onDispatch:()=>{K=!0}});return{sent:!0,inputStartedAt:a}}catch(b){if(w.error("failed-to-send-message-to:",{error:x(b)}),(0,u.fi)(b))return{error:b,failure:{state:"not-sent",reason:"relay-reservation-lost"}};let a=(0,q.Nq)(b);return("submit-unconfirmed"===a.reason||"prompt-unreported"===a.reason)&&await z(k,t,A,p)&&(a={state:"indeterminate",reason:"composer-residue"}),{error:b,failure:a}}}async function S(){B?(0,f._J)(H)?await H.sendMessageWithImage(k,p,B,A):await H.sendMessage(k,(0,v.TZ)(p,B),A):await H.sendMessage(k,p,A)}let T=s.wn.has(t)?await (0,u.hC)(M,a=>(c=a.generation,R())).catch(a=>({error:a,failure:(0,q.Nq)(a)})):await R();if(!("sent"in T)){let{error:a,failure:b}=T;return(L(b.state,b.reason),"prompt-waiting"===b.reason)?{ok:!1,stage:"prompt_waiting",error:(0,n.br)(k,void 0,A,D)}:(0,o.wQ)(a)?{ok:!1,stage:"send",error:a.message,code:o.M7}:{ok:!1,stage:"send",error:x(a)}}L("sent","submitted");let U=T.inputStartedAt,V=null!==U&&U.getTime()>P.getTime()?U:P,W=(0,d.createMessage)(a,{worktreeId:k,role:"user",content:p,messageType:F,timestamp:V,cliToolId:t,instanceId:A,requestId:b.requestId});try{(0,i.broadcastMessage)("message",{worktreeId:k,message:{...W,cliToolId:t,instanceId:G}})}catch(a){w.warn("user-message-broadcast-failed",{error:x(a)})}if(Q)try{if((0,d.deleteMessageById)(a,Q)){w.info("cleaned-up-orphaned-user");try{(0,i.broadcastMessage)(j.dz,{worktreeId:k,cliToolId:t,instanceId:G,reason:"orphan_cleanup"})}catch(a){w.warn("orphan-cleanup-broadcast-failed",{error:x(a)})}}}catch(a){w.error("failed-to-clean-up-orphaned-message:",{error:x(a)})}return(0,d.updateLastUserMessage)(a,k,p,V),(0,d.clearInProgressMessageId)(a,k,t,A),w.info("cleared-in-progress-message"),(0,g.startPolling)(k,t,A),{ok:!0,message:W}}},50474:(a,b,c)=>{c.d(b,{y_:()=>d});function d(a){var b=a.noDecision;switch(b.kind){case"proceeds":return{safe:!0,blocksForMs:0,summary:"the agent continues with its own approval flow"};case"blocks":return{safe:!1,blocksForMs:null,summary:"the agent waits indefinitely; nothing else will unblock it"};case"blocksUntil":return{safe:!1,blocksForMs:b.timeoutMs,summary:`the agent waits up to ${b.timeoutMs}ms before continuing`}}}},58707:(a,b,c)=>{c.d(b,{$n:()=>l,a3:()=>m,br:()=>n});var d=c(12693),e=c(99702),f=c(31990),g=c(95595),h=c(34405),i=c(72626),j=c(30008);let k=(0,i.h)("prompt-waiting-guard"),l="PROMPT_WAITING";async function m(a,b,c,e){try{let i=d.CLIToolManager.getInstance().getTool(b);if(!await i.isRunning(a,c))return{waiting:!1};let l=await (0,f.Wh)(a,b,h._,c),m=(0,g.WC)(l,b),n=(0,j._G)({worktreeId:a,cliToolId:b,instanceId:c,scraper:{status:m.status,reason:m.reason,hasActivePrompt:m.hasActivePrompt},ignoreStructured:e?.ignoreStructured});if(!n.blocksSend)return null!==n.structuredSendBlockSuppressed&&k.info("structured-send-guard-not-applied",{worktreeId:a,cliToolId:b,instanceId:c,suppressed:n.structuredSendBlockSuppressed,promptWaitingSince:n.structured?.at??null}),{waiting:!1};return{waiting:!0,reason:n.blockReason??void 0,blockedBy:n.blockedBy??void 0}}catch(c){return k.warn("prompt-waiting-check-failed",{worktreeId:a,cliToolId:b,error:c instanceof Error?c.message:String(c)}),{waiting:!1}}}function n(a,b,c,d){let f=(0,e.Mo)(c,d),g=`${a} is waiting on a prompt. Sending now would type into the prompt's input line instead of reaching the agent, and would leave that text in place for the next answer. Answer the prompt first: \`commandmate respond ${a} <answer>${f}\`.`;if("structured"!==b)return g;let h=Math.round(j.j0/6e4);return`${g} This dialog was reported by the agent's own hooks and is not visible to the terminal scraper, so if the pane looks idle the record has outlived its dialog: it stops blocking sends ${h} minutes after it was reported, or immediately with \`commandmate send ${a} <message>${f} --ignore-structured-prompt\` (server-wide: ${j.F1}=off).`}},73495:(a,b,c)=>{c.d(b,{Me:()=>h});let d="don['’]t",e=["deny",/^No(?:,|$)/],f={claude:[["allow-once",/^Yes$/],["allow-persistent",/^Yes, and always allow\b/],["mode-change",/^Yes, allow all edits\b/],["mode-change",/^Yes, and switch to\b/],e],codex:[["allow-once",/^Yes$/],["allow-once",/^Yes, proceed\b/],["allow-once",/^Allow(?:\s{2,}|$)/],["allow-persistent",RegExp(`^Yes, and ${d} ask again\\b`)],["allow-persistent",/^Always allow\b/],["mode-change",/^Ask for approval\b/],["mode-change",/^Approve for me\b/],["mode-change",/^Full Access\b/],["deny",/^Cancel\b/],e],antigravity:[["allow-once",/^Yes$/],["allow-once",/^Yes, run command$/],["allow-once",/^Yes, allow creation$/],["allow-persistent",/^Yes, and always allow\b/],e],"command-code":[["allow-once",/^Yes$/],["allow-persistent",RegExp(`^Yes, ${d} ask again\\b`)],["mode-change",/^Yes, allow all edits\b/],e],copilot:[["allow-once",/^Yes$/],["allow-persistent",RegExp(`^Yes, and ${d} ask again\\b`)],["mode-change",/^Manual\b/],["mode-change",/^Allow all\b/],e]},g=Object.values(f).flat();function h(a,b){let c=void 0===b?g:f[b]??null;if(null===c)return{kind:"not-a-permission-dialog"};let d=a.map(a=>(function(a,b){let c=b.trim();for(let[b,d]of a)if(d.test(c))return b;return"unknown"})(c,a.label));if(!d.some(a=>"allow-once"===a||"allow-persistent"===a||"mode-change"===a))return{kind:"not-a-permission-dialog"};let e=a.filter((a,b)=>"allow-once"===d[b]);return 1===e.length?{kind:"allow-once",option:e[0]}:{kind:"unidentified",allowOnceCount:e.length}}Object.keys(f)},95220:(a,b,c)=>{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.bE,migrateResponsePollerWorktreeIds:()=>d.sR,normalizeCopilotLine:()=>g.IW,normalizePromptForDedup:()=>h.zm,renamePromptHashCacheKey:()=>h.i2,resolveExtractionStartIndex:()=>e.QM,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)}};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";exports.id=5209,exports.ids=[5209],exports.modules={998:(a,b,c)=>{c.d(b,{BF:()=>h,EH:()=>k,_R:()=>j});var d=c(11456),e=c(35524);let f={"session-killed":{state:"disable",poller:"stop"},"instance-removed":{state:"delete",poller:"stop"},"worktree-deleted":{state:"delete",poller:"stop"},"orphan-swept":{state:"delete",poller:"stop"},"consecutive-errors":{state:"disable",stopReason:"consecutive_errors",poller:"stop"},"server-shutdown":{state:"none",poller:"stop"}},g={"session-killed":"session-killed","instance-removed":"instance-removed","worktree-deleted":"worktree-deleted","orphan-swept":"orphan-swept","consecutive-errors":"consecutive-errors","server-shutdown":"shutdown"};function h(a,b){"stop"===f[a].poller&&(0,d.z)(g[a],()=>(function(a){switch(a.scope){case"instance":(0,e._i)((0,e.v7)(a.worktreeId,a.cliToolId,a.instanceId));return;case"worktree":(0,e._C)(a.worktreeId);return;case"key":(0,e._i)(a.compositeKey);return;case"all":(0,e.BS)();return}})(b))}function i(a,b){let c=(0,e.pL)(a);c&&(0,e.XK)((0,e.Ue)(a),c,b,(0,e.GE)(a)??void 0)}function j(a,b){let c=f[a];if("none"!==c.state)switch(b.scope){case"instance":"disable"===c.state?(0,e.XK)(b.worktreeId,b.cliToolId,c.stopReason,b.instanceId):(0,e.DR)((0,e.v7)(b.worktreeId,b.cliToolId,b.instanceId));return;case"worktree":"disable"===c.state?(0,e.kC)(b.worktreeId).forEach(a=>i(a,c.stopReason)):(0,e.LP)(b.worktreeId);return;case"key":"disable"===c.state?i(b.compositeKey,c.stopReason):(0,e.DR)(b.compositeKey);return;case"all":(0,e.hN)().forEach(a=>"disable"===c.state?i(a,c.stopReason):(0,e.DR)(a));return}}function k(a,b){h(a,b),j(a,b)}},23197:(a,b,c)=>{c.d(b,{H:()=>d});let d="__global__"},65209:(a,b,c)=>{c.d(b,{Nz:()=>v,l7:()=>z,vr:()=>x});var d=c(95220),e=c(998),f=c(56793),g=c(85775),h=c(93997),i=c(15194),j=c(23197),k=c(77093),l=c(72626),m=c(
|
|
2
|
-
`,{encoding:"utf8",mode:384}),!function(a,b){let c,e=m(b-2592e6);try{c=(0,d.readdirSync)(a)}catch{return}for(let b of c){let c=i.exec(b)?.[1];if(void 0!==c&&!(c>=e))try{(0,d.rmSync)((0,f.join)(a,b),{force:!0})}catch{}}}(b,a.at),!0}catch{return!1}}function o(a){return null===a||"string"==typeof a}function p(a,b,c=l()){if(!(a<=b))return[];a=Math.max(a,b-2592e6-864e5);let e=[];for(let i=Date.parse(`${m(a)}T00:00:00.000Z`);i<=b;i+=864e5){let l;try{l=(0,d.readFileSync)((0,f.join)(c,`${m(i)}.jsonl`),"utf8")}catch{continue}for(let c of l.split("\n")){let d;if(""!==c.trim()){var g;try{d=JSON.parse(c)}catch{continue}"object"==typeof(g=d)&&null!==g&&g.version===h&&"number"==typeof g.at&&"string"==typeof g.api&&j.includes(g.api)&&"string"==typeof g.origin&&k.includes(g.origin)&&"string"==typeof g.worktreeId&&""!==g.worktreeId&&o(g.instanceId)&&Array.isArray(g.sessionNames)&&g.sessionNames.every(a=>"string"==typeof a)&&o(g.callerCwd)&&o(g.callerSession)&&d.at>=a&&d.at<=b&&e.push(d)}}}return e}},82325:(a,b,c)=>{c.d(b,{Hz:()=>o,L0:()=>r,Mg:()=>s,YM:()=>p,Yp:()=>q});var d=c(79646),e=c(28354),f=c(29021),g=c.n(f),h=c(33873),i=c.n(h),j=c(23718),k=c(56791),l=c(72626),m=c(64185);let n=(0,l.h)("worktrees");function o(){let a=process.env.WORKTREE_REPOS;return a&&a.trim()?a.split(",").map(a=>a.trim()).filter(a=>a.length>0):[]}async function p(a){let b=(0,e.promisify)(d.exec);if(function(a){if(!a)return!1;try{return g().lstatSync(a),!1}catch(b){let a=b.code;return"ENOENT"===a||"ENOTDIR"===a}}(a))return n.warn("repository:scan-skipped-missing-dir",{repoPath:a}),[];try{let{stdout:c}=await b("git worktree list",{cwd:a}),d=function(a){if(!a||""===a.trim())return[];let b=a.trim().split("\n"),c=[];for(let a of b){let b=a.trim();if(!b)continue;let d=b.match(/^(.+?)\s+([a-z0-9]+)\s+(?:\[(.+?)\]|\(detached HEAD\))/);if(d){let[,a,b,e]=d;c.push({path:a.trim(),branch:e||`detached-${b}`,commit:b})}}return c}(c),e=i().resolve(a),f=i().basename(e);return(0,m.oZ)(e),d.map(a=>{let b=i().resolve(a.path);return{id:(0,j.ko)(b),name:a.branch,branch:a.branch,path:b,repositoryPath:e,repositoryName:f}}).filter(a=>["/etc","/root","/sys","/proc","/dev","/boot","/bin","/sbin","/usr/bin","/usr/sbin"].some(b=>a.path.startsWith(b))?(n.warn("worktree:unsafe-path-skipped",{path:a.path}),!1):!(a.path.includes("\0")||a.path.includes(".."))||(n.warn("worktree:malicious-path-skipped",{path:a.path}),!1))}catch(c){let a=c instanceof Error?c.message:String(c),b=c.code;if(a?.includes("not a git repository")||128===b)return[];throw c}}async function q(a){let b=await Promise.allSettled(a.map(async a=>{n.info("repository:scan-start",{repoPath:a});let b=await p(a);return n.info("repository:scan-complete",{repoPath:a,worktreeCount:b.length}),b})),c=[];for(let d=0;d<b.length;d++){let e=b[d];"fulfilled"===e.status?c.push(...e.value):n.error("repository:scan-failed",{repoPath:a[d],error:e.reason instanceof Error?e.reason.message:String(e.reason)})}return c}function r(a,b){if(0===b.length)return{deletedIds:[],upsertedCount:0};let c=[],d=0,e=new Map;for(let a of b){let b=a.repositoryPath||"";e.has(b)||e.set(b,[]),e.get(b).push(a)}let f=new Set([...(0,k.getAllWorktreeIds)(a),...(0,k.getAliasedWorktreeIds)(a)]),g=new Map((0,k.getAllWorktreePathIds)(a).map(a=>[i().resolve(a.path),a.id])),h=new Map,l=new Map;for(let[a,b]of g)h.set(a,new Set([b])),l.set(b,a);for(let b of(0,k.getAllWorktreeAliases)(a)){let a=l.get(b.worktreeId);a&&h.get(a)?.add(b.oldId)}let m=new Set(b.map(a=>i().resolve(a.path)));for(let[b,o]of e){if(!b)continue;let e=(0,k.getWorktreesByRepository)(a,b).filter(a=>!m.has(i().resolve(a.path))).map(a=>a.id);if(e.length>0){let b=(0,k.deleteWorktreesByIds)(a,e);for(let a of(c.push(...e),e)){f.delete(a);let b=l.get(a);void 0!==b&&(g.delete(b),h.delete(b))}n.info("worktree:cleanup",{deletedCount:b.deletedCount})}for(let b of o){let c=i().resolve(b.path),e=g.get(c),m=b.id,n=e??(m&&!f.has(m)?m:function(a,b,c){if(!c||0===c.size)return(0,j.ko)(a,b);let d=new Set(b);for(let a of c)d.delete(a);return(0,j.ko)(a,d)}(c,f,h.get(c)));f.add(n),g.set(c,n),l.set(n,c),(0,k.upsertWorktree)(a,{...b,id:n,name:b.branch??b.name}),d++}}return{deletedIds:c,upsertedCount:d}}function s(a,b){let c=new Set(b.map(a=>a.repositoryPath).filter(a=>!!a)),d=[];for(let b of(0,k.getRepositories)(a)){let e=b.path;if(!e||c.has(e)||function(a){if(!a)return!1;try{return g().existsSync(a)&&g().existsSync(i().join(a,".git"))}catch{return!0}}(e))continue;let f=(0,k.getWorktreesByRepository)(a,e).map(a=>a.id);if(0===f.length)continue;let h=(0,k.deleteWorktreesByIds)(a,f);d.push(...f),n.info("worktree:stale-repo-pruned",{repoPath:e,deletedCount:h.deletedCount})}return d}},85775:(a,b,c)=>{c.d(b,{Tm:()=>p,x4:()=>n,xJ:()=>o});var d=c(34129),e=c(
|
|
1
|
+
"use strict";exports.id=5209,exports.ids=[5209],exports.modules={998:(a,b,c)=>{c.d(b,{BF:()=>h,EH:()=>k,_R:()=>j});var d=c(11456),e=c(35524);let f={"session-killed":{state:"disable",poller:"stop"},"instance-removed":{state:"delete",poller:"stop"},"worktree-deleted":{state:"delete",poller:"stop"},"orphan-swept":{state:"delete",poller:"stop"},"consecutive-errors":{state:"disable",stopReason:"consecutive_errors",poller:"stop"},"server-shutdown":{state:"none",poller:"stop"}},g={"session-killed":"session-killed","instance-removed":"instance-removed","worktree-deleted":"worktree-deleted","orphan-swept":"orphan-swept","consecutive-errors":"consecutive-errors","server-shutdown":"shutdown"};function h(a,b){"stop"===f[a].poller&&(0,d.z)(g[a],()=>(function(a){switch(a.scope){case"instance":(0,e._i)((0,e.v7)(a.worktreeId,a.cliToolId,a.instanceId));return;case"worktree":(0,e._C)(a.worktreeId);return;case"key":(0,e._i)(a.compositeKey);return;case"all":(0,e.BS)();return}})(b))}function i(a,b){let c=(0,e.pL)(a);c&&(0,e.XK)((0,e.Ue)(a),c,b,(0,e.GE)(a)??void 0)}function j(a,b){let c=f[a];if("none"!==c.state)switch(b.scope){case"instance":"disable"===c.state?(0,e.XK)(b.worktreeId,b.cliToolId,c.stopReason,b.instanceId):(0,e.DR)((0,e.v7)(b.worktreeId,b.cliToolId,b.instanceId));return;case"worktree":"disable"===c.state?(0,e.kC)(b.worktreeId).forEach(a=>i(a,c.stopReason)):(0,e.LP)(b.worktreeId);return;case"key":"disable"===c.state?i(b.compositeKey,c.stopReason):(0,e.DR)(b.compositeKey);return;case"all":(0,e.hN)().forEach(a=>"disable"===c.state?i(a,c.stopReason):(0,e.DR)(a));return}}function k(a,b){h(a,b),j(a,b)}},23197:(a,b,c)=>{c.d(b,{H:()=>d});let d="__global__"},65209:(a,b,c)=>{c.d(b,{Nz:()=>v,l7:()=>z,vr:()=>x});var d=c(95220),e=c(998),f=c(56793),g=c(85775),h=c(93997),i=c(15194),j=c(23197),k=c(77093),l=c(72626),m=c(12693),n=c(79892),o=c(82325),p=c(73753),q=c(31347),r=c(72389);let s=(0,l.h)("session-cleanup");function t(a,b,c){let d=c;if(void 0===d)try{d=m.CLIToolManager.getInstance().getTool(b).getSessionName(a)}catch{d=void 0}(0,r.E8)({version:r.lf,at:Date.now(),api:"session-cleanup",origin:"server",worktreeId:a,instanceId:b,sessionNames:d?[d]:[],callerCwd:null,callerSession:null})}async function u(a,b){let c={worktreeId:a,sessionsKilled:[],sessionErrors:[],pollersStopped:[],pollerErrors:[]};for(let e of((0,h.pc)(),i.XH)){try{await b(a,e)&&(c.sessionsKilled.push(e),s.info("session:killed",{worktreeId:a,cliToolId:e}),t(a,e))}catch(d){let b=`${e}: ${(0,k.u1)(d)}`;c.sessionErrors.push(b),s.warn("session:kill-failed",{worktreeId:a,cliToolId:e,error:d instanceof Error?d.message:String(d)})}try{(0,d.stopPolling)(a,e),c.pollersStopped.push(`response-poller:${e}`)}catch(d){let b=`response-poller:${e}: ${(0,k.u1)(d)}`;c.pollerErrors.push(b),s.warn("response-poller:stop-failed",{worktreeId:a,cliToolId:e,error:d instanceof Error?d.message:String(d)})}}try{(0,e.BF)("worktree-deleted",{scope:"worktree",worktreeId:a}),c.pollersStopped.push("auto-yes-poller")}catch(d){let b=`auto-yes-poller: ${(0,k.u1)(d)}`;c.pollerErrors.push(b),s.warn("auto-yes-poller:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}try{(0,e._R)("worktree-deleted",{scope:"worktree",worktreeId:a}),c.pollersStopped.push("auto-yes-state")}catch(d){let b=`auto-yes-state: ${(0,k.u1)(d)}`;c.pollerErrors.push(b),s.warn("auto-yes-state:delete-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}try{(0,f.Yg)(a),c.pollersStopped.push("schedule-manager")}catch(d){let b=`schedule-manager: ${(0,k.u1)(d)}`;c.pollerErrors.push(b),s.warn("schedule-manager:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}try{(0,g.Tm)(a),c.pollersStopped.push("timer-manager")}catch(d){let b=`timer-manager: ${(0,k.u1)(d)}`;c.pollerErrors.push(b),s.warn("timer-manager:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}return c}async function v(a,b){let c=await Promise.allSettled(a.map(a=>u(a,b))),d=[],e=[];for(let b=0;b<c.length;b++){let f=c[b],g=a[b];if("fulfilled"===f.status){let a=f.value;for(let b of(d.push(a),a.sessionErrors))e.push(`Session kill error (${g}): ${b}`);for(let b of a.pollerErrors)e.push(`Poller stop error (${g}): ${b}`)}else e.push(`Cleanup failed (${g}): ${(0,k.u1)(f.reason)}`)}return{results:d,warnings:e}}async function w(a,b,c){try{let e=m.CLIToolManager.getInstance().getTool(b);if(!await e.isRunning(a))return!1;let f=e.getSessionName(a),g=await (0,q.s_)(f,c);if("owned"!==g.verdict)return!1;let h=`${a}:${b}`;return(0,d.clearPromptHashCache)(h),(0,n.fY)(f)}catch{return!1}}function x(a){return async(b,c)=>{let d=a.get(b);return void 0!==d&&w(b,c,d)}}async function y(){let a=0,b=m.CLIToolManager.getInstance();for(let c of i.XH)try{let d=b.getTool(c).getSessionName(j.H);await (0,n.N)(d)&&await (0,n.fY)(d)&&(a++,s.info("global-session:killed",{cliToolId:c,sessionName:d}),t(j.H,c,d))}catch(a){s.warn("global-session:kill-failed",{cliToolId:c,error:(0,k.u1)(a)})}return a}async function z(a,b){let c=new Map((0,p.Sj)(a).map(a=>[a.id,a.path])),d=(0,o.L0)(a,b);try{await y()}catch(a){s.warn("sync:global-cleanup-failed",{error:(0,k.u1)(a)})}let e=[];if(d.deletedIds.length>0)try{let a=await v(d.deletedIds,x(c));a.warnings.length>0&&(s.warn("sync:cleanup-warnings",{warnings:a.warnings}),e=[`${a.warnings.length} session cleanup warning(s) occurred`])}catch(a){s.error("sync:cleanup-failed",{error:(0,k.u1)(a)}),e=["Session cleanup encountered an error"]}return{syncResult:d,cleanupWarnings:e}}},72389:(a,b,c)=>{c.d(b,{E8:()=>n,_L:()=>g,lf:()=>h,pz:()=>p});var d=c(29021),e=c(21820),f=c(33873);let g="session-kills",h=1,i=/^(\d{4}-\d{2}-\d{2})\.jsonl$/,j=["kill-session","session-cleanup"],k=["cli","browser","http","server"];function l(a=process.env){let b=a.CM_SESSION_KILL_LEDGER_ROOT;return b&&""!==b.trim()?b:(0,f.join)((0,e.homedir)(),".commandmate",g)}function m(a){return new Date(a).toISOString().slice(0,10)}function n(a,b=l()){try{return(0,d.mkdirSync)(b,{recursive:!0,mode:448}),(0,d.appendFileSync)((0,f.join)(b,`${m(a.at)}.jsonl`),`${JSON.stringify(a)}
|
|
2
|
+
`,{encoding:"utf8",mode:384}),!function(a,b){let c,e=m(b-2592e6);try{c=(0,d.readdirSync)(a)}catch{return}for(let b of c){let c=i.exec(b)?.[1];if(void 0!==c&&!(c>=e))try{(0,d.rmSync)((0,f.join)(a,b),{force:!0})}catch{}}}(b,a.at),!0}catch{return!1}}function o(a){return null===a||"string"==typeof a}function p(a,b,c=l()){if(!(a<=b))return[];a=Math.max(a,b-2592e6-864e5);let e=[];for(let i=Date.parse(`${m(a)}T00:00:00.000Z`);i<=b;i+=864e5){let l;try{l=(0,d.readFileSync)((0,f.join)(c,`${m(i)}.jsonl`),"utf8")}catch{continue}for(let c of l.split("\n")){let d;if(""!==c.trim()){var g;try{d=JSON.parse(c)}catch{continue}"object"==typeof(g=d)&&null!==g&&g.version===h&&"number"==typeof g.at&&"string"==typeof g.api&&j.includes(g.api)&&"string"==typeof g.origin&&k.includes(g.origin)&&"string"==typeof g.worktreeId&&""!==g.worktreeId&&o(g.instanceId)&&Array.isArray(g.sessionNames)&&g.sessionNames.every(a=>"string"==typeof a)&&o(g.callerCwd)&&o(g.callerSession)&&d.at>=a&&d.at<=b&&e.push(d)}}}return e}},82325:(a,b,c)=>{c.d(b,{Hz:()=>o,L0:()=>r,Mg:()=>s,YM:()=>p,Yp:()=>q});var d=c(79646),e=c(28354),f=c(29021),g=c.n(f),h=c(33873),i=c.n(h),j=c(23718),k=c(56791),l=c(72626),m=c(64185);let n=(0,l.h)("worktrees");function o(){let a=process.env.WORKTREE_REPOS;return a&&a.trim()?a.split(",").map(a=>a.trim()).filter(a=>a.length>0):[]}async function p(a){let b=(0,e.promisify)(d.exec);if(function(a){if(!a)return!1;try{return g().lstatSync(a),!1}catch(b){let a=b.code;return"ENOENT"===a||"ENOTDIR"===a}}(a))return n.warn("repository:scan-skipped-missing-dir",{repoPath:a}),[];try{let{stdout:c}=await b("git worktree list",{cwd:a}),d=function(a){if(!a||""===a.trim())return[];let b=a.trim().split("\n"),c=[];for(let a of b){let b=a.trim();if(!b)continue;let d=b.match(/^(.+?)\s+([a-z0-9]+)\s+(?:\[(.+?)\]|\(detached HEAD\))/);if(d){let[,a,b,e]=d;c.push({path:a.trim(),branch:e||`detached-${b}`,commit:b})}}return c}(c),e=i().resolve(a),f=i().basename(e);return(0,m.oZ)(e),d.map(a=>{let b=i().resolve(a.path);return{id:(0,j.ko)(b),name:a.branch,branch:a.branch,path:b,repositoryPath:e,repositoryName:f}}).filter(a=>["/etc","/root","/sys","/proc","/dev","/boot","/bin","/sbin","/usr/bin","/usr/sbin"].some(b=>a.path.startsWith(b))?(n.warn("worktree:unsafe-path-skipped",{path:a.path}),!1):!(a.path.includes("\0")||a.path.includes(".."))||(n.warn("worktree:malicious-path-skipped",{path:a.path}),!1))}catch(c){let a=c instanceof Error?c.message:String(c),b=c.code;if(a?.includes("not a git repository")||128===b)return[];throw c}}async function q(a){let b=await Promise.allSettled(a.map(async a=>{n.info("repository:scan-start",{repoPath:a});let b=await p(a);return n.info("repository:scan-complete",{repoPath:a,worktreeCount:b.length}),b})),c=[];for(let d=0;d<b.length;d++){let e=b[d];"fulfilled"===e.status?c.push(...e.value):n.error("repository:scan-failed",{repoPath:a[d],error:e.reason instanceof Error?e.reason.message:String(e.reason)})}return c}function r(a,b){if(0===b.length)return{deletedIds:[],upsertedCount:0};let c=[],d=0,e=new Map;for(let a of b){let b=a.repositoryPath||"";e.has(b)||e.set(b,[]),e.get(b).push(a)}let f=new Set([...(0,k.getAllWorktreeIds)(a),...(0,k.getAliasedWorktreeIds)(a)]),g=new Map((0,k.getAllWorktreePathIds)(a).map(a=>[i().resolve(a.path),a.id])),h=new Map,l=new Map;for(let[a,b]of g)h.set(a,new Set([b])),l.set(b,a);for(let b of(0,k.getAllWorktreeAliases)(a)){let a=l.get(b.worktreeId);a&&h.get(a)?.add(b.oldId)}let m=new Set(b.map(a=>i().resolve(a.path)));for(let[b,o]of e){if(!b)continue;let e=(0,k.getWorktreesByRepository)(a,b).filter(a=>!m.has(i().resolve(a.path))).map(a=>a.id);if(e.length>0){let b=(0,k.deleteWorktreesByIds)(a,e);for(let a of(c.push(...e),e)){f.delete(a);let b=l.get(a);void 0!==b&&(g.delete(b),h.delete(b))}n.info("worktree:cleanup",{deletedCount:b.deletedCount})}for(let b of o){let c=i().resolve(b.path),e=g.get(c),m=b.id,n=e??(m&&!f.has(m)?m:function(a,b,c){if(!c||0===c.size)return(0,j.ko)(a,b);let d=new Set(b);for(let a of c)d.delete(a);return(0,j.ko)(a,d)}(c,f,h.get(c)));f.add(n),g.set(c,n),l.set(n,c),(0,k.upsertWorktree)(a,{...b,id:n,name:b.branch??b.name}),d++}}return{deletedIds:c,upsertedCount:d}}function s(a,b){let c=new Set(b.map(a=>a.repositoryPath).filter(a=>!!a)),d=[];for(let b of(0,k.getRepositories)(a)){let e=b.path;if(!e||c.has(e)||function(a){if(!a)return!1;try{return g().existsSync(a)&&g().existsSync(i().join(a,".git"))}catch{return!0}}(e))continue;let f=(0,k.getWorktreesByRepository)(a,e).map(a=>a.id);if(0===f.length)continue;let h=(0,k.deleteWorktreesByIds)(a,f);d.push(...f),n.info("worktree:stale-repo-pruned",{repoPath:e,deletedCount:h.deletedCount})}return d}},85775:(a,b,c)=>{c.d(b,{Tm:()=>p,x4:()=>n,xJ:()=>o});var d=c(34129),e=c(12693),f=c(88807),g=c(72626),h=c(87374),i=c(39687),j=c(36925);let k=(0,g.h)("timer-manager");function l(){return(0,j.v)("__timerManagerState",()=>({timers:new Map,timerWorktrees:new Map,initialized:!1}))}async function m(a){let b=l(),c=(0,f.getDbInstance)();try{let b=(0,d.kx)(c,a);if(!b||"pending"!==b.status)return;let f=e.CLIToolManager.getInstance().getTool(b.cliToolId),g=b.instanceId,j=await f.isRunning(b.worktreeId,g),l=(0,d.kx)(c,a);if(!l||"pending"!==l.status)return;if(!j){k.warn("timer:no-session",{timerId:a,worktreeId:b.worktreeId,instanceId:g}),(0,d.j2)(c,a,h.HR.NO_SESSION);return}(0,d.j2)(c,a,"sending");let m=await (0,i.d)(c,{worktreeId:b.worktreeId,content:b.message,cliToolId:b.cliToolId,instanceId:g});if(!m.ok){let b=`[${m.stage}] ${m.error}`;(0,d.j2)(c,a,"failed",void 0,b),k.error("timer:send-failed",{timerId:a,stage:m.stage,error:m.error});return}(0,d.j2)(c,a,"sent",Date.now()),k.info("timer:sent",{timerId:a,worktreeId:b.worktreeId})}catch(e){let b=e instanceof Error?e.message:String(e);try{(0,d.j2)(c,a,"failed",void 0,b)}catch{}k.error("timer:send-failed",{timerId:a,error:b})}finally{b.timers.delete(a),b.timerWorktrees.delete(a)}}function n(a,b,c){let d=l(),e=setTimeout(()=>{m(a)},c);d.timers.set(a,e),d.timerWorktrees.set(a,b)}function o(a){let b=l(),c=b.timers.get(a);c&&(clearTimeout(c),b.timers.delete(a),b.timerWorktrees.delete(a));let e=(0,f.getDbInstance)();(0,d.Ud)(e,a)}function p(a){let b=l(),c=(0,f.getDbInstance)();for(let[c,d]of b.timerWorktrees)if(d===a){let a=b.timers.get(c);a&&clearTimeout(a),b.timers.delete(c),b.timerWorktrees.delete(c)}(0,d.$$)(c,a)}}};
|