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
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Resolving an `uncertain` delivery hold on a relay (Issue #4082).
|
|
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-hold
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.resolveRelayDeliveryHold = resolveRelayDeliveryHold;
|
|
13
|
+
const types_1 = require("../../lib/relay/types");
|
|
14
|
+
const logger_1 = require("../../lib/logger");
|
|
15
|
+
const relay_db_base_1 = require("../../lib/db/relay-db-base");
|
|
16
|
+
const logger = (0, logger_1.createLogger)('relay-db');
|
|
17
|
+
/** The second slot's reply, or null when it cannot be read. */
|
|
18
|
+
function readPendingReply(text) {
|
|
19
|
+
let parsed;
|
|
20
|
+
try {
|
|
21
|
+
parsed = JSON.parse(text);
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
if (typeof parsed !== 'object' || parsed === null)
|
|
27
|
+
return null;
|
|
28
|
+
const { body, payloadId, overlap } = parsed;
|
|
29
|
+
if (typeof body !== 'string' || typeof payloadId !== 'string')
|
|
30
|
+
return null;
|
|
31
|
+
return { body, payloadId, overlap: typeof overlap === 'string' ? overlap : null };
|
|
32
|
+
}
|
|
33
|
+
/** Thrown inside the transaction when a guarded write lost; rolls everything back. */
|
|
34
|
+
class RelayHoldConflict extends Error {
|
|
35
|
+
}
|
|
36
|
+
/** `SET` assignments that drop the delivery hold. */
|
|
37
|
+
const DROP_HOLD_SET = `
|
|
38
|
+
delivery_state = NULL, delivery_attempt_id = NULL, delivery_owner = NULL,
|
|
39
|
+
delivery_reason = NULL, delivery_at = NULL
|
|
40
|
+
`;
|
|
41
|
+
/** The guard every resolve write carries: the hold the caller named, unchanged. */
|
|
42
|
+
const HELD_GUARD = `
|
|
43
|
+
id = ? AND payload_id = ? AND delivery_attempt_id = ? AND delivery_state = 'uncertain' AND state = ?
|
|
44
|
+
`;
|
|
45
|
+
const EMPTY_SLOT_SET = `pending_kind = NULL, pending_body = NULL, payload_id = NULL, ${DROP_HOLD_SET}`;
|
|
46
|
+
function refuseHold(refusal, message) {
|
|
47
|
+
return { ok: false, refusal, message };
|
|
48
|
+
}
|
|
49
|
+
/** Read the held row and refuse it unless it is an `uncertain` hold the caller named. */
|
|
50
|
+
function readResolvableHold(db, input) {
|
|
51
|
+
const refuse = refuseHold;
|
|
52
|
+
const row = db
|
|
53
|
+
.prepare(`
|
|
54
|
+
SELECT state, expires_at, pending_kind, payload_id, pending_reply, delivery_state, delivery_attempt_id
|
|
55
|
+
FROM session_relays WHERE id = ?
|
|
56
|
+
`)
|
|
57
|
+
.get(input.relayId);
|
|
58
|
+
if (!row)
|
|
59
|
+
return refuse('not_found', `Relay '${input.relayId}' not found`);
|
|
60
|
+
if (row.delivery_state === null)
|
|
61
|
+
return refuse('no_hold', 'The relay has no delivery hold (resolved, delivered or queued)');
|
|
62
|
+
if (row.delivery_state === 'attempting') {
|
|
63
|
+
return refuse('attempting', 'The payload is being delivered right now; only that delivery settles it');
|
|
64
|
+
}
|
|
65
|
+
if (row.delivery_state !== 'uncertain')
|
|
66
|
+
return refuse('not_allowed', `Unknown delivery state '${row.delivery_state}'`);
|
|
67
|
+
if (row.delivery_attempt_id === null || row.payload_id === null || input.attemptId === null) {
|
|
68
|
+
return refuse('not_allowed', 'The hold carries no attempt id and cannot be resolved');
|
|
69
|
+
}
|
|
70
|
+
if (row.payload_id !== input.payloadId || row.delivery_attempt_id !== input.attemptId) {
|
|
71
|
+
return refuse('stale', 'The hold names another payload or attempt (read the relay again)');
|
|
72
|
+
}
|
|
73
|
+
const kind = row.pending_kind;
|
|
74
|
+
if (kind !== 'reply' && kind !== 'prompt' && kind !== 'expired') {
|
|
75
|
+
return refuse('not_allowed', 'The held slot carries no payload');
|
|
76
|
+
}
|
|
77
|
+
return { ok: true, row, kind };
|
|
78
|
+
}
|
|
79
|
+
/** `retry`: queue the held payload again (not sent here). */
|
|
80
|
+
function retryHold({ row, kind, open, now, guarded }) {
|
|
81
|
+
if (kind !== 'expired') {
|
|
82
|
+
if (!open)
|
|
83
|
+
return refuseHold('not_allowed', `Relay is already ${row.state}; a closed relay's ${kind} is not sent again`);
|
|
84
|
+
if (row.expires_at <= now)
|
|
85
|
+
return refuseHold('not_allowed', 'Relay has passed its deadline; its payload is not sent again');
|
|
86
|
+
}
|
|
87
|
+
guarded(DROP_HOLD_SET);
|
|
88
|
+
return { ok: true, requeued: true, promoted: false };
|
|
89
|
+
}
|
|
90
|
+
/** `confirm` / `discard`: empty the held slot (and close or promote as the table says). */
|
|
91
|
+
function settleHold(ctx) {
|
|
92
|
+
const { db, input, now, row, kind, open, guarded } = ctx;
|
|
93
|
+
const emptySlot = EMPTY_SLOT_SET;
|
|
94
|
+
if (kind === 'reply' && open)
|
|
95
|
+
return settleOpenReply(ctx);
|
|
96
|
+
if (kind === 'prompt' && open && row.expires_at <= now) {
|
|
97
|
+
// Issue #4082: the deadline passed and the sweep has not run yet. The
|
|
98
|
+
// relay ends here exactly as if the sweep had found the notice held:
|
|
99
|
+
// closed as `expired`, no expiry notice queued for the composer, and a
|
|
100
|
+
// waiting reply dropped explicitly (the requester is told) rather than
|
|
101
|
+
// promoted — promoting it would only have let the sweep erase it
|
|
102
|
+
// silently and queue a fresh expiry notice after the settle.
|
|
103
|
+
guarded(`state = 'expired', ${emptySlot}, pending_reply = NULL`);
|
|
104
|
+
const dropped = row.pending_reply === null ? null : readPendingReply(row.pending_reply);
|
|
105
|
+
return {
|
|
106
|
+
ok: true,
|
|
107
|
+
requeued: false,
|
|
108
|
+
promoted: false,
|
|
109
|
+
expired: true,
|
|
110
|
+
discardedReply: row.pending_reply === null ? null : { payloadId: dropped?.payloadId ?? null },
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
if (!open && row.pending_reply !== null) {
|
|
114
|
+
// Issue #4082: a closed relay delivers nothing more. The reply the
|
|
115
|
+
// expiry sweep kept behind the held notice is dropped here, with the
|
|
116
|
+
// slot, in this transaction — explicitly, so the requester is told.
|
|
117
|
+
guarded(`${emptySlot}, pending_reply = NULL`);
|
|
118
|
+
const dropped = readPendingReply(row.pending_reply);
|
|
119
|
+
return { ok: true, requeued: false, promoted: false, discardedReply: { payloadId: dropped?.payloadId ?? null } };
|
|
120
|
+
}
|
|
121
|
+
guarded(emptySlot);
|
|
122
|
+
if (kind !== 'prompt' || !open || row.pending_reply === null) {
|
|
123
|
+
return { ok: true, requeued: false, promoted: false };
|
|
124
|
+
}
|
|
125
|
+
return promotePendingReplyAfterSettle(db, input, now, row, row.pending_reply);
|
|
126
|
+
}
|
|
127
|
+
/** `confirm` closes an open relay's held reply `delivered`; `discard` closes it `cancelled`. */
|
|
128
|
+
function settleOpenReply({ input, now, guarded }) {
|
|
129
|
+
const emptySlot = EMPTY_SLOT_SET;
|
|
130
|
+
if (input.action === 'confirm') {
|
|
131
|
+
guarded(`state = 'delivered', sent_request_id = COALESCE(sent_request_id, ?), delivered_at = ?,
|
|
132
|
+
${emptySlot}, pending_reply = NULL`, input.sentRequestId, now);
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
guarded(`state = 'cancelled', ${emptySlot}, pending_reply = NULL`);
|
|
136
|
+
}
|
|
137
|
+
return { ok: true, requeued: false, promoted: false };
|
|
138
|
+
}
|
|
139
|
+
function promotePendingReplyAfterSettle(db, input, now, row, pendingReply) {
|
|
140
|
+
// The reply that finished while the notice was held takes the slot now,
|
|
141
|
+
// in this same transaction: nothing can stash in between.
|
|
142
|
+
const reply = readPendingReply(pendingReply);
|
|
143
|
+
if (!reply) {
|
|
144
|
+
// Unreadable: dropped, exactly as `promoteRelayPendingReply` drops it.
|
|
145
|
+
logger.warn('relay-hold-resolve-unreadable-pending-reply', { relayId: input.relayId });
|
|
146
|
+
db.prepare('UPDATE session_relays SET pending_reply = NULL WHERE id = ?').run(input.relayId);
|
|
147
|
+
return { ok: true, requeued: false, promoted: false };
|
|
148
|
+
}
|
|
149
|
+
const promoted = db
|
|
150
|
+
.prepare(`
|
|
151
|
+
UPDATE session_relays
|
|
152
|
+
SET pending_kind = 'reply', pending_body = ?, payload_id = ?, overlap = ?,
|
|
153
|
+
pending_reply = NULL, updated_at = ?
|
|
154
|
+
WHERE id = ? AND pending_kind IS NULL AND delivery_state IS NULL AND state = ?
|
|
155
|
+
`)
|
|
156
|
+
.run(reply.body, reply.payloadId, reply.overlap, now, input.relayId, row.state);
|
|
157
|
+
if (promoted.changes !== 1)
|
|
158
|
+
throw new RelayHoldConflict('pending reply could not be promoted');
|
|
159
|
+
return { ok: true, requeued: false, promoted: true };
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Settle an `uncertain` delivery hold, once (Issue #4082).
|
|
163
|
+
*
|
|
164
|
+
* Keyed on the relay, the payload AND the attempt the caller read, and on the
|
|
165
|
+
* hold still being `uncertain`: an operation from an older screen (the payload
|
|
166
|
+
* was retried since, and a new attempt took it), a second operation on the
|
|
167
|
+
* same hold, and a hold whose delivery is typing (`attempting`) are refused,
|
|
168
|
+
* and nothing is written. Every write — the close, the emptied slots, the
|
|
169
|
+
* promoted reply — commits in ONE transaction; a database error rolls all of
|
|
170
|
+
* it back and is thrown (the caller answers 500).
|
|
171
|
+
*
|
|
172
|
+
* | payload | relay | confirm | retry | discard |
|
|
173
|
+
* |---|---|---|---|---|
|
|
174
|
+
* | reply | open | close `delivered`, slots emptied | queued again (deadline not passed) | close `cancelled`, both slots emptied |
|
|
175
|
+
* | prompt | open | slot emptied, the waiting reply promoted | queued again (deadline not passed) | as confirm |
|
|
176
|
+
* | expired | (closed) | slot emptied | queued again | slot emptied |
|
|
177
|
+
* | reply / prompt | closed | slot emptied, state kept | refused | slot emptied, state kept |
|
|
178
|
+
*
|
|
179
|
+
* Issue #4082: a closed relay's reply waiting in the second slot (the expiry
|
|
180
|
+
* sweep keeps it while the notice in front of it is held) is dropped by the
|
|
181
|
+
* confirm / discard that empties the slot, and reported as `discardedReply`.
|
|
182
|
+
* A prompt notice on an OPEN relay whose deadline has passed (the sweep has
|
|
183
|
+
* not run yet) is settled the same way, and the relay is closed `expired`
|
|
184
|
+
* in the same write (`expired: true`) with no expiry notice queued — so
|
|
185
|
+
* resolve-then-sweep ends where sweep-then-resolve does.
|
|
186
|
+
*
|
|
187
|
+
* `prompt_signature` is kept, so the same dialog is not told again; the send
|
|
188
|
+
* binding's `send_state` / `hold_reason` / observation are not touched.
|
|
189
|
+
* Nothing here types: a retried payload goes out through the pump.
|
|
190
|
+
*/
|
|
191
|
+
function resolveRelayDeliveryHold(db, input) {
|
|
192
|
+
const now = input.now ?? Date.now();
|
|
193
|
+
const refuse = (refusal, message) => ({ ok: false, refusal, message });
|
|
194
|
+
const decide = () => {
|
|
195
|
+
const checked = readResolvableHold(db, input);
|
|
196
|
+
if (!checked.ok)
|
|
197
|
+
return checked;
|
|
198
|
+
const { row, kind } = checked;
|
|
199
|
+
const open = (0, types_1.isOpenRelayState)(row.state);
|
|
200
|
+
// A guarded write that does not take exactly one row rolls the whole
|
|
201
|
+
// transaction back; `false` is never read as success.
|
|
202
|
+
const guarded = (setClause, ...setParams) => {
|
|
203
|
+
const result = db
|
|
204
|
+
.prepare(`UPDATE session_relays SET ${setClause}, updated_at = ? WHERE ${HELD_GUARD}`)
|
|
205
|
+
.run(...setParams, now, input.relayId, input.payloadId, input.attemptId, row.state);
|
|
206
|
+
if (result.changes !== 1)
|
|
207
|
+
throw new RelayHoldConflict('hold changed underneath the resolve');
|
|
208
|
+
};
|
|
209
|
+
const ctx = { db, input, now, row, kind, open, guarded };
|
|
210
|
+
if (input.action === 'retry')
|
|
211
|
+
return retryHold(ctx);
|
|
212
|
+
return settleHold(ctx);
|
|
213
|
+
};
|
|
214
|
+
// The relay the answer carries is read INSIDE the transaction, before it
|
|
215
|
+
// commits: a read that fails after the commit would answer 500 for a hold
|
|
216
|
+
// already settled (and, for a retry, before the pump was asked to send it).
|
|
217
|
+
// Failing here rolls the settle back with it, so a 500 still means
|
|
218
|
+
// "nothing was committed".
|
|
219
|
+
const decideAndRead = () => {
|
|
220
|
+
const decided = decide();
|
|
221
|
+
const relay = (0, relay_db_base_1.getRelayById)(db, input.relayId);
|
|
222
|
+
if (decided.ok && !relay)
|
|
223
|
+
throw new Error(`Relay '${input.relayId}' vanished while its hold was resolved`);
|
|
224
|
+
return { decided, relay };
|
|
225
|
+
};
|
|
226
|
+
let settled;
|
|
227
|
+
try {
|
|
228
|
+
settled = db.transaction(decideAndRead).immediate();
|
|
229
|
+
}
|
|
230
|
+
catch (error) {
|
|
231
|
+
if (!(error instanceof RelayHoldConflict))
|
|
232
|
+
throw error;
|
|
233
|
+
// Rolled back: nothing was written, so a failing read here commits nothing either.
|
|
234
|
+
settled = {
|
|
235
|
+
decided: refuse('stale', 'The hold changed while it was being resolved (read the relay again)'),
|
|
236
|
+
relay: (0, relay_db_base_1.getRelayById)(db, input.relayId),
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
const { decided, relay } = settled;
|
|
240
|
+
if (!decided.ok)
|
|
241
|
+
return { ...decided, relay };
|
|
242
|
+
return {
|
|
243
|
+
ok: true,
|
|
244
|
+
relay: relay,
|
|
245
|
+
requeued: decided.requeued,
|
|
246
|
+
promoted: decided.promoted,
|
|
247
|
+
discardedReply: decided.discardedReply ?? null,
|
|
248
|
+
expired: decided.expired === true,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
@@ -17,40 +17,49 @@
|
|
|
17
17
|
* @module lib/db/relay-db
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.stashRelayPayload = exports.settleRelaySendState = exports.setRelayPendingReply = exports.setRelayHold = exports.reserveRelayBind = exports.replaceRelayPromptWithReply = exports.replaceRelayPromptWithPendingReply = exports.recordRelayInputBoundary = exports.promoteRelayPendingReply = exports.listRelaysWithPendingPayload = exports.listOpenBoundRelays = exports.getRelayPendingPayload = exports.getRelayBinding = exports.failOrphanedRelayBind = exports.explainRelayBindRefusal = exports.clearRelayPendingReply = exports.clearRelayPending = exports.clearRelayHeldCandidates = exports.appendRelayHeldCandidate = void 0;
|
|
20
|
+
exports.countRelays = exports.resolveRelayDeliveryHold = exports.markRelayDelivered = exports.completeRelayReplyDelivery = exports.getRelayById = exports.stashRelayPayload = exports.settleRelaySendState = exports.setRelayPendingReply = exports.setRelayHold = exports.reserveRelayBind = exports.replaceRelayPromptWithReply = exports.replaceRelayPromptWithPendingReply = exports.RELAY_DELIVERY_SERVER_RESTARTED = exports.releaseRelayPayloadDelivery = exports.recoverInterruptedRelayDeliveryRefs = exports.recoverInterruptedRelayDeliveries = exports.recordRelayInputBoundary = exports.promoteRelayPendingReply = exports.listRelaysWithPendingPayload = exports.listRelaysWithDeliveryHold = exports.listOpenBoundRelays = exports.listDeliverableRelayPayloads = exports.isCurrentRelayPayloadAttempt = exports.holdRelayPayloadDelivery = exports.getRelayPendingPayload = exports.getRelayBinding = exports.failOrphanedRelayBind = exports.explainRelayBindRefusal = exports.completeRelayPromptDelivery = exports.countHeldRelays = exports.completeRelayPayloadDelivery = exports.clearRelayPendingReplyUnlessHeld = exports.clearRelayPendingReply = exports.clearRelayPending = exports.clearRelayHeldCandidates = exports.claimRelayPayloadDelivery = exports.appendRelayHeldCandidate = void 0;
|
|
21
21
|
exports.createRelay = createRelay;
|
|
22
|
-
exports.getRelayById = getRelayById;
|
|
23
22
|
exports.listOpenRelaysTo = listOpenRelaysTo;
|
|
24
23
|
exports.listOpenRelaysFrom = listOpenRelaysFrom;
|
|
25
24
|
exports.getSessionRelaySummary = getSessionRelaySummary;
|
|
26
25
|
exports.listOpenRelaysForWorktree = listOpenRelaysForWorktree;
|
|
27
26
|
exports.countOpenRelaysBetween = countOpenRelaysBetween;
|
|
28
|
-
exports.markRelayDelivered = markRelayDelivered;
|
|
29
27
|
exports.markRelayPromptNotified = markRelayPromptNotified;
|
|
30
28
|
exports.getRelayPromptSignature = getRelayPromptSignature;
|
|
31
29
|
exports.markRelayExpired = markRelayExpired;
|
|
32
30
|
exports.listExpiredOpenRelays = listExpiredOpenRelays;
|
|
33
31
|
exports.cancelRelay = cancelRelay;
|
|
34
|
-
exports.countRelays = countRelays;
|
|
35
32
|
const crypto_1 = require("crypto");
|
|
36
33
|
const types_1 = require("../../lib/relay/types");
|
|
37
|
-
const logger_1 = require("../../lib/logger");
|
|
38
34
|
const relay_bind_db_1 = require("../../lib/db/relay-bind-db");
|
|
39
35
|
// Issue #3995: the send binding and the pending slots live in `relay-bind-db`;
|
|
40
36
|
// re-exported so every caller (and every `vi.mock`) keeps this module's surface.
|
|
41
37
|
var relay_bind_db_2 = require("../../lib/db/relay-bind-db");
|
|
42
38
|
Object.defineProperty(exports, "appendRelayHeldCandidate", { enumerable: true, get: function () { return relay_bind_db_2.appendRelayHeldCandidate; } });
|
|
39
|
+
Object.defineProperty(exports, "claimRelayPayloadDelivery", { enumerable: true, get: function () { return relay_bind_db_2.claimRelayPayloadDelivery; } });
|
|
43
40
|
Object.defineProperty(exports, "clearRelayHeldCandidates", { enumerable: true, get: function () { return relay_bind_db_2.clearRelayHeldCandidates; } });
|
|
44
41
|
Object.defineProperty(exports, "clearRelayPending", { enumerable: true, get: function () { return relay_bind_db_2.clearRelayPending; } });
|
|
45
42
|
Object.defineProperty(exports, "clearRelayPendingReply", { enumerable: true, get: function () { return relay_bind_db_2.clearRelayPendingReply; } });
|
|
43
|
+
Object.defineProperty(exports, "clearRelayPendingReplyUnlessHeld", { enumerable: true, get: function () { return relay_bind_db_2.clearRelayPendingReplyUnlessHeld; } });
|
|
44
|
+
Object.defineProperty(exports, "completeRelayPayloadDelivery", { enumerable: true, get: function () { return relay_bind_db_2.completeRelayPayloadDelivery; } });
|
|
45
|
+
Object.defineProperty(exports, "countHeldRelays", { enumerable: true, get: function () { return relay_bind_db_2.countHeldRelays; } });
|
|
46
|
+
Object.defineProperty(exports, "completeRelayPromptDelivery", { enumerable: true, get: function () { return relay_bind_db_2.completeRelayPromptDelivery; } });
|
|
46
47
|
Object.defineProperty(exports, "explainRelayBindRefusal", { enumerable: true, get: function () { return relay_bind_db_2.explainRelayBindRefusal; } });
|
|
47
48
|
Object.defineProperty(exports, "failOrphanedRelayBind", { enumerable: true, get: function () { return relay_bind_db_2.failOrphanedRelayBind; } });
|
|
48
49
|
Object.defineProperty(exports, "getRelayBinding", { enumerable: true, get: function () { return relay_bind_db_2.getRelayBinding; } });
|
|
49
50
|
Object.defineProperty(exports, "getRelayPendingPayload", { enumerable: true, get: function () { return relay_bind_db_2.getRelayPendingPayload; } });
|
|
51
|
+
Object.defineProperty(exports, "holdRelayPayloadDelivery", { enumerable: true, get: function () { return relay_bind_db_2.holdRelayPayloadDelivery; } });
|
|
52
|
+
Object.defineProperty(exports, "isCurrentRelayPayloadAttempt", { enumerable: true, get: function () { return relay_bind_db_2.isCurrentRelayPayloadAttempt; } });
|
|
53
|
+
Object.defineProperty(exports, "listDeliverableRelayPayloads", { enumerable: true, get: function () { return relay_bind_db_2.listDeliverableRelayPayloads; } });
|
|
50
54
|
Object.defineProperty(exports, "listOpenBoundRelays", { enumerable: true, get: function () { return relay_bind_db_2.listOpenBoundRelays; } });
|
|
55
|
+
Object.defineProperty(exports, "listRelaysWithDeliveryHold", { enumerable: true, get: function () { return relay_bind_db_2.listRelaysWithDeliveryHold; } });
|
|
51
56
|
Object.defineProperty(exports, "listRelaysWithPendingPayload", { enumerable: true, get: function () { return relay_bind_db_2.listRelaysWithPendingPayload; } });
|
|
52
57
|
Object.defineProperty(exports, "promoteRelayPendingReply", { enumerable: true, get: function () { return relay_bind_db_2.promoteRelayPendingReply; } });
|
|
53
58
|
Object.defineProperty(exports, "recordRelayInputBoundary", { enumerable: true, get: function () { return relay_bind_db_2.recordRelayInputBoundary; } });
|
|
59
|
+
Object.defineProperty(exports, "recoverInterruptedRelayDeliveries", { enumerable: true, get: function () { return relay_bind_db_2.recoverInterruptedRelayDeliveries; } });
|
|
60
|
+
Object.defineProperty(exports, "recoverInterruptedRelayDeliveryRefs", { enumerable: true, get: function () { return relay_bind_db_2.recoverInterruptedRelayDeliveryRefs; } });
|
|
61
|
+
Object.defineProperty(exports, "releaseRelayPayloadDelivery", { enumerable: true, get: function () { return relay_bind_db_2.releaseRelayPayloadDelivery; } });
|
|
62
|
+
Object.defineProperty(exports, "RELAY_DELIVERY_SERVER_RESTARTED", { enumerable: true, get: function () { return relay_bind_db_2.RELAY_DELIVERY_SERVER_RESTARTED; } });
|
|
54
63
|
Object.defineProperty(exports, "replaceRelayPromptWithPendingReply", { enumerable: true, get: function () { return relay_bind_db_2.replaceRelayPromptWithPendingReply; } });
|
|
55
64
|
Object.defineProperty(exports, "replaceRelayPromptWithReply", { enumerable: true, get: function () { return relay_bind_db_2.replaceRelayPromptWithReply; } });
|
|
56
65
|
Object.defineProperty(exports, "reserveRelayBind", { enumerable: true, get: function () { return relay_bind_db_2.reserveRelayBind; } });
|
|
@@ -58,7 +67,17 @@ Object.defineProperty(exports, "setRelayHold", { enumerable: true, get: function
|
|
|
58
67
|
Object.defineProperty(exports, "setRelayPendingReply", { enumerable: true, get: function () { return relay_bind_db_2.setRelayPendingReply; } });
|
|
59
68
|
Object.defineProperty(exports, "settleRelaySendState", { enumerable: true, get: function () { return relay_bind_db_2.settleRelaySendState; } });
|
|
60
69
|
Object.defineProperty(exports, "stashRelayPayload", { enumerable: true, get: function () { return relay_bind_db_2.stashRelayPayload; } });
|
|
61
|
-
|
|
70
|
+
// Issue #4096: split out of this file; re-exported so every caller (and every
|
|
71
|
+
// `vi.mock`) keeps this module's surface.
|
|
72
|
+
var relay_db_base_1 = require("../../lib/db/relay-db-base");
|
|
73
|
+
Object.defineProperty(exports, "getRelayById", { enumerable: true, get: function () { return relay_db_base_1.getRelayById; } });
|
|
74
|
+
var relay_db_delivery_1 = require("../../lib/db/relay-db-delivery");
|
|
75
|
+
Object.defineProperty(exports, "completeRelayReplyDelivery", { enumerable: true, get: function () { return relay_db_delivery_1.completeRelayReplyDelivery; } });
|
|
76
|
+
Object.defineProperty(exports, "markRelayDelivered", { enumerable: true, get: function () { return relay_db_delivery_1.markRelayDelivered; } });
|
|
77
|
+
var relay_db_hold_1 = require("../../lib/db/relay-db-hold");
|
|
78
|
+
Object.defineProperty(exports, "resolveRelayDeliveryHold", { enumerable: true, get: function () { return relay_db_hold_1.resolveRelayDeliveryHold; } });
|
|
79
|
+
var relay_db_count_1 = require("../../lib/db/relay-db-count");
|
|
80
|
+
Object.defineProperty(exports, "countRelays", { enumerable: true, get: function () { return relay_db_count_1.countRelays; } });
|
|
62
81
|
/** Insert a new `pending` relay and hand it back. */
|
|
63
82
|
function createRelay(db, input) {
|
|
64
83
|
const id = (0, crypto_1.randomUUID)();
|
|
@@ -93,15 +112,9 @@ function createRelay(db, input) {
|
|
|
93
112
|
obsState: null,
|
|
94
113
|
holdReason: null,
|
|
95
114
|
overlap: null,
|
|
115
|
+
deliveryHold: null,
|
|
96
116
|
};
|
|
97
117
|
}
|
|
98
|
-
/** One relay by id, or null. */
|
|
99
|
-
function getRelayById(db, id) {
|
|
100
|
-
const row = db
|
|
101
|
-
.prepare(`SELECT ${relay_bind_db_1.RELAY_COLUMNS} FROM session_relays WHERE id = ?`)
|
|
102
|
-
.get(id);
|
|
103
|
-
return row ? (0, relay_bind_db_1.mapRelay)(row) : null;
|
|
104
|
-
}
|
|
105
118
|
/** Every still-open relay this session must answer (it is the `to` end). */
|
|
106
119
|
function listOpenRelaysTo(db, endpoint) {
|
|
107
120
|
const rows = db
|
|
@@ -163,47 +176,6 @@ function countOpenRelaysBetween(db, from, to) {
|
|
|
163
176
|
.get(from.worktreeId, from.instanceId, to.worktreeId, to.instanceId, ...types_1.OPEN_RELAY_STATES);
|
|
164
177
|
return row.n;
|
|
165
178
|
}
|
|
166
|
-
/**
|
|
167
|
-
* Close the relay as delivered, exactly once.
|
|
168
|
-
*
|
|
169
|
-
* Two clauses, and they guard different things — worth separating, because a
|
|
170
|
-
* later reader who notices that the second is redundant *for one relay id* will
|
|
171
|
-
* otherwise delete the one that is not.
|
|
172
|
-
*
|
|
173
|
-
* - `state IN (open)` is what makes a SECOND call for the same relay answer
|
|
174
|
-
* false: the first call left it `delivered`, which is not an open state.
|
|
175
|
-
* - `sent_request_id IS NULL`, together with the column's UNIQUE index, is what
|
|
176
|
-
* makes the delivery id itself unrepeatable ACROSS relays and across
|
|
177
|
-
* processes. It is the idempotency key the Issue names, and it is why this
|
|
178
|
-
* function catches: the index refusing a write is the answer "somebody else
|
|
179
|
-
* got there first", and that answer must not arrive as an exception inside a
|
|
180
|
-
* delivery path.
|
|
181
|
-
*
|
|
182
|
-
* @returns Whether this call is the one that closed it
|
|
183
|
-
*/
|
|
184
|
-
function markRelayDelivered(db, id, sentRequestId, now = Date.now()) {
|
|
185
|
-
try {
|
|
186
|
-
const result = db
|
|
187
|
-
.prepare(`
|
|
188
|
-
UPDATE session_relays
|
|
189
|
-
SET state = 'delivered', sent_request_id = ?, delivered_at = ?,
|
|
190
|
-
pending_kind = NULL, pending_body = NULL, payload_id = NULL, updated_at = ?
|
|
191
|
-
WHERE id = ? AND sent_request_id IS NULL
|
|
192
|
-
AND state IN (${relay_bind_db_1.OPEN_STATE_PLACEHOLDERS})
|
|
193
|
-
`)
|
|
194
|
-
.run(sentRequestId, now, now, id, ...types_1.OPEN_RELAY_STATES);
|
|
195
|
-
return result.changes === 1;
|
|
196
|
-
}
|
|
197
|
-
catch (error) {
|
|
198
|
-
// The UNIQUE index refusing the write IS the answer "somebody else got
|
|
199
|
-
// there first", and it must not become an exception in a delivery path.
|
|
200
|
-
logger.warn('relay-deliver-conflict', {
|
|
201
|
-
relayId: id,
|
|
202
|
-
error: error instanceof Error ? error.message : String(error),
|
|
203
|
-
});
|
|
204
|
-
return false;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
179
|
/**
|
|
208
180
|
* Note that A is being told B is waiting on a confirmation.
|
|
209
181
|
*
|
|
@@ -256,51 +228,20 @@ function listExpiredOpenRelays(db, now = Date.now()) {
|
|
|
256
228
|
.all(...types_1.OPEN_RELAY_STATES, now);
|
|
257
229
|
return rows.map(relay_bind_db_1.mapRelay);
|
|
258
230
|
}
|
|
259
|
-
/**
|
|
231
|
+
/**
|
|
232
|
+
* Withdraw a relay. Returns false when it was already closed or absent.
|
|
233
|
+
*
|
|
234
|
+
* Issue #4064: stops later deliveries only. A payload under a delivery hold
|
|
235
|
+
* (it may already be in A's composer) keeps its body, id and reason.
|
|
236
|
+
*/
|
|
260
237
|
function cancelRelay(db, id, now = Date.now()) {
|
|
261
238
|
const result = db
|
|
262
239
|
.prepare(`
|
|
263
240
|
UPDATE session_relays
|
|
264
|
-
SET state = 'cancelled',
|
|
241
|
+
SET state = 'cancelled', ${relay_bind_db_1.KEEP_HELD_PAYLOAD_SET},
|
|
265
242
|
pending_reply = NULL, updated_at = ?
|
|
266
243
|
WHERE id = ? AND state IN (${relay_bind_db_1.OPEN_STATE_PLACEHOLDERS})
|
|
267
244
|
`)
|
|
268
245
|
.run(now, id, ...types_1.OPEN_RELAY_STATES);
|
|
269
246
|
return result.changes === 1;
|
|
270
247
|
}
|
|
271
|
-
/**
|
|
272
|
-
* Count relays per state.
|
|
273
|
-
*
|
|
274
|
-
* The shape `commandmate task show` and `report metrics` print. Counting in SQL
|
|
275
|
-
* rather than reading rows because a long-lived server accumulates thousands
|
|
276
|
-
* and both callers want five integers.
|
|
277
|
-
*/
|
|
278
|
-
function countRelays(db, filter = {}) {
|
|
279
|
-
const clauses = [];
|
|
280
|
-
const params = [];
|
|
281
|
-
if (filter.worktreeId) {
|
|
282
|
-
if (filter.instanceId) {
|
|
283
|
-
clauses.push('((from_worktree_id = ? AND from_instance_id = ?) OR (to_worktree_id = ? AND to_instance_id = ?))');
|
|
284
|
-
params.push(filter.worktreeId, filter.instanceId, filter.worktreeId, filter.instanceId);
|
|
285
|
-
}
|
|
286
|
-
else {
|
|
287
|
-
clauses.push('(from_worktree_id = ? OR to_worktree_id = ?)');
|
|
288
|
-
params.push(filter.worktreeId, filter.worktreeId);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
if (filter.since !== undefined) {
|
|
292
|
-
clauses.push('created_at >= ?');
|
|
293
|
-
params.push(filter.since);
|
|
294
|
-
}
|
|
295
|
-
const where = clauses.length > 0 ? `WHERE ${clauses.join(' AND ')}` : '';
|
|
296
|
-
const rows = db
|
|
297
|
-
.prepare(`SELECT state, COUNT(*) AS n FROM session_relays ${where} GROUP BY state`)
|
|
298
|
-
.all(...params);
|
|
299
|
-
const counts = (0, types_1.emptyRelayCounts)();
|
|
300
|
-
for (const row of rows) {
|
|
301
|
-
if (row.state in counts) {
|
|
302
|
-
counts[row.state] = row.n;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
return counts;
|
|
306
|
-
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The text an opencode input box holds, cut out of the rows it shares with the
|
|
4
|
+
* sidebar (Issue #4067).
|
|
5
|
+
*
|
|
6
|
+
* opencode (v1, and v2 2.0.x — same box: `┃` gutter rows over a `╹▀…▀` bottom
|
|
7
|
+
* border) draws its sidebar (#2047/#2095) on the same rows as the input box,
|
|
8
|
+
* right of the box's bottom border: measured in `opencode-live-2047/w200/`
|
|
9
|
+
* (border to column 156, sidebar from 160), `opencode-live-2046/w80/sidebar-on.txt`
|
|
10
|
+
* and `opencode-v2-usage-2981/pane-turn1-2.0.18.txt`. A row's own text is what
|
|
11
|
+
* lies left of that border's end, its gutter removed.
|
|
12
|
+
*
|
|
13
|
+
* Before #4067 there were two readings of the same rows: the send readiness
|
|
14
|
+
* (#4040) cut at the right edge, and the submit read-back
|
|
15
|
+
* (`submit-composer-read`'s `opencode-box`) read the whole row — so an empty box
|
|
16
|
+
* beside the sidebar was ready to the one and held `/private/…` (the sidebar's
|
|
17
|
+
* working directory) to the other, which then classified a delivered message
|
|
18
|
+
* `replaced`. Both now read through this module.
|
|
19
|
+
*
|
|
20
|
+
* Text inside the box is the buffer however far it is indented (`┃ old` is
|
|
21
|
+
* not empty).
|
|
22
|
+
*
|
|
23
|
+
* @module lib/detection/tools/opencode/composer-own-text
|
|
24
|
+
*/
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.opencodeBoxRightEdge = opencodeBoxRightEdge;
|
|
27
|
+
exports.opencodeBoxObscured = opencodeBoxObscured;
|
|
28
|
+
exports.opencodeOwnText = opencodeOwnText;
|
|
29
|
+
exports.readOpenCodeComposerOwnRows = readOpenCodeComposerOwnRows;
|
|
30
|
+
exports.readOpenCodeComposerBox = readOpenCodeComposerBox;
|
|
31
|
+
const terminal_columns_1 = require("../../terminal-columns");
|
|
32
|
+
const patterns_1 = require("./patterns");
|
|
33
|
+
/** The input box's bottom border row (`╹▀…▀`), the newest one on the pane, or `null`. */
|
|
34
|
+
function bottomBorderRow(lines) {
|
|
35
|
+
for (let i = lines.length - 1; i >= 0; i--) {
|
|
36
|
+
if (patterns_1.OPENCODE_COMPOSER_BOTTOM_BORDER.test(lines[i]))
|
|
37
|
+
return lines[i];
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The column just right of the input box: the end of its bottom border
|
|
43
|
+
* (`╹▀…▀`), the newest one on the pane. `null` when there is none.
|
|
44
|
+
*
|
|
45
|
+
* The end of the border's FIRST run: on a border an overlay cuts in two
|
|
46
|
+
* ({@link opencodeBoxObscured}) that is where the overlay starts, not the box's
|
|
47
|
+
* right edge.
|
|
48
|
+
*
|
|
49
|
+
* @param lines - Captured pane lines, ANSI-stripped, box drawing intact
|
|
50
|
+
*/
|
|
51
|
+
function opencodeBoxRightEdge(lines) {
|
|
52
|
+
const row = bottomBorderRow(lines);
|
|
53
|
+
if (row === null)
|
|
54
|
+
return null;
|
|
55
|
+
const border = /╹▀+/.exec(row);
|
|
56
|
+
return border ? border.index + border[0].length : null;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Whether something is drawn over the input box: its bottom border is cut in
|
|
60
|
+
* two — `╹▀▀▀▀▀▀`, blanks, then `▀▀▀▀▀▀▀▀` further right (review of #4067).
|
|
61
|
+
* A palette or picker (`opencode-live-2049/command-palette-11822.txt`,
|
|
62
|
+
* `opencode-live-1896/command-palette.txt`, `canary/opencode-picker.raw.txt`)
|
|
63
|
+
* paints over the box's rows from that cut on, so what the box holds there
|
|
64
|
+
* cannot be read: neither an empty box nor the absence of one. No capture with
|
|
65
|
+
* a whole box has a `▀` right of its border's first run (the sidebar's rows
|
|
66
|
+
* included: every `.txt` capture under `tests/` was checked).
|
|
67
|
+
*
|
|
68
|
+
* @param lines - Captured pane lines, ANSI-stripped, box drawing intact
|
|
69
|
+
*/
|
|
70
|
+
function opencodeBoxObscured(lines) {
|
|
71
|
+
const row = bottomBorderRow(lines);
|
|
72
|
+
if (row === null)
|
|
73
|
+
return false;
|
|
74
|
+
const border = /╹▀+/.exec(row);
|
|
75
|
+
return border !== null && row.includes('▀', border.index + border[0].length);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The row's own text: inside the box (left of `rightEdge`), gutter removed.
|
|
79
|
+
* With no right edge (no border found) the whole row is read, as before #4067.
|
|
80
|
+
*
|
|
81
|
+
* @param row - One composer row, gutter intact
|
|
82
|
+
* @param rightEdge - {@link opencodeBoxRightEdge} of the same frame
|
|
83
|
+
*/
|
|
84
|
+
function opencodeOwnText(row, rightEdge) {
|
|
85
|
+
const inside = rightEdge === null ? row : row.slice(0, (0, terminal_columns_1.indexAtColumn)(row, rightEdge));
|
|
86
|
+
return (0, patterns_1.stripOpenCodeGutter)(inside);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The input box's buffer rows as their own text (gutter and sidebar removed),
|
|
90
|
+
* or `null` when no box is on screen ({@link findOpenCodeComposerRows}).
|
|
91
|
+
*
|
|
92
|
+
* @param lines - Captured pane lines of the WHOLE pane, ANSI-stripped
|
|
93
|
+
*/
|
|
94
|
+
function readOpenCodeComposerOwnRows(lines) {
|
|
95
|
+
const rows = (0, patterns_1.findOpenCodeComposerRows)(lines);
|
|
96
|
+
if (rows === null)
|
|
97
|
+
return null;
|
|
98
|
+
const rightEdge = opencodeBoxRightEdge(lines);
|
|
99
|
+
return rows.map((row) => opencodeOwnText(row, rightEdge));
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The input box as the submit read-back reads it: its rows' own text, and
|
|
103
|
+
* whether an overlay hides part of it. `null` when no box is on screen.
|
|
104
|
+
*
|
|
105
|
+
* @param lines - Captured pane lines of the WHOLE pane, ANSI-stripped
|
|
106
|
+
*/
|
|
107
|
+
function readOpenCodeComposerBox(lines) {
|
|
108
|
+
const rows = (0, patterns_1.findOpenCodeComposerRows)(lines);
|
|
109
|
+
if (rows === null)
|
|
110
|
+
return null;
|
|
111
|
+
if (!opencodeBoxObscured(lines)) {
|
|
112
|
+
const rightEdge = opencodeBoxRightEdge(lines);
|
|
113
|
+
return { rows: rows.map((row) => opencodeOwnText(row, rightEdge)), obscured: false };
|
|
114
|
+
}
|
|
115
|
+
const border = bottomBorderRow(lines);
|
|
116
|
+
// A column, like the right edge: the overlay's text on the border row may be wide.
|
|
117
|
+
const farEdge = (0, terminal_columns_1.visibleWidth)(border.slice(0, border.lastIndexOf('▀') + 1));
|
|
118
|
+
return { rows: rows.map((row) => opencodeOwnText(row, farEdge)), obscured: true };
|
|
119
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Whether an opencode (v1) pane is ready to take a typed message body
|
|
4
|
+
* (Issue #4040).
|
|
5
|
+
*
|
|
6
|
+
* The launch wait (`OpenCodeTool.waitForReady`) is not this test: it accepts
|
|
7
|
+
* the `Connect a provider` overlay so a launch does not burn its window there,
|
|
8
|
+
* and `OPENCODE_IDLE_COMPOSER_PATTERN` only anchors the placeholder's start —
|
|
9
|
+
* it does not say the rest of the input box is empty, and opencode stops
|
|
10
|
+
* painting the placeholder once a session has answered a turn (every
|
|
11
|
+
* post-turn frame in `tests/fixtures/opencode-live-2047/w80/` has an input box
|
|
12
|
+
* of blank gutter rows and no `Ask anything`).
|
|
13
|
+
*
|
|
14
|
+
* Ready means, on the WHOLE frame (the box is centred under the banner until
|
|
15
|
+
* the first turn, ~100 rows above the bottom):
|
|
16
|
+
*
|
|
17
|
+
* - no dialog or overlay — the detector's `waiting` (permission strip, picker,
|
|
18
|
+
* palette, `Connect a provider`) and the picker header itself;
|
|
19
|
+
* - the input box is on screen (`findOpenCodeComposerRows`: its bottom border
|
|
20
|
+
* and gutter);
|
|
21
|
+
* - every buffer row of it is empty: blank, or the placeholder (optionally with
|
|
22
|
+
* its quoted suggestion) and nothing else. A row holding any other text —
|
|
23
|
+
* a previous body, a typed character — is not ready.
|
|
24
|
+
*
|
|
25
|
+
* A turn being generated keeps the empty box on screen (`turn-running.txt`),
|
|
26
|
+
* so it is ready by the same rule; no generation exception is needed.
|
|
27
|
+
*
|
|
28
|
+
* Text right of the box is not read as the row's own: the sidebar
|
|
29
|
+
* (#2047/#2095) shares rows with the input box, beyond the right end of the
|
|
30
|
+
* box's bottom border (`╹▀…▀`, measured in `opencode-live-2047/w200/`: border
|
|
31
|
+
* to column 156, sidebar from 160). Text inside the box is the buffer however
|
|
32
|
+
* far it is indented (`┃ old` is not empty), as `submit-composer-read`'s
|
|
33
|
+
* `opencode-box` reader reads it — both through `composer-own-text` (#4067).
|
|
34
|
+
*
|
|
35
|
+
* @module lib/detection/tools/opencode/readiness
|
|
36
|
+
*/
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.isOpenCodeComposerReady = isOpenCodeComposerReady;
|
|
39
|
+
const ansi_1 = require("../../ansi");
|
|
40
|
+
const status_detector_1 = require("../../status-detector");
|
|
41
|
+
const patterns_1 = require("./patterns");
|
|
42
|
+
const composer_own_text_1 = require("./composer-own-text");
|
|
43
|
+
/** The placeholder opencode paints in an empty buffer, with its quoted suggestion. */
|
|
44
|
+
const PLACEHOLDER = /^Ask anything(?:\.\.\.|…)(?:[^\S\n]+"[^"\n]*")?$/;
|
|
45
|
+
/**
|
|
46
|
+
* @param output - Raw `capture-pane` output of the whole pane (ANSI allowed)
|
|
47
|
+
* @returns true when the input box is on screen, empty, and nothing covers it
|
|
48
|
+
*/
|
|
49
|
+
function isOpenCodeComposerReady(output) {
|
|
50
|
+
const text = (0, ansi_1.stripAnsi)(output);
|
|
51
|
+
if (patterns_1.OPENCODE_SELECTION_LIST_PATTERN.test(text))
|
|
52
|
+
return false;
|
|
53
|
+
const status = (0, status_detector_1.detectSessionStatus)(output, 'opencode');
|
|
54
|
+
if (status.hasActivePrompt || status.status === 'waiting')
|
|
55
|
+
return false;
|
|
56
|
+
// Each row's own text, cut at the box's right edge (Issue #4067: the same
|
|
57
|
+
// cut the submit read-back uses — `composer-own-text`).
|
|
58
|
+
const rows = (0, composer_own_text_1.readOpenCodeComposerOwnRows)(text.split('\n'));
|
|
59
|
+
if (rows === null || rows.length === 0)
|
|
60
|
+
return false;
|
|
61
|
+
return rows.every((own) => own === '' || PLACEHOLDER.test(own));
|
|
62
|
+
}
|