commandmate 0.11.4 → 0.12.1
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 +406 -314
- package/.next/app-path-routes-manifest.json +35 -26
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +15 -15
- 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_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.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 +35 -26
- 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 +3 -3
- package/.next/server/chunks/6065.js +1 -0
- package/.next/server/chunks/6130.js +1 -0
- package/.next/server/chunks/6283.js +1 -1
- 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/ZYti9g9gICKnjtmkfvvB2/_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-76295bf0184b101f.js → 6488-624d4b6d2d4cc236.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-7dd929bfc978742e.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/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/cli-tools/antigravity.js +8 -13
- package/dist/server/src/lib/cli-tools/codex.js +8 -14
- package/dist/server/src/lib/cli-tools/copilot.js +12 -13
- package/dist/server/src/lib/cli-tools/gemini.js +8 -13
- package/dist/server/src/lib/cli-tools/opencode.js +8 -13
- package/dist/server/src/lib/cli-tools/submit-verified-sender.js +174 -0
- package/dist/server/src/lib/cli-tools/vibe-local.js +12 -17
- 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/session-key-sender.js +11 -9
- 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/0_lnKsT0DH-MnHhnV5n-l/_buildManifest.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-9a4ce51e697baac6.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/dist/server/src/lib/pasted-text-helper.js +0 -58
- /package/.next/static/{0_lnKsT0DH-MnHhnV5n-l → ZYti9g9gICKnjtmkfvvB2}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,627 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Virtual install diff between a verified Skill package and a live worktree (Issue #1233)
|
|
4
|
+
*
|
|
5
|
+
* Answers one question before anything is written: if this exact package landed
|
|
6
|
+
* in `.agents/skills/<skill-id>` right now, which files would appear, which
|
|
7
|
+
* would change, and which already-present file would be overwritten.
|
|
8
|
+
*
|
|
9
|
+
* Three properties the rest of the install flow depends on:
|
|
10
|
+
* - Nothing here writes. Every path is derived from a server-resolved worktree
|
|
11
|
+
* path plus a validated Skill ID; no caller-supplied path reaches the disk.
|
|
12
|
+
* - A state that could mislead is named rather than smoothed over: a detached or
|
|
13
|
+
* unborn HEAD, a binary or truncated body, a CRLF payload and a git-ignored
|
|
14
|
+
* destination each get an explicit field, because silently rendering them as
|
|
15
|
+
* an ordinary diff is how a user approves something they did not see.
|
|
16
|
+
* - An existing file is never classified as a clean overwrite. It is either
|
|
17
|
+
* provably the same managed content (`unchanged`/`modify`) or it is a
|
|
18
|
+
* conflict, and conflicts make the plan non-installable.
|
|
19
|
+
*
|
|
20
|
+
* @module lib/skills/preview-diff
|
|
21
|
+
*/
|
|
22
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.SkillPreviewWarning = exports.SkillDiffReason = exports.SKILL_TREE_SCAN_MAX_DEPTH = exports.SKILL_TREE_SCAN_MAX_ENTRIES = exports.SKILL_DIFF_CONTEXT_LINES = exports.SKILL_DIFF_MAX_LINES = exports.SKILL_DIFF_MAX_TOTAL_BYTES = exports.SKILL_DIFF_MAX_FILE_BYTES = void 0;
|
|
27
|
+
exports.skillInstallRootFor = skillInstallRootFor;
|
|
28
|
+
exports.skillInstallRoot = skillInstallRoot;
|
|
29
|
+
exports.resolveSkillInstallRootFor = resolveSkillInstallRootFor;
|
|
30
|
+
exports.resolveSkillInstallRoot = resolveSkillInstallRoot;
|
|
31
|
+
exports.resolveSkillInstallRoots = resolveSkillInstallRoots;
|
|
32
|
+
exports.isBinaryContent = isBinaryContent;
|
|
33
|
+
exports.detectLineEnding = detectLineEnding;
|
|
34
|
+
exports.computeSkillTreeHash = computeSkillTreeHash;
|
|
35
|
+
exports.readExistingSkillTree = readExistingSkillTree;
|
|
36
|
+
exports.readSkillGitTargetState = readSkillGitTargetState;
|
|
37
|
+
exports.findGitIgnoredPaths = findGitIgnoredPaths;
|
|
38
|
+
exports.buildUnifiedDiff = buildUnifiedDiff;
|
|
39
|
+
exports.buildSkillPreviewDiff = buildSkillPreviewDiff;
|
|
40
|
+
const crypto_1 = require("crypto");
|
|
41
|
+
const fs_1 = require("fs");
|
|
42
|
+
const path_1 = __importDefault(require("path"));
|
|
43
|
+
const git_exec_1 = require("../../lib/git/git-exec");
|
|
44
|
+
const constants_1 = require("../../lib/skills/constants");
|
|
45
|
+
const integrity_1 = require("../../lib/skills/integrity");
|
|
46
|
+
const operation_store_1 = require("../../lib/skills/operation-store");
|
|
47
|
+
// =============================================================================
|
|
48
|
+
// Limits
|
|
49
|
+
// =============================================================================
|
|
50
|
+
/** Maximum bytes of diff text kept for a single file. */
|
|
51
|
+
exports.SKILL_DIFF_MAX_FILE_BYTES = 64 * 1024;
|
|
52
|
+
/** Maximum bytes of diff text kept across a whole plan. */
|
|
53
|
+
exports.SKILL_DIFF_MAX_TOTAL_BYTES = 512 * 1024;
|
|
54
|
+
/** Maximum diff lines emitted for a single file. */
|
|
55
|
+
exports.SKILL_DIFF_MAX_LINES = 400;
|
|
56
|
+
/** Context lines around the changed region of a modified file. */
|
|
57
|
+
exports.SKILL_DIFF_CONTEXT_LINES = 3;
|
|
58
|
+
/** Maximum entries walked when scanning the existing target directory. */
|
|
59
|
+
exports.SKILL_TREE_SCAN_MAX_ENTRIES = 2000;
|
|
60
|
+
/** Maximum directory depth walked under the target root. */
|
|
61
|
+
exports.SKILL_TREE_SCAN_MAX_DEPTH = 16;
|
|
62
|
+
/** Bytes inspected when deciding whether content is binary. */
|
|
63
|
+
const BINARY_SNIFF_BYTES = 8000;
|
|
64
|
+
/** Why an entry was classified the way it was. Stable machine codes. */
|
|
65
|
+
exports.SkillDiffReason = {
|
|
66
|
+
/** Path does not exist in the worktree. */
|
|
67
|
+
NEW_FILE: 'SKILL_DIFF_NEW_FILE',
|
|
68
|
+
/** Present, recorded by the install receipt, and byte-identical to the package. */
|
|
69
|
+
CONTENT_IDENTICAL: 'SKILL_DIFF_CONTENT_IDENTICAL',
|
|
70
|
+
/** Present, matches what the receipt recorded, and the package supersedes it. */
|
|
71
|
+
MANAGED_UPDATE: 'SKILL_DIFF_MANAGED_UPDATE',
|
|
72
|
+
/** Present and recorded, but its bytes no longer match the receipt. */
|
|
73
|
+
LOCAL_MODIFICATION: 'SKILL_DIFF_LOCAL_MODIFICATION',
|
|
74
|
+
/** Present under the install root with no receipt recording it. */
|
|
75
|
+
UNMANAGED_SKILL: 'SKILL_DIFF_UNMANAGED_SKILL',
|
|
76
|
+
/** Recorded by the receipt but absent from the package being installed. */
|
|
77
|
+
RECEIPT_ORPHAN: 'SKILL_DIFF_RECEIPT_ORPHAN',
|
|
78
|
+
/** Present as a symlink, a directory or another non-regular entry. */
|
|
79
|
+
NOT_A_REGULAR_FILE: 'SKILL_DIFF_NOT_A_REGULAR_FILE',
|
|
80
|
+
};
|
|
81
|
+
/** Plan-level conditions a user must be told about before approving. */
|
|
82
|
+
exports.SkillPreviewWarning = {
|
|
83
|
+
/** HEAD is not on a branch; the install would land on a detached checkout. */
|
|
84
|
+
DETACHED_HEAD: 'SKILL_PREVIEW_DETACHED_HEAD',
|
|
85
|
+
/** The repository has no commit yet, so there is no HEAD to pin the plan to. */
|
|
86
|
+
UNBORN_HEAD: 'SKILL_PREVIEW_UNBORN_HEAD',
|
|
87
|
+
/** HEAD could not be resolved at all. */
|
|
88
|
+
HEAD_UNRESOLVED: 'SKILL_PREVIEW_HEAD_UNRESOLVED',
|
|
89
|
+
/** The worktree has uncommitted changes. */
|
|
90
|
+
WORKING_TREE_DIRTY: 'SKILL_PREVIEW_WORKING_TREE_DIRTY',
|
|
91
|
+
/** At least one destination path is ignored or excluded by git. */
|
|
92
|
+
PATH_GIT_IGNORED: 'SKILL_PREVIEW_PATH_GIT_IGNORED',
|
|
93
|
+
/** At least one diff body was cut short. */
|
|
94
|
+
DIFF_TRUNCATED: 'SKILL_PREVIEW_DIFF_TRUNCATED',
|
|
95
|
+
/** At least one file has no textual diff because its content is binary. */
|
|
96
|
+
BINARY_CONTENT: 'SKILL_PREVIEW_BINARY_CONTENT',
|
|
97
|
+
/** At least one payload file uses CRLF or mixed terminators. */
|
|
98
|
+
LINE_ENDING_CRLF: 'SKILL_PREVIEW_LINE_ENDING_CRLF',
|
|
99
|
+
/** The existing target directory could not be scanned completely. */
|
|
100
|
+
TREE_SCAN_TRUNCATED: 'SKILL_PREVIEW_TREE_SCAN_TRUNCATED',
|
|
101
|
+
};
|
|
102
|
+
// =============================================================================
|
|
103
|
+
// Paths
|
|
104
|
+
// =============================================================================
|
|
105
|
+
/** Repository-relative install root for a validated Skill ID under one root prefix (#1460). */
|
|
106
|
+
function skillInstallRootFor(rootPrefix, skillId) {
|
|
107
|
+
return `${rootPrefix}/${skillId}`;
|
|
108
|
+
}
|
|
109
|
+
/** Repository-relative install root under the primary `.agents/skills` prefix. */
|
|
110
|
+
function skillInstallRoot(skillId) {
|
|
111
|
+
return skillInstallRootFor(constants_1.SKILL_INSTALL_ROOT_PREFIX, skillId);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Absolute install root for a Skill ID under one root prefix (#1460).
|
|
115
|
+
*
|
|
116
|
+
* The ID is re-checked against the slug grammar rather than only comparing the
|
|
117
|
+
* joined result: `path.join` normalizes `..` away, so `<prefix>/../x` and the
|
|
118
|
+
* sibling `x` compare equal and a containment check alone would accept an ID
|
|
119
|
+
* that walked out of the Skills directory. Rejecting the grammar first makes
|
|
120
|
+
* traversal unrepresentable; the containment check then covers the rest. The
|
|
121
|
+
* containment check is applied per root prefix, so the `.claude/skills` root
|
|
122
|
+
* gets exactly the escape rejection the `.agents/skills` root always had.
|
|
123
|
+
*/
|
|
124
|
+
function resolveSkillInstallRootFor(worktreePath, rootPrefix, skillId) {
|
|
125
|
+
if (!constants_1.SKILL_ID_PATTERN.test(skillId) || skillId.length > constants_1.SKILL_ID_MAX_LENGTH) {
|
|
126
|
+
throw new Error('Skill ID is not a valid install root segment');
|
|
127
|
+
}
|
|
128
|
+
const root = path_1.default.resolve(worktreePath);
|
|
129
|
+
const target = path_1.default.resolve(root, rootPrefix, skillId);
|
|
130
|
+
const relative = path_1.default.relative(root, target);
|
|
131
|
+
if (relative !== path_1.default.join(rootPrefix, skillId) ||
|
|
132
|
+
relative.startsWith('..') ||
|
|
133
|
+
path_1.default.isAbsolute(relative)) {
|
|
134
|
+
throw new Error('Skill install root escapes the worktree');
|
|
135
|
+
}
|
|
136
|
+
return target;
|
|
137
|
+
}
|
|
138
|
+
/** Absolute install root under the primary `.agents/skills` prefix. */
|
|
139
|
+
function resolveSkillInstallRoot(worktreePath, skillId) {
|
|
140
|
+
return resolveSkillInstallRootFor(worktreePath, constants_1.SKILL_INSTALL_ROOT_PREFIX, skillId);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Resolve every root a Skill would be placed into, primary first (#1460).
|
|
144
|
+
*
|
|
145
|
+
* Each root is containment-checked independently, so a malformed prefix or ID is
|
|
146
|
+
* rejected before any of them is used. The default is the full product set
|
|
147
|
+
* ({@link SKILL_INSTALL_ROOT_PREFIXES}); callers migrating from the single-root
|
|
148
|
+
* API pass a narrower set.
|
|
149
|
+
*/
|
|
150
|
+
function resolveSkillInstallRoots(worktreePath, skillId, rootPrefixes = constants_1.SKILL_INSTALL_ROOT_PREFIXES) {
|
|
151
|
+
return rootPrefixes.map((prefix) => ({
|
|
152
|
+
prefix,
|
|
153
|
+
rel: skillInstallRootFor(prefix, skillId),
|
|
154
|
+
abs: resolveSkillInstallRootFor(worktreePath, prefix, skillId),
|
|
155
|
+
}));
|
|
156
|
+
}
|
|
157
|
+
// =============================================================================
|
|
158
|
+
// Content classification
|
|
159
|
+
// =============================================================================
|
|
160
|
+
/** Content is treated as binary when a NUL byte appears near the start. */
|
|
161
|
+
function isBinaryContent(bytes) {
|
|
162
|
+
const limit = Math.min(bytes.length, BINARY_SNIFF_BYTES);
|
|
163
|
+
for (let i = 0; i < limit; i += 1) {
|
|
164
|
+
if (bytes[i] === 0)
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
/** Terminator style of a payload, so a CRLF file is not silently normalized. */
|
|
170
|
+
function detectLineEnding(bytes) {
|
|
171
|
+
let crlf = 0;
|
|
172
|
+
let lf = 0;
|
|
173
|
+
for (let i = 0; i < bytes.length; i += 1) {
|
|
174
|
+
if (bytes[i] !== 0x0a)
|
|
175
|
+
continue;
|
|
176
|
+
if (i > 0 && bytes[i - 1] === 0x0d)
|
|
177
|
+
crlf += 1;
|
|
178
|
+
else
|
|
179
|
+
lf += 1;
|
|
180
|
+
}
|
|
181
|
+
if (crlf > 0 && lf > 0)
|
|
182
|
+
return 'mixed';
|
|
183
|
+
if (crlf > 0)
|
|
184
|
+
return 'crlf';
|
|
185
|
+
if (lf > 0)
|
|
186
|
+
return 'lf';
|
|
187
|
+
return 'none';
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Split into lines without normalizing terminators.
|
|
191
|
+
*
|
|
192
|
+
* A trailing `\r` is kept on the line, so a CRLF file diffs as CRLF rather than
|
|
193
|
+
* appearing identical to its LF twin.
|
|
194
|
+
*/
|
|
195
|
+
function splitLines(bytes) {
|
|
196
|
+
const text = Buffer.from(bytes).toString('utf-8');
|
|
197
|
+
if (text.length === 0)
|
|
198
|
+
return [];
|
|
199
|
+
const lines = text.split('\n');
|
|
200
|
+
if (lines[lines.length - 1] === '')
|
|
201
|
+
lines.pop();
|
|
202
|
+
return lines;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Order-independent digest of a file set.
|
|
206
|
+
*
|
|
207
|
+
* Apply re-computes this over the live directory and refuses when it differs,
|
|
208
|
+
* so the mode bit is part of the input: a payload that gained an execute bit
|
|
209
|
+
* between plan and apply is drift, not a detail.
|
|
210
|
+
*/
|
|
211
|
+
function computeSkillTreeHash(files) {
|
|
212
|
+
const canonical = [...files]
|
|
213
|
+
.sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0))
|
|
214
|
+
.map((file) => `${file.path}\x00${file.sha256}\x00${file.executable ? '1' : '0'}`)
|
|
215
|
+
.join('\n');
|
|
216
|
+
return (0, crypto_1.createHash)('sha256').update(`skill-tree-v1\n${canonical}`).digest('hex');
|
|
217
|
+
}
|
|
218
|
+
// =============================================================================
|
|
219
|
+
// Existing tree
|
|
220
|
+
// =============================================================================
|
|
221
|
+
function isExecutableMode(mode) {
|
|
222
|
+
return (mode & 0o111) !== 0;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* List the install root as it is right now.
|
|
226
|
+
*
|
|
227
|
+
* `lstat` rather than `stat` throughout: a symlink under the install root is
|
|
228
|
+
* reported as an irregular path instead of being followed, so a planted link
|
|
229
|
+
* cannot make the preview describe a file outside the worktree.
|
|
230
|
+
*/
|
|
231
|
+
function readExistingSkillTree(installRootAbs) {
|
|
232
|
+
let rootStats;
|
|
233
|
+
try {
|
|
234
|
+
rootStats = (0, fs_1.lstatSync)(installRootAbs);
|
|
235
|
+
}
|
|
236
|
+
catch {
|
|
237
|
+
return { present: false, files: [], irregularPaths: [], truncated: false };
|
|
238
|
+
}
|
|
239
|
+
if (!rootStats.isDirectory()) {
|
|
240
|
+
return { present: true, files: [], irregularPaths: [''], truncated: false };
|
|
241
|
+
}
|
|
242
|
+
const files = [];
|
|
243
|
+
const irregularPaths = [];
|
|
244
|
+
let truncated = false;
|
|
245
|
+
let scanned = 0;
|
|
246
|
+
const walk = (dirAbs, relPrefix, depth) => {
|
|
247
|
+
if (truncated)
|
|
248
|
+
return;
|
|
249
|
+
if (depth > exports.SKILL_TREE_SCAN_MAX_DEPTH) {
|
|
250
|
+
truncated = true;
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
let entries;
|
|
254
|
+
try {
|
|
255
|
+
entries = (0, fs_1.readdirSync)(dirAbs, { withFileTypes: true });
|
|
256
|
+
}
|
|
257
|
+
catch {
|
|
258
|
+
truncated = true;
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
for (const entry of entries.sort((a, b) => (a.name < b.name ? -1 : 1))) {
|
|
262
|
+
if (truncated)
|
|
263
|
+
return;
|
|
264
|
+
scanned += 1;
|
|
265
|
+
if (scanned > exports.SKILL_TREE_SCAN_MAX_ENTRIES) {
|
|
266
|
+
truncated = true;
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
const relative = relPrefix ? `${relPrefix}/${entry.name}` : entry.name;
|
|
270
|
+
const absolute = path_1.default.join(dirAbs, entry.name);
|
|
271
|
+
if (entry.isDirectory()) {
|
|
272
|
+
walk(absolute, relative, depth + 1);
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
if (!entry.isFile()) {
|
|
276
|
+
irregularPaths.push(relative);
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
let stats;
|
|
280
|
+
try {
|
|
281
|
+
stats = (0, fs_1.lstatSync)(absolute);
|
|
282
|
+
}
|
|
283
|
+
catch {
|
|
284
|
+
irregularPaths.push(relative);
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
if (!stats.isFile() || stats.size > constants_1.SKILL_FILE_MAX_SIZE) {
|
|
288
|
+
irregularPaths.push(relative);
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
let bytes;
|
|
292
|
+
try {
|
|
293
|
+
bytes = (0, fs_1.readFileSync)(absolute);
|
|
294
|
+
}
|
|
295
|
+
catch {
|
|
296
|
+
irregularPaths.push(relative);
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
files.push({
|
|
300
|
+
path: relative,
|
|
301
|
+
sha256: (0, integrity_1.computeSha256Hex)(bytes),
|
|
302
|
+
size: bytes.byteLength,
|
|
303
|
+
executable: isExecutableMode(stats.mode),
|
|
304
|
+
bytes,
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
walk(installRootAbs, '', 0);
|
|
309
|
+
return { present: true, files, irregularPaths, truncated };
|
|
310
|
+
}
|
|
311
|
+
// =============================================================================
|
|
312
|
+
// Git state
|
|
313
|
+
// =============================================================================
|
|
314
|
+
/**
|
|
315
|
+
* Resolve branch, HEAD and dirtiness of a server-resolved worktree.
|
|
316
|
+
*
|
|
317
|
+
* The two failure modes are deliberately distinguished rather than collapsed
|
|
318
|
+
* into "no branch": a detached HEAD has a commit to pin the plan to, an unborn
|
|
319
|
+
* HEAD has none, and apply must be able to tell those apart.
|
|
320
|
+
*/
|
|
321
|
+
async function readSkillGitTargetState(worktreePath) {
|
|
322
|
+
const [branch, headCommit, status] = await Promise.all([
|
|
323
|
+
(0, git_exec_1.execGitCommand)(['symbolic-ref', '--quiet', '--short', 'HEAD'], worktreePath),
|
|
324
|
+
(0, git_exec_1.execGitCommand)(['rev-parse', 'HEAD'], worktreePath),
|
|
325
|
+
(0, git_exec_1.execGitCommand)(['status', '--porcelain'], worktreePath),
|
|
326
|
+
]);
|
|
327
|
+
const commit = headCommit && /^[0-9a-f]{40}$/.test(headCommit) ? headCommit : null;
|
|
328
|
+
let headState;
|
|
329
|
+
if (branch && commit)
|
|
330
|
+
headState = 'attached';
|
|
331
|
+
else if (!branch && commit)
|
|
332
|
+
headState = 'detached';
|
|
333
|
+
else if (branch && !commit)
|
|
334
|
+
headState = 'unborn';
|
|
335
|
+
else
|
|
336
|
+
headState = 'unknown';
|
|
337
|
+
return {
|
|
338
|
+
headState,
|
|
339
|
+
branch: branch && branch.length > 0 ? branch : null,
|
|
340
|
+
headCommit: commit,
|
|
341
|
+
dirty: status !== null && status.length > 0,
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Which destination paths git would ignore.
|
|
346
|
+
*
|
|
347
|
+
* `check-ignore` exits 1 when nothing matched, which `execFile` surfaces as a
|
|
348
|
+
* rejection, so the non-zero exit is read for stdout rather than treated as a
|
|
349
|
+
* failure. Paths already in the index are not reported, which is the answer we
|
|
350
|
+
* want: a tracked file stays visible to git regardless of ignore rules.
|
|
351
|
+
*/
|
|
352
|
+
async function findGitIgnoredPaths(worktreePath, relativePaths) {
|
|
353
|
+
if (relativePaths.length === 0)
|
|
354
|
+
return new Set();
|
|
355
|
+
try {
|
|
356
|
+
const { stdout } = await (0, git_exec_1.execFileAsync)('git', ['check-ignore', '-z', '--', ...relativePaths], { cwd: worktreePath, timeout: 3000 });
|
|
357
|
+
return parseNulSeparated(stdout);
|
|
358
|
+
}
|
|
359
|
+
catch (error) {
|
|
360
|
+
const stdout = error.stdout;
|
|
361
|
+
return typeof stdout === 'string' ? parseNulSeparated(stdout) : new Set();
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
function parseNulSeparated(stdout) {
|
|
365
|
+
return new Set(stdout.split('\0').filter((value) => value.length > 0));
|
|
366
|
+
}
|
|
367
|
+
function emptyBody() {
|
|
368
|
+
return { text: null, truncated: false, additions: 0, deletions: 0 };
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Build a single-hunk unified diff.
|
|
372
|
+
*
|
|
373
|
+
* The changed region is found by trimming the common prefix and suffix rather
|
|
374
|
+
* than by running an LCS: the result is a correct, honest diff at linear cost,
|
|
375
|
+
* and a preview does not gain anything from splitting one edit into several
|
|
376
|
+
* hunks it would render adjacently anyway.
|
|
377
|
+
*/
|
|
378
|
+
function buildUnifiedDiff(before, after, budget) {
|
|
379
|
+
if (before === null && after === null)
|
|
380
|
+
return emptyBody();
|
|
381
|
+
const beforeLines = before ? splitLines(before) : [];
|
|
382
|
+
const afterLines = after ? splitLines(after) : [];
|
|
383
|
+
let prefix = 0;
|
|
384
|
+
const maxPrefix = Math.min(beforeLines.length, afterLines.length);
|
|
385
|
+
while (prefix < maxPrefix && beforeLines[prefix] === afterLines[prefix])
|
|
386
|
+
prefix += 1;
|
|
387
|
+
let suffix = 0;
|
|
388
|
+
while (suffix < maxPrefix - prefix &&
|
|
389
|
+
beforeLines[beforeLines.length - 1 - suffix] === afterLines[afterLines.length - 1 - suffix]) {
|
|
390
|
+
suffix += 1;
|
|
391
|
+
}
|
|
392
|
+
const removed = beforeLines.slice(prefix, beforeLines.length - suffix);
|
|
393
|
+
const added = afterLines.slice(prefix, afterLines.length - suffix);
|
|
394
|
+
if (removed.length === 0 && added.length === 0)
|
|
395
|
+
return emptyBody();
|
|
396
|
+
const contextStart = Math.max(0, prefix - exports.SKILL_DIFF_CONTEXT_LINES);
|
|
397
|
+
const leadingContext = beforeLines.slice(contextStart, prefix);
|
|
398
|
+
const trailingContext = beforeLines.slice(beforeLines.length - suffix, Math.min(beforeLines.length, beforeLines.length - suffix + exports.SKILL_DIFF_CONTEXT_LINES));
|
|
399
|
+
const beforeCount = leadingContext.length + removed.length + trailingContext.length;
|
|
400
|
+
const afterCount = leadingContext.length + added.length + trailingContext.length;
|
|
401
|
+
const beforeStart = beforeCount === 0 ? 0 : contextStart + 1;
|
|
402
|
+
const afterStart = afterCount === 0 ? 0 : contextStart + 1;
|
|
403
|
+
const lines = [`@@ -${beforeStart},${beforeCount} +${afterStart},${afterCount} @@`];
|
|
404
|
+
let truncated = false;
|
|
405
|
+
let bytes = lines[0].length + 1;
|
|
406
|
+
const push = (prefixChar, value) => {
|
|
407
|
+
if (lines.length >= exports.SKILL_DIFF_MAX_LINES + 1)
|
|
408
|
+
return false;
|
|
409
|
+
const line = `${prefixChar}${value}`;
|
|
410
|
+
const cost = line.length + 1;
|
|
411
|
+
if (bytes + cost > exports.SKILL_DIFF_MAX_FILE_BYTES || cost > budget.remainingBytes - bytes) {
|
|
412
|
+
return false;
|
|
413
|
+
}
|
|
414
|
+
lines.push(line);
|
|
415
|
+
bytes += cost;
|
|
416
|
+
return true;
|
|
417
|
+
};
|
|
418
|
+
for (const value of leadingContext) {
|
|
419
|
+
if (!push(' ', value)) {
|
|
420
|
+
truncated = true;
|
|
421
|
+
break;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
if (!truncated) {
|
|
425
|
+
for (const value of removed) {
|
|
426
|
+
if (!push('-', value)) {
|
|
427
|
+
truncated = true;
|
|
428
|
+
break;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
if (!truncated) {
|
|
433
|
+
for (const value of added) {
|
|
434
|
+
if (!push('+', value)) {
|
|
435
|
+
truncated = true;
|
|
436
|
+
break;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
if (!truncated) {
|
|
441
|
+
for (const value of trailingContext) {
|
|
442
|
+
if (!push(' ', value)) {
|
|
443
|
+
truncated = true;
|
|
444
|
+
break;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
if (truncated)
|
|
449
|
+
lines.push('… diff truncated');
|
|
450
|
+
const text = lines.join('\n');
|
|
451
|
+
budget.remainingBytes = Math.max(0, budget.remainingBytes - text.length);
|
|
452
|
+
return { text, truncated, additions: added.length, deletions: removed.length };
|
|
453
|
+
}
|
|
454
|
+
function classify(planned, existing, recorded) {
|
|
455
|
+
if (!existing) {
|
|
456
|
+
return planned
|
|
457
|
+
? { change: 'add', reason: exports.SkillDiffReason.NEW_FILE }
|
|
458
|
+
: { change: 'unchanged', reason: exports.SkillDiffReason.RECEIPT_ORPHAN };
|
|
459
|
+
}
|
|
460
|
+
if (!recorded) {
|
|
461
|
+
return { change: 'unmanaged', reason: exports.SkillDiffReason.UNMANAGED_SKILL };
|
|
462
|
+
}
|
|
463
|
+
if (existing.sha256 !== recorded.sha256 || existing.executable !== recorded.executable) {
|
|
464
|
+
return { change: 'conflict', reason: exports.SkillDiffReason.LOCAL_MODIFICATION };
|
|
465
|
+
}
|
|
466
|
+
if (!planned) {
|
|
467
|
+
return { change: 'unmanaged', reason: exports.SkillDiffReason.RECEIPT_ORPHAN };
|
|
468
|
+
}
|
|
469
|
+
if (planned.sha256 === existing.sha256 && planned.executable === existing.executable) {
|
|
470
|
+
return { change: 'unchanged', reason: exports.SkillDiffReason.CONTENT_IDENTICAL };
|
|
471
|
+
}
|
|
472
|
+
return { change: 'modify', reason: exports.SkillDiffReason.MANAGED_UPDATE };
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Assemble the virtual diff.
|
|
476
|
+
*
|
|
477
|
+
* Every planned write appears, including the generated receipt, and every file
|
|
478
|
+
* already under the install root appears even when the package does not mention
|
|
479
|
+
* it — an existing Skill the user installed by hand must be visible as
|
|
480
|
+
* something the install would collide with, not omitted because the package is
|
|
481
|
+
* unaware of it.
|
|
482
|
+
*/
|
|
483
|
+
function buildSkillPreviewDiff(input) {
|
|
484
|
+
const installRoot = skillInstallRootFor(input.installRootPrefix ?? constants_1.SKILL_INSTALL_ROOT_PREFIX, input.skillId);
|
|
485
|
+
const plannedByPath = new Map(input.plannedFiles.map((file) => [file.relativePath, file]));
|
|
486
|
+
const existingByPath = new Map(input.existing.files.map((file) => [file.path, file]));
|
|
487
|
+
const allPaths = [
|
|
488
|
+
...new Set([
|
|
489
|
+
...plannedByPath.keys(),
|
|
490
|
+
...existingByPath.keys(),
|
|
491
|
+
...(input.receiptFiles ? [...input.receiptFiles.keys()] : []),
|
|
492
|
+
]),
|
|
493
|
+
]
|
|
494
|
+
.filter((relative) => !(0, operation_store_1.isSkillInstallStagingPath)(`${installRoot}/${relative}`))
|
|
495
|
+
.sort();
|
|
496
|
+
const budget = { remainingBytes: exports.SKILL_DIFF_MAX_TOTAL_BYTES };
|
|
497
|
+
const entries = [];
|
|
498
|
+
const stats = {
|
|
499
|
+
added: 0,
|
|
500
|
+
modified: 0,
|
|
501
|
+
unchanged: 0,
|
|
502
|
+
conflicted: 0,
|
|
503
|
+
unmanaged: 0,
|
|
504
|
+
binaryFiles: 0,
|
|
505
|
+
truncatedFiles: 0,
|
|
506
|
+
diffBytes: 0,
|
|
507
|
+
};
|
|
508
|
+
let anyCrlf = false;
|
|
509
|
+
for (const relative of allPaths) {
|
|
510
|
+
const planned = plannedByPath.get(relative) ?? null;
|
|
511
|
+
const existing = existingByPath.get(relative) ?? null;
|
|
512
|
+
const recorded = input.receiptFiles?.get(relative) ?? null;
|
|
513
|
+
const { change, reason } = classify(planned, existing, recorded);
|
|
514
|
+
const repoPath = `${installRoot}/${relative}`;
|
|
515
|
+
const source = planned?.bytes ?? existing?.bytes ?? null;
|
|
516
|
+
const binary = (planned ? isBinaryContent(planned.bytes) : false) ||
|
|
517
|
+
(existing ? isBinaryContent(existing.bytes) : false);
|
|
518
|
+
const lineEnding = source ? detectLineEnding(source) : 'none';
|
|
519
|
+
if (planned && (lineEnding === 'crlf' || lineEnding === 'mixed'))
|
|
520
|
+
anyCrlf = true;
|
|
521
|
+
const body = binary || change === 'unchanged'
|
|
522
|
+
? emptyBody()
|
|
523
|
+
: buildUnifiedDiff(existing?.bytes ?? null, planned?.bytes ?? null, budget);
|
|
524
|
+
entries.push({
|
|
525
|
+
path: repoPath,
|
|
526
|
+
change,
|
|
527
|
+
reason,
|
|
528
|
+
generated: planned?.generated ?? false,
|
|
529
|
+
sha256: planned?.sha256 ?? null,
|
|
530
|
+
size: planned?.size ?? null,
|
|
531
|
+
executable: planned?.executable ?? existing?.executable ?? false,
|
|
532
|
+
currentSha256: existing?.sha256 ?? null,
|
|
533
|
+
currentSize: existing?.size ?? null,
|
|
534
|
+
binary,
|
|
535
|
+
lineEnding,
|
|
536
|
+
gitIgnored: input.gitIgnoredPaths.has(repoPath),
|
|
537
|
+
diff: body.text,
|
|
538
|
+
diffTruncated: body.truncated,
|
|
539
|
+
additions: body.additions,
|
|
540
|
+
deletions: body.deletions,
|
|
541
|
+
});
|
|
542
|
+
if (change === 'add')
|
|
543
|
+
stats.added += 1;
|
|
544
|
+
else if (change === 'modify')
|
|
545
|
+
stats.modified += 1;
|
|
546
|
+
else if (change === 'unchanged')
|
|
547
|
+
stats.unchanged += 1;
|
|
548
|
+
else if (change === 'conflict')
|
|
549
|
+
stats.conflicted += 1;
|
|
550
|
+
else
|
|
551
|
+
stats.unmanaged += 1;
|
|
552
|
+
if (binary)
|
|
553
|
+
stats.binaryFiles += 1;
|
|
554
|
+
if (body.truncated)
|
|
555
|
+
stats.truncatedFiles += 1;
|
|
556
|
+
stats.diffBytes += body.text?.length ?? 0;
|
|
557
|
+
}
|
|
558
|
+
for (const irregular of input.existing.irregularPaths) {
|
|
559
|
+
const repoPath = irregular ? `${installRoot}/${irregular}` : installRoot;
|
|
560
|
+
entries.push({
|
|
561
|
+
path: repoPath,
|
|
562
|
+
change: 'conflict',
|
|
563
|
+
reason: exports.SkillDiffReason.NOT_A_REGULAR_FILE,
|
|
564
|
+
generated: false,
|
|
565
|
+
sha256: null,
|
|
566
|
+
size: null,
|
|
567
|
+
executable: false,
|
|
568
|
+
currentSha256: null,
|
|
569
|
+
currentSize: null,
|
|
570
|
+
binary: false,
|
|
571
|
+
lineEnding: 'none',
|
|
572
|
+
gitIgnored: input.gitIgnoredPaths.has(repoPath),
|
|
573
|
+
diff: null,
|
|
574
|
+
diffTruncated: false,
|
|
575
|
+
additions: 0,
|
|
576
|
+
deletions: 0,
|
|
577
|
+
});
|
|
578
|
+
stats.conflicted += 1;
|
|
579
|
+
}
|
|
580
|
+
const warnings = collectWarnings(input, entries, stats, anyCrlf);
|
|
581
|
+
// The planned tree keeps every file the install would not remove, so the hash
|
|
582
|
+
// describes the directory apply must produce — not just the package.
|
|
583
|
+
const plannedTree = input.plannedFiles.map((file) => ({
|
|
584
|
+
path: file.relativePath,
|
|
585
|
+
sha256: file.sha256,
|
|
586
|
+
executable: file.executable,
|
|
587
|
+
}));
|
|
588
|
+
for (const existing of input.existing.files) {
|
|
589
|
+
if (!plannedByPath.has(existing.path)) {
|
|
590
|
+
plannedTree.push({
|
|
591
|
+
path: existing.path,
|
|
592
|
+
sha256: existing.sha256,
|
|
593
|
+
executable: existing.executable,
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
return {
|
|
598
|
+
installRoot,
|
|
599
|
+
entries: entries.sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0)),
|
|
600
|
+
stats,
|
|
601
|
+
warnings,
|
|
602
|
+
currentTreeHash: computeSkillTreeHash(input.existing.files),
|
|
603
|
+
plannedTreeHash: computeSkillTreeHash(plannedTree),
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
function collectWarnings(input, entries, stats, anyCrlf) {
|
|
607
|
+
const warnings = [];
|
|
608
|
+
if (input.git.headState === 'detached')
|
|
609
|
+
warnings.push(exports.SkillPreviewWarning.DETACHED_HEAD);
|
|
610
|
+
if (input.git.headState === 'unborn')
|
|
611
|
+
warnings.push(exports.SkillPreviewWarning.UNBORN_HEAD);
|
|
612
|
+
if (input.git.headState === 'unknown')
|
|
613
|
+
warnings.push(exports.SkillPreviewWarning.HEAD_UNRESOLVED);
|
|
614
|
+
if (input.git.dirty)
|
|
615
|
+
warnings.push(exports.SkillPreviewWarning.WORKING_TREE_DIRTY);
|
|
616
|
+
if (entries.some((entry) => entry.gitIgnored))
|
|
617
|
+
warnings.push(exports.SkillPreviewWarning.PATH_GIT_IGNORED);
|
|
618
|
+
if (stats.truncatedFiles > 0)
|
|
619
|
+
warnings.push(exports.SkillPreviewWarning.DIFF_TRUNCATED);
|
|
620
|
+
if (stats.binaryFiles > 0)
|
|
621
|
+
warnings.push(exports.SkillPreviewWarning.BINARY_CONTENT);
|
|
622
|
+
if (anyCrlf)
|
|
623
|
+
warnings.push(exports.SkillPreviewWarning.LINE_ENDING_CRLF);
|
|
624
|
+
if (input.existing.truncated)
|
|
625
|
+
warnings.push(exports.SkillPreviewWarning.TREE_SCAN_TRUNCATED);
|
|
626
|
+
return warnings;
|
|
627
|
+
}
|