commandmate 0.11.3 → 0.12.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 +392 -300
- package/.next/app-path-routes-manifest.json +30 -21
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +12 -12
- package/.next/react-loadable-manifest.json +8 -6
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +66 -0
- package/.next/server/app/_not-found/page.js.nft.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 +1 -1
- package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update-check/route.js +1 -1
- package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/route.js +1 -1
- package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
- package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/status/route.js +1 -1
- package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
- package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/subscriptions/route.js +1 -1
- package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/[id]/route.js +1 -0
- package/.next/server/app/api/skills/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/route.js +1 -0
- package/.next/server/app/api/skills/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/todos/route.js +1 -1
- package/.next/server/app/api/todos/route_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route.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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js +1 -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]/install/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/route.js +23 -0
- package/.next/server/app/api/worktrees/[id]/skills/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +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]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
- package/.next/server/app/chat/page.js +2 -2
- package/.next/server/app/chat/page.js.nft.json +1 -1
- package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/more/page.js +2 -2
- package/.next/server/app/more/page.js.nft.json +1 -1
- package/.next/server/app/more/page_client-reference-manifest.js +1 -1
- package/.next/server/app/offline/page.js.nft.json +1 -1
- package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/repositories/page.js +1 -1
- package/.next/server/app/repositories/page.js.nft.json +1 -1
- package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page.js +1 -1
- package/.next/server/app/review/page.js.nft.json +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sessions/page.js +1 -1
- package/.next/server/app/sessions/page.js.nft.json +1 -1
- package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/[skillId]/page.js +2 -0
- package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -0
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/skills/page.js +2 -0
- package/.next/server/app/skills/page.js.nft.json +1 -0
- package/.next/server/app/skills/page_client-reference-manifest.js +1 -0
- 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 +9 -9
- 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 +30 -21
- package/.next/server/chunks/1117.js +1 -1
- package/.next/server/chunks/120.js +1 -0
- package/.next/server/chunks/1808.js +1 -0
- package/.next/server/chunks/186.js +1 -0
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/22.js +1 -0
- package/.next/server/chunks/2328.js +1 -0
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/3042.js +2 -0
- package/.next/server/chunks/3543.js +1 -1
- package/.next/server/chunks/3708.js +1 -0
- package/.next/server/chunks/3945.js +1 -1
- package/.next/server/chunks/5064.js +1 -0
- package/.next/server/chunks/5226.js +28 -0
- package/.next/server/chunks/5306.js +2 -0
- package/.next/server/chunks/5312.js +1 -0
- package/.next/server/chunks/5326.js +1 -0
- package/.next/server/chunks/5381.js +1 -1
- package/.next/server/chunks/5456.js +1 -0
- package/.next/server/chunks/5571.js +1 -1
- package/.next/server/chunks/5959.js +2 -2
- package/.next/server/chunks/6065.js +1 -0
- package/.next/server/chunks/6130.js +1 -0
- package/.next/server/chunks/6285.js +1 -1
- package/.next/server/chunks/646.js +6 -6
- package/.next/server/chunks/{9968.js → 7587.js} +1 -1
- package/.next/server/chunks/8584.js +1 -0
- package/.next/server/chunks/8681.js +1 -1
- package/.next/server/chunks/8807.js +950 -804
- package/.next/server/chunks/9123.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/D-aoE4gWfuCUN0GqEPIX3/_buildManifest.js +1 -0
- package/.next/static/chunks/1668-7484081c45a44f89.js +1 -0
- package/.next/static/chunks/3418-7e47651340d940b0.js +1 -0
- package/.next/static/chunks/4027-0c529b322be7d4d8.js +1 -0
- package/.next/static/chunks/{4560-64b1461fd996127a.js → 4560-04e5aebcab96bfa1.js} +1 -1
- package/.next/static/chunks/6007-de36119357dcd418.js +1 -0
- package/.next/static/chunks/{6488-8819e6905355caea.js → 6488-e257111ca7389d05.js} +1 -1
- package/.next/static/chunks/{8965-872d8de254196cec.js → 6497-dc26c6c6b0b15adf.js} +1 -1
- package/.next/static/chunks/790-d8e6acd26e03679c.js +1 -0
- package/.next/static/chunks/8361.4bf062be2d2962f4.js +1 -0
- package/.next/static/chunks/app/api/app/update/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/app/update-check/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/assistant/conversation/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/assistant/current-output/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/assistant/messages/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/assistant/session/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/assistant/start/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/assistant/terminal/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/assistant/tools/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/skills/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/templates/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/todos/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/chat/{page-9ed2ffd98eb4ae18.js → page-9cf4ba62e21d9074.js} +1 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/more/{page-a496425bba427b48.js → page-082d4ae496f9a36e.js} +1 -1
- package/.next/static/chunks/app/{page-15bfd76bcf65842d.js → page-af457ca5876ed616.js} +1 -1
- package/.next/static/chunks/app/proxy/[...path]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/repositories/{page-d214522ab8792ce7.js → page-75f0d70452c6b6c0.js} +1 -1
- package/.next/static/chunks/app/review/{page-1dadf0b5d7129598.js → page-f431d630097c2e85.js} +1 -1
- package/.next/static/chunks/app/sessions/{page-96f007d986c5f327.js → page-20f07a99db64d2ca.js} +1 -1
- package/.next/static/chunks/app/skills/[skillId]/page-68ed5e9186efe56d.js +1 -0
- package/.next/static/chunks/app/skills/page-46242c428ee8bccf.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-bf811e793052c917.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/terminal/page-a75fe180a7233b2b.js +1 -0
- package/.next/static/chunks/webpack-0f9275e279c058eb.js +1 -0
- package/.next/static/css/b4bdb1f3457fe9a7.css +1 -0
- package/.next/trace +11 -10
- package/.next/types/app/api/skills/[id]/route.ts +347 -0
- package/.next/types/app/api/skills/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/skills/[skillId]/install/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/skills/[skillId]/plan/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/skills/route.ts +347 -0
- package/.next/types/app/skills/[skillId]/page.ts +84 -0
- package/.next/types/app/skills/page.ts +84 -0
- package/.next/types/routes.d.ts +11 -2
- package/.next/types/validator.ts +81 -0
- package/dist/cli/commands/skill-format.d.ts +28 -0
- package/dist/cli/commands/skill-format.d.ts.map +1 -0
- package/dist/cli/commands/skill-format.js +163 -0
- package/dist/cli/commands/skill-guards.d.ts +53 -0
- package/dist/cli/commands/skill-guards.d.ts.map +1 -0
- package/dist/cli/commands/skill-guards.js +188 -0
- package/dist/cli/commands/skill.d.ts +24 -0
- package/dist/cli/commands/skill.d.ts.map +1 -0
- package/dist/cli/commands/skill.js +365 -0
- package/dist/cli/docs/agent-operations.d.ts +1 -1
- package/dist/cli/docs/agent-operations.d.ts.map +1 -1
- package/dist/cli/docs/agent-operations.js +36 -0
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +11 -0
- package/dist/cli/types/api-responses.d.ts +215 -0
- package/dist/cli/types/api-responses.d.ts.map +1 -1
- package/dist/cli/types/index.d.ts +60 -0
- package/dist/cli/types/index.d.ts.map +1 -1
- package/dist/cli/types/index.js +23 -1
- package/dist/cli/utils/api-client.d.ts +19 -1
- package/dist/cli/utils/api-client.d.ts.map +1 -1
- package/dist/cli/utils/api-client.js +41 -4
- package/dist/cli/utils/npx-runner.d.ts +14 -0
- package/dist/cli/utils/npx-runner.d.ts.map +1 -1
- package/dist/cli/utils/npx-runner.js +20 -0
- package/dist/server/server.js +57 -0
- package/dist/server/src/config/activity-bar-config.js +2 -0
- package/dist/server/src/config/git-status-config.js +83 -0
- package/dist/server/src/config/skill-security-config.js +139 -0
- 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/v44-skill-operations.js +81 -0
- package/dist/server/src/lib/db/migrations/v45-skill-installations.js +59 -0
- package/dist/server/src/lib/db/migrations/v46-skill-installations-cascade.js +107 -0
- package/dist/server/src/lib/db/migrations/v47-skill-installations-roots.js +70 -0
- package/dist/server/src/lib/db/worktree-db.js +9 -4
- package/dist/server/src/lib/git/git-errors.js +336 -0
- package/dist/server/src/lib/git/git-exec.js +285 -0
- package/dist/server/src/lib/skills/compatibility.js +194 -0
- package/dist/server/src/lib/skills/constants.js +252 -0
- package/dist/server/src/lib/skills/errors.js +82 -0
- package/dist/server/src/lib/skills/index.js +91 -0
- package/dist/server/src/lib/skills/install-apply.js +670 -0
- package/dist/server/src/lib/skills/install-plan.js +582 -0
- package/dist/server/src/lib/skills/installed-state.js +127 -0
- package/dist/server/src/lib/skills/integrity.js +225 -0
- package/dist/server/src/lib/skills/json-schema.js +365 -0
- package/dist/server/src/lib/skills/operation-audit.js +120 -0
- package/dist/server/src/lib/skills/operation-journal.js +286 -0
- package/dist/server/src/lib/skills/operation-lock.js +339 -0
- package/dist/server/src/lib/skills/operation-reconciler.js +107 -0
- package/dist/server/src/lib/skills/operation-store.js +153 -0
- package/dist/server/src/lib/skills/package-reader.js +495 -0
- package/dist/server/src/lib/skills/package-validator.js +451 -0
- package/dist/server/src/lib/skills/preview-diff.js +627 -0
- package/dist/server/src/lib/skills/safe-yaml.js +593 -0
- package/dist/server/src/lib/skills/schema.js +1248 -0
- package/dist/server/src/lib/skills/semver.js +193 -0
- package/dist/server/src/lib/skills/snapshot-store.js +334 -0
- package/dist/server/src/lib/skills/startup-reconcile.js +138 -0
- package/dist/server/src/lib/skills/uninstall-apply.js +495 -0
- package/dist/server/src/lib/skills/uninstall-plan.js +479 -0
- package/dist/server/src/types/skills.js +17 -0
- package/package.json +1 -1
- package/.next/server/chunks/129.js +0 -1
- package/.next/server/chunks/2478.js +0 -1
- package/.next/server/chunks/9886.js +0 -1
- package/.next/static/chunks/3165-87bf884f7f3d15cf.js +0 -1
- package/.next/static/chunks/6416.6756b7ad06dd96f7.js +0 -1
- package/.next/static/chunks/8676.57260a06f6554e7e.js +0 -1
- package/.next/static/chunks/app/api/app/update/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/app/update-check/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/assistant/conversation/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/assistant/current-output/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/assistant/messages/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/assistant/session/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/assistant/start/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/assistant/terminal/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/assistant/tools/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/templates/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/todos/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-6105a3470b279527.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/terminal/page-ed4590b024edd8d6.js +0 -1
- package/.next/static/chunks/webpack-2e3739a831868daa.js +0 -1
- package/.next/static/css/d7e2e8d1b8d69d36.css +0 -1
- package/.next/static/i8mdUwheg9j9sU_lI_ZSf/_buildManifest.js +0 -1
- /package/.next/static/{i8mdUwheg9j9sU_lI_ZSf → D-aoE4gWfuCUN0GqEPIX3}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Git typed errors + API error mapping + network-stderr classification.
|
|
4
|
+
* Issue #921: extracted from git-utils.ts (god-module split, P1-a).
|
|
5
|
+
*
|
|
6
|
+
* Leaf module: depends only on next/server + logger. The exec layer
|
|
7
|
+
* (git-exec.ts) and every feature module import their typed errors from here,
|
|
8
|
+
* and `git-utils.ts` re-exports this barrel-style for backward compatibility.
|
|
9
|
+
*
|
|
10
|
+
* Security considerations:
|
|
11
|
+
* - handleGitApiError / classifyNetworkStderr never echo raw git stderr (which
|
|
12
|
+
* may carry credential-bearing remote URLs or absolute paths) into the HTTP
|
|
13
|
+
* body or the thrown error message. See the per-class notes below.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.GitNetworkError = exports.GitForceWithLeaseStaleError = exports.GitProtectedBranchError = exports.GitNoUpstreamError = exports.GitNonFastForwardError = exports.GitAuthFailedError = exports.GitResetDefaultBranchError = exports.GitNothingToStashError = exports.GitDefaultBranchError = exports.GitCurrentBranchError = exports.GitDirtyError = exports.GitBranchCheckedOutElsewhereError = exports.GitBranchNotMergedError = exports.GitBranchNotFoundError = exports.GitNothingToCommitError = exports.GitIndexLockedError = exports.GitNotRepoError = exports.GitTimeoutError = void 0;
|
|
17
|
+
exports.handleGitApiError = handleGitApiError;
|
|
18
|
+
exports.classifyNetworkStderr = classifyNetworkStderr;
|
|
19
|
+
const server_1 = require("next/server");
|
|
20
|
+
const logger_1 = require("../../lib/logger");
|
|
21
|
+
const logger = (0, logger_1.createLogger)('git-errors');
|
|
22
|
+
/**
|
|
23
|
+
* Custom error class for git command timeout
|
|
24
|
+
* Used by API layer to distinguish 504 (timeout) from 500 (general error)
|
|
25
|
+
*/
|
|
26
|
+
class GitTimeoutError extends Error {
|
|
27
|
+
constructor(message) {
|
|
28
|
+
super(message);
|
|
29
|
+
this.name = 'GitTimeoutError';
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.GitTimeoutError = GitTimeoutError;
|
|
33
|
+
/**
|
|
34
|
+
* Custom error class for "not a git repository" errors
|
|
35
|
+
*/
|
|
36
|
+
class GitNotRepoError extends Error {
|
|
37
|
+
constructor(message) {
|
|
38
|
+
super(message);
|
|
39
|
+
this.name = 'GitNotRepoError';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.GitNotRepoError = GitNotRepoError;
|
|
43
|
+
/**
|
|
44
|
+
* Custom error class for "git index locked" errors (Issue #780).
|
|
45
|
+
* Thrown when `.git/index.lock` exists before a write op, or when an in-process
|
|
46
|
+
* write for the same worktree is still running. The API layer maps this to 409.
|
|
47
|
+
*/
|
|
48
|
+
class GitIndexLockedError extends Error {
|
|
49
|
+
constructor(message) {
|
|
50
|
+
super(message);
|
|
51
|
+
this.name = 'GitIndexLockedError';
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.GitIndexLockedError = GitIndexLockedError;
|
|
55
|
+
/**
|
|
56
|
+
* Custom error class for the "nothing to commit" condition (Issue #780).
|
|
57
|
+
* The API layer maps this to 400.
|
|
58
|
+
*/
|
|
59
|
+
class GitNothingToCommitError extends Error {
|
|
60
|
+
constructor(message) {
|
|
61
|
+
super(message);
|
|
62
|
+
this.name = 'GitNothingToCommitError';
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.GitNothingToCommitError = GitNothingToCommitError;
|
|
66
|
+
// ============================================================================
|
|
67
|
+
// Issue #781: branch-operation typed errors
|
|
68
|
+
// ============================================================================
|
|
69
|
+
/** A branch named in a checkout/delete does not exist (-> 404 branch_not_found). */
|
|
70
|
+
class GitBranchNotFoundError extends Error {
|
|
71
|
+
constructor(message) {
|
|
72
|
+
super(message);
|
|
73
|
+
this.name = 'GitBranchNotFoundError';
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.GitBranchNotFoundError = GitBranchNotFoundError;
|
|
77
|
+
/** `git branch -d` refused because the branch is not fully merged (-> 409 not_merged). */
|
|
78
|
+
class GitBranchNotMergedError extends Error {
|
|
79
|
+
constructor(message) {
|
|
80
|
+
super(message);
|
|
81
|
+
this.name = 'GitBranchNotMergedError';
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.GitBranchNotMergedError = GitBranchNotMergedError;
|
|
85
|
+
/**
|
|
86
|
+
* The requested branch is checked out in another worktree (-> 409
|
|
87
|
+
* checked_out_elsewhere). Carries the occupying worktree's path; NOT bypassable
|
|
88
|
+
* with force.
|
|
89
|
+
*/
|
|
90
|
+
class GitBranchCheckedOutElsewhereError extends Error {
|
|
91
|
+
/** Absolute path of the worktree that already has the branch checked out. */
|
|
92
|
+
worktreePath;
|
|
93
|
+
constructor(message, worktreePath) {
|
|
94
|
+
super(message);
|
|
95
|
+
this.name = 'GitBranchCheckedOutElsewhereError';
|
|
96
|
+
this.worktreePath = worktreePath;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.GitBranchCheckedOutElsewhereError = GitBranchCheckedOutElsewhereError;
|
|
100
|
+
/** A non-force checkout was attempted over a dirty working tree (-> 409 dirty). */
|
|
101
|
+
class GitDirtyError extends Error {
|
|
102
|
+
constructor(message) {
|
|
103
|
+
super(message);
|
|
104
|
+
this.name = 'GitDirtyError';
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
exports.GitDirtyError = GitDirtyError;
|
|
108
|
+
/** Attempted to delete the currently checked-out branch (-> 409 current_branch). */
|
|
109
|
+
class GitCurrentBranchError extends Error {
|
|
110
|
+
constructor(message) {
|
|
111
|
+
super(message);
|
|
112
|
+
this.name = 'GitCurrentBranchError';
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.GitCurrentBranchError = GitCurrentBranchError;
|
|
116
|
+
/** Attempted to delete the default branch (origin/HEAD) (-> 409 default_branch). */
|
|
117
|
+
class GitDefaultBranchError extends Error {
|
|
118
|
+
constructor(message) {
|
|
119
|
+
super(message);
|
|
120
|
+
this.name = 'GitDefaultBranchError';
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
exports.GitDefaultBranchError = GitDefaultBranchError;
|
|
124
|
+
// ============================================================================
|
|
125
|
+
// Issue #782: stash + reset/revert typed errors
|
|
126
|
+
// ============================================================================
|
|
127
|
+
/**
|
|
128
|
+
* `git stash push` found no local changes to save (-> 400 nothing_to_stash).
|
|
129
|
+
* Normalized from the "No local changes to save" stderr, mirroring how
|
|
130
|
+
* GitNothingToCommitError normalizes "nothing to commit" (#780).
|
|
131
|
+
*/
|
|
132
|
+
class GitNothingToStashError extends Error {
|
|
133
|
+
constructor(message) {
|
|
134
|
+
super(message);
|
|
135
|
+
this.name = 'GitNothingToStashError';
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
exports.GitNothingToStashError = GitNothingToStashError;
|
|
139
|
+
/**
|
|
140
|
+
* A hard reset was refused because the current branch is the default branch
|
|
141
|
+
* (-> 409 default_branch). DELIBERATELY SEPARATE from GitDefaultBranchError
|
|
142
|
+
* (S3-001(b)): the latter's body is the delete-specific "Cannot delete the
|
|
143
|
+
* default branch", which would mislead a reset caller. A dedicated class keeps
|
|
144
|
+
* the #781 delete reason body byte-identical while letting reset return a
|
|
145
|
+
* reset-appropriate message under the same `reason: 'default_branch'`.
|
|
146
|
+
*/
|
|
147
|
+
class GitResetDefaultBranchError extends Error {
|
|
148
|
+
constructor(message) {
|
|
149
|
+
super(message);
|
|
150
|
+
this.name = 'GitResetDefaultBranchError';
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
exports.GitResetDefaultBranchError = GitResetDefaultBranchError;
|
|
154
|
+
// ============================================================================
|
|
155
|
+
// Issue #783: network-operation typed errors (push / pull / fetch).
|
|
156
|
+
//
|
|
157
|
+
// DR4-003: each is constructed with NO stderr/message argument that gets echoed.
|
|
158
|
+
// handleGitApiError maps each to a FIXED literal body (it never echoes
|
|
159
|
+
// error.message), so raw git stderr — which may contain credential-bearing URLs
|
|
160
|
+
// or absolute paths — never reaches the HTTP body. The default Error message is
|
|
161
|
+
// a static label only.
|
|
162
|
+
// ============================================================================
|
|
163
|
+
/** Remote rejected the credentials (-> 401 auth_failed). */
|
|
164
|
+
class GitAuthFailedError extends Error {
|
|
165
|
+
constructor() {
|
|
166
|
+
super('Authentication failed');
|
|
167
|
+
this.name = 'GitAuthFailedError';
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
exports.GitAuthFailedError = GitAuthFailedError;
|
|
171
|
+
/** Push rejected because it was not a fast-forward (-> 409 non_fast_forward). */
|
|
172
|
+
class GitNonFastForwardError extends Error {
|
|
173
|
+
constructor() {
|
|
174
|
+
super('Non-fast-forward');
|
|
175
|
+
this.name = 'GitNonFastForwardError';
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
exports.GitNonFastForwardError = GitNonFastForwardError;
|
|
179
|
+
/** The branch has no upstream configured (-> 400 no_upstream). */
|
|
180
|
+
class GitNoUpstreamError extends Error {
|
|
181
|
+
constructor() {
|
|
182
|
+
super('No upstream');
|
|
183
|
+
this.name = 'GitNoUpstreamError';
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
exports.GitNoUpstreamError = GitNoUpstreamError;
|
|
187
|
+
/**
|
|
188
|
+
* A force push targeted the default branch (-> 409 protected_branch).
|
|
189
|
+
* DELIBERATELY a SEPARATE reason from `default_branch` (delete/reset): push can
|
|
190
|
+
* target an ARBITRARY branch via the `branch?` arg (delete/reset have fixed
|
|
191
|
+
* "delete-target / current-branch" semantics), so its protection trigger and
|
|
192
|
+
* meaning differ — a distinct reason lets the UI/acceptance criteria diverge
|
|
193
|
+
* (DR1-008).
|
|
194
|
+
*/
|
|
195
|
+
class GitProtectedBranchError extends Error {
|
|
196
|
+
constructor() {
|
|
197
|
+
super('Protected branch');
|
|
198
|
+
this.name = 'GitProtectedBranchError';
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
exports.GitProtectedBranchError = GitProtectedBranchError;
|
|
202
|
+
/** `--force-with-lease` refused because the remote moved (-> 409 force_with_lease_stale). */
|
|
203
|
+
class GitForceWithLeaseStaleError extends Error {
|
|
204
|
+
constructor() {
|
|
205
|
+
super('Stale info');
|
|
206
|
+
this.name = 'GitForceWithLeaseStaleError';
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
exports.GitForceWithLeaseStaleError = GitForceWithLeaseStaleError;
|
|
210
|
+
/** Could not reach / resolve the remote (-> 502 network). */
|
|
211
|
+
class GitNetworkError extends Error {
|
|
212
|
+
constructor() {
|
|
213
|
+
super('Network error');
|
|
214
|
+
this.name = 'GitNetworkError';
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
exports.GitNetworkError = GitNetworkError;
|
|
218
|
+
/**
|
|
219
|
+
* Handle git-related errors in API routes and return appropriate NextResponse.
|
|
220
|
+
* Centralizes the error-to-HTTP-status mapping for GitNotRepoError, GitTimeoutError,
|
|
221
|
+
* and generic errors.
|
|
222
|
+
*
|
|
223
|
+
* @param error - The caught error
|
|
224
|
+
* @param logPrefix - Prefix for the console.error log message
|
|
225
|
+
* @returns NextResponse with the appropriate status code and error message
|
|
226
|
+
*/
|
|
227
|
+
function handleGitApiError(error, logPrefix) {
|
|
228
|
+
if (error instanceof GitNotRepoError) {
|
|
229
|
+
return server_1.NextResponse.json({ error: 'Not a git repository' }, { status: 400 });
|
|
230
|
+
}
|
|
231
|
+
// Issue #780: index.lock held by a concurrent git process -> 409 Conflict
|
|
232
|
+
if (error instanceof GitIndexLockedError) {
|
|
233
|
+
return server_1.NextResponse.json({ error: 'Git index is locked by another operation' }, { status: 409 });
|
|
234
|
+
}
|
|
235
|
+
// Issue #780: nothing staged to commit -> 400 (client retry-able)
|
|
236
|
+
if (error instanceof GitNothingToCommitError) {
|
|
237
|
+
return server_1.NextResponse.json({ error: 'Nothing to commit' }, { status: 400 });
|
|
238
|
+
}
|
|
239
|
+
// Issue #781: branch-operation failures carry a machine-readable `reason`.
|
|
240
|
+
if (error instanceof GitBranchNotFoundError) {
|
|
241
|
+
return server_1.NextResponse.json({ error: 'Branch not found', reason: 'branch_not_found' }, { status: 404 });
|
|
242
|
+
}
|
|
243
|
+
if (error instanceof GitBranchNotMergedError) {
|
|
244
|
+
return server_1.NextResponse.json({ error: 'Branch is not fully merged', reason: 'not_merged' }, { status: 409 });
|
|
245
|
+
}
|
|
246
|
+
if (error instanceof GitCurrentBranchError) {
|
|
247
|
+
return server_1.NextResponse.json({ error: 'Cannot operate on the current branch', reason: 'current_branch' }, { status: 409 });
|
|
248
|
+
}
|
|
249
|
+
if (error instanceof GitDefaultBranchError) {
|
|
250
|
+
return server_1.NextResponse.json({ error: 'Cannot delete the default branch', reason: 'default_branch' }, { status: 409 });
|
|
251
|
+
}
|
|
252
|
+
if (error instanceof GitDirtyError) {
|
|
253
|
+
return server_1.NextResponse.json({ error: 'Working tree has uncommitted changes', reason: 'dirty' }, { status: 409 });
|
|
254
|
+
}
|
|
255
|
+
if (error instanceof GitBranchCheckedOutElsewhereError) {
|
|
256
|
+
return server_1.NextResponse.json({
|
|
257
|
+
error: 'Branch is checked out in another worktree',
|
|
258
|
+
reason: 'checked_out_elsewhere',
|
|
259
|
+
worktreePath: error.worktreePath,
|
|
260
|
+
}, { status: 409 });
|
|
261
|
+
}
|
|
262
|
+
// Issue #782 (additive, BEFORE the GitTimeoutError branch so #780/#781 reason
|
|
263
|
+
// bodies above stay byte-identical): danger-zone reasons.
|
|
264
|
+
if (error instanceof GitNothingToStashError) {
|
|
265
|
+
return server_1.NextResponse.json({ error: 'No local changes to stash', reason: 'nothing_to_stash' }, { status: 400 });
|
|
266
|
+
}
|
|
267
|
+
if (error instanceof GitResetDefaultBranchError) {
|
|
268
|
+
return server_1.NextResponse.json({ error: 'Cannot hard-reset the default branch', reason: 'default_branch' }, { status: 409 });
|
|
269
|
+
}
|
|
270
|
+
// Issue #783 (additive, AFTER all existing branches and BEFORE GitTimeoutError
|
|
271
|
+
// so #780-#782 reason bodies above stay byte-identical — DR2-005 relative-order
|
|
272
|
+
// contract). DR4-003: each returns a FIXED literal body that never echoes
|
|
273
|
+
// error.message, so credential-bearing stderr / absolute paths never leak.
|
|
274
|
+
if (error instanceof GitAuthFailedError) {
|
|
275
|
+
return server_1.NextResponse.json({ error: 'Authentication failed; configure credentials in the terminal', reason: 'auth_failed' }, { status: 401 });
|
|
276
|
+
}
|
|
277
|
+
if (error instanceof GitNonFastForwardError) {
|
|
278
|
+
return server_1.NextResponse.json({ error: 'Push rejected (non-fast-forward); pull/rebase first', reason: 'non_fast_forward' }, { status: 409 });
|
|
279
|
+
}
|
|
280
|
+
if (error instanceof GitNoUpstreamError) {
|
|
281
|
+
return server_1.NextResponse.json({ error: 'No upstream branch configured', reason: 'no_upstream' }, { status: 400 });
|
|
282
|
+
}
|
|
283
|
+
if (error instanceof GitProtectedBranchError) {
|
|
284
|
+
return server_1.NextResponse.json({ error: 'Force push to the default branch is not allowed', reason: 'protected_branch' }, { status: 409 });
|
|
285
|
+
}
|
|
286
|
+
if (error instanceof GitForceWithLeaseStaleError) {
|
|
287
|
+
return server_1.NextResponse.json({ error: 'Stale info; remote has new commits', reason: 'force_with_lease_stale' }, { status: 409 });
|
|
288
|
+
}
|
|
289
|
+
if (error instanceof GitNetworkError) {
|
|
290
|
+
// First 502 for a git route: the remote was unreachable (not the client's fault).
|
|
291
|
+
return server_1.NextResponse.json({ error: 'Could not reach the remote', reason: 'network' }, { status: 502 });
|
|
292
|
+
}
|
|
293
|
+
if (error instanceof GitTimeoutError) {
|
|
294
|
+
return server_1.NextResponse.json({ error: 'Git command timed out' }, { status: 504 });
|
|
295
|
+
}
|
|
296
|
+
logger.error('git:api-error', { prefix: logPrefix, error: error instanceof Error ? error.message : String(error) });
|
|
297
|
+
return server_1.NextResponse.json({ error: 'Failed to execute git command' }, { status: 500 });
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Classify a git network-operation stderr into one of the 6 typed network errors
|
|
301
|
+
* (Issue #783, DR2-001 / DR4-003). Single source of truth for fetch/pull/push.
|
|
302
|
+
*
|
|
303
|
+
* Issue #921: relocated from git-utils.ts into git-errors.ts (alongside the
|
|
304
|
+
* network error classes it constructs) so the exec layer (execGitConflictAware /
|
|
305
|
+
* execGitNetworkAware) can import it without a git-exec <-> git-remote cycle.
|
|
306
|
+
* Behavior is unchanged; `@/lib/git/git-utils` still re-exports it.
|
|
307
|
+
*
|
|
308
|
+
* CRITICAL (DR4-003): every error is constructed with NO stderr/message argument,
|
|
309
|
+
* so the raw stderr — which can contain a credential-bearing remote URL
|
|
310
|
+
* (`scheme://user:pass@host`) or absolute filesystem paths — is NEVER retained on
|
|
311
|
+
* the thrown error. The stderr is read ONLY for regex matching, then discarded.
|
|
312
|
+
*
|
|
313
|
+
* Order matters: `stale info` (force-with-lease miss) is checked BEFORE
|
|
314
|
+
* non-fast-forward because git prints both for a `--force-with-lease` rejection.
|
|
315
|
+
* Unknown stderr maps to the generic, fixed-message Error (no raw stderr) that
|
|
316
|
+
* matches handleGitApiError's 500 fallback.
|
|
317
|
+
*/
|
|
318
|
+
function classifyNetworkStderr(stderr) {
|
|
319
|
+
const s = stderr || '';
|
|
320
|
+
if (/Authentication failed|could not read Username|could not read Password/i.test(s)) {
|
|
321
|
+
return new GitAuthFailedError();
|
|
322
|
+
}
|
|
323
|
+
if (/stale info/i.test(s)) {
|
|
324
|
+
return new GitForceWithLeaseStaleError();
|
|
325
|
+
}
|
|
326
|
+
if (/has no upstream branch|no upstream/i.test(s)) {
|
|
327
|
+
return new GitNoUpstreamError();
|
|
328
|
+
}
|
|
329
|
+
if (/\[rejected\][\s\S]*\(fetch first\)|non-fast-forward/i.test(s)) {
|
|
330
|
+
return new GitNonFastForwardError();
|
|
331
|
+
}
|
|
332
|
+
if (/Could not resolve host|unable to access|Could not read from remote|Connection (?:refused|timed out)|network is unreachable|Could not connect/i.test(s)) {
|
|
333
|
+
return new GitNetworkError();
|
|
334
|
+
}
|
|
335
|
+
return new Error('Failed to execute git command');
|
|
336
|
+
}
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Git command execution layer + per-worktree write serialization.
|
|
4
|
+
* Issue #921: extracted from git-utils.ts (god-module split, P1-a).
|
|
5
|
+
*
|
|
6
|
+
* Owns the "execGit family" (execGitCommand / execGitCommandTyped /
|
|
7
|
+
* execGitConflictAware / execGitNetworkAware), the per-worktree in-process
|
|
8
|
+
* serialization (writeChains / runSerializedWrite / assertIndexNotLocked), and
|
|
9
|
+
* the shared ConflictResult contract. Feature modules import their execution
|
|
10
|
+
* primitives from here; typed errors come from git-errors.ts.
|
|
11
|
+
*
|
|
12
|
+
* Security considerations:
|
|
13
|
+
* - Uses execFile (not exec) to prevent command injection
|
|
14
|
+
* - worktreePath must be from DB only (trusted source)
|
|
15
|
+
* - Error details are logged server-side, not exposed to client
|
|
16
|
+
*/
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.GIT_LOG_TIMEOUT_MS = exports.execFileAsync = void 0;
|
|
22
|
+
exports.execGitCommand = execGitCommand;
|
|
23
|
+
exports.execGitCommandTyped = execGitCommandTyped;
|
|
24
|
+
exports.runSerializedWrite = runSerializedWrite;
|
|
25
|
+
exports.execGitConflictAware = execGitConflictAware;
|
|
26
|
+
exports.execGitNetworkAware = execGitNetworkAware;
|
|
27
|
+
const child_process_1 = require("child_process");
|
|
28
|
+
const util_1 = require("util");
|
|
29
|
+
const fs_1 = __importDefault(require("fs"));
|
|
30
|
+
const path_1 = __importDefault(require("path"));
|
|
31
|
+
const logger_1 = require("../../lib/logger");
|
|
32
|
+
const git_status_config_1 = require("../../config/git-status-config");
|
|
33
|
+
const git_errors_1 = require("./git-errors");
|
|
34
|
+
const logger = (0, logger_1.createLogger)('git-exec');
|
|
35
|
+
/**
|
|
36
|
+
* Promisified execFile. Exported so the few helpers that must read stdout from a
|
|
37
|
+
* non-zero exit (getCommitsByDateRange / getWorkingTreeDiff) share the exact same
|
|
38
|
+
* binding the test suite mocks via `promisify`.
|
|
39
|
+
*/
|
|
40
|
+
exports.execFileAsync = (0, util_1.promisify)(child_process_1.execFile);
|
|
41
|
+
/** Timeout for git commands in milliseconds */
|
|
42
|
+
const GIT_COMMAND_TIMEOUT_MS = 1000;
|
|
43
|
+
/** Timeout for git log/show/diff commands in milliseconds (Issue #447) */
|
|
44
|
+
exports.GIT_LOG_TIMEOUT_MS = 3000;
|
|
45
|
+
/**
|
|
46
|
+
* Execute a git command with timeout
|
|
47
|
+
*
|
|
48
|
+
* @param args - Git command arguments
|
|
49
|
+
* @param cwd - Working directory (must be from DB, trusted source)
|
|
50
|
+
* @returns Command output or null on error
|
|
51
|
+
*/
|
|
52
|
+
async function execGitCommand(args, cwd) {
|
|
53
|
+
try {
|
|
54
|
+
const { stdout } = await (0, exports.execFileAsync)('git', args, {
|
|
55
|
+
cwd,
|
|
56
|
+
timeout: GIT_COMMAND_TIMEOUT_MS,
|
|
57
|
+
});
|
|
58
|
+
return stdout.trim();
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
// Log error server-side only (no client exposure)
|
|
62
|
+
logger.error('git:command-failed', {
|
|
63
|
+
args: args.join(' '),
|
|
64
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
65
|
+
});
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Execute a git command with timeout, distinguishing error types
|
|
71
|
+
* Unlike execGitCommand, this throws typed errors for API-level error handling.
|
|
72
|
+
*
|
|
73
|
+
* @param args - Git command arguments
|
|
74
|
+
* @param cwd - Working directory (must be from DB, trusted source)
|
|
75
|
+
* @param timeout - Timeout in milliseconds
|
|
76
|
+
* @returns Command stdout
|
|
77
|
+
* @throws {GitTimeoutError} When the command times out
|
|
78
|
+
* @throws {GitNotRepoError} When the directory is not a git repository
|
|
79
|
+
* @throws {Error} For other git errors
|
|
80
|
+
*/
|
|
81
|
+
async function execGitCommandTyped(args, cwd, timeout) {
|
|
82
|
+
try {
|
|
83
|
+
const { stdout } = await (0, exports.execFileAsync)('git', args, {
|
|
84
|
+
cwd,
|
|
85
|
+
timeout,
|
|
86
|
+
});
|
|
87
|
+
return stdout;
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
const err = error;
|
|
91
|
+
// Check for timeout
|
|
92
|
+
if (err.killed || err.code === 'ERR_CHILD_PROCESS_EXEC_TIMEOUT' || err.code === 'ETIMEDOUT') {
|
|
93
|
+
throw new git_errors_1.GitTimeoutError(`Git command timed out after ${timeout}ms`);
|
|
94
|
+
}
|
|
95
|
+
// Check for "not a git repository"
|
|
96
|
+
const stderr = err.stderr || err.message || '';
|
|
97
|
+
if (stderr.includes('not a git repository')) {
|
|
98
|
+
throw new git_errors_1.GitNotRepoError('Not a git repository');
|
|
99
|
+
}
|
|
100
|
+
// Check for "unknown revision" / "bad object" (commit not found)
|
|
101
|
+
const combinedMsg = `${err.stderr || ''} ${err.message || ''}`;
|
|
102
|
+
if (combinedMsg.includes('unknown revision') || combinedMsg.includes('bad object')) {
|
|
103
|
+
throw new Error(combinedMsg.trim());
|
|
104
|
+
}
|
|
105
|
+
// Issue #780: preserve "nothing to commit" so gitCommit can normalize it to
|
|
106
|
+
// GitNothingToCommitError (400). Does not affect getGitStatus (execGitCommand).
|
|
107
|
+
if (/nothing to commit|no changes added to commit|nothing added to commit/i.test(combinedMsg)) {
|
|
108
|
+
throw new Error(combinedMsg.trim());
|
|
109
|
+
}
|
|
110
|
+
// Issue #782: preserve "No local changes to save" so stashPush can normalize
|
|
111
|
+
// it to GitNothingToStashError (400). Same approach as nothing-to-commit.
|
|
112
|
+
if (/No local changes to save|No local changes/i.test(combinedMsg)) {
|
|
113
|
+
throw new Error(combinedMsg.trim());
|
|
114
|
+
}
|
|
115
|
+
// Issue #781: preserve branch-operation stderr so checkout/create/delete can
|
|
116
|
+
// normalize it to typed errors (branch_not_found / not_merged). Read-path
|
|
117
|
+
// getGitStatus uses execGitCommand and is unaffected.
|
|
118
|
+
if (/did not match|not a valid ref|not found|invalid reference|not fully merged|couldn't find remote ref/i.test(combinedMsg)) {
|
|
119
|
+
throw new Error(combinedMsg.trim());
|
|
120
|
+
}
|
|
121
|
+
// Log and re-throw generic error
|
|
122
|
+
logger.error('git:command-failed', {
|
|
123
|
+
args: args.join(' '),
|
|
124
|
+
error: err.message,
|
|
125
|
+
});
|
|
126
|
+
throw new Error('Failed to execute git command');
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// ----------------------------------------------------------------------------
|
|
130
|
+
// Per-worktree in-process serialization + index.lock detection
|
|
131
|
+
// ----------------------------------------------------------------------------
|
|
132
|
+
/**
|
|
133
|
+
* Module-level chain of in-flight write operations keyed by worktree path.
|
|
134
|
+
* git's index can only safely accept one mutating operation at a time, so we
|
|
135
|
+
* serialize all write ops for the same worktree within this process. (We do NOT
|
|
136
|
+
* reuse the clone-manager DB-job pattern, which is built for long-lived clones.)
|
|
137
|
+
*/
|
|
138
|
+
const writeChains = new Map();
|
|
139
|
+
/**
|
|
140
|
+
* Throw GitIndexLockedError if `.git/index.lock` exists for the worktree, which
|
|
141
|
+
* indicates another git process (CLI, another server) is mid-write.
|
|
142
|
+
*
|
|
143
|
+
* Note: `.git` may be a file (worktree gitdir pointer) — in that case we cannot
|
|
144
|
+
* cheaply resolve the lock path, so we skip the FS check and rely on git itself
|
|
145
|
+
* to fail (which execGitCommandTyped surfaces). This is best-effort defense.
|
|
146
|
+
*/
|
|
147
|
+
function assertIndexNotLocked(worktreePath) {
|
|
148
|
+
const lockPath = path_1.default.join(worktreePath, '.git', 'index.lock');
|
|
149
|
+
let exists = false;
|
|
150
|
+
try {
|
|
151
|
+
exists = fs_1.default.existsSync(lockPath);
|
|
152
|
+
}
|
|
153
|
+
catch {
|
|
154
|
+
exists = false;
|
|
155
|
+
}
|
|
156
|
+
if (exists) {
|
|
157
|
+
throw new git_errors_1.GitIndexLockedError('Git index is locked (.git/index.lock exists)');
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Run a write operation serialized per worktree path, after verifying the index
|
|
162
|
+
* is not externally locked. Subsequent calls for the same path queue behind the
|
|
163
|
+
* current one; failures do not break the chain for later callers.
|
|
164
|
+
*/
|
|
165
|
+
async function runSerializedWrite(worktreePath, op) {
|
|
166
|
+
const previous = writeChains.get(worktreePath) ?? Promise.resolve();
|
|
167
|
+
const run = previous
|
|
168
|
+
.catch(() => undefined) // isolate prior failures from this op's gate
|
|
169
|
+
.then(() => {
|
|
170
|
+
assertIndexNotLocked(worktreePath);
|
|
171
|
+
return op();
|
|
172
|
+
});
|
|
173
|
+
// Keep the chain alive regardless of this op's outcome. Store the SAME
|
|
174
|
+
// settled promise we later compare against so cleanup can drop a stale entry.
|
|
175
|
+
const settled = run.then(() => undefined, () => undefined);
|
|
176
|
+
writeChains.set(worktreePath, settled);
|
|
177
|
+
try {
|
|
178
|
+
return await run;
|
|
179
|
+
}
|
|
180
|
+
finally {
|
|
181
|
+
// Best-effort cleanup: if no newer op queued behind us, drop the entry.
|
|
182
|
+
if (writeChains.get(worktreePath) === settled) {
|
|
183
|
+
writeChains.delete(worktreePath);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/** Extract `CONFLICT ... in <path>` file paths from git stdout (Issue #782). */
|
|
188
|
+
function parseConflictFiles(stdout) {
|
|
189
|
+
const files = [];
|
|
190
|
+
for (const line of stdout.split('\n')) {
|
|
191
|
+
const m = line.match(/^CONFLICT \([^)]*\): Merge conflict in (.+)$/);
|
|
192
|
+
if (m)
|
|
193
|
+
files.push(m[1].trim());
|
|
194
|
+
}
|
|
195
|
+
return files;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Run a git command that may legitimately exit non-zero on a CONFLICT, via
|
|
199
|
+
* execFileAsync directly so the conflict patch on `err.stdout` is recoverable
|
|
200
|
+
* (Issue #782, S3-002). execGitCommandTyped discards stdout on reject, so it
|
|
201
|
+
* cannot be used here. We MANUALLY re-create the normalization
|
|
202
|
+
* execGitCommandTyped would otherwise provide:
|
|
203
|
+
* - killed / ETIMEDOUT -> GitTimeoutError (504)
|
|
204
|
+
* - "not a git repository" -> GitNotRepoError (400)
|
|
205
|
+
* - exit-1 with CONFLICT stdout -> { conflict: true, conflictFiles }
|
|
206
|
+
* - any other failure -> generic Error (500)
|
|
207
|
+
*
|
|
208
|
+
* The caller is responsible for running this inside runSerializedWrite (which
|
|
209
|
+
* also performs the index.lock check), so serialization + lock detection are
|
|
210
|
+
* preserved on this path too.
|
|
211
|
+
*/
|
|
212
|
+
async function execGitConflictAware(args, worktreePath,
|
|
213
|
+
// Issue #783 (DR2-007): additive timeout param. The 3 existing callers
|
|
214
|
+
// (stashPop / stashApply / gitRevert) omit it -> default GIT_WRITE_TIMEOUT_MS
|
|
215
|
+
// -> byte-invariant (#782). gitPull (Part 2) will pass GIT_PULL_TIMEOUT_MS.
|
|
216
|
+
timeout = git_status_config_1.GIT_WRITE_TIMEOUT_MS,
|
|
217
|
+
// Issue #783 (DR4-002 / DR2-001): additive flag. When true (gitPull only), the
|
|
218
|
+
// generic-failure branch routes stderr through classifyNetworkStderr (throwing
|
|
219
|
+
// a typed network error) and does NOT log the raw err.message — which for an
|
|
220
|
+
// HTTPS remote can echo a credential-bearing URL. The 3 #782 callers omit it
|
|
221
|
+
// -> false -> existing log + generic Error -> byte-invariant.
|
|
222
|
+
classifyNetwork = false) {
|
|
223
|
+
try {
|
|
224
|
+
await (0, exports.execFileAsync)('git', args, { cwd: worktreePath, timeout });
|
|
225
|
+
return { conflict: false };
|
|
226
|
+
}
|
|
227
|
+
catch (error) {
|
|
228
|
+
const err = error;
|
|
229
|
+
// Timeout BEFORE the conflict recovery so a killed process is never mistaken
|
|
230
|
+
// for a "normal" conflicting exit.
|
|
231
|
+
if (err.killed || err.code === 'ERR_CHILD_PROCESS_EXEC_TIMEOUT' || err.code === 'ETIMEDOUT') {
|
|
232
|
+
throw new git_errors_1.GitTimeoutError(`Git command timed out after ${timeout}ms`);
|
|
233
|
+
}
|
|
234
|
+
const combined = `${err.stderr || ''} ${err.message || ''}`;
|
|
235
|
+
if (combined.includes('not a git repository')) {
|
|
236
|
+
throw new git_errors_1.GitNotRepoError('Not a git repository');
|
|
237
|
+
}
|
|
238
|
+
// A conflict leaves the merge markers and prints `CONFLICT ...` on stdout.
|
|
239
|
+
const stdout = typeof err.stdout === 'string' ? err.stdout : '';
|
|
240
|
+
if (stdout.includes('CONFLICT')) {
|
|
241
|
+
return { conflict: true, conflictFiles: parseConflictFiles(stdout) };
|
|
242
|
+
}
|
|
243
|
+
// Issue #783 (DR4-002 / DR2-001): the network path (gitPull) classifies the
|
|
244
|
+
// stderr into a typed network error WITHOUT logging the raw message (which
|
|
245
|
+
// can contain a credential-bearing remote URL). classifyNetworkStderr builds
|
|
246
|
+
// the error with no message argument, so no stderr/URL is retained.
|
|
247
|
+
if (classifyNetwork) {
|
|
248
|
+
throw (0, git_errors_1.classifyNetworkStderr)(combined);
|
|
249
|
+
}
|
|
250
|
+
logger.error('git:conflict-aware-failed', {
|
|
251
|
+
args: args.join(' '),
|
|
252
|
+
error: err.message,
|
|
253
|
+
});
|
|
254
|
+
throw new Error('Failed to execute git command');
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Run a git NETWORK command (fetch / push) via execFileAsync directly (Issue
|
|
259
|
+
* #783, §4.4.1). Mirrors execGitConflictAware's manual normalization but has no
|
|
260
|
+
* conflict-recovery path (fetch/push don't leave merge markers):
|
|
261
|
+
* - killed / ETIMEDOUT -> GitTimeoutError (504)
|
|
262
|
+
* - "not a git repository" -> GitNotRepoError (400)
|
|
263
|
+
* - any other failure -> classifyNetworkStderr (typed network error)
|
|
264
|
+
*
|
|
265
|
+
* Does NOT use execGitCommandTyped (whose preserve regex stays unmodified) and
|
|
266
|
+
* does NOT log the raw stderr/message (DR4-002): a failed network op's stderr can
|
|
267
|
+
* echo a credential-bearing remote URL, and the typed error carries no message.
|
|
268
|
+
*/
|
|
269
|
+
async function execGitNetworkAware(args, worktreePath, timeout) {
|
|
270
|
+
try {
|
|
271
|
+
const { stdout } = await (0, exports.execFileAsync)('git', args, { cwd: worktreePath, timeout });
|
|
272
|
+
return stdout;
|
|
273
|
+
}
|
|
274
|
+
catch (error) {
|
|
275
|
+
const err = error;
|
|
276
|
+
if (err.killed || err.code === 'ERR_CHILD_PROCESS_EXEC_TIMEOUT' || err.code === 'ETIMEDOUT') {
|
|
277
|
+
throw new git_errors_1.GitTimeoutError(`Git command timed out after ${timeout}ms`);
|
|
278
|
+
}
|
|
279
|
+
const combined = `${err.stderr || ''} ${err.message || ''}`;
|
|
280
|
+
if (combined.includes('not a git repository')) {
|
|
281
|
+
throw new git_errors_1.GitNotRepoError('Not a git repository');
|
|
282
|
+
}
|
|
283
|
+
throw (0, git_errors_1.classifyNetworkStderr)(combined);
|
|
284
|
+
}
|
|
285
|
+
}
|