commandmate 0.11.4 → 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 +395 -303
- package/.next/app-path-routes-manifest.json +31 -22
- 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_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 +31 -22
- 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-76295bf0184b101f.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/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/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/.next/static/{0_lnKsT0DH-MnHhnV5n-l → D-aoE4gWfuCUN0GqEPIX3}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Install Plan: a time-boxed, single-use commitment to one exact install (Issue #1233)
|
|
4
|
+
*
|
|
5
|
+
* A plan freezes everything apply is allowed to act on — the resolved worktree,
|
|
6
|
+
* the live branch and HEAD, the verified artifact snapshot, the exact receipt
|
|
7
|
+
* bytes and the tree hash of the destination — and hands back an opaque token.
|
|
8
|
+
* Apply presents the token, the server re-reads the same facts, and any
|
|
9
|
+
* divergence is `SKILL_PLAN_STALE` rather than a write against a directory that
|
|
10
|
+
* has moved on. The client therefore has nothing it could restate and have
|
|
11
|
+
* honoured: not a path, not a URL, not a file list.
|
|
12
|
+
*
|
|
13
|
+
* Why the state is server-side rather than a signed blob: the plan carries the
|
|
14
|
+
* diff bodies, which must not be persisted, and the token must be usable
|
|
15
|
+
* exactly once. Both are properties of a store, not of a token format, and a
|
|
16
|
+
* random opaque key into that store is what makes the token tamper-proof — it
|
|
17
|
+
* encodes nothing an attacker could rewrite.
|
|
18
|
+
*
|
|
19
|
+
* Apply itself is #1235. This module defines the contract it must satisfy.
|
|
20
|
+
*
|
|
21
|
+
* @module lib/skills/install-plan
|
|
22
|
+
*/
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.SKILL_PLAN_HIGH_RISK_MESSAGE_KEY = exports.SkillPlanError = exports.SKILL_PLAN_ERROR_STATUS = exports.SkillPlanErrorCode = exports.SKILL_PLAN_TOKEN_PATTERN = exports.SKILL_PLAN_MAX_ENTRIES = exports.SKILL_PLAN_TTL_MS = exports.SKILL_RECEIPT_FILENAME = void 0;
|
|
25
|
+
exports.isSkillPlanError = isSkillPlanError;
|
|
26
|
+
exports.computeSkillPlanBindingHash = computeSkillPlanBindingHash;
|
|
27
|
+
exports.receiptInstallRoots = receiptInstallRoots;
|
|
28
|
+
exports.buildSkillInstallReceipt = buildSkillInstallReceipt;
|
|
29
|
+
exports.serializeSkillInstallReceipt = serializeSkillInstallReceipt;
|
|
30
|
+
exports.parseInstalledReceipt = parseInstalledReceipt;
|
|
31
|
+
exports.sweepSkillInstallPlans = sweepSkillInstallPlans;
|
|
32
|
+
exports.getSkillInstallPlan = getSkillInstallPlan;
|
|
33
|
+
exports.assertSkillPlanCurrent = assertSkillPlanCurrent;
|
|
34
|
+
exports.consumeSkillInstallPlan = consumeSkillInstallPlan;
|
|
35
|
+
exports.discardSkillInstallPlan = discardSkillInstallPlan;
|
|
36
|
+
exports.resetSkillInstallPlanCacheForTesting = resetSkillInstallPlanCacheForTesting;
|
|
37
|
+
exports.getSkillInstallPlanCount = getSkillInstallPlanCount;
|
|
38
|
+
exports.createSkillInstallPlan = createSkillInstallPlan;
|
|
39
|
+
const crypto_1 = require("crypto");
|
|
40
|
+
const schema_1 = require("../../lib/skills/schema");
|
|
41
|
+
const constants_1 = require("../../lib/skills/constants");
|
|
42
|
+
const snapshot_store_1 = require("../../lib/skills/snapshot-store");
|
|
43
|
+
const preview_diff_1 = require("../../lib/skills/preview-diff");
|
|
44
|
+
// =============================================================================
|
|
45
|
+
// Layout and limits
|
|
46
|
+
// =============================================================================
|
|
47
|
+
/**
|
|
48
|
+
* Receipt filename inside the install root.
|
|
49
|
+
*
|
|
50
|
+
* Dot-prefixed so it falls outside the Skill ID grammar and can never be
|
|
51
|
+
* mistaken for a Skill directory by Agent discovery.
|
|
52
|
+
*/
|
|
53
|
+
exports.SKILL_RECEIPT_FILENAME = '.commandmate-receipt.json';
|
|
54
|
+
/** How long a plan stays usable. Short enough that drift is the exception. */
|
|
55
|
+
exports.SKILL_PLAN_TTL_MS = 10 * 60 * 1000;
|
|
56
|
+
/** Maximum plans held at once. Oldest is evicted first. */
|
|
57
|
+
exports.SKILL_PLAN_MAX_ENTRIES = 32;
|
|
58
|
+
/** Bytes of plan token entropy. */
|
|
59
|
+
const SKILL_PLAN_TOKEN_BYTES = 24;
|
|
60
|
+
/** Token grammar. Anything else is rejected before the store is consulted. */
|
|
61
|
+
exports.SKILL_PLAN_TOKEN_PATTERN = /^[0-9a-f]{48}$/;
|
|
62
|
+
// =============================================================================
|
|
63
|
+
// Errors
|
|
64
|
+
// =============================================================================
|
|
65
|
+
/** Client-safe reasons a plan cannot be created, read or applied. */
|
|
66
|
+
exports.SkillPlanErrorCode = {
|
|
67
|
+
/** No plan is stored for this token, or it was already evicted. */
|
|
68
|
+
NOT_FOUND: 'SKILL_PLAN_NOT_FOUND',
|
|
69
|
+
/** The plan existed but its expiry has passed. */
|
|
70
|
+
EXPIRED: 'SKILL_PLAN_EXPIRED',
|
|
71
|
+
/** The plan was already applied. Tokens are single-use. */
|
|
72
|
+
CONSUMED: 'SKILL_PLAN_CONSUMED',
|
|
73
|
+
/** Branch, HEAD or the destination tree changed since the plan was built. */
|
|
74
|
+
STALE: 'SKILL_PLAN_STALE',
|
|
75
|
+
/** The token was presented for a different actor, operation, target or version. */
|
|
76
|
+
BINDING_MISMATCH: 'SKILL_PLAN_BINDING_MISMATCH',
|
|
77
|
+
/** The plan describes writes that would overwrite content CommandMate does not manage. */
|
|
78
|
+
NOT_INSTALLABLE: 'SKILL_PLAN_NOT_INSTALLABLE',
|
|
79
|
+
/** Effective risk is high and the request did not acknowledge it. */
|
|
80
|
+
RISK_NOT_ACKNOWLEDGED: 'SKILL_PLAN_RISK_NOT_ACKNOWLEDGED',
|
|
81
|
+
/** The install root could not be resolved inside the worktree. */
|
|
82
|
+
TARGET_UNSAFE: 'SKILL_PLAN_TARGET_UNSAFE',
|
|
83
|
+
};
|
|
84
|
+
/** HTTP status each reason maps to, so every route answers alike. */
|
|
85
|
+
exports.SKILL_PLAN_ERROR_STATUS = {
|
|
86
|
+
[exports.SkillPlanErrorCode.NOT_FOUND]: 404,
|
|
87
|
+
[exports.SkillPlanErrorCode.EXPIRED]: 410,
|
|
88
|
+
[exports.SkillPlanErrorCode.CONSUMED]: 409,
|
|
89
|
+
[exports.SkillPlanErrorCode.STALE]: 409,
|
|
90
|
+
[exports.SkillPlanErrorCode.BINDING_MISMATCH]: 409,
|
|
91
|
+
[exports.SkillPlanErrorCode.NOT_INSTALLABLE]: 409,
|
|
92
|
+
[exports.SkillPlanErrorCode.RISK_NOT_ACKNOWLEDGED]: 409,
|
|
93
|
+
[exports.SkillPlanErrorCode.TARGET_UNSAFE]: 400,
|
|
94
|
+
};
|
|
95
|
+
/** A plan rejection. Message is built from the code only — never from a path. */
|
|
96
|
+
class SkillPlanError extends Error {
|
|
97
|
+
code;
|
|
98
|
+
detail;
|
|
99
|
+
constructor(code, detail) {
|
|
100
|
+
super(`Skill install plan rejected: ${code}`);
|
|
101
|
+
this.code = code;
|
|
102
|
+
this.detail = detail;
|
|
103
|
+
this.name = 'SkillPlanError';
|
|
104
|
+
}
|
|
105
|
+
get status() {
|
|
106
|
+
return exports.SKILL_PLAN_ERROR_STATUS[this.code];
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.SkillPlanError = SkillPlanError;
|
|
110
|
+
function isSkillPlanError(value) {
|
|
111
|
+
return value instanceof SkillPlanError;
|
|
112
|
+
}
|
|
113
|
+
function canonicalJson(value) {
|
|
114
|
+
if (value === null || typeof value !== 'object')
|
|
115
|
+
return JSON.stringify(value) ?? 'null';
|
|
116
|
+
if (Array.isArray(value))
|
|
117
|
+
return `[${value.map(canonicalJson).join(',')}]`;
|
|
118
|
+
const entries = Object.entries(value)
|
|
119
|
+
.filter(([, v]) => v !== undefined)
|
|
120
|
+
.sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0));
|
|
121
|
+
return `{${entries.map(([k, v]) => `${JSON.stringify(k)}:${canonicalJson(v)}`).join(',')}}`;
|
|
122
|
+
}
|
|
123
|
+
/** Digest of a binding, used to compare two of them without leaking either. */
|
|
124
|
+
function computeSkillPlanBindingHash(binding) {
|
|
125
|
+
return (0, crypto_1.createHash)('sha256').update(canonicalJson(binding)).digest('hex');
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* The roots a receipt records, primary first (#1460).
|
|
129
|
+
*
|
|
130
|
+
* A pre-#1460 receipt has no `install_roots`; it is read as the single root it
|
|
131
|
+
* names in `install_root`.
|
|
132
|
+
*/
|
|
133
|
+
function receiptInstallRoots(receipt) {
|
|
134
|
+
return receipt.install_roots && receipt.install_roots.length > 0
|
|
135
|
+
? [...receipt.install_roots]
|
|
136
|
+
: [receipt.install_root];
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Build the receipt this install would leave behind.
|
|
140
|
+
*
|
|
141
|
+
* Deterministic by construction: no timestamp, no actor, no absolute path and
|
|
142
|
+
* no artifact URL. That is what lets the exact bytes be fixed at plan time and
|
|
143
|
+
* diffed like any other file, instead of appearing out of nowhere at apply.
|
|
144
|
+
*/
|
|
145
|
+
function buildSkillInstallReceipt(input) {
|
|
146
|
+
const { snapshot, version } = input;
|
|
147
|
+
const files = snapshot.files.map((file) => ({
|
|
148
|
+
path: file.path,
|
|
149
|
+
sha256: file.sha256,
|
|
150
|
+
size: file.size,
|
|
151
|
+
executable: file.executable,
|
|
152
|
+
}));
|
|
153
|
+
const agents = version.compatibility.agents.map((agent) => ({
|
|
154
|
+
agent: agent.agent,
|
|
155
|
+
support: agent.support,
|
|
156
|
+
evidence: agent.evidence,
|
|
157
|
+
}));
|
|
158
|
+
// Primary first; the primary root stays `install_root` for backward
|
|
159
|
+
// compatibility. `install_roots` is recorded only for a genuine multi-root
|
|
160
|
+
// install (#1460) so a single-root receipt is byte-identical to a pre-#1460 one.
|
|
161
|
+
const rootPrefixes = input.rootPrefixes && input.rootPrefixes.length > 0
|
|
162
|
+
? [...input.rootPrefixes]
|
|
163
|
+
: [constants_1.SKILL_INSTALL_ROOT_PREFIX];
|
|
164
|
+
const installRoots = rootPrefixes.map((prefix) => (0, preview_diff_1.skillInstallRootFor)(prefix, snapshot.skillId));
|
|
165
|
+
return {
|
|
166
|
+
schema_version: constants_1.SKILL_SCHEMA_VERSION,
|
|
167
|
+
skill_id: snapshot.skillId,
|
|
168
|
+
version: snapshot.version,
|
|
169
|
+
install_root: installRoots[0],
|
|
170
|
+
...(installRoots.length > 1 ? { install_roots: installRoots } : {}),
|
|
171
|
+
source: {
|
|
172
|
+
repository: version.source.repository,
|
|
173
|
+
ref: version.source.ref,
|
|
174
|
+
commit: version.source.commit,
|
|
175
|
+
},
|
|
176
|
+
artifact: {
|
|
177
|
+
asset_name: version.artifact.asset_name,
|
|
178
|
+
sha256: version.artifact.sha256,
|
|
179
|
+
size: version.artifact.size,
|
|
180
|
+
format: version.artifact.format,
|
|
181
|
+
},
|
|
182
|
+
files,
|
|
183
|
+
declared_risk: snapshot.declaredRisk,
|
|
184
|
+
computed_risk: snapshot.computedRisk,
|
|
185
|
+
effective_risk: snapshot.effectiveRisk,
|
|
186
|
+
declared_permissions: [...snapshot.inspection.declared_permissions],
|
|
187
|
+
agent_compatibility: agents,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
/** The exact bytes the receipt file would contain. */
|
|
191
|
+
function serializeSkillInstallReceipt(receipt) {
|
|
192
|
+
return Buffer.from((0, schema_1.canonicalizeSkillReceipt)(receipt), 'utf-8');
|
|
193
|
+
}
|
|
194
|
+
/** Parse a receipt found in a worktree. Returns null for anything unreadable. */
|
|
195
|
+
function parseInstalledReceipt(bytes) {
|
|
196
|
+
try {
|
|
197
|
+
const parsed = JSON.parse(Buffer.from(bytes).toString('utf-8'));
|
|
198
|
+
if (!parsed || typeof parsed !== 'object')
|
|
199
|
+
return null;
|
|
200
|
+
const candidate = parsed;
|
|
201
|
+
if (typeof candidate.skill_id !== 'string' || !Array.isArray(candidate.files))
|
|
202
|
+
return null;
|
|
203
|
+
return candidate;
|
|
204
|
+
}
|
|
205
|
+
catch {
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
const cache = globalThis.__skillInstallPlans ?? (globalThis.__skillInstallPlans = { records: new Map() });
|
|
210
|
+
function dropRecord(record) {
|
|
211
|
+
cache.records.delete(record.token);
|
|
212
|
+
// The snapshot reference was taken for this plan; an unconsumed plan must not
|
|
213
|
+
// pin artifact bytes past its own lifetime.
|
|
214
|
+
if (record.consumedAt === null)
|
|
215
|
+
(0, snapshot_store_1.releaseSkillSnapshot)(record.binding.snapshotId);
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Drop every expired plan, releasing the snapshot each one pinned.
|
|
219
|
+
*
|
|
220
|
+
* @param keep Token to leave in place so its own lookup can still answer
|
|
221
|
+
* `EXPIRED` rather than the ambiguous `NOT_FOUND`
|
|
222
|
+
* @returns Number of plans dropped
|
|
223
|
+
*/
|
|
224
|
+
function sweepExpired(now, keep) {
|
|
225
|
+
let dropped = 0;
|
|
226
|
+
for (const record of [...cache.records.values()]) {
|
|
227
|
+
if (record.token !== keep && now >= record.expiresAt) {
|
|
228
|
+
dropRecord(record);
|
|
229
|
+
dropped += 1;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return dropped;
|
|
233
|
+
}
|
|
234
|
+
function sweep(now) {
|
|
235
|
+
sweepExpired(now);
|
|
236
|
+
while (cache.records.size >= exports.SKILL_PLAN_MAX_ENTRIES) {
|
|
237
|
+
const oldest = [...cache.records.values()].sort((a, b) => a.createdAt - b.createdAt)[0];
|
|
238
|
+
if (!oldest)
|
|
239
|
+
break;
|
|
240
|
+
dropRecord(oldest);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Reclaim expired plans without creating one.
|
|
245
|
+
*
|
|
246
|
+
* Creating a plan is not the only thing that should free a snapshot: a plan
|
|
247
|
+
* left unapplied would otherwise pin its artifact bytes for the life of the
|
|
248
|
+
* process. Called from every token access and from the background sweeper.
|
|
249
|
+
*
|
|
250
|
+
* @returns Number of plans dropped
|
|
251
|
+
*/
|
|
252
|
+
function sweepSkillInstallPlans(options = {}) {
|
|
253
|
+
return sweepExpired(options.now ?? Date.now());
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Look a token up without spending it.
|
|
257
|
+
*
|
|
258
|
+
* The token is compared in constant time against the stored value: the map
|
|
259
|
+
* lookup already leaks nothing (the key is the token), but the equality check
|
|
260
|
+
* keeps the pattern honest for callers that re-verify.
|
|
261
|
+
*/
|
|
262
|
+
function requireRecord(token, now) {
|
|
263
|
+
if (!exports.SKILL_PLAN_TOKEN_PATTERN.test(token)) {
|
|
264
|
+
throw new SkillPlanError(exports.SkillPlanErrorCode.NOT_FOUND);
|
|
265
|
+
}
|
|
266
|
+
const record = cache.records.get(token);
|
|
267
|
+
// Every token access reclaims the siblings that expired meanwhile, so a plan
|
|
268
|
+
// nobody applies is not held until the next plan is created.
|
|
269
|
+
sweepExpired(now, token);
|
|
270
|
+
if (!record)
|
|
271
|
+
throw new SkillPlanError(exports.SkillPlanErrorCode.NOT_FOUND);
|
|
272
|
+
const presented = Buffer.from(token, 'utf-8');
|
|
273
|
+
const stored = Buffer.from(record.token, 'utf-8');
|
|
274
|
+
if (presented.length !== stored.length || !(0, crypto_1.timingSafeEqual)(presented, stored)) {
|
|
275
|
+
throw new SkillPlanError(exports.SkillPlanErrorCode.NOT_FOUND);
|
|
276
|
+
}
|
|
277
|
+
if (now >= record.expiresAt) {
|
|
278
|
+
dropRecord(record);
|
|
279
|
+
throw new SkillPlanError(exports.SkillPlanErrorCode.EXPIRED);
|
|
280
|
+
}
|
|
281
|
+
if (record.consumedAt !== null)
|
|
282
|
+
throw new SkillPlanError(exports.SkillPlanErrorCode.CONSUMED);
|
|
283
|
+
return record;
|
|
284
|
+
}
|
|
285
|
+
/** Read a stored plan. Does not spend the token. */
|
|
286
|
+
function getSkillInstallPlan(token, options = {}) {
|
|
287
|
+
return requireRecord(token, options.now ?? Date.now());
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Reject a plan whose world moved.
|
|
291
|
+
*
|
|
292
|
+
* Branch, HEAD and the destination tree are all re-read by the caller; any one
|
|
293
|
+
* of them differing means the preview the user approved no longer describes
|
|
294
|
+
* what would happen.
|
|
295
|
+
*/
|
|
296
|
+
function assertSkillPlanCurrent(record, observed) {
|
|
297
|
+
const { binding } = record;
|
|
298
|
+
if (observed.branch !== binding.branch ||
|
|
299
|
+
observed.headCommit !== binding.headCommit ||
|
|
300
|
+
observed.currentTreeHash !== binding.currentTreeHash) {
|
|
301
|
+
throw new SkillPlanError(exports.SkillPlanErrorCode.STALE);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Spend a token.
|
|
306
|
+
*
|
|
307
|
+
* Binding equality is checked before staleness so a token presented for the
|
|
308
|
+
* wrong target is never told anything about the right one. The record is marked
|
|
309
|
+
* consumed rather than deleted, so a replay is answered `CONSUMED` instead of
|
|
310
|
+
* the ambiguous `NOT_FOUND`.
|
|
311
|
+
*
|
|
312
|
+
* The caller inherits the artifact snapshot reference and must release it.
|
|
313
|
+
*/
|
|
314
|
+
function consumeSkillInstallPlan(token, expected, observed, options = {}) {
|
|
315
|
+
const now = options.now ?? Date.now();
|
|
316
|
+
const record = requireRecord(token, now);
|
|
317
|
+
const { binding } = record;
|
|
318
|
+
const sameActor = binding.actor.type === expected.actor.type && binding.actor.id === expected.actor.id;
|
|
319
|
+
if (!sameActor ||
|
|
320
|
+
binding.worktreeId !== expected.worktreeId ||
|
|
321
|
+
binding.skillId !== expected.skillId ||
|
|
322
|
+
binding.version !== expected.version) {
|
|
323
|
+
throw new SkillPlanError(exports.SkillPlanErrorCode.BINDING_MISMATCH);
|
|
324
|
+
}
|
|
325
|
+
if (!record.dto.installable)
|
|
326
|
+
throw new SkillPlanError(exports.SkillPlanErrorCode.NOT_INSTALLABLE);
|
|
327
|
+
if (record.dto.requiresRiskAcknowledgement && !expected.riskAcknowledged) {
|
|
328
|
+
throw new SkillPlanError(exports.SkillPlanErrorCode.RISK_NOT_ACKNOWLEDGED);
|
|
329
|
+
}
|
|
330
|
+
assertSkillPlanCurrent(record, observed);
|
|
331
|
+
record.consumedAt = now;
|
|
332
|
+
return record;
|
|
333
|
+
}
|
|
334
|
+
/** Drop a plan and release its artifact reference. Safe to call twice. */
|
|
335
|
+
function discardSkillInstallPlan(token) {
|
|
336
|
+
const record = cache.records.get(token);
|
|
337
|
+
if (record)
|
|
338
|
+
dropRecord(record);
|
|
339
|
+
}
|
|
340
|
+
/** @internal */
|
|
341
|
+
function resetSkillInstallPlanCacheForTesting() {
|
|
342
|
+
cache.records.clear();
|
|
343
|
+
}
|
|
344
|
+
/** @internal Number of plans currently held. */
|
|
345
|
+
function getSkillInstallPlanCount() {
|
|
346
|
+
return cache.records.size;
|
|
347
|
+
}
|
|
348
|
+
// =============================================================================
|
|
349
|
+
// Plan construction
|
|
350
|
+
// =============================================================================
|
|
351
|
+
/** i18n key for the extra confirmation a high-risk install requires. */
|
|
352
|
+
exports.SKILL_PLAN_HIGH_RISK_MESSAGE_KEY = 'skills.plan.highRiskAcknowledgement';
|
|
353
|
+
/**
|
|
354
|
+
* Build a plan and register it under a fresh token.
|
|
355
|
+
*
|
|
356
|
+
* The order matters: the receipt bytes are fixed first, so the receipt takes
|
|
357
|
+
* part in the inventory, in the virtual diff and in the planned tree hash like
|
|
358
|
+
* any other file. A receipt that only materialized at apply time would be a
|
|
359
|
+
* write the user never previewed.
|
|
360
|
+
*/
|
|
361
|
+
async function createSkillInstallPlan(input) {
|
|
362
|
+
const now = input.now ?? Date.now();
|
|
363
|
+
const { snapshot } = input;
|
|
364
|
+
const rootPrefixes = input.targets && input.targets.length > 0
|
|
365
|
+
? [...input.targets]
|
|
366
|
+
: [constants_1.SKILL_INSTALL_ROOT_PREFIX];
|
|
367
|
+
// Every root's absolute path is derived and containment-checked up front, so a
|
|
368
|
+
// malformed target fails the plan before any tree is read (#1460).
|
|
369
|
+
let rootTargets;
|
|
370
|
+
try {
|
|
371
|
+
rootTargets = rootPrefixes.map((prefix) => ({
|
|
372
|
+
prefix,
|
|
373
|
+
abs: (0, preview_diff_1.resolveSkillInstallRootFor)(input.worktree.path, prefix, snapshot.skillId),
|
|
374
|
+
rel: (0, preview_diff_1.skillInstallRootFor)(prefix, snapshot.skillId),
|
|
375
|
+
}));
|
|
376
|
+
}
|
|
377
|
+
catch {
|
|
378
|
+
throw new SkillPlanError(exports.SkillPlanErrorCode.TARGET_UNSAFE);
|
|
379
|
+
}
|
|
380
|
+
// The receipt is byte-identical across roots and records the full root set.
|
|
381
|
+
const receipt = buildSkillInstallReceipt({ snapshot, version: input.version, rootPrefixes });
|
|
382
|
+
const receiptBytes = serializeSkillInstallReceipt(receipt);
|
|
383
|
+
const receiptDigest = (0, crypto_1.createHash)('sha256').update(receiptBytes).digest('hex');
|
|
384
|
+
const plannedFiles = [
|
|
385
|
+
...snapshot.files.map((file) => ({
|
|
386
|
+
relativePath: file.path,
|
|
387
|
+
sha256: file.sha256,
|
|
388
|
+
size: file.size,
|
|
389
|
+
executable: file.executable,
|
|
390
|
+
bytes: snapshot.readFile(file.path),
|
|
391
|
+
generated: false,
|
|
392
|
+
})),
|
|
393
|
+
{
|
|
394
|
+
relativePath: exports.SKILL_RECEIPT_FILENAME,
|
|
395
|
+
sha256: receiptDigest,
|
|
396
|
+
size: receiptBytes.byteLength,
|
|
397
|
+
executable: false,
|
|
398
|
+
bytes: receiptBytes,
|
|
399
|
+
generated: true,
|
|
400
|
+
},
|
|
401
|
+
];
|
|
402
|
+
const git = await (0, preview_diff_1.readSkillGitTargetState)(input.worktree.path);
|
|
403
|
+
const gitIgnoredPaths = await (0, preview_diff_1.findGitIgnoredPaths)(input.worktree.path, rootTargets.flatMap((root) => plannedFiles.map((file) => `${root.rel}/${file.relativePath}`)));
|
|
404
|
+
// One preview per root. The payload is identical, but each root has its own
|
|
405
|
+
// existing tree, its own receipt and its own conflicts (#1460).
|
|
406
|
+
const perRoot = rootTargets.map((root) => {
|
|
407
|
+
const existing = (0, preview_diff_1.readExistingSkillTree)(root.abs);
|
|
408
|
+
const installedReceipt = readInstalledReceipt(existing);
|
|
409
|
+
const receiptFiles = installedReceipt
|
|
410
|
+
? new Map([
|
|
411
|
+
...installedReceipt.receipt.files.map((file) => [file.path, { sha256: file.sha256, executable: file.executable }]),
|
|
412
|
+
// The receipt does not list itself, but it is CommandMate-managed:
|
|
413
|
+
// without this the previous receipt would read as an unmanaged file
|
|
414
|
+
// and block every legitimate re-install.
|
|
415
|
+
[
|
|
416
|
+
exports.SKILL_RECEIPT_FILENAME,
|
|
417
|
+
{ sha256: installedReceipt.digest, executable: false },
|
|
418
|
+
],
|
|
419
|
+
])
|
|
420
|
+
: null;
|
|
421
|
+
const preview = (0, preview_diff_1.buildSkillPreviewDiff)({
|
|
422
|
+
skillId: snapshot.skillId,
|
|
423
|
+
worktreePath: input.worktree.path,
|
|
424
|
+
installRootPrefix: root.prefix,
|
|
425
|
+
plannedFiles,
|
|
426
|
+
existing,
|
|
427
|
+
receiptFiles,
|
|
428
|
+
git,
|
|
429
|
+
gitIgnoredPaths,
|
|
430
|
+
});
|
|
431
|
+
return { root, installedReceipt, preview };
|
|
432
|
+
});
|
|
433
|
+
// The primary root anchors the binding's tree hashes and the receipt path; the
|
|
434
|
+
// route re-reads the primary tree before spending the token.
|
|
435
|
+
const primary = perRoot[0];
|
|
436
|
+
const installRootRel = primary.root.rel;
|
|
437
|
+
const installedReceipt = primary.installedReceipt;
|
|
438
|
+
const installRoots = rootTargets.map((root) => root.rel);
|
|
439
|
+
const mergedEntries = perRoot
|
|
440
|
+
.flatMap((r) => [...r.preview.entries])
|
|
441
|
+
.sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0));
|
|
442
|
+
const mergedStats = perRoot.reduce((acc, r) => ({
|
|
443
|
+
added: acc.added + r.preview.stats.added,
|
|
444
|
+
modified: acc.modified + r.preview.stats.modified,
|
|
445
|
+
unchanged: acc.unchanged + r.preview.stats.unchanged,
|
|
446
|
+
conflicted: acc.conflicted + r.preview.stats.conflicted,
|
|
447
|
+
unmanaged: acc.unmanaged + r.preview.stats.unmanaged,
|
|
448
|
+
binaryFiles: acc.binaryFiles + r.preview.stats.binaryFiles,
|
|
449
|
+
truncatedFiles: acc.truncatedFiles + r.preview.stats.truncatedFiles,
|
|
450
|
+
diffBytes: acc.diffBytes + r.preview.stats.diffBytes,
|
|
451
|
+
}), { added: 0, modified: 0, unchanged: 0, conflicted: 0, unmanaged: 0, binaryFiles: 0, truncatedFiles: 0, diffBytes: 0 });
|
|
452
|
+
const mergedWarnings = [...new Set(perRoot.flatMap((r) => [...r.preview.warnings]))];
|
|
453
|
+
const blockers = mergedEntries
|
|
454
|
+
.filter((entry) => entry.change === 'conflict' || entry.change === 'unmanaged')
|
|
455
|
+
.map((entry) => ({ code: entry.reason, path: entry.path }));
|
|
456
|
+
if (input.compatibility.status !== 'compatible') {
|
|
457
|
+
blockers.push({ code: input.compatibility.messageKey, path: null });
|
|
458
|
+
}
|
|
459
|
+
const requiresRiskAcknowledgement = snapshot.effectiveRisk === 'high';
|
|
460
|
+
const riskAcknowledged = input.riskAcknowledged === true;
|
|
461
|
+
const token = (0, crypto_1.randomBytes)(SKILL_PLAN_TOKEN_BYTES).toString('hex');
|
|
462
|
+
const expiresAt = now + exports.SKILL_PLAN_TTL_MS;
|
|
463
|
+
const binding = {
|
|
464
|
+
actor: input.actor,
|
|
465
|
+
operation: 'install',
|
|
466
|
+
worktreeId: input.worktree.id,
|
|
467
|
+
skillId: snapshot.skillId,
|
|
468
|
+
version: snapshot.version,
|
|
469
|
+
artifactSha256: input.version.artifact.sha256,
|
|
470
|
+
snapshotId: input.snapshotId,
|
|
471
|
+
branch: git.branch,
|
|
472
|
+
headCommit: git.headCommit,
|
|
473
|
+
currentTreeHash: primary.preview.currentTreeHash,
|
|
474
|
+
plannedTreeHash: primary.preview.plannedTreeHash,
|
|
475
|
+
receiptDigest,
|
|
476
|
+
riskAcknowledged,
|
|
477
|
+
};
|
|
478
|
+
const dto = {
|
|
479
|
+
token,
|
|
480
|
+
expiresAt: new Date(expiresAt).toISOString().replace(/\.\d{3}Z$/, 'Z'),
|
|
481
|
+
installable: blockers.length === 0,
|
|
482
|
+
requiresRiskAcknowledgement,
|
|
483
|
+
riskAcknowledged,
|
|
484
|
+
riskAcknowledgementMessageKey: requiresRiskAcknowledgement
|
|
485
|
+
? exports.SKILL_PLAN_HIGH_RISK_MESSAGE_KEY
|
|
486
|
+
: null,
|
|
487
|
+
blockers,
|
|
488
|
+
warnings: mergedWarnings,
|
|
489
|
+
target: {
|
|
490
|
+
worktreeId: input.worktree.id,
|
|
491
|
+
worktreeName: input.worktree.name,
|
|
492
|
+
repositoryName: input.worktree.repositoryName,
|
|
493
|
+
syncedBranch: input.worktree.syncedBranch,
|
|
494
|
+
branch: git.branch,
|
|
495
|
+
headState: git.headState,
|
|
496
|
+
headCommit: git.headCommit,
|
|
497
|
+
workingTreeDirty: git.dirty,
|
|
498
|
+
installRoot: primary.preview.installRoot,
|
|
499
|
+
installRoots,
|
|
500
|
+
currentTreeHash: primary.preview.currentTreeHash,
|
|
501
|
+
plannedTreeHash: primary.preview.plannedTreeHash,
|
|
502
|
+
existingInstall: installedReceipt
|
|
503
|
+
? { version: installedReceipt.receipt.version, receiptDigest: installedReceipt.digest }
|
|
504
|
+
: null,
|
|
505
|
+
},
|
|
506
|
+
skill: toSkillPlanSkillDto(input),
|
|
507
|
+
receipt: {
|
|
508
|
+
path: `${installRootRel}/${exports.SKILL_RECEIPT_FILENAME}`,
|
|
509
|
+
sha256: receiptDigest,
|
|
510
|
+
size: receiptBytes.byteLength,
|
|
511
|
+
},
|
|
512
|
+
files: mergedEntries,
|
|
513
|
+
stats: mergedStats,
|
|
514
|
+
};
|
|
515
|
+
const record = {
|
|
516
|
+
token,
|
|
517
|
+
binding,
|
|
518
|
+
bindingHash: computeSkillPlanBindingHash(binding),
|
|
519
|
+
createdAt: now,
|
|
520
|
+
expiresAt,
|
|
521
|
+
consumedAt: null,
|
|
522
|
+
worktreePath: input.worktree.path,
|
|
523
|
+
rootPrefixes,
|
|
524
|
+
receipt,
|
|
525
|
+
receiptBytes,
|
|
526
|
+
dto,
|
|
527
|
+
};
|
|
528
|
+
sweep(now);
|
|
529
|
+
cache.records.set(token, record);
|
|
530
|
+
return record;
|
|
531
|
+
}
|
|
532
|
+
function readInstalledReceipt(existing) {
|
|
533
|
+
const file = existing.files.find((entry) => entry.path === exports.SKILL_RECEIPT_FILENAME);
|
|
534
|
+
if (!file)
|
|
535
|
+
return null;
|
|
536
|
+
const receipt = parseInstalledReceipt(file.bytes);
|
|
537
|
+
return receipt ? { receipt, digest: file.sha256 } : null;
|
|
538
|
+
}
|
|
539
|
+
function toSkillPlanSkillDto(input) {
|
|
540
|
+
const { manifest } = input.snapshot;
|
|
541
|
+
return {
|
|
542
|
+
id: input.snapshot.skillId,
|
|
543
|
+
name: manifest.name,
|
|
544
|
+
version: input.snapshot.version,
|
|
545
|
+
summary: manifest.summary,
|
|
546
|
+
description: manifest.description,
|
|
547
|
+
capabilities: [...manifest.capabilities],
|
|
548
|
+
expectedOutcomes: [...manifest.expected_outcomes],
|
|
549
|
+
provider: { ...manifest.provider },
|
|
550
|
+
license: manifest.license,
|
|
551
|
+
homepage: manifest.homepage ?? null,
|
|
552
|
+
declaredPermissions: [...input.snapshot.inspection.declared_permissions],
|
|
553
|
+
requirements: {
|
|
554
|
+
commands: manifest.requirements.commands.map((command) => ({
|
|
555
|
+
name: command.name,
|
|
556
|
+
versionRange: command.version_range ?? null,
|
|
557
|
+
})),
|
|
558
|
+
networkHosts: [...manifest.requirements.network_hosts],
|
|
559
|
+
},
|
|
560
|
+
declaredRisk: input.snapshot.declaredRisk,
|
|
561
|
+
computedRisk: input.snapshot.computedRisk,
|
|
562
|
+
effectiveRisk: input.snapshot.effectiveRisk,
|
|
563
|
+
riskRationale: manifest.risk_rationale,
|
|
564
|
+
executablePaths: [...input.snapshot.inspection.executable_paths],
|
|
565
|
+
scriptPaths: [...input.snapshot.inspection.script_paths],
|
|
566
|
+
compatibility: {
|
|
567
|
+
commandmate: input.compatibility,
|
|
568
|
+
agents: input.version.compatibility.agents.map((agent) => ({ ...agent })),
|
|
569
|
+
},
|
|
570
|
+
source: {
|
|
571
|
+
repository: input.version.source.repository,
|
|
572
|
+
ref: input.version.source.ref,
|
|
573
|
+
commit: input.version.source.commit,
|
|
574
|
+
},
|
|
575
|
+
artifact: {
|
|
576
|
+
assetName: input.version.artifact.asset_name,
|
|
577
|
+
sha256: input.version.artifact.sha256,
|
|
578
|
+
size: input.version.artifact.size,
|
|
579
|
+
format: input.version.artifact.format,
|
|
580
|
+
},
|
|
581
|
+
};
|
|
582
|
+
}
|