commandmate 0.48.0 → 0.49.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +292 -285
- package/.next/app-path-routes-manifest.json +35 -34
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +9 -9
- 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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/agent-event/route.js +2 -2
- package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/claude-done/route.js +2 -2
- package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/escalation/route.js +1 -1
- package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/subscriptions/route.js +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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route.js +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/[relayId]/route.js +1 -0
- package/.next/server/app/api/relays/[relayId]/route.js.nft.json +1 -0
- package/.next/server/app/api/relays/[relayId]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/relays/route.js +1 -1
- package/.next/server/app/api/relays/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/route.js +1 -1
- package/.next/server/app/api/repositories/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/default-agents/route.js +1 -1
- package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/slash-commands/route_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 +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 +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.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.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.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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/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 +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js +144 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -3
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_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 +103 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.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.js +1 -1
- package/.next/server/app/sessions/page.js.nft.json +1 -1
- package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/[skillId]/page.js +1 -1
- package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -1
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page.js +2 -2
- package/.next/server/app/worktrees/[id]/files/[...path]/page.js.nft.json +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/page.js +11 -11
- package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
- package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +35 -34
- package/.next/server/chunks/1601.js +2 -2
- package/.next/server/chunks/1656.js +2 -2
- package/.next/server/chunks/2069.js +1 -0
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/2404.js +1 -1
- package/.next/server/chunks/2422.js +1 -1
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/2534.js +1 -1
- package/.next/server/chunks/3241.js +1 -1
- package/.next/server/chunks/3773.js +1 -0
- package/.next/server/chunks/3801.js +31 -0
- package/.next/server/chunks/4243.js +1 -1
- package/.next/server/chunks/4248.js +1 -1
- package/.next/server/chunks/5209.js +1 -1
- package/.next/server/chunks/5354.js +1 -1
- package/.next/server/chunks/{9130.js → 5630.js} +1 -1
- package/.next/server/chunks/5775.js +1 -0
- package/.next/server/chunks/610.js +1 -0
- package/.next/server/chunks/6119.js +1 -1
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/6401.js +1 -1
- package/.next/server/chunks/6486.js +1 -1
- package/.next/server/chunks/6781.js +1 -1
- package/.next/server/chunks/6808.js +4 -0
- package/.next/server/chunks/7023.js +14 -0
- package/.next/server/chunks/7604.js +2 -2
- package/.next/server/chunks/7905.js +1 -1
- package/.next/server/chunks/8581.js +16 -16
- package/.next/server/chunks/8728.js +3 -3
- package/.next/server/chunks/8782.js +1 -1
- package/.next/server/chunks/8791.js +1 -1
- package/.next/server/chunks/8807.js +63 -53
- package/.next/server/chunks/8918.js +103 -1
- package/.next/server/chunks/9198.js +144 -0
- package/.next/server/chunks/9390.js +1 -1
- package/.next/server/chunks/9584.js +1 -1
- package/.next/server/chunks/9627.js +4 -4
- 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/1128-914c559913546bbc.js +1 -0
- package/.next/static/chunks/{2407-26139a8a2f1adbe8.js → 2407-675ba6b21844dc3b.js} +1 -1
- package/.next/static/chunks/{2619-a305ad4810f1393a.js → 2619-04bc32f026a0d946.js} +1 -1
- package/.next/static/chunks/{2863-f0121af1cbbedb3b.js → 2863-7173dc305dffc4f6.js} +1 -1
- package/.next/static/chunks/3931-1a1abab16248f14d.js +1 -0
- package/.next/static/chunks/6288-6fadbba6e84393b2.js +1 -0
- package/.next/static/chunks/7665-e9ef6e0a85b9fa49.js +1 -0
- package/.next/static/chunks/{8165-c68b3dc844210e6a.js → 8165-263172c17ae8e8c3.js} +1 -1
- package/.next/static/chunks/8606-ce17ffa77f39608e.js +1 -0
- package/.next/static/chunks/app/api/agents/update/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/agents/versions/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/app/release-notes/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/app/update/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/app/update-check/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/capabilities/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/fs/browse/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/fs/recent-paths/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/hooks/agent-event/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/hooks/permission-request/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/metrics/vibe/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/push/escalation/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/relays/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/remote/pair/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/repositories/validate-path/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/settings/default-agents/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/skills/installations/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/skills/operations/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/skills/reindex/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/skills/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/templates/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/layout-8bfac4724277b47f.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/proxy/[...path]/route-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/sessions/page-890fd50ec9739973.js +1 -0
- package/.next/static/chunks/app/skills/[skillId]/{page-52ba58712faf3378.js → page-cb6e74fd9a6a571d.js} +1 -1
- package/.next/static/chunks/app/worktrees/[id]/files/[...path]/page-704086656fb45699.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/layout-a4f129c451de7859.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-f6d3ab8185d93aae.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/terminal/{page-c601f3b3ece6557e.js → page-373ea37b16d930c7.js} +1 -1
- package/.next/static/css/c1e307d05daf93b6.css +1 -0
- package/.next/trace +13 -13
- package/.next/types/app/api/relays/[relayId]/route.ts +347 -0
- package/.next/types/routes.d.ts +2 -1
- package/.next/types/validator.ts +9 -0
- package/dist/cli/commands/ask.d.ts.map +1 -1
- package/dist/cli/commands/ask.js +178 -13
- package/dist/cli/commands/auto-yes.d.ts.map +1 -1
- package/dist/cli/commands/auto-yes.js +3 -5
- package/dist/cli/commands/capture.d.ts.map +1 -1
- package/dist/cli/commands/capture.js +5 -0
- package/dist/cli/commands/message-dispatch.d.ts +25 -5
- package/dist/cli/commands/message-dispatch.d.ts.map +1 -1
- package/dist/cli/commands/message-dispatch.js +92 -6
- package/dist/cli/commands/relays.d.ts +25 -2
- package/dist/cli/commands/relays.d.ts.map +1 -1
- package/dist/cli/commands/relays.js +69 -5
- package/dist/cli/commands/respond.d.ts +12 -0
- package/dist/cli/commands/respond.d.ts.map +1 -1
- package/dist/cli/commands/respond.js +63 -1
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +10 -10
- package/dist/cli/commands/verify.d.ts.map +1 -1
- package/dist/cli/commands/verify.js +8 -1
- package/dist/cli/commands/wait-hook-stop-settle.d.ts +66 -0
- package/dist/cli/commands/wait-hook-stop-settle.d.ts.map +1 -0
- package/dist/cli/commands/wait-hook-stop-settle.js +150 -0
- package/dist/cli/commands/wait-instance.d.ts +21 -0
- package/dist/cli/commands/wait-instance.d.ts.map +1 -0
- package/dist/cli/commands/wait-instance.js +41 -0
- package/dist/cli/commands/wait-notices.d.ts +87 -0
- package/dist/cli/commands/wait-notices.d.ts.map +1 -0
- package/dist/cli/commands/wait-notices.js +301 -0
- package/dist/cli/commands/wait-poll-bookkeeping.d.ts +15 -0
- package/dist/cli/commands/wait-poll-bookkeeping.d.ts.map +1 -0
- package/dist/cli/commands/wait-poll-bookkeeping.js +57 -0
- package/dist/cli/commands/wait-poll-state.d.ts +118 -0
- package/dist/cli/commands/wait-poll-state.d.ts.map +1 -0
- package/dist/cli/commands/wait-poll-state.js +6 -0
- package/dist/cli/commands/wait-timing.d.ts +46 -0
- package/dist/cli/commands/wait-timing.d.ts.map +1 -0
- package/dist/cli/commands/wait-timing.js +99 -0
- package/dist/cli/commands/wait-turn-boundary.d.ts +284 -0
- package/dist/cli/commands/wait-turn-boundary.d.ts.map +1 -0
- package/dist/cli/commands/wait-turn-boundary.js +427 -0
- package/dist/cli/commands/wait-verify.d.ts +50 -0
- package/dist/cli/commands/wait-verify.d.ts.map +1 -0
- package/dist/cli/commands/wait-verify.js +124 -0
- package/dist/cli/commands/wait.d.ts +6 -105
- package/dist/cli/commands/wait.d.ts.map +1 -1
- package/dist/cli/commands/wait.js +207 -959
- package/dist/cli/config/duration-constants.d.ts +16 -13
- package/dist/cli/config/duration-constants.d.ts.map +1 -1
- package/dist/cli/config/duration-constants.js +21 -21
- package/dist/cli/docs/agent-operations.d.ts +2 -2
- package/dist/cli/docs/agent-operations.d.ts.map +1 -1
- package/dist/cli/docs/agent-operations.js +25 -2
- package/dist/cli/types/api-responses.d.ts +76 -4
- package/dist/cli/types/api-responses.d.ts.map +1 -1
- package/dist/cli/utils/api-client.d.ts +15 -1
- package/dist/cli/utils/api-client.d.ts.map +1 -1
- package/dist/cli/utils/api-client.js +7 -1
- package/dist/cli/utils/reply-ledger.d.ts +79 -0
- package/dist/cli/utils/reply-ledger.d.ts.map +1 -1
- package/dist/cli/utils/reply-ledger.js +141 -1
- package/dist/cli/utils/verify-runner.d.ts +24 -1
- package/dist/cli/utils/verify-runner.d.ts.map +1 -1
- package/dist/cli/utils/verify-runner.js +54 -1
- package/dist/config/auto-yes-duration.d.ts +56 -0
- package/dist/config/auto-yes-duration.d.ts.map +1 -0
- package/dist/config/auto-yes-duration.js +76 -0
- package/dist/lib/session/send-attempt-types.d.ts +23 -1
- package/dist/lib/session/send-attempt-types.d.ts.map +1 -1
- package/dist/lib/session/send-attempt-types.js +9 -1
- package/dist/server/locales/en/worktree.json +18 -3
- package/dist/server/locales/ja/worktree.json +18 -3
- package/dist/server/src/config/auto-yes-config.js +14 -19
- package/dist/server/src/config/auto-yes-duration.js +76 -0
- package/dist/server/src/lib/auto-yes-poller.js +49 -10
- package/dist/server/src/lib/auto-yes-state.js +9 -2
- package/dist/server/src/lib/cli-tools/antigravity.js +40 -7
- package/dist/server/src/lib/cli-tools/codex.js +60 -11
- package/dist/server/src/lib/cli-tools/command-code-plan-review.js +24 -2
- package/dist/server/src/lib/cli-tools/copilot.js +120 -30
- package/dist/server/src/lib/cli-tools/gemini.js +28 -9
- package/dist/server/src/lib/cli-tools/opencode.js +55 -13
- package/dist/server/src/lib/cli-tools/submit-composer-read.js +580 -0
- package/dist/server/src/lib/cli-tools/submit-verified-sender.js +374 -516
- package/dist/server/src/lib/db/migrations/index.js +2 -0
- package/dist/server/src/lib/db/migrations/pre-migration-backup.js +266 -0
- package/dist/server/src/lib/db/migrations/runner.js +37 -4
- package/dist/server/src/lib/db/migrations/v62-session-relays-bind.js +102 -0
- package/dist/server/src/lib/db/relay-bind-db.js +437 -0
- package/dist/server/src/lib/db/relay-db.js +59 -96
- package/dist/server/src/lib/detection/composer-text.js +215 -11
- package/dist/server/src/lib/detection/prompt-detect-multiple-choice-chrome.js +193 -0
- package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +8 -191
- package/dist/server/src/lib/detection/upstream-faults.js +56 -5
- package/dist/server/src/lib/hooks/sources/opencode/client.js +12 -6
- package/dist/server/src/lib/hooks/structured-decision-response.js +1 -1
- package/dist/server/src/lib/polling/auto-yes-manual-answer.js +4 -2
- package/dist/server/src/lib/polling/response-checker.js +15 -16
- package/dist/server/src/lib/prompt-answer-errors.js +288 -0
- package/dist/server/src/lib/prompt-answer-sender.js +264 -288
- package/dist/server/src/lib/push/failure-episode-state.js +4 -1
- package/dist/server/src/lib/realtime/terminal-broadcast.js +1 -4
- package/dist/server/src/lib/realtime-snippet.js +54 -0
- package/dist/server/src/lib/relay/relay-bind.js +294 -0
- package/dist/server/src/lib/relay/relay-boot.js +51 -0
- package/dist/server/src/lib/relay/relay-bound-reply.js +519 -0
- package/dist/server/src/lib/relay/relay-delivery.js +134 -220
- package/dist/server/src/lib/relay/relay-messages.js +39 -4
- package/dist/server/src/lib/relay/relay-overlap.js +92 -0
- package/dist/server/src/lib/relay/relay-system-line.js +3 -2
- package/dist/server/src/lib/relay/types.js +12 -1
- package/dist/server/src/lib/session/agent-session-lifecycle.js +18 -0
- package/dist/server/src/lib/session/claude-session.js +41 -6
- package/dist/server/src/lib/session/composer-clear.js +109 -4
- package/dist/server/src/lib/session/current-output-builder.js +23 -6
- package/dist/server/src/lib/session/instance-input-lock.js +664 -0
- package/dist/server/src/lib/session/send-attempt-state.js +19 -1
- package/dist/server/src/lib/session/send-attempt-types.js +9 -1
- package/dist/server/src/lib/session/send-user-message.js +82 -13
- package/dist/server/src/lib/session/waiting-episode-state-ops.js +152 -0
- package/dist/server/src/lib/session/waiting-episode-state-store.js +202 -0
- package/dist/server/src/lib/session/waiting-episode-state-types.js +6 -0
- package/dist/server/src/lib/session/waiting-episode-state.js +26 -339
- package/dist/server/src/lib/tmux/tmux.js +25 -0
- package/dist/server/src/lib/verification/gate-runner.js +11 -4
- package/docs/en/user-guide/webapp-guide.md +15 -10
- package/package.json +1 -1
- package/release-notes/0.49.0.json +45 -0
- package/release-notes/0.49.1.json +66 -0
- package/.next/server/chunks/1210.js +0 -1
- package/.next/server/chunks/1945.js +0 -14
- package/.next/server/chunks/1990.js +0 -103
- package/.next/server/chunks/4194.js +0 -67
- package/.next/server/chunks/4280.js +0 -1
- package/.next/server/chunks/5845.js +0 -1
- package/.next/server/chunks/6722.js +0 -1
- package/.next/server/chunks/720.js +0 -103
- package/.next/server/chunks/936.js +0 -1
- package/.next/server/chunks/9540.js +0 -1
- package/.next/static/chunks/2099-c3e0ab70a1b95dd3.js +0 -1
- package/.next/static/chunks/5371-a549a0d2c2044d41.js +0 -1
- package/.next/static/chunks/6288-09feba367cc2c65e.js +0 -1
- package/.next/static/chunks/8606-cf6bdbff44a764cf.js +0 -1
- package/.next/static/chunks/9079-406b84d3cc891a87.js +0 -1
- package/.next/static/chunks/app/api/agents/update/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/agents/versions/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/app/release-notes/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/app/update/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/app/update-check/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/capabilities/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/fs/browse/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/fs/recent-paths/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/hooks/agent-event/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/hooks/permission-request/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/metrics/vibe/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/push/escalation/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/relays/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/remote/pair/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/repositories/validate-path/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/settings/default-agents/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/skills/[id]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/skills/installations/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/skills/operations/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/skills/reindex/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/skills/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/templates/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/layout-46b4cbf07520d9b6.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/sessions/page-fb241bed579c67aa.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/files/[...path]/page-9cf1ecc59e36a004.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/layout-c81284a9d8b35304.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-cbc7749a33450cc5.js +0 -1
- package/.next/static/css/743f79ff19ab91e9.css +0 -1
- /package/.next/static/{PTlAswXLq8PAe2vUJ8dVP → fqfSDqQMweROeHUzOt_m1}/_buildManifest.js +0 -0
- /package/.next/static/{PTlAswXLq8PAe2vUJ8dVP → fqfSDqQMweROeHUzOt_m1}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=3773,exports.ids=[3773],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()}}},5416:(a,b,c)=>{c.d(b,{H:()=>i});var d=c(95375),e=c(91318),f=c(20029),g=c(39532),h=c(15961);function i(a,b,c,j=Date.now()){let{policy:k,taskId:l}=(0,e.d8)(a,b.cliToolId,b.instanceId),m={worktreeId:a,cliToolId:b.cliToolId,instanceId:b.instanceId??b.cliToolId};return(0,h.Fw)({...m,resolvedBy:b.resolvedBy??null,payload:c,sessionGeneration:(0,d.getAgentEventGenerationStartedAt)(a,b.cliToolId,b.instanceId),contract:{policy:k,taskId:l},appearance:{note:a=>(0,g.HO)(m,a,j),forget:()=>(0,g.mt)(m)},lastSend:(0,f.KF)(m),now:j})}},15961:(a,b,c)=>{c.d(b,{Fw:()=>M,Z1:()=>L});var d=c(48736),e=c(27354),f=c(16402),g=c(41733),h=c(42422),i=c(90166),j=c(15194),k=c(31239),l=c(81254),m=c(28861),n=c(69082);let o=/^\s*Do you trust the contents of this project\?\s*$/,p=/^\s*Accessing workspace:\s*(.*)$/,q=/^\s*>\s+(\S.*)$/,r=/^\s*(?:>\s+)?(\/[\w:.-]+)(?:\s{2,}.*)?$/,s=/^\s*[↓↑]\s*\d+\s+more\s*$/,t=/^\s*Effort\b/,u=/^ {40,}\S/;function v(a,b,c,d){let e=[],f=-1;for(let g=b;g<c;g++){let b=a[g];if(""===b.trim()||d&&d.test(b))break;if(q.test(b)){if(f>=0)return null;f=e.length}e.push(b.replace(/^\s*>\s+/,"").replace(/\s{2,}/g," ").trim())}return e.length<2||f<0?null:{options:e,selectedIndex:f}}let w=/^\s*Keyboard:\s+↑\/↓\s+Navigate\s+←\/→\s+Effort\s+enter\s+Select\s+esc\s+(?:Go Back|Clear search)\s*$/,x=/^\s*Switch Model\s*$/,y=/^\s*Search:(?:\s.*)?$/,z=/^\s*─+\s*$/,A=/^\s*Effort\b/,B=/^\s*>\s+(\S.*)$/,C=/^ {40,}\S/,D=a=>""===a.trim();function E(a,b,c){for(;b<c&&D(a[b]);)b++;return b}let F={trust:"antigravity-trust","model-picker":"antigravity-model-picker","slash-menu":"antigravity-slash-menu"},G={question:null,approvalTarget:null,options:[],selectedIndex:-1};var H=c(29567),I=c(77245),J=c(39532);function K(a,b){return{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId,sessionName:a.sessionName,sessionGeneration:a.sessionGeneration,screenAppearedAt:a.screenAppearedAt,kind:b.kind,question:b.question,options:b.options,approvalTarget:(0,J.vQ)(b.kind,b.approvalTarget,b.options),selectedPosition:b.selectedIndex>=0?b.selectedIndex+1:null}}function L(a){let{screen:b,target:c,session:d}=a;return null===b||null===b.token||null===b.appearedAt||null===d.generation?null:K({worktreeId:c.worktreeId,cliToolId:c.cliToolId,instanceId:c.instanceId,sessionName:c.sessionName,sessionGeneration:d.generation,screenAppearedAt:b.appearedAt},{kind:b.kind,question:b.question,options:b.options.map(a=>a.label),approvalTarget:b.approvalTarget,selectedIndex:null===b.selectedPosition?-1:b.selectedPosition-1})}function M(a){let{payload:b,now:c}=a,L=a.lastSend??null,M={worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId,sessionName:b.sessionName,resolvedBy:a.resolvedBy},N={running:b.isRunning,starting:"number"==typeof b.startingSince,generation:a.sessionGeneration},O=b.isRunning?function(a){if("antigravity"===a.cliToolId&&a.fullOutput){let b=function(a){let b=(0,h.aJ)(a),c=(0,h._A)(b);if((0,h.bH)(c)){let a=(0,m.g8)(c),b=a?.promptData;return b?.type!=="multiple_choice"?{kind:"unknown",...G}:{kind:"antigravity-permission",question:b.question,approvalTarget:b.approvalTarget??null,options:b.options.map(a=>a.label),selectedIndex:b.options.findIndex(a=>a.isDefault)}}let d=function(a){let b=a.split("\n").map(a=>a.trimEnd()),c=function(a){for(let b=a.length-1;b>=0;b--)if(n.YH.test(a[b])){for(let c=b+1;c<a.length;c++)if(n.lE.test(a[c]))return -1;return b}return -1}(b);return c<0?null:function(a,b){let c=Math.max(0,b-30),d=-1;for(let e=b-1;e>=c;e--)if(o.test(a[e])){d=e;break}if(d<0)return null;for(let c=b+1;c<a.length;c++)if(""!==a[c].trim()&&!u.test(a[c]))return null;let e=-1;for(let c=d+1;c<b;c++)if(q.test(a[c])){e=c;break}if(e<0)return null;let f=e;for(;f-1>d&&""!==a[f-1].trim();)f--;let g=v(a,f,b);if(null===g)return null;let h=null,i=Math.max(0,d-8);for(let b=d-1;b>=i;b--){let c=p.exec(a[b]);if(!c)continue;let e=c[1].trim();if(""!==e)h=e;else for(let c=b+1;c<d;c++)if(""!==a[c].trim()){h=a[c].trim();break}break}return{screen:"trust",question:a[d].trim(),approvalTarget:h,options:g.options,selectedIndex:g.selectedIndex}}(b,c)??function(a,b){let c=Math.max(0,b-30);for(let d=b-1;d>=c;d--){if(!n.d0.test(a[d]))continue;let c=d+1;for(;c<b&&""===a[c].trim();)c++;let e=v(a,c,b,t);if(null===e)break;return{screen:"model-picker",question:a[d].trim(),approvalTarget:null,options:e.options,selectedIndex:e.selectedIndex}}return null}(b,c)??function(a,b){let c=b-1;for(;c>=0&&(""===a[c].trim()||s.test(a[c]));)c--;let d=[],e=Math.max(0,b-30);for(;c>=e&&r.test(a[c]);c--)d.unshift(a[c]);return d.length<2||1!==d.filter(a=>q.test(a)).length?null:{screen:"slash-menu",question:null,approvalTarget:null,options:d.map(a=>r.exec(a)[1]),selectedIndex:d.findIndex(a=>q.test(a))}}(b,c)}(b);if(null===d){let a=function(a){let b,c=a.split("\n").map(a=>a.trimEnd()),d=function(a){for(let b=a.length-1;b>=0;b--)if(!(D(a[b])||C.test(a[b])))return w.test(a[b])?b:-1;return -1}(c);if(d<0)return null;let e=function(a,b){let c=Math.max(0,b-30);for(let d=b-1;d>=c;d--)if(x.test(a[d]))return d;return -1}(c,d);if(e<0)return null;let f=(b=E(c,e+1,d))>=d||!y.test(c[b])||++b>=d||!z.test(c[b])?-1:E(c,b+1,d);if(f<0)return null;let g=function(a,b,c){let d=[],e=-1,f=b;for(;f<c&&!D(a[f]);f++){if(A.test(a[f]))return null;if(B.test(a[f])){if(e>=0)return null;e=d.length}d.push(a[f].replace(/^\s*>\s+/,"").replace(/\s{2,}/g," ").trim())}return 0===d.length||e<0?null:{options:d,selectedIndex:e,end:f}}(c,f,d);return g&&function(a,b,c){let d=E(a,b,c);return!(d>=c)&&!!A.test(a[d])&&c-d<=6}(c,g.end,d)?{question:c[e].trim(),options:g.options,selectedIndex:g.selectedIndex}:null}(b);return null===a?null:{kind:"antigravity-model-picker",question:a.question,approvalTarget:null,options:[...a.options],selectedIndex:a.selectedIndex}}return{kind:F[d.screen],question:d.question,approvalTarget:d.approvalTarget,options:[...d.options],selectedIndex:d.selectedIndex}}(a.fullOutput);if(null!==b)return b}return a.isPromptWaiting||a.isSelectionListActive||a.isPagerActive||a.isDismissablePanelActive||a.isUnclassifiedActive||"waiting"===a.sessionStatus?{kind:"unknown",...function(a){if(!(0,l.XF)(a))return G;let b=a.approvalTarget??null;return"yes_no"===a.type?{question:a.question,approvalTarget:b,options:[...a.options],selectedIndex:a.defaultOption?a.options.indexOf(a.defaultOption):-1}:{question:a.question,approvalTarget:b,options:a.options.map(a=>a.label),selectedIndex:a.options.findIndex(a=>a.isDefault)}}(a.promptData)}:"ready"===a.sessionStatus?{kind:"composer",...G}:{kind:"none",...G}}({cliToolId:a.cliToolId,fullOutput:b.fullOutput,sessionStatus:b.sessionStatus,isPromptWaiting:b.isPromptWaiting,promptData:b.promptData,isSelectionListActive:b.isSelectionListActive,isPagerActive:b.isPagerActive,isDismissablePanelActive:b.isDismissablePanelActive,isUnclassifiedActive:b.isUnclassifiedActive}):null,{token:P,tokenWithheld:Q,appearedAt:R}=function(a,b){var c;let d=null===b?null:(c=a.sessionGeneration,(0,H.PJ)(b.kind)?"unknown"===b.kind?"unknown-screen":null===c?"no-session-generation":null:"no-decision"),e=a.sessionGeneration;if(null===b||null!==d||null===e)return a.appearance.forget(),{token:null,tokenWithheld:d,appearedAt:null};let f=a.payload.sessionName,g=a.appearance.note((0,J.z2)({sessionName:f,sessionGeneration:e,...b})),h=K({...a,sessionName:f,sessionGeneration:e,screenAppearedAt:g},b);return{token:(0,I.hH)(h,a.now),tokenWithheld:null,appearedAt:g}}(a,O),S=null;null!==O&&(S={kind:O.kind,token:P,tokenExpiresAt:null===P?null:(0,I.rk)(c),tokenWithheld:Q,appearedAt:R,question:O.question,approvalTarget:O.approvalTarget,options:O.options.map((a,b)=>({position:b+1,label:a})),selectedPosition:O.selectedIndex>=0?O.selectedIndex+1:null,answerVia:function(a,b){if(!(0,H.PJ)(a.kind))return"none";if("antigravity-trust"===a.kind)return"strict";let c=b.promptView??(0,k.ds)(b.promptData??null);return c?.kind==="screen-choices"?"screen":c?.kind==="api-choices"?"api":"terminal"}(O,b),sessionStatus:b.sessionStatus,sessionStatusReason:b.sessionStatusReason});let T=b.autoYes;return{schemaVersion:H.To,observedAt:c,target:M,session:N,status:null===O?"unavailable":"observed",unavailableReason:null===O?"session-not-running":null,screen:S,autoYes:{enabled:T?T.enabled:null,expiresAt:T?.expiresAt??null,stopReason:T?.stopReason??null,pollerActive:"boolean"==typeof b.serverPollerActive?b.serverPollerActive:null,pollerRecord:null===O?null:function(a,b,c){var d;let e=a.autoYes?.lastSuppression;return e?{reason:e.reason,mode:e.mode,promptType:e.promptType,...void 0!==e.pattern&&{pattern:e.pattern},at:e.at,ageSeconds:Math.max(0,Math.round((c-e.at)/1e3)),screenCorrelation:(d=e.promptType,(0,H.PJ)(b.kind)?(0,l.XF)(a.promptData)&&a.promptData.type!==d?"type-mismatch":"unknown":"no-prompt-on-screen")}:null}(b,O,c),contractEvaluation:function(a,b){let{policy:c,taskId:k}=a.contract,m=c?{taskId:k,mode:c.mode}:null;if(null===b)return{state:"not-evaluated",because:"session-not-running",contract:m};let n=a.payload.promptData;if(!(0,H.PJ)(b.kind)||!(0,l.XF)(n))return{state:"not-evaluated",because:"no-parsed-prompt",contract:m};let o=(0,j.hR)(a.cliToolId)?a.cliToolId:void 0,p=function(a,b,c){if(!(0,l.XF)(b))return;let d=a.autoYesAnswerMode??i.Rb,e=(0,f.Xc)((0,f.j4)(b,void 0,c),d);return"left-to-human"===e?{kind:"left-to-human"}:"base-rules"!==e?{kind:"answered",question:{optionRecommendations:function(a,b){if(!a||void 0===b)return;let c=(0,h._A)((0,h.aJ)(a));return(0,g.$M)(c,b,c.split("\n"),a).optionRecommendations}(a.fullOutput,c)}}:void 0}(a.payload,n,o);if(p?.kind==="left-to-human")return{state:"base-withholds",reason:e.eS,contract:m};let q=(0,d.sD)(n,c,o,p?.kind==="answered"?p.question:void 0);return null!==q.suppressedBy&&(0,e.PP)(q.suppressedBy)?{state:"base-withholds",reason:q.suppressedBy,contract:m}:null!==q.suppressedBy?{state:"policy-withholds",reason:q.suppressedBy,...void 0!==q.pattern&&{pattern:q.pattern},contract:m}:null===q.answer?{state:"no-base-answer",contract:m}:{state:"policy-permits",contract:m}}(a,O)},lastSend:null===L?null:{at:L.at,state:L.state,reason:L.reason}}}},20029:(a,b,c)=>{c.d(b,{C7:()=>r,KF:()=>n,Nq:()=>p,cu:()=>l,m4:()=>s,zE:()=>m});var d=c(55511),e=c(36925),f=c(72626),g=c(2669),h=c(7321);let i=(0,f.h)("session/send-attempt-state"),j=(0,e.v)("__sendAttemptRecords",()=>new Map);function k(a){return JSON.stringify([a.worktreeId,a.cliToolId,a.instanceId])}function l(a){return(0,d.createHash)("sha256").update(a,"utf8").digest("hex").slice(0,16)}function m(a,b,c=Date.now()){try{let d=k(a);for(j.delete(d),j.set(d,{at:Math.floor(c),state:b.state,reason:b.reason,messageDigest:l(b.content)});j.size>1024;){let a=j.keys().next().value;if(void 0===a)break;j.delete(a)}}catch(a){i.warn("send-attempt-record-failed",{error:a instanceof Error?a.message:String(a)})}}function n(a){return j.get(k(a))??null}let o=/Command failed: tmux |Failed to send (?:special )?keys? to tmux session|Failed to send special key:|Failed to paste message into tmux session/;function p(a){if("object"==typeof a&&null!==a&&a.code===g.M7)return{state:"not-sent",reason:"session-starting"};if("object"==typeof a&&null!==a&&a.code===h.Le)return{state:"not-sent",reason:"plan-review"};let b=a instanceof Error?a.message:String(a);return/Enter was not pressed, so nothing was submitted/.test(b)?{state:"indeterminate",reason:"body-not-landed"}:/replaced by a TUI autocompletion/.test(b)?{state:"indeterminate",reason:"replaced-by-completion"}:/submit could not be confirmed/i.test(b)?{state:"indeterminate",reason:"submit-unconfirmed"}:/Could not re-read session \S+ before typing \(.*\); nothing was typed \(Issue #3945\)/s.test(b)?{state:"not-sent",reason:"recheck-failed"}:o.test(b)?{state:"indeterminate",reason:"send-error"}:/prompt not ready/i.test(b)?{state:"not-sent",reason:"prompt-not-ready"}:/input lock not acquired, nothing was typed/.test(b)?/was replaced while this send waited/.test(b)?{state:"not-sent",reason:"session-replaced"}:{state:"not-sent",reason:"input-lock-timeout"}:/\(re-checked under the input lock\); nothing was typed/.test(b)?{state:"not-sent",reason:"prompt-waiting"}:/input lock lost, nothing was typed/.test(b)?{state:"not-sent",reason:"input-lock-lost"}:/still holds unsent text after \d+ clear passes/.test(b)?{state:"not-sent",reason:"composer-not-empty"}:{state:"indeterminate",reason:"send-error"}}function q(a){return a.replace(/\s+/g,"")}function r(a,b){let c=q(b.split("\n").find(a=>""!==a.trim())??"").slice(0,32);return""!==c&&q(a).includes(c)}function s(a){return"not-sent"===a.state?`[send state: not-sent (${a.reason}): the message was not typed. CommandMate does not resend it; send it again once the input prompt is back (\`commandmate prompt <worktree-id> --json\` shows the screen and lastSend).]`:"indeterminate"===a.state?`[send state: indeterminate (${a.reason}): part of the message may have been typed or submitted. CommandMate does not resend it; do not resend before checking the pane (\`commandmate capture <worktree-id> --pane\`), or it may arrive twice.]`:`[send state: sent (${a.reason})]`}},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})}},29567:(a,b,c)=>{c.d(b,{PJ:()=>h,To:()=>d,_Q:()=>k,a:()=>m,fm:()=>j,tq:()=>g});let d=1,e=["antigravity-trust","antigravity-model-picker","antigravity-permission","antigravity-slash-menu","composer","none","unknown"],f=["composer","none"];function g(a){return"string"==typeof a&&e.includes(a)}function h(a){return!f.includes(a)}let i=["antigravity-trust","antigravity-permission"];function j(a){return"string"==typeof a&&i.includes(a)}let k=["antigravity-trust"],l={"antigravity-trust":{position:2,optionCount:2,label:"No, exit"}};function m(a,b,c){let d=l[a];return void 0!==d&&d.position===b&&d.optionCount===c.length&&c[b-1].replace(/\s+/g," ").trim()===d.label}},77245:(a,b,c)=>{c.d(b,{hH:()=>i,iV:()=>k,rk:()=>j});var d=c(55511),e=c(36925);let f=(0,e.v)("__promptObservationTokenSecret",()=>({value:(0,d.randomBytes)(32)})),g=(0,e.v)("__promptObservationConsumedTokens",()=>new Map);function h(a,b){return(0,d.createHmac)("sha256",f.value).update(JSON.stringify(["po1",a.worktreeId,a.cliToolId,a.instanceId,a.sessionName,a.sessionGeneration,a.screenAppearedAt,a.kind,a.question,[...a.options],a.approvalTarget,a.selectedPosition,b])).digest()}function i(a,b){let c=Math.floor(b);return`po1.${c.toString(36)}.${h(a,c).toString("base64url")}`}function j(a){return Math.floor(a)+12e4}function k(a,b,c=Date.now()){let e=function(a,b,c=Date.now()){if("string"!=typeof a||a.length>80)return{ok:!1,reason:"malformed"};let e=a.split(".");if(3!==e.length||"po1"!==e[0]||!/^[0-9a-z]{1,12}$/.test(e[1])||!/^[A-Za-z0-9_-]{43}$/.test(e[2]))return{ok:!1,reason:"malformed"};let f=parseInt(e[1],36);if(!Number.isSafeInteger(f)||f.toString(36)!==e[1])return{ok:!1,reason:"malformed"};let g=Buffer.from(e[2],"base64url");if(g.toString("base64url")!==e[2])return{ok:!1,reason:"malformed"};let i=h(b,f);return g.length===i.length&&(0,d.timingSafeEqual)(g,i)?f-c>5e3?{ok:!1,reason:"not-yet-valid"}:c>=j(f)?{ok:!1,reason:"expired"}:{ok:!0,issuedAt:f}:{ok:!1,reason:"mismatch"}}(a,b,c);if(!e.ok)return e;for(let[a,b]of g)c>=b&&g.delete(a);let f=(0,d.createHash)("sha256").update(JSON.stringify(["po1",b.worktreeId,b.cliToolId,b.instanceId,b.sessionName,b.sessionGeneration,b.screenAppearedAt,b.kind,b.question,[...b.options],b.approvalTarget])).digest("base64url");return g.has(f)?{ok:!1,reason:"consumed"}:g.size>=4096?{ok:!1,reason:"consumed-store-full"}:(g.set(f,Math.floor(c)+12e4),e)}},95736:(a,b,c)=>{a.exports=c(44870)}};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";exports.id=3801,exports.ids=[2839,3801,5220],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
|
+
${c}
|
|
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(69198),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")}}},20029:(a,b,c)=>{c.d(b,{C7:()=>r,KF:()=>n,Nq:()=>p,cu:()=>l,m4:()=>s,zE:()=>m});var d=c(55511),e=c(36925),f=c(72626),g=c(2669),h=c(7321);let i=(0,f.h)("session/send-attempt-state"),j=(0,e.v)("__sendAttemptRecords",()=>new Map);function k(a){return JSON.stringify([a.worktreeId,a.cliToolId,a.instanceId])}function l(a){return(0,d.createHash)("sha256").update(a,"utf8").digest("hex").slice(0,16)}function m(a,b,c=Date.now()){try{let d=k(a);for(j.delete(d),j.set(d,{at:Math.floor(c),state:b.state,reason:b.reason,messageDigest:l(b.content)});j.size>1024;){let a=j.keys().next().value;if(void 0===a)break;j.delete(a)}}catch(a){i.warn("send-attempt-record-failed",{error:a instanceof Error?a.message:String(a)})}}function n(a){return j.get(k(a))??null}let o=/Command failed: tmux |Failed to send (?:special )?keys? to tmux session|Failed to send special key:|Failed to paste message into tmux session/;function p(a){if("object"==typeof a&&null!==a&&a.code===g.M7)return{state:"not-sent",reason:"session-starting"};if("object"==typeof a&&null!==a&&a.code===h.Le)return{state:"not-sent",reason:"plan-review"};let b=a instanceof Error?a.message:String(a);return/Enter was not pressed, so nothing was submitted/.test(b)?{state:"indeterminate",reason:"body-not-landed"}:/replaced by a TUI autocompletion/.test(b)?{state:"indeterminate",reason:"replaced-by-completion"}:/submit could not be confirmed/i.test(b)?{state:"indeterminate",reason:"submit-unconfirmed"}:/Could not re-read session \S+ before typing \(.*\); nothing was typed \(Issue #3945\)/s.test(b)?{state:"not-sent",reason:"recheck-failed"}:o.test(b)?{state:"indeterminate",reason:"send-error"}:/prompt not ready/i.test(b)?{state:"not-sent",reason:"prompt-not-ready"}:/input lock not acquired, nothing was typed/.test(b)?/was replaced while this send waited/.test(b)?{state:"not-sent",reason:"session-replaced"}:{state:"not-sent",reason:"input-lock-timeout"}:/\(re-checked under the input lock\); nothing was typed/.test(b)?{state:"not-sent",reason:"prompt-waiting"}:/input lock lost, nothing was typed/.test(b)?{state:"not-sent",reason:"input-lock-lost"}:/still holds unsent text after \d+ clear passes/.test(b)?{state:"not-sent",reason:"composer-not-empty"}:{state:"indeterminate",reason:"send-error"}}function q(a){return a.replace(/\s+/g,"")}function r(a,b){let c=q(b.split("\n").find(a=>""!==a.trim())??"").slice(0,32);return""!==c&&q(a).includes(c)}function s(a){return"not-sent"===a.state?`[send state: not-sent (${a.reason}): the message was not typed. CommandMate does not resend it; send it again once the input prompt is back (\`commandmate prompt <worktree-id> --json\` shows the screen and lastSend).]`:"indeterminate"===a.state?`[send state: indeterminate (${a.reason}): part of the message may have been typed or submitted. CommandMate does not resend it; do not resend before checking the pane (\`commandmate capture <worktree-id> --pane\`), or it may arrive twice.]`:`[send state: sent (${a.reason})]`}},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)};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)};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&&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)}:(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}}},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:()=>$,runRelayMaintenanceTick:()=>ac});var d=c(88807),e=c(69198),f=c(52660),g=c(55233),h=c(39687),i=c(640),j=c(10168),k=c(55511),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=[f.RELAY_SYSTEM_REQUEST_ID_PREFIX,f.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,f.getMessages)(a,b.worktreeId,{limit:40,cliToolId:b.cliToolId,instanceId:b.instanceId,matchResolvedInstance:!0}),e=A(b.cliToolId);for(let a of d){var g;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(g=a.requestId)&&w.test(g))&&""!==a.content.trim())return a.timestamp.getTime()<c?null:a}}return null}function C(a,b,c){let d=(0,e.ix)(a,{worktreeId:b.worktreeId,instanceId:b.instanceId});if(0===d.length)return 0;let f=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 f of F(a,b,c.inputBoundaryAt??c.createdAt))(0,e.EG)(a,c.id,{messageId:f.row.id,timestamp:f.orderAt,requestId:f.row.requestId??null},d);return!1}if("sent"!==c.sendState||null===c.inputBoundaryAt)return!1;let f=(0,e.TN)(a,c.id);if(!f||!E(a,b,f))return!1;let[g]=F(a,b,c.inputBoundaryAt);return!!g&&G(a,b,f,g.row,d)})(a,b,g,c)&&(f+=1);continue}let d=B(a,b,g.createdAt);if(!d)continue;let h=(0,i.z0)(z(a,g),d.content);D(a,g.id,{candidateId:d.id,body:h,overlap:null,basis:"legacy"},c)&&(f+=1)}return f}function D(a,b,c,d){let f={...c,payloadId:(0,k.randomUUID)()};if((0,e.be)(a,b,"reply",f.body,d,{payloadId:f.payloadId,overlap:f.overlap??void 0}))return!0;let g=(0,e.V9)(a,b);return!!g&&"prompt"===g.kind&&(!!(!(0,s.p5)(b)&&(0,e.Iq)(a,b,g.payloadId,f,d))||(0,e.nR)(a,b,f,d))}function E(a,b,c){if("invalid"===c.relay.obsState)return!1;let d=(0,j.Vg)(b.worktreeId,b.cliToolId,b.instanceId);if(c.obsSource===d)return!0;let f=(0,j.BR)(c.obsSource)!==(0,j.YT)();return(0,e.FO)(a,c.relay.id,f?m.yk.serverRestarted:m.yk.generationChanged,{invalidate:!0}),v.info("relay-observation-mismatch",{relayId:c.relay.id,restarted:f}),!1}function F(a,b,c){let d=A(b.cliToolId),e=x.map(()=>"request_id NOT LIKE ?").join(" AND "),g=a.prepare(`
|
|
5
|
+
SELECT id, request_id, timestamp FROM chat_messages
|
|
6
|
+
WHERE worktree_id = ? ${f.ACTIVE_FILTER}
|
|
7
|
+
AND COALESCE(cli_tool_id, 'claude') = ?
|
|
8
|
+
AND COALESCE(instance_id, cli_tool_id, 'claude') = ?
|
|
9
|
+
AND role = 'assistant' AND COALESCE(message_type, 'normal') != 'prompt'
|
|
10
|
+
AND (request_id IS NULL OR (${e}))
|
|
11
|
+
${d?"AND request_id LIKE '%-turn:%'":""}
|
|
12
|
+
AND TRIM(content, ' ' || char(9, 10, 13)) != ''
|
|
13
|
+
AND timestamp >= ?
|
|
14
|
+
ORDER BY timestamp ASC, rowid ASC
|
|
15
|
+
LIMIT ?
|
|
16
|
+
`).all(b.worktreeId,b.cliToolId,b.instanceId,...x.map(a=>`${a}%`),c,500),h=[],i=new Set;for(let c of g){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
|
+
SELECT id FROM chat_messages
|
|
18
|
+
WHERE worktree_id = ? ${f.ACTIVE_FILTER}
|
|
19
|
+
AND COALESCE(cli_tool_id, 'claude') = ?
|
|
20
|
+
AND COALESCE(instance_id, cli_tool_id, 'claude') = ?
|
|
21
|
+
AND role = 'assistant' AND request_id = ?
|
|
22
|
+
AND TRIM(content, ' ' || char(9, 10, 13)) != ''
|
|
23
|
+
ORDER BY timestamp DESC, rowid DESC
|
|
24
|
+
LIMIT 1
|
|
25
|
+
`).get(b.worktreeId,b.cliToolId,b.instanceId,c);return d?(0,f.getMessageById)(a,d.id):null}(a,b,c.request_id);d&&h.push({row:d,orderAt:c.timestamp});continue}let d=(0,f.getMessageById)(a,c.id);d&&h.push({row:d,orderAt:c.timestamp})}return h}function G(a,b,c,d,e){let h=function(a,b,c,d){let{relay:e}=b,g=!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 g=a.prepare("SELECT rowid AS seq FROM chat_messages WHERE id = ?").get(d.id);if(!g)return"ambiguous";let h=a.prepare(`
|
|
26
|
+
SELECT id, content, rowid AS seq FROM chat_messages
|
|
27
|
+
WHERE worktree_id = ? AND role = 'user' ${f.ACTIVE_FILTER}
|
|
28
|
+
AND COALESCE(cli_tool_id, 'claude') = ?
|
|
29
|
+
AND COALESCE(instance_id, cli_tool_id, 'claude') = ?
|
|
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()}},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){let c=`${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>\`.`;if("structured"!==b)return c;let d=Math.round(i.j0/6e4);return`${c} 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 ${d} minutes after it was reported, or immediately with \`commandmate send ${a} <message> --ignore-structured-prompt\` (server-wide: ${i.F1}=off).`}},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)}},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 +1 @@
|
|
|
1
|
-
"use strict";exports.id=4243,exports.ids=[4243],exports.modules={9758:(a,b,c)=>{c.d(b,{Ck:()=>h});var d=c(21124),e=c(38301),f=c.n(e),g=c(62484);function h({children:a,as:b="div",className:c=""}){let e=function a(b){return null==b||"boolean"==typeof b?"":"string"==typeof b?b:"number"==typeof b?String(b):Array.isArray(b)?b.map(a).join(""):f().isValidElement(b)?a(b.props.children):""}(a);if(!e||0===e.trim().length)return(0,d.jsx)(b,{className:c||void 0,children:a});let h=`relative group ${"span"===b?"block ":""}${c}`.trim();return(0,d.jsxs)(b,{className:h,"data-testid":"code-block-with-copy",children:[a,(0,d.jsx)(g.i,{text:e,className:"absolute right-2 top-2 z-10 opacity-100 md:opacity-0 md:group-hover:opacity-100 md:group-focus-within:opacity-100 focus:opacity-100"})]})}},9815:(a,b,c)=>{c.d(b,{B:()=>B});var d=c(21124),e=c(38301),f=c(20481),g=c(85866),h=c(17252),i=c(90349),j=c(85389),k=c(3805);let l={status:"loading",options:[]};function m({selectedWorktreeId:a,onSelect:b,disabled:c=!1}){let h=(0,f.c)("skills"),[i,j]=(0,e.useState)(l),[m,o]=(0,e.useState)(0),p=(0,e.useCallback)(()=>o(a=>a+1),[]);return"loading"===i.status?(0,d.jsxs)("div",{className:"space-y-2","data-testid":"skill-target-loading",children:[(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:h("target.loading")}),(0,d.jsx)(g.EA,{className:"h-24 w-full rounded-lg"})]}):"error"===i.status?(0,d.jsxs)(g.Zp,{className:"space-y-3","data-testid":"skill-target-error",children:[(0,d.jsx)(k.u,{tone:"danger",children:h("target.errorNotice")}),(0,d.jsx)(g.$n,{variant:"secondary",size:"sm",onClick:p,"data-testid":"skill-target-retry",children:h("target.retry")})]}):0===i.options.length?(0,d.jsx)(g.Zp,{"data-testid":"skill-target-empty",children:(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:h("target.empty")})}):(0,d.jsxs)("div",{className:"space-y-3","data-testid":"skill-target-selector",children:[(0,d.jsx)("div",{role:"radiogroup","aria-label":h("target.heading"),className:"space-y-2",children:i.options.map(e=>(0,d.jsx)(n,{option:e,selected:e.id===a,disabled:c,onSelect:b},e.id))}),(0,d.jsx)(k.u,{tone:"neutral","data-testid":"skill-target-branch-notice",children:h("target.branchFreshnessNotice")})]})}function n({option:a,selected:b,disabled:c,onSelect:e}){let h=(0,f.c)("skills"),i=a.liveBranch??a.syncedBranch;return(0,d.jsxs)("button",{type:"button",role:"radio","aria-checked":b,disabled:c,onClick:()=>e(a.id),"data-testid":`skill-target-option-${a.id}`,className:`w-full rounded-lg border px-3 py-2.5 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-60 ${b?"border-accent-500 bg-accent-50 dark:bg-accent-950/40":"border-border bg-card hover:bg-muted"}`,children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-sm font-semibold text-foreground break-all",children:a.name}),b&&(0,d.jsx)(g.Ex,{variant:"info",children:h("target.selected")})]}),(0,d.jsxs)("dl",{className:"mt-1.5 grid grid-cols-1 gap-x-4 gap-y-1 sm:grid-cols-2",children:[(0,d.jsx)(o,{label:h("target.repository"),children:a.repositoryName}),(0,d.jsx)(o,{label:h("target.branch"),children:i??h("target.branchUnknown")}),(0,d.jsx)(o,{label:h("target.agents"),children:a.agents.length>0?a.agents.join(", "):h("target.agentsNone")}),(0,d.jsx)(o,{label:h("target.workingTree"),children:h(null===a.dirty?"target.workingTreeUnknown":a.dirty?"target.workingTreeDirty":"target.workingTreeClean")})]}),a.sessionRunning&&(0,d.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground","data-testid":`skill-target-session-${a.id}`,children:h("target.sessionRunning")})]})}function o({label:a,children:b}){return(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:a}),(0,d.jsx)("dd",{className:"text-xs text-foreground break-words",children:b})]})}var p=c(27884);function q({label:a,children:b}){return(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:a}),(0,d.jsx)("dd",{className:"mt-0.5 break-words text-sm text-foreground",children:b})]})}function r({level:a,kind:b,label:c}){let e=(0,f.c)("skills");return(0,d.jsxs)(g.Ex,{variant:p.eK[a],"data-testid":`skill-plan-risk-${b}-${a}`,children:[c,": ",e(p.pP[a])]})}function s({entry:a}){let b=(0,f.c)("skills"),c=p.KL[a.reason];return(0,d.jsxs)("li",{className:"space-y-1.5 rounded-md border border-border px-3 py-2","data-testid":`skill-plan-file-${a.path}`,children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)(g.Ex,{variant:p.tC[a.change],children:b(p.AS[a.change])}),(0,d.jsx)("span",{className:"break-all font-mono text-xs text-foreground",children:a.path}),a.generated&&(0,d.jsx)(g.Ex,{variant:"gray",children:b("plan.fileGenerated")})]}),c&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:b(c)}),a.gitIgnored&&(0,d.jsx)("p",{className:"text-xs text-warning-foreground",children:b("plan.gitIgnored")}),a.binary?(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:b("plan.diffBinary")}):a.diff?(0,d.jsxs)("details",{children:[(0,d.jsx)("summary",{className:"cursor-pointer text-xs text-accent-600 dark:text-accent-400",children:b("plan.diffToggle",{additions:a.additions,deletions:a.deletions})}),(0,d.jsx)("pre",{className:"mt-1 overflow-x-auto rounded bg-muted p-2 font-mono text-[11px] leading-snug text-foreground",children:a.diff}),a.diffTruncated&&(0,d.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:b("plan.diffTruncated")})]}):null]})}function t({plan:a}){let b=(0,f.c)("skills"),{target:c,skill:e}=a,h=e.compatibility.commandmate;return(0,d.jsxs)(g.Zp,{className:"space-y-4","data-testid":"skill-install-plan",children:[(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:b("plan.heading")}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:b("plan.expiresAt",{timestamp:a.expiresAt})})]}),(0,d.jsxs)("section",{className:"space-y-2",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("plan.targetHeading")}),(0,d.jsxs)("dl",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,d.jsx)(q,{label:b("target.repository"),children:c.repositoryName}),(0,d.jsx)(q,{label:b("target.heading"),children:c.worktreeName}),(0,d.jsx)(q,{label:b("target.branch"),children:c.branch??b("target.branchUnknown")}),(0,d.jsx)(q,{label:b("plan.headStateLabel"),children:b(p.kF[c.headState]??"plan.headState.unknown")}),(0,d.jsx)(q,{label:b("target.workingTree"),children:c.workingTreeUnknown?b("target.workingTreeStatusUnknown"):c.workingTreeDirty?b("target.workingTreeDirty"):b("target.workingTreeClean")}),(0,d.jsx)(q,{label:b("plan.installRoot"),children:(0,d.jsx)("span",{className:"break-all font-mono text-xs",children:(c.installRoots&&c.installRoots.length>0?c.installRoots:[c.installRoot]).map(a=>(0,d.jsx)("span",{className:"block",children:a},a))})}),(0,d.jsx)(q,{label:b("plan.existingInstall"),children:c.existingInstall?b("plan.existingInstallVersion",{version:c.existingInstall.version}):b("plan.existingInstallNone")}),(0,d.jsx)(q,{label:b("detail.recommendedVersion"),children:(0,d.jsx)("span",{className:"font-mono text-xs",children:e.version})})]})]}),(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-risk-section",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("plan.riskHeading")}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[(0,d.jsx)(r,{level:e.declaredRisk,kind:"declared",label:b("plan.riskDeclared")}),(0,d.jsx)(r,{level:e.computedRisk,kind:"computed",label:b("plan.riskComputed")}),(0,d.jsx)(r,{level:e.effectiveRisk,kind:"effective",label:b("plan.riskEffective")})]}),(0,d.jsx)("p",{className:"break-words text-sm text-foreground",children:e.riskRationale}),(0,d.jsx)(k.u,{tone:"neutral",children:b("plan.riskNotice")})]}),(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-permissions",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("permissions.heading")}),e.declaredPermissions.length>0?(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.declaredPermissions.map(a=>(0,d.jsx)(g.Ex,{variant:"warning",children:p.z2[a]?b(p.z2[a]):a},a))}):(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("plan.permissionsNone")}),(0,d.jsx)(k.u,{tone:"warning",children:b("permissions.declarationOnlyNotice")})]}),(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-requirements",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("requirements.heading")}),0===e.requirements.commands.length&&0===e.requirements.networkHosts.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("plan.requirementsNone")}):(0,d.jsxs)("dl",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[e.requirements.commands.length>0&&(0,d.jsx)(q,{label:b("plan.requirementsCommands"),children:e.requirements.commands.map(a=>`${a.name} ${a.versionRange??b("plan.commandAnyVersion")}`).join(", ")}),e.requirements.networkHosts.length>0&&(0,d.jsx)(q,{label:b("plan.requirementsHosts"),children:e.requirements.networkHosts.join(", ")})]})]}),(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-scripts",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("plan.scriptsHeading")}),0===e.executablePaths.length&&0===e.scriptPaths.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("plan.scriptsNone")}):(0,d.jsx)("ul",{className:"space-y-1",children:[...new Set([...e.scriptPaths,...e.executablePaths])].map(a=>(0,d.jsx)("li",{className:"break-all font-mono text-xs text-foreground",children:a},a))})]}),"compatible"!==h.status&&(0,d.jsx)(k.u,{tone:"warning","data-testid":"skill-plan-compatibility-notice",children:b((0,p.e5)(h.messageKey),{range:h.requiredRange,currentVersion:h.currentVersion??""})}),a.warnings.length>0&&(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-warnings",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("plan.warningsHeading")}),(0,d.jsx)("ul",{className:"space-y-1",children:a.warnings.map(a=>(0,d.jsx)("li",{className:"text-xs text-warning-foreground",children:p.RO[a]?b(p.RO[a]):a},a))})]}),(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-files",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("plan.filesHeading")}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"skill-plan-stats",children:b("plan.stats",{added:a.stats.added,modified:a.stats.modified,unchanged:a.stats.unchanged,conflicted:a.stats.conflicted,unmanaged:a.stats.unmanaged})}),0===a.files.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("plan.filesEmpty")}):(0,d.jsx)("ul",{className:"space-y-2",children:a.files.map(a=>(0,d.jsx)(s,{entry:a},a.path))})]}),a.blockers.length>0&&(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-install-blockers",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-danger-foreground",children:b("plan.blockersHeading")}),(0,d.jsx)("ul",{className:"space-y-1",children:a.blockers.map(a=>(0,d.jsxs)("li",{className:"text-xs text-danger-foreground",children:[a.path&&(0,d.jsx)("span",{className:"mr-1 break-all font-mono",children:a.path}),a.code.startsWith("skills.")?b((0,p.e5)(a.code),{range:h.requiredRange,currentVersion:h.currentVersion??""}):p.KL[a.code]?b(p.KL[a.code]):a.code]},`${a.code}:${a.path??""}`))}),(0,d.jsx)(k.u,{tone:"danger",children:b("plan.blockedNotice")})]})]})}function u({entry:a}){let b=(0,f.c)("skills"),c=p.Mj[a.disposition],e=p.hJ[a.reason];return(0,d.jsxs)("li",{className:"flex flex-wrap items-center gap-2","data-testid":`skill-uninstall-file-${a.path}`,children:[(0,d.jsx)(g.Ex,{variant:"remove"===a.disposition?"info":"warning",children:c?b(c):a.disposition}),(0,d.jsx)("span",{className:"break-all font-mono text-xs text-foreground",children:a.path}),e&&(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:b(e)})]})}function v({plan:a}){let b=(0,f.c)("skills"),{target:c,skill:e}=a;return(0,d.jsxs)(g.Zp,{className:"space-y-4","data-testid":"skill-uninstall-plan",children:[(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:b("uninstall.heading")}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:b("uninstall.expiresAt",{timestamp:a.expiresAt})})]}),(0,d.jsxs)("dl",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,d.jsx)(q,{label:b("target.repository"),children:c.repositoryName}),(0,d.jsx)(q,{label:b("target.heading"),children:c.worktreeName}),(0,d.jsx)(q,{label:b("target.branch"),children:c.branch??b("target.branchUnknown")}),(0,d.jsx)(q,{label:b("uninstall.installedVersion"),children:(0,d.jsx)("span",{className:"font-mono text-xs",children:e.version||b("uninstall.versionUnknown")})}),(0,d.jsx)(q,{label:b("plan.installRoot"),children:(0,d.jsx)("span",{className:"break-all font-mono text-xs",children:c.installRoot})}),(0,d.jsx)(q,{label:b("target.workingTree"),children:c.workingTreeUnknown?b("target.workingTreeStatusUnknown"):c.workingTreeDirty?b("target.workingTreeDirty"):b("target.workingTreeClean")})]}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"skill-uninstall-stats",children:b("uninstall.stats",{removable:a.stats.removable,modified:a.stats.modified,missing:a.stats.missing,unknown:a.stats.unknown,irregular:a.stats.irregular})}),(0,d.jsxs)("section",{className:"space-y-2",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("uninstall.removalsHeading")}),0===a.removals.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("uninstall.removalsEmpty")}):(0,d.jsx)("ul",{className:"space-y-1.5",children:a.removals.map(a=>(0,d.jsx)(u,{entry:a},a.path))})]}),(0,d.jsxs)("section",{className:"space-y-2",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("uninstall.retainedHeading")}),0===a.retained.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("uninstall.retainedEmpty")}):(0,d.jsx)("ul",{className:"space-y-1.5",children:a.retained.map(a=>(0,d.jsx)(u,{entry:a},a.path))})]}),(0,d.jsxs)("div",{className:"space-y-2",children:[a.skill.agents.length>0&&(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5","data-testid":"skill-uninstall-agents",children:a.skill.agents.map(a=>(0,d.jsx)(g.Ex,{variant:"gray",children:(0,h.f_)(a.agent)},a.agent))}),(0,d.jsx)(k.u,{tone:"neutral",children:b((0,p.e5)(a.nextActionKey))})]}),a.blockers.length>0&&(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-uninstall-blockers",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-danger-foreground",children:b("uninstall.blockersHeading")}),(0,d.jsx)("ul",{className:"space-y-1",children:a.blockers.map(a=>(0,d.jsxs)("li",{className:"text-xs text-danger-foreground",children:[a.path&&(0,d.jsx)("span",{className:"mr-1 break-all font-mono",children:a.path}),b((0,p.e5)(a.messageKey))]},`${a.code}:${a.path??""}`))})]})]})}var w=c(30156);let x={worktreeId:null,busy:null,installPlan:null,uninstallPlan:null,installResult:null,uninstallResult:null,riskAcknowledged:!1,failure:null};function y(a){return{...a,installPlan:null,uninstallPlan:null,installResult:null,uninstallResult:null,riskAcknowledged:!1,failure:null}}function z({failure:a}){let b=(0,f.c)("skills");return(0,d.jsxs)("div",{className:"space-y-2","data-testid":"skill-operation-error",children:[(0,d.jsxs)(k.u,{tone:"danger",children:[(0,d.jsx)("p",{className:"font-medium",children:b("operation.errorHeading")}),(0,d.jsx)("p",{className:"mt-1",children:b((0,p.FW)(a.code))}),(0,d.jsx)("p",{className:"mt-1 break-words",children:b("state.errorCode",{code:a.code})})]}),a.nextActionKey&&(0,d.jsx)(k.u,{tone:"warning",children:b((0,p.e5)(a.nextActionKey))}),a.blockers&&a.blockers.length>0&&(0,d.jsx)("ul",{className:"space-y-1","data-testid":"skill-operation-error-blockers",children:a.blockers.map(a=>(0,d.jsxs)("li",{className:"text-xs text-danger-foreground",children:[a.path&&(0,d.jsx)("span",{className:"mr-1 break-all font-mono",children:a.path}),b((0,p.e5)(a.messageKey))]},`${a.code}:${a.path??""}`))})]})}function A({agents:a,skillId:b,version:c}){let e=(0,f.c)("skills");return 0===a.length?null:(0,d.jsxs)("div",{className:"space-y-1","data-testid":"skill-operation-reload",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:e("operation.reloadHeading")}),(0,d.jsx)("ul",{className:"space-y-1",children:a.map(a=>(0,d.jsx)("li",{className:"text-xs text-muted-foreground",children:e((0,p.e5)(a.messageKey),{agent:(0,h.f_)(a.agent),skillId:b,version:c})},a.agent))})]})}function B({skillId:a,version:b,blockedReason:c,worktreeId:h,agents:l=[]}){let n=(0,f.c)("skills"),[o,q]=(0,e.useState)(()=>h?{...x,worktreeId:h}:x),r=(0,e.useCallback)(a=>{q(b=>b.worktreeId===a?b:y({...b,worktreeId:a,busy:null}))},[]),s=(0,e.useCallback)(async()=>{let c=o.worktreeId;if(!c)return;q(a=>({...y(a),busy:"install-plan"}));let d=await (0,w.Q6)(c,a,{version:b??void 0});q(a=>({...a,busy:null,installPlan:d.ok?d.data.plan:null,failure:d.ok?null:d.failure}))},[a,o.worktreeId,b]),u=(0,e.useCallback)(async()=>{var b;let c=o.worktreeId,d=o.installPlan;if(!c||!d||d.requiresRiskAcknowledgement&&!o.riskAcknowledged)return;q(a=>({...a,busy:"install-apply",failure:null}));let e=await (0,w.Xi)(c,a,{planToken:d.token,version:d.skill.version,acknowledgeRisk:!!d.requiresRiskAcknowledgement||void 0,idempotencyKey:(b=d.token,`skill-install-${b}`)});e.ok&&(0,i.k)(c),q(a=>({...a,busy:null,installPlan:e.ok?null:a.installPlan,installResult:e.ok?e.data:null,failure:e.ok?null:e.failure}))},[a,o.installPlan,o.riskAcknowledged,o.worktreeId]),B=(0,e.useCallback)(async()=>{let b=o.worktreeId;if(!b)return;q(a=>({...y(a),busy:"uninstall-plan"}));let c=await (0,w.hN)(b,a);q(a=>({...a,busy:null,uninstallPlan:c.ok?c.data.plan:null,failure:c.ok?null:c.failure}))},[a,o.worktreeId]),C=(0,e.useCallback)(async()=>{var b;let c=o.worktreeId,d=o.uninstallPlan;if(!c||!d)return;q(a=>({...a,busy:"uninstall-apply",failure:null}));let e=await (0,w.E)(c,a,{planToken:d.token,idempotencyKey:(b=d.token,`skill-uninstall-${b}`)});q(a=>({...a,busy:null,uninstallPlan:e.ok?null:a.uninstallPlan,uninstallResult:e.ok?e.data:null,failure:e.ok?null:e.failure}))},[a,o.uninstallPlan,o.worktreeId]),D=(0,e.useCallback)(()=>{q(a=>y(a))},[]),E=null!==o.busy,F=o.installPlan,G=o.uninstallPlan,H=c??n(o.worktreeId?"plan.ready":"plan.chooseTarget"),I=null!==F&&F.requiresRiskAcknowledgement&&!o.riskAcknowledged;return(0,d.jsxs)("div",{className:"space-y-3","data-testid":"skill-install-panel",children:[!h&&(0,d.jsx)(m,{selectedWorktreeId:o.worktreeId,onSelect:r,disabled:E}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,d.jsx)(g.$n,{variant:"primary",disabled:E||null!==c||!o.worktreeId,onClick:s,"data-testid":"skill-install-action","aria-describedby":"skill-install-reason",children:n("install-plan"===o.busy?"plan.building":"plan.build")}),(0,d.jsx)(g.$n,{variant:"secondary",disabled:E||!o.worktreeId,onClick:B,"data-testid":"skill-uninstall-action",children:n("uninstall-plan"===o.busy?"uninstall.building":"uninstall.build")})]}),(0,d.jsx)("p",{id:"skill-install-reason",className:"text-sm text-muted-foreground","data-testid":"skill-install-reason",children:H}),l.length>0&&(0,d.jsxs)("div",{className:"space-y-1","data-testid":"skill-install-reload-preview",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:n("operation.reloadHeading")}),(0,d.jsx)("ul",{className:"space-y-1",children:l.map(a=>(0,d.jsx)(j.m,{agent:a,variant:"reload"},a.agent))})]}),o.failure&&(0,d.jsx)(z,{failure:o.failure}),F&&(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsx)(t,{plan:F}),F.requiresRiskAcknowledgement&&(0,d.jsxs)(g.Zp,{className:"space-y-3","data-testid":"skill-install-risk-acknowledgement",children:[(0,d.jsx)(k.u,{tone:"danger",children:n((0,p.e5)(F.riskAcknowledgementMessageKey??"skills.plan.highRiskAcknowledgement"))}),(0,d.jsxs)("label",{className:"flex items-start gap-2 text-sm text-foreground",children:[(0,d.jsx)(g.Sc,{checked:o.riskAcknowledged,onCheckedChange:a=>q(b=>({...b,riskAcknowledged:!0===a})),disabled:E,"data-testid":"skill-install-risk-checkbox",className:"mt-0.5"}),(0,d.jsx)("span",{children:n("plan.acknowledgeLabel")})]})]}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,d.jsx)(g.$n,{variant:F.requiresRiskAcknowledgement?"danger":"primary",disabled:E||!F.installable||I,onClick:u,"data-testid":"skill-install-confirm",children:n("install-apply"===o.busy?"plan.confirming":"plan.confirm")}),(0,d.jsx)(g.$n,{variant:"ghost",disabled:E,onClick:D,"data-testid":"skill-install-discard",children:n("plan.discard")})]})]}),G&&(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsx)(v,{plan:G}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,d.jsx)(g.$n,{variant:"danger",disabled:E||!G.removable,onClick:C,"data-testid":"skill-uninstall-confirm",children:n("uninstall-apply"===o.busy?"uninstall.confirming":"uninstall.confirm")}),(0,d.jsx)(g.$n,{variant:"ghost",disabled:E,onClick:D,"data-testid":"skill-uninstall-discard",children:n("plan.discard")})]})]}),o.installResult&&(0,d.jsxs)(g.Zp,{className:"space-y-3","data-testid":"skill-install-result",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:n("operation.installedHeading")}),(0,d.jsx)(k.u,{tone:"info",children:n((0,p.e5)(o.installResult.operation.nextActionKey))}),o.installResult.operation.replayed&&(0,d.jsx)(k.u,{tone:"neutral","data-testid":"skill-operation-replayed",children:n("operation.replayNotice")}),o.installResult.install&&"files"in o.installResult.install&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:n("operation.filesWritten",{count:o.installResult.install.files.length})}),"reload"in o.installResult&&(0,d.jsx)(A,{agents:o.installResult.reload.agents,skillId:o.installResult.reload.skillId,version:o.installResult.reload.version}),(0,d.jsx)(g.$n,{variant:"secondary",size:"sm",onClick:D,"data-testid":"skill-operation-reset",children:n("operation.startOver")})]}),o.uninstallResult&&(0,d.jsxs)(g.Zp,{className:"space-y-3","data-testid":"skill-uninstall-result",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:n("operation.uninstalledHeading")}),(0,d.jsx)(k.u,{tone:"info",children:n((0,p.e5)(o.uninstallResult.operation.nextActionKey))}),o.uninstallResult.operation.replayed&&(0,d.jsx)(k.u,{tone:"neutral","data-testid":"skill-operation-replayed",children:n("operation.replayNotice")}),o.uninstallResult.uninstall&&"removedFiles"in o.uninstallResult.uninstall&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:n("operation.filesRemoved",{count:o.uninstallResult.uninstall.removedFiles.length})}),"reload"in o.uninstallResult&&(0,d.jsx)(A,{agents:o.uninstallResult.reload.agents,skillId:o.uninstallResult.reload.skillId,version:o.uninstallResult.reload.version}),(0,d.jsx)(g.$n,{variant:"secondary",size:"sm",onClick:D,"data-testid":"skill-operation-reset",children:n("operation.startOver")})]})]})}},28593:(a,b,c)=>{c.d(b,{Xz:()=>j,qW:()=>k,uE:()=>l});var d=c(21124);c(38301);var e=c(20481),f=c(93983),g=c(85866),h=c(17252),i=c(27884);function j({status:a,className:b}){let c=(0,e.c)("skills");return(0,d.jsx)(g.Ex,{variant:i.H$[a],className:b,"data-testid":`skill-compatibility-${a}`,children:c(i.OV[a])})}function k({risk:a,className:b}){let c=(0,e.c)("skills");return(0,d.jsxs)(g.Ex,{variant:i.eK[a],className:b,"data-testid":`skill-declared-risk-${a}`,children:["high"===a&&(0,d.jsx)(f.A,{size:12,"aria-hidden":"true",className:"mr-1 shrink-0"}),c("risk.declaredLabel",{level:c(i.pP[a])})]})}function l({agent:a}){let b=(0,e.c)("skills");return(0,d.jsxs)(g.Ex,{variant:i.Et[a.support],"data-testid":`skill-agent-${a.agent}-${a.support}`,children:[(0,h.f_)(a.agent),": ",b((0,i.e5)(a.labelKey))]})}},34126:(a,b,c)=>{c.d(b,{G8:()=>r});var d=c(21124),e=c(38301),f=c(27867),g=c(26295),h=c(29701),i=c(28752),j=c(37950);c(31230);var k=c(56722),l=c(45538),m=c(9758),n=c(30917),o=c(82620),p=c(12894),q=c(88033);let r=(0,e.memo)(function({content:a,onOpenFile:b,currentFilePath:c,worktreeId:r}){let s=(0,e.useRef)(b);s.current=b;let t=(0,e.useRef)(c);t.current=c;let u=(0,e.useRef)(r);u.current=r;let v=(0,e.useCallback)((a,b)=>{let c=(0,o.d3)(b);if(c)switch((0,o.dj)(c)){case"anchor":break;case"external":a.preventDefault(),window.open(c,"_blank","noopener,noreferrer");break;case"relative":{a.preventDefault();let b=t.current,d=s.current;if(b&&d){let a=(0,o.WU)(b,c);a&&d(a)}}}},[]),w=(0,e.useMemo)(()=>({code:k.AY,pre:({children:a})=>(0,l.D)(a)?(0,d.jsx)(d.Fragment,{children:a}):(0,d.jsx)(m.Ck,{children:(0,d.jsx)("pre",{className:"overflow-x-auto",children:a})}),img:({src:a,alt:b,width:c,height:e,...f})=>{let g=c??f.node?.properties?.width,h=e??f.node?.properties?.height;if("string"==typeof a&&!a.startsWith("http://")&&!a.startsWith("https://")&&!a.startsWith("data:")){let c=t.current,e=u.current;if(c&&e){let f=(0,o.WU)(c,a);if(f){let a=`/api/worktrees/${e}/files/${(0,p.o)(f)}`;return(0,d.jsx)(n.n,{apiUrl:a,alt:b??"",width:g,height:h})}}}return(0,d.jsx)("img",{src:a,alt:b??"",width:g,height:h,style:{maxWidth:g||"100%"}})},a:({href:a,children:b,...c})=>a?(0,d.jsx)("a",{...c,href:a,onClick:b=>v(b,a),children:b}):(0,d.jsx)("a",{...c,children:b})}),[v]),x=(0,e.useMemo)(()=>[g.A,[h.A,o.uO],i.A,j.A],[]);return(0,d.jsx)(f.oz,{remarkPlugins:q.eT,rehypePlugins:x,components:w,children:a})})},62484:(a,b,c)=>{c.d(b,{i:()=>j});var d=c(21124),e=c(38301),f=c(63156),g=c(58970);function h(){return(0,d.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}function i(){return(0,d.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}function j({text:a,className:b="",label:c="Copy"}){let[j,k]=(0,e.useState)(!1),l=(0,e.useRef)(null),m=(0,e.useCallback)(async()=>{try{await (0,f.l)(a),k(!0),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>k(!1),g.s7)}catch{}},[a]);return(0,d.jsxs)("button",{type:"button",onClick:m,className:`inline-flex items-center gap-1 rounded border border-border bg-surface px-2 py-0.5 text-[11px] font-medium text-foreground transition-colors hover:bg-muted ${b}`,"aria-label":j?"Copied":c,title:j?"Copied!":c,children:[j?(0,d.jsx)(i,{}):(0,d.jsx)(h,{}),(0,d.jsx)("span",{children:j?"Copied":c})]})}},81136:(a,b,c)=>{c.d(b,{Co:()=>d,Ms:()=>f,td:()=>e});let d=".agents/skills",e=".claude/skills",f="skills.permissions.declarationOnlyNotice"},85389:(a,b,c)=>{c.d(b,{m:()=>j});var d=c(21124);c(38301);var e=c(20481),f=c(17252),g=c(3805),h=c(27884);function i({axis:a,agentName:b}){let c=(0,e.c)("skills");return(0,d.jsxs)("li",{className:"text-xs text-muted-foreground","data-testid":`skill-agent-axis-${a.axis}`,children:[(0,d.jsx)("span",{className:"font-medium text-foreground",children:c((0,h.e5)(a.axisKey))}),": ",(0,d.jsx)("span",{"data-testid":`skill-agent-axis-${a.axis}-${a.outcome}`,children:c((0,h.e5)(a.outcomeKey))})," — ",c((0,h.e5)(a.evidenceKindKey)),a.limitationKey&&(0,d.jsx)("span",{className:"mt-0.5 block","data-testid":`skill-agent-axis-${a.axis}-limitation`,children:c((0,h.e5)(a.limitationKey),{agent:b})})]})}function j({agent:a,variant:b="full"}){let c=(0,e.c)("skills"),j=(0,f.f_)(a.agent),k=a.measured;return"reload"===b?(0,d.jsx)("li",{className:"text-xs text-muted-foreground","data-testid":`skill-agent-reload-${a.agent}`,children:c((0,h.e5)(a.reloadKey),{agent:j})}):(0,d.jsxs)("div",{className:"space-y-1","data-testid":`skill-agent-evidence-${a.agent}`,children:[(0,d.jsx)("p",{className:"text-xs font-medium text-foreground",children:j}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground break-words",children:c("compatibility.declaredLabel",{support:c((0,h.e5)(a.declaredLabelKey))})}),(0,d.jsxs)("p",{className:"text-xs text-muted-foreground break-words",children:[c("compatibility.evidence"),": ",a.evidence]}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground break-words","data-testid":`skill-agent-verification-${a.agent}`,children:c((0,h.e5)(a.verificationKey))}),k?(0,d.jsxs)("div",{className:"space-y-0.5 border-l-2 border-border pl-2",children:[(0,d.jsx)("p",{className:"text-xs font-medium text-foreground",children:c("compatibility.measuredHeading")}),(0,d.jsxs)("ul",{className:"space-y-0.5",children:[(0,d.jsx)(i,{axis:k.discovery,agentName:j}),(0,d.jsx)(i,{axis:k.invocation,agentName:j})]}),k.testedVersion&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:c("compatibility.testedVersion",{agent:j,version:k.testedVersion})}),k.testedDate&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:c("compatibility.testedDate",{date:k.testedDate})}),k.discoveryRoots.length>0&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground break-all",children:c("compatibility.discoveryRoots",{roots:k.discoveryRoots.join(", ")})}),k.evidenceSource&&(0,d.jsxs)("p",{className:"text-xs text-muted-foreground break-all",children:[c("compatibility.evidenceSource"),": ",k.evidenceSource]}),k.stale&&(0,d.jsx)(g.u,{tone:"warning","data-testid":`skill-agent-evidence-stale-${a.agent}`,children:c("compatibility.evidenceStale",{days:k.ageDays??0})})]}):a.skipReasonKey&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground break-words","data-testid":`skill-agent-skip-reason-${a.agent}`,children:c((0,h.e5)(a.skipReasonKey))}),(0,d.jsxs)("p",{className:"text-xs text-muted-foreground break-words",children:[(0,d.jsx)("span",{className:"font-medium text-foreground",children:c("compatibility.reloadHeading",{agent:j})}),": ",c((0,h.e5)(a.reloadKey),{agent:j})]})]})}}};
|
|
1
|
+
"use strict";exports.id=4243,exports.ids=[4243],exports.modules={9815:(a,b,c)=>{c.d(b,{B:()=>B});var d=c(21124),e=c(38301),f=c(20481),g=c(85866),h=c(17252),i=c(90349),j=c(85389),k=c(3805);let l={status:"loading",options:[]};function m({selectedWorktreeId:a,onSelect:b,disabled:c=!1}){let h=(0,f.c)("skills"),[i,j]=(0,e.useState)(l),[m,o]=(0,e.useState)(0),p=(0,e.useCallback)(()=>o(a=>a+1),[]);return"loading"===i.status?(0,d.jsxs)("div",{className:"space-y-2","data-testid":"skill-target-loading",children:[(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:h("target.loading")}),(0,d.jsx)(g.EA,{className:"h-24 w-full rounded-lg"})]}):"error"===i.status?(0,d.jsxs)(g.Zp,{className:"space-y-3","data-testid":"skill-target-error",children:[(0,d.jsx)(k.u,{tone:"danger",children:h("target.errorNotice")}),(0,d.jsx)(g.$n,{variant:"secondary",size:"sm",onClick:p,"data-testid":"skill-target-retry",children:h("target.retry")})]}):0===i.options.length?(0,d.jsx)(g.Zp,{"data-testid":"skill-target-empty",children:(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:h("target.empty")})}):(0,d.jsxs)("div",{className:"space-y-3","data-testid":"skill-target-selector",children:[(0,d.jsx)("div",{role:"radiogroup","aria-label":h("target.heading"),className:"space-y-2",children:i.options.map(e=>(0,d.jsx)(n,{option:e,selected:e.id===a,disabled:c,onSelect:b},e.id))}),(0,d.jsx)(k.u,{tone:"neutral","data-testid":"skill-target-branch-notice",children:h("target.branchFreshnessNotice")})]})}function n({option:a,selected:b,disabled:c,onSelect:e}){let h=(0,f.c)("skills"),i=a.liveBranch??a.syncedBranch;return(0,d.jsxs)("button",{type:"button",role:"radio","aria-checked":b,disabled:c,onClick:()=>e(a.id),"data-testid":`skill-target-option-${a.id}`,className:`w-full rounded-lg border px-3 py-2.5 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-60 ${b?"border-accent-500 bg-accent-50 dark:bg-accent-950/40":"border-border bg-card hover:bg-muted"}`,children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-sm font-semibold text-foreground break-all",children:a.name}),b&&(0,d.jsx)(g.Ex,{variant:"info",children:h("target.selected")})]}),(0,d.jsxs)("dl",{className:"mt-1.5 grid grid-cols-1 gap-x-4 gap-y-1 sm:grid-cols-2",children:[(0,d.jsx)(o,{label:h("target.repository"),children:a.repositoryName}),(0,d.jsx)(o,{label:h("target.branch"),children:i??h("target.branchUnknown")}),(0,d.jsx)(o,{label:h("target.agents"),children:a.agents.length>0?a.agents.join(", "):h("target.agentsNone")}),(0,d.jsx)(o,{label:h("target.workingTree"),children:h(null===a.dirty?"target.workingTreeUnknown":a.dirty?"target.workingTreeDirty":"target.workingTreeClean")})]}),a.sessionRunning&&(0,d.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground","data-testid":`skill-target-session-${a.id}`,children:h("target.sessionRunning")})]})}function o({label:a,children:b}){return(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:a}),(0,d.jsx)("dd",{className:"text-xs text-foreground break-words",children:b})]})}var p=c(27884);function q({label:a,children:b}){return(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:a}),(0,d.jsx)("dd",{className:"mt-0.5 break-words text-sm text-foreground",children:b})]})}function r({level:a,kind:b,label:c}){let e=(0,f.c)("skills");return(0,d.jsxs)(g.Ex,{variant:p.eK[a],"data-testid":`skill-plan-risk-${b}-${a}`,children:[c,": ",e(p.pP[a])]})}function s({entry:a}){let b=(0,f.c)("skills"),c=p.KL[a.reason];return(0,d.jsxs)("li",{className:"space-y-1.5 rounded-md border border-border px-3 py-2","data-testid":`skill-plan-file-${a.path}`,children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)(g.Ex,{variant:p.tC[a.change],children:b(p.AS[a.change])}),(0,d.jsx)("span",{className:"break-all font-mono text-xs text-foreground",children:a.path}),a.generated&&(0,d.jsx)(g.Ex,{variant:"gray",children:b("plan.fileGenerated")})]}),c&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:b(c)}),a.gitIgnored&&(0,d.jsx)("p",{className:"text-xs text-warning-foreground",children:b("plan.gitIgnored")}),a.binary?(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:b("plan.diffBinary")}):a.diff?(0,d.jsxs)("details",{children:[(0,d.jsx)("summary",{className:"cursor-pointer text-xs text-accent-600 dark:text-accent-400",children:b("plan.diffToggle",{additions:a.additions,deletions:a.deletions})}),(0,d.jsx)("pre",{className:"mt-1 overflow-x-auto rounded bg-muted p-2 font-mono text-[11px] leading-snug text-foreground",children:a.diff}),a.diffTruncated&&(0,d.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:b("plan.diffTruncated")})]}):null]})}function t({plan:a}){let b=(0,f.c)("skills"),{target:c,skill:e}=a,h=e.compatibility.commandmate;return(0,d.jsxs)(g.Zp,{className:"space-y-4","data-testid":"skill-install-plan",children:[(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:b("plan.heading")}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:b("plan.expiresAt",{timestamp:a.expiresAt})})]}),(0,d.jsxs)("section",{className:"space-y-2",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("plan.targetHeading")}),(0,d.jsxs)("dl",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,d.jsx)(q,{label:b("target.repository"),children:c.repositoryName}),(0,d.jsx)(q,{label:b("target.heading"),children:c.worktreeName}),(0,d.jsx)(q,{label:b("target.branch"),children:c.branch??b("target.branchUnknown")}),(0,d.jsx)(q,{label:b("plan.headStateLabel"),children:b(p.kF[c.headState]??"plan.headState.unknown")}),(0,d.jsx)(q,{label:b("target.workingTree"),children:c.workingTreeUnknown?b("target.workingTreeStatusUnknown"):c.workingTreeDirty?b("target.workingTreeDirty"):b("target.workingTreeClean")}),(0,d.jsx)(q,{label:b("plan.installRoot"),children:(0,d.jsx)("span",{className:"break-all font-mono text-xs",children:(c.installRoots&&c.installRoots.length>0?c.installRoots:[c.installRoot]).map(a=>(0,d.jsx)("span",{className:"block",children:a},a))})}),(0,d.jsx)(q,{label:b("plan.existingInstall"),children:c.existingInstall?b("plan.existingInstallVersion",{version:c.existingInstall.version}):b("plan.existingInstallNone")}),(0,d.jsx)(q,{label:b("detail.recommendedVersion"),children:(0,d.jsx)("span",{className:"font-mono text-xs",children:e.version})})]})]}),(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-risk-section",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("plan.riskHeading")}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[(0,d.jsx)(r,{level:e.declaredRisk,kind:"declared",label:b("plan.riskDeclared")}),(0,d.jsx)(r,{level:e.computedRisk,kind:"computed",label:b("plan.riskComputed")}),(0,d.jsx)(r,{level:e.effectiveRisk,kind:"effective",label:b("plan.riskEffective")})]}),(0,d.jsx)("p",{className:"break-words text-sm text-foreground",children:e.riskRationale}),(0,d.jsx)(k.u,{tone:"neutral",children:b("plan.riskNotice")})]}),(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-permissions",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("permissions.heading")}),e.declaredPermissions.length>0?(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.declaredPermissions.map(a=>(0,d.jsx)(g.Ex,{variant:"warning",children:p.z2[a]?b(p.z2[a]):a},a))}):(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("plan.permissionsNone")}),(0,d.jsx)(k.u,{tone:"warning",children:b("permissions.declarationOnlyNotice")})]}),(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-requirements",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("requirements.heading")}),0===e.requirements.commands.length&&0===e.requirements.networkHosts.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("plan.requirementsNone")}):(0,d.jsxs)("dl",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[e.requirements.commands.length>0&&(0,d.jsx)(q,{label:b("plan.requirementsCommands"),children:e.requirements.commands.map(a=>`${a.name} ${a.versionRange??b("plan.commandAnyVersion")}`).join(", ")}),e.requirements.networkHosts.length>0&&(0,d.jsx)(q,{label:b("plan.requirementsHosts"),children:e.requirements.networkHosts.join(", ")})]})]}),(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-scripts",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("plan.scriptsHeading")}),0===e.executablePaths.length&&0===e.scriptPaths.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("plan.scriptsNone")}):(0,d.jsx)("ul",{className:"space-y-1",children:[...new Set([...e.scriptPaths,...e.executablePaths])].map(a=>(0,d.jsx)("li",{className:"break-all font-mono text-xs text-foreground",children:a},a))})]}),"compatible"!==h.status&&(0,d.jsx)(k.u,{tone:"warning","data-testid":"skill-plan-compatibility-notice",children:b((0,p.e5)(h.messageKey),{range:h.requiredRange,currentVersion:h.currentVersion??""})}),a.warnings.length>0&&(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-warnings",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("plan.warningsHeading")}),(0,d.jsx)("ul",{className:"space-y-1",children:a.warnings.map(a=>(0,d.jsx)("li",{className:"text-xs text-warning-foreground",children:p.RO[a]?b(p.RO[a]):a},a))})]}),(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-files",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("plan.filesHeading")}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"skill-plan-stats",children:b("plan.stats",{added:a.stats.added,modified:a.stats.modified,unchanged:a.stats.unchanged,conflicted:a.stats.conflicted,unmanaged:a.stats.unmanaged})}),0===a.files.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("plan.filesEmpty")}):(0,d.jsx)("ul",{className:"space-y-2",children:a.files.map(a=>(0,d.jsx)(s,{entry:a},a.path))})]}),a.blockers.length>0&&(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-install-blockers",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-danger-foreground",children:b("plan.blockersHeading")}),(0,d.jsx)("ul",{className:"space-y-1",children:a.blockers.map(a=>(0,d.jsxs)("li",{className:"text-xs text-danger-foreground",children:[a.path&&(0,d.jsx)("span",{className:"mr-1 break-all font-mono",children:a.path}),a.code.startsWith("skills.")?b((0,p.e5)(a.code),{range:h.requiredRange,currentVersion:h.currentVersion??""}):p.KL[a.code]?b(p.KL[a.code]):a.code]},`${a.code}:${a.path??""}`))}),(0,d.jsx)(k.u,{tone:"danger",children:b("plan.blockedNotice")})]})]})}function u({entry:a}){let b=(0,f.c)("skills"),c=p.Mj[a.disposition],e=p.hJ[a.reason];return(0,d.jsxs)("li",{className:"flex flex-wrap items-center gap-2","data-testid":`skill-uninstall-file-${a.path}`,children:[(0,d.jsx)(g.Ex,{variant:"remove"===a.disposition?"info":"warning",children:c?b(c):a.disposition}),(0,d.jsx)("span",{className:"break-all font-mono text-xs text-foreground",children:a.path}),e&&(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:b(e)})]})}function v({plan:a}){let b=(0,f.c)("skills"),{target:c,skill:e}=a;return(0,d.jsxs)(g.Zp,{className:"space-y-4","data-testid":"skill-uninstall-plan",children:[(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:b("uninstall.heading")}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:b("uninstall.expiresAt",{timestamp:a.expiresAt})})]}),(0,d.jsxs)("dl",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,d.jsx)(q,{label:b("target.repository"),children:c.repositoryName}),(0,d.jsx)(q,{label:b("target.heading"),children:c.worktreeName}),(0,d.jsx)(q,{label:b("target.branch"),children:c.branch??b("target.branchUnknown")}),(0,d.jsx)(q,{label:b("uninstall.installedVersion"),children:(0,d.jsx)("span",{className:"font-mono text-xs",children:e.version||b("uninstall.versionUnknown")})}),(0,d.jsx)(q,{label:b("plan.installRoot"),children:(0,d.jsx)("span",{className:"break-all font-mono text-xs",children:c.installRoot})}),(0,d.jsx)(q,{label:b("target.workingTree"),children:c.workingTreeUnknown?b("target.workingTreeStatusUnknown"):c.workingTreeDirty?b("target.workingTreeDirty"):b("target.workingTreeClean")})]}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"skill-uninstall-stats",children:b("uninstall.stats",{removable:a.stats.removable,modified:a.stats.modified,missing:a.stats.missing,unknown:a.stats.unknown,irregular:a.stats.irregular})}),(0,d.jsxs)("section",{className:"space-y-2",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("uninstall.removalsHeading")}),0===a.removals.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("uninstall.removalsEmpty")}):(0,d.jsx)("ul",{className:"space-y-1.5",children:a.removals.map(a=>(0,d.jsx)(u,{entry:a},a.path))})]}),(0,d.jsxs)("section",{className:"space-y-2",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("uninstall.retainedHeading")}),0===a.retained.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("uninstall.retainedEmpty")}):(0,d.jsx)("ul",{className:"space-y-1.5",children:a.retained.map(a=>(0,d.jsx)(u,{entry:a},a.path))})]}),(0,d.jsxs)("div",{className:"space-y-2",children:[a.skill.agents.length>0&&(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5","data-testid":"skill-uninstall-agents",children:a.skill.agents.map(a=>(0,d.jsx)(g.Ex,{variant:"gray",children:(0,h.f_)(a.agent)},a.agent))}),(0,d.jsx)(k.u,{tone:"neutral",children:b((0,p.e5)(a.nextActionKey))})]}),a.blockers.length>0&&(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-uninstall-blockers",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-danger-foreground",children:b("uninstall.blockersHeading")}),(0,d.jsx)("ul",{className:"space-y-1",children:a.blockers.map(a=>(0,d.jsxs)("li",{className:"text-xs text-danger-foreground",children:[a.path&&(0,d.jsx)("span",{className:"mr-1 break-all font-mono",children:a.path}),b((0,p.e5)(a.messageKey))]},`${a.code}:${a.path??""}`))})]})]})}var w=c(30156);let x={worktreeId:null,busy:null,installPlan:null,uninstallPlan:null,installResult:null,uninstallResult:null,riskAcknowledged:!1,failure:null};function y(a){return{...a,installPlan:null,uninstallPlan:null,installResult:null,uninstallResult:null,riskAcknowledged:!1,failure:null}}function z({failure:a}){let b=(0,f.c)("skills");return(0,d.jsxs)("div",{className:"space-y-2","data-testid":"skill-operation-error",children:[(0,d.jsxs)(k.u,{tone:"danger",children:[(0,d.jsx)("p",{className:"font-medium",children:b("operation.errorHeading")}),(0,d.jsx)("p",{className:"mt-1",children:b((0,p.FW)(a.code))}),(0,d.jsx)("p",{className:"mt-1 break-words",children:b("state.errorCode",{code:a.code})})]}),a.nextActionKey&&(0,d.jsx)(k.u,{tone:"warning",children:b((0,p.e5)(a.nextActionKey))}),a.blockers&&a.blockers.length>0&&(0,d.jsx)("ul",{className:"space-y-1","data-testid":"skill-operation-error-blockers",children:a.blockers.map(a=>(0,d.jsxs)("li",{className:"text-xs text-danger-foreground",children:[a.path&&(0,d.jsx)("span",{className:"mr-1 break-all font-mono",children:a.path}),b((0,p.e5)(a.messageKey))]},`${a.code}:${a.path??""}`))})]})}function A({agents:a,skillId:b,version:c}){let e=(0,f.c)("skills");return 0===a.length?null:(0,d.jsxs)("div",{className:"space-y-1","data-testid":"skill-operation-reload",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:e("operation.reloadHeading")}),(0,d.jsx)("ul",{className:"space-y-1",children:a.map(a=>(0,d.jsx)("li",{className:"text-xs text-muted-foreground",children:e((0,p.e5)(a.messageKey),{agent:(0,h.f_)(a.agent),skillId:b,version:c})},a.agent))})]})}function B({skillId:a,version:b,blockedReason:c,worktreeId:h,agents:l=[]}){let n=(0,f.c)("skills"),[o,q]=(0,e.useState)(()=>h?{...x,worktreeId:h}:x),r=(0,e.useCallback)(a=>{q(b=>b.worktreeId===a?b:y({...b,worktreeId:a,busy:null}))},[]),s=(0,e.useCallback)(async()=>{let c=o.worktreeId;if(!c)return;q(a=>({...y(a),busy:"install-plan"}));let d=await (0,w.Q6)(c,a,{version:b??void 0});q(a=>({...a,busy:null,installPlan:d.ok?d.data.plan:null,failure:d.ok?null:d.failure}))},[a,o.worktreeId,b]),u=(0,e.useCallback)(async()=>{var b;let c=o.worktreeId,d=o.installPlan;if(!c||!d||d.requiresRiskAcknowledgement&&!o.riskAcknowledged)return;q(a=>({...a,busy:"install-apply",failure:null}));let e=await (0,w.Xi)(c,a,{planToken:d.token,version:d.skill.version,acknowledgeRisk:!!d.requiresRiskAcknowledgement||void 0,idempotencyKey:(b=d.token,`skill-install-${b}`)});e.ok&&(0,i.k)(c),q(a=>({...a,busy:null,installPlan:e.ok?null:a.installPlan,installResult:e.ok?e.data:null,failure:e.ok?null:e.failure}))},[a,o.installPlan,o.riskAcknowledged,o.worktreeId]),B=(0,e.useCallback)(async()=>{let b=o.worktreeId;if(!b)return;q(a=>({...y(a),busy:"uninstall-plan"}));let c=await (0,w.hN)(b,a);q(a=>({...a,busy:null,uninstallPlan:c.ok?c.data.plan:null,failure:c.ok?null:c.failure}))},[a,o.worktreeId]),C=(0,e.useCallback)(async()=>{var b;let c=o.worktreeId,d=o.uninstallPlan;if(!c||!d)return;q(a=>({...a,busy:"uninstall-apply",failure:null}));let e=await (0,w.E)(c,a,{planToken:d.token,idempotencyKey:(b=d.token,`skill-uninstall-${b}`)});q(a=>({...a,busy:null,uninstallPlan:e.ok?null:a.uninstallPlan,uninstallResult:e.ok?e.data:null,failure:e.ok?null:e.failure}))},[a,o.uninstallPlan,o.worktreeId]),D=(0,e.useCallback)(()=>{q(a=>y(a))},[]),E=null!==o.busy,F=o.installPlan,G=o.uninstallPlan,H=c??n(o.worktreeId?"plan.ready":"plan.chooseTarget"),I=null!==F&&F.requiresRiskAcknowledgement&&!o.riskAcknowledged;return(0,d.jsxs)("div",{className:"space-y-3","data-testid":"skill-install-panel",children:[!h&&(0,d.jsx)(m,{selectedWorktreeId:o.worktreeId,onSelect:r,disabled:E}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,d.jsx)(g.$n,{variant:"primary",disabled:E||null!==c||!o.worktreeId,onClick:s,"data-testid":"skill-install-action","aria-describedby":"skill-install-reason",children:n("install-plan"===o.busy?"plan.building":"plan.build")}),(0,d.jsx)(g.$n,{variant:"secondary",disabled:E||!o.worktreeId,onClick:B,"data-testid":"skill-uninstall-action",children:n("uninstall-plan"===o.busy?"uninstall.building":"uninstall.build")})]}),(0,d.jsx)("p",{id:"skill-install-reason",className:"text-sm text-muted-foreground","data-testid":"skill-install-reason",children:H}),l.length>0&&(0,d.jsxs)("div",{className:"space-y-1","data-testid":"skill-install-reload-preview",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:n("operation.reloadHeading")}),(0,d.jsx)("ul",{className:"space-y-1",children:l.map(a=>(0,d.jsx)(j.m,{agent:a,variant:"reload"},a.agent))})]}),o.failure&&(0,d.jsx)(z,{failure:o.failure}),F&&(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsx)(t,{plan:F}),F.requiresRiskAcknowledgement&&(0,d.jsxs)(g.Zp,{className:"space-y-3","data-testid":"skill-install-risk-acknowledgement",children:[(0,d.jsx)(k.u,{tone:"danger",children:n((0,p.e5)(F.riskAcknowledgementMessageKey??"skills.plan.highRiskAcknowledgement"))}),(0,d.jsxs)("label",{className:"flex items-start gap-2 text-sm text-foreground",children:[(0,d.jsx)(g.Sc,{checked:o.riskAcknowledged,onCheckedChange:a=>q(b=>({...b,riskAcknowledged:!0===a})),disabled:E,"data-testid":"skill-install-risk-checkbox",className:"mt-0.5"}),(0,d.jsx)("span",{children:n("plan.acknowledgeLabel")})]})]}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,d.jsx)(g.$n,{variant:F.requiresRiskAcknowledgement?"danger":"primary",disabled:E||!F.installable||I,onClick:u,"data-testid":"skill-install-confirm",children:n("install-apply"===o.busy?"plan.confirming":"plan.confirm")}),(0,d.jsx)(g.$n,{variant:"ghost",disabled:E,onClick:D,"data-testid":"skill-install-discard",children:n("plan.discard")})]})]}),G&&(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsx)(v,{plan:G}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,d.jsx)(g.$n,{variant:"danger",disabled:E||!G.removable,onClick:C,"data-testid":"skill-uninstall-confirm",children:n("uninstall-apply"===o.busy?"uninstall.confirming":"uninstall.confirm")}),(0,d.jsx)(g.$n,{variant:"ghost",disabled:E,onClick:D,"data-testid":"skill-uninstall-discard",children:n("plan.discard")})]})]}),o.installResult&&(0,d.jsxs)(g.Zp,{className:"space-y-3","data-testid":"skill-install-result",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:n("operation.installedHeading")}),(0,d.jsx)(k.u,{tone:"info",children:n((0,p.e5)(o.installResult.operation.nextActionKey))}),o.installResult.operation.replayed&&(0,d.jsx)(k.u,{tone:"neutral","data-testid":"skill-operation-replayed",children:n("operation.replayNotice")}),o.installResult.install&&"files"in o.installResult.install&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:n("operation.filesWritten",{count:o.installResult.install.files.length})}),"reload"in o.installResult&&(0,d.jsx)(A,{agents:o.installResult.reload.agents,skillId:o.installResult.reload.skillId,version:o.installResult.reload.version}),(0,d.jsx)(g.$n,{variant:"secondary",size:"sm",onClick:D,"data-testid":"skill-operation-reset",children:n("operation.startOver")})]}),o.uninstallResult&&(0,d.jsxs)(g.Zp,{className:"space-y-3","data-testid":"skill-uninstall-result",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:n("operation.uninstalledHeading")}),(0,d.jsx)(k.u,{tone:"info",children:n((0,p.e5)(o.uninstallResult.operation.nextActionKey))}),o.uninstallResult.operation.replayed&&(0,d.jsx)(k.u,{tone:"neutral","data-testid":"skill-operation-replayed",children:n("operation.replayNotice")}),o.uninstallResult.uninstall&&"removedFiles"in o.uninstallResult.uninstall&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:n("operation.filesRemoved",{count:o.uninstallResult.uninstall.removedFiles.length})}),"reload"in o.uninstallResult&&(0,d.jsx)(A,{agents:o.uninstallResult.reload.agents,skillId:o.uninstallResult.reload.skillId,version:o.uninstallResult.reload.version}),(0,d.jsx)(g.$n,{variant:"secondary",size:"sm",onClick:D,"data-testid":"skill-operation-reset",children:n("operation.startOver")})]})]})}},28593:(a,b,c)=>{c.d(b,{Xz:()=>j,qW:()=>k,uE:()=>l});var d=c(21124);c(38301);var e=c(20481),f=c(93983),g=c(85866),h=c(17252),i=c(27884);function j({status:a,className:b}){let c=(0,e.c)("skills");return(0,d.jsx)(g.Ex,{variant:i.H$[a],className:b,"data-testid":`skill-compatibility-${a}`,children:c(i.OV[a])})}function k({risk:a,className:b}){let c=(0,e.c)("skills");return(0,d.jsxs)(g.Ex,{variant:i.eK[a],className:b,"data-testid":`skill-declared-risk-${a}`,children:["high"===a&&(0,d.jsx)(f.A,{size:12,"aria-hidden":"true",className:"mr-1 shrink-0"}),c("risk.declaredLabel",{level:c(i.pP[a])})]})}function l({agent:a}){let b=(0,e.c)("skills");return(0,d.jsxs)(g.Ex,{variant:i.Et[a.support],"data-testid":`skill-agent-${a.agent}-${a.support}`,children:[(0,h.f_)(a.agent),": ",b((0,i.e5)(a.labelKey))]})}},34126:(a,b,c)=>{c.d(b,{G8:()=>r});var d=c(21124),e=c(38301),f=c(27867),g=c(26295),h=c(29701),i=c(28752),j=c(37950);c(31230);var k=c(56722),l=c(45538),m=c(9758),n=c(30917),o=c(82620),p=c(12894),q=c(88033);let r=(0,e.memo)(function({content:a,onOpenFile:b,currentFilePath:c,worktreeId:r}){let s=(0,e.useRef)(b);s.current=b;let t=(0,e.useRef)(c);t.current=c;let u=(0,e.useRef)(r);u.current=r;let v=(0,e.useCallback)((a,b)=>{let c=(0,o.d3)(b);if(c)switch((0,o.dj)(c)){case"anchor":break;case"external":a.preventDefault(),window.open(c,"_blank","noopener,noreferrer");break;case"relative":{a.preventDefault();let b=t.current,d=s.current;if(b&&d){let a=(0,o.WU)(b,c);a&&d(a)}}}},[]),w=(0,e.useMemo)(()=>({code:k.AY,pre:({children:a})=>(0,l.D)(a)?(0,d.jsx)(d.Fragment,{children:a}):(0,d.jsx)(m.Ck,{children:(0,d.jsx)("pre",{className:"overflow-x-auto",children:a})}),img:({src:a,alt:b,width:c,height:e,...f})=>{let g=c??f.node?.properties?.width,h=e??f.node?.properties?.height;if("string"==typeof a&&!a.startsWith("http://")&&!a.startsWith("https://")&&!a.startsWith("data:")){let c=t.current,e=u.current;if(c&&e){let f=(0,o.WU)(c,a);if(f){let a=`/api/worktrees/${e}/files/${(0,p.o)(f)}`;return(0,d.jsx)(n.n,{apiUrl:a,alt:b??"",width:g,height:h})}}}return(0,d.jsx)("img",{src:a,alt:b??"",width:g,height:h,style:{maxWidth:g||"100%"}})},a:({href:a,children:b,...c})=>a?(0,d.jsx)("a",{...c,href:a,onClick:b=>v(b,a),children:b}):(0,d.jsx)("a",{...c,children:b})}),[v]),x=(0,e.useMemo)(()=>[g.A,[h.A,o.uO],i.A,j.A],[]);return(0,d.jsx)(f.oz,{remarkPlugins:q.eT,rehypePlugins:x,components:w,children:a})})},81136:(a,b,c)=>{c.d(b,{Co:()=>d,Ms:()=>f,td:()=>e});let d=".agents/skills",e=".claude/skills",f="skills.permissions.declarationOnlyNotice"},85389:(a,b,c)=>{c.d(b,{m:()=>j});var d=c(21124);c(38301);var e=c(20481),f=c(17252),g=c(3805),h=c(27884);function i({axis:a,agentName:b}){let c=(0,e.c)("skills");return(0,d.jsxs)("li",{className:"text-xs text-muted-foreground","data-testid":`skill-agent-axis-${a.axis}`,children:[(0,d.jsx)("span",{className:"font-medium text-foreground",children:c((0,h.e5)(a.axisKey))}),": ",(0,d.jsx)("span",{"data-testid":`skill-agent-axis-${a.axis}-${a.outcome}`,children:c((0,h.e5)(a.outcomeKey))})," — ",c((0,h.e5)(a.evidenceKindKey)),a.limitationKey&&(0,d.jsx)("span",{className:"mt-0.5 block","data-testid":`skill-agent-axis-${a.axis}-limitation`,children:c((0,h.e5)(a.limitationKey),{agent:b})})]})}function j({agent:a,variant:b="full"}){let c=(0,e.c)("skills"),j=(0,f.f_)(a.agent),k=a.measured;return"reload"===b?(0,d.jsx)("li",{className:"text-xs text-muted-foreground","data-testid":`skill-agent-reload-${a.agent}`,children:c((0,h.e5)(a.reloadKey),{agent:j})}):(0,d.jsxs)("div",{className:"space-y-1","data-testid":`skill-agent-evidence-${a.agent}`,children:[(0,d.jsx)("p",{className:"text-xs font-medium text-foreground",children:j}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground break-words",children:c("compatibility.declaredLabel",{support:c((0,h.e5)(a.declaredLabelKey))})}),(0,d.jsxs)("p",{className:"text-xs text-muted-foreground break-words",children:[c("compatibility.evidence"),": ",a.evidence]}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground break-words","data-testid":`skill-agent-verification-${a.agent}`,children:c((0,h.e5)(a.verificationKey))}),k?(0,d.jsxs)("div",{className:"space-y-0.5 border-l-2 border-border pl-2",children:[(0,d.jsx)("p",{className:"text-xs font-medium text-foreground",children:c("compatibility.measuredHeading")}),(0,d.jsxs)("ul",{className:"space-y-0.5",children:[(0,d.jsx)(i,{axis:k.discovery,agentName:j}),(0,d.jsx)(i,{axis:k.invocation,agentName:j})]}),k.testedVersion&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:c("compatibility.testedVersion",{agent:j,version:k.testedVersion})}),k.testedDate&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:c("compatibility.testedDate",{date:k.testedDate})}),k.discoveryRoots.length>0&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground break-all",children:c("compatibility.discoveryRoots",{roots:k.discoveryRoots.join(", ")})}),k.evidenceSource&&(0,d.jsxs)("p",{className:"text-xs text-muted-foreground break-all",children:[c("compatibility.evidenceSource"),": ",k.evidenceSource]}),k.stale&&(0,d.jsx)(g.u,{tone:"warning","data-testid":`skill-agent-evidence-stale-${a.agent}`,children:c("compatibility.evidenceStale",{days:k.ageDays??0})})]}):a.skipReasonKey&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground break-words","data-testid":`skill-agent-skip-reason-${a.agent}`,children:c((0,h.e5)(a.skipReasonKey))}),(0,d.jsxs)("p",{className:"text-xs text-muted-foreground break-words",children:[(0,d.jsx)("span",{className:"font-medium text-foreground",children:c("compatibility.reloadHeading",{agent:j})}),": ",c((0,h.e5)(a.reloadKey),{agent:j})]})]})}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=4248,exports.ids=[4248],exports.modules={44248:a=>{a.exports=JSON.parse('{"label":"Auto Yes","toggleLabel":"Auto Yes mode","targetLabel":"Auto Yes target","timeRemaining":"Time remaining","blockedByContract":"Blocked by contract (mode: off)","blockedByContractTitle":"The running contract sets autoYes.mode: off, so Auto Yes answers no prompt in this session even while ON.","releasedByRestart":"Released by restart","releasedByRestartTitle":"A server restart turned Auto Yes off (it is not turned back on automatically). Turn it on again if this session should keep answering. Shown until the original grant would have expired, or until you toggle it.","enableTitle":"Enable Auto Yes mode?","enableTitleWithTool":"Enable Auto Yes mode? ({toolName})","featureDescription":"Feature description","yesNoAutoResponse":"yes/no confirmation → Automatically sends \\"yes\\"","multipleChoiceAutoSelect":"Questions with options → follow \\"How questions are answered\\" below","autoDisableAfter":"Will automatically turn OFF after {duration}.","appliesOnlyToCurrent":"* Auto Yes applies only to the currently selected {toolName} session. It does not affect other CLI tools.","duration":"Duration","
|
|
1
|
+
"use strict";exports.id=4248,exports.ids=[4248],exports.modules={44248:a=>{a.exports=JSON.parse('{"label":"Auto Yes","toggleLabel":"Auto Yes mode","targetLabel":"Auto Yes target","timeRemaining":"Time remaining","blockedByContract":"Blocked by contract (mode: off)","blockedByContractTitle":"The running contract sets autoYes.mode: off, so Auto Yes answers no prompt in this session even while ON.","releasedByRestart":"Released by restart","releasedByRestartTitle":"A server restart turned Auto Yes off (it is not turned back on automatically). Turn it on again if this session should keep answering. Shown until the original grant would have expired, or until you toggle it.","enableTitle":"Enable Auto Yes mode?","enableTitleWithTool":"Enable Auto Yes mode? ({toolName})","featureDescription":"Feature description","yesNoAutoResponse":"yes/no confirmation → Automatically sends \\"yes\\"","multipleChoiceAutoSelect":"Questions with options → follow \\"How questions are answered\\" below","autoDisableAfter":"Will automatically turn OFF after {duration}.","appliesOnlyToCurrent":"* Auto Yes applies only to the currently selected {toolName} session. It does not affect other CLI tools.","duration":"Duration","durationHours":"{hours, plural, one {# hour} other {# hours}}","durationOther":"Other","durationSelectLabel":"Duration (1-24 hours)","longDurationNote":"A longer duration also means more permission checks (file edits, commands and so on) answered automatically. Permission checks are answered automatically in careful mode too.","answerModeLabel":"How questions are answered","answerModes":{"recommended":"Answer questions with the recommended option (Recommended)","careful":"Answer questions yourself (Careful)"},"answerModeDescriptions":{"recommended":"A question from the agent is answered automatically with the option marked as recommended (or the default option when none is)","careful":"A question from the agent is not answered automatically; you answer it from the answer panel"},"answerModePermissionNote":"Either way, permission confirmations (editing files, running commands, and so on) are answered automatically (\\"allow this once\\" is chosen).","answerModeBadge":{"recommended":"Recommended","careful":"Careful"},"answerModeBadgeTitle":{"recommended":"Questions are answered with the recommended option (Recommended). Permission confirmations are answered too","careful":"Questions are left for you to answer (Careful). Permission confirmations are answered automatically"},"aboutRisks":"About risks","riskWarning":"Automatic responses may result in unintended operations (such as file deletion or overwriting). Please use only after fully understanding the implications.","disclaimer":"Disclaimer:","disclaimerText":"The developers assume no responsibility for any issues arising from the use of Auto Yes mode. Use at your own risk.","agreeAndEnable":"Agree and enable","stopPatternLabel":"Stop condition (regex)","stopPatternPlaceholder":"e.g. rm -rf|DROP TABLE|force push","stopPatternDescription":"Auto-Yes will be automatically stopped when terminal output matches this pattern","invalidRegexPattern":"Invalid regular expression pattern","patternTooLong":"Pattern must be 500 characters or less","stopPatternMatched":"Auto-Yes was automatically stopped because the stop condition was matched","consecutiveErrorsStopped":"Auto-Yes stopped due to consecutive errors","regexTipsLabel":"Regex tips","regexTipsTitle":"Regex Tips","regexTipWordBoundary":"… match whole word only (prevents partial match)","regexTipOr":"… OR condition (matches either)","regexTipCaseNote":"… matching is case-sensitive"}')}};
|
|
@@ -1 +1 @@
|
|
|
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:()=>t,l7:()=>x,vr:()=>v});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(8360),n=c(79892),o=c(82325),p=c(73753),q=c(31347);let r=(0,l.h)("session-cleanup");async function s(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),r.info("session:killed",{worktreeId:a,cliToolId:e}))}catch(d){let b=`${e}: ${(0,k.u1)(d)}`;c.sessionErrors.push(b),r.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),r.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),r.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),r.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),r.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),r.warn("timer-manager:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}return c}async function t(a,b){let c=await Promise.allSettled(a.map(a=>s(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 u(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 v(a){return async(b,c)=>{let d=a.get(b);return void 0!==d&&u(b,c,d)}}async function w(){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++,r.info("global-session:killed",{cliToolId:c,sessionName:d}))}catch(a){r.warn("global-session:kill-failed",{cliToolId:c,error:(0,k.u1)(a)})}return a}async function x(a,b){let c=new Map((0,p.Sj)(a).map(a=>[a.id,a.path])),d=(0,o.L0)(a,b);try{await w()}catch(a){r.warn("sync:global-cleanup-failed",{error:(0,k.u1)(a)})}let e=[];if(d.deletedIds.length>0)try{let a=await t(d.deletedIds,v(c));a.warnings.length>0&&(r.warn("sync:cleanup-warnings",{warnings:a.warnings}),e=[`${a.warnings.length} session cleanup warning(s) occurred`])}catch(a){r.error("sync:cleanup-failed",{error:(0,k.u1)(a)}),e=["Session cleanup encountered an error"]}return{syncResult:d,cleanupWarnings: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(8360),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)}}};
|
|
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:()=>t,l7:()=>x,vr:()=>v});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(8360),n=c(79892),o=c(82325),p=c(73753),q=c(31347);let r=(0,l.h)("session-cleanup");async function s(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),r.info("session:killed",{worktreeId:a,cliToolId:e}))}catch(d){let b=`${e}: ${(0,k.u1)(d)}`;c.sessionErrors.push(b),r.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),r.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),r.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),r.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),r.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),r.warn("timer-manager:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}return c}async function t(a,b){let c=await Promise.allSettled(a.map(a=>s(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 u(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 v(a){return async(b,c)=>{let d=a.get(b);return void 0!==d&&u(b,c,d)}}async function w(){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++,r.info("global-session:killed",{cliToolId:c,sessionName:d}))}catch(a){r.warn("global-session:kill-failed",{cliToolId:c,error:(0,k.u1)(a)})}return a}async function x(a,b){let c=new Map((0,p.Sj)(a).map(a=>[a.id,a.path])),d=(0,o.L0)(a,b);try{await w()}catch(a){r.warn("sync:global-cleanup-failed",{error:(0,k.u1)(a)})}let e=[];if(d.deletedIds.length>0)try{let a=await t(d.deletedIds,v(c));a.warnings.length>0&&(r.warn("sync:cleanup-warnings",{warnings:a.warnings}),e=[`${a.warnings.length} session cleanup warning(s) occurred`])}catch(a){r.error("sync:cleanup-failed",{error:(0,k.u1)(a)}),e=["Session cleanup encountered an error"]}return{syncResult:d,cleanupWarnings: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}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=5354,exports.ids=[5354],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()}}},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:()=>q,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:()=>r,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:()=>p,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=5354,exports.ids=[5354],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()}}},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:()=>q,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:()=>r,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:()=>p,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(55741),g=c(20416),h=c(10406),i=c(29021),j=c.n(i),k=c(33873),l=c.n(k),m=c(21820),n=c(7956);let o=(0,c(72626).h)("db-migration-path");function p(a,b){try{if(!j().existsSync(a))return null;let c=j().realpathSync(a);if((0,n.fW)(c))return o.warn(`[Security] ${b} points to system directory, skipping: ${c}`),null;return c}catch{return o.warn(`[Security] Failed to resolve ${b}: ${a}`),null}}function q(){let a=[];a.push(l().join(process.cwd(),"data","db.sqlite")),a.push(l().join(process.cwd(),"data","cm.db")),a.push(l().join((0,m.homedir)(),".commandmate","data","db.sqlite"));let b=process.env.DATABASE_PATH;if(b)try{let c=l().resolve(b);(0,n.fW)(c)?o.warn(`[Security] Skipping DATABASE_PATH in system directory: ${c}`):a.push(b)}catch{o.warn(`[Security] Invalid DATABASE_PATH: ${b}`)}return a}function r(a){let b=l().resolve(a);if((0,n.fW)(b))throw Error(`Security error: Target path cannot be in system directory: ${b}`);if(j().existsSync(a)){let b=p(a,"target path");if(b)return{migrated:!1,targetPath:b}}for(let a of q()){let c=p(a,"legacy path");if(!c)continue;let d=`${c}.bak`;j().copyFileSync(c,d),j().chmodSync(d,384);let e=l().dirname(b);return j().existsSync(e)||j().mkdirSync(e,{recursive:!0,mode:448}),j().copyFileSync(c,b),o.info(`[Migration] Database migrated from ${c} to ${b}`),o.info(`[Migration] Backup created at ${d}`),{migrated:!0,sourcePath:c,targetPath:b,backupPath:d}}return{migrated:!1,targetPath:b}}},93813:(a,b,c)=>{c.d(b,{B1:()=>m,Bx:()=>i,Nc:()=>h,b1:()=>g,ef:()=>n,gZ:()=>k,lp:()=>l});var d=c(79748),e=c(33873);let f=[".git",".env",".env.*","node_modules",".DS_Store","Thumbs.db","*.pem","*.key",".env.local",".env.development",".env.production",".env.test"],g={MAX_ITEMS_PER_DIR:500,MAX_DEPTH:10,MAX_FILE_SIZE_PREVIEW:1048576};function h(a,b){if(b===a)return!0;if(b.startsWith("*.")){let c=b.slice(1);if(a.endsWith(c))return!0}if(b.endsWith(".*")){let c=b.slice(0,-2);if(a.startsWith(c+"."))return!0}return!1}function i(a){return f.some(b=>h(a,b))}async function j(a){try{return(await (0,d.readdir)(a)).filter(a=>!i(a)).length}catch{return 0}}async function k(a,b=""){let c,f=b?(0,e.join)(a,b):a;try{c=await (0,d.stat)(f)}catch{throw Error(`Directory not found: ${b||"(root)"}`)}if(!c.isDirectory())throw Error(`Path is not a directory: ${b}`);let h=await (0,d.readdir)(f),l=[];for(let a of h){if(i(a))continue;let b=(0,e.join)(f,a);try{let c=await (0,d.lstat)(b);if(c.isSymbolicLink())continue;if(c.isDirectory()){let c=await j(b);l.push({name:a,type:"directory",itemCount:c})}else if(c.isFile()){let b=(0,e.extname)(a),d={name:a,type:"file",size:c.size,birthtime:c.birthtime.toISOString(),mtime:c.mtime.toISOString()};b&&b.length>1&&(d.extension=b.slice(1)),l.push(d)}}catch{continue}if(l.length>=g.MAX_ITEMS_PER_DIR)break}let m=[...l].sort((a,b)=>a.type!==b.type?"directory"===a.type?-1:1:a.name.toLowerCase().localeCompare(b.name.toLowerCase())),n=null;if(b){let a=(0,e.dirname)(b);n="."===a?"":a}return{path:b,name:b?(0,e.basename)(b):"",items:m,parentPath:n}}function l(a){let b=a instanceof Error?a.message:"Unknown error";return b.includes("not found")?{error:"Directory not found",status:404}:b.includes("not a directory")?{error:"Path is not a directory",status:400}:{error:"Failed to read directory",status:500}}function m(a){return{error:`Worktree '${a}' not found`,status:404}}function n(a="Invalid path"){return{error:`Access denied: ${a}`,status:403}}},95736:(a,b,c)=>{a.exports=c(44870)}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=
|
|
1
|
+
"use strict";exports.id=5630,exports.ids=[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)},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`}}}},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)}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=5775,exports.ids=[2839,5220,5775],exports.modules={20029:(a,b,c)=>{c.d(b,{C7:()=>r,KF:()=>n,Nq:()=>p,cu:()=>l,m4:()=>s,zE:()=>m});var d=c(55511),e=c(36925),f=c(72626),g=c(2669),h=c(7321);let i=(0,f.h)("session/send-attempt-state"),j=(0,e.v)("__sendAttemptRecords",()=>new Map);function k(a){return JSON.stringify([a.worktreeId,a.cliToolId,a.instanceId])}function l(a){return(0,d.createHash)("sha256").update(a,"utf8").digest("hex").slice(0,16)}function m(a,b,c=Date.now()){try{let d=k(a);for(j.delete(d),j.set(d,{at:Math.floor(c),state:b.state,reason:b.reason,messageDigest:l(b.content)});j.size>1024;){let a=j.keys().next().value;if(void 0===a)break;j.delete(a)}}catch(a){i.warn("send-attempt-record-failed",{error:a instanceof Error?a.message:String(a)})}}function n(a){return j.get(k(a))??null}let o=/Command failed: tmux |Failed to send (?:special )?keys? to tmux session|Failed to send special key:|Failed to paste message into tmux session/;function p(a){if("object"==typeof a&&null!==a&&a.code===g.M7)return{state:"not-sent",reason:"session-starting"};if("object"==typeof a&&null!==a&&a.code===h.Le)return{state:"not-sent",reason:"plan-review"};let b=a instanceof Error?a.message:String(a);return/Enter was not pressed, so nothing was submitted/.test(b)?{state:"indeterminate",reason:"body-not-landed"}:/replaced by a TUI autocompletion/.test(b)?{state:"indeterminate",reason:"replaced-by-completion"}:/submit could not be confirmed/i.test(b)?{state:"indeterminate",reason:"submit-unconfirmed"}:/Could not re-read session \S+ before typing \(.*\); nothing was typed \(Issue #3945\)/s.test(b)?{state:"not-sent",reason:"recheck-failed"}:o.test(b)?{state:"indeterminate",reason:"send-error"}:/prompt not ready/i.test(b)?{state:"not-sent",reason:"prompt-not-ready"}:/input lock not acquired, nothing was typed/.test(b)?/was replaced while this send waited/.test(b)?{state:"not-sent",reason:"session-replaced"}:{state:"not-sent",reason:"input-lock-timeout"}:/\(re-checked under the input lock\); nothing was typed/.test(b)?{state:"not-sent",reason:"prompt-waiting"}:/input lock lost, nothing was typed/.test(b)?{state:"not-sent",reason:"input-lock-lost"}:/still holds unsent text after \d+ clear passes/.test(b)?{state:"not-sent",reason:"composer-not-empty"}:{state:"indeterminate",reason:"send-error"}}function q(a){return a.replace(/\s+/g,"")}function r(a,b){let c=q(b.split("\n").find(a=>""!==a.trim())??"").slice(0,32);return""!==c&&q(a).includes(c)}function s(a){return"not-sent"===a.state?`[send state: not-sent (${a.reason}): the message was not typed. CommandMate does not resend it; send it again once the input prompt is back (\`commandmate prompt <worktree-id> --json\` shows the screen and lastSend).]`:"indeterminate"===a.state?`[send state: indeterminate (${a.reason}): part of the message may have been typed or submitted. CommandMate does not resend it; do not resend before checking the pane (\`commandmate capture <worktree-id> --pane\`), or it may arrive twice.]`:`[send state: sent (${a.reason})]`}},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)};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)};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&&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)}:(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}}},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){let c=`${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>\`.`;if("structured"!==b)return c;let d=Math.round(i.j0/6e4);return`${c} 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 ${d} minutes after it was reported, or immediately with \`commandmate send ${a} <message> --ignore-structured-prompt\` (server-wide: ${i.F1}=off).`}},85775:(a,b,c)=>{c.d(b,{Tm:()=>p,x4:()=>n,xJ:()=>o});var d=c(34129),e=c(8360),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)}},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)}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=610,exports.ids=[610,6119],exports.modules={4803:(a,b,c)=>{c.d(b,{H2:()=>i,eM:()=>f,kN:()=>e,tP:()=>l});let d=/^\[[ xX\u2714]\] /;function e(a){return a.some(a=>d.test(a.label))}function f(a){return!0===a.multiSelect||e(a.options)}let g=/^yes\b/i,h=[/^no\b/i,/\bdeny\b/i];class i extends Error{constructor(a){super(a),this.name="PromptAnswerResolutionError"}}function j(a){return h.some(b=>b.test(a))}function k(a){return g.test(a)&&!j(a)}function l(a){let{answer:b,useDefault:c,promptData:d,fallbackPromptType:e}=a;if(c){if(d?.type==="multiple_choice"){if(f(d))throw new i('Multi-select (checkbox) prompts have no default answer: the cursor marks the row a key would toggle, not a choice. Answer with the option numbers you want ticked, comma-separated (for example "1,3").');let a=function(a){let b=a.find(a=>a.isDefault)??a.find(a=>1===a.number)??a[0];if(!b)throw new i("The prompt has no options to select a default from.");return b}(d.options);return{input:String(a.number),resolved:{via:"default",optionNumber:a.number,optionLabel:a.label}}}if(d?.type==="yes_no"){if(d.defaultOption)return{input:d.defaultOption,resolved:{via:"default",optionLabel:d.defaultOption}};throw new i("The yes/no prompt declares no default option.")}throw new i("Cannot select the default option: no active prompt was detected.")}let g=b??"",h=function(a){let b=a.trim().toLowerCase();return"yes"===b||"y"===b?"yes":"no"===b||"n"===b?"no":null}(g);if(null===h)return{input:g};if(d?.type==="multiple_choice"){let a=function(a,b){let c=a.options;if(f(a))throw new i('Multi-select (checkbox) prompts cannot be answered with yes/no. Answer with the option numbers you want ticked, comma-separated (for example "1,3").');let d="yes"===b?k:j,e=c.filter(a=>d(a.label));if(0===e.length)throw new i(`No option label matches "${b}". Answer with an option number.`);return e.reduce((a,b)=>a.number<=b.number?a:b)}(d,h);return{input:String(a.number),resolved:{via:"semantic",optionNumber:a.number,optionLabel:a.label}}}if(!d&&"multiple_choice"===e)throw new i("Cannot resolve yes/no: the prompt is multiple choice but its options could not be read.");return{input:g}}},15388:(a,b,c)=>{c.d(b,{RJ:()=>f,SQ:()=>g});var d=c(24455);let e=(0,c(36925).v)("__toolInputNormalizations",()=>new Map);function f(a,b,c,g,h,i=Date.now()){e.set((0,d.v7)(a,b,c),{...g,toolName:h,at:i})}function g(a,b,c){return e.get((0,d.v7)(a,b,c))??null}},27354:(a,b,c)=>{c.d(b,{PF:()=>d,PP:()=>k,S6:()=>n,UT:()=>m,Yy:()=>l,dr:()=>e,eS:()=>i,lO:()=>h,m0:()=>g,uZ:()=>f});let d=new Set(["mode-off","deny-pattern","deny-pattern-unusable","type-not-allowed","policy-lookup-failed","allow-once-unidentified","recommended-option-unidentified"]),e="policy-lookup-failed",f="partial-answer",g="startup-trust-unhandled",h="question-confirm-page",i="question-left-to-human",j=new Set(["allow-once-unidentified","recommended-option-unidentified"]);function k(a){return j.has(a)}let l="allow-once-unidentified",m="recommended-option-unidentified",n="no-hook-receipt"},31517:(a,b,c)=>{c.d(b,{DL:()=>j,sD:()=>f});var d=c(2734);let e=(0,c(72626).h)("lib/hooks/stop-history-capture"),f=[150,500,2e3,5e3],g=new Set([d.c]);function h(a){return new Promise(b=>{setTimeout(b,a)})}async function i(a,b,c,d,f,g){let i=Date.now();try{for(let[j,k]of g.entries()){await h(k);let l={};if(await a.captureStructuredHistoryTurn(b.id,c,d,f,l))return e.info("stop-history-capture-deferred-captured",{worktreeId:b.id,cliToolId:c,instanceId:d,attempt:j+1,attempts:g.length,elapsedMs:Date.now()-i}),!0;e.debug("stop-history-capture-deferred-open",{worktreeId:b.id,cliToolId:c,instanceId:d,attempt:j+1,attempts:g.length,outcome:l.outcome??"unavailable",elapsedMs:Date.now()-i})}return e.info("stop-history-capture-deferred-exhausted",{worktreeId:b.id,cliToolId:c,instanceId:d,attempts:g.length,elapsedMs:Date.now()-i}),!1}catch(a){return e.warn("stop-history-capture-deferred-failed",{worktreeId:b.id,cliToolId:c,instanceId:d,error:a instanceof Error?a.message:String(a)}),!1}}async function j(a,b,d,k={}){try{let j=await Promise.all([c.e(1503),c.e(8791),c.e(1719),c.e(2119),c.e(2445),c.e(252),c.e(8800),c.e(7905),c.e(255),c.e(9731),c.e(8728),c.e(8918)]).then(c.bind(c,28918));if(!j.isPullTranscriptHistory(b))return{status:"unavailable"};let l={worktreePath:a.path,transcriptPathHint:null},m={};if(await j.captureStructuredHistoryTurn(a.id,b,d,l,m))return{status:"captured"};let n=()=>"not_yet_closed"===m.outcome?Promise.resolve(!0):j.hasStructuredHistoryTranscript(a.id,b,d,l);if(g.has(b)){let c=k.deferredDelaysMs??f;if(0===c.length||!await n())return{status:"unavailable"};let g=i(j,a,b,d,l,c);return e.info("stop-history-capture-deferred",{worktreeId:a.id,cliToolId:b,instanceId:d,delaysMs:c}),{status:"deferred",deferred:g}}let o=k.retryDelayMs??500;if(o<=0||!await n())return{status:"unavailable"};let p=Math.max(1,k.maxAttempts??3);for(let c=2;c<=p;c+=1){await h(o);let f={},g=await j.captureStructuredHistoryTurn(a.id,b,d,l,f);if(e.debug("stop-history-capture-retried",{worktreeId:a.id,cliToolId:b,instanceId:d,attempt:c,maxAttempts:p,captured:g,outcome:f.outcome??"unavailable"}),g)return{status:"captured"}}return{status:"unavailable"}}catch(c){return e.warn("stop-history-capture-failed",{worktreeId:a.id,cliToolId:b,instanceId:d,error:c instanceof Error?c.message:String(c)}),{status:"unavailable"}}}},48736:(a,b,c)=>{c.d(b,{cV:()=>h,Tb:()=>k,Lj:()=>l,Bz:()=>i,_1:()=>j,sD:()=>m});var d=c(2232),e=c(27354),f=c(4803),g=c(73495);let h=Object.freeze({lookupFailed:!0});function i(a){return null!=a&&"lookupFailed"in a&&!0===a.lookupFailed}function j(a){return a&&!i(a)?a.mode:null}let k=2e4;function l(a,b,c,f=!1){if(!c)return null;if(i(c))return{reason:e.dr};if("off"===c.mode)return{reason:"mode-off"};let g=function(a,b){if(0===b.length)return{outcome:"no-match"};let c=a.some(a=>a.length>k),e=a.map(a=>a.length>k?a.slice(0,k):a);for(let a of b){if(a.length>200||!(0,d.P0)(a).valid)return{outcome:"unusable",pattern:a};let b=new RegExp(a);for(let c of e){let e=(0,d.eJ)(b,c);if(null===e)return{outcome:"unusable",pattern:a};if(e)return{outcome:"match",pattern:a}}}return c?{outcome:"unusable"}:{outcome:"no-match"}}(b,c.denyPatterns);return"match"===g.outcome?{reason:"deny-pattern",pattern:g.pattern}:"unusable"===g.outcome?{reason:"deny-pattern-unusable",pattern:g.pattern}:f&&c.denyPatterns.length>0?{reason:"deny-pattern-unusable"}:"safe"===c.mode?"yes_no"===a?null:{reason:"type-not-allowed"}:"allow-listed"===c.mode?c.allowPromptTypes.includes(a)?null:{reason:"type-not-allowed"}:null}function m(a,b,c,d){let{answer:h,withheldBy:i}=function(a,b,c){if("yes_no"===a.type)return{answer:"y"};if("multiple_choice"===a.type){if(void 0!==c&&"not-a-permission-dialog"===(0,g.Me)(a.options,b).kind){let b=function(a,b,c){if(c)return{kind:"unidentified",cause:"multi-select"};if(0===a.length)return{kind:"unidentified",cause:"no-options"};if(void 0===b||b.length!==a.length||b.some(a=>"unknown"===a))return{kind:"unidentified",cause:"unknown-title"};let d=a.filter((a,c)=>!0===b[c]);if(d.length>1)return{kind:"unidentified",cause:"several-recommended"};let[e,f]=1===d.length?[d[0],"recommended"]:[a.find(a=>a.isDefault)??a[0],"default"];return e.requiresTextInput?{kind:"unidentified",cause:"typed-text"}:{kind:"chosen",option:e,basis:f}}(a.options,c.optionRecommendations,(0,f.eM)(a));return"chosen"===b.kind?{answer:b.option.number.toString()}:{answer:null,withheldBy:e.UT}}if((0,f.eM)(a))return{answer:null};let d=(0,g.Me)(a.options,b);if("unidentified"===d.kind)return{answer:null,withheldBy:e.Yy};let h="allow-once"===d.kind?d.option:a.options.find(a=>a.isDefault)??a.options[0];return!h||h.requiresTextInput?{answer:null}:{answer:h.number.toString()}}return{answer:null}}(a,c,d);if(i)return{answer:null,suppressedBy:i};if(null===h)return{answer:null,suppressedBy:null};let j=l(a.type,function(a){let b=[a.question];if(a.approvalTarget&&b.push(a.approvalTarget),"multiple_choice"===a.type)for(let c of a.options)b.push(c.label);else b.push(...a.options);return b}(a),b,void 0!==a.approvalTargetCompleteness);return j?{answer:null,suppressedBy:j.reason,pattern:j.pattern}:{answer:h,suppressedBy:null}}},52767:(a,b,c)=>{c.d(b,{r:()=>i,g:()=>h});var d=c(48524),e=c(87009),f=c(72626);let g=(0,f.h)("lib/tasks/task-transition-service");function h(a,b,c,f){let h=a.transaction(()=>{let g=(0,d.gg)(a,b);if(!g)return null;let h=g.status,i=function(a,b){switch(a){case"pending":switch(b){case"message_sent":return"running";case"send_failed":case"cancel":return"cancelled";default:return null}case"running":switch(b){case"prompt_detected":return"waiting_input";case"agent_idle":return"running";case"verify_started":return"verifying";case"send_failed":return"failed";case"cancel":return"cancelled";default:return null}case"waiting_input":switch(b){case"prompt_answered_auto":case"prompt_answered_human":case"agent_idle":return"running";case"verify_started":return"verifying";case"cancel":return"cancelled";default:return null}case"verifying":switch(b){case"verify_passed":return"succeeded";case"verify_failed":return"failed";case"verify_not_started":return"not_started";case"cancel":return"cancelled";default:return null}case"failed":case"not_started":switch(b){case"message_sent":return"running";case"verify_started":return"verifying";case"cancel":return"cancelled";default:return null}default:return null}}(h,c),j=Date.now(),k=(0,e.P)(a,{taskId:b,event:c,fromStatus:h,toStatus:i,payload:f,createdAt:j});return null===i?{task:g,fromStatus:h,toStatus:null,eventId:k}:{task:(0,d.xZ)(a,b,i,f?.runId===void 0?{}:{lastVerificationRunId:f.runId}),fromStatus:h,toStatus:i,eventId:k}})();return null===h?g.warn("task-event-unknown-task",{taskId:b,event:c}):null===h.toStatus&&g.warn("task-event-rejected",{taskId:b,event:c,fromStatus:h.fromStatus}),h}function i(a,b,c,e,f,i){try{let g=(0,d.MH)(a,b,c,e);if(!g)return null;return h(a,g.id,f,i)}catch(a){return g.warn("task-event-failed",{worktreeId:b,cliToolId:c,instanceId:e,event:f,error:a instanceof Error?a.message:String(a)}),null}}},77244:(a,b,c)=>{c.d(b,{FD:()=>i,Wo:()=>f,fA:()=>h,nB:()=>k,nh:()=>j});var d=c(24455),e=c(36925);let f=8e3,g=(0,e.v)("__antigravityPermissionReceipts",()=>new Map);function h(a,b,c,e,f=Date.now(),i=null){if(null!==e){for(let[a,b]of g)f-b.at>36e5&&g.delete(a);g.set((0,d.v7)(a,b,c),{toolName:e,at:f,callId:i})}}function i(a,b,c,e,h=Date.now()){let j=g.get((0,d.v7)(a,b,c));return!!j&&(void 0===e||j.toolName===e)&&h-j.at<=f}function j(a,b,c){return g.get((0,d.v7)(a,b,c))?.at??null}function k(a,b,c){return g.get((0,d.v7)(a,b,c))?.callId??null}(0,e.v)("__antigravityReceiptObservations",()=>new Map)},91318:(a,b,c)=>{c.d(b,{Fv:()=>o,JJ:()=>m,d8:()=>l,ie:()=>q,n:()=>k,wO:()=>n});var d=c(56791),e=c(88807),f=c(24455),g=c(72626),h=c(48736);let i=(0,g.h)("auto-yes-policy"),j=new Map;function k(a,b,c,d){return p(a,b,c,d?.fresh===!0).policy}function l(a,b,c){let{policy:d,taskId:e}=p(a,b,c);return(0,h.Bz)(d)?{policy:null,taskId:null}:{policy:d,taskId:e}}function m(a,b,c){let{policy:d,taskId:e}=p(a,b,c);return{policy:d,taskId:e}}function n(a,b,c){var d;return d=l(a,b,c).policy,d?.mode==="off"}function o(a,b,c){let{policy:d,taskId:e}=l(a,b,c);return d?{taskId:e,mode:d.mode,allowPromptTypes:d.allowPromptTypes,denyPatternCount:d.denyPatterns.length}:null}function p(a,b,c,g=!1){let k=c??b,l=(0,f.v7)(a,b,k),m=Date.now(),n=j.get(l);if(!g&&n&&n.expiresAt>m)return n;let{policy:o,taskId:q}=function(a,b,c){try{let f=(0,d.getActiveTaskForInstance)((0,e.getDbInstance)(),a,b,c);if(!f)return{policy:null,taskId:null};return{policy:f.contract.autoYes,taskId:f.id}}catch(d){return i.warn("policy-lookup-failed",{worktreeId:a,cliToolId:b,instanceId:c,error:d instanceof Error?d.message:String(d)}),{policy:h.cV,taskId:null}}}(a,b,k);if((0,h.Bz)(o))return g&&j.delete(l),{policy:o,taskId:q,expiresAt:m};j.size>=200&&function(a){for(let[b,c]of j.entries())c.expiresAt<=a&&j.delete(b)}(m);let r={policy:o,taskId:q,expiresAt:m+5e3};return j.set(l,r),r}function q(a){j.delete(a)}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=6119,exports.ids=[6119],exports.modules={4803:(a,b,c)=>{c.d(b,{H2:()=>i,eM:()=>f,kN:()=>e,tP:()=>l});let d=/^\[[ xX\u2714]\] /;function e(a){return a.some(a=>d.test(a.label))}function f(a){return!0===a.multiSelect||e(a.options)}let g=/^yes\b/i,h=[/^no\b/i,/\bdeny\b/i];class i extends Error{constructor(a){super(a),this.name="PromptAnswerResolutionError"}}function j(a){return h.some(b=>b.test(a))}function k(a){return g.test(a)&&!j(a)}function l(a){let{answer:b,useDefault:c,promptData:d,fallbackPromptType:e}=a;if(c){if(d?.type==="multiple_choice"){if(f(d))throw new i('Multi-select (checkbox) prompts have no default answer: the cursor marks the row a key would toggle, not a choice. Answer with the option numbers you want ticked, comma-separated (for example "1,3").');let a=function(a){let b=a.find(a=>a.isDefault)??a.find(a=>1===a.number)??a[0];if(!b)throw new i("The prompt has no options to select a default from.");return b}(d.options);return{input:String(a.number),resolved:{via:"default",optionNumber:a.number,optionLabel:a.label}}}if(d?.type==="yes_no"){if(d.defaultOption)return{input:d.defaultOption,resolved:{via:"default",optionLabel:d.defaultOption}};throw new i("The yes/no prompt declares no default option.")}throw new i("Cannot select the default option: no active prompt was detected.")}let g=b??"",h=function(a){let b=a.trim().toLowerCase();return"yes"===b||"y"===b?"yes":"no"===b||"n"===b?"no":null}(g);if(null===h)return{input:g};if(d?.type==="multiple_choice"){let a=function(a,b){let c=a.options;if(f(a))throw new i('Multi-select (checkbox) prompts cannot be answered with yes/no. Answer with the option numbers you want ticked, comma-separated (for example "1,3").');let d="yes"===b?k:j,e=c.filter(a=>d(a.label));if(0===e.length)throw new i(`No option label matches "${b}". Answer with an option number.`);return e.reduce((a,b)=>a.number<=b.number?a:b)}(d,h);return{input:String(a.number),resolved:{via:"semantic",optionNumber:a.number,optionLabel:a.label}}}if(!d&&"multiple_choice"===e)throw new i("Cannot resolve yes/no: the prompt is multiple choice but its options could not be read.");return{input:g}}},15388:(a,b,c)=>{c.d(b,{RJ:()=>f,SQ:()=>g});var d=c(24455);let e=(0,c(36925).v)("__toolInputNormalizations",()=>new Map);function f(a,b,c,g,h,i=Date.now()){e.set((0,d.v7)(a,b,c),{...g,toolName:h,at:i})}function g(a,b,c){return e.get((0,d.v7)(a,b,c))??null}},27354:(a,b,c)=>{c.d(b,{PF:()=>d,PP:()=>k,S6:()=>n,UT:()=>m,Yy:()=>l,dr:()=>e,eS:()=>i,lO:()=>h,m0:()=>g,uZ:()=>f});let d=new Set(["mode-off","deny-pattern","deny-pattern-unusable","type-not-allowed","policy-lookup-failed","allow-once-unidentified","recommended-option-unidentified"]),e="policy-lookup-failed",f="partial-answer",g="startup-trust-unhandled",h="question-confirm-page",i="question-left-to-human",j=new Set(["allow-once-unidentified","recommended-option-unidentified"]);function k(a){return j.has(a)}let l="allow-once-unidentified",m="recommended-option-unidentified",n="no-hook-receipt"},48736:(a,b,c)=>{c.d(b,{cV:()=>h,Tb:()=>k,Lj:()=>l,Bz:()=>i,_1:()=>j,sD:()=>m});var d=c(
|
|
1
|
+
"use strict";exports.id=6119,exports.ids=[6119],exports.modules={4803:(a,b,c)=>{c.d(b,{H2:()=>i,eM:()=>f,kN:()=>e,tP:()=>l});let d=/^\[[ xX\u2714]\] /;function e(a){return a.some(a=>d.test(a.label))}function f(a){return!0===a.multiSelect||e(a.options)}let g=/^yes\b/i,h=[/^no\b/i,/\bdeny\b/i];class i extends Error{constructor(a){super(a),this.name="PromptAnswerResolutionError"}}function j(a){return h.some(b=>b.test(a))}function k(a){return g.test(a)&&!j(a)}function l(a){let{answer:b,useDefault:c,promptData:d,fallbackPromptType:e}=a;if(c){if(d?.type==="multiple_choice"){if(f(d))throw new i('Multi-select (checkbox) prompts have no default answer: the cursor marks the row a key would toggle, not a choice. Answer with the option numbers you want ticked, comma-separated (for example "1,3").');let a=function(a){let b=a.find(a=>a.isDefault)??a.find(a=>1===a.number)??a[0];if(!b)throw new i("The prompt has no options to select a default from.");return b}(d.options);return{input:String(a.number),resolved:{via:"default",optionNumber:a.number,optionLabel:a.label}}}if(d?.type==="yes_no"){if(d.defaultOption)return{input:d.defaultOption,resolved:{via:"default",optionLabel:d.defaultOption}};throw new i("The yes/no prompt declares no default option.")}throw new i("Cannot select the default option: no active prompt was detected.")}let g=b??"",h=function(a){let b=a.trim().toLowerCase();return"yes"===b||"y"===b?"yes":"no"===b||"n"===b?"no":null}(g);if(null===h)return{input:g};if(d?.type==="multiple_choice"){let a=function(a,b){let c=a.options;if(f(a))throw new i('Multi-select (checkbox) prompts cannot be answered with yes/no. Answer with the option numbers you want ticked, comma-separated (for example "1,3").');let d="yes"===b?k:j,e=c.filter(a=>d(a.label));if(0===e.length)throw new i(`No option label matches "${b}". Answer with an option number.`);return e.reduce((a,b)=>a.number<=b.number?a:b)}(d,h);return{input:String(a.number),resolved:{via:"semantic",optionNumber:a.number,optionLabel:a.label}}}if(!d&&"multiple_choice"===e)throw new i("Cannot resolve yes/no: the prompt is multiple choice but its options could not be read.");return{input:g}}},15388:(a,b,c)=>{c.d(b,{RJ:()=>f,SQ:()=>g});var d=c(24455);let e=(0,c(36925).v)("__toolInputNormalizations",()=>new Map);function f(a,b,c,g,h,i=Date.now()){e.set((0,d.v7)(a,b,c),{...g,toolName:h,at:i})}function g(a,b,c){return e.get((0,d.v7)(a,b,c))??null}},27354:(a,b,c)=>{c.d(b,{PF:()=>d,PP:()=>k,S6:()=>n,UT:()=>m,Yy:()=>l,dr:()=>e,eS:()=>i,lO:()=>h,m0:()=>g,uZ:()=>f});let d=new Set(["mode-off","deny-pattern","deny-pattern-unusable","type-not-allowed","policy-lookup-failed","allow-once-unidentified","recommended-option-unidentified"]),e="policy-lookup-failed",f="partial-answer",g="startup-trust-unhandled",h="question-confirm-page",i="question-left-to-human",j=new Set(["allow-once-unidentified","recommended-option-unidentified"]);function k(a){return j.has(a)}let l="allow-once-unidentified",m="recommended-option-unidentified",n="no-hook-receipt"},48736:(a,b,c)=>{c.d(b,{cV:()=>h,Tb:()=>k,Lj:()=>l,Bz:()=>i,_1:()=>j,sD:()=>m});var d=c(2232),e=c(27354),f=c(4803),g=c(73495);let h=Object.freeze({lookupFailed:!0});function i(a){return null!=a&&"lookupFailed"in a&&!0===a.lookupFailed}function j(a){return a&&!i(a)?a.mode:null}let k=2e4;function l(a,b,c,f=!1){if(!c)return null;if(i(c))return{reason:e.dr};if("off"===c.mode)return{reason:"mode-off"};let g=function(a,b){if(0===b.length)return{outcome:"no-match"};let c=a.some(a=>a.length>k),e=a.map(a=>a.length>k?a.slice(0,k):a);for(let a of b){if(a.length>200||!(0,d.P0)(a).valid)return{outcome:"unusable",pattern:a};let b=new RegExp(a);for(let c of e){let e=(0,d.eJ)(b,c);if(null===e)return{outcome:"unusable",pattern:a};if(e)return{outcome:"match",pattern:a}}}return c?{outcome:"unusable"}:{outcome:"no-match"}}(b,c.denyPatterns);return"match"===g.outcome?{reason:"deny-pattern",pattern:g.pattern}:"unusable"===g.outcome?{reason:"deny-pattern-unusable",pattern:g.pattern}:f&&c.denyPatterns.length>0?{reason:"deny-pattern-unusable"}:"safe"===c.mode?"yes_no"===a?null:{reason:"type-not-allowed"}:"allow-listed"===c.mode?c.allowPromptTypes.includes(a)?null:{reason:"type-not-allowed"}:null}function m(a,b,c,d){let{answer:h,withheldBy:i}=function(a,b,c){if("yes_no"===a.type)return{answer:"y"};if("multiple_choice"===a.type){if(void 0!==c&&"not-a-permission-dialog"===(0,g.Me)(a.options,b).kind){let b=function(a,b,c){if(c)return{kind:"unidentified",cause:"multi-select"};if(0===a.length)return{kind:"unidentified",cause:"no-options"};if(void 0===b||b.length!==a.length||b.some(a=>"unknown"===a))return{kind:"unidentified",cause:"unknown-title"};let d=a.filter((a,c)=>!0===b[c]);if(d.length>1)return{kind:"unidentified",cause:"several-recommended"};let[e,f]=1===d.length?[d[0],"recommended"]:[a.find(a=>a.isDefault)??a[0],"default"];return e.requiresTextInput?{kind:"unidentified",cause:"typed-text"}:{kind:"chosen",option:e,basis:f}}(a.options,c.optionRecommendations,(0,f.eM)(a));return"chosen"===b.kind?{answer:b.option.number.toString()}:{answer:null,withheldBy:e.UT}}if((0,f.eM)(a))return{answer:null};let d=(0,g.Me)(a.options,b);if("unidentified"===d.kind)return{answer:null,withheldBy:e.Yy};let h="allow-once"===d.kind?d.option:a.options.find(a=>a.isDefault)??a.options[0];return!h||h.requiresTextInput?{answer:null}:{answer:h.number.toString()}}return{answer:null}}(a,c,d);if(i)return{answer:null,suppressedBy:i};if(null===h)return{answer:null,suppressedBy:null};let j=l(a.type,function(a){let b=[a.question];if(a.approvalTarget&&b.push(a.approvalTarget),"multiple_choice"===a.type)for(let c of a.options)b.push(c.label);else b.push(...a.options);return b}(a),b,void 0!==a.approvalTargetCompleteness);return j?{answer:null,suppressedBy:j.reason,pattern:j.pattern}:{answer:h,suppressedBy:null}}},91318:(a,b,c)=>{c.d(b,{Fv:()=>o,JJ:()=>m,d8:()=>l,ie:()=>q,n:()=>k,wO:()=>n});var d=c(56791),e=c(88807),f=c(24455),g=c(72626),h=c(48736);let i=(0,g.h)("auto-yes-policy"),j=new Map;function k(a,b,c,d){return p(a,b,c,d?.fresh===!0).policy}function l(a,b,c){let{policy:d,taskId:e}=p(a,b,c);return(0,h.Bz)(d)?{policy:null,taskId:null}:{policy:d,taskId:e}}function m(a,b,c){let{policy:d,taskId:e}=p(a,b,c);return{policy:d,taskId:e}}function n(a,b,c){var d;return d=l(a,b,c).policy,d?.mode==="off"}function o(a,b,c){let{policy:d,taskId:e}=l(a,b,c);return d?{taskId:e,mode:d.mode,allowPromptTypes:d.allowPromptTypes,denyPatternCount:d.denyPatterns.length}:null}function p(a,b,c,g=!1){let k=c??b,l=(0,f.v7)(a,b,k),m=Date.now(),n=j.get(l);if(!g&&n&&n.expiresAt>m)return n;let{policy:o,taskId:q}=function(a,b,c){try{let f=(0,d.getActiveTaskForInstance)((0,e.getDbInstance)(),a,b,c);if(!f)return{policy:null,taskId:null};return{policy:f.contract.autoYes,taskId:f.id}}catch(d){return i.warn("policy-lookup-failed",{worktreeId:a,cliToolId:b,instanceId:c,error:d instanceof Error?d.message:String(d)}),{policy:h.cV,taskId:null}}}(a,b,k);if((0,h.Bz)(o))return g&&j.delete(l),{policy:o,taskId:q,expiresAt:m};j.size>=200&&function(a){for(let[b,c]of j.entries())c.expiresAt<=a&&j.delete(b)}(m);let r={policy:o,taskId:q,expiresAt:m+5e3};return j.set(l,r),r}function q(a){j.delete(a)}}};
|