commandmate 0.18.0 → 0.20.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 +230 -223
- package/.next/app-path-routes-manifest.json +32 -32
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +9 -9
- package/.next/required-server-files.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update/route.js +5 -3
- package/.next/server/app/api/app/update/route.js.nft.json +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.js.nft.json +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 +1 -1
- 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.js +1 -1
- package/.next/server/app/api/auth/login/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/route.js +1 -1
- package/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/status/route.js +1 -1
- package/.next/server/app/api/auth/status/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/external-apps/[id]/health/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/external-apps/[id]/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/external-apps/route.js.nft.json +1 -1
- package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/browse/route.js +2 -2
- package/.next/server/app/api/fs/browse/route.js.nft.json +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 +2 -2
- package/.next/server/app/api/fs/recent-paths/route.js.nft.json +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 -1
- 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 +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 +2 -2
- package/.next/server/app/api/metrics/vibe/route.js.nft.json +1 -1
- package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ollama/models/route.js +1 -1
- package/.next/server/app/api/ollama/models/route.js.nft.json +1 -1
- 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.js.nft.json +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/repositories/[id]/route.js +1 -1
- package/.next/server/app/api/repositories/[id]/route.js.nft.json +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.js.nft.json +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.js.nft.json +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.js +1 -1
- package/.next/server/app/api/repositories/excluded/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/repositories/validate-path/route.js.nft.json +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.js +2 -2
- package/.next/server/app/api/sidebar/group-order/route.js.nft.json +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.js.nft.json +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 +1 -1
- package/.next/server/app/api/skills/installations/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/operations/route.js +2 -2
- package/.next/server/app/api/skills/operations/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/reindex/route.js +1 -1
- package/.next/server/app/api/skills/reindex/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/route.js +1 -1
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/slash-commands/route.js +1 -1
- package/.next/server/app/api/slash-commands/route.js.nft.json +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 +2 -2
- package/.next/server/app/api/tasks/[taskId]/cancel/route.js.nft.json +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 +2 -2
- package/.next/server/app/api/tasks/[taskId]/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/[id]/route.js +2 -2
- package/.next/server/app/api/templates/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/route.js +2 -2
- package/.next/server/app/api/templates/route.js.nft.json +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.js.nft.json +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 -1
- package/.next/server/app/api/verification/runs/[runId]/route.js.nft.json +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.js.nft.json +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]/cli-tool/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route.js.nft.json +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]/execution-logs/[logId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js.nft.json +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.js.nft.json +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 +2 -2
- package/.next/server/app/api/worktrees/[id]/logs/route.js.nft.json +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 +6 -6
- package/.next/server/app/api/worktrees/[id]/marp-render/route.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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 +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 +1 -1
- 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 +3 -3
- 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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route.js.nft.json +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 +1 -1
- 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.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.js.nft.json +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.js.nft.json +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 +4 -4
- package/.next/server/app/api/worktrees/[id]/tasks/route.js.nft.json +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 +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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 +2 -2
- package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +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]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js.nft.json +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.js.nft.json +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.js.nft.json +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/apple-icon.png/route.js +1 -1
- package/.next/server/app/apple-icon.png/route.js.nft.json +1 -1
- package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
- package/.next/server/app/icon.png/route.js +1 -1
- package/.next/server/app/icon.png/route.js.nft.json +1 -1
- package/.next/server/app/icon1.png/route.js +1 -1
- package/.next/server/app/icon1.png/route.js.nft.json +1 -1
- package/.next/server/app/icon2.png/route.js +1 -1
- package/.next/server/app/icon2.png/route.js.nft.json +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/.next/server/app/manifest.webmanifest/route.js.nft.json +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.js +1 -1
- package/.next/server/app/proxy/[...path]/route.js.nft.json +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_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.js +2 -2
- package/.next/server/app/worktrees/[id]/files/[...path]/page.js.nft.json +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/page.js +8 -8
- 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.js +3 -3
- package/.next/server/app/worktrees/[id]/terminal/page.js.nft.json +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +32 -32
- package/.next/server/chunks/1029.js +1 -0
- package/.next/server/chunks/1068.js +1 -1
- package/.next/server/chunks/1598.js +4 -0
- package/.next/server/chunks/3042.js +1 -1
- package/.next/server/chunks/3417.js +1 -0
- package/.next/server/chunks/3451.js +1 -1
- package/.next/server/chunks/3543.js +1 -1
- package/.next/server/chunks/3753.js +23 -23
- package/.next/server/chunks/3945.js +1 -1
- package/.next/server/chunks/406.js +5 -5
- package/.next/server/chunks/{1185.js → 5048.js} +1 -1
- package/.next/server/chunks/5959.js +3 -3
- package/.next/server/chunks/{5381.js → 5998.js} +2 -2
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/6274.js +6 -5
- package/.next/server/chunks/6283.js +1 -1
- package/.next/server/chunks/6401.js +1 -0
- package/.next/server/chunks/641.js +1 -0
- package/.next/server/chunks/8536.js +1 -0
- package/.next/server/chunks/8543.js +1 -0
- package/.next/server/chunks/8807.js +397 -378
- package/.next/server/chunks/8856.js +2 -2
- package/.next/server/chunks/9058.js +1 -0
- package/.next/server/chunks/9067.js +1 -0
- package/.next/server/chunks/9123.js +1 -1
- 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/server/src/middleware.js +1 -1
- package/.next/server/src/middleware.js.map +1 -1
- package/.next/static/chunks/{6488-109e3825c7249e47.js → 6488-3e7539550c3ef358.js} +1 -1
- package/.next/static/chunks/744-fa8c0ae444c8338c.js +1 -0
- package/.next/static/chunks/app/api/app/update/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/app/update-check/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/assistant/conversation/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/assistant/current-output/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/assistant/messages/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/assistant/session/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/assistant/start/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/assistant/terminal/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/assistant/tools/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/fs/browse/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/fs/recent-paths/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/hooks/agent-event/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/metrics/vibe/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/repositories/validate-path/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/skills/installations/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/skills/operations/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/skills/reindex/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/skills/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/templates/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/todos/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/proxy/[...path]/route-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/repositories/page-202680fe6ec169c8.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/layout-5bdd550ed6386f57.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-214ee8b97dca856b.js +1 -0
- package/.next/trace +12 -12
- package/.next/types/routes.d.ts +2 -1
- package/.next/types/validator.ts +9 -0
- package/README.md +10 -1
- package/dist/cli/commands/auto-yes.d.ts.map +1 -1
- package/dist/cli/commands/auto-yes.js +12 -4
- package/dist/cli/commands/capture.d.ts +1 -0
- package/dist/cli/commands/capture.d.ts.map +1 -1
- package/dist/cli/commands/capture.js +115 -4
- package/dist/cli/commands/instances.d.ts +24 -0
- package/dist/cli/commands/instances.d.ts.map +1 -1
- package/dist/cli/commands/instances.js +44 -0
- package/dist/cli/commands/ls.d.ts.map +1 -1
- package/dist/cli/commands/ls.js +9 -3
- package/dist/cli/commands/respond.d.ts.map +1 -1
- package/dist/cli/commands/respond.js +13 -4
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +24 -14
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +66 -0
- package/dist/cli/commands/wait.d.ts +4 -1
- package/dist/cli/commands/wait.d.ts.map +1 -1
- package/dist/cli/commands/wait.js +82 -7
- package/dist/cli/config/agent-target-options.d.ts +46 -0
- package/dist/cli/config/agent-target-options.d.ts.map +1 -0
- package/dist/cli/config/agent-target-options.js +54 -0
- 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 +47 -14
- package/dist/cli/types/index.d.ts +16 -0
- package/dist/cli/types/index.d.ts.map +1 -1
- package/dist/cli/utils/api-client.d.ts +4 -1
- package/dist/cli/utils/api-client.d.ts.map +1 -1
- package/dist/cli/utils/api-client.js +43 -5
- package/dist/cli/utils/npm-runner.d.ts +24 -0
- package/dist/cli/utils/npm-runner.d.ts.map +1 -1
- package/dist/cli/utils/npm-runner.js +51 -1
- package/dist/cli/utils/pager.d.ts +28 -0
- package/dist/cli/utils/pager.d.ts.map +1 -0
- package/dist/cli/utils/pager.js +57 -0
- package/dist/cli/utils/pid-manager.d.ts +12 -2
- package/dist/cli/utils/pid-manager.d.ts.map +1 -1
- package/dist/cli/utils/pid-manager.js +76 -13
- package/dist/lib/detection/ansi.d.ts +30 -0
- package/dist/lib/detection/ansi.d.ts.map +1 -0
- package/dist/lib/detection/ansi.js +39 -0
- package/dist/lib/tmux/transcript-squeeze.d.ts +76 -0
- package/dist/lib/tmux/transcript-squeeze.d.ts.map +1 -0
- package/dist/lib/tmux/transcript-squeeze.js +96 -0
- package/dist/server/server.js +125 -14
- package/dist/server/src/config/tmux-pane-config.js +33 -1
- package/dist/server/src/lib/auto-yes-state.js +64 -0
- package/dist/server/src/lib/cli-tools/antigravity.js +2 -1
- package/dist/server/src/lib/cli-tools/codex.js +3 -2
- package/dist/server/src/lib/cli-tools/copilot.js +2 -2
- package/dist/server/src/lib/cli-tools/gemini.js +2 -2
- package/dist/server/src/lib/cli-tools/opencode.js +2 -2
- package/dist/server/src/lib/cli-tools/vibe-local.js +2 -2
- package/dist/server/src/lib/db/agent-instances-db.js +53 -0
- package/dist/server/src/lib/db/db-repository.js +66 -2
- package/dist/server/src/lib/db/db.js +12 -3
- 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/v52-orphaned-worktree-children.js +76 -0
- package/dist/server/src/lib/db/migrations/v53-worktree-aliases.js +53 -0
- package/dist/server/src/lib/db/migrations/v54-worktree-id-path-derived.js +204 -0
- package/dist/server/src/lib/db/migrations/v55-compact-churned-worktree-ids.js +207 -0
- package/dist/server/src/lib/db/migrations/worktree-child-tables.js +119 -0
- package/dist/server/src/lib/db/migrations/worktree-id-rename.js +153 -0
- package/dist/server/src/lib/db/worktree-alias-db.js +155 -0
- package/dist/server/src/lib/db/worktree-db.js +82 -77
- package/dist/server/src/lib/detection/cli-patterns.js +109 -2
- package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +10 -1
- package/dist/server/src/lib/detection/status-detector.js +52 -2
- package/dist/server/src/lib/git/worktree-id.js +145 -0
- package/dist/server/src/lib/git/worktree-redirect.js +155 -0
- package/dist/server/src/lib/git/worktrees.js +173 -27
- package/dist/server/src/lib/logger.js +13 -1
- package/dist/server/src/lib/polling/auto-yes-manager.js +3 -1
- package/dist/server/src/lib/polling/prompt-dedup.js +22 -0
- package/dist/server/src/lib/polling/response-checker.js +53 -13
- package/dist/server/src/lib/polling/response-dedup.js +22 -0
- package/dist/server/src/lib/polling/response-poller-core.js +107 -0
- package/dist/server/src/lib/polling/response-poller.js +4 -1
- package/dist/server/src/lib/response-extractor.js +22 -2
- package/dist/server/src/lib/session/claude-session.js +121 -37
- package/dist/server/src/lib/session/current-output-builder.js +14 -1
- package/dist/server/src/lib/session/session-start-error.js +125 -0
- package/dist/server/src/lib/session/worktree-session-reconcile.js +603 -0
- package/dist/server/src/lib/tasks/contract-parser.js +17 -1
- package/dist/server/src/lib/tasks/task-state-machine.js +23 -1
- package/dist/server/src/lib/tmux/control-mode-tmux-transport.js +7 -0
- package/dist/server/src/lib/tmux/read-mode-pager.js +161 -0
- package/dist/server/src/lib/tmux/read-mode.js +347 -0
- package/dist/server/src/lib/tmux/tmux-capture-cache.js +33 -0
- package/dist/server/src/lib/tmux/tmux-control-client.js +12 -0
- package/dist/server/src/lib/tmux/tmux-control-registry.js +55 -11
- package/dist/server/src/lib/tmux/tmux.js +104 -5
- package/dist/server/src/lib/ws-server.js +104 -1
- package/package.json +1 -1
- package/.next/server/chunks/1117.js +0 -1
- package/.next/server/chunks/1356.js +0 -4
- package/.next/server/chunks/1692.js +0 -1
- package/.next/server/chunks/4018.js +0 -1
- package/.next/server/chunks/4390.js +0 -1
- package/.next/server/chunks/8681.js +0 -1
- package/.next/static/chunks/744-d5e47fe16e7b9e06.js +0 -1
- package/.next/static/chunks/app/api/app/update/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/app/update-check/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/assistant/conversation/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/assistant/current-output/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/assistant/messages/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/assistant/session/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/assistant/start/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/assistant/terminal/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/assistant/tools/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/fs/browse/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/fs/recent-paths/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/hooks/agent-event/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/metrics/vibe/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/repositories/validate-path/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/skills/[id]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/skills/installations/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/skills/operations/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/skills/reindex/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/skills/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/templates/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/todos/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-8440b6c72bed83a1.js +0 -1
- package/.next/static/chunks/app/repositories/page-1ed1e5a542ecc168.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-12b3c5f32fc6094e.js +0 -1
- /package/.next/static/{-BSmW0Ae2YsxyCl_ue7_d → C01FQOE5FCmB3I_GhMa4_}/_buildManifest.js +0 -0
- /package/.next/static/{-BSmW0Ae2YsxyCl_ue7_d → C01FQOE5FCmB3I_GhMa4_}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=8807,exports.ids=[8807],exports.modules={28274:(a,b,c)=>{c.d(b,{AC:()=>e,BN:()=>i,Cs:()=>
|
|
1
|
+
"use strict";exports.id=8807,exports.ids=[8807],exports.modules={23718:(a,b,c)=>{c.d(b,{a1:()=>j,ko:()=>i});var d=c(55511),e=c(33873),f=c.n(e);function g(a){return a.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}let h="worktree";function i(a,b=[]){let c=b instanceof Set?b:new Set(b),e=g(f().basename(a))||h;if(!c.has(e))return e;let j=(0,d.createHash)("sha256").update(a).digest("hex");for(let a=8;a<=j.length;a+=8){let b=`${e}-${j.slice(0,a)}`;if(!c.has(b))return b}for(let a=2;;a++){let b=`${e}-${j}-${a}`;if(!c.has(b))return b}}function j(a,b){if(!a)return!1;let c=g(f().basename(b))||h;if(a===c)return!0;if(!a.startsWith(`${c}-`))return!1;let e=a.slice(c.length+1),i=(0,d.createHash)("sha256").update(b).digest("hex");return!!(e.length>0&&e.length%8==0&&e.length<=i.length&&i.startsWith(e))||/^-[0-9]+$/.test(e.slice(i.length))&&e.startsWith(i)}},28274:(a,b,c)=>{c.d(b,{AC:()=>e,BN:()=>i,Cs:()=>k,m0:()=>h,sB:()=>j,ug:()=>f});var d=c(15194);class e extends Error{constructor(a,b=d.Ab){super(`Worktree ${a} cannot have more than ${b} agent instances`),this.name="AgentInstanceLimitError"}}class f extends Error{constructor(a){super(a),this.name="InvalidAgentInstanceError"}}function g(a){let b=a.cli_tool_id,c=a.alias&&a.alias.length>0?a.alias:(0,d.hR)(a.cli_tool_id)?(0,d.oo)(b):a.cli_tool_id;return{id:a.instance_id,cliTool:b,alias:c,order:a.sort_order}}function h(a,b){return a.prepare(`
|
|
2
2
|
SELECT worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at
|
|
3
3
|
FROM agent_instances
|
|
4
4
|
WHERE worktree_id = ?
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
SELECT worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at
|
|
8
8
|
FROM agent_instances
|
|
9
9
|
WHERE worktree_id = ? AND instance_id = ?
|
|
10
|
-
`).get(b,c);return d?g(d):null}function j(a,b,c){if(c.length>d.Ab)throw new e(b);let g=new Set;for(let a of c){if(!(0,d.n6)(a.id))throw new f(`Invalid instance id: ${String(a.id)}`);if(!(0,d.hR)(a.cliTool))throw new f(`Invalid CLI tool: ${String(a.cliTool)}`);if("string"==typeof a.alias&&a.alias.length>d.pQ)throw new f(`Alias exceeds ${d.pQ} characters`);if(g.has(a.id))throw new f(`Duplicate instance id: ${a.id}`);g.add(a.id)}let h=Date.now();a.transaction(()=>{a.prepare("DELETE FROM agent_instances WHERE worktree_id = ?").run(b);let d=a.prepare(`
|
|
10
|
+
`).get(b,c);return d?g(d):null}function j(a,b,c,e){if(!c)return{ok:!0,cliToolId:e??null};let f=i(a,b,c);return f&&(0,d.hR)(f.cliTool)?e&&e!==f.cliTool?{ok:!1,instanceId:c,rosterCliTool:f.cliTool,requestedCliTool:e}:{ok:!0,cliToolId:f.cliTool}:e?{ok:!0,cliToolId:e}:(0,d.hR)(c)?{ok:!0,cliToolId:c}:{ok:!0,cliToolId:null}}function k(a,b,c){if(c.length>d.Ab)throw new e(b);let g=new Set;for(let a of c){if(!(0,d.n6)(a.id))throw new f(`Invalid instance id: ${String(a.id)}`);if(!(0,d.hR)(a.cliTool))throw new f(`Invalid CLI tool: ${String(a.cliTool)}`);if("string"==typeof a.alias&&a.alias.length>d.pQ)throw new f(`Alias exceeds ${d.pQ} characters`);if(g.has(a.id))throw new f(`Duplicate instance id: ${a.id}`);g.add(a.id)}let h=Date.now();a.transaction(()=>{a.prepare("DELETE FROM agent_instances WHERE worktree_id = ?").run(b);let d=a.prepare(`
|
|
11
11
|
INSERT INTO agent_instances
|
|
12
12
|
(worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at)
|
|
13
13
|
VALUES (?, ?, ?, ?, ?, ?)
|
|
@@ -78,342 +78,7 @@
|
|
|
78
78
|
AND status IN (${g})
|
|
79
79
|
ORDER BY updated_at DESC, created_at DESC, rowid DESC
|
|
80
80
|
LIMIT 1
|
|
81
|
-
`).get(b,c,d,+!!e,...f);return j?i(j):null}},
|
|
82
|
-
CREATE TABLE IF NOT EXISTS worktrees (
|
|
83
|
-
id TEXT PRIMARY KEY,
|
|
84
|
-
name TEXT NOT NULL,
|
|
85
|
-
path TEXT NOT NULL UNIQUE,
|
|
86
|
-
last_message_summary TEXT,
|
|
87
|
-
updated_at INTEGER
|
|
88
|
-
);
|
|
89
|
-
`),a.exec(`
|
|
90
|
-
CREATE INDEX IF NOT EXISTS idx_worktrees_updated_at
|
|
91
|
-
ON worktrees(updated_at DESC);
|
|
92
|
-
`),a.exec(`
|
|
93
|
-
CREATE TABLE IF NOT EXISTS chat_messages (
|
|
94
|
-
id TEXT PRIMARY KEY,
|
|
95
|
-
worktree_id TEXT NOT NULL,
|
|
96
|
-
role TEXT NOT NULL CHECK(role IN ('user', 'assistant')),
|
|
97
|
-
content TEXT NOT NULL,
|
|
98
|
-
summary TEXT,
|
|
99
|
-
timestamp INTEGER NOT NULL,
|
|
100
|
-
log_file_name TEXT,
|
|
101
|
-
request_id TEXT,
|
|
102
|
-
message_type TEXT DEFAULT 'normal',
|
|
103
|
-
prompt_data TEXT,
|
|
104
|
-
cli_tool_id TEXT DEFAULT 'claude',
|
|
105
|
-
archived INTEGER DEFAULT 0,
|
|
106
|
-
|
|
107
|
-
FOREIGN KEY (worktree_id) REFERENCES worktrees(id) ON DELETE CASCADE
|
|
108
|
-
);
|
|
109
|
-
`),a.exec(`
|
|
110
|
-
CREATE INDEX IF NOT EXISTS idx_messages_worktree_time
|
|
111
|
-
ON chat_messages(worktree_id, timestamp DESC);
|
|
112
|
-
`),a.exec(`
|
|
113
|
-
CREATE INDEX IF NOT EXISTS idx_messages_request_id
|
|
114
|
-
ON chat_messages(request_id);
|
|
115
|
-
`),a.exec(`
|
|
116
|
-
CREATE INDEX IF NOT EXISTS idx_messages_type
|
|
117
|
-
ON chat_messages(message_type, worktree_id);
|
|
118
|
-
`),a.exec(`
|
|
119
|
-
CREATE INDEX IF NOT EXISTS idx_messages_cli_tool
|
|
120
|
-
ON chat_messages(worktree_id, cli_tool_id, timestamp DESC);
|
|
121
|
-
`),a.exec(`
|
|
122
|
-
CREATE INDEX IF NOT EXISTS idx_messages_worktree_role_archived_time
|
|
123
|
-
ON chat_messages(worktree_id, role, archived, timestamp DESC);
|
|
124
|
-
`),a.exec(`
|
|
125
|
-
CREATE TABLE IF NOT EXISTS session_states (
|
|
126
|
-
worktree_id TEXT NOT NULL,
|
|
127
|
-
cli_tool_id TEXT NOT NULL DEFAULT 'claude',
|
|
128
|
-
last_captured_line INTEGER DEFAULT 0,
|
|
129
|
-
|
|
130
|
-
PRIMARY KEY (worktree_id, cli_tool_id),
|
|
131
|
-
FOREIGN KEY (worktree_id) REFERENCES worktrees(id) ON DELETE CASCADE
|
|
132
|
-
);
|
|
133
|
-
`)}c.d(b,{AC:()=>k.AC,Tu:()=>as,ug:()=>k.ug,eP:()=>au,mg:()=>at,lm:()=>m,af:()=>ag,KG:()=>C,cD:()=>X,Jj:()=>Y,YX:()=>i,G4:()=>S,hL:()=>$,qp:()=>U,hl:()=>an,To:()=>q,oH:()=>f.oH,UT:()=>ax.UT,py:()=>z,rY:()=>al,yy:()=>H,pE:()=>f.pE,z2:()=>ae,cP:()=>s,DF:()=>f.DF,lA:()=>f.lA,Qp:()=>f.Qp,th:()=>af.th,oZ:()=>e.oZ,ZP:()=>j,Ys:()=>B,vg:()=>J,Rm:()=>e.Rm,C8:()=>ao,u$:()=>am,MH:()=>ax.MH,BN:()=>k.BN,m0:()=>k.m0,Tk:()=>x,iT:()=>Q,gp:()=>R,yE:()=>Z,BE:()=>W,qK:()=>ac,p4:()=>e.p4,r8:()=>f.r8,of:()=>aa,DN:()=>p,pZ:()=>o,kA:()=>f.kA,VL:()=>f.VL,CF:()=>af.CF,NV:()=>e.NV,ce:()=>ab,WZ:()=>aq,y1:()=>g,gg:()=>ax.gg,Nr:()=>y,ob:()=>w,fr:()=>F,J6:()=>ap,Ui:()=>e.Ui,P9:()=>e.P9,eN:()=>G,vi:()=>e.vi,uJ:()=>e.uJ,s4:()=>d,yT:()=>D,Vk:()=>ax.Vk,Mt:()=>ar,UE:()=>aw,PL:()=>f.PL,jp:()=>f.jp,nQ:()=>t,yb:()=>K,GA:()=>e.GA,Cs:()=>k.Cs,xR:()=>T,az:()=>_,nZ:()=>V,PP:()=>ad,Dx:()=>e.Dx,O:()=>e.O,EU:()=>f.EU,HZ:()=>e.HZ,UY:()=>r,cw:()=>f.cw,jJ:()=>af.jJ,DC:()=>e.DC,gb:()=>h,yB:()=>e.yB,uy:()=>A,s:()=>e.s,iu:()=>e.iu,hq:()=>e.hq,z1:()=>e.z1,bl:()=>I,jA:()=>af.jA,ZL:()=>e.ZL});var e=c(73753),f=c(52660);function g(a,b,c="claude"){let d=a.prepare(`
|
|
134
|
-
SELECT worktree_id, cli_tool_id, instance_id, last_captured_line, in_progress_message_id
|
|
135
|
-
FROM session_states
|
|
136
|
-
WHERE worktree_id = ? AND instance_id = ?
|
|
137
|
-
`).get(b,c);return d?{worktreeId:d.worktree_id,cliToolId:d.cli_tool_id,instanceId:d.instance_id,lastCapturedLine:d.last_captured_line,inProgressMessageId:d.in_progress_message_id||null}:null}function h(a,b,c,d,e){let f=e??c;a.prepare(`
|
|
138
|
-
INSERT INTO session_states (worktree_id, cli_tool_id, instance_id, last_captured_line)
|
|
139
|
-
VALUES (?, ?, ?, ?)
|
|
140
|
-
ON CONFLICT(worktree_id, instance_id) DO UPDATE SET
|
|
141
|
-
last_captured_line = excluded.last_captured_line,
|
|
142
|
-
cli_tool_id = excluded.cli_tool_id
|
|
143
|
-
`).run(b,c,f,d)}function i(a,b,c,d){let e=d??c;a.prepare(`
|
|
144
|
-
INSERT INTO session_states (worktree_id, cli_tool_id, instance_id, last_captured_line, in_progress_message_id)
|
|
145
|
-
VALUES (?, ?, ?, 0, ?)
|
|
146
|
-
ON CONFLICT(worktree_id, instance_id) DO UPDATE SET
|
|
147
|
-
in_progress_message_id = excluded.in_progress_message_id,
|
|
148
|
-
cli_tool_id = excluded.cli_tool_id
|
|
149
|
-
`).run(b,c,e,null)}function j(a,b,c,d){d?a.prepare(`
|
|
150
|
-
DELETE FROM session_states
|
|
151
|
-
WHERE worktree_id = ? AND instance_id = ?
|
|
152
|
-
`).run(b,d):c?a.prepare(`
|
|
153
|
-
DELETE FROM session_states
|
|
154
|
-
WHERE worktree_id = ? AND cli_tool_id = ?
|
|
155
|
-
`).run(b,c):a.prepare(`
|
|
156
|
-
DELETE FROM session_states
|
|
157
|
-
WHERE worktree_id = ?
|
|
158
|
-
`).run(b)}var k=c(28274),l=c(55511);class m extends Error{constructor(a,b,c){super(a),this.code=b,this.cause=c,this.name="MemoDbError"}}function n(a){return{id:a.id,worktreeId:a.worktree_id,title:a.title,content:a.content,position:a.position,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at)}}function o(a,b){return a.prepare(`
|
|
159
|
-
SELECT id, worktree_id, title, content, position, created_at, updated_at
|
|
160
|
-
FROM worktree_memos
|
|
161
|
-
WHERE worktree_id = ?
|
|
162
|
-
ORDER BY position ASC
|
|
163
|
-
`).all(b).map(n)}function p(a,b){let c=a.prepare(`
|
|
164
|
-
SELECT id, worktree_id, title, content, position, created_at, updated_at
|
|
165
|
-
FROM worktree_memos
|
|
166
|
-
WHERE id = ?
|
|
167
|
-
`).get(b);return c?n(c):null}function q(a,b,c){let d=(0,l.randomUUID)(),e=Date.now(),f=c.title??"Memo",g=c.content??"",h=a.prepare(`
|
|
168
|
-
INSERT INTO worktree_memos (id, worktree_id, title, content, position, created_at, updated_at)
|
|
169
|
-
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
170
|
-
`);try{h.run(d,b,f,g,c.position,e,e)}catch(a){if(a instanceof Error&&a.message.includes("UNIQUE constraint"))throw new m(`Memo position ${c.position} is already in use for worktree "${b}"`,"DUPLICATE_POSITION",a);throw a}return{id:d,worktreeId:b,title:f,content:g,position:c.position,createdAt:new Date(e),updatedAt:new Date(e)}}function r(a,b,c){let d=Date.now(),e=["updated_at = ?"],f=[d];void 0!==c.title&&(e.push("title = ?"),f.push(c.title)),void 0!==c.content&&(e.push("content = ?"),f.push(c.content)),f.push(b),a.prepare(`
|
|
171
|
-
UPDATE worktree_memos
|
|
172
|
-
SET ${e.join(", ")}
|
|
173
|
-
WHERE id = ?
|
|
174
|
-
`).run(...f)}function s(a,b){a.prepare(`
|
|
175
|
-
DELETE FROM worktree_memos
|
|
176
|
-
WHERE id = ?
|
|
177
|
-
`).run(b)}function t(a,b,c){if(0===c.length)return;let d=Date.now();a.transaction(()=>{let b=a.prepare(`
|
|
178
|
-
UPDATE worktree_memos
|
|
179
|
-
SET position = -1 - position
|
|
180
|
-
WHERE id = ?
|
|
181
|
-
`);for(let a of c)b.run(a);let e=a.prepare(`
|
|
182
|
-
UPDATE worktree_memos
|
|
183
|
-
SET position = ?, updated_at = ?
|
|
184
|
-
WHERE id = ?
|
|
185
|
-
`);c.forEach((a,b)=>{e.run(b,d,a)})})()}let u=`
|
|
186
|
-
SELECT
|
|
187
|
-
t.id,
|
|
188
|
-
t.repository_id,
|
|
189
|
-
r.name AS repository_name,
|
|
190
|
-
r.display_name AS repository_display_name,
|
|
191
|
-
t.content,
|
|
192
|
-
t.done,
|
|
193
|
-
t.position,
|
|
194
|
-
t.created_at,
|
|
195
|
-
t.updated_at
|
|
196
|
-
FROM repository_todos t
|
|
197
|
-
JOIN repositories r ON r.id = t.repository_id
|
|
198
|
-
`;function v(a){return{id:a.id,repositoryId:a.repository_id,repositoryName:a.repository_name,repositoryDisplayName:a.repository_display_name||void 0,content:a.content,done:1===a.done,position:a.position,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at)}}function w(a,b){return a.prepare(`
|
|
199
|
-
${u}
|
|
200
|
-
WHERE t.repository_id = ?
|
|
201
|
-
ORDER BY t.position ASC, t.created_at ASC
|
|
202
|
-
`).all(b).map(v)}function x(a){return a.prepare(`
|
|
203
|
-
${u}
|
|
204
|
-
ORDER BY
|
|
205
|
-
COALESCE(NULLIF(TRIM(r.display_name), ''), r.name) COLLATE NOCASE ASC,
|
|
206
|
-
t.position ASC,
|
|
207
|
-
t.created_at ASC,
|
|
208
|
-
t.id ASC
|
|
209
|
-
`).all().map(v)}function y(a,b){let c=a.prepare(`
|
|
210
|
-
${u}
|
|
211
|
-
WHERE t.id = ?
|
|
212
|
-
`).get(b);return c?v(c):null}function z(a,b,c){let d=(0,l.randomUUID)(),e=Date.now();a.prepare(`
|
|
213
|
-
INSERT INTO repository_todos (id, repository_id, content, done, position, created_at, updated_at)
|
|
214
|
-
VALUES (?, ?, ?, 0, ?, ?, ?)
|
|
215
|
-
`).run(d,b,c.content,c.position,e,e);let f=y(a,d);if(!f)throw Error(`Failed to load created todo '${d}'`);return f}function A(a,b,c){let d=Date.now(),e=["updated_at = ?"],f=[d];void 0!==c.content&&(e.push("content = ?"),f.push(c.content)),void 0!==c.done&&(e.push("done = ?"),f.push(+!!c.done)),f.push(b),a.prepare(`
|
|
216
|
-
UPDATE repository_todos
|
|
217
|
-
SET ${e.join(", ")}
|
|
218
|
-
WHERE id = ?
|
|
219
|
-
`).run(...f)}function B(a,b){a.prepare(`
|
|
220
|
-
DELETE FROM repository_todos
|
|
221
|
-
WHERE id = ?
|
|
222
|
-
`).run(b)}let C=["todo","doing","done"];function D(a){return"todo"===a||"doing"===a||"done"===a}function E(a){var b,c;let d=(b=a.status,c=a.done,D(b)?b:1===c?"done":"todo");return{id:a.id,worktreeId:a.worktree_id,content:a.content,detail:a.detail??"",status:d,done:"done"===d,position:a.position,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at)}}function F(a,b){return a.prepare(`
|
|
223
|
-
SELECT id, worktree_id, content, detail, done, status, position, created_at, updated_at
|
|
224
|
-
FROM worktree_todos
|
|
225
|
-
WHERE worktree_id = ?
|
|
226
|
-
ORDER BY position ASC, created_at ASC
|
|
227
|
-
`).all(b).map(E)}function G(a,b){let c=a.prepare(`
|
|
228
|
-
SELECT id, worktree_id, content, detail, done, status, position, created_at, updated_at
|
|
229
|
-
FROM worktree_todos
|
|
230
|
-
WHERE id = ?
|
|
231
|
-
`).get(b);return c?E(c):null}function H(a,b,c){let d=(0,l.randomUUID)(),e=Date.now(),f=c.status??"todo",g=c.detail??"";return a.prepare(`
|
|
232
|
-
INSERT INTO worktree_todos (id, worktree_id, content, detail, done, status, position, created_at, updated_at)
|
|
233
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
234
|
-
`).run(d,b,c.content,g,+("done"===f),f,c.position,e,e),{id:d,worktreeId:b,content:c.content,detail:g,status:f,done:"done"===f,position:c.position,createdAt:new Date(e),updatedAt:new Date(e)}}function I(a,b,c){let d,e=Date.now(),f=["updated_at = ?"],g=[e];void 0!==c.content&&(f.push("content = ?"),g.push(c.content)),void 0!==c.detail&&(f.push("detail = ?"),g.push(c.detail)),void 0!==c.status?d=c.status:void 0!==c.done&&(d=c.done?"done":"todo"),void 0!==d&&(f.push("status = ?"),g.push(d),f.push("done = ?"),g.push(+("done"===d))),g.push(b),a.prepare(`
|
|
235
|
-
UPDATE worktree_todos
|
|
236
|
-
SET ${f.join(", ")}
|
|
237
|
-
WHERE id = ?
|
|
238
|
-
`).run(...g)}function J(a,b){a.prepare(`
|
|
239
|
-
DELETE FROM worktree_todos
|
|
240
|
-
WHERE id = ?
|
|
241
|
-
`).run(b)}function K(a,b,c){if(0===c.length)return;let d=Date.now();a.transaction(()=>{let e=a.prepare(`
|
|
242
|
-
UPDATE worktree_todos
|
|
243
|
-
SET position = -1 - position
|
|
244
|
-
WHERE id = ? AND worktree_id = ?
|
|
245
|
-
`);for(let a of c)e.run(a,b);let f=a.prepare(`
|
|
246
|
-
UPDATE worktree_todos
|
|
247
|
-
SET position = ?, updated_at = ?
|
|
248
|
-
WHERE id = ? AND worktree_id = ?
|
|
249
|
-
`);c.forEach((a,c)=>{f.run(c,d,a,b)})})()}function L(a,b){return Buffer.byteLength(a,"utf-8")<=b?a:Buffer.from(a,"utf-8").subarray(0,b).toString("utf-8")}function M(a){return{id:a.id,repositoryId:a.repository_id,cliToolId:a.cli_tool_id,workingDirectory:a.working_directory,executionMode:a.execution_mode??"interactive",resumeSessionId:a.resume_session_id??void 0,lastExecutionId:a.last_execution_id??void 0,sessionName:a.session_name??void 0,status:"idle"===a.status?"stopped":a.status,lastStartedAt:a.last_started_at?new Date(a.last_started_at):void 0,lastStoppedAt:a.last_stopped_at?new Date(a.last_stopped_at):void 0,contextSentAt:a.context_sent_at?new Date(a.context_sent_at):void 0,contextSnapshot:a.context_snapshot??void 0,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at),archived:1===a.archived}}function N(a){return{id:a.id,conversationId:a.conversation_id,role:a.role,content:a.content,summary:a.summary??void 0,timestamp:new Date(a.timestamp),messageType:a.message_type,deliveryStatus:a.delivery_status??void 0,archived:1===a.archived}}function O(a){return{id:a.id,conversationId:a.conversation_id,cliToolId:a.cli_tool_id,status:a.status,pid:a.pid??void 0,commandLine:a.command_line,promptText:a.prompt_text,stdoutText:a.stdout_text??void 0,stderrText:a.stderr_text??void 0,finalMessageText:a.final_message_text??void 0,exitCode:a.exit_code,resumeSessionIdBefore:a.resume_session_id_before??void 0,resumeSessionIdAfter:a.resume_session_id_after??void 0,startedAt:a.started_at?new Date(a.started_at):void 0,finishedAt:a.finished_at?new Date(a.finished_at):void 0,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at)}}function P(a,b,c){a.prepare(`
|
|
250
|
-
UPDATE assistant_conversations
|
|
251
|
-
SET updated_at = ?
|
|
252
|
-
WHERE id = ?
|
|
253
|
-
`).run(c.getTime(),b)}function Q(a,b,c={}){let d=`
|
|
254
|
-
SELECT *
|
|
255
|
-
FROM assistant_conversations
|
|
256
|
-
WHERE id = ?
|
|
257
|
-
${c.includeArchived?"":"AND archived = 0"}
|
|
258
|
-
LIMIT 1
|
|
259
|
-
`,e=a.prepare(d).get(b);return e?M(e):null}function R(a,b,c,d={}){let e=`
|
|
260
|
-
SELECT *
|
|
261
|
-
FROM assistant_conversations
|
|
262
|
-
WHERE repository_id = ?
|
|
263
|
-
AND cli_tool_id = ?
|
|
264
|
-
${d.includeArchived?"":"AND archived = 0"}
|
|
265
|
-
LIMIT 1
|
|
266
|
-
`,f=a.prepare(e).get(b,c);return f?M(f):null}function S(a,b){let c=(0,l.randomUUID)(),d=Date.now();return a.prepare(`
|
|
267
|
-
INSERT INTO assistant_conversations (
|
|
268
|
-
id, repository_id, cli_tool_id, working_directory, execution_mode, resume_session_id,
|
|
269
|
-
last_execution_id, session_name, status,
|
|
270
|
-
last_started_at, last_stopped_at, context_sent_at, created_at, updated_at, archived
|
|
271
|
-
)
|
|
272
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0)
|
|
273
|
-
`).run(c,b.repositoryId,b.cliToolId,b.workingDirectory,b.executionMode??"interactive",b.resumeSessionId??null,b.lastExecutionId??null,b.sessionName??null,b.status??"stopped",b.lastStartedAt?.getTime()??null,b.lastStoppedAt?.getTime()??null,b.contextSentAt?.getTime()??null,d,d),{id:c,repositoryId:b.repositoryId,cliToolId:b.cliToolId,workingDirectory:b.workingDirectory,executionMode:b.executionMode??"interactive",resumeSessionId:b.resumeSessionId,lastExecutionId:b.lastExecutionId,sessionName:b.sessionName,status:b.status??"stopped",contextSentAt:b.contextSentAt,lastStartedAt:b.lastStartedAt,lastStoppedAt:b.lastStoppedAt,createdAt:new Date(d),updatedAt:new Date(d),archived:!1}}function T(a,b,c){let d=[],e=[];void 0!==c.workingDirectory&&(d.push("working_directory = ?"),e.push(c.workingDirectory)),void 0!==c.executionMode&&(d.push("execution_mode = ?"),e.push(c.executionMode)),void 0!==c.resumeSessionId&&(d.push("resume_session_id = ?"),e.push(c.resumeSessionId)),void 0!==c.lastExecutionId&&(d.push("last_execution_id = ?"),e.push(c.lastExecutionId)),void 0!==c.sessionName&&(d.push("session_name = ?"),e.push(c.sessionName)),void 0!==c.status&&(d.push("status = ?"),e.push(c.status)),void 0!==c.lastStartedAt&&(d.push("last_started_at = ?"),e.push(c.lastStartedAt?.getTime()??null)),void 0!==c.lastStoppedAt&&(d.push("last_stopped_at = ?"),e.push(c.lastStoppedAt?.getTime()??null)),void 0!==c.contextSentAt&&(d.push("context_sent_at = ?"),e.push(c.contextSentAt?.getTime()??null)),void 0!==c.contextSnapshot&&(d.push("context_snapshot = ?"),e.push(c.contextSnapshot??null)),void 0!==c.archived&&(d.push("archived = ?"),e.push(+!!c.archived));let f=c.updatedAt??new Date;return d.push("updated_at = ?"),e.push(f.getTime()),e.push(b),a.prepare(`
|
|
274
|
-
UPDATE assistant_conversations
|
|
275
|
-
SET ${d.join(", ")}
|
|
276
|
-
WHERE id = ?
|
|
277
|
-
`).run(...e),Q(a,b,{includeArchived:!0})}function U(a,b){let c=(0,l.randomUUID)();return a.prepare(`
|
|
278
|
-
INSERT INTO assistant_messages (
|
|
279
|
-
id, conversation_id, role, content, summary, timestamp, message_type, delivery_status, archived
|
|
280
|
-
)
|
|
281
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, 0)
|
|
282
|
-
`).run(c,b.conversationId,b.role,b.content,b.summary??null,b.timestamp.getTime(),b.messageType,b.deliveryStatus??null),P(a,b.conversationId,b.timestamp),{id:c,...b,archived:!1}}function V(a,b,c){a.prepare(`
|
|
283
|
-
UPDATE assistant_messages
|
|
284
|
-
SET delivery_status = ?
|
|
285
|
-
WHERE id = ?
|
|
286
|
-
`).run(c,b)}function W(a,b,c={}){let{limit:d=200,before:e,includeArchived:f=!1}=c,g=[b,e?.getTime()??null,e?.getTime()??null],h=`
|
|
287
|
-
SELECT *
|
|
288
|
-
FROM assistant_messages
|
|
289
|
-
WHERE conversation_id = ?
|
|
290
|
-
AND (? IS NULL OR timestamp < ?)
|
|
291
|
-
`;return f||(h+=" AND archived = 0"),h+=" ORDER BY timestamp DESC LIMIT ?",g.push(d),a.prepare(h).all(...g).map(N)}function X(a,b){return a.prepare(`
|
|
292
|
-
UPDATE assistant_messages
|
|
293
|
-
SET archived = 1
|
|
294
|
-
WHERE conversation_id = ?
|
|
295
|
-
AND archived = 0
|
|
296
|
-
`).run(b).changes}function Y(a,b,c){return a.prepare(`
|
|
297
|
-
UPDATE assistant_messages
|
|
298
|
-
SET archived = 1
|
|
299
|
-
WHERE conversation_id = ?
|
|
300
|
-
AND archived = 0
|
|
301
|
-
AND timestamp >= ?
|
|
302
|
-
`).run(b,c).changes}function Z(a,b){let c=a.prepare(`
|
|
303
|
-
SELECT * FROM assistant_messages WHERE id = ?
|
|
304
|
-
`).get(b);return c?N(c):null}function $(a,b){let c=(0,l.randomUUID)(),d=Date.now();return a.prepare(`
|
|
305
|
-
INSERT INTO assistant_executions (
|
|
306
|
-
id, conversation_id, cli_tool_id, status, pid, command_line, prompt_text,
|
|
307
|
-
stdout_text, stderr_text, final_message_text, exit_code, resume_session_id_before,
|
|
308
|
-
resume_session_id_after, started_at, finished_at, created_at, updated_at
|
|
309
|
-
)
|
|
310
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
311
|
-
`).run(c,b.conversationId,b.cliToolId,b.status??"queued",b.pid??null,b.commandLine,L(b.promptText,65536),L(b.stdoutText??"",262144)||null,L(b.stderrText??"",262144)||null,b.finalMessageText?L(b.finalMessageText,65536):null,b.exitCode??null,b.resumeSessionIdBefore??null,b.resumeSessionIdAfter??null,b.startedAt?.getTime()??null,b.finishedAt?.getTime()??null,d,d),P(a,b.conversationId,new Date(d)),{id:c,conversationId:b.conversationId,cliToolId:b.cliToolId,status:b.status??"queued",pid:b.pid,commandLine:b.commandLine,promptText:L(b.promptText,65536),stdoutText:b.stdoutText?L(b.stdoutText,262144):void 0,stderrText:b.stderrText?L(b.stderrText,262144):void 0,finalMessageText:b.finalMessageText?L(b.finalMessageText,65536):void 0,exitCode:b.exitCode,resumeSessionIdBefore:b.resumeSessionIdBefore,resumeSessionIdAfter:b.resumeSessionIdAfter,startedAt:b.startedAt,finishedAt:b.finishedAt,createdAt:new Date(d),updatedAt:new Date(d)}}function _(a,b,c){let d=[],e=[];void 0!==c.status&&(d.push("status = ?"),e.push(c.status)),void 0!==c.pid&&(d.push("pid = ?"),e.push(c.pid)),void 0!==c.stdoutText&&(d.push("stdout_text = ?"),e.push(c.stdoutText?L(c.stdoutText,262144):null)),void 0!==c.stderrText&&(d.push("stderr_text = ?"),e.push(c.stderrText?L(c.stderrText,262144):null)),void 0!==c.finalMessageText&&(d.push("final_message_text = ?"),e.push(c.finalMessageText?L(c.finalMessageText,65536):null)),void 0!==c.exitCode&&(d.push("exit_code = ?"),e.push(c.exitCode)),void 0!==c.resumeSessionIdAfter&&(d.push("resume_session_id_after = ?"),e.push(c.resumeSessionIdAfter)),void 0!==c.startedAt&&(d.push("started_at = ?"),e.push(c.startedAt?.getTime()??null)),void 0!==c.finishedAt&&(d.push("finished_at = ?"),e.push(c.finishedAt?.getTime()??null));let f=c.updatedAt??new Date;return d.push("updated_at = ?"),e.push(f.getTime(),b),a.prepare(`
|
|
312
|
-
UPDATE assistant_executions
|
|
313
|
-
SET ${d.join(", ")}
|
|
314
|
-
WHERE id = ?
|
|
315
|
-
`).run(...e),function(a,b){let c=a.prepare(`
|
|
316
|
-
SELECT *
|
|
317
|
-
FROM assistant_executions
|
|
318
|
-
WHERE id = ?
|
|
319
|
-
LIMIT 1
|
|
320
|
-
`).get(b);return c?O(c):null}(a,b)}function aa(a,b){let c=a.prepare(`
|
|
321
|
-
SELECT *
|
|
322
|
-
FROM assistant_executions
|
|
323
|
-
WHERE conversation_id = ?
|
|
324
|
-
ORDER BY created_at DESC
|
|
325
|
-
LIMIT 1
|
|
326
|
-
`).get(b);return c?O(c):null}function ab(a,b){let c=a.prepare(`
|
|
327
|
-
SELECT *
|
|
328
|
-
FROM assistant_executions
|
|
329
|
-
WHERE conversation_id = ?
|
|
330
|
-
AND status = 'running'
|
|
331
|
-
ORDER BY created_at DESC
|
|
332
|
-
LIMIT 1
|
|
333
|
-
`).get(b);return c?O(c):null}function ac(a,b){let c=a.prepare(`
|
|
334
|
-
SELECT conversation_id, last_captured_line, in_progress_message_id
|
|
335
|
-
FROM assistant_session_states
|
|
336
|
-
WHERE conversation_id = ?
|
|
337
|
-
`).get(b);return c?{conversationId:c.conversation_id,lastCapturedLine:c.last_captured_line,inProgressMessageId:c.in_progress_message_id}:null}function ad(a,b,c,d){a.prepare(`
|
|
338
|
-
INSERT INTO assistant_session_states (conversation_id, last_captured_line, in_progress_message_id)
|
|
339
|
-
VALUES (?, ?, ?)
|
|
340
|
-
ON CONFLICT(conversation_id) DO UPDATE SET
|
|
341
|
-
last_captured_line = excluded.last_captured_line,
|
|
342
|
-
in_progress_message_id = excluded.in_progress_message_id
|
|
343
|
-
`).run(b,c,d??null)}function ae(a,b){a.prepare(`
|
|
344
|
-
DELETE FROM assistant_session_states
|
|
345
|
-
WHERE conversation_id = ?
|
|
346
|
-
`).run(b)}c(34129);var af=c(43167);let ag=["manual","wait","api","task"],ah=`
|
|
347
|
-
id, worktree_id, instance_id, task_id, trigger, status, base_ref, started_at, finished_at
|
|
348
|
-
`,ai=`
|
|
349
|
-
id, run_id, gate_id, command, status, exit_code, duration_ms, log_tail, started_at, finished_at
|
|
350
|
-
`;function aj(a){return{id:a.id,worktreeId:a.worktree_id,instanceId:a.instance_id,taskId:a.task_id,trigger:a.trigger,status:a.status,baseRef:a.base_ref,startedAt:new Date(a.started_at),finishedAt:null===a.finished_at?null:new Date(a.finished_at)}}function ak(a){return{id:a.id,runId:a.run_id,gateId:a.gate_id,command:a.command,status:a.status,exitCode:a.exit_code,durationMs:a.duration_ms,logTail:a.log_tail,startedAt:new Date(a.started_at),finishedAt:null===a.finished_at?null:new Date(a.finished_at),timingsMeasured:null!==a.finished_at&&null!==a.duration_ms&&a.finished_at-a.started_at===a.duration_ms}}function al(a,b){let c=Date.now(),d=a.prepare(`
|
|
351
|
-
INSERT INTO verification_runs (
|
|
352
|
-
worktree_id, instance_id, task_id, trigger, status, base_ref, started_at, finished_at
|
|
353
|
-
)
|
|
354
|
-
VALUES (?, ?, ?, ?, 'running', ?, ?, NULL)
|
|
355
|
-
`).run(b.worktreeId,b.instanceId??null,b.taskId??null,b.trigger,b.baseRef??null,c),e=a.prepare(`SELECT ${ah} FROM verification_runs WHERE id = ?`).get(Number(d.lastInsertRowid));if(!e)throw Error("Failed to persist verification run");return aj(e)}function am(a,b,c){if(0===a.prepare("UPDATE verification_runs SET status = ?, finished_at = ? WHERE id = ?").run(c,Date.now(),b).changes)throw Error(`Verification run ${b} not found`)}function an(a,b,c){let d=Date.now(),e=a.prepare(`
|
|
356
|
-
INSERT INTO verification_gate_results (
|
|
357
|
-
run_id, gate_id, command, status, exit_code, duration_ms, log_tail, started_at, finished_at
|
|
358
|
-
)
|
|
359
|
-
VALUES (?, ?, ?, 'running', NULL, NULL, NULL, ?, NULL)
|
|
360
|
-
`).run(b,c.gateId,c.command,d),f=a.prepare(`SELECT ${ai} FROM verification_gate_results WHERE id = ?`).get(Number(e.lastInsertRowid));if(!f)throw Error("Failed to persist verification gate result");return ak(f)}function ao(a,b,c){if(0===a.prepare(`
|
|
361
|
-
UPDATE verification_gate_results
|
|
362
|
-
SET status = ?, exit_code = ?, duration_ms = ?, log_tail = ?,
|
|
363
|
-
started_at = COALESCE(?, started_at),
|
|
364
|
-
finished_at = ?
|
|
365
|
-
WHERE id = ?
|
|
366
|
-
`).run(c.status,c.exitCode??null,c.durationMs??null,c.logTail??null,c.executionWindow?.startedAt??null,c.executionWindow?.finishedAt??Date.now(),b).changes)throw Error(`Verification gate result ${b} not found`)}function ap(a,b){let c=a.prepare(`SELECT ${ah} FROM verification_runs WHERE id = ?`).get(b);if(!c)return null;let d=a.prepare(`
|
|
367
|
-
SELECT ${ai} FROM verification_gate_results
|
|
368
|
-
WHERE run_id = ?
|
|
369
|
-
ORDER BY started_at ASC, id ASC
|
|
370
|
-
`).all(b);return{...aj(c),gates:d.map(ak)}}function aq(a,b){let c=a.prepare(`
|
|
371
|
-
SELECT ${ah} FROM verification_runs
|
|
372
|
-
WHERE worktree_id = ? AND status = 'running'
|
|
373
|
-
ORDER BY id DESC
|
|
374
|
-
LIMIT 1
|
|
375
|
-
`).get(b);return c?aj(c):null}function ar(a,b,c=20){return a.prepare(`
|
|
376
|
-
SELECT ${ah} FROM verification_runs
|
|
377
|
-
WHERE worktree_id = ?
|
|
378
|
-
ORDER BY started_at DESC, id DESC
|
|
379
|
-
LIMIT ?
|
|
380
|
-
`).all(b,c).map(aj)}let as=50,at=500,au=90;function av(a,b,c,d){return void 0!==a&&Number.isFinite(a)?Math.min(Math.max(Math.trunc(a),c),d):b}function aw(a,b={}){let c=av(b.limit,as,1,at),d=[],e=[];if(void 0!==b.worktreeId&&(d.push("worktree_id = ?"),e.push(b.worktreeId)),void 0!==b.days){let a=av(b.days,au,1,au);d.push("started_at >= ?"),e.push(Date.now()-864e5*a)}let f=d.length>0?`WHERE ${d.join(" AND ")}`:"",g=a.prepare(`
|
|
381
|
-
SELECT ${ah} FROM verification_runs
|
|
382
|
-
${f}
|
|
383
|
-
ORDER BY started_at DESC, id DESC
|
|
384
|
-
LIMIT ?
|
|
385
|
-
`).all(...e,c);if(0===g.length)return[];let h=g.map(()=>"?").join(", "),i=a.prepare(`
|
|
386
|
-
SELECT run_id, gate_id, status, exit_code, duration_ms
|
|
387
|
-
FROM verification_gate_results
|
|
388
|
-
WHERE run_id IN (${h})
|
|
389
|
-
ORDER BY started_at ASC, id ASC
|
|
390
|
-
`).all(...g.map(a=>a.id)),j=new Map;for(let a of i){let b={gateId:a.gate_id,status:a.status,exitCode:a.exit_code,durationMs:a.duration_ms},c=j.get(a.run_id);c?c.push(b):j.set(a.run_id,[b])}return g.map(a=>({...aj(a),gates:j.get(a.id)??[]}))}var ax=c(48524)},92046:(a,b,c)=>{c.d(b,{vI:()=>m});var d=c(33873),e=c.n(d);function f(a){try{let b=a.prepare("SELECT MAX(version) as version FROM schema_version").get();return b?.version??0}catch{return 0}}function g(a){let b=c(29021),d=a;for(;d!==e().dirname(d);){let a=e().join(d,".git");if(b.existsSync(a)){let c=b.statSync(a);if(c.isDirectory())return d;if(c.isFile()){let c=b.readFileSync(a,"utf-8").trim().match(/^gitdir:\s*(.+)$/);if(c)return c[1].split("/.git/")[0]}}d=e().dirname(d)}return a}var h=c(90444);let i=`
|
|
391
|
-
id, worktree_id, skill_id, version, install_root, receipt_sha256,
|
|
392
|
-
source_repository, source_ref, source_commit, artifact_sha256,
|
|
393
|
-
effective_risk, operation_id, installed_at, updated_at
|
|
394
|
-
`,j=`
|
|
395
|
-
id TEXT PRIMARY KEY,
|
|
396
|
-
worktree_id TEXT NOT NULL,
|
|
397
|
-
skill_id TEXT NOT NULL,
|
|
398
|
-
version TEXT NOT NULL,
|
|
399
|
-
install_root TEXT NOT NULL,
|
|
400
|
-
receipt_sha256 TEXT NOT NULL,
|
|
401
|
-
source_repository TEXT NOT NULL,
|
|
402
|
-
source_ref TEXT NOT NULL,
|
|
403
|
-
source_commit TEXT NOT NULL,
|
|
404
|
-
artifact_sha256 TEXT NOT NULL,
|
|
405
|
-
effective_risk TEXT NOT NULL,
|
|
406
|
-
operation_id TEXT NOT NULL,
|
|
407
|
-
installed_at INTEGER NOT NULL,
|
|
408
|
-
updated_at INTEGER NOT NULL,
|
|
409
|
-
UNIQUE (worktree_id, skill_id)
|
|
410
|
-
`;function k(a){a.exec(`
|
|
411
|
-
CREATE INDEX IF NOT EXISTS idx_skill_installations_worktree
|
|
412
|
-
ON skill_installations(worktree_id);
|
|
413
|
-
`),a.exec(`
|
|
414
|
-
CREATE INDEX IF NOT EXISTS idx_skill_installations_skill
|
|
415
|
-
ON skill_installations(skill_id, version);
|
|
416
|
-
`)}let l=[{version:1,name:"initial-schema",up:a=>{(0,h.s4)(a)},down:a=>{a.exec("DROP TABLE IF EXISTS session_states;"),a.exec("DROP TABLE IF EXISTS chat_messages;"),a.exec("DROP TABLE IF EXISTS worktrees;")}},{version:2,name:"add-multi-repo-and-memo-support",up:a=>{a.exec(`
|
|
81
|
+
`).get(b,c,d,+!!e,...f);return j?i(j):null}},72456:(a,b,c)=>{c.d(b,{vI:()=>Z});var d=c(33873),e=c.n(d);function f(a){try{let b=a.prepare("SELECT MAX(version) as version FROM schema_version").get();return b?.version??0}catch{return 0}}function g(a){let b=c(29021),d=a;for(;d!==e().dirname(d);){let a=e().join(d,".git");if(b.existsSync(a)){let c=b.statSync(a);if(c.isDirectory())return d;if(c.isFile()){let c=b.readFileSync(a,"utf-8").trim().match(/^gitdir:\s*(.+)$/);if(c)return c[1].split("/.git/")[0]}}d=e().dirname(d)}return a}var h=c(90444);let i=[{version:1,name:"initial-schema",up:a=>{(0,h.s4)(a)},down:a=>{a.exec("DROP TABLE IF EXISTS session_states;"),a.exec("DROP TABLE IF EXISTS chat_messages;"),a.exec("DROP TABLE IF EXISTS worktrees;")}},{version:2,name:"add-multi-repo-and-memo-support",up:a=>{a.exec(`
|
|
417
82
|
ALTER TABLE worktrees ADD COLUMN repository_path TEXT;
|
|
418
83
|
ALTER TABLE worktrees ADD COLUMN repository_name TEXT;
|
|
419
84
|
ALTER TABLE worktrees ADD COLUMN memo TEXT;
|
|
@@ -485,7 +150,7 @@
|
|
|
485
150
|
ON worktrees(status);
|
|
486
151
|
`)},down:a=>{a.exec(`
|
|
487
152
|
DROP INDEX IF EXISTS idx_worktrees_status;
|
|
488
|
-
`)}},{version:6,name:"add-link-field",up:a=>{a.exec(`
|
|
153
|
+
`)}}],j=[{version:6,name:"add-link-field",up:a=>{a.exec(`
|
|
489
154
|
ALTER TABLE worktrees ADD COLUMN link TEXT DEFAULT NULL;
|
|
490
155
|
`)},down:()=>{console.log("No rollback needed for link field")}},{version:7,name:"add-cli-tool-id",up:a=>{a.exec(`
|
|
491
156
|
ALTER TABLE worktrees ADD COLUMN cli_tool_id TEXT DEFAULT 'claude';
|
|
@@ -591,7 +256,7 @@
|
|
|
591
256
|
`).all(),e=a.prepare(`
|
|
592
257
|
INSERT INTO worktree_memos (id, worktree_id, title, content, position, created_at, updated_at)
|
|
593
258
|
VALUES (?, ?, 'Memo', ?, 0, ?, ?)
|
|
594
|
-
`),f=Date.now();for(let a of d)e.run(b(),a.id,a.memo,f,f);console.log("Created worktree_memos table"),console.log(`Migrated ${d.length} existing memos to new table`)},down:a=>{a.exec("DROP TABLE IF EXISTS worktree_memos"),console.log("Dropped worktree_memos table")}},{version:11,name:"add-viewed-tracking",up:a=>{a.exec(`
|
|
259
|
+
`),f=Date.now();for(let a of d)e.run(b(),a.id,a.memo,f,f);console.log("Created worktree_memos table"),console.log(`Migrated ${d.length} existing memos to new table`)},down:a=>{a.exec("DROP TABLE IF EXISTS worktree_memos"),console.log("Dropped worktree_memos table")}}],k=[{version:11,name:"add-viewed-tracking",up:a=>{a.exec(`
|
|
595
260
|
ALTER TABLE worktrees ADD COLUMN last_viewed_at TEXT;
|
|
596
261
|
`),a.exec(`
|
|
597
262
|
CREATE INDEX IF NOT EXISTS idx_chat_messages_assistant_latest
|
|
@@ -736,7 +401,7 @@
|
|
|
736
401
|
|
|
737
402
|
CREATE INDEX IF NOT EXISTS idx_worktrees_cli_tool
|
|
738
403
|
ON worktrees(cli_tool_id);
|
|
739
|
-
`),console.log("Removed initial_branch column from worktrees table")}},{version:16,name:"add-issue-no-to-external-apps",up:a=>{a.exec(`
|
|
404
|
+
`),console.log("Removed initial_branch column from worktrees table")}}],l=[{version:16,name:"add-issue-no-to-external-apps",up:a=>{a.exec(`
|
|
740
405
|
ALTER TABLE external_apps ADD COLUMN issue_no INTEGER;
|
|
741
406
|
`),a.exec(`
|
|
742
407
|
CREATE INDEX IF NOT EXISTS idx_external_apps_issue_no ON external_apps(issue_no);
|
|
@@ -851,7 +516,7 @@
|
|
|
851
516
|
ALTER TABLE worktrees ADD COLUMN vibe_local_model TEXT DEFAULT NULL;
|
|
852
517
|
`),console.log("Added vibe_local_model column to worktrees table")},down:()=>{console.log("No rollback for vibe_local_model column (SQLite limitation)")}},{version:20,name:"add-vibe-local-context-window-column",up:a=>{a.exec(`
|
|
853
518
|
ALTER TABLE worktrees ADD COLUMN vibe_local_context_window INTEGER DEFAULT NULL;
|
|
854
|
-
`),console.log("Added vibe_local_context_window column to worktrees table")},down:()=>{console.log("No rollback for vibe_local_context_window column (SQLite limitation)")}},{version:21,name:"add-scheduled-executions-worktree-enabled-index",up:a=>{a.exec(`
|
|
519
|
+
`),console.log("Added vibe_local_context_window column to worktrees table")},down:()=>{console.log("No rollback for vibe_local_context_window column (SQLite limitation)")}}],m=[{version:21,name:"add-scheduled-executions-worktree-enabled-index",up:a=>{a.exec(`
|
|
855
520
|
CREATE INDEX IF NOT EXISTS idx_scheduled_executions_worktree_enabled
|
|
856
521
|
ON scheduled_executions(worktree_id, enabled);
|
|
857
522
|
`),console.log("Created composite index idx_scheduled_executions_worktree_enabled")},down:a=>{a.exec("DROP INDEX IF EXISTS idx_scheduled_executions_worktree_enabled"),console.log("Dropped idx_scheduled_executions_worktree_enabled index")}},{version:22,name:"add-archived-column-to-chat-messages",up:a=>{a.exec(`
|
|
@@ -884,7 +549,7 @@
|
|
|
884
549
|
DROP INDEX IF EXISTS idx_timer_messages_status_scheduled;
|
|
885
550
|
DROP INDEX IF EXISTS idx_timer_messages_worktree_status;
|
|
886
551
|
DROP TABLE IF EXISTS timer_messages;
|
|
887
|
-
`)}},{version:24,name:"add-daily-reports-table",up:a=>{a.exec(`
|
|
552
|
+
`)}}],n=[{version:24,name:"add-daily-reports-table",up:a=>{a.exec(`
|
|
888
553
|
CREATE TABLE daily_reports (
|
|
889
554
|
date TEXT PRIMARY KEY,
|
|
890
555
|
content TEXT NOT NULL,
|
|
@@ -893,7 +558,7 @@
|
|
|
893
558
|
created_at INTEGER NOT NULL DEFAULT (unixepoch() * 1000),
|
|
894
559
|
updated_at INTEGER NOT NULL DEFAULT (unixepoch() * 1000)
|
|
895
560
|
);
|
|
896
|
-
`),console.log("Created daily_reports table")},down:a=>{a.exec("DROP TABLE IF EXISTS daily_reports"),console.log("Dropped daily_reports table")}},{version:25,name:"add-report-templates-table",up:a=>{a.exec(`
|
|
561
|
+
`),console.log("Created daily_reports table")},down:a=>{a.exec("DROP TABLE IF EXISTS daily_reports"),console.log("Dropped daily_reports table")}}],o=[{version:25,name:"add-report-templates-table",up:a=>{a.exec(`
|
|
897
562
|
CREATE TABLE report_templates (
|
|
898
563
|
id TEXT PRIMARY KEY,
|
|
899
564
|
name TEXT NOT NULL,
|
|
@@ -902,14 +567,14 @@
|
|
|
902
567
|
created_at INTEGER NOT NULL DEFAULT (unixepoch() * 1000),
|
|
903
568
|
updated_at INTEGER NOT NULL DEFAULT (unixepoch() * 1000)
|
|
904
569
|
);
|
|
905
|
-
`),console.log("Created report_templates table")},down:a=>{a.exec("DROP TABLE IF EXISTS report_templates"),console.log("Dropped report_templates table")}},{version:26,name:"add-repository-display-name",up:a=>{a.exec("ALTER TABLE repositories ADD COLUMN display_name TEXT;"),console.log("Added display_name column to repositories table")},down:a=>{a.exec("ALTER TABLE repositories DROP COLUMN display_name;"),console.log("Removed display_name column from repositories table")}},{version:27,name:"add-app-settings-table",up:a=>{a.exec(`
|
|
570
|
+
`),console.log("Created report_templates table")},down:a=>{a.exec("DROP TABLE IF EXISTS report_templates"),console.log("Dropped report_templates table")}}],p=[{version:26,name:"add-repository-display-name",up:a=>{a.exec("ALTER TABLE repositories ADD COLUMN display_name TEXT;"),console.log("Added display_name column to repositories table")},down:a=>{a.exec("ALTER TABLE repositories DROP COLUMN display_name;"),console.log("Removed display_name column from repositories table")}}],q=[{version:27,name:"add-app-settings-table",up:a=>{a.exec(`
|
|
906
571
|
CREATE TABLE IF NOT EXISTS app_settings (
|
|
907
572
|
key TEXT PRIMARY KEY,
|
|
908
573
|
value TEXT NOT NULL,
|
|
909
574
|
created_at INTEGER NOT NULL DEFAULT (unixepoch() * 1000),
|
|
910
575
|
updated_at INTEGER NOT NULL DEFAULT (unixepoch() * 1000)
|
|
911
576
|
);
|
|
912
|
-
`)},down:a=>{a.exec("DROP TABLE IF EXISTS app_settings")}},{version:28,name:"add-assistant-conversation-tables",up:a=>{a.exec(`
|
|
577
|
+
`)},down:a=>{a.exec("DROP TABLE IF EXISTS app_settings")}}],r=[{version:28,name:"add-assistant-conversation-tables",up:a=>{a.exec(`
|
|
913
578
|
CREATE TABLE IF NOT EXISTS assistant_conversations (
|
|
914
579
|
id TEXT PRIMARY KEY,
|
|
915
580
|
repository_id TEXT NOT NULL,
|
|
@@ -962,7 +627,7 @@
|
|
|
962
627
|
DROP TABLE IF EXISTS assistant_session_states;
|
|
963
628
|
DROP TABLE IF EXISTS assistant_messages;
|
|
964
629
|
DROP TABLE IF EXISTS assistant_conversations;
|
|
965
|
-
`)}},{version:29,name:"add-assistant-non-interactive-executions",up:a=>{a.exec(`
|
|
630
|
+
`)}}],s=[{version:29,name:"add-assistant-non-interactive-executions",up:a=>{a.exec(`
|
|
966
631
|
ALTER TABLE assistant_conversations
|
|
967
632
|
ADD COLUMN execution_mode TEXT NOT NULL DEFAULT 'interactive';
|
|
968
633
|
|
|
@@ -1012,19 +677,19 @@
|
|
|
1012
677
|
ON assistant_executions(status, updated_at DESC);
|
|
1013
678
|
`)},down:a=>{a.exec(`
|
|
1014
679
|
DROP TABLE IF EXISTS assistant_executions;
|
|
1015
|
-
`)}},{version:30,name:"add-assistant-context-snapshot",up:a=>{a.exec(`
|
|
680
|
+
`)}}],t=[{version:30,name:"add-assistant-context-snapshot",up:a=>{a.exec(`
|
|
1016
681
|
ALTER TABLE assistant_conversations
|
|
1017
682
|
ADD COLUMN context_snapshot TEXT;
|
|
1018
683
|
`)},down:a=>{a.exec(`
|
|
1019
684
|
ALTER TABLE assistant_conversations
|
|
1020
685
|
DROP COLUMN context_snapshot;
|
|
1021
|
-
`)}},{version:31,name:"add-repository-visible",up:a=>{a.exec("ALTER TABLE repositories ADD COLUMN visible INTEGER NOT NULL DEFAULT 1;")},down:a=>{a.exec("ALTER TABLE repositories DROP COLUMN visible;")}},{version:32,name:"add-messages-role-composite-index",up:a=>{a.exec(`
|
|
686
|
+
`)}}],u=[{version:31,name:"add-repository-visible",up:a=>{a.exec("ALTER TABLE repositories ADD COLUMN visible INTEGER NOT NULL DEFAULT 1;")},down:a=>{a.exec("ALTER TABLE repositories DROP COLUMN visible;")}}],v=[{version:32,name:"add-messages-role-composite-index",up:a=>{a.exec(`
|
|
1022
687
|
CREATE INDEX IF NOT EXISTS idx_messages_worktree_role_archived_time
|
|
1023
688
|
ON chat_messages(worktree_id, role, archived, timestamp DESC);
|
|
1024
689
|
`),a.exec("DROP INDEX IF EXISTS idx_messages_archived;")},down:a=>{a.exec("DROP INDEX IF EXISTS idx_messages_worktree_role_archived_time;"),a.exec(`
|
|
1025
690
|
CREATE INDEX IF NOT EXISTS idx_messages_archived
|
|
1026
691
|
ON chat_messages(worktree_id, archived, timestamp DESC);
|
|
1027
|
-
`)}},{version:33,name:"add-agent-instances",up:a=>{a.exec(`
|
|
692
|
+
`)}}],w=[{version:33,name:"add-agent-instances",up:a=>{a.exec(`
|
|
1028
693
|
CREATE TABLE session_states_new (
|
|
1029
694
|
worktree_id TEXT NOT NULL,
|
|
1030
695
|
cli_tool_id TEXT NOT NULL DEFAULT 'claude',
|
|
@@ -1092,7 +757,7 @@
|
|
|
1092
757
|
SELECT worktree_id, cli_tool_id, last_captured_line, in_progress_message_id
|
|
1093
758
|
FROM session_states
|
|
1094
759
|
WHERE instance_id = cli_tool_id;
|
|
1095
|
-
`),a.exec("DROP TABLE session_states;"),a.exec("ALTER TABLE session_states_old RENAME TO session_states;"),console.log("Rolled back agent_instances migration (v33)")}},{version:34,name:"add-repository-todos",up:a=>{a.exec(`
|
|
760
|
+
`),a.exec("DROP TABLE session_states;"),a.exec("ALTER TABLE session_states_old RENAME TO session_states;"),console.log("Rolled back agent_instances migration (v33)")}}],x=[{version:34,name:"add-repository-todos",up:a=>{a.exec(`
|
|
1096
761
|
CREATE TABLE IF NOT EXISTS repository_todos (
|
|
1097
762
|
id TEXT PRIMARY KEY,
|
|
1098
763
|
repository_id TEXT NOT NULL,
|
|
@@ -1106,13 +771,13 @@
|
|
|
1106
771
|
`),a.exec(`
|
|
1107
772
|
CREATE INDEX IF NOT EXISTS idx_repository_todos_repo
|
|
1108
773
|
ON repository_todos(repository_id, position);
|
|
1109
|
-
`)},down:a=>{a.exec("DROP TABLE IF EXISTS repository_todos;")}},{version:35,name:"add-instance-id-to-timer-messages",up:a=>{a.exec(`
|
|
774
|
+
`)},down:a=>{a.exec("DROP TABLE IF EXISTS repository_todos;")}}],y=[{version:35,name:"add-instance-id-to-timer-messages",up:a=>{a.exec(`
|
|
1110
775
|
ALTER TABLE timer_messages ADD COLUMN instance_id TEXT;
|
|
1111
776
|
`),a.exec(`
|
|
1112
777
|
UPDATE timer_messages SET instance_id = cli_tool_id WHERE instance_id IS NULL;
|
|
1113
|
-
`),console.log("Added instance_id column to timer_messages table")},down:()=>{console.log("No rollback for instance_id column (SQLite limitation)")}},{version:36,name:"add-branch-to-worktrees",up:a=>{a.exec(`
|
|
778
|
+
`),console.log("Added instance_id column to timer_messages table")},down:()=>{console.log("No rollback for instance_id column (SQLite limitation)")}}],z=[{version:36,name:"add-branch-to-worktrees",up:a=>{a.exec(`
|
|
1114
779
|
ALTER TABLE worktrees ADD COLUMN branch TEXT;
|
|
1115
|
-
`),console.log("Added branch column to worktrees table")},down:()=>{console.log("No rollback for branch column (SQLite limitation)")}},{version:37,name:"add-worktree-todos",up:a=>{a.exec(`
|
|
780
|
+
`),console.log("Added branch column to worktrees table")},down:()=>{console.log("No rollback for branch column (SQLite limitation)")}}],A=[{version:37,name:"add-worktree-todos",up:a=>{a.exec(`
|
|
1116
781
|
CREATE TABLE IF NOT EXISTS worktree_todos (
|
|
1117
782
|
id TEXT PRIMARY KEY,
|
|
1118
783
|
worktree_id TEXT NOT NULL,
|
|
@@ -1126,17 +791,17 @@
|
|
|
1126
791
|
`),a.exec(`
|
|
1127
792
|
CREATE INDEX IF NOT EXISTS idx_worktree_todos_wt
|
|
1128
793
|
ON worktree_todos(worktree_id, position);
|
|
1129
|
-
`)},down:a=>{a.exec("DROP TABLE IF EXISTS worktree_todos;")}},{version:38,name:"add-status-to-worktree-todos",up:a=>{a.exec(`
|
|
794
|
+
`)},down:a=>{a.exec("DROP TABLE IF EXISTS worktree_todos;")}}],B=[{version:38,name:"add-status-to-worktree-todos",up:a=>{a.exec(`
|
|
1130
795
|
ALTER TABLE worktree_todos
|
|
1131
796
|
ADD COLUMN status TEXT NOT NULL DEFAULT 'todo';
|
|
1132
797
|
`),a.exec(`
|
|
1133
798
|
UPDATE worktree_todos SET status = 'done' WHERE done = 1;
|
|
1134
|
-
`)},down:()=>{}},{version:39,name:"add-detail-to-worktree-todos",up:a=>{a.exec(`
|
|
799
|
+
`)},down:()=>{}}],C=[{version:39,name:"add-detail-to-worktree-todos",up:a=>{a.exec(`
|
|
1135
800
|
ALTER TABLE worktree_todos
|
|
1136
801
|
ADD COLUMN detail TEXT NOT NULL DEFAULT '';
|
|
1137
|
-
`)},down:()=>{}},{version:40,name:"add-error-to-timer-messages",up:a=>{a.exec(`
|
|
802
|
+
`)},down:()=>{}}],D=[{version:40,name:"add-error-to-timer-messages",up:a=>{a.exec(`
|
|
1138
803
|
ALTER TABLE timer_messages ADD COLUMN error TEXT;
|
|
1139
|
-
`),console.log("Added error column to timer_messages table")},down:()=>{console.log("No rollback for error column (SQLite limitation)")}},{version:41,name:"add-push-subscriptions",up:a=>{a.exec(`
|
|
804
|
+
`),console.log("Added error column to timer_messages table")},down:()=>{console.log("No rollback for error column (SQLite limitation)")}}],E=[{version:41,name:"add-push-subscriptions",up:a=>{a.exec(`
|
|
1140
805
|
CREATE TABLE IF NOT EXISTS push_subscriptions (
|
|
1141
806
|
id TEXT PRIMARY KEY,
|
|
1142
807
|
endpoint TEXT NOT NULL UNIQUE,
|
|
@@ -1151,16 +816,16 @@
|
|
|
1151
816
|
`),a.exec(`
|
|
1152
817
|
CREATE INDEX IF NOT EXISTS idx_push_subscriptions_endpoint
|
|
1153
818
|
ON push_subscriptions(endpoint);
|
|
1154
|
-
`)},down:a=>{a.exec("DROP TABLE IF EXISTS push_subscriptions;")}},{version:42,name:"add-locale-to-push-subscriptions",up:a=>{a.exec(`
|
|
819
|
+
`)},down:a=>{a.exec("DROP TABLE IF EXISTS push_subscriptions;")}}],F=[{version:42,name:"add-locale-to-push-subscriptions",up:a=>{a.exec(`
|
|
1155
820
|
ALTER TABLE push_subscriptions ADD COLUMN locale TEXT;
|
|
1156
821
|
`)},down:a=>{a.exec(`
|
|
1157
822
|
ALTER TABLE push_subscriptions DROP COLUMN locale;
|
|
1158
|
-
`)}},{version:43,name:"remove-cm-root-dir-ghost-repository",up:a=>{let b=function(){let a=process.env.CM_ROOT_DIR??process.env.MCBD_ROOT_DIR;return a&&a.trim()?e().resolve(a.trim()):null}();return b?(function(){let a=process.env.WORKTREE_REPOS;return a&&a.trim()?a.split(",").map(a=>a.trim()).filter(a=>a.length>0).map(a=>e().resolve(a)):[]})().includes(b)?void console.log(`Migration 43: ${b} is a WORKTREE_REPOS entry; keeping its repository row`):void(a.prepare(`DELETE FROM repositories
|
|
823
|
+
`)}}],G=[{version:43,name:"remove-cm-root-dir-ghost-repository",up:a=>{let b=function(){let a=process.env.CM_ROOT_DIR??process.env.MCBD_ROOT_DIR;return a&&a.trim()?e().resolve(a.trim()):null}();return b?(function(){let a=process.env.WORKTREE_REPOS;return a&&a.trim()?a.split(",").map(a=>a.trim()).filter(a=>a.length>0).map(a=>e().resolve(a)):[]})().includes(b)?void console.log(`Migration 43: ${b} is a WORKTREE_REPOS entry; keeping its repository row`):void(a.prepare(`DELETE FROM repositories
|
|
1159
824
|
WHERE path = ?
|
|
1160
825
|
AND is_env_managed = 1
|
|
1161
826
|
AND NOT EXISTS (
|
|
1162
827
|
SELECT 1 FROM worktrees WHERE worktrees.repository_path = ?
|
|
1163
|
-
)`).run(b,b).changes>0?console.log(`Migration 43: removed CM_ROOT_DIR ghost repository row (${b})`):console.log(`Migration 43: no ghost repository row at ${b}`)):void console.log("Migration 43: CM_ROOT_DIR is not set; no ghost row to remove")},down:()=>{console.log("No rollback for the CM_ROOT_DIR ghost row removal")}},{version:44,name:"add-skill-operations",up:a=>{a.exec(`
|
|
828
|
+
)`).run(b,b).changes>0?console.log(`Migration 43: removed CM_ROOT_DIR ghost repository row (${b})`):console.log(`Migration 43: no ghost repository row at ${b}`)):void console.log("Migration 43: CM_ROOT_DIR is not set; no ghost row to remove")},down:()=>{console.log("No rollback for the CM_ROOT_DIR ghost row removal")}}],H=[{version:44,name:"add-skill-operations",up:a=>{a.exec(`
|
|
1164
829
|
CREATE TABLE IF NOT EXISTS skill_operations (
|
|
1165
830
|
id TEXT PRIMARY KEY,
|
|
1166
831
|
operation_id TEXT NOT NULL,
|
|
@@ -1204,7 +869,7 @@
|
|
|
1204
869
|
BEGIN
|
|
1205
870
|
SELECT RAISE(ABORT, 'skill_operations is append-only');
|
|
1206
871
|
END;
|
|
1207
|
-
`)},down:a=>{a.exec("DROP TRIGGER IF EXISTS skill_operations_no_delete;"),a.exec("DROP TRIGGER IF EXISTS skill_operations_no_update;"),a.exec("DROP TABLE IF EXISTS skill_operations;")}},{version:45,name:"add-skill-installations",up:a=>{a.exec(`
|
|
872
|
+
`)},down:a=>{a.exec("DROP TRIGGER IF EXISTS skill_operations_no_delete;"),a.exec("DROP TRIGGER IF EXISTS skill_operations_no_update;"),a.exec("DROP TABLE IF EXISTS skill_operations;")}}],I=[{version:45,name:"add-skill-installations",up:a=>{a.exec(`
|
|
1208
873
|
CREATE TABLE IF NOT EXISTS skill_installations (
|
|
1209
874
|
id TEXT PRIMARY KEY,
|
|
1210
875
|
worktree_id TEXT NOT NULL,
|
|
@@ -1228,24 +893,50 @@
|
|
|
1228
893
|
`),a.exec(`
|
|
1229
894
|
CREATE INDEX IF NOT EXISTS idx_skill_installations_skill
|
|
1230
895
|
ON skill_installations(skill_id, version);
|
|
1231
|
-
`)},down:a=>{a.exec("DROP INDEX IF EXISTS idx_skill_installations_skill;"),a.exec("DROP INDEX IF EXISTS idx_skill_installations_worktree;"),a.exec("DROP TABLE IF EXISTS skill_installations;")}},
|
|
896
|
+
`)},down:a=>{a.exec("DROP INDEX IF EXISTS idx_skill_installations_skill;"),a.exec("DROP INDEX IF EXISTS idx_skill_installations_worktree;"),a.exec("DROP TABLE IF EXISTS skill_installations;")}}],J=`
|
|
897
|
+
id, worktree_id, skill_id, version, install_root, receipt_sha256,
|
|
898
|
+
source_repository, source_ref, source_commit, artifact_sha256,
|
|
899
|
+
effective_risk, operation_id, installed_at, updated_at
|
|
900
|
+
`,K=`
|
|
901
|
+
id TEXT PRIMARY KEY,
|
|
902
|
+
worktree_id TEXT NOT NULL,
|
|
903
|
+
skill_id TEXT NOT NULL,
|
|
904
|
+
version TEXT NOT NULL,
|
|
905
|
+
install_root TEXT NOT NULL,
|
|
906
|
+
receipt_sha256 TEXT NOT NULL,
|
|
907
|
+
source_repository TEXT NOT NULL,
|
|
908
|
+
source_ref TEXT NOT NULL,
|
|
909
|
+
source_commit TEXT NOT NULL,
|
|
910
|
+
artifact_sha256 TEXT NOT NULL,
|
|
911
|
+
effective_risk TEXT NOT NULL,
|
|
912
|
+
operation_id TEXT NOT NULL,
|
|
913
|
+
installed_at INTEGER NOT NULL,
|
|
914
|
+
updated_at INTEGER NOT NULL,
|
|
915
|
+
UNIQUE (worktree_id, skill_id)
|
|
916
|
+
`;function L(a){a.exec(`
|
|
917
|
+
CREATE INDEX IF NOT EXISTS idx_skill_installations_worktree
|
|
918
|
+
ON skill_installations(worktree_id);
|
|
919
|
+
`),a.exec(`
|
|
920
|
+
CREATE INDEX IF NOT EXISTS idx_skill_installations_skill
|
|
921
|
+
ON skill_installations(skill_id, version);
|
|
922
|
+
`)}let M=[{version:46,name:"skill-installations-worktree-cascade",up:a=>{a.exec(`
|
|
1232
923
|
CREATE TABLE skill_installations_new (
|
|
1233
|
-
${
|
|
924
|
+
${K},
|
|
1234
925
|
FOREIGN KEY (worktree_id) REFERENCES worktrees(id) ON DELETE CASCADE
|
|
1235
926
|
);
|
|
1236
927
|
`),a.exec(`
|
|
1237
|
-
INSERT INTO skill_installations_new (${
|
|
1238
|
-
SELECT ${
|
|
928
|
+
INSERT INTO skill_installations_new (${J})
|
|
929
|
+
SELECT ${J} FROM skill_installations
|
|
1239
930
|
WHERE worktree_id IN (SELECT id FROM worktrees);
|
|
1240
931
|
`);let b=a.prepare(`SELECT COUNT(*) AS n FROM skill_installations
|
|
1241
|
-
WHERE worktree_id NOT IN (SELECT id FROM worktrees)`).get();a.exec("DROP TABLE skill_installations;"),a.exec("ALTER TABLE skill_installations_new RENAME TO skill_installations;"),
|
|
932
|
+
WHERE worktree_id NOT IN (SELECT id FROM worktrees)`).get();a.exec("DROP TABLE skill_installations;"),a.exec("ALTER TABLE skill_installations_new RENAME TO skill_installations;"),L(a),b.n>0&&console.log(`Removed ${b.n} skill_installations row(s) with no worktree`),console.log("skill_installations now cascades with its worktree")},down:a=>{a.exec(`
|
|
1242
933
|
CREATE TABLE skill_installations_old (
|
|
1243
|
-
${
|
|
934
|
+
${K}
|
|
1244
935
|
);
|
|
1245
936
|
`),a.exec(`
|
|
1246
|
-
INSERT INTO skill_installations_old (${
|
|
1247
|
-
SELECT ${
|
|
1248
|
-
`),a.exec("DROP TABLE skill_installations;"),a.exec("ALTER TABLE skill_installations_old RENAME TO skill_installations;"),
|
|
937
|
+
INSERT INTO skill_installations_old (${J})
|
|
938
|
+
SELECT ${J} FROM skill_installations;
|
|
939
|
+
`),a.exec("DROP TABLE skill_installations;"),a.exec("ALTER TABLE skill_installations_old RENAME TO skill_installations;"),L(a),console.log("Rolled back skill_installations cascade (v46)")}}],N=[{version:47,name:"add-skill-installations-roots",up:a=>{a.exec("ALTER TABLE skill_installations ADD COLUMN install_roots TEXT;")},down:a=>{a.exec(`
|
|
1249
940
|
CREATE TABLE skill_installations__v46 (
|
|
1250
941
|
id TEXT PRIMARY KEY,
|
|
1251
942
|
worktree_id TEXT NOT NULL,
|
|
@@ -1280,7 +971,7 @@
|
|
|
1280
971
|
`),a.exec(`
|
|
1281
972
|
CREATE INDEX IF NOT EXISTS idx_skill_installations_skill
|
|
1282
973
|
ON skill_installations(skill_id, version);
|
|
1283
|
-
`)}},{version:48,name:"add-skill-operations-audit-index",up:a=>{a.exec("ALTER TABLE skill_operations ADD COLUMN from_version TEXT;"),a.exec("ALTER TABLE skill_operations ADD COLUMN to_version TEXT;"),a.exec(`
|
|
974
|
+
`)}}],O=[{version:48,name:"add-skill-operations-audit-index",up:a=>{a.exec("ALTER TABLE skill_operations ADD COLUMN from_version TEXT;"),a.exec("ALTER TABLE skill_operations ADD COLUMN to_version TEXT;"),a.exec(`
|
|
1284
975
|
CREATE INDEX IF NOT EXISTS idx_skill_operations_recent
|
|
1285
976
|
ON skill_operations(recorded_at DESC, id DESC);
|
|
1286
977
|
`),a.exec(`
|
|
@@ -1343,7 +1034,7 @@
|
|
|
1343
1034
|
BEGIN
|
|
1344
1035
|
SELECT RAISE(ABORT, 'skill_operations is append-only');
|
|
1345
1036
|
END;
|
|
1346
|
-
`)}},{version:49,name:"add-verification-runs",up:a=>{a.exec(`
|
|
1037
|
+
`)}}],P=[{version:49,name:"add-verification-runs",up:a=>{a.exec(`
|
|
1347
1038
|
CREATE TABLE IF NOT EXISTS verification_runs (
|
|
1348
1039
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
1349
1040
|
worktree_id TEXT NOT NULL,
|
|
@@ -1374,7 +1065,7 @@
|
|
|
1374
1065
|
`),a.exec(`
|
|
1375
1066
|
CREATE INDEX IF NOT EXISTS idx_verification_gate_results_run
|
|
1376
1067
|
ON verification_gate_results(run_id);
|
|
1377
|
-
`)},down:a=>{a.exec("DROP TABLE IF EXISTS verification_gate_results;"),a.exec("DROP TABLE IF EXISTS verification_runs;")}},{version:50,name:"add-tasks",up:a=>{a.exec(`
|
|
1068
|
+
`)},down:a=>{a.exec("DROP TABLE IF EXISTS verification_gate_results;"),a.exec("DROP TABLE IF EXISTS verification_runs;")}}],Q=[{version:50,name:"add-tasks",up:a=>{a.exec(`
|
|
1378
1069
|
CREATE TABLE IF NOT EXISTS tasks (
|
|
1379
1070
|
id TEXT PRIMARY KEY,
|
|
1380
1071
|
worktree_id TEXT NOT NULL,
|
|
@@ -1394,7 +1085,7 @@
|
|
|
1394
1085
|
`),a.exec(`
|
|
1395
1086
|
CREATE INDEX IF NOT EXISTS idx_tasks_worktree
|
|
1396
1087
|
ON tasks(worktree_id, created_at DESC);
|
|
1397
|
-
`)},down:a=>{a.exec("DROP TABLE IF EXISTS tasks;")}},{version:51,name:"add-task-events",up:a=>{a.exec(`
|
|
1088
|
+
`)},down:a=>{a.exec("DROP TABLE IF EXISTS tasks;")}}],R=[{version:51,name:"add-task-events",up:a=>{a.exec(`
|
|
1398
1089
|
CREATE TABLE IF NOT EXISTS task_events (
|
|
1399
1090
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
1400
1091
|
task_id TEXT NOT NULL,
|
|
@@ -1407,13 +1098,341 @@
|
|
|
1407
1098
|
`),a.exec(`
|
|
1408
1099
|
CREATE INDEX IF NOT EXISTS idx_task_events_task
|
|
1409
1100
|
ON task_events(task_id, created_at);
|
|
1410
|
-
`)},down:a=>{a.exec("DROP TABLE IF EXISTS task_events;")}}];
|
|
1101
|
+
`)},down:a=>{a.exec("DROP TABLE IF EXISTS task_events;")}}];var S=c(40277);let T=[{version:52,name:"delete-orphaned-worktree-children",up:a=>{let b=0;for(let{table:c,column:d}of(0,S.ZN)(a)){let e=a.prepare(`DELETE FROM "${c}"
|
|
1102
|
+
WHERE "${d}" IS NOT NULL
|
|
1103
|
+
AND NOT EXISTS (
|
|
1104
|
+
SELECT 1 FROM worktrees AS cm_parent
|
|
1105
|
+
WHERE cm_parent.id = "${c}"."${d}"
|
|
1106
|
+
)`).run();e.changes>0&&(console.log(`Deleted ${e.changes} orphaned row(s) from ${c}.${d}`),b+=e.changes)}0===b&&console.log("No orphaned worktree child rows found")},down:()=>{console.log("No rollback for orphaned child row cleanup (rows are gone)")}}],U=[{version:53,name:"add-worktree-aliases",up:a=>{a.exec(`
|
|
1107
|
+
CREATE TABLE IF NOT EXISTS worktree_aliases (
|
|
1108
|
+
old_id TEXT PRIMARY KEY,
|
|
1109
|
+
worktree_id TEXT NOT NULL REFERENCES worktrees(id) ON DELETE CASCADE,
|
|
1110
|
+
created_at INTEGER NOT NULL
|
|
1111
|
+
);
|
|
1112
|
+
`),a.exec(`
|
|
1113
|
+
CREATE INDEX IF NOT EXISTS idx_worktree_aliases_worktree_id
|
|
1114
|
+
ON worktree_aliases(worktree_id);
|
|
1115
|
+
`)},down:a=>{a.exec("DROP INDEX IF EXISTS idx_worktree_aliases_worktree_id;"),a.exec("DROP TABLE IF EXISTS worktree_aliases;")}}];var V=c(23718),W=c(27923);let X="cmate-mig54-",Y=[...i,...j,...k,...l,...m,...n,...o,...p,...q,...r,...s,...t,...u,...v,...w,...x,...y,...z,...A,...B,...C,...D,...E,...F,...G,...H,...I,...M,...N,...O,...P,...Q,...R,...T,...U,{version:54,name:"renumber-worktree-ids-from-path",up:a=>{let b=a.prepare("SELECT id, path FROM worktrees ORDER BY id").all();if(0===b.length)return void console.log("No worktrees to renumber");let c=void 0!==a.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = 'worktree_aliases'").get(),d=c?a.prepare("SELECT old_id FROM worktree_aliases").all().map(a=>a.old_id):[],f=function(a,b){let c=new Set([...new Set(a.map(a=>a.id)),...b]),d=new Set,f=[];for(let b of a){let a=new Set([...c,...d]);a.delete(b.id);let g=(0,V.ko)(e().resolve(b.path),a);d.add(g),g!==b.id&&f.push({oldId:b.id,newId:g})}return f}(b,d);if(0===f.length)return void console.log(`Worktree IDs already path-derived (${b.length} row(s) checked)`);let g=new Set([...b.map(a=>a.id),...d,...f.map(a=>a.newId)]),h=f.map((a,b)=>{let c=`${X}${b}`;for(let a=1;g.has(c);a++)c=`${X}${b}-${a}`;return g.add(c),c}),i=Date.now();f.forEach((b,c)=>{(0,W.D6)(a,b.oldId,h[c],i)}),f.forEach((b,c)=>{(0,W.D6)(a,h[c],b.newId,i)});let j=c?a.prepare("DELETE FROM worktree_aliases WHERE old_id = ?"):null;if(j)for(let a of h)j.run(a);for(let a of f)console.log(`Renumbered worktree ${a.oldId} -> ${a.newId}`);console.log(`Renumbered ${f.length} of ${b.length} worktree(s) to path-derived IDs`)},down:a=>{if(void 0===a.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = 'worktree_aliases'").get())return void console.log("No worktree_aliases table: nothing to roll back");let b=a.prepare(`SELECT a.old_id, a.worktree_id
|
|
1116
|
+
FROM worktree_aliases AS a
|
|
1117
|
+
JOIN worktrees AS w ON w.id = a.worktree_id
|
|
1118
|
+
ORDER BY a.old_id`).all();if(0===b.length)return void console.log("No worktree aliases to roll back");let c=Date.now(),d=b.map((a,b)=>`${X}down-${b}`);b.forEach((b,e)=>{(0,W.D6)(a,b.worktree_id,d[e],c)}),b.forEach((b,e)=>{(0,W.D6)(a,d[e],b.old_id,c)});let e=a.prepare("DELETE FROM worktree_aliases WHERE old_id = ?");for(let a of d)e.run(a);for(let a of b)e.run(a.worktree_id);console.log(`Rolled back ${b.length} worktree ID renumbering(s)`)}},{version:55,name:"compact-churned-worktree-ids",up:a=>{let b=a.prepare("SELECT id, path FROM worktrees ORDER BY id").all();if(0===b.length)return void console.log("No worktrees to compact");let c=void 0!==a.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = 'worktree_aliases'").get(),{renames:d,droppedAliasIds:f}=function(a,b){let c=new Map;for(let a of b){let b=c.get(a.worktreeId);b?b.push(a.oldId):c.set(a.worktreeId,[a.oldId])}let d=new Set([...a.map(a=>a.id),...b.map(a=>a.oldId)]),f=new Set,g=[],h=[];for(let b of a){let a=e().resolve(b.path),i=c.get(b.id)??[],j=new Set([...d,...f]);for(let a of(j.delete(b.id),i))j.delete(a);let k=(0,V.ko)(a,j);if(k.length>=b.id.length){f.add(b.id);continue}for(let c of(f.add(k),g.push({oldId:b.id,newId:k}),i))c.length>k.length&&(0,V.a1)(c,a)&&h.push(c)}return{renames:g,droppedAliasIds:h}}(b,c?a.prepare("SELECT old_id, worktree_id FROM worktree_aliases ORDER BY old_id").all().map(a=>({oldId:a.old_id,worktreeId:a.worktree_id})):[]);if(0===d.length)return void console.log(`No churned worktree IDs to compact (${b.length} row(s) checked)`);if(c&&f.length>0){let b=a.prepare("DELETE FROM worktree_aliases WHERE old_id = ?");for(let a of f)b.run(a)}let g=Date.now();for(let b of d)(0,W.D6)(a,b.oldId,b.newId,g),console.log(`Compacted worktree ${b.oldId} -> ${b.newId}`);console.log(`Compacted ${d.length} of ${b.length} worktree ID(s); dropped ${f.length} intermediate alias(es)`)},down:a=>{if(void 0===a.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = 'worktree_aliases'").get())return void console.log("No worktree_aliases table: nothing to roll back");let b=a.prepare("SELECT id, path FROM worktrees ORDER BY id").all(),c=a.prepare("DELETE FROM worktree_aliases WHERE old_id = ?"),d=Date.now(),f=0;for(let g of b){let b=e().resolve(g.path),h=a.prepare("SELECT old_id FROM worktree_aliases WHERE worktree_id = ?").all(g.id).map(a=>a.old_id).filter(a=>a.length>g.id.length&&(0,V.a1)(a,b)).sort((a,b)=>b.length-a.length||a.localeCompare(b))[0];h&&(c.run(h),(0,W.D6)(a,g.id,h,d),c.run(g.id),f++)}console.log(`Rolled back ${f} worktree ID compaction(s)`)}}];function Z(a){!function(a,b){a.exec(`
|
|
1411
1119
|
CREATE TABLE IF NOT EXISTS schema_version (
|
|
1412
1120
|
version INTEGER PRIMARY KEY,
|
|
1413
1121
|
name TEXT NOT NULL,
|
|
1414
1122
|
applied_at INTEGER NOT NULL
|
|
1415
1123
|
);
|
|
1416
|
-
`);let c=f(a);if(console.log(`Current schema version: ${c}`),c>
|
|
1124
|
+
`);let c=f(a);if(console.log(`Current schema version: ${c}`),c>55)throw Error(`This database (schema v${c}) was created by a newer version of CommandMate (this build supports up to v55). Please update: commandmate update`);let d=b.filter(a=>a.version>c);if(0===d.length)return console.log("Schema is up to date");for(let b of(console.log(`Found ${d.length} pending migration(s)`),d)){console.log(`Applying migration ${b.version}: ${b.name}...`);try{a.transaction(()=>{b.up(a),a.prepare(`
|
|
1417
1125
|
INSERT INTO schema_version (version, name, applied_at)
|
|
1418
1126
|
VALUES (?, ?, ?)
|
|
1419
|
-
`).run(b.version,b.name,Date.now())})(),console.log(`Migration ${b.version} applied successfully`)}catch(c){let a=c instanceof Error?c.message:String(c);throw console.error(`Migration ${b.version} failed:`,a),Error(`Migration ${b.version} (${b.name}) failed: ${a}`)}}console.log(`All migrations completed. Current version: ${f(a)}`)}(a,l)}}};
|
|
1127
|
+
`).run(b.version,b.name,Date.now())})(),console.log(`Migration ${b.version} applied successfully`)}catch(c){let a=c instanceof Error?c.message:String(c);throw console.error(`Migration ${b.version} failed:`,a),Error(`Migration ${b.version} (${b.name}) failed: ${a}`)}}console.log(`All migrations completed. Current version: ${f(a)}`)}(a,Y)}},87374:(a,b,c)=>{c.d(b,{Dr:()=>i,HR:()=>h,Ky:()=>f,XS:()=>e,ms:()=>g,u8:()=>d}),Array.from({length:Math.floor(104)+1},(a,b)=>3e5+3e5*b);let d=5,e=50,f=100,g=1e4,h={PENDING:"pending",SENDING:"sending",SENT:"sent",FAILED:"failed",CANCELLED:"cancelled",NO_SESSION:"no_session"};function i(a){return"number"==typeof a&&a>=3e5&&a<=315e5&&a%3e5==0}},88807:(a,b,c)=>{c.r(b),c.d(b,{closeDbInstance:()=>p,getDbInstance:()=>o});var d=c(33873),e=c.n(d),f=c(72456),g=c(79646),h=c(87550),i=c.n(h);let j=!1;function k(a){return a instanceof Error&&"ERR_DLOPEN_FAILED"===a.code&&a.message.includes("NODE_MODULE_VERSION")}function l(a,b){let c=["better-sqlite3 could not be loaded: it was built for a different Node.js version.","This usually happens after switching Node.js versions (nvm, fnm, Homebrew, ...).","",`Automatic recovery failed: ${a}`,"","How to fix it manually:"];return b?c.push(" The install directory is not writable by the current user, so the addon"," cannot be rebuilt in place. Do not re-run this with sudo — root-owned"," files there will break future installs and updates.",""," Either switch back to the Node.js version CommandMate was installed with:",` node -v (currently ${process.version}, NODE_MODULE_VERSION ${process.versions.modules})`,""," Or reinstall CommandMate under a Node.js version manager, which keeps"," global packages in a user-owned directory:"," nvm use <version> && npm install -g commandmate"):c.push(` 1. cd ${process.cwd()}`," 2. npm rebuild better-sqlite3"," 3. Start CommandMate again",""," If that fails, reinstalling picks up the current Node.js version:"," npm install -g commandmate"),c.join("\n")}var m=c(87447);let n=null;function o(){if(!n){let a=(0,m._$)().CM_DB_PATH,b=c(29021),d=e().dirname(a);b.existsSync(d)||b.mkdirSync(d,{recursive:!0,mode:448});let h=function(a){try{return new(i())(a)}catch(c){if(!k(c))throw c;if(j)throw Error(l("a rebuild was already attempted in this process.",!1));j=!0,console.error("[commandmate] better-sqlite3 was built for a different Node.js version.\n[commandmate] Rebuilding it automatically — this can take a few minutes...");let b=function(){let a=(0,g.spawnSync)("npm",["rebuild","better-sqlite3"],{cwd:process.cwd(),encoding:"utf-8",timeout:3e5,env:{...process.env,PATH:`${e().dirname(process.execPath)}${e().delimiter}${process.env.PATH??""}`}}),b=`${a.stdout??""}${a.stderr??""}`;return a.error||0!==a.status?{success:!1,permissionDenied:/EACCES|permission denied/i.test(b),output:b}:{success:!0,permissionDenied:!1,output:b}}();if(!b.success)throw Error(l("npm rebuild better-sqlite3 failed.",b.permissionDenied));console.error("[commandmate] Rebuild succeeded. Continuing startup.");try{return new(i())(a)}catch(a){if(k(a))throw Error(l("the addon still reports a version mismatch after rebuilding.",!1));throw a}}}(a);h.pragma("foreign_keys = ON"),h.pragma("journal_mode = WAL"),h.pragma("busy_timeout = 5000");try{(0,f.vI)(h)}catch(a){throw h.close(),a}n=h}return n}function p(){n&&(n.close(),n=null)}},90444:(a,b,c)=>{function d(a){a.exec(`
|
|
1128
|
+
CREATE TABLE IF NOT EXISTS worktrees (
|
|
1129
|
+
id TEXT PRIMARY KEY,
|
|
1130
|
+
name TEXT NOT NULL,
|
|
1131
|
+
path TEXT NOT NULL UNIQUE,
|
|
1132
|
+
last_message_summary TEXT,
|
|
1133
|
+
updated_at INTEGER
|
|
1134
|
+
);
|
|
1135
|
+
`),a.exec(`
|
|
1136
|
+
CREATE INDEX IF NOT EXISTS idx_worktrees_updated_at
|
|
1137
|
+
ON worktrees(updated_at DESC);
|
|
1138
|
+
`),a.exec(`
|
|
1139
|
+
CREATE TABLE IF NOT EXISTS chat_messages (
|
|
1140
|
+
id TEXT PRIMARY KEY,
|
|
1141
|
+
worktree_id TEXT NOT NULL,
|
|
1142
|
+
role TEXT NOT NULL CHECK(role IN ('user', 'assistant')),
|
|
1143
|
+
content TEXT NOT NULL,
|
|
1144
|
+
summary TEXT,
|
|
1145
|
+
timestamp INTEGER NOT NULL,
|
|
1146
|
+
log_file_name TEXT,
|
|
1147
|
+
request_id TEXT,
|
|
1148
|
+
message_type TEXT DEFAULT 'normal',
|
|
1149
|
+
prompt_data TEXT,
|
|
1150
|
+
cli_tool_id TEXT DEFAULT 'claude',
|
|
1151
|
+
archived INTEGER DEFAULT 0,
|
|
1152
|
+
|
|
1153
|
+
FOREIGN KEY (worktree_id) REFERENCES worktrees(id) ON DELETE CASCADE
|
|
1154
|
+
);
|
|
1155
|
+
`),a.exec(`
|
|
1156
|
+
CREATE INDEX IF NOT EXISTS idx_messages_worktree_time
|
|
1157
|
+
ON chat_messages(worktree_id, timestamp DESC);
|
|
1158
|
+
`),a.exec(`
|
|
1159
|
+
CREATE INDEX IF NOT EXISTS idx_messages_request_id
|
|
1160
|
+
ON chat_messages(request_id);
|
|
1161
|
+
`),a.exec(`
|
|
1162
|
+
CREATE INDEX IF NOT EXISTS idx_messages_type
|
|
1163
|
+
ON chat_messages(message_type, worktree_id);
|
|
1164
|
+
`),a.exec(`
|
|
1165
|
+
CREATE INDEX IF NOT EXISTS idx_messages_cli_tool
|
|
1166
|
+
ON chat_messages(worktree_id, cli_tool_id, timestamp DESC);
|
|
1167
|
+
`),a.exec(`
|
|
1168
|
+
CREATE INDEX IF NOT EXISTS idx_messages_worktree_role_archived_time
|
|
1169
|
+
ON chat_messages(worktree_id, role, archived, timestamp DESC);
|
|
1170
|
+
`),a.exec(`
|
|
1171
|
+
CREATE TABLE IF NOT EXISTS session_states (
|
|
1172
|
+
worktree_id TEXT NOT NULL,
|
|
1173
|
+
cli_tool_id TEXT NOT NULL DEFAULT 'claude',
|
|
1174
|
+
last_captured_line INTEGER DEFAULT 0,
|
|
1175
|
+
|
|
1176
|
+
PRIMARY KEY (worktree_id, cli_tool_id),
|
|
1177
|
+
FOREIGN KEY (worktree_id) REFERENCES worktrees(id) ON DELETE CASCADE
|
|
1178
|
+
);
|
|
1179
|
+
`)}c.d(b,{AC:()=>l.AC,Tu:()=>at,ug:()=>l.ug,eP:()=>av,mg:()=>au,lm:()=>n,af:()=>ah,KG:()=>D,cD:()=>Y,Jj:()=>Z,YX:()=>j,G4:()=>T,hL:()=>_,qp:()=>V,hl:()=>ao,To:()=>r,oH:()=>g.oH,UT:()=>ay.UT,py:()=>A,rY:()=>am,yy:()=>I,pE:()=>g.pE,z2:()=>af,cP:()=>t,DF:()=>g.DF,lA:()=>g.lA,Qp:()=>g.Qp,th:()=>ag.th,oZ:()=>e.oZ,ZP:()=>k,Ys:()=>C,vg:()=>K,Rm:()=>e.Rm,C8:()=>ap,u$:()=>an,MH:()=>ay.MH,BN:()=>l.BN,m0:()=>l.m0,r3:()=>f.r3,Tk:()=>y,fX:()=>f.fX,nO:()=>e.nO,Sj:()=>e.Sj,iT:()=>R,gp:()=>S,yE:()=>$,BE:()=>X,qK:()=>ad,p4:()=>e.p4,r8:()=>g.r8,of:()=>ab,DN:()=>q,pZ:()=>p,kA:()=>g.kA,VL:()=>g.VL,CF:()=>ag.CF,NV:()=>e.NV,ce:()=>ac,WZ:()=>ar,y1:()=>h,gg:()=>ay.gg,Nr:()=>z,ob:()=>x,fr:()=>G,J6:()=>aq,Ui:()=>e.Ui,P9:()=>e.P9,eN:()=>H,vi:()=>e.vi,uJ:()=>e.uJ,s4:()=>d,yT:()=>E,Vk:()=>ay.Vk,Mt:()=>as,UE:()=>ax,PL:()=>g.PL,jp:()=>g.jp,nQ:()=>u,yb:()=>L,GA:()=>e.GA,Cs:()=>l.Cs,xR:()=>U,az:()=>aa,nZ:()=>W,PP:()=>ae,Dx:()=>e.Dx,O:()=>e.O,EU:()=>g.EU,HZ:()=>e.HZ,UY:()=>s,cw:()=>g.cw,jJ:()=>ag.jJ,DC:()=>e.DC,gb:()=>i,yB:()=>e.yB,uy:()=>B,s:()=>e.s,iu:()=>e.iu,hq:()=>e.hq,z1:()=>e.z1,bl:()=>J,jA:()=>ag.jA,ZL:()=>e.ZL});var e=c(73753),f=c(95506),g=c(52660);function h(a,b,c="claude"){let d=a.prepare(`
|
|
1180
|
+
SELECT worktree_id, cli_tool_id, instance_id, last_captured_line, in_progress_message_id
|
|
1181
|
+
FROM session_states
|
|
1182
|
+
WHERE worktree_id = ? AND instance_id = ?
|
|
1183
|
+
`).get(b,c);return d?{worktreeId:d.worktree_id,cliToolId:d.cli_tool_id,instanceId:d.instance_id,lastCapturedLine:d.last_captured_line,inProgressMessageId:d.in_progress_message_id||null}:null}function i(a,b,c,d,e){let f=e??c;a.prepare(`
|
|
1184
|
+
INSERT INTO session_states (worktree_id, cli_tool_id, instance_id, last_captured_line)
|
|
1185
|
+
VALUES (?, ?, ?, ?)
|
|
1186
|
+
ON CONFLICT(worktree_id, instance_id) DO UPDATE SET
|
|
1187
|
+
last_captured_line = excluded.last_captured_line,
|
|
1188
|
+
cli_tool_id = excluded.cli_tool_id
|
|
1189
|
+
`).run(b,c,f,d)}function j(a,b,c,d){let e=d??c;a.prepare(`
|
|
1190
|
+
INSERT INTO session_states (worktree_id, cli_tool_id, instance_id, last_captured_line, in_progress_message_id)
|
|
1191
|
+
VALUES (?, ?, ?, 0, ?)
|
|
1192
|
+
ON CONFLICT(worktree_id, instance_id) DO UPDATE SET
|
|
1193
|
+
in_progress_message_id = excluded.in_progress_message_id,
|
|
1194
|
+
cli_tool_id = excluded.cli_tool_id
|
|
1195
|
+
`).run(b,c,e,null)}function k(a,b,c,d){d?a.prepare(`
|
|
1196
|
+
DELETE FROM session_states
|
|
1197
|
+
WHERE worktree_id = ? AND instance_id = ?
|
|
1198
|
+
`).run(b,d):c?a.prepare(`
|
|
1199
|
+
DELETE FROM session_states
|
|
1200
|
+
WHERE worktree_id = ? AND cli_tool_id = ?
|
|
1201
|
+
`).run(b,c):a.prepare(`
|
|
1202
|
+
DELETE FROM session_states
|
|
1203
|
+
WHERE worktree_id = ?
|
|
1204
|
+
`).run(b)}var l=c(28274),m=c(55511);class n extends Error{constructor(a,b,c){super(a),this.code=b,this.cause=c,this.name="MemoDbError"}}function o(a){return{id:a.id,worktreeId:a.worktree_id,title:a.title,content:a.content,position:a.position,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at)}}function p(a,b){return a.prepare(`
|
|
1205
|
+
SELECT id, worktree_id, title, content, position, created_at, updated_at
|
|
1206
|
+
FROM worktree_memos
|
|
1207
|
+
WHERE worktree_id = ?
|
|
1208
|
+
ORDER BY position ASC
|
|
1209
|
+
`).all(b).map(o)}function q(a,b){let c=a.prepare(`
|
|
1210
|
+
SELECT id, worktree_id, title, content, position, created_at, updated_at
|
|
1211
|
+
FROM worktree_memos
|
|
1212
|
+
WHERE id = ?
|
|
1213
|
+
`).get(b);return c?o(c):null}function r(a,b,c){let d=(0,m.randomUUID)(),e=Date.now(),f=c.title??"Memo",g=c.content??"",h=a.prepare(`
|
|
1214
|
+
INSERT INTO worktree_memos (id, worktree_id, title, content, position, created_at, updated_at)
|
|
1215
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
1216
|
+
`);try{h.run(d,b,f,g,c.position,e,e)}catch(a){if(a instanceof Error&&a.message.includes("UNIQUE constraint"))throw new n(`Memo position ${c.position} is already in use for worktree "${b}"`,"DUPLICATE_POSITION",a);throw a}return{id:d,worktreeId:b,title:f,content:g,position:c.position,createdAt:new Date(e),updatedAt:new Date(e)}}function s(a,b,c){let d=Date.now(),e=["updated_at = ?"],f=[d];void 0!==c.title&&(e.push("title = ?"),f.push(c.title)),void 0!==c.content&&(e.push("content = ?"),f.push(c.content)),f.push(b),a.prepare(`
|
|
1217
|
+
UPDATE worktree_memos
|
|
1218
|
+
SET ${e.join(", ")}
|
|
1219
|
+
WHERE id = ?
|
|
1220
|
+
`).run(...f)}function t(a,b){a.prepare(`
|
|
1221
|
+
DELETE FROM worktree_memos
|
|
1222
|
+
WHERE id = ?
|
|
1223
|
+
`).run(b)}function u(a,b,c){if(0===c.length)return;let d=Date.now();a.transaction(()=>{let b=a.prepare(`
|
|
1224
|
+
UPDATE worktree_memos
|
|
1225
|
+
SET position = -1 - position
|
|
1226
|
+
WHERE id = ?
|
|
1227
|
+
`);for(let a of c)b.run(a);let e=a.prepare(`
|
|
1228
|
+
UPDATE worktree_memos
|
|
1229
|
+
SET position = ?, updated_at = ?
|
|
1230
|
+
WHERE id = ?
|
|
1231
|
+
`);c.forEach((a,b)=>{e.run(b,d,a)})})()}let v=`
|
|
1232
|
+
SELECT
|
|
1233
|
+
t.id,
|
|
1234
|
+
t.repository_id,
|
|
1235
|
+
r.name AS repository_name,
|
|
1236
|
+
r.display_name AS repository_display_name,
|
|
1237
|
+
t.content,
|
|
1238
|
+
t.done,
|
|
1239
|
+
t.position,
|
|
1240
|
+
t.created_at,
|
|
1241
|
+
t.updated_at
|
|
1242
|
+
FROM repository_todos t
|
|
1243
|
+
JOIN repositories r ON r.id = t.repository_id
|
|
1244
|
+
`;function w(a){return{id:a.id,repositoryId:a.repository_id,repositoryName:a.repository_name,repositoryDisplayName:a.repository_display_name||void 0,content:a.content,done:1===a.done,position:a.position,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at)}}function x(a,b){return a.prepare(`
|
|
1245
|
+
${v}
|
|
1246
|
+
WHERE t.repository_id = ?
|
|
1247
|
+
ORDER BY t.position ASC, t.created_at ASC
|
|
1248
|
+
`).all(b).map(w)}function y(a){return a.prepare(`
|
|
1249
|
+
${v}
|
|
1250
|
+
ORDER BY
|
|
1251
|
+
COALESCE(NULLIF(TRIM(r.display_name), ''), r.name) COLLATE NOCASE ASC,
|
|
1252
|
+
t.position ASC,
|
|
1253
|
+
t.created_at ASC,
|
|
1254
|
+
t.id ASC
|
|
1255
|
+
`).all().map(w)}function z(a,b){let c=a.prepare(`
|
|
1256
|
+
${v}
|
|
1257
|
+
WHERE t.id = ?
|
|
1258
|
+
`).get(b);return c?w(c):null}function A(a,b,c){let d=(0,m.randomUUID)(),e=Date.now();a.prepare(`
|
|
1259
|
+
INSERT INTO repository_todos (id, repository_id, content, done, position, created_at, updated_at)
|
|
1260
|
+
VALUES (?, ?, ?, 0, ?, ?, ?)
|
|
1261
|
+
`).run(d,b,c.content,c.position,e,e);let f=z(a,d);if(!f)throw Error(`Failed to load created todo '${d}'`);return f}function B(a,b,c){let d=Date.now(),e=["updated_at = ?"],f=[d];void 0!==c.content&&(e.push("content = ?"),f.push(c.content)),void 0!==c.done&&(e.push("done = ?"),f.push(+!!c.done)),f.push(b),a.prepare(`
|
|
1262
|
+
UPDATE repository_todos
|
|
1263
|
+
SET ${e.join(", ")}
|
|
1264
|
+
WHERE id = ?
|
|
1265
|
+
`).run(...f)}function C(a,b){a.prepare(`
|
|
1266
|
+
DELETE FROM repository_todos
|
|
1267
|
+
WHERE id = ?
|
|
1268
|
+
`).run(b)}let D=["todo","doing","done"];function E(a){return"todo"===a||"doing"===a||"done"===a}function F(a){var b,c;let d=(b=a.status,c=a.done,E(b)?b:1===c?"done":"todo");return{id:a.id,worktreeId:a.worktree_id,content:a.content,detail:a.detail??"",status:d,done:"done"===d,position:a.position,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at)}}function G(a,b){return a.prepare(`
|
|
1269
|
+
SELECT id, worktree_id, content, detail, done, status, position, created_at, updated_at
|
|
1270
|
+
FROM worktree_todos
|
|
1271
|
+
WHERE worktree_id = ?
|
|
1272
|
+
ORDER BY position ASC, created_at ASC
|
|
1273
|
+
`).all(b).map(F)}function H(a,b){let c=a.prepare(`
|
|
1274
|
+
SELECT id, worktree_id, content, detail, done, status, position, created_at, updated_at
|
|
1275
|
+
FROM worktree_todos
|
|
1276
|
+
WHERE id = ?
|
|
1277
|
+
`).get(b);return c?F(c):null}function I(a,b,c){let d=(0,m.randomUUID)(),e=Date.now(),f=c.status??"todo",g=c.detail??"";return a.prepare(`
|
|
1278
|
+
INSERT INTO worktree_todos (id, worktree_id, content, detail, done, status, position, created_at, updated_at)
|
|
1279
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
1280
|
+
`).run(d,b,c.content,g,+("done"===f),f,c.position,e,e),{id:d,worktreeId:b,content:c.content,detail:g,status:f,done:"done"===f,position:c.position,createdAt:new Date(e),updatedAt:new Date(e)}}function J(a,b,c){let d,e=Date.now(),f=["updated_at = ?"],g=[e];void 0!==c.content&&(f.push("content = ?"),g.push(c.content)),void 0!==c.detail&&(f.push("detail = ?"),g.push(c.detail)),void 0!==c.status?d=c.status:void 0!==c.done&&(d=c.done?"done":"todo"),void 0!==d&&(f.push("status = ?"),g.push(d),f.push("done = ?"),g.push(+("done"===d))),g.push(b),a.prepare(`
|
|
1281
|
+
UPDATE worktree_todos
|
|
1282
|
+
SET ${f.join(", ")}
|
|
1283
|
+
WHERE id = ?
|
|
1284
|
+
`).run(...g)}function K(a,b){a.prepare(`
|
|
1285
|
+
DELETE FROM worktree_todos
|
|
1286
|
+
WHERE id = ?
|
|
1287
|
+
`).run(b)}function L(a,b,c){if(0===c.length)return;let d=Date.now();a.transaction(()=>{let e=a.prepare(`
|
|
1288
|
+
UPDATE worktree_todos
|
|
1289
|
+
SET position = -1 - position
|
|
1290
|
+
WHERE id = ? AND worktree_id = ?
|
|
1291
|
+
`);for(let a of c)e.run(a,b);let f=a.prepare(`
|
|
1292
|
+
UPDATE worktree_todos
|
|
1293
|
+
SET position = ?, updated_at = ?
|
|
1294
|
+
WHERE id = ? AND worktree_id = ?
|
|
1295
|
+
`);c.forEach((a,c)=>{f.run(c,d,a,b)})})()}function M(a,b){return Buffer.byteLength(a,"utf-8")<=b?a:Buffer.from(a,"utf-8").subarray(0,b).toString("utf-8")}function N(a){return{id:a.id,repositoryId:a.repository_id,cliToolId:a.cli_tool_id,workingDirectory:a.working_directory,executionMode:a.execution_mode??"interactive",resumeSessionId:a.resume_session_id??void 0,lastExecutionId:a.last_execution_id??void 0,sessionName:a.session_name??void 0,status:"idle"===a.status?"stopped":a.status,lastStartedAt:a.last_started_at?new Date(a.last_started_at):void 0,lastStoppedAt:a.last_stopped_at?new Date(a.last_stopped_at):void 0,contextSentAt:a.context_sent_at?new Date(a.context_sent_at):void 0,contextSnapshot:a.context_snapshot??void 0,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at),archived:1===a.archived}}function O(a){return{id:a.id,conversationId:a.conversation_id,role:a.role,content:a.content,summary:a.summary??void 0,timestamp:new Date(a.timestamp),messageType:a.message_type,deliveryStatus:a.delivery_status??void 0,archived:1===a.archived}}function P(a){return{id:a.id,conversationId:a.conversation_id,cliToolId:a.cli_tool_id,status:a.status,pid:a.pid??void 0,commandLine:a.command_line,promptText:a.prompt_text,stdoutText:a.stdout_text??void 0,stderrText:a.stderr_text??void 0,finalMessageText:a.final_message_text??void 0,exitCode:a.exit_code,resumeSessionIdBefore:a.resume_session_id_before??void 0,resumeSessionIdAfter:a.resume_session_id_after??void 0,startedAt:a.started_at?new Date(a.started_at):void 0,finishedAt:a.finished_at?new Date(a.finished_at):void 0,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at)}}function Q(a,b,c){a.prepare(`
|
|
1296
|
+
UPDATE assistant_conversations
|
|
1297
|
+
SET updated_at = ?
|
|
1298
|
+
WHERE id = ?
|
|
1299
|
+
`).run(c.getTime(),b)}function R(a,b,c={}){let d=`
|
|
1300
|
+
SELECT *
|
|
1301
|
+
FROM assistant_conversations
|
|
1302
|
+
WHERE id = ?
|
|
1303
|
+
${c.includeArchived?"":"AND archived = 0"}
|
|
1304
|
+
LIMIT 1
|
|
1305
|
+
`,e=a.prepare(d).get(b);return e?N(e):null}function S(a,b,c,d={}){let e=`
|
|
1306
|
+
SELECT *
|
|
1307
|
+
FROM assistant_conversations
|
|
1308
|
+
WHERE repository_id = ?
|
|
1309
|
+
AND cli_tool_id = ?
|
|
1310
|
+
${d.includeArchived?"":"AND archived = 0"}
|
|
1311
|
+
LIMIT 1
|
|
1312
|
+
`,f=a.prepare(e).get(b,c);return f?N(f):null}function T(a,b){let c=(0,m.randomUUID)(),d=Date.now();return a.prepare(`
|
|
1313
|
+
INSERT INTO assistant_conversations (
|
|
1314
|
+
id, repository_id, cli_tool_id, working_directory, execution_mode, resume_session_id,
|
|
1315
|
+
last_execution_id, session_name, status,
|
|
1316
|
+
last_started_at, last_stopped_at, context_sent_at, created_at, updated_at, archived
|
|
1317
|
+
)
|
|
1318
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0)
|
|
1319
|
+
`).run(c,b.repositoryId,b.cliToolId,b.workingDirectory,b.executionMode??"interactive",b.resumeSessionId??null,b.lastExecutionId??null,b.sessionName??null,b.status??"stopped",b.lastStartedAt?.getTime()??null,b.lastStoppedAt?.getTime()??null,b.contextSentAt?.getTime()??null,d,d),{id:c,repositoryId:b.repositoryId,cliToolId:b.cliToolId,workingDirectory:b.workingDirectory,executionMode:b.executionMode??"interactive",resumeSessionId:b.resumeSessionId,lastExecutionId:b.lastExecutionId,sessionName:b.sessionName,status:b.status??"stopped",contextSentAt:b.contextSentAt,lastStartedAt:b.lastStartedAt,lastStoppedAt:b.lastStoppedAt,createdAt:new Date(d),updatedAt:new Date(d),archived:!1}}function U(a,b,c){let d=[],e=[];void 0!==c.workingDirectory&&(d.push("working_directory = ?"),e.push(c.workingDirectory)),void 0!==c.executionMode&&(d.push("execution_mode = ?"),e.push(c.executionMode)),void 0!==c.resumeSessionId&&(d.push("resume_session_id = ?"),e.push(c.resumeSessionId)),void 0!==c.lastExecutionId&&(d.push("last_execution_id = ?"),e.push(c.lastExecutionId)),void 0!==c.sessionName&&(d.push("session_name = ?"),e.push(c.sessionName)),void 0!==c.status&&(d.push("status = ?"),e.push(c.status)),void 0!==c.lastStartedAt&&(d.push("last_started_at = ?"),e.push(c.lastStartedAt?.getTime()??null)),void 0!==c.lastStoppedAt&&(d.push("last_stopped_at = ?"),e.push(c.lastStoppedAt?.getTime()??null)),void 0!==c.contextSentAt&&(d.push("context_sent_at = ?"),e.push(c.contextSentAt?.getTime()??null)),void 0!==c.contextSnapshot&&(d.push("context_snapshot = ?"),e.push(c.contextSnapshot??null)),void 0!==c.archived&&(d.push("archived = ?"),e.push(+!!c.archived));let f=c.updatedAt??new Date;return d.push("updated_at = ?"),e.push(f.getTime()),e.push(b),a.prepare(`
|
|
1320
|
+
UPDATE assistant_conversations
|
|
1321
|
+
SET ${d.join(", ")}
|
|
1322
|
+
WHERE id = ?
|
|
1323
|
+
`).run(...e),R(a,b,{includeArchived:!0})}function V(a,b){let c=(0,m.randomUUID)();return a.prepare(`
|
|
1324
|
+
INSERT INTO assistant_messages (
|
|
1325
|
+
id, conversation_id, role, content, summary, timestamp, message_type, delivery_status, archived
|
|
1326
|
+
)
|
|
1327
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, 0)
|
|
1328
|
+
`).run(c,b.conversationId,b.role,b.content,b.summary??null,b.timestamp.getTime(),b.messageType,b.deliveryStatus??null),Q(a,b.conversationId,b.timestamp),{id:c,...b,archived:!1}}function W(a,b,c){a.prepare(`
|
|
1329
|
+
UPDATE assistant_messages
|
|
1330
|
+
SET delivery_status = ?
|
|
1331
|
+
WHERE id = ?
|
|
1332
|
+
`).run(c,b)}function X(a,b,c={}){let{limit:d=200,before:e,includeArchived:f=!1}=c,g=[b,e?.getTime()??null,e?.getTime()??null],h=`
|
|
1333
|
+
SELECT *
|
|
1334
|
+
FROM assistant_messages
|
|
1335
|
+
WHERE conversation_id = ?
|
|
1336
|
+
AND (? IS NULL OR timestamp < ?)
|
|
1337
|
+
`;return f||(h+=" AND archived = 0"),h+=" ORDER BY timestamp DESC LIMIT ?",g.push(d),a.prepare(h).all(...g).map(O)}function Y(a,b){return a.prepare(`
|
|
1338
|
+
UPDATE assistant_messages
|
|
1339
|
+
SET archived = 1
|
|
1340
|
+
WHERE conversation_id = ?
|
|
1341
|
+
AND archived = 0
|
|
1342
|
+
`).run(b).changes}function Z(a,b,c){return a.prepare(`
|
|
1343
|
+
UPDATE assistant_messages
|
|
1344
|
+
SET archived = 1
|
|
1345
|
+
WHERE conversation_id = ?
|
|
1346
|
+
AND archived = 0
|
|
1347
|
+
AND timestamp >= ?
|
|
1348
|
+
`).run(b,c).changes}function $(a,b){let c=a.prepare(`
|
|
1349
|
+
SELECT * FROM assistant_messages WHERE id = ?
|
|
1350
|
+
`).get(b);return c?O(c):null}function _(a,b){let c=(0,m.randomUUID)(),d=Date.now();return a.prepare(`
|
|
1351
|
+
INSERT INTO assistant_executions (
|
|
1352
|
+
id, conversation_id, cli_tool_id, status, pid, command_line, prompt_text,
|
|
1353
|
+
stdout_text, stderr_text, final_message_text, exit_code, resume_session_id_before,
|
|
1354
|
+
resume_session_id_after, started_at, finished_at, created_at, updated_at
|
|
1355
|
+
)
|
|
1356
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
1357
|
+
`).run(c,b.conversationId,b.cliToolId,b.status??"queued",b.pid??null,b.commandLine,M(b.promptText,65536),M(b.stdoutText??"",262144)||null,M(b.stderrText??"",262144)||null,b.finalMessageText?M(b.finalMessageText,65536):null,b.exitCode??null,b.resumeSessionIdBefore??null,b.resumeSessionIdAfter??null,b.startedAt?.getTime()??null,b.finishedAt?.getTime()??null,d,d),Q(a,b.conversationId,new Date(d)),{id:c,conversationId:b.conversationId,cliToolId:b.cliToolId,status:b.status??"queued",pid:b.pid,commandLine:b.commandLine,promptText:M(b.promptText,65536),stdoutText:b.stdoutText?M(b.stdoutText,262144):void 0,stderrText:b.stderrText?M(b.stderrText,262144):void 0,finalMessageText:b.finalMessageText?M(b.finalMessageText,65536):void 0,exitCode:b.exitCode,resumeSessionIdBefore:b.resumeSessionIdBefore,resumeSessionIdAfter:b.resumeSessionIdAfter,startedAt:b.startedAt,finishedAt:b.finishedAt,createdAt:new Date(d),updatedAt:new Date(d)}}function aa(a,b,c){let d=[],e=[];void 0!==c.status&&(d.push("status = ?"),e.push(c.status)),void 0!==c.pid&&(d.push("pid = ?"),e.push(c.pid)),void 0!==c.stdoutText&&(d.push("stdout_text = ?"),e.push(c.stdoutText?M(c.stdoutText,262144):null)),void 0!==c.stderrText&&(d.push("stderr_text = ?"),e.push(c.stderrText?M(c.stderrText,262144):null)),void 0!==c.finalMessageText&&(d.push("final_message_text = ?"),e.push(c.finalMessageText?M(c.finalMessageText,65536):null)),void 0!==c.exitCode&&(d.push("exit_code = ?"),e.push(c.exitCode)),void 0!==c.resumeSessionIdAfter&&(d.push("resume_session_id_after = ?"),e.push(c.resumeSessionIdAfter)),void 0!==c.startedAt&&(d.push("started_at = ?"),e.push(c.startedAt?.getTime()??null)),void 0!==c.finishedAt&&(d.push("finished_at = ?"),e.push(c.finishedAt?.getTime()??null));let f=c.updatedAt??new Date;return d.push("updated_at = ?"),e.push(f.getTime(),b),a.prepare(`
|
|
1358
|
+
UPDATE assistant_executions
|
|
1359
|
+
SET ${d.join(", ")}
|
|
1360
|
+
WHERE id = ?
|
|
1361
|
+
`).run(...e),function(a,b){let c=a.prepare(`
|
|
1362
|
+
SELECT *
|
|
1363
|
+
FROM assistant_executions
|
|
1364
|
+
WHERE id = ?
|
|
1365
|
+
LIMIT 1
|
|
1366
|
+
`).get(b);return c?P(c):null}(a,b)}function ab(a,b){let c=a.prepare(`
|
|
1367
|
+
SELECT *
|
|
1368
|
+
FROM assistant_executions
|
|
1369
|
+
WHERE conversation_id = ?
|
|
1370
|
+
ORDER BY created_at DESC
|
|
1371
|
+
LIMIT 1
|
|
1372
|
+
`).get(b);return c?P(c):null}function ac(a,b){let c=a.prepare(`
|
|
1373
|
+
SELECT *
|
|
1374
|
+
FROM assistant_executions
|
|
1375
|
+
WHERE conversation_id = ?
|
|
1376
|
+
AND status = 'running'
|
|
1377
|
+
ORDER BY created_at DESC
|
|
1378
|
+
LIMIT 1
|
|
1379
|
+
`).get(b);return c?P(c):null}function ad(a,b){let c=a.prepare(`
|
|
1380
|
+
SELECT conversation_id, last_captured_line, in_progress_message_id
|
|
1381
|
+
FROM assistant_session_states
|
|
1382
|
+
WHERE conversation_id = ?
|
|
1383
|
+
`).get(b);return c?{conversationId:c.conversation_id,lastCapturedLine:c.last_captured_line,inProgressMessageId:c.in_progress_message_id}:null}function ae(a,b,c,d){a.prepare(`
|
|
1384
|
+
INSERT INTO assistant_session_states (conversation_id, last_captured_line, in_progress_message_id)
|
|
1385
|
+
VALUES (?, ?, ?)
|
|
1386
|
+
ON CONFLICT(conversation_id) DO UPDATE SET
|
|
1387
|
+
last_captured_line = excluded.last_captured_line,
|
|
1388
|
+
in_progress_message_id = excluded.in_progress_message_id
|
|
1389
|
+
`).run(b,c,d??null)}function af(a,b){a.prepare(`
|
|
1390
|
+
DELETE FROM assistant_session_states
|
|
1391
|
+
WHERE conversation_id = ?
|
|
1392
|
+
`).run(b)}c(34129);var ag=c(43167);let ah=["manual","wait","api","task"],ai=`
|
|
1393
|
+
id, worktree_id, instance_id, task_id, trigger, status, base_ref, started_at, finished_at
|
|
1394
|
+
`,aj=`
|
|
1395
|
+
id, run_id, gate_id, command, status, exit_code, duration_ms, log_tail, started_at, finished_at
|
|
1396
|
+
`;function ak(a){return{id:a.id,worktreeId:a.worktree_id,instanceId:a.instance_id,taskId:a.task_id,trigger:a.trigger,status:a.status,baseRef:a.base_ref,startedAt:new Date(a.started_at),finishedAt:null===a.finished_at?null:new Date(a.finished_at)}}function al(a){return{id:a.id,runId:a.run_id,gateId:a.gate_id,command:a.command,status:a.status,exitCode:a.exit_code,durationMs:a.duration_ms,logTail:a.log_tail,startedAt:new Date(a.started_at),finishedAt:null===a.finished_at?null:new Date(a.finished_at),timingsMeasured:null!==a.finished_at&&null!==a.duration_ms&&a.finished_at-a.started_at===a.duration_ms}}function am(a,b){let c=Date.now(),d=a.prepare(`
|
|
1397
|
+
INSERT INTO verification_runs (
|
|
1398
|
+
worktree_id, instance_id, task_id, trigger, status, base_ref, started_at, finished_at
|
|
1399
|
+
)
|
|
1400
|
+
VALUES (?, ?, ?, ?, 'running', ?, ?, NULL)
|
|
1401
|
+
`).run(b.worktreeId,b.instanceId??null,b.taskId??null,b.trigger,b.baseRef??null,c),e=a.prepare(`SELECT ${ai} FROM verification_runs WHERE id = ?`).get(Number(d.lastInsertRowid));if(!e)throw Error("Failed to persist verification run");return ak(e)}function an(a,b,c){if(0===a.prepare("UPDATE verification_runs SET status = ?, finished_at = ? WHERE id = ?").run(c,Date.now(),b).changes)throw Error(`Verification run ${b} not found`)}function ao(a,b,c){let d=Date.now(),e=a.prepare(`
|
|
1402
|
+
INSERT INTO verification_gate_results (
|
|
1403
|
+
run_id, gate_id, command, status, exit_code, duration_ms, log_tail, started_at, finished_at
|
|
1404
|
+
)
|
|
1405
|
+
VALUES (?, ?, ?, 'running', NULL, NULL, NULL, ?, NULL)
|
|
1406
|
+
`).run(b,c.gateId,c.command,d),f=a.prepare(`SELECT ${aj} FROM verification_gate_results WHERE id = ?`).get(Number(e.lastInsertRowid));if(!f)throw Error("Failed to persist verification gate result");return al(f)}function ap(a,b,c){if(0===a.prepare(`
|
|
1407
|
+
UPDATE verification_gate_results
|
|
1408
|
+
SET status = ?, exit_code = ?, duration_ms = ?, log_tail = ?,
|
|
1409
|
+
started_at = COALESCE(?, started_at),
|
|
1410
|
+
finished_at = ?
|
|
1411
|
+
WHERE id = ?
|
|
1412
|
+
`).run(c.status,c.exitCode??null,c.durationMs??null,c.logTail??null,c.executionWindow?.startedAt??null,c.executionWindow?.finishedAt??Date.now(),b).changes)throw Error(`Verification gate result ${b} not found`)}function aq(a,b){let c=a.prepare(`SELECT ${ai} FROM verification_runs WHERE id = ?`).get(b);if(!c)return null;let d=a.prepare(`
|
|
1413
|
+
SELECT ${aj} FROM verification_gate_results
|
|
1414
|
+
WHERE run_id = ?
|
|
1415
|
+
ORDER BY started_at ASC, id ASC
|
|
1416
|
+
`).all(b);return{...ak(c),gates:d.map(al)}}function ar(a,b){let c=a.prepare(`
|
|
1417
|
+
SELECT ${ai} FROM verification_runs
|
|
1418
|
+
WHERE worktree_id = ? AND status = 'running'
|
|
1419
|
+
ORDER BY id DESC
|
|
1420
|
+
LIMIT 1
|
|
1421
|
+
`).get(b);return c?ak(c):null}function as(a,b,c=20){return a.prepare(`
|
|
1422
|
+
SELECT ${ai} FROM verification_runs
|
|
1423
|
+
WHERE worktree_id = ?
|
|
1424
|
+
ORDER BY started_at DESC, id DESC
|
|
1425
|
+
LIMIT ?
|
|
1426
|
+
`).all(b,c).map(ak)}let at=50,au=500,av=90;function aw(a,b,c,d){return void 0!==a&&Number.isFinite(a)?Math.min(Math.max(Math.trunc(a),c),d):b}function ax(a,b={}){let c=aw(b.limit,at,1,au),d=[],e=[];if(void 0!==b.worktreeId&&(d.push("worktree_id = ?"),e.push(b.worktreeId)),void 0!==b.days){let a=aw(b.days,av,1,av);d.push("started_at >= ?"),e.push(Date.now()-864e5*a)}let f=d.length>0?`WHERE ${d.join(" AND ")}`:"",g=a.prepare(`
|
|
1427
|
+
SELECT ${ai} FROM verification_runs
|
|
1428
|
+
${f}
|
|
1429
|
+
ORDER BY started_at DESC, id DESC
|
|
1430
|
+
LIMIT ?
|
|
1431
|
+
`).all(...e,c);if(0===g.length)return[];let h=g.map(()=>"?").join(", "),i=a.prepare(`
|
|
1432
|
+
SELECT run_id, gate_id, status, exit_code, duration_ms
|
|
1433
|
+
FROM verification_gate_results
|
|
1434
|
+
WHERE run_id IN (${h})
|
|
1435
|
+
ORDER BY started_at ASC, id ASC
|
|
1436
|
+
`).all(...g.map(a=>a.id)),j=new Map;for(let a of i){let b={gateId:a.gate_id,status:a.status,exitCode:a.exit_code,durationMs:a.duration_ms},c=j.get(a.run_id);c?c.push(b):j.set(a.run_id,[b])}return g.map(a=>({...ak(a),gates:j.get(a.id)??[]}))}var ay=c(48524)},95506:(a,b,c)=>{function d(a){return void 0!==a.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = 'worktree_aliases'").get()}function e(a,b){if(!b)return null;if(a.prepare("SELECT 1 FROM worktrees WHERE id = ?").get(b))return b;if(!d(a))return null;let c=a.prepare("SELECT worktree_id FROM worktree_aliases WHERE old_id = ?").get(b);return c&&a.prepare("SELECT 1 FROM worktrees WHERE id = ?").get(c.worktree_id)?c.worktree_id:null}function f(a){return d(a)?a.prepare(`SELECT old_id, worktree_id, created_at
|
|
1437
|
+
FROM worktree_aliases
|
|
1438
|
+
ORDER BY created_at ASC, old_id ASC`).all().map(a=>({oldId:a.old_id,worktreeId:a.worktree_id,createdAt:a.created_at})):[]}function g(a){return d(a)?a.prepare("SELECT old_id FROM worktree_aliases").all().map(a=>a.old_id):[]}c.d(b,{fX:()=>f,l0:()=>e,r3:()=>g})}};
|