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
|
@@ -46,7 +46,9 @@ exports.notifyRelayTurnCompleted = notifyRelayTurnCompleted;
|
|
|
46
46
|
exports.notifyRelayPromptWaiting = notifyRelayPromptWaiting;
|
|
47
47
|
exports.sweepExpiredRelays = sweepExpiredRelays;
|
|
48
48
|
exports.pumpRelayDeliveries = pumpRelayDeliveries;
|
|
49
|
+
exports.requestRelayPump = requestRelayPump;
|
|
49
50
|
exports.runRelayMaintenanceTick = runRelayMaintenanceTick;
|
|
51
|
+
const crypto_1 = require("crypto");
|
|
50
52
|
const db_instance_1 = require("../../lib/db/db-instance");
|
|
51
53
|
const relay_db_1 = require("../../lib/db/relay-db");
|
|
52
54
|
const chat_db_1 = require("../../lib/db/chat-db");
|
|
@@ -96,6 +98,7 @@ function resetRelayDeliveryState() {
|
|
|
96
98
|
(0, relay_delivery_claims_1.resetRelayDeliveryClaims)();
|
|
97
99
|
globalThis.__relayPumpRunning = false;
|
|
98
100
|
globalThis.__relayRecoveredBootId = undefined;
|
|
101
|
+
globalThis.__relayAttemptsRecoveredBootId = undefined;
|
|
99
102
|
}
|
|
100
103
|
/**
|
|
101
104
|
* The bound send was confirmed: judge what was held for it (Issue #3957).
|
|
@@ -150,9 +153,38 @@ function evaluateRelayAfterSend(relayId) {
|
|
|
150
153
|
});
|
|
151
154
|
}
|
|
152
155
|
}
|
|
153
|
-
/**
|
|
156
|
+
/**
|
|
157
|
+
* {@link recoverBoundRelays}, once per boot; and the delivery attempts the
|
|
158
|
+
* previous boot left `attempting` are held as `uncertain` (Issue #4064).
|
|
159
|
+
*
|
|
160
|
+
* The second step is marked done only once it succeeded, and is safe to run
|
|
161
|
+
* again (it never touches this boot's own attempts). Until it has run, the
|
|
162
|
+
* rows it would hold are not listed for delivery anyway — `attempting` is
|
|
163
|
+
* already a hold — so a failure here costs a label, never a second send.
|
|
164
|
+
*/
|
|
154
165
|
function ensureRelayRecovery(db) {
|
|
155
166
|
const boot = (0, relay_boot_1.relayServerBootId)();
|
|
167
|
+
if (globalThis.__relayAttemptsRecoveredBootId !== boot) {
|
|
168
|
+
try {
|
|
169
|
+
const held = (0, relay_db_1.recoverInterruptedRelayDeliveryRefs)(db, boot);
|
|
170
|
+
globalThis.__relayAttemptsRecoveredBootId = boot;
|
|
171
|
+
if (held.length > 0)
|
|
172
|
+
logger.info('relay-interrupted-deliveries-held', { held: held.length });
|
|
173
|
+
// Issue #4082: each attempt this recovery moved to `uncertain` — and
|
|
174
|
+
// only those — is told to its requester, once.
|
|
175
|
+
for (const ref of held) {
|
|
176
|
+
const relay = (0, relay_db_1.getRelayById)(db, ref.relayId);
|
|
177
|
+
if (!relay)
|
|
178
|
+
continue;
|
|
179
|
+
noteRelayHeld(db, relay, (0, relay_session_ref_1.resolveRelaySession)(db, relay.from), ref, relay.deliveryHold?.kind ?? null, relay_db_1.RELAY_DELIVERY_SERVER_RESTARTED);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
catch (error) {
|
|
183
|
+
logger.warn('relay-delivery-recovery-failed', {
|
|
184
|
+
error: error instanceof Error ? error.message : String(error),
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
156
188
|
if (globalThis.__relayRecoveredBootId === boot)
|
|
157
189
|
return;
|
|
158
190
|
globalThis.__relayRecoveredBootId = boot;
|
|
@@ -325,9 +357,15 @@ function sweepExpiredRelays(db, now = Date.now()) {
|
|
|
325
357
|
const locale = (0, model_change_push_notifier_1.resolveReadersLocale)(db);
|
|
326
358
|
// A payload that never went out is superseded by the expiry notice: A
|
|
327
359
|
// asked for an answer, and what they are getting is the news that there
|
|
328
|
-
// will not be one. Both slots (Issue #3957).
|
|
360
|
+
// will not be one. Both slots (Issue #3957). Issue #4064: not a payload
|
|
361
|
+
// under a delivery hold — it may have reached A, so it stays readable
|
|
362
|
+
// (`clearRelayPending` refuses it), the expiry notice then finds the
|
|
363
|
+
// slot taken and is not queued, and the relay is closed all the same.
|
|
329
364
|
(0, relay_db_1.clearRelayPending)(db, relay.id, now);
|
|
330
|
-
|
|
365
|
+
// Issue #4082: a reply waiting behind a HELD payload is kept: settling
|
|
366
|
+
// the hold decides it (on a closed relay, it is then discarded and the
|
|
367
|
+
// requester told). Without a hold it is superseded, as before.
|
|
368
|
+
(0, relay_db_1.clearRelayPendingReplyUnlessHeld)(db, relay.id, now);
|
|
331
369
|
const body = (0, relay_messages_1.buildRelayExpiredMessage)(locale, (0, relay_bound_reply_1.senderLabel)(db, relay), relay.expiresAt - relay.createdAt);
|
|
332
370
|
const stashed = (0, relay_db_1.stashRelayPayload)(db, relay.id, 'expired', body, now);
|
|
333
371
|
if (!(0, relay_db_1.markRelayExpired)(db, relay.id, now)) {
|
|
@@ -347,26 +385,48 @@ function sweepExpiredRelays(db, now = Date.now()) {
|
|
|
347
385
|
}
|
|
348
386
|
return expired;
|
|
349
387
|
}
|
|
388
|
+
/** The hold reason of a send that threw: what it last reported, if anything. */
|
|
389
|
+
function reasonForThrow(attempt) {
|
|
390
|
+
if (attempt === null)
|
|
391
|
+
return 'send-threw';
|
|
392
|
+
return attempt.state === 'sent' ? 'threw-after-sent' : attempt.reason;
|
|
393
|
+
}
|
|
350
394
|
/**
|
|
351
395
|
* Try to put one stashed payload into A's composer.
|
|
352
396
|
*
|
|
353
|
-
* The order — readiness, then send, then ledger — is deliberate.
|
|
354
|
-
* would lose the answer whenever the send failed, and
|
|
355
|
-
* refusals in it (`prompt_waiting`, a session that went
|
|
356
|
-
*
|
|
357
|
-
* `markRelayDelivered`'s guarded update across one, which is the idempotency the
|
|
358
|
-
* Issue asks for by name.
|
|
397
|
+
* The order — readiness, then claim, then send, then ledger — is deliberate.
|
|
398
|
+
* Marking delivered first would lose the answer whenever the send failed, and
|
|
399
|
+
* the send path has real refusals in it (`prompt_waiting`, a session that went
|
|
400
|
+
* away mid-attempt).
|
|
359
401
|
*
|
|
360
|
-
*
|
|
361
|
-
*
|
|
362
|
-
*
|
|
363
|
-
*
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
*
|
|
402
|
+
* Issue #4064: the payload is taken DURABLY before the send
|
|
403
|
+
* ({@link claimRelayPayloadDelivery}: `attempting`, under a fresh attempt id),
|
|
404
|
+
* and only the caller whose write took it sends. How the send ended decides
|
|
405
|
+
* what happens to it, read from the send's OWN attempt (`onAttempt`, not the
|
|
406
|
+
* instance's shared `lastSend`):
|
|
407
|
+
*
|
|
408
|
+
* - delivered → the slot is emptied (under the attempt id);
|
|
409
|
+
* - `prompt_waiting`, or `not-sent` → queued again, retried by the next pump;
|
|
410
|
+
* - anything else — `indeterminate` (`composer-residue` included), a throw
|
|
411
|
+
* after `sent`, a throw before any state — → held as `uncertain` with the
|
|
412
|
+
* reason. It is not listed again, it is not replaced, and the relay's later
|
|
413
|
+
* payloads (the second slot's reply too) wait behind it.
|
|
414
|
+
*
|
|
415
|
+
* A server that stops anywhere in between leaves `attempting`, which is a hold
|
|
416
|
+
* too, and the next boot labels it `uncertain`. The in-flight set and the
|
|
417
|
+
* in-process claim stay — they are what `withdrawRelay` and the expiry sweep
|
|
418
|
+
* read — but they are no longer what prevents a second send.
|
|
419
|
+
*
|
|
420
|
+
* `kind`, `body` and `payloadId` are what the pump's listing saw, and that
|
|
421
|
+
* listing is stale by the time the readiness check returns (#3732): an earlier
|
|
422
|
+
* relay's send, or this one's own capture, may have let a cancel or an expiry
|
|
423
|
+
* sweep run. So the row is read again AFTER the last await before the send,
|
|
424
|
+
* and the send goes ahead only when it still carries the same payload — and,
|
|
425
|
+
* for anything but an expiry notice, is still open. The claims are taken in
|
|
426
|
+
* that same synchronous stretch, so no cancel can slip in between the check
|
|
427
|
+
* and the send; from then on `withdrawRelay` answers `delivering`.
|
|
368
428
|
*/
|
|
369
|
-
async function deliverOne(db, relayId, kind, body) {
|
|
429
|
+
async function deliverOne(db, relayId, kind, body, listedPayloadId) {
|
|
370
430
|
const listed = (0, relay_db_1.getRelayById)(db, relayId);
|
|
371
431
|
if (!listed)
|
|
372
432
|
return 'skipped';
|
|
@@ -377,87 +437,294 @@ async function deliverOne(db, relayId, kind, body) {
|
|
|
377
437
|
return 'held';
|
|
378
438
|
}
|
|
379
439
|
// Synchronous from here to the send: re-read, then claim.
|
|
380
|
-
const current = (
|
|
381
|
-
if (!current
|
|
382
|
-
logger.info('relay-delivery-superseded', { relayId, kind });
|
|
440
|
+
const current = rereadDeliverablePayload(db, relayId, kind, body, listedPayloadId);
|
|
441
|
+
if (!current)
|
|
383
442
|
return 'skipped';
|
|
443
|
+
const relay = current.relay;
|
|
444
|
+
const requester = (0, relay_session_ref_1.resolveRelaySession)(db, relay.from);
|
|
445
|
+
// Issue #4064: take the payload in the ledger before the first key. A write
|
|
446
|
+
// that fails or finds the payload taken means no send.
|
|
447
|
+
const attemptId = (0, crypto_1.randomUUID)();
|
|
448
|
+
let payloadId;
|
|
449
|
+
try {
|
|
450
|
+
payloadId = (0, relay_db_1.claimRelayPayloadDelivery)(db, {
|
|
451
|
+
relayId,
|
|
452
|
+
payloadId: current.payloadId,
|
|
453
|
+
kind,
|
|
454
|
+
body,
|
|
455
|
+
attemptId,
|
|
456
|
+
owner: (0, relay_boot_1.relayServerBootId)(),
|
|
457
|
+
mintPayloadId: (0, crypto_1.randomUUID)(),
|
|
458
|
+
});
|
|
384
459
|
}
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
460
|
+
catch (error) {
|
|
461
|
+
logger.warn('relay-delivery-claim-failed', {
|
|
462
|
+
relayId,
|
|
463
|
+
kind,
|
|
464
|
+
error: error instanceof Error ? error.message : String(error),
|
|
465
|
+
});
|
|
466
|
+
return 'failed';
|
|
467
|
+
}
|
|
468
|
+
if (payloadId === null) {
|
|
469
|
+
logger.info('relay-delivery-taken', { relayId, kind });
|
|
389
470
|
return 'skipped';
|
|
390
471
|
}
|
|
391
|
-
const
|
|
392
|
-
const requester = (0, relay_session_ref_1.resolveRelaySession)(db, relay.from);
|
|
472
|
+
const ref = { relayId, payloadId, attemptId };
|
|
393
473
|
(0, relay_delivery_claims_1.claimRelayDelivery)(relayId);
|
|
394
|
-
let
|
|
474
|
+
let requeued = false;
|
|
395
475
|
try {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
476
|
+
let attempt = null;
|
|
477
|
+
let result;
|
|
478
|
+
try {
|
|
479
|
+
result = await (0, send_user_message_1.sendUserMessage)(db, {
|
|
480
|
+
worktreeId: requester.worktreeId,
|
|
481
|
+
content: body,
|
|
482
|
+
cliToolId: requester.cliToolId,
|
|
483
|
+
instanceId: requester.instanceId,
|
|
484
|
+
messageType: 'relay',
|
|
485
|
+
// The pointer back at the ledger. Also `session_relays.sent_request_id` for
|
|
486
|
+
// a reply, which carries a UNIQUE index — so a second delivery of the same
|
|
487
|
+
// relay cannot be recorded even if one were somehow attempted.
|
|
488
|
+
requestId: kind === 'reply' ? (0, chat_db_1.relayRequestId)(relay.id) : undefined,
|
|
489
|
+
// Issue #4064: this send's own outcome, not the instance's last one.
|
|
490
|
+
onAttempt: (observed) => {
|
|
491
|
+
attempt = observed;
|
|
492
|
+
},
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
catch (error) {
|
|
496
|
+
const reason = reasonForThrow(attempt);
|
|
497
|
+
logger.warn('relay-delivery-uncertain', {
|
|
498
|
+
relayId,
|
|
499
|
+
kind,
|
|
500
|
+
reason,
|
|
501
|
+
error: error instanceof Error ? error.message : String(error),
|
|
502
|
+
});
|
|
503
|
+
if (holdUncertain(db, ref, reason))
|
|
504
|
+
noteRelayHeld(db, relay, requester, ref, kind, reason);
|
|
505
|
+
return 'uncertain';
|
|
506
|
+
}
|
|
407
507
|
if (!result.ok) {
|
|
408
|
-
|
|
409
|
-
|
|
508
|
+
const settled = settleUnsentResult(db, ref, relay, requester, kind, result.stage, attempt);
|
|
509
|
+
requeued = settled.requeued;
|
|
510
|
+
return settled.outcome;
|
|
410
511
|
}
|
|
411
512
|
const now = Date.now();
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
logger.info('relay-already-closed-on-deliver', { relayId });
|
|
417
|
-
}
|
|
418
|
-
(0, relay_system_line_1.writeRelaySystemLine)(db, relay.id, 'replied', requester, (0, relay_session_ref_1.resolveRelaySession)(db, relay.to), now, { overlap: relay.overlap, holdReason: relay.holdReason });
|
|
419
|
-
}
|
|
420
|
-
else if (kind === 'prompt') {
|
|
421
|
-
(0, relay_system_line_1.writeRelaySystemLine)(db, relay.id, 'waiting', requester, (0, relay_session_ref_1.resolveRelaySession)(db, relay.to), now);
|
|
513
|
+
const { completed, promoted } = recordDeliveryCompletion(db, ref, relay, kind, now);
|
|
514
|
+
if (!completed) {
|
|
515
|
+
logger.warn('relay-delivery-result-stale', { relayId, kind, attemptId });
|
|
516
|
+
return 'skipped';
|
|
422
517
|
}
|
|
423
|
-
|
|
424
|
-
// or waits in the second slot survives, and the second slot is promoted
|
|
425
|
-
// now that the notice is out.
|
|
426
|
-
(0, relay_db_1.clearRelayPending)(db, relay.id, now, current.payloadId);
|
|
427
|
-
if (kind === 'prompt' && (0, relay_db_1.promoteRelayPendingReply)(db, relay.id, now)) {
|
|
518
|
+
if (promoted)
|
|
428
519
|
globalThis.__relayPumpAgain = true;
|
|
429
|
-
|
|
520
|
+
writeDeliveredSystemLine(db, relay, requester, kind, now);
|
|
430
521
|
logger.info('relay-delivered', { relayId, kind, to: `${requester.worktreeId}/${requester.instanceId}` });
|
|
431
|
-
delivered = true;
|
|
432
522
|
return 'delivered';
|
|
433
523
|
}
|
|
434
524
|
finally {
|
|
435
|
-
// Issue #3957: a prompt notice that did not go out (refused, failed
|
|
436
|
-
//
|
|
437
|
-
//
|
|
438
|
-
//
|
|
525
|
+
// Issue #3957: a prompt notice that did not go out (refused, failed) is
|
|
526
|
+
// back to unclaimed — and a reply that finished while it was being typed
|
|
527
|
+
// waits in the second slot. The reply supersedes the notice exactly as it
|
|
528
|
+
// would have had it arrived a moment later. Issue #4064: only a notice
|
|
529
|
+
// known not to have gone out (queued again); one held as uncertain is
|
|
530
|
+
// kept, and the reply waits behind it (the replacement refuses a held
|
|
531
|
+
// notice in its own condition, too).
|
|
439
532
|
// A failure here must not keep the claim below from being released: a
|
|
440
533
|
// claim left behind refuses every cancel and every expiry of the relay.
|
|
441
|
-
if (
|
|
442
|
-
|
|
443
|
-
if ((0, relay_db_1.replaceRelayPromptWithPendingReply)(db, relay.id, current.payloadId)) {
|
|
444
|
-
logger.info('relay-prompt-superseded-after-failed-delivery', { relayId });
|
|
445
|
-
globalThis.__relayPumpAgain = true;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
catch (error) {
|
|
449
|
-
logger.warn('relay-prompt-supersede-failed', {
|
|
450
|
-
relayId,
|
|
451
|
-
error: error instanceof Error ? error.message : String(error),
|
|
452
|
-
});
|
|
453
|
-
}
|
|
454
|
-
}
|
|
534
|
+
if (requeued && kind === 'prompt')
|
|
535
|
+
supersedeRequeuedPrompt(db, relay, payloadId);
|
|
455
536
|
// Delivered: a reply is closed now and a prompt notice leaves the relay
|
|
456
537
|
// open on purpose, so either way a later cancel must be judged by the row.
|
|
457
|
-
// Held or
|
|
538
|
+
// Held, failed or uncertain: the relay can be withdrawn again (a cancel
|
|
539
|
+
// stops later deliveries; it never takes back what may be in A's composer).
|
|
458
540
|
(0, relay_delivery_claims_1.releaseRelayDelivery)(relayId);
|
|
459
541
|
}
|
|
460
542
|
}
|
|
543
|
+
/**
|
|
544
|
+
* The pump's listing re-read after the last await before the send (#3732),
|
|
545
|
+
* or `null` (logged) when the send must not go ahead. Synchronous on purpose:
|
|
546
|
+
* the caller claims in the same stretch.
|
|
547
|
+
*/
|
|
548
|
+
function rereadDeliverablePayload(db, relayId, kind, body, listedPayloadId) {
|
|
549
|
+
const current = (0, relay_db_1.getRelayPendingPayload)(db, relayId);
|
|
550
|
+
if (!current ||
|
|
551
|
+
current.kind !== kind ||
|
|
552
|
+
current.body !== body ||
|
|
553
|
+
current.payloadId !== listedPayloadId) {
|
|
554
|
+
logger.info('relay-delivery-superseded', { relayId, kind });
|
|
555
|
+
return null;
|
|
556
|
+
}
|
|
557
|
+
// An expiry notice is delivered from a CLOSED relay by design; everything
|
|
558
|
+
// else is only owed while the relay is open.
|
|
559
|
+
if (kind !== 'expired' && !(0, types_1.isOpenRelayState)(current.relay.state)) {
|
|
560
|
+
logger.info('relay-delivery-closed', { relayId, kind, state: current.relay.state });
|
|
561
|
+
return null;
|
|
562
|
+
}
|
|
563
|
+
return current;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* A send that returned `ok: false`: held as `uncertain`, or queued again when
|
|
567
|
+
* it is known not to have gone out (Issue #4064).
|
|
568
|
+
*/
|
|
569
|
+
function settleUnsentResult(db, ref, relay, requester, kind, stage, observed) {
|
|
570
|
+
const relayId = ref.relayId;
|
|
571
|
+
// Every failure `sendUserMessage` returns reports its attempt first; one
|
|
572
|
+
// without (a caller's stub) is read as before (#4064 keeps that).
|
|
573
|
+
const notSent = observed === null || observed.state === 'not-sent';
|
|
574
|
+
if (!notSent) {
|
|
575
|
+
logger.info('relay-delivery-uncertain', {
|
|
576
|
+
relayId,
|
|
577
|
+
kind,
|
|
578
|
+
stage,
|
|
579
|
+
reason: observed.reason,
|
|
580
|
+
});
|
|
581
|
+
if (holdUncertain(db, ref, observed.reason))
|
|
582
|
+
noteRelayHeld(db, relay, requester, ref, kind, observed.reason);
|
|
583
|
+
return { outcome: 'uncertain', requeued: false };
|
|
584
|
+
}
|
|
585
|
+
logger.info('relay-delivery-refused', { relayId, kind, stage });
|
|
586
|
+
const requeued = requeue(db, ref);
|
|
587
|
+
return { outcome: stage === 'prompt_waiting' ? 'held' : 'failed', requeued };
|
|
588
|
+
}
|
|
589
|
+
/** Record a delivered attempt's result, by kind (Issue #4082). */
|
|
590
|
+
function recordDeliveryCompletion(db, ref, relay, kind, now) {
|
|
591
|
+
// Issue #4082: the attempt's result is recorded FIRST, and only while it
|
|
592
|
+
// is still the attempt in progress. A stale one (held by another boot's
|
|
593
|
+
// recovery, resolved, or replaced by a retry's new attempt) writes
|
|
594
|
+
// nothing — no close, no emptied payload, no promotion, no system line —
|
|
595
|
+
// so the newer attempt and the relay's later reply are left as they are.
|
|
596
|
+
let completed;
|
|
597
|
+
let promoted = false;
|
|
598
|
+
if (kind === 'reply') {
|
|
599
|
+
// Issue #4064: closing the relay (which empties the payload) and ending
|
|
600
|
+
// the attempt commit together. A throw rolls both back: the row stays
|
|
601
|
+
// `attempting` with its body and payload id — held, never re-sent — and
|
|
602
|
+
// the next boot labels it.
|
|
603
|
+
const result = (0, relay_db_1.completeRelayReplyDelivery)(db, {
|
|
604
|
+
...ref,
|
|
605
|
+
sentRequestId: (0, chat_db_1.relayRequestId)(relay.id),
|
|
606
|
+
now,
|
|
607
|
+
});
|
|
608
|
+
completed = result.completed;
|
|
609
|
+
if (completed && !result.closed) {
|
|
610
|
+
// Somebody closed it underneath us. The message is already in A's
|
|
611
|
+
// composer, which is the outcome that mattered.
|
|
612
|
+
logger.info('relay-already-closed-on-deliver', { relayId: ref.relayId });
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
else if (kind === 'prompt') {
|
|
616
|
+
// Issue #3957: only the payload that was sent. A reply that waits in the
|
|
617
|
+
// second slot survives, and is promoted now that the notice is out —
|
|
618
|
+
// Issue #4082: in the same transaction as the attempt's end.
|
|
619
|
+
// A throw here leaves the row `attempting` — held, never re-sent — and
|
|
620
|
+
// the next boot labels it.
|
|
621
|
+
({ completed, promoted } = (0, relay_db_1.completeRelayPromptDelivery)(db, { ...ref, now }));
|
|
622
|
+
}
|
|
623
|
+
else {
|
|
624
|
+
completed = (0, relay_db_1.completeRelayPayloadDelivery)(db, { ...ref, now });
|
|
625
|
+
}
|
|
626
|
+
return { completed, promoted };
|
|
627
|
+
}
|
|
628
|
+
/** The requester's system line for a delivered payload (best-effort). */
|
|
629
|
+
function writeDeliveredSystemLine(db, relay, requester, kind, now) {
|
|
630
|
+
const relayId = relay.id;
|
|
631
|
+
try {
|
|
632
|
+
if (kind === 'reply') {
|
|
633
|
+
(0, relay_system_line_1.writeRelaySystemLine)(db, relay.id, 'replied', requester, (0, relay_session_ref_1.resolveRelaySession)(db, relay.to), now, { overlap: relay.overlap, holdReason: relay.holdReason });
|
|
634
|
+
}
|
|
635
|
+
else if (kind === 'prompt') {
|
|
636
|
+
(0, relay_system_line_1.writeRelaySystemLine)(db, relay.id, 'waiting', requester, (0, relay_session_ref_1.resolveRelaySession)(db, relay.to), now);
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
catch (error) {
|
|
640
|
+
// Issue #4064: the send went out; a ledger write after it failing must
|
|
641
|
+
// not turn into a second send. The attempt is closed already (above).
|
|
642
|
+
logger.warn('relay-delivery-record-failed', {
|
|
643
|
+
relayId,
|
|
644
|
+
kind,
|
|
645
|
+
error: error instanceof Error ? error.message : String(error),
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Issue #3957: a requeued prompt notice gives way to a reply waiting in the
|
|
651
|
+
* second slot. A failure is logged, never thrown (the claim must be released).
|
|
652
|
+
*/
|
|
653
|
+
function supersedeRequeuedPrompt(db, relay, payloadId) {
|
|
654
|
+
const relayId = relay.id;
|
|
655
|
+
try {
|
|
656
|
+
if ((0, relay_db_1.replaceRelayPromptWithPendingReply)(db, relay.id, payloadId)) {
|
|
657
|
+
logger.info('relay-prompt-superseded-after-failed-delivery', { relayId });
|
|
658
|
+
globalThis.__relayPumpAgain = true;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
catch (error) {
|
|
662
|
+
logger.warn('relay-prompt-supersede-failed', {
|
|
663
|
+
relayId,
|
|
664
|
+
error: error instanceof Error ? error.message : String(error),
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
/** Queue a payload again after a send known not to have happened (Issue #4064). */
|
|
669
|
+
function requeue(db, ref) {
|
|
670
|
+
try {
|
|
671
|
+
return (0, relay_db_1.releaseRelayPayloadDelivery)(db, ref);
|
|
672
|
+
}
|
|
673
|
+
catch (error) {
|
|
674
|
+
// Left `attempting`: held, not re-sent. Safe, if not what was wanted.
|
|
675
|
+
logger.warn('relay-delivery-release-failed', {
|
|
676
|
+
relayId: ref.relayId,
|
|
677
|
+
error: error instanceof Error ? error.message : String(error),
|
|
678
|
+
});
|
|
679
|
+
return false;
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Hold a payload whose delivery may have reached A (Issue #4064).
|
|
684
|
+
*
|
|
685
|
+
* @returns Whether THIS call moved the attempt to `uncertain` (Issue #4082):
|
|
686
|
+
* false for a stale attempt (resolved, retried, held by a recovery) and for
|
|
687
|
+
* a write that failed — neither may be announced
|
|
688
|
+
*/
|
|
689
|
+
function holdUncertain(db, ref, reason) {
|
|
690
|
+
try {
|
|
691
|
+
return (0, relay_db_1.holdRelayPayloadDelivery)(db, { ...ref, reason });
|
|
692
|
+
}
|
|
693
|
+
catch (error) {
|
|
694
|
+
// Left `attempting`, which is a hold already; the next boot labels it.
|
|
695
|
+
logger.warn('relay-delivery-hold-failed', {
|
|
696
|
+
relayId: ref.relayId,
|
|
697
|
+
error: error instanceof Error ? error.message : String(error),
|
|
698
|
+
});
|
|
699
|
+
return false;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* Tell the requester, in its history, that one delivery attempt was held as
|
|
704
|
+
* `uncertain` (Issue #4082). Called only for an attempt this process just
|
|
705
|
+
* moved there. Keyed on the relay, payload AND attempt, so the same attempt is
|
|
706
|
+
* told once and a retry's new attempt (or another payload) is told again.
|
|
707
|
+
*
|
|
708
|
+
* Best-effort and at most one line: a failed write (or a stop before it) is
|
|
709
|
+
* not retried and never touches the hold; the socket frame goes out only after
|
|
710
|
+
* the row is committed.
|
|
711
|
+
*/
|
|
712
|
+
function noteRelayHeld(db, relay, requester, ref, kind, reason) {
|
|
713
|
+
try {
|
|
714
|
+
(0, relay_system_line_1.writeRelaySystemLine)(db, relay.id, 'held', requester, (0, relay_session_ref_1.resolveRelaySession)(db, relay.to), ref.now ?? Date.now(), {
|
|
715
|
+
relayId: relay.id,
|
|
716
|
+
payload: `${kind ?? '-'}:${ref.payloadId}`,
|
|
717
|
+
attemptId: ref.attemptId,
|
|
718
|
+
deliveryReason: reason,
|
|
719
|
+
}, `${ref.payloadId}:${ref.attemptId}`);
|
|
720
|
+
}
|
|
721
|
+
catch (error) {
|
|
722
|
+
logger.warn('relay-held-line-failed', {
|
|
723
|
+
relayId: ref.relayId,
|
|
724
|
+
error: error instanceof Error ? error.message : String(error),
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
}
|
|
461
728
|
/**
|
|
462
729
|
* Deliver every stashed payload that can be delivered now.
|
|
463
730
|
*
|
|
@@ -476,12 +743,14 @@ async function pumpRelayDeliveries() {
|
|
|
476
743
|
// delivered by one more pass rather than waiting for the next tick.
|
|
477
744
|
for (let pass = 0; pass < PUMP_PASSES_MAX; pass += 1) {
|
|
478
745
|
globalThis.__relayPumpAgain = false;
|
|
479
|
-
|
|
746
|
+
// Issue #4064: a payload under a delivery hold is not listed, so a pass
|
|
747
|
+
// (or the next pump) never types it again; other relays go on.
|
|
748
|
+
for (const item of (0, relay_db_1.listDeliverableRelayPayloads)(db)) {
|
|
480
749
|
if (inFlight.has(item.relay.id))
|
|
481
750
|
continue;
|
|
482
751
|
inFlight.add(item.relay.id);
|
|
483
752
|
try {
|
|
484
|
-
await deliverOne(db, item.relay.id, item.kind, item.body);
|
|
753
|
+
await deliverOne(db, item.relay.id, item.kind, item.body, item.payloadId);
|
|
485
754
|
}
|
|
486
755
|
catch (error) {
|
|
487
756
|
logger.warn('relay-delivery-failed', {
|
|
@@ -506,6 +775,17 @@ async function pumpRelayDeliveries() {
|
|
|
506
775
|
globalThis.__relayPumpRunning = false;
|
|
507
776
|
}
|
|
508
777
|
}
|
|
778
|
+
/**
|
|
779
|
+
* Ask for a delivery pass without waiting for it (Issue #4082): a resolved hold
|
|
780
|
+
* queued a payload again or promoted a reply. A pump already running makes one
|
|
781
|
+
* more pass for it; otherwise one starts. Never sends by itself — the payload
|
|
782
|
+
* goes through {@link deliverOne}'s readiness, claim and input lock like any
|
|
783
|
+
* other — and never throws.
|
|
784
|
+
*/
|
|
785
|
+
function requestRelayPump() {
|
|
786
|
+
globalThis.__relayPumpAgain = true;
|
|
787
|
+
void pumpRelayDeliveries();
|
|
788
|
+
}
|
|
509
789
|
/** One tick of the background loop: sweep the deadlines, then deliver. */
|
|
510
790
|
async function runRelayMaintenanceTick() {
|
|
511
791
|
try {
|
|
@@ -152,12 +152,16 @@ const SYSTEM_TEMPLATES = {
|
|
|
152
152
|
replied: 'Reply from {alias}.',
|
|
153
153
|
waiting: '{alias} is waiting for a confirmation.',
|
|
154
154
|
expired: 'The delegation to {alias} expired without a reply.',
|
|
155
|
+
held: 'Could not confirm that the relay from {alias} reached this session; it will not be resent automatically. Check this pane, then settle it with commandmate relays resolve.',
|
|
156
|
+
'reply-discarded': 'The reply from {alias} that waited behind the settled confirmation notice was discarded: the delegation had already closed, so it is not delivered.',
|
|
155
157
|
},
|
|
156
158
|
ja: {
|
|
157
159
|
requested: '{alias} へ委任、返信待ち',
|
|
158
160
|
replied: '{alias} から返信',
|
|
159
161
|
waiting: '{alias} が確認待ち',
|
|
160
162
|
expired: '{alias} への委任が返信のないまま期限切れ',
|
|
163
|
+
held: '{alias} からの relay がこのセッションへ届いたか確認できません(自動では再送しません)。この画面を確かめてから commandmate relays resolve で片付けてください',
|
|
164
|
+
'reply-discarded': '片付けた確認の通知の後ろで待っていた {alias} の返信は、委任が既に閉じていたため破棄しました(配送しません)',
|
|
161
165
|
},
|
|
162
166
|
};
|
|
163
167
|
/**
|
|
@@ -175,5 +179,14 @@ function buildRelaySystemLine(locale, kind, alias, detail = {}) {
|
|
|
175
179
|
parts.push(`overlap=${detail.overlap}`);
|
|
176
180
|
if (detail.holdReason)
|
|
177
181
|
parts.push(`hold=${detail.holdReason}`);
|
|
182
|
+
// Issue #4082: what `commandmate relays resolve` names, as the CLI prints it.
|
|
183
|
+
if (detail.relayId)
|
|
184
|
+
parts.push(`relay=${detail.relayId}`);
|
|
185
|
+
if (detail.payload)
|
|
186
|
+
parts.push(`payload=${detail.payload}`);
|
|
187
|
+
if (detail.attemptId)
|
|
188
|
+
parts.push(`attempt=${detail.attemptId}`);
|
|
189
|
+
if (detail.deliveryReason)
|
|
190
|
+
parts.push(`reason=${detail.deliveryReason}`);
|
|
178
191
|
return parts.length === 0 ? line : `${line} (${parts.join(', ')})`;
|
|
179
192
|
}
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
* chat surface, the History tab and any transcript that happens to be open,
|
|
9
9
|
* without a fourth history surface being invented for four sentences.
|
|
10
10
|
*
|
|
11
|
-
* Idempotent: the request id is `relay-sys:<relayId>:<kind>`
|
|
12
|
-
*
|
|
11
|
+
* Idempotent: the request id is `relay-sys:<relayId>:<kind>` (Issue #4082:
|
|
12
|
+
* `…:<kind>:<scope>` for a line written once per payload attempt) and each row
|
|
13
|
+
* is probed for before it is written, in the same transaction, so a delivery that is retried — which the
|
|
13
14
|
* pump does by design — does not stack four "waiting for the reply" lines.
|
|
14
15
|
*
|
|
15
16
|
* Never throws. A transcript line is the least important of a relay's three
|
|
@@ -35,23 +36,35 @@ const logger = (0, logger_1.createLogger)('relay-system-line');
|
|
|
35
36
|
* @param subject - Whose name the sentence carries (always the worker, B)
|
|
36
37
|
* @param at - Epoch ms
|
|
37
38
|
* @param detail - Issue #3957: the overlap and hold reason a `replied` line names
|
|
39
|
+
* @param scope - Issue #4082: what makes this line one of several of its kind on
|
|
40
|
+
* the relay (`<payloadId>:<attemptId>` for `held`); null for the once-per-relay lines
|
|
38
41
|
* @returns Whether a row was written by this call
|
|
39
42
|
*/
|
|
40
|
-
function writeRelaySystemLine(db, relayId, kind, target, subject, at = Date.now(), detail = {}) {
|
|
41
|
-
|
|
43
|
+
function writeRelaySystemLine(db, relayId, kind, target, subject, at = Date.now(), detail = {}, scope = null) {
|
|
44
|
+
// Issue #4082: the probe and the write key the line through the same builder.
|
|
45
|
+
const requestId = (0, chat_db_1.relaySystemRequestId)(relayId, kind, scope);
|
|
42
46
|
try {
|
|
43
|
-
|
|
47
|
+
// Probe and write in one IMMEDIATE transaction: a second connection (or a
|
|
48
|
+
// second server on the same file) cannot slip its own copy in between.
|
|
49
|
+
const message = db
|
|
50
|
+
.transaction(() => {
|
|
51
|
+
if ((0, chat_db_1.findMessageByRequestId)(db, target.worktreeId, requestId))
|
|
52
|
+
return null;
|
|
53
|
+
const locale = (0, model_change_push_notifier_1.resolveReadersLocale)(db);
|
|
54
|
+
return (0, chat_db_1.createRelaySystemMessage)(db, {
|
|
55
|
+
worktreeId: target.worktreeId,
|
|
56
|
+
cliToolId: target.cliToolId,
|
|
57
|
+
instanceId: target.instanceId,
|
|
58
|
+
content: (0, relay_messages_1.buildRelaySystemLine)(locale, kind, subject.alias, detail),
|
|
59
|
+
relayId,
|
|
60
|
+
kind,
|
|
61
|
+
scope,
|
|
62
|
+
at,
|
|
63
|
+
});
|
|
64
|
+
})
|
|
65
|
+
.immediate();
|
|
66
|
+
if (message === null)
|
|
44
67
|
return false;
|
|
45
|
-
const locale = (0, model_change_push_notifier_1.resolveReadersLocale)(db);
|
|
46
|
-
const message = (0, chat_db_1.createRelaySystemMessage)(db, {
|
|
47
|
-
worktreeId: target.worktreeId,
|
|
48
|
-
cliToolId: target.cliToolId,
|
|
49
|
-
instanceId: target.instanceId,
|
|
50
|
-
content: (0, relay_messages_1.buildRelaySystemLine)(locale, kind, subject.alias, detail),
|
|
51
|
-
relayId,
|
|
52
|
-
kind,
|
|
53
|
-
at,
|
|
54
|
-
});
|
|
55
68
|
try {
|
|
56
69
|
(0, ws_server_1.broadcastMessage)('message', {
|
|
57
70
|
worktreeId: target.worktreeId,
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* @module lib/relay/types
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.LEGACY_RELAY_BINDING_FIELDS = exports.OPEN_RELAY_STATES = void 0;
|
|
13
|
+
exports.LEGACY_RELAY_BINDING_FIELDS = exports.RELAY_HOLD_ACTIONS = exports.OPEN_RELAY_STATES = void 0;
|
|
14
14
|
exports.isOpenRelayState = isOpenRelayState;
|
|
15
|
+
exports.relayRequesterPaneCommand = relayRequesterPaneCommand;
|
|
15
16
|
exports.emptyRelayCounts = emptyRelayCounts;
|
|
16
17
|
/** The states from which a relay can still produce a delivery. */
|
|
17
18
|
exports.OPEN_RELAY_STATES = ['pending', 'prompt'];
|
|
@@ -19,7 +20,17 @@ exports.OPEN_RELAY_STATES = ['pending', 'prompt'];
|
|
|
19
20
|
function isOpenRelayState(state) {
|
|
20
21
|
return exports.OPEN_RELAY_STATES.includes(state);
|
|
21
22
|
}
|
|
22
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* The `capture` that shows the requester's pane — where a held relay payload
|
|
25
|
+
* went (Issue #4064). The exact instance, so an alias or a worktree default
|
|
26
|
+
* cannot point at another pane.
|
|
27
|
+
*/
|
|
28
|
+
function relayRequesterPaneCommand(requester) {
|
|
29
|
+
return `commandmate capture ${requester.worktreeId} --instance ${requester.instanceId} --pane`;
|
|
30
|
+
}
|
|
31
|
+
/** Every {@link RelayHoldAction}, for validation. */
|
|
32
|
+
exports.RELAY_HOLD_ACTIONS = ['confirm', 'retry', 'discard'];
|
|
33
|
+
/** The v62 fields of a row with no binding, as a legacy relay reads (Issue #3957), and no delivery hold (#4064). */
|
|
23
34
|
exports.LEGACY_RELAY_BINDING_FIELDS = {
|
|
24
35
|
bindMode: 'legacy',
|
|
25
36
|
sendState: null,
|
|
@@ -29,6 +40,7 @@ exports.LEGACY_RELAY_BINDING_FIELDS = {
|
|
|
29
40
|
obsState: null,
|
|
30
41
|
holdReason: null,
|
|
31
42
|
overlap: null,
|
|
43
|
+
deliveryHold: null,
|
|
32
44
|
};
|
|
33
45
|
/** An empty {@link RelayCounts}. */
|
|
34
46
|
function emptyRelayCounts() {
|