commandmate 0.49.2 → 0.49.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +241 -234
- package/.next/app-path-routes-manifest.json +19 -18
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +8 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/release-notes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/capabilities/route.js +1 -1
- package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/route.js +1 -1
- package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
- package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/status/route.js +1 -1
- package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
- package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/agent-event/route.js +2 -2
- package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/claude-done/route.js +2 -2
- package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/escalation/route.js +1 -1
- package/.next/server/app/api/push/escalation/route.js.nft.json +1 -1
- package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/subscriptions/route.js +1 -1
- package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/vapid/route.js +1 -1
- package/.next/server/app/api/push/vapid/route.js.nft.json +1 -1
- package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route.js +4 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/[relayId]/resolve/route.js +1 -0
- package/.next/server/app/api/relays/[relayId]/resolve/route.js.nft.json +1 -0
- package/.next/server/app/api/relays/[relayId]/resolve/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/relays/[relayId]/route.js +1 -1
- package/.next/server/app/api/relays/[relayId]/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/[relayId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/route.js +4 -1
- package/.next/server/app/api/relays/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/route.js +1 -1
- package/.next/server/app/api/repositories/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/default-agents/route.js +1 -1
- package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/route.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/route.js +1 -1
- package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-reference/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/env/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/execution-logs/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/notes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/schedules/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js +1 -144
- package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -3
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/more/page_client-reference-manifest.js +1 -1
- package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/page.js +10 -10
- package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +19 -18
- package/.next/server/chunks/1308.js +1 -0
- package/.next/server/chunks/1656.js +2 -2
- package/.next/server/chunks/1957.js +2 -2
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/2897.js +1 -1
- package/.next/server/chunks/3417.js +1 -1
- package/.next/server/chunks/3801.js +7 -7
- package/.next/server/chunks/4207.js +1 -1
- package/.next/server/chunks/4490.js +1 -0
- package/.next/server/chunks/4911.js +1 -1
- package/.next/server/chunks/4936.js +1 -1
- package/.next/server/chunks/5209.js +2 -2
- package/.next/server/chunks/5350.js +212 -0
- package/.next/server/chunks/5354.js +1 -1
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/6401.js +1 -1
- package/.next/server/chunks/7023.js +3 -3
- package/.next/server/chunks/7905.js +1 -1
- package/.next/server/chunks/7926.js +1 -0
- package/.next/server/chunks/8581.js +1 -1
- package/.next/server/chunks/8728.js +2 -2
- package/.next/server/chunks/8782.js +1 -1
- package/.next/server/chunks/8807.js +89 -88
- package/.next/server/chunks/8918.js +3 -3
- package/.next/server/chunks/9169.js +1 -0
- package/.next/server/chunks/9390.js +1 -1
- package/.next/server/chunks/9584.js +1 -1
- package/.next/server/chunks/9627.js +5 -5
- package/.next/server/chunks/9702.js +1 -0
- package/.next/server/chunks/9731.js +3 -3
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{2407-07a237575e1ceb9e.js → 2407-87ec01332344ec2b.js} +1 -1
- package/.next/static/chunks/3931-3ef48b8d97357282.js +1 -0
- package/.next/static/chunks/app/api/agents/update/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/agents/versions/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/app/release-notes/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/app/update/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/app/update-check/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/capabilities/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/fs/browse/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/fs/recent-paths/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/hooks/agent-event/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/hooks/permission-request/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/metrics/vibe/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/push/escalation/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/resolve/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/relays/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/remote/pair/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/repositories/validate-path/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/settings/default-agents/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/skills/installations/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/skills/operations/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/skills/reindex/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/skills/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/templates/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/{layout-4f64316957b0a8e5.js → layout-b9d8aef70e4f17b2.js} +1 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/proxy/[...path]/route-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/layout-96fc12d400b49b13.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-f6a151304860b549.js +1 -0
- package/.next/trace +13 -13
- package/.next/types/app/api/relays/[relayId]/resolve/route.ts +347 -0
- package/.next/types/routes.d.ts +2 -1
- package/.next/types/validator.ts +9 -0
- package/dist/cli/commands/prompt.d.ts.map +1 -1
- package/dist/cli/commands/prompt.js +2 -1
- package/dist/cli/commands/relays.d.ts +2 -0
- package/dist/cli/commands/relays.d.ts.map +1 -1
- package/dist/cli/commands/relays.js +142 -5
- package/dist/cli/commands/report.d.ts +7 -2
- package/dist/cli/commands/report.d.ts.map +1 -1
- package/dist/cli/commands/report.js +19 -6
- package/dist/cli/commands/respond-strict.d.ts.map +1 -1
- package/dist/cli/commands/respond-strict.js +9 -2
- package/dist/cli/commands/task.d.ts +22 -0
- package/dist/cli/commands/task.d.ts.map +1 -1
- package/dist/cli/commands/task.js +26 -18
- package/dist/cli/types/api-responses.d.ts +52 -0
- package/dist/cli/types/api-responses.d.ts.map +1 -1
- package/dist/cli/utils/api-client-deadline.d.ts +28 -0
- package/dist/cli/utils/api-client-deadline.d.ts.map +1 -0
- package/dist/cli/utils/api-client-deadline.js +46 -0
- package/dist/cli/utils/api-client-errors.d.ts +118 -0
- package/dist/cli/utils/api-client-errors.d.ts.map +1 -0
- package/dist/cli/utils/api-client-errors.js +210 -0
- package/dist/cli/utils/api-client.d.ts +3 -133
- package/dist/cli/utils/api-client.d.ts.map +1 -1
- package/dist/cli/utils/api-client.js +30 -257
- package/dist/lib/cli-tools/types.d.ts +6 -0
- package/dist/lib/cli-tools/types.d.ts.map +1 -1
- package/dist/server/locales/en/worktree.json +7 -0
- package/dist/server/locales/ja/worktree.json +7 -0
- package/dist/server/src/lib/cli-tools/claude.js +8 -2
- package/dist/server/src/lib/cli-tools/command-code.js +7 -15
- package/dist/server/src/lib/cli-tools/copilot.js +154 -25
- package/dist/server/src/lib/cli-tools/opencode.js +157 -6
- package/dist/server/src/lib/cli-tools/prompt-wait-dialog.js +115 -0
- package/dist/server/src/lib/cli-tools/submit-composer-read.js +41 -8
- package/dist/server/src/lib/cli-tools/submit-verified-sender-composer.js +78 -0
- package/dist/server/src/lib/cli-tools/submit-verified-sender-lock.js +116 -0
- package/dist/server/src/lib/cli-tools/submit-verified-sender-report.js +250 -0
- package/dist/server/src/lib/cli-tools/submit-verified-sender-shared.js +106 -0
- package/dist/server/src/lib/cli-tools/submit-verified-sender.js +94 -295
- package/dist/server/src/lib/cli-tools/vibe-local.js +87 -0
- package/dist/server/src/lib/db/chat-db.js +14 -1
- package/dist/server/src/lib/db/db-instance.js +114 -2
- package/dist/server/src/lib/db/migrations/index.js +2 -0
- package/dist/server/src/lib/db/migrations/runner.js +1 -1
- package/dist/server/src/lib/db/migrations/v63-session-relays-delivery-attempt.js +61 -0
- package/dist/server/src/lib/db/relay-bind-db-base.js +89 -0
- package/dist/server/src/lib/db/relay-bind-db-delivery.js +223 -0
- package/dist/server/src/lib/db/relay-bind-db-pending.js +183 -0
- package/dist/server/src/lib/db/relay-bind-db.js +88 -167
- package/dist/server/src/lib/db/relay-db-base.js +20 -0
- package/dist/server/src/lib/db/relay-db-count.js +49 -0
- package/dist/server/src/lib/db/relay-db-delivery.js +104 -0
- package/dist/server/src/lib/db/relay-db-hold.js +250 -0
- package/dist/server/src/lib/db/relay-db.js +33 -92
- package/dist/server/src/lib/detection/tools/opencode/composer-own-text.js +119 -0
- package/dist/server/src/lib/detection/tools/opencode/readiness.js +62 -0
- package/dist/server/src/lib/detection/tools/vibe-local/readiness.js +70 -0
- package/dist/server/src/lib/relay/relay-bound-reply.js +20 -9
- package/dist/server/src/lib/relay/relay-delivery.js +359 -79
- package/dist/server/src/lib/relay/relay-messages.js +13 -0
- package/dist/server/src/lib/relay/relay-system-line.js +28 -15
- package/dist/server/src/lib/relay/types.js +14 -2
- package/dist/server/src/lib/session/claude-session.js +4 -1
- package/dist/server/src/lib/session/current-output-builder.js +7 -5
- package/dist/server/src/lib/session/instance-input-lock.js +47 -2
- package/dist/server/src/lib/session/prompt-submit-receipt.js +87 -18
- package/dist/server/src/lib/session/prompt-waiting-guard.js +8 -2
- package/dist/server/src/lib/session/respond-target.js +82 -0
- package/dist/server/src/lib/session/send-attempt-state.js +130 -3
- package/dist/server/src/lib/session/send-user-message.js +78 -7
- package/dist/server/src/lib/session/structured-prompt.js +12 -7
- package/dist/server/src/lib/session/worktree-session-reconcile.js +10 -0
- package/dist/server/src/lib/session-key-sender.js +6 -1
- package/package.json +1 -1
- package/release-notes/0.49.3.json +52 -0
- package/.next/server/chunks/1062.js +0 -1
- package/.next/server/chunks/110.js +0 -1
- package/.next/server/chunks/2422.js +0 -1
- package/.next/server/chunks/3756.js +0 -1
- package/.next/server/chunks/5630.js +0 -1
- package/.next/server/chunks/6808.js +0 -4
- package/.next/server/chunks/9198.js +0 -144
- package/.next/static/chunks/3931-61ad1a4fc0208d0e.js +0 -1
- package/.next/static/chunks/app/api/agents/update/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/agents/versions/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/app/release-notes/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/app/update/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/app/update-check/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/capabilities/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/fs/browse/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/fs/recent-paths/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/hooks/agent-event/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/hooks/permission-request/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/metrics/vibe/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/push/escalation/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/relays/[relayId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/relays/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/remote/pair/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/repositories/validate-path/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/settings/default-agents/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/skills/[id]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/skills/installations/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/skills/operations/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/skills/reindex/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/skills/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/templates/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/layout-a4f129c451de7859.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-33afc6aa96289fb0.js +0 -1
- /package/.next/static/{yGatWDsS532awSs51kXyd → LNfVZiq6FZwKsV7L9Mi6M}/_buildManifest.js +0 -0
- /package/.next/static/{yGatWDsS532awSs51kXyd → LNfVZiq6FZwKsV7L9Mi6M}/_ssgManifest.js +0 -0
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* @module lib/db/relay-bind-db
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.
|
|
14
|
-
exports.mapRelay = mapRelay;
|
|
13
|
+
exports.releaseRelayPayloadDelivery = exports.recoverInterruptedRelayDeliveryRefs = exports.recoverInterruptedRelayDeliveries = exports.listRelaysWithDeliveryHold = exports.isCurrentRelayPayloadAttempt = exports.holdRelayPayloadDelivery = exports.endRelayPayloadAttempt = exports.completeRelayPayloadDelivery = exports.claimRelayPayloadDelivery = exports.RELAY_DELIVERY_SERVER_RESTARTED = exports.setRelayPendingReply = exports.replaceRelayPromptWithReply = exports.replaceRelayPromptWithPendingReply = exports.promoteRelayPendingReply = exports.countHeldRelays = exports.clearRelayPendingReplyUnlessHeld = exports.clearRelayPendingReply = exports.mapRelay = exports.RELAY_COLUMNS = exports.OPEN_STATE_PLACEHOLDERS = exports.KEEP_HELD_PAYLOAD_SET = void 0;
|
|
15
14
|
exports.stashRelayPayload = stashRelayPayload;
|
|
15
|
+
exports.listDeliverableRelayPayloads = listDeliverableRelayPayloads;
|
|
16
16
|
exports.listRelaysWithPendingPayload = listRelaysWithPendingPayload;
|
|
17
17
|
exports.clearRelayPending = clearRelayPending;
|
|
18
18
|
exports.getRelayPendingPayload = getRelayPendingPayload;
|
|
@@ -25,22 +25,39 @@ exports.settleRelaySendState = settleRelaySendState;
|
|
|
25
25
|
exports.setRelayHold = setRelayHold;
|
|
26
26
|
exports.appendRelayHeldCandidate = appendRelayHeldCandidate;
|
|
27
27
|
exports.clearRelayHeldCandidates = clearRelayHeldCandidates;
|
|
28
|
-
exports.setRelayPendingReply = setRelayPendingReply;
|
|
29
|
-
exports.replaceRelayPromptWithReply = replaceRelayPromptWithReply;
|
|
30
|
-
exports.promoteRelayPendingReply = promoteRelayPendingReply;
|
|
31
|
-
exports.replaceRelayPromptWithPendingReply = replaceRelayPromptWithPendingReply;
|
|
32
|
-
exports.clearRelayPendingReply = clearRelayPendingReply;
|
|
33
28
|
exports.failOrphanedRelayBind = failOrphanedRelayBind;
|
|
29
|
+
exports.completeRelayPromptDelivery = completeRelayPromptDelivery;
|
|
34
30
|
const crypto_1 = require("crypto");
|
|
35
31
|
const types_1 = require("../../lib/relay/types");
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
const relay_bind_db_base_1 = require("./relay-bind-db-base");
|
|
33
|
+
const relay_bind_db_pending_1 = require("./relay-bind-db-pending");
|
|
34
|
+
const relay_bind_db_delivery_1 = require("./relay-bind-db-delivery");
|
|
35
|
+
// Issue #4095: the shared row shape, the second slot and the delivery attempts
|
|
36
|
+
// live in their own modules; every public name stays importable from here.
|
|
37
|
+
var relay_bind_db_base_2 = require("./relay-bind-db-base");
|
|
38
|
+
Object.defineProperty(exports, "KEEP_HELD_PAYLOAD_SET", { enumerable: true, get: function () { return relay_bind_db_base_2.KEEP_HELD_PAYLOAD_SET; } });
|
|
39
|
+
Object.defineProperty(exports, "OPEN_STATE_PLACEHOLDERS", { enumerable: true, get: function () { return relay_bind_db_base_2.OPEN_STATE_PLACEHOLDERS; } });
|
|
40
|
+
Object.defineProperty(exports, "RELAY_COLUMNS", { enumerable: true, get: function () { return relay_bind_db_base_2.RELAY_COLUMNS; } });
|
|
41
|
+
Object.defineProperty(exports, "mapRelay", { enumerable: true, get: function () { return relay_bind_db_base_2.mapRelay; } });
|
|
42
|
+
var relay_bind_db_pending_2 = require("./relay-bind-db-pending");
|
|
43
|
+
Object.defineProperty(exports, "clearRelayPendingReply", { enumerable: true, get: function () { return relay_bind_db_pending_2.clearRelayPendingReply; } });
|
|
44
|
+
Object.defineProperty(exports, "clearRelayPendingReplyUnlessHeld", { enumerable: true, get: function () { return relay_bind_db_pending_2.clearRelayPendingReplyUnlessHeld; } });
|
|
45
|
+
Object.defineProperty(exports, "countHeldRelays", { enumerable: true, get: function () { return relay_bind_db_pending_2.countHeldRelays; } });
|
|
46
|
+
Object.defineProperty(exports, "promoteRelayPendingReply", { enumerable: true, get: function () { return relay_bind_db_pending_2.promoteRelayPendingReply; } });
|
|
47
|
+
Object.defineProperty(exports, "replaceRelayPromptWithPendingReply", { enumerable: true, get: function () { return relay_bind_db_pending_2.replaceRelayPromptWithPendingReply; } });
|
|
48
|
+
Object.defineProperty(exports, "replaceRelayPromptWithReply", { enumerable: true, get: function () { return relay_bind_db_pending_2.replaceRelayPromptWithReply; } });
|
|
49
|
+
Object.defineProperty(exports, "setRelayPendingReply", { enumerable: true, get: function () { return relay_bind_db_pending_2.setRelayPendingReply; } });
|
|
50
|
+
var relay_bind_db_delivery_2 = require("./relay-bind-db-delivery");
|
|
51
|
+
Object.defineProperty(exports, "RELAY_DELIVERY_SERVER_RESTARTED", { enumerable: true, get: function () { return relay_bind_db_delivery_2.RELAY_DELIVERY_SERVER_RESTARTED; } });
|
|
52
|
+
Object.defineProperty(exports, "claimRelayPayloadDelivery", { enumerable: true, get: function () { return relay_bind_db_delivery_2.claimRelayPayloadDelivery; } });
|
|
53
|
+
Object.defineProperty(exports, "completeRelayPayloadDelivery", { enumerable: true, get: function () { return relay_bind_db_delivery_2.completeRelayPayloadDelivery; } });
|
|
54
|
+
Object.defineProperty(exports, "endRelayPayloadAttempt", { enumerable: true, get: function () { return relay_bind_db_delivery_2.endRelayPayloadAttempt; } });
|
|
55
|
+
Object.defineProperty(exports, "holdRelayPayloadDelivery", { enumerable: true, get: function () { return relay_bind_db_delivery_2.holdRelayPayloadDelivery; } });
|
|
56
|
+
Object.defineProperty(exports, "isCurrentRelayPayloadAttempt", { enumerable: true, get: function () { return relay_bind_db_delivery_2.isCurrentRelayPayloadAttempt; } });
|
|
57
|
+
Object.defineProperty(exports, "listRelaysWithDeliveryHold", { enumerable: true, get: function () { return relay_bind_db_delivery_2.listRelaysWithDeliveryHold; } });
|
|
58
|
+
Object.defineProperty(exports, "recoverInterruptedRelayDeliveries", { enumerable: true, get: function () { return relay_bind_db_delivery_2.recoverInterruptedRelayDeliveries; } });
|
|
59
|
+
Object.defineProperty(exports, "recoverInterruptedRelayDeliveryRefs", { enumerable: true, get: function () { return relay_bind_db_delivery_2.recoverInterruptedRelayDeliveryRefs; } });
|
|
60
|
+
Object.defineProperty(exports, "releaseRelayPayloadDelivery", { enumerable: true, get: function () { return relay_bind_db_delivery_2.releaseRelayPayloadDelivery; } });
|
|
44
61
|
/**
|
|
45
62
|
* The v62 columns no public reader sees (Issue #3957): the reservation token
|
|
46
63
|
* and its owner, the observation's source, the send's own user row, and the
|
|
@@ -50,31 +67,6 @@ const RELAY_BINDING_COLUMNS = `
|
|
|
50
67
|
bind_attempt_id, bind_owner, obs_source, input_message_id,
|
|
51
68
|
held_candidates, pending_reply, payload_id
|
|
52
69
|
`;
|
|
53
|
-
function mapRelay(row) {
|
|
54
|
-
return {
|
|
55
|
-
id: row.id,
|
|
56
|
-
from: { worktreeId: row.from_worktree_id, instanceId: row.from_instance_id },
|
|
57
|
-
to: { worktreeId: row.to_worktree_id, instanceId: row.to_instance_id },
|
|
58
|
-
state: row.state,
|
|
59
|
-
hops: row.hops,
|
|
60
|
-
sentRequestId: row.sent_request_id,
|
|
61
|
-
pendingKind: row.pending_kind ?? null,
|
|
62
|
-
createdAt: row.created_at,
|
|
63
|
-
updatedAt: row.updated_at,
|
|
64
|
-
expiresAt: row.expires_at,
|
|
65
|
-
deliveredAt: row.delivered_at,
|
|
66
|
-
bindMode: row.bind_mode ?? 'legacy',
|
|
67
|
-
sendState: row.send_state ?? null,
|
|
68
|
-
inputBoundaryAt: row.input_boundary_at,
|
|
69
|
-
boundaryKind: row.boundary_kind ?? null,
|
|
70
|
-
turnOpenAtSend: row.turn_open_at_send === null ? null : row.turn_open_at_send === 1,
|
|
71
|
-
obsState: row.obs_state ?? null,
|
|
72
|
-
holdReason: row.hold_reason,
|
|
73
|
-
overlap: row.overlap ?? null,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
/** Placeholders for an `IN (…)` over the open states. */
|
|
77
|
-
exports.OPEN_STATE_PLACEHOLDERS = types_1.OPEN_RELAY_STATES.map(() => '?').join(', ');
|
|
78
70
|
/**
|
|
79
71
|
* Record a payload that has been decided and not yet delivered.
|
|
80
72
|
*
|
|
@@ -96,28 +88,44 @@ function stashRelayPayload(db, id, kind, body, now = Date.now(), options = {}) {
|
|
|
96
88
|
SET pending_kind = ?, pending_body = ?, payload_id = ?,
|
|
97
89
|
overlap = COALESCE(?, overlap), updated_at = ?
|
|
98
90
|
WHERE id = ? AND pending_kind IS NULL
|
|
99
|
-
AND state IN (${
|
|
91
|
+
AND state IN (${relay_bind_db_base_1.OPEN_STATE_PLACEHOLDERS})
|
|
100
92
|
`)
|
|
101
93
|
.run(kind, body, payloadId, options.overlap ?? null, now, id, ...types_1.OPEN_RELAY_STATES);
|
|
102
94
|
return result.changes === 1;
|
|
103
95
|
}
|
|
104
|
-
/**
|
|
105
|
-
|
|
96
|
+
/**
|
|
97
|
+
* Every relay carrying an undelivered payload the pump may send, oldest first,
|
|
98
|
+
* with the payload's id (Issue #4064).
|
|
99
|
+
*
|
|
100
|
+
* A payload under a delivery hold (`delivery_state` set — being sent, or its
|
|
101
|
+
* outcome not known) is not listed: it is never sent again automatically.
|
|
102
|
+
*/
|
|
103
|
+
function listDeliverableRelayPayloads(db) {
|
|
106
104
|
const rows = db
|
|
107
105
|
.prepare(`
|
|
108
|
-
SELECT ${
|
|
109
|
-
WHERE pending_kind IS NOT NULL
|
|
106
|
+
SELECT ${relay_bind_db_base_1.RELAY_COLUMNS}, payload_id FROM session_relays
|
|
107
|
+
WHERE pending_kind IS NOT NULL AND delivery_state IS NULL
|
|
110
108
|
ORDER BY updated_at ASC
|
|
111
109
|
`)
|
|
112
110
|
.all();
|
|
113
111
|
return rows
|
|
114
112
|
.filter((row) => row.pending_body !== null && row.pending_kind !== null)
|
|
115
113
|
.map((row) => ({
|
|
116
|
-
relay: mapRelay(row),
|
|
114
|
+
relay: (0, relay_bind_db_base_1.mapRelay)(row),
|
|
117
115
|
kind: row.pending_kind,
|
|
118
116
|
body: row.pending_body,
|
|
117
|
+
payloadId: row.payload_id,
|
|
119
118
|
}));
|
|
120
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* Every relay carrying an undelivered payload, oldest first.
|
|
122
|
+
*
|
|
123
|
+
* Issue #4064: a payload under a delivery hold is not "undelivered" in the
|
|
124
|
+
* sense the pump acts on, and is left out (see {@link listDeliverableRelayPayloads}).
|
|
125
|
+
*/
|
|
126
|
+
function listRelaysWithPendingPayload(db) {
|
|
127
|
+
return listDeliverableRelayPayloads(db).map(({ relay, kind, body }) => ({ relay, kind, body }));
|
|
128
|
+
}
|
|
121
129
|
/**
|
|
122
130
|
* Drop an undelivered payload (it went out, or it was superseded).
|
|
123
131
|
*
|
|
@@ -125,6 +133,10 @@ function listRelaysWithPendingPayload(db) {
|
|
|
125
133
|
* delivery passes the id it sent, so a reply stashed over a prompt notice while
|
|
126
134
|
* that notice was being typed survives the notice's cleanup.
|
|
127
135
|
*
|
|
136
|
+
* Issue #4064: never a payload under a delivery hold — its delivery may have
|
|
137
|
+
* reached A, and its body, id and reason stay readable. The delivery records
|
|
138
|
+
* its own end with {@link completeRelayPayloadDelivery}.
|
|
139
|
+
*
|
|
128
140
|
* @returns Whether a payload was cleared
|
|
129
141
|
*/
|
|
130
142
|
function clearRelayPending(db, id, now = Date.now(), payloadId) {
|
|
@@ -133,14 +145,14 @@ function clearRelayPending(db, id, now = Date.now(), payloadId) {
|
|
|
133
145
|
.prepare(`
|
|
134
146
|
UPDATE session_relays
|
|
135
147
|
SET pending_kind = NULL, pending_body = NULL, payload_id = NULL, updated_at = ?
|
|
136
|
-
WHERE id = ?
|
|
148
|
+
WHERE id = ? AND delivery_state IS NULL
|
|
137
149
|
`)
|
|
138
150
|
.run(now, id)
|
|
139
151
|
: db
|
|
140
152
|
.prepare(`
|
|
141
153
|
UPDATE session_relays
|
|
142
154
|
SET pending_kind = NULL, pending_body = NULL, payload_id = NULL, updated_at = ?
|
|
143
|
-
WHERE id = ? AND payload_id IS ?
|
|
155
|
+
WHERE id = ? AND payload_id IS ? AND delivery_state IS NULL
|
|
144
156
|
`)
|
|
145
157
|
.run(now, id, payloadId);
|
|
146
158
|
return result.changes === 1;
|
|
@@ -148,36 +160,26 @@ function clearRelayPending(db, id, now = Date.now(), payloadId) {
|
|
|
148
160
|
/** The payload a relay carries now, with its id, or null (Issue #3957). */
|
|
149
161
|
function getRelayPendingPayload(db, id) {
|
|
150
162
|
const row = db
|
|
151
|
-
.prepare(`SELECT ${
|
|
163
|
+
.prepare(`SELECT ${relay_bind_db_base_1.RELAY_COLUMNS}, payload_id FROM session_relays WHERE id = ?`)
|
|
152
164
|
.get(id);
|
|
153
165
|
if (!row || row.pending_kind === null || row.pending_body === null)
|
|
154
166
|
return null;
|
|
155
167
|
return {
|
|
156
|
-
relay: mapRelay(row),
|
|
168
|
+
relay: (0, relay_bind_db_base_1.mapRelay)(row),
|
|
157
169
|
kind: row.pending_kind,
|
|
158
170
|
body: row.pending_body,
|
|
159
171
|
payloadId: row.payload_id,
|
|
160
172
|
};
|
|
161
173
|
}
|
|
162
|
-
function parseJson(text, fallback) {
|
|
163
|
-
if (text === null)
|
|
164
|
-
return fallback;
|
|
165
|
-
try {
|
|
166
|
-
return JSON.parse(text);
|
|
167
|
-
}
|
|
168
|
-
catch {
|
|
169
|
-
return fallback;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
174
|
function mapBinding(row) {
|
|
173
175
|
return {
|
|
174
|
-
relay: mapRelay(row),
|
|
176
|
+
relay: (0, relay_bind_db_base_1.mapRelay)(row),
|
|
175
177
|
bindAttemptId: row.bind_attempt_id,
|
|
176
178
|
bindOwner: row.bind_owner,
|
|
177
179
|
obsSource: row.obs_source,
|
|
178
180
|
inputMessageId: row.input_message_id,
|
|
179
|
-
heldCandidates: parseJson(row.held_candidates, []),
|
|
180
|
-
pendingReply: parseJson(row.pending_reply, null),
|
|
181
|
+
heldCandidates: (0, relay_bind_db_base_1.parseJson)(row.held_candidates, []),
|
|
182
|
+
pendingReply: (0, relay_bind_db_base_1.parseJson)(row.pending_reply, null),
|
|
181
183
|
payloadId: row.payload_id,
|
|
182
184
|
pendingKind: row.pending_kind ?? null,
|
|
183
185
|
};
|
|
@@ -185,7 +187,7 @@ function mapBinding(row) {
|
|
|
185
187
|
/** One relay with its binding columns, or null. */
|
|
186
188
|
function getRelayBinding(db, id) {
|
|
187
189
|
const row = db
|
|
188
|
-
.prepare(`SELECT ${
|
|
190
|
+
.prepare(`SELECT ${relay_bind_db_base_1.RELAY_COLUMNS}, ${RELAY_BINDING_COLUMNS} FROM session_relays WHERE id = ?`)
|
|
189
191
|
.get(id);
|
|
190
192
|
return row ? mapBinding(row) : null;
|
|
191
193
|
}
|
|
@@ -193,8 +195,8 @@ function getRelayBinding(db, id) {
|
|
|
193
195
|
function listOpenBoundRelays(db) {
|
|
194
196
|
const rows = db
|
|
195
197
|
.prepare(`
|
|
196
|
-
SELECT ${
|
|
197
|
-
WHERE bind_mode = 'bound' AND state IN (${
|
|
198
|
+
SELECT ${relay_bind_db_base_1.RELAY_COLUMNS}, ${RELAY_BINDING_COLUMNS} FROM session_relays
|
|
199
|
+
WHERE bind_mode = 'bound' AND state IN (${relay_bind_db_base_1.OPEN_STATE_PLACEHOLDERS})
|
|
198
200
|
ORDER BY created_at ASC
|
|
199
201
|
`)
|
|
200
202
|
.all(...types_1.OPEN_RELAY_STATES);
|
|
@@ -279,7 +281,7 @@ function settleRelaySendState(db, input) {
|
|
|
279
281
|
obs_state = CASE WHEN ? = 1 THEN 'invalid' ELSE obs_state END,
|
|
280
282
|
updated_at = ?
|
|
281
283
|
WHERE id = ? AND bind_attempt_id = ? AND send_state IN (${fromPlaceholders})
|
|
282
|
-
AND state IN (${
|
|
284
|
+
AND state IN (${relay_bind_db_base_1.OPEN_STATE_PLACEHOLDERS})
|
|
283
285
|
`)
|
|
284
286
|
.run(input.to, input.clearHoldReason ? 1 : 0, input.holdReason ?? null, input.inputMessageId ?? null, input.invalidateObservation ? 1 : 0, now, input.relayId, input.attemptId, ...input.from, ...types_1.OPEN_RELAY_STATES);
|
|
285
287
|
return result.changes === 1;
|
|
@@ -307,12 +309,12 @@ function appendRelayHeldCandidate(db, id, candidate, now = Date.now()) {
|
|
|
307
309
|
.prepare(`
|
|
308
310
|
SELECT held_candidates FROM session_relays
|
|
309
311
|
WHERE id = ? AND bind_mode = 'bound' AND send_state IN ('awaiting','input_started')
|
|
310
|
-
AND state IN (${
|
|
312
|
+
AND state IN (${relay_bind_db_base_1.OPEN_STATE_PLACEHOLDERS})
|
|
311
313
|
`)
|
|
312
314
|
.get(id, ...types_1.OPEN_RELAY_STATES);
|
|
313
315
|
if (!row)
|
|
314
316
|
return false;
|
|
315
|
-
const held = parseJson(row.held_candidates, []);
|
|
317
|
+
const held = (0, relay_bind_db_base_1.parseJson)(row.held_candidates, []);
|
|
316
318
|
if (held.some((item) => item.messageId === candidate.messageId))
|
|
317
319
|
return false;
|
|
318
320
|
held.push(candidate);
|
|
@@ -324,114 +326,33 @@ function appendRelayHeldCandidate(db, id, candidate, now = Date.now()) {
|
|
|
324
326
|
function clearRelayHeldCandidates(db, id) {
|
|
325
327
|
db.prepare('UPDATE session_relays SET held_candidates = NULL WHERE id = ?').run(id);
|
|
326
328
|
}
|
|
327
|
-
/**
|
|
328
|
-
|
|
329
|
-
*
|
|
330
|
-
* Only one: the first reply to finish is the one kept.
|
|
331
|
-
*/
|
|
332
|
-
function setRelayPendingReply(db, id, reply, now = Date.now()) {
|
|
333
|
-
const result = db
|
|
334
|
-
.prepare(`
|
|
335
|
-
UPDATE session_relays SET pending_reply = ?, updated_at = ?
|
|
336
|
-
WHERE id = ? AND pending_kind = 'prompt' AND pending_reply IS NULL
|
|
337
|
-
AND state IN (${exports.OPEN_STATE_PLACEHOLDERS})
|
|
338
|
-
`)
|
|
339
|
-
.run(JSON.stringify(reply), now, id, ...types_1.OPEN_RELAY_STATES);
|
|
340
|
-
return result.changes === 1;
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Replace an unclaimed prompt notice with the reply that made it moot.
|
|
344
|
-
*
|
|
345
|
-
* Conditional on the notice's own payload id, so a notice that was replaced or
|
|
346
|
-
* delivered meanwhile is not overwritten.
|
|
347
|
-
*/
|
|
348
|
-
function replaceRelayPromptWithReply(db, id, promptPayloadId, reply, now = Date.now()) {
|
|
329
|
+
/** Cancel a relay as part of the restart recovery, recording why. */
|
|
330
|
+
function failOrphanedRelayBind(db, id, attemptId, reason, now = Date.now()) {
|
|
349
331
|
const result = db
|
|
350
332
|
.prepare(`
|
|
351
333
|
UPDATE session_relays
|
|
352
|
-
SET
|
|
353
|
-
|
|
354
|
-
|
|
334
|
+
SET send_state = 'failed', state = 'cancelled', hold_reason = ?,
|
|
335
|
+
${relay_bind_db_base_1.KEEP_HELD_PAYLOAD_SET}, pending_reply = NULL,
|
|
336
|
+
updated_at = ?
|
|
337
|
+
WHERE id = ? AND bind_attempt_id = ? AND send_state = 'awaiting'
|
|
338
|
+
AND state IN (${relay_bind_db_base_1.OPEN_STATE_PLACEHOLDERS})
|
|
355
339
|
`)
|
|
356
|
-
.run(
|
|
340
|
+
.run(reason, now, id, attemptId, ...types_1.OPEN_RELAY_STATES);
|
|
357
341
|
return result.changes === 1;
|
|
358
342
|
}
|
|
359
343
|
/**
|
|
360
|
-
*
|
|
344
|
+
* A prompt notice went out: end its attempt and, in the same transaction,
|
|
345
|
+
* move a reply waiting in the second slot into the first (Issue #4082).
|
|
361
346
|
*
|
|
362
|
-
*
|
|
363
|
-
* one write, so the pump finds it and nothing finds it twice.
|
|
364
|
-
*/
|
|
365
|
-
function promoteRelayPendingReply(db, id, now = Date.now()) {
|
|
366
|
-
return db.transaction(() => {
|
|
367
|
-
const row = db
|
|
368
|
-
.prepare(`
|
|
369
|
-
SELECT pending_reply FROM session_relays
|
|
370
|
-
WHERE id = ? AND pending_kind IS NULL AND pending_reply IS NOT NULL
|
|
371
|
-
AND state IN (${exports.OPEN_STATE_PLACEHOLDERS})
|
|
372
|
-
`)
|
|
373
|
-
.get(id, ...types_1.OPEN_RELAY_STATES);
|
|
374
|
-
if (!row)
|
|
375
|
-
return false;
|
|
376
|
-
const reply = parseJson(row.pending_reply, null);
|
|
377
|
-
if (!reply) {
|
|
378
|
-
db.prepare('UPDATE session_relays SET pending_reply = NULL WHERE id = ?').run(id);
|
|
379
|
-
return false;
|
|
380
|
-
}
|
|
381
|
-
db.prepare(`
|
|
382
|
-
UPDATE session_relays
|
|
383
|
-
SET pending_kind = 'reply', pending_body = ?, payload_id = ?, overlap = ?,
|
|
384
|
-
pending_reply = NULL, updated_at = ?
|
|
385
|
-
WHERE id = ?
|
|
386
|
-
`).run(reply.body, reply.payloadId, reply.overlap, now, id);
|
|
387
|
-
return true;
|
|
388
|
-
})();
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
* A prompt notice whose delivery did not go out, while a reply waits in the
|
|
392
|
-
* second slot: the reply takes the first slot in its place (Issue #3957).
|
|
347
|
+
* A stale attempt ({@link isCurrentRelayPayloadAttempt} false) does neither.
|
|
393
348
|
*
|
|
394
|
-
*
|
|
395
|
-
* replaced meanwhile is left alone and the reply is not moved twice.
|
|
349
|
+
* @returns Whether the attempt was ended, and whether a reply was promoted
|
|
396
350
|
*/
|
|
397
|
-
function
|
|
351
|
+
function completeRelayPromptDelivery(db, ref) {
|
|
352
|
+
const now = ref.now ?? Date.now();
|
|
398
353
|
return db.transaction(() => {
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
WHERE id = ? AND pending_kind = 'prompt' AND payload_id IS ? AND pending_reply IS NOT NULL
|
|
403
|
-
AND state IN (${exports.OPEN_STATE_PLACEHOLDERS})
|
|
404
|
-
`)
|
|
405
|
-
.get(id, promptPayloadId, ...types_1.OPEN_RELAY_STATES);
|
|
406
|
-
if (!row)
|
|
407
|
-
return false;
|
|
408
|
-
const reply = parseJson(row.pending_reply, null);
|
|
409
|
-
if (!reply)
|
|
410
|
-
return false;
|
|
411
|
-
db.prepare(`
|
|
412
|
-
UPDATE session_relays
|
|
413
|
-
SET pending_kind = 'reply', pending_body = ?, payload_id = ?, overlap = ?,
|
|
414
|
-
pending_reply = NULL, updated_at = ?
|
|
415
|
-
WHERE id = ?
|
|
416
|
-
`).run(reply.body, reply.payloadId, reply.overlap, now, id);
|
|
417
|
-
return true;
|
|
354
|
+
if (!(0, relay_bind_db_delivery_1.completeRelayPayloadDelivery)(db, { ...ref, now }))
|
|
355
|
+
return { completed: false, promoted: false };
|
|
356
|
+
return { completed: true, promoted: (0, relay_bind_db_pending_1.promoteRelayPendingReply)(db, ref.relayId, now) };
|
|
418
357
|
})();
|
|
419
358
|
}
|
|
420
|
-
/** Empty the second slot (an expiry or a cancel supersedes it). */
|
|
421
|
-
function clearRelayPendingReply(db, id, now = Date.now()) {
|
|
422
|
-
db.prepare('UPDATE session_relays SET pending_reply = NULL, updated_at = ? WHERE id = ?').run(now, id);
|
|
423
|
-
}
|
|
424
|
-
/** Cancel a relay as part of the restart recovery, recording why. */
|
|
425
|
-
function failOrphanedRelayBind(db, id, attemptId, reason, now = Date.now()) {
|
|
426
|
-
const result = db
|
|
427
|
-
.prepare(`
|
|
428
|
-
UPDATE session_relays
|
|
429
|
-
SET send_state = 'failed', state = 'cancelled', hold_reason = ?,
|
|
430
|
-
pending_kind = NULL, pending_body = NULL, payload_id = NULL, pending_reply = NULL,
|
|
431
|
-
updated_at = ?
|
|
432
|
-
WHERE id = ? AND bind_attempt_id = ? AND send_state = 'awaiting'
|
|
433
|
-
AND state IN (${exports.OPEN_STATE_PLACEHOLDERS})
|
|
434
|
-
`)
|
|
435
|
-
.run(reason, now, id, attemptId, ...types_1.OPEN_RELAY_STATES);
|
|
436
|
-
return result.changes === 1;
|
|
437
|
-
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Reads of the relay ledger shared by `relay-db` and its split-out modules.
|
|
4
|
+
*
|
|
5
|
+
* Split out of `relay-db` (Issue #4096); `relay-db` re-exports every name here,
|
|
6
|
+
* so callers (and every `vi.mock`) keep importing from `@/lib/db/relay-db`.
|
|
7
|
+
* This module must not import `relay-db` (no cycle).
|
|
8
|
+
*
|
|
9
|
+
* @module lib/db/relay-db-base
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getRelayById = getRelayById;
|
|
13
|
+
const relay_bind_db_1 = require("../../lib/db/relay-bind-db");
|
|
14
|
+
/** One relay by id, or null. */
|
|
15
|
+
function getRelayById(db, id) {
|
|
16
|
+
const row = db
|
|
17
|
+
.prepare(`SELECT ${relay_bind_db_1.RELAY_COLUMNS} FROM session_relays WHERE id = ?`)
|
|
18
|
+
.get(id);
|
|
19
|
+
return row ? (0, relay_bind_db_1.mapRelay)(row) : null;
|
|
20
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Counting relays per state.
|
|
4
|
+
*
|
|
5
|
+
* Split out of `relay-db` (Issue #4096); `relay-db` re-exports every name here,
|
|
6
|
+
* so callers (and every `vi.mock`) keep importing from `@/lib/db/relay-db`.
|
|
7
|
+
* This module must not import `relay-db` (no cycle).
|
|
8
|
+
*
|
|
9
|
+
* @module lib/db/relay-db-count
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.countRelays = countRelays;
|
|
13
|
+
const types_1 = require("../../lib/relay/types");
|
|
14
|
+
/**
|
|
15
|
+
* Count relays per state.
|
|
16
|
+
*
|
|
17
|
+
* The shape `commandmate task show` and `report metrics` print. Counting in SQL
|
|
18
|
+
* rather than reading rows because a long-lived server accumulates thousands
|
|
19
|
+
* and both callers want five integers.
|
|
20
|
+
*/
|
|
21
|
+
function countRelays(db, filter = {}) {
|
|
22
|
+
const clauses = [];
|
|
23
|
+
const params = [];
|
|
24
|
+
if (filter.worktreeId) {
|
|
25
|
+
if (filter.instanceId) {
|
|
26
|
+
clauses.push('((from_worktree_id = ? AND from_instance_id = ?) OR (to_worktree_id = ? AND to_instance_id = ?))');
|
|
27
|
+
params.push(filter.worktreeId, filter.instanceId, filter.worktreeId, filter.instanceId);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
clauses.push('(from_worktree_id = ? OR to_worktree_id = ?)');
|
|
31
|
+
params.push(filter.worktreeId, filter.worktreeId);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (filter.since !== undefined) {
|
|
35
|
+
clauses.push('created_at >= ?');
|
|
36
|
+
params.push(filter.since);
|
|
37
|
+
}
|
|
38
|
+
const where = clauses.length > 0 ? `WHERE ${clauses.join(' AND ')}` : '';
|
|
39
|
+
const rows = db
|
|
40
|
+
.prepare(`SELECT state, COUNT(*) AS n FROM session_relays ${where} GROUP BY state`)
|
|
41
|
+
.all(...params);
|
|
42
|
+
const counts = (0, types_1.emptyRelayCounts)();
|
|
43
|
+
for (const row of rows) {
|
|
44
|
+
if (row.state in counts) {
|
|
45
|
+
counts[row.state] = row.n;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return counts;
|
|
49
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Closing a relay as delivered, and completing a reply's delivery (Issue #4064).
|
|
4
|
+
*
|
|
5
|
+
* Split out of `relay-db` (Issue #4096); `relay-db` re-exports every name here,
|
|
6
|
+
* so callers (and every `vi.mock`) keep importing from `@/lib/db/relay-db`.
|
|
7
|
+
* This module must not import `relay-db` (no cycle).
|
|
8
|
+
*
|
|
9
|
+
* @module lib/db/relay-db-delivery
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.markRelayDelivered = markRelayDelivered;
|
|
13
|
+
exports.completeRelayReplyDelivery = completeRelayReplyDelivery;
|
|
14
|
+
const types_1 = require("../../lib/relay/types");
|
|
15
|
+
const logger_1 = require("../../lib/logger");
|
|
16
|
+
const relay_bind_db_1 = require("../../lib/db/relay-bind-db");
|
|
17
|
+
const logger = (0, logger_1.createLogger)('relay-db');
|
|
18
|
+
/**
|
|
19
|
+
* The UPDATE behind {@link markRelayDelivered}, without its catch: a write the
|
|
20
|
+
* database refuses (the UNIQUE index included) throws. `false` means only that
|
|
21
|
+
* the relay was no longer open, or already carried a delivery id.
|
|
22
|
+
*/
|
|
23
|
+
function closeRelayDelivered(db, id, sentRequestId, now) {
|
|
24
|
+
const result = db
|
|
25
|
+
.prepare(`
|
|
26
|
+
UPDATE session_relays
|
|
27
|
+
SET state = 'delivered', sent_request_id = ?, delivered_at = ?,
|
|
28
|
+
pending_kind = NULL, pending_body = NULL, payload_id = NULL, updated_at = ?
|
|
29
|
+
WHERE id = ? AND sent_request_id IS NULL
|
|
30
|
+
AND state IN (${relay_bind_db_1.OPEN_STATE_PLACEHOLDERS})
|
|
31
|
+
`)
|
|
32
|
+
.run(sentRequestId, now, now, id, ...types_1.OPEN_RELAY_STATES);
|
|
33
|
+
return result.changes === 1;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Close the relay as delivered, exactly once.
|
|
37
|
+
*
|
|
38
|
+
* Two clauses, and they guard different things — worth separating, because a
|
|
39
|
+
* later reader who notices that the second is redundant *for one relay id* will
|
|
40
|
+
* otherwise delete the one that is not.
|
|
41
|
+
*
|
|
42
|
+
* - `state IN (open)` is what makes a SECOND call for the same relay answer
|
|
43
|
+
* false: the first call left it `delivered`, which is not an open state.
|
|
44
|
+
* - `sent_request_id IS NULL`, together with the column's UNIQUE index, is what
|
|
45
|
+
* makes the delivery id itself unrepeatable ACROSS relays and across
|
|
46
|
+
* processes. It is the idempotency key the Issue names, and it is why this
|
|
47
|
+
* function catches: the index refusing a write is the answer "somebody else
|
|
48
|
+
* got there first", and that answer must not arrive as an exception inside a
|
|
49
|
+
* delivery path.
|
|
50
|
+
*
|
|
51
|
+
* @returns Whether this call is the one that closed it
|
|
52
|
+
*/
|
|
53
|
+
function markRelayDelivered(db, id, sentRequestId, now = Date.now()) {
|
|
54
|
+
try {
|
|
55
|
+
return closeRelayDelivered(db, id, sentRequestId, now);
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
// The UNIQUE index refusing the write IS the answer "somebody else got
|
|
59
|
+
// there first", and it must not become an exception in a delivery path.
|
|
60
|
+
logger.warn('relay-deliver-conflict', {
|
|
61
|
+
relayId: id,
|
|
62
|
+
error: error instanceof Error ? error.message : String(error),
|
|
63
|
+
});
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A reply's send went out: close the relay as delivered AND end the delivery
|
|
69
|
+
* attempt, in one transaction (Issue #4064).
|
|
70
|
+
*
|
|
71
|
+
* Closing the relay empties the payload (body, kind, payload id). Committed
|
|
72
|
+
* on its own, a failure or a stop before the attempt is ended left an
|
|
73
|
+
* `attempting` row with no payload, which the next boot held as an
|
|
74
|
+
* `uncertain` delivery nobody can identify. Here either both writes land or
|
|
75
|
+
* neither does: a throw rolls the payload back with the attempt, so the row
|
|
76
|
+
* stays `attempting` with its body and payload id — held, never re-sent, and
|
|
77
|
+
* labelled by the next boot.
|
|
78
|
+
*
|
|
79
|
+
* @throws When the database refuses a write; nothing is committed then
|
|
80
|
+
*/
|
|
81
|
+
function completeRelayReplyDelivery(db, input) {
|
|
82
|
+
const now = input.now ?? Date.now();
|
|
83
|
+
return db.transaction(() => {
|
|
84
|
+
// Issue #4082: the attempt is checked FIRST. A stale one — held meanwhile,
|
|
85
|
+
// resolved, or replaced by a retry's new attempt — must not close the
|
|
86
|
+
// relay or empty its payload: the close below is keyed on the relay only.
|
|
87
|
+
if (!(0, relay_bind_db_1.isCurrentRelayPayloadAttempt)(db, input))
|
|
88
|
+
return { closed: false, completed: false };
|
|
89
|
+
// Not `markRelayDelivered`: its catch turns a refused write into `false`,
|
|
90
|
+
// and ending the attempt after that would commit an open relay with its
|
|
91
|
+
// payload and hold gone — the next completion could capture the same reply
|
|
92
|
+
// again. A refused close throws here, and nothing is committed.
|
|
93
|
+
const closed = closeRelayDelivered(db, input.relayId, input.sentRequestId, now);
|
|
94
|
+
// The attempt was checked above; the close emptied `payload_id`, so the
|
|
95
|
+
// check is not asked again here.
|
|
96
|
+
const completed = (0, relay_bind_db_1.endRelayPayloadAttempt)(db, {
|
|
97
|
+
relayId: input.relayId,
|
|
98
|
+
payloadId: input.payloadId,
|
|
99
|
+
attemptId: input.attemptId,
|
|
100
|
+
now,
|
|
101
|
+
});
|
|
102
|
+
return { closed, completed };
|
|
103
|
+
})();
|
|
104
|
+
}
|