commandmate 0.15.0 → 0.17.0
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 +425 -310
- package/.next/app-path-routes-manifest.json +35 -20
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +15 -15
- package/.next/react-loadable-manifest.json +11 -11
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +72 -0
- package/.next/server/app/_not-found/page_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.js +1 -1
- package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/conversation/route.js +1 -1
- package/.next/server/app/api/assistant/conversation/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/current-output/route.js +1 -1
- package/.next/server/app/api/assistant/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/messages/route.js +1 -1
- package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/session/route.js +1 -1
- package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/start/route.js +1 -1
- package/.next/server/app/api/assistant/start/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/terminal/route.js +3 -3
- package/.next/server/app/api/assistant/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/tools/route.js +1 -1
- package/.next/server/app/api/assistant/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/tools/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/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.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 +1 -0
- package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -0
- package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/hooks/claude-done/route.js +1 -1
- 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/metrics/vibe/route.js +37 -0
- package/.next/server/app/api/metrics/vibe/route.js.nft.json +1 -0
- package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/ollama/models/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_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/[id]/todos/[todoId]/route.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/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/sidebar/group-order/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/[id]/route.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.js +23 -0
- package/.next/server/app/api/skills/installations/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/operations/route.js +13 -0
- package/.next/server/app/api/skills/operations/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/reindex/route.js +23 -0
- package/.next/server/app/api/skills/reindex/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/route.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.js +4 -0
- package/.next/server/app/api/tasks/[taskId]/cancel/route.js.nft.json +1 -0
- package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/tasks/[taskId]/route.js +4 -0
- package/.next/server/app/api/tasks/[taskId]/route.js.nft.json +1 -0
- package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/templates/[id]/route.js +1 -1
- package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/route.js +1 -1
- package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/todos/route.js +1 -1
- package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route.js +1 -0
- package/.next/server/app/api/verification/runs/[runId]/route.js.nft.json +1 -0
- package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/verification/runs/route.js +1 -0
- package/.next/server/app/api/verification/runs/route.js.nft.json +1 -0
- package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -0
- 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]/cli-tool/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route.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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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]/interrupt/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/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]/respond/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route.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 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +18 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js.nft.json +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/route.js +2 -2
- 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]/start-polling/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/start-polling/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route.js +6 -0
- package/.next/server/app/api/worktrees/[id]/tasks/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.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.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.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/route.js +4 -0
- package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/verify/runs/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -0
- 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/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/chat/page_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.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.js +1 -1
- package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page.js +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sessions/page.js +1 -1
- package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/[skillId]/page.js +1 -1
- package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -1
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/installed/page.js +2 -0
- package/.next/server/app/skills/installed/page.js.nft.json +1 -0
- package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -0
- package/.next/server/app/skills/page.js +2 -2
- package/.next/server/app/skills/page.js.nft.json +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 +4 -4
- package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
- package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +35 -20
- package/.next/server/chunks/1068.js +1 -1
- package/.next/server/chunks/1117.js +1 -1
- package/.next/server/chunks/1185.js +1 -0
- package/.next/server/chunks/1239.js +1 -0
- package/.next/server/chunks/1503.js +2 -0
- package/.next/server/chunks/22.js +1 -1
- package/.next/server/chunks/2328.js +1 -1
- package/.next/server/chunks/2366.js +1 -0
- package/.next/server/chunks/2710.js +2 -0
- package/.next/server/chunks/28.js +35 -0
- package/.next/server/chunks/3042.js +1 -2
- package/.next/server/chunks/3736.js +1 -1
- package/.next/server/chunks/4440.js +2 -0
- package/.next/server/chunks/4444.js +1 -1
- package/.next/server/chunks/4548.js +1 -0
- package/.next/server/chunks/4689.js +25 -0
- package/.next/server/chunks/5064.js +1 -1
- package/.next/server/chunks/5381.js +50 -10
- package/.next/server/chunks/5456.js +1 -1
- package/.next/server/chunks/5737.js +1 -0
- package/.next/server/chunks/5793.js +1 -0
- package/.next/server/chunks/5959.js +3 -3
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/6274.js +13 -0
- package/.next/server/chunks/646.js +1 -1
- package/.next/server/chunks/8681.js +1 -1
- package/.next/server/chunks/8807.js +255 -51
- package/.next/server/chunks/8856.js +4 -0
- package/.next/server/chunks/9051.js +1 -0
- package/.next/server/chunks/9687.js +2 -2
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/2751-7fabd91275b14ca3.js +1 -0
- package/.next/static/chunks/{4459.03172449db395039.js → 4459.a94b52985a76509a.js} +1 -1
- package/.next/static/chunks/{4560-8ffb0bb19f2ba998.js → 4560-0917ae2e6a0e5400.js} +1 -1
- package/.next/static/chunks/{6488-93870a55f4a3e3cd.js → 6488-f4e447464c9e0e22.js} +1 -1
- package/.next/static/chunks/{7485.43871aedf3dbb980.js → 7485.442b21101fca7257.js} +1 -1
- package/.next/static/chunks/8562-6e2ab32452f4fa5b.js +1 -0
- package/.next/static/chunks/app/api/app/update/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/app/update-check/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/assistant/conversation/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/assistant/current-output/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/assistant/messages/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/assistant/session/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/assistant/start/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/assistant/terminal/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/assistant/tools/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/fs/browse/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/fs/recent-paths/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/hooks/agent-event/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/metrics/vibe/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/repositories/validate-path/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/skills/installations/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/skills/operations/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/skills/reindex/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/skills/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/templates/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/todos/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/more/{page-082d4ae496f9a36e.js → page-1619018cac999bbc.js} +1 -1
- package/.next/static/chunks/app/proxy/[...path]/route-8440b6c72bed83a1.js +1 -0
- package/.next/static/chunks/app/repositories/page-1ed1e5a542ecc168.js +1 -0
- package/.next/static/chunks/app/review/{page-f431d630097c2e85.js → page-b559bfb11c46931b.js} +1 -1
- package/.next/static/chunks/app/sessions/{page-20f07a99db64d2ca.js → page-3fa7e767d0ab3889.js} +1 -1
- package/.next/static/chunks/app/skills/[skillId]/page-6008b904225ebb25.js +1 -0
- package/.next/static/chunks/app/skills/installed/page-6641f95e6a6e5f9d.js +1 -0
- package/.next/static/chunks/app/skills/page-184f8e23e31a3667.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-5ffc84094830babb.js +1 -0
- package/.next/static/chunks/{webpack-6b35d37d50302d27.js → webpack-180bebdee221b6f4.js} +1 -1
- package/.next/static/css/{5127edd9aa8f3b49.css → d3453a6876553d32.css} +1 -1
- package/.next/static/gR8Sh86RrTynJON8SWkWK/_buildManifest.js +1 -0
- package/.next/trace +12 -11
- package/.next/types/app/api/hooks/agent-event/route.ts +347 -0
- package/.next/types/app/api/metrics/vibe/route.ts +347 -0
- package/.next/types/app/api/skills/installations/route.ts +347 -0
- package/.next/types/app/api/skills/operations/route.ts +347 -0
- package/.next/types/app/api/skills/reindex/route.ts +347 -0
- package/.next/types/app/api/tasks/[taskId]/cancel/route.ts +347 -0
- package/.next/types/app/api/tasks/[taskId]/route.ts +347 -0
- package/.next/types/app/api/verification/runs/[runId]/route.ts +347 -0
- package/.next/types/app/api/verification/runs/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/tasks/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/verify/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/verify/runs/[runId]/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/verify/runs/route.ts +347 -0
- package/.next/types/app/skills/installed/page.ts +84 -0
- package/.next/types/routes.d.ts +17 -2
- package/.next/types/validator.ts +135 -0
- package/dist/cli/commands/report.d.ts +1 -0
- package/dist/cli/commands/report.d.ts.map +1 -1
- package/dist/cli/commands/report.js +54 -0
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +86 -3
- package/dist/cli/commands/skill.d.ts +2 -1
- package/dist/cli/commands/skill.d.ts.map +1 -1
- package/dist/cli/commands/skill.js +136 -2
- package/dist/cli/commands/task.d.ts +11 -0
- package/dist/cli/commands/task.d.ts.map +1 -0
- package/dist/cli/commands/task.js +126 -0
- package/dist/cli/commands/verify.d.ts +19 -0
- package/dist/cli/commands/verify.d.ts.map +1 -0
- package/dist/cli/commands/verify.js +229 -0
- package/dist/cli/commands/wait.d.ts +2 -0
- package/dist/cli/commands/wait.d.ts.map +1 -1
- package/dist/cli/commands/wait.js +78 -13
- package/dist/cli/docs/agent-operations.d.ts +2 -2
- package/dist/cli/docs/agent-operations.d.ts.map +1 -1
- package/dist/cli/docs/agent-operations.js +92 -3
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +6 -0
- package/dist/cli/types/api-responses.d.ts +210 -0
- package/dist/cli/types/api-responses.d.ts.map +1 -1
- package/dist/cli/types/index.d.ts +88 -0
- package/dist/cli/types/index.d.ts.map +1 -1
- package/dist/cli/types/index.js +30 -1
- package/dist/cli/utils/api-client.d.ts +8 -0
- package/dist/cli/utils/api-client.d.ts.map +1 -1
- package/dist/cli/utils/verify-runner.d.ts +57 -0
- package/dist/cli/utils/verify-runner.d.ts.map +1 -0
- package/dist/cli/utils/verify-runner.js +174 -0
- package/dist/server/server.js +15 -0
- package/dist/server/src/config/auto-yes-config.js +22 -0
- package/dist/server/src/lib/auto-yes-poller.js +34 -2
- package/dist/server/src/lib/auto-yes-state.js +6 -19
- package/dist/server/src/lib/db/db.js +34 -1
- package/dist/server/src/lib/db/migrations/index.js +8 -0
- package/dist/server/src/lib/db/migrations/runner.js +1 -1
- package/dist/server/src/lib/db/migrations/v48-skill-operations-audit-index.js +117 -0
- package/dist/server/src/lib/db/migrations/v49-verification-runs.js +86 -0
- package/dist/server/src/lib/db/migrations/v50-tasks.js +68 -0
- package/dist/server/src/lib/db/migrations/v51-task-events.js +58 -0
- package/dist/server/src/lib/db/task-events-db.js +59 -0
- package/dist/server/src/lib/db/tasks-db.js +218 -0
- package/dist/server/src/lib/db/verification-db.js +272 -0
- package/dist/server/src/lib/polling/auto-yes-policy.js +117 -0
- package/dist/server/src/lib/polling/auto-yes-resolver.js +144 -4
- package/dist/server/src/lib/polling/response-checker.js +8 -0
- package/dist/server/src/lib/session/agent-event-state.js +46 -0
- package/dist/server/src/lib/session/current-output-builder.js +4 -0
- package/dist/server/src/lib/session/status-mapping.js +146 -0
- package/dist/server/src/lib/skills/compatibility-matrix.js +256 -0
- package/dist/server/src/lib/skills/compatibility.js +132 -11
- package/dist/server/src/lib/skills/operation-audit.js +85 -15
- package/dist/server/src/lib/skills/operation-journal.js +14 -1
- package/dist/server/src/lib/tasks/contract-parser.js +385 -0
- package/dist/server/src/lib/tasks/task-state-machine.js +183 -0
- package/dist/server/src/lib/tasks/task-transition-service.js +106 -0
- package/dist/server/src/lib/verification/verification-reconciler.js +49 -0
- package/dist/server/src/types/sidebar.js +7 -20
- package/package.json +5 -2
- package/scripts/hooks/cmate-agent-event.sh +175 -0
- package/.next/server/chunks/1808.js +0 -1
- package/.next/server/chunks/2064.js +0 -2
- package/.next/server/chunks/5226.js +0 -28
- package/.next/server/chunks/5306.js +0 -2
- package/.next/server/chunks/593.js +0 -1
- package/.next/server/chunks/9192.js +0 -1
- package/.next/static/MqlW91_Se_kEW6mtm-1x0/_buildManifest.js +0 -1
- package/.next/static/chunks/3418-7e47651340d940b0.js +0 -1
- package/.next/static/chunks/9142-41b13a2f278529cc.js +0 -1
- package/.next/static/chunks/app/api/app/update/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/app/update-check/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/assistant/conversation/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/assistant/current-output/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/assistant/messages/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/assistant/session/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/assistant/start/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/assistant/terminal/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/assistant/tools/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/fs/browse/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/fs/recent-paths/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/repositories/validate-path/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/skills/[id]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/skills/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/templates/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/todos/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-8c8bebe20cebf964.js +0 -1
- package/.next/static/chunks/app/repositories/page-3c4fb889da48ce24.js +0 -1
- package/.next/static/chunks/app/skills/[skillId]/page-8c40c9683f242207.js +0 -1
- package/.next/static/chunks/app/skills/page-46242c428ee8bccf.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-6da38f0a06dfd9db.js +0 -1
- /package/.next/static/{MqlW91_Se_kEW6mtm-1x0 → gR8Sh86RrTynJON8SWkWK}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Task database operations (Issue #1545, migration v50).
|
|
4
|
+
*
|
|
5
|
+
* A task row is the durable record of an execution contract: the goal that was
|
|
6
|
+
* sent, the paths the agent was allowed to touch, the gates that decide
|
|
7
|
+
* completion, and where the task got to. `contract_json` holds the *parsed
|
|
8
|
+
* snapshot* taken at send time, so editing the contract file afterwards cannot
|
|
9
|
+
* change what a running task agreed to.
|
|
10
|
+
*
|
|
11
|
+
* `updateTaskStatus` throws when the row does not exist. A silent no-op would
|
|
12
|
+
* let a caller believe it recorded a transition it never recorded — the same
|
|
13
|
+
* failure `verification-db.ts` guards against.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ACTIVE_TASK_STATUSES = exports.TERMINAL_TASK_STATUSES = exports.TASK_STATUSES = void 0;
|
|
17
|
+
exports.isTerminalTaskStatus = isTerminalTaskStatus;
|
|
18
|
+
exports.createTask = createTask;
|
|
19
|
+
exports.getTask = getTask;
|
|
20
|
+
exports.listTasks = listTasks;
|
|
21
|
+
exports.updateTaskStatus = updateTaskStatus;
|
|
22
|
+
exports.getActiveTask = getActiveTask;
|
|
23
|
+
exports.getActiveTaskForInstance = getActiveTaskForInstance;
|
|
24
|
+
const crypto_1 = require("crypto");
|
|
25
|
+
/**
|
|
26
|
+
* Lifecycle of a task.
|
|
27
|
+
*
|
|
28
|
+
* The runtime tuple mirrors the `status` CHECK constraint in migration v50 and
|
|
29
|
+
* is what callers validate untrusted input against, so a status cannot be
|
|
30
|
+
* accepted by an API route and then rejected by SQLite.
|
|
31
|
+
*
|
|
32
|
+
* `not_started` is distinct from `failed`: the work was never produced, so
|
|
33
|
+
* nothing was judged. `failed` means a verdict was reached, or that no verdict
|
|
34
|
+
* could be reached at all — either way the task did not pass.
|
|
35
|
+
*/
|
|
36
|
+
exports.TASK_STATUSES = [
|
|
37
|
+
'pending',
|
|
38
|
+
'running',
|
|
39
|
+
'waiting_input',
|
|
40
|
+
'verifying',
|
|
41
|
+
'succeeded',
|
|
42
|
+
'failed',
|
|
43
|
+
'not_started',
|
|
44
|
+
'cancelled',
|
|
45
|
+
];
|
|
46
|
+
/** Statuses a task can no longer move out of. */
|
|
47
|
+
exports.TERMINAL_TASK_STATUSES = [
|
|
48
|
+
'succeeded',
|
|
49
|
+
'failed',
|
|
50
|
+
'not_started',
|
|
51
|
+
'cancelled',
|
|
52
|
+
];
|
|
53
|
+
/**
|
|
54
|
+
* Statuses that mean "this task is the one a verification run belongs to".
|
|
55
|
+
*
|
|
56
|
+
* `pending` is excluded on purpose: nothing has been sent, so there is no work
|
|
57
|
+
* a run could be judging.
|
|
58
|
+
*/
|
|
59
|
+
exports.ACTIVE_TASK_STATUSES = [
|
|
60
|
+
'running',
|
|
61
|
+
'waiting_input',
|
|
62
|
+
'verifying',
|
|
63
|
+
];
|
|
64
|
+
function isTerminalTaskStatus(status) {
|
|
65
|
+
return exports.TERMINAL_TASK_STATUSES.includes(status);
|
|
66
|
+
}
|
|
67
|
+
const TASK_COLUMNS = `
|
|
68
|
+
id, worktree_id, cli_tool_id, instance_id, title, goal, contract_path, contract_json,
|
|
69
|
+
status, last_verification_run_id, created_at, updated_at, started_at, finished_at
|
|
70
|
+
`;
|
|
71
|
+
function mapTaskRow(row) {
|
|
72
|
+
return {
|
|
73
|
+
id: row.id,
|
|
74
|
+
worktreeId: row.worktree_id,
|
|
75
|
+
cliToolId: row.cli_tool_id,
|
|
76
|
+
instanceId: row.instance_id,
|
|
77
|
+
title: row.title,
|
|
78
|
+
goal: row.goal,
|
|
79
|
+
contractPath: row.contract_path,
|
|
80
|
+
contract: JSON.parse(row.contract_json),
|
|
81
|
+
status: row.status,
|
|
82
|
+
lastVerificationRunId: row.last_verification_run_id,
|
|
83
|
+
createdAt: new Date(row.created_at),
|
|
84
|
+
updatedAt: new Date(row.updated_at),
|
|
85
|
+
startedAt: row.started_at === null ? null : new Date(row.started_at),
|
|
86
|
+
finishedAt: row.finished_at === null ? null : new Date(row.finished_at),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/** Insert a task, `pending` unless the caller says otherwise. */
|
|
90
|
+
function createTask(db, input) {
|
|
91
|
+
const now = Date.now();
|
|
92
|
+
const id = (0, crypto_1.randomUUID)();
|
|
93
|
+
const status = input.status ?? 'pending';
|
|
94
|
+
db.prepare(`
|
|
95
|
+
INSERT INTO tasks (
|
|
96
|
+
id, worktree_id, cli_tool_id, instance_id, title, goal, contract_path, contract_json,
|
|
97
|
+
status, last_verification_run_id, created_at, updated_at, started_at, finished_at
|
|
98
|
+
)
|
|
99
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, NULL, ?, ?, ?, NULL)
|
|
100
|
+
`).run(id, input.worktreeId, input.cliToolId, input.instanceId ?? null, input.contract.title, input.contract.goal, input.contractPath ?? null, JSON.stringify(input.contract), status, now, now, status === 'pending' ? null : now);
|
|
101
|
+
const task = getTask(db, id);
|
|
102
|
+
if (!task) {
|
|
103
|
+
throw new Error('Failed to persist task');
|
|
104
|
+
}
|
|
105
|
+
return task;
|
|
106
|
+
}
|
|
107
|
+
function getTask(db, taskId) {
|
|
108
|
+
const row = db
|
|
109
|
+
.prepare(`SELECT ${TASK_COLUMNS} FROM tasks WHERE id = ?`)
|
|
110
|
+
.get(taskId);
|
|
111
|
+
return row ? mapTaskRow(row) : null;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Tasks for a worktree, newest first.
|
|
115
|
+
*
|
|
116
|
+
* `rowid DESC` breaks ties, not `id DESC`: ids are random UUIDs, so comparing
|
|
117
|
+
* them orders same-millisecond rows arbitrarily. rowid is insertion order, which
|
|
118
|
+
* is what "newest" means when two tasks share a timestamp.
|
|
119
|
+
*/
|
|
120
|
+
function listTasks(db, worktreeId, limit = 20) {
|
|
121
|
+
const rows = db
|
|
122
|
+
.prepare(`
|
|
123
|
+
SELECT ${TASK_COLUMNS} FROM tasks
|
|
124
|
+
WHERE worktree_id = ?
|
|
125
|
+
ORDER BY created_at DESC, rowid DESC
|
|
126
|
+
LIMIT ?
|
|
127
|
+
`)
|
|
128
|
+
.all(worktreeId, limit);
|
|
129
|
+
return rows.map(mapTaskRow);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Move a task to `status`, stamping the timestamps that status implies.
|
|
133
|
+
*
|
|
134
|
+
* `started_at` is written on the first transition out of `pending` and never
|
|
135
|
+
* overwritten — it records when the work began, not when it last changed state.
|
|
136
|
+
* `finished_at` is written for terminal statuses only.
|
|
137
|
+
*
|
|
138
|
+
* @throws Error when the task does not exist
|
|
139
|
+
*/
|
|
140
|
+
function updateTaskStatus(db, taskId, status, patch = {}) {
|
|
141
|
+
const now = Date.now();
|
|
142
|
+
const info = db
|
|
143
|
+
.prepare(`
|
|
144
|
+
UPDATE tasks
|
|
145
|
+
SET status = ?,
|
|
146
|
+
updated_at = ?,
|
|
147
|
+
started_at = CASE WHEN ? = 'pending' THEN started_at ELSE COALESCE(started_at, ?) END,
|
|
148
|
+
finished_at = CASE WHEN ? = 1 THEN ? ELSE finished_at END,
|
|
149
|
+
last_verification_run_id = COALESCE(?, last_verification_run_id)
|
|
150
|
+
WHERE id = ?
|
|
151
|
+
`)
|
|
152
|
+
.run(status, now, status, now, isTerminalTaskStatus(status) ? 1 : 0, now, patch.lastVerificationRunId ?? null, taskId);
|
|
153
|
+
if (info.changes === 0) {
|
|
154
|
+
throw new Error(`Task ${taskId} not found`);
|
|
155
|
+
}
|
|
156
|
+
return getTask(db, taskId);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* The task a verification run for this worktree belongs to, or null.
|
|
160
|
+
*
|
|
161
|
+
* Filters are applied only when supplied. A verification run is worktree-scoped
|
|
162
|
+
* — the gates execute over the whole working tree and a worktree admits one run
|
|
163
|
+
* at a time — so the runner resolves without filters and takes the most recently
|
|
164
|
+
* updated active task.
|
|
165
|
+
*/
|
|
166
|
+
function getActiveTask(db, worktreeId, cliToolId, instanceId) {
|
|
167
|
+
const conditions = ['worktree_id = ?'];
|
|
168
|
+
const params = [worktreeId];
|
|
169
|
+
if (cliToolId !== undefined) {
|
|
170
|
+
conditions.push('cli_tool_id = ?');
|
|
171
|
+
params.push(cliToolId);
|
|
172
|
+
}
|
|
173
|
+
if (instanceId !== undefined) {
|
|
174
|
+
conditions.push('instance_id = ?');
|
|
175
|
+
params.push(instanceId);
|
|
176
|
+
}
|
|
177
|
+
const placeholders = exports.ACTIVE_TASK_STATUSES.map(() => '?').join(', ');
|
|
178
|
+
const row = db
|
|
179
|
+
.prepare(`
|
|
180
|
+
SELECT ${TASK_COLUMNS} FROM tasks
|
|
181
|
+
WHERE ${conditions.join(' AND ')} AND status IN (${placeholders})
|
|
182
|
+
ORDER BY updated_at DESC, created_at DESC, rowid DESC
|
|
183
|
+
LIMIT 1
|
|
184
|
+
`)
|
|
185
|
+
.get(...params, ...exports.ACTIVE_TASK_STATUSES);
|
|
186
|
+
return row ? mapTaskRow(row) : null;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* The active task governing one agent instance, or null.
|
|
190
|
+
*
|
|
191
|
+
* Distinct from {@link getActiveTask} because the primary instance is recorded
|
|
192
|
+
* two different ways: `instance_id` is NULL when no `--instance` was given, and
|
|
193
|
+
* the tool id itself (`'claude'`) when `--instance claude` was. Both mean the
|
|
194
|
+
* primary instance, so both must match — `= ?` cannot express either, since
|
|
195
|
+
* `instance_id = NULL` is never true in SQL.
|
|
196
|
+
*
|
|
197
|
+
* Auto-Yes needs this precision: a contract sent to `codex-2` must not govern
|
|
198
|
+
* the auto-answering of `codex`, and taking the worktree's most recent active
|
|
199
|
+
* task would do exactly that.
|
|
200
|
+
*
|
|
201
|
+
* @param instanceId - Agent instance id; pass the tool id itself for the primary
|
|
202
|
+
*/
|
|
203
|
+
function getActiveTaskForInstance(db, worktreeId, cliToolId, instanceId) {
|
|
204
|
+
const isPrimary = instanceId === cliToolId;
|
|
205
|
+
const placeholders = exports.ACTIVE_TASK_STATUSES.map(() => '?').join(', ');
|
|
206
|
+
const row = db
|
|
207
|
+
.prepare(`
|
|
208
|
+
SELECT ${TASK_COLUMNS} FROM tasks
|
|
209
|
+
WHERE worktree_id = ?
|
|
210
|
+
AND cli_tool_id = ?
|
|
211
|
+
AND (instance_id = ? OR (instance_id IS NULL AND ?))
|
|
212
|
+
AND status IN (${placeholders})
|
|
213
|
+
ORDER BY updated_at DESC, created_at DESC, rowid DESC
|
|
214
|
+
LIMIT 1
|
|
215
|
+
`)
|
|
216
|
+
.get(worktreeId, cliToolId, instanceId, isPrimary ? 1 : 0, ...exports.ACTIVE_TASK_STATUSES);
|
|
217
|
+
return row ? mapTaskRow(row) : null;
|
|
218
|
+
}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Verification run database operations (Issue #1542, migration v49).
|
|
4
|
+
*
|
|
5
|
+
* Persists the outcome of a verification gate run: one `verification_runs` row
|
|
6
|
+
* per attempt, one `verification_gate_results` row per command inside it.
|
|
7
|
+
*
|
|
8
|
+
* Both create* functions open a record in `running` state and both finish*
|
|
9
|
+
* functions close it. That split is deliberate: a run that crashes mid-flight
|
|
10
|
+
* leaves a `running` row behind, which is recoverable evidence, whereas a
|
|
11
|
+
* single write-on-completion would leave nothing at all.
|
|
12
|
+
*
|
|
13
|
+
* The finish* functions throw when the target row does not exist. A silent
|
|
14
|
+
* no-op would let a caller believe it recorded a verdict it never recorded —
|
|
15
|
+
* exactly the failure this table exists to make impossible.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.MAX_RUN_HISTORY_DAYS = exports.MAX_RUN_HISTORY_LIMIT = exports.DEFAULT_RUN_HISTORY_LIMIT = exports.VERIFICATION_TRIGGERS = void 0;
|
|
19
|
+
exports.createVerificationRun = createVerificationRun;
|
|
20
|
+
exports.finishVerificationRun = finishVerificationRun;
|
|
21
|
+
exports.createGateResult = createGateResult;
|
|
22
|
+
exports.finishGateResult = finishGateResult;
|
|
23
|
+
exports.getVerificationRun = getVerificationRun;
|
|
24
|
+
exports.getRunningVerificationRun = getRunningVerificationRun;
|
|
25
|
+
exports.listRunningVerificationRuns = listRunningVerificationRuns;
|
|
26
|
+
exports.listVerificationRuns = listVerificationRuns;
|
|
27
|
+
exports.listVerificationRunsForPeriod = listVerificationRunsForPeriod;
|
|
28
|
+
/**
|
|
29
|
+
* What caused a verification run to start.
|
|
30
|
+
*
|
|
31
|
+
* The runtime tuple mirrors the `trigger` CHECK constraint in migration v49 and
|
|
32
|
+
* is the single source callers validate untrusted input against, so a new
|
|
33
|
+
* trigger cannot be accepted by an API route and then rejected by SQLite.
|
|
34
|
+
*/
|
|
35
|
+
exports.VERIFICATION_TRIGGERS = ['manual', 'wait', 'api', 'task'];
|
|
36
|
+
const RUN_COLUMNS = `
|
|
37
|
+
id, worktree_id, instance_id, task_id, trigger, status, base_ref, started_at, finished_at
|
|
38
|
+
`;
|
|
39
|
+
const GATE_COLUMNS = `
|
|
40
|
+
id, run_id, gate_id, command, status, exit_code, duration_ms, log_tail, started_at, finished_at
|
|
41
|
+
`;
|
|
42
|
+
function mapRunRow(row) {
|
|
43
|
+
return {
|
|
44
|
+
id: row.id,
|
|
45
|
+
worktreeId: row.worktree_id,
|
|
46
|
+
instanceId: row.instance_id,
|
|
47
|
+
taskId: row.task_id,
|
|
48
|
+
trigger: row.trigger,
|
|
49
|
+
status: row.status,
|
|
50
|
+
baseRef: row.base_ref,
|
|
51
|
+
startedAt: new Date(row.started_at),
|
|
52
|
+
finishedAt: row.finished_at === null ? null : new Date(row.finished_at),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function mapGateRow(row) {
|
|
56
|
+
return {
|
|
57
|
+
id: row.id,
|
|
58
|
+
runId: row.run_id,
|
|
59
|
+
gateId: row.gate_id,
|
|
60
|
+
command: row.command,
|
|
61
|
+
status: row.status,
|
|
62
|
+
exitCode: row.exit_code,
|
|
63
|
+
durationMs: row.duration_ms,
|
|
64
|
+
logTail: row.log_tail,
|
|
65
|
+
startedAt: new Date(row.started_at),
|
|
66
|
+
finishedAt: row.finished_at === null ? null : new Date(row.finished_at),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/** Open a run in `running` state. */
|
|
70
|
+
function createVerificationRun(db, input) {
|
|
71
|
+
const now = Date.now();
|
|
72
|
+
const info = db
|
|
73
|
+
.prepare(`
|
|
74
|
+
INSERT INTO verification_runs (
|
|
75
|
+
worktree_id, instance_id, task_id, trigger, status, base_ref, started_at, finished_at
|
|
76
|
+
)
|
|
77
|
+
VALUES (?, ?, ?, ?, 'running', ?, ?, NULL)
|
|
78
|
+
`)
|
|
79
|
+
.run(input.worktreeId, input.instanceId ?? null, input.taskId ?? null, input.trigger, input.baseRef ?? null, now);
|
|
80
|
+
const row = db
|
|
81
|
+
.prepare(`SELECT ${RUN_COLUMNS} FROM verification_runs WHERE id = ?`)
|
|
82
|
+
.get(Number(info.lastInsertRowid));
|
|
83
|
+
if (!row) {
|
|
84
|
+
throw new Error('Failed to persist verification run');
|
|
85
|
+
}
|
|
86
|
+
return mapRunRow(row);
|
|
87
|
+
}
|
|
88
|
+
/** Close a run with its final verdict, stamping `finished_at`. */
|
|
89
|
+
function finishVerificationRun(db, runId, status) {
|
|
90
|
+
const info = db
|
|
91
|
+
.prepare('UPDATE verification_runs SET status = ?, finished_at = ? WHERE id = ?')
|
|
92
|
+
.run(status, Date.now(), runId);
|
|
93
|
+
if (info.changes === 0) {
|
|
94
|
+
throw new Error(`Verification run ${runId} not found`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/** Open a gate result under an existing run, in `running` state. */
|
|
98
|
+
function createGateResult(db, runId, input) {
|
|
99
|
+
const now = Date.now();
|
|
100
|
+
const info = db
|
|
101
|
+
.prepare(`
|
|
102
|
+
INSERT INTO verification_gate_results (
|
|
103
|
+
run_id, gate_id, command, status, exit_code, duration_ms, log_tail, started_at, finished_at
|
|
104
|
+
)
|
|
105
|
+
VALUES (?, ?, ?, 'running', NULL, NULL, NULL, ?, NULL)
|
|
106
|
+
`)
|
|
107
|
+
.run(runId, input.gateId, input.command, now);
|
|
108
|
+
const row = db
|
|
109
|
+
.prepare(`SELECT ${GATE_COLUMNS} FROM verification_gate_results WHERE id = ?`)
|
|
110
|
+
.get(Number(info.lastInsertRowid));
|
|
111
|
+
if (!row) {
|
|
112
|
+
throw new Error('Failed to persist verification gate result');
|
|
113
|
+
}
|
|
114
|
+
return mapGateRow(row);
|
|
115
|
+
}
|
|
116
|
+
/** Close a gate result with its outcome, stamping `finished_at`. */
|
|
117
|
+
function finishGateResult(db, gateResultId, patch) {
|
|
118
|
+
const info = db
|
|
119
|
+
.prepare(`
|
|
120
|
+
UPDATE verification_gate_results
|
|
121
|
+
SET status = ?, exit_code = ?, duration_ms = ?, log_tail = ?, finished_at = ?
|
|
122
|
+
WHERE id = ?
|
|
123
|
+
`)
|
|
124
|
+
.run(patch.status, patch.exitCode ?? null, patch.durationMs ?? null, patch.logTail ?? null, Date.now(), gateResultId);
|
|
125
|
+
if (info.changes === 0) {
|
|
126
|
+
throw new Error(`Verification gate result ${gateResultId} not found`);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/** Fetch a run with its gate results, or null when the run does not exist. */
|
|
130
|
+
function getVerificationRun(db, runId) {
|
|
131
|
+
const runRow = db
|
|
132
|
+
.prepare(`SELECT ${RUN_COLUMNS} FROM verification_runs WHERE id = ?`)
|
|
133
|
+
.get(runId);
|
|
134
|
+
if (!runRow) {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
const gateRows = db
|
|
138
|
+
.prepare(`
|
|
139
|
+
SELECT ${GATE_COLUMNS} FROM verification_gate_results
|
|
140
|
+
WHERE run_id = ?
|
|
141
|
+
ORDER BY started_at ASC, id ASC
|
|
142
|
+
`)
|
|
143
|
+
.all(runId);
|
|
144
|
+
return { ...mapRunRow(runRow), gates: gateRows.map(mapGateRow) };
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* The open run for a worktree, or null when none is in flight.
|
|
148
|
+
*
|
|
149
|
+
* A worktree admits one run at a time: two runs sharing a working tree would
|
|
150
|
+
* see each other's build output and their exit codes would describe neither.
|
|
151
|
+
* `id DESC` is a safety net — the invariant says there is at most one row, and
|
|
152
|
+
* if a bug ever breaks it the newest is the one a caller means.
|
|
153
|
+
*/
|
|
154
|
+
function getRunningVerificationRun(db, worktreeId) {
|
|
155
|
+
const row = db
|
|
156
|
+
.prepare(`
|
|
157
|
+
SELECT ${RUN_COLUMNS} FROM verification_runs
|
|
158
|
+
WHERE worktree_id = ? AND status = 'running'
|
|
159
|
+
ORDER BY id DESC
|
|
160
|
+
LIMIT 1
|
|
161
|
+
`)
|
|
162
|
+
.get(worktreeId);
|
|
163
|
+
return row ? mapRunRow(row) : null;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Every run still marked `running`, across all worktrees, oldest first.
|
|
167
|
+
*
|
|
168
|
+
* Used by startup reconciliation: after a restart no run is actually in flight,
|
|
169
|
+
* so every row this returns is an orphan whose verdict was lost.
|
|
170
|
+
*/
|
|
171
|
+
function listRunningVerificationRuns(db) {
|
|
172
|
+
const rows = db
|
|
173
|
+
.prepare(`
|
|
174
|
+
SELECT ${RUN_COLUMNS} FROM verification_runs
|
|
175
|
+
WHERE status = 'running'
|
|
176
|
+
ORDER BY id ASC
|
|
177
|
+
`)
|
|
178
|
+
.all();
|
|
179
|
+
return rows.map(mapRunRow);
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Most recent runs for a worktree, newest first.
|
|
183
|
+
*
|
|
184
|
+
* `id DESC` breaks ties: runs started within the same millisecond are common
|
|
185
|
+
* enough that without it the "newest first" contract would be unordered.
|
|
186
|
+
*/
|
|
187
|
+
function listVerificationRuns(db, worktreeId, limit = 20) {
|
|
188
|
+
const rows = db
|
|
189
|
+
.prepare(`
|
|
190
|
+
SELECT ${RUN_COLUMNS} FROM verification_runs
|
|
191
|
+
WHERE worktree_id = ?
|
|
192
|
+
ORDER BY started_at DESC, id DESC
|
|
193
|
+
LIMIT ?
|
|
194
|
+
`)
|
|
195
|
+
.all(worktreeId, limit);
|
|
196
|
+
return rows.map(mapRunRow);
|
|
197
|
+
}
|
|
198
|
+
/** Default page size for {@link listVerificationRunsForPeriod}. */
|
|
199
|
+
exports.DEFAULT_RUN_HISTORY_LIMIT = 50;
|
|
200
|
+
/** Largest page {@link listVerificationRunsForPeriod} will return. */
|
|
201
|
+
exports.MAX_RUN_HISTORY_LIMIT = 500;
|
|
202
|
+
/** Longest window {@link listVerificationRunsForPeriod} will look back over. */
|
|
203
|
+
exports.MAX_RUN_HISTORY_DAYS = 90;
|
|
204
|
+
const MS_PER_DAY = 86_400_000;
|
|
205
|
+
/** Clamp to an integer inside [min, max]; non-finite input falls back to `fallback`. */
|
|
206
|
+
function clampInt(value, fallback, min, max) {
|
|
207
|
+
if (value === undefined || !Number.isFinite(value))
|
|
208
|
+
return fallback;
|
|
209
|
+
return Math.min(Math.max(Math.trunc(value), min), max);
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Recent runs across worktrees, newest first, each with its gate verdicts but
|
|
213
|
+
* no log bodies (Issue #1593).
|
|
214
|
+
*
|
|
215
|
+
* `worktreeId` is optional because the advisor that consumes this (#1594) looks
|
|
216
|
+
* at a repository's trend, not one worktree's. Ordering follows the same
|
|
217
|
+
* `started_at DESC, id DESC` contract as {@link listVerificationRuns} so both
|
|
218
|
+
* feeds agree about what "newest" means.
|
|
219
|
+
*
|
|
220
|
+
* `days` and `limit` are clamped rather than rejected: this is a read-only feed
|
|
221
|
+
* and a caller asking for 10000 runs wants as many as it can have, not an
|
|
222
|
+
* exception. API routes validate before calling so a user typo still 400s.
|
|
223
|
+
*/
|
|
224
|
+
function listVerificationRunsForPeriod(db, opts = {}) {
|
|
225
|
+
const limit = clampInt(opts.limit, exports.DEFAULT_RUN_HISTORY_LIMIT, 1, exports.MAX_RUN_HISTORY_LIMIT);
|
|
226
|
+
const conditions = [];
|
|
227
|
+
const params = [];
|
|
228
|
+
if (opts.worktreeId !== undefined) {
|
|
229
|
+
conditions.push('worktree_id = ?');
|
|
230
|
+
params.push(opts.worktreeId);
|
|
231
|
+
}
|
|
232
|
+
if (opts.days !== undefined) {
|
|
233
|
+
const days = clampInt(opts.days, exports.MAX_RUN_HISTORY_DAYS, 1, exports.MAX_RUN_HISTORY_DAYS);
|
|
234
|
+
conditions.push('started_at >= ?');
|
|
235
|
+
params.push(Date.now() - days * MS_PER_DAY);
|
|
236
|
+
}
|
|
237
|
+
const where = conditions.length > 0 ? `WHERE ${conditions.join(' AND ')}` : '';
|
|
238
|
+
const runRows = db
|
|
239
|
+
.prepare(`
|
|
240
|
+
SELECT ${RUN_COLUMNS} FROM verification_runs
|
|
241
|
+
${where}
|
|
242
|
+
ORDER BY started_at DESC, id DESC
|
|
243
|
+
LIMIT ?
|
|
244
|
+
`)
|
|
245
|
+
.all(...params, limit);
|
|
246
|
+
if (runRows.length === 0)
|
|
247
|
+
return [];
|
|
248
|
+
const placeholders = runRows.map(() => '?').join(', ');
|
|
249
|
+
const gateRows = db
|
|
250
|
+
.prepare(`
|
|
251
|
+
SELECT run_id, gate_id, status, exit_code, duration_ms
|
|
252
|
+
FROM verification_gate_results
|
|
253
|
+
WHERE run_id IN (${placeholders})
|
|
254
|
+
ORDER BY started_at ASC, id ASC
|
|
255
|
+
`)
|
|
256
|
+
.all(...runRows.map((row) => row.id));
|
|
257
|
+
const byRun = new Map();
|
|
258
|
+
for (const row of gateRows) {
|
|
259
|
+
const summary = {
|
|
260
|
+
gateId: row.gate_id,
|
|
261
|
+
status: row.status,
|
|
262
|
+
exitCode: row.exit_code,
|
|
263
|
+
durationMs: row.duration_ms,
|
|
264
|
+
};
|
|
265
|
+
const bucket = byRun.get(row.run_id);
|
|
266
|
+
if (bucket)
|
|
267
|
+
bucket.push(summary);
|
|
268
|
+
else
|
|
269
|
+
byRun.set(row.run_id, [summary]);
|
|
270
|
+
}
|
|
271
|
+
return runRows.map((row) => ({ ...mapRunRow(row), gates: byRun.get(row.id) ?? [] }));
|
|
272
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Auto-Yes policy lookup — resolves the `autoYes` block of the execution
|
|
4
|
+
* contract governing one agent instance (Issue #1547).
|
|
5
|
+
*
|
|
6
|
+
* Server-only: reads the database. Kept out of auto-yes-state.ts so that module
|
|
7
|
+
* stays free of a database dependency, and out of auto-yes-resolver.ts because
|
|
8
|
+
* that one is bundled into the client.
|
|
9
|
+
*
|
|
10
|
+
* The result is cached per composite key with a short TTL. Without it, a prompt
|
|
11
|
+
* the policy suppresses would be re-read from SQLite on every poll for as long
|
|
12
|
+
* as it stays on screen: the poller's duplicate guard only remembers prompts it
|
|
13
|
+
* *answered*, so a suppressed prompt is re-evaluated every POLLING_INTERVAL_MS
|
|
14
|
+
* indefinitely. The TTL is what bounds staleness — a task that starts or ends is
|
|
15
|
+
* picked up within it, without this module having to observe task transitions.
|
|
16
|
+
*
|
|
17
|
+
* @module lib/polling/auto-yes-policy
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.AUTO_YES_POLICY_CACHE_TTL_MS = void 0;
|
|
21
|
+
exports.getSessionAutoYesPolicy = getSessionAutoYesPolicy;
|
|
22
|
+
exports.invalidateSessionAutoYesPolicy = invalidateSessionAutoYesPolicy;
|
|
23
|
+
exports.clearAutoYesPolicyCache = clearAutoYesPolicyCache;
|
|
24
|
+
const db_1 = require("../../lib/db");
|
|
25
|
+
const db_instance_1 = require("../../lib/db/db-instance");
|
|
26
|
+
const auto_yes_state_1 = require("../../lib/auto-yes-state");
|
|
27
|
+
const logger_1 = require("../../lib/logger");
|
|
28
|
+
const logger = (0, logger_1.createLogger)('auto-yes-policy');
|
|
29
|
+
/** How long a resolved policy is reused before the task is looked up again. */
|
|
30
|
+
exports.AUTO_YES_POLICY_CACHE_TTL_MS = 5000;
|
|
31
|
+
/**
|
|
32
|
+
* Cache ceiling. Above it, expired entries are dropped on write, so a long-lived
|
|
33
|
+
* server cannot accumulate one entry per worktree ever polled.
|
|
34
|
+
*/
|
|
35
|
+
const MAX_CACHE_ENTRIES = 200;
|
|
36
|
+
/**
|
|
37
|
+
* Plain module-level Map rather than the globalThis pattern used for auto-yes
|
|
38
|
+
* *state*: losing a cache on hot reload costs one database read, while losing
|
|
39
|
+
* state would silently disable auto-yes.
|
|
40
|
+
*/
|
|
41
|
+
const policyCache = new Map();
|
|
42
|
+
function purgeExpired(now) {
|
|
43
|
+
for (const [key, entry] of policyCache.entries()) {
|
|
44
|
+
if (entry.expiresAt <= now) {
|
|
45
|
+
policyCache.delete(key);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Read the policy from the active task, or null when no contract governs this
|
|
51
|
+
* instance.
|
|
52
|
+
*
|
|
53
|
+
* A database failure yields null — the unconstrained behaviour. Failing closed
|
|
54
|
+
* here would suppress auto-yes for every user who has no contract at all, which
|
|
55
|
+
* is the population this feature must not touch; the suppressing decisions
|
|
56
|
+
* (`off`, deny patterns) are made inside the resolver only once a contract has
|
|
57
|
+
* actually been read.
|
|
58
|
+
*/
|
|
59
|
+
function readPolicy(worktreeId, cliToolId, instanceId) {
|
|
60
|
+
try {
|
|
61
|
+
const task = (0, db_1.getActiveTaskForInstance)((0, db_instance_1.getDbInstance)(), worktreeId, cliToolId, instanceId);
|
|
62
|
+
if (!task)
|
|
63
|
+
return null;
|
|
64
|
+
// Assignment, not a cast: a drift in TaskContractAutoYes fails the build here.
|
|
65
|
+
const policy = task.contract.autoYes;
|
|
66
|
+
return policy;
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
logger.warn('policy-lookup-failed', {
|
|
70
|
+
worktreeId,
|
|
71
|
+
cliToolId,
|
|
72
|
+
instanceId,
|
|
73
|
+
error: error instanceof Error ? error.message : String(error),
|
|
74
|
+
});
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The auto-answer policy for an agent instance, cached for
|
|
80
|
+
* {@link AUTO_YES_POLICY_CACHE_TTL_MS}.
|
|
81
|
+
*
|
|
82
|
+
* @param worktreeId - Worktree identifier
|
|
83
|
+
* @param cliToolId - CLI tool being polled
|
|
84
|
+
* @param instanceId - Agent instance id (defaults to the primary, i.e. cliToolId)
|
|
85
|
+
* @returns The contract's autoYes block, or null when no contract governs this instance
|
|
86
|
+
*/
|
|
87
|
+
function getSessionAutoYesPolicy(worktreeId, cliToolId, instanceId) {
|
|
88
|
+
const resolvedInstanceId = instanceId ?? cliToolId;
|
|
89
|
+
const key = (0, auto_yes_state_1.buildCompositeKey)(worktreeId, cliToolId, resolvedInstanceId);
|
|
90
|
+
const now = Date.now();
|
|
91
|
+
const cached = policyCache.get(key);
|
|
92
|
+
if (cached && cached.expiresAt > now) {
|
|
93
|
+
return cached.policy;
|
|
94
|
+
}
|
|
95
|
+
const policy = readPolicy(worktreeId, cliToolId, resolvedInstanceId);
|
|
96
|
+
if (policyCache.size >= MAX_CACHE_ENTRIES) {
|
|
97
|
+
purgeExpired(now);
|
|
98
|
+
}
|
|
99
|
+
policyCache.set(key, { policy, expiresAt: now + exports.AUTO_YES_POLICY_CACHE_TTL_MS });
|
|
100
|
+
return policy;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Drop the cached policy for a composite key, so the next lookup re-reads the
|
|
104
|
+
* task. Called when a poller starts or stops.
|
|
105
|
+
*
|
|
106
|
+
* @param compositeKey - Composite key (worktreeId:cliToolId[:instanceId])
|
|
107
|
+
*/
|
|
108
|
+
function invalidateSessionAutoYesPolicy(compositeKey) {
|
|
109
|
+
policyCache.delete(compositeKey);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Clear the whole cache.
|
|
113
|
+
* @internal Exported for testing and worktree teardown.
|
|
114
|
+
*/
|
|
115
|
+
function clearAutoYesPolicyCache() {
|
|
116
|
+
policyCache.clear();
|
|
117
|
+
}
|