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,451 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Full package/manifest reconciliation and safe materialization (Issue #1230)
|
|
4
|
+
*
|
|
5
|
+
* Second half of the inspect-then-materialize boundary. `package-reader` decides
|
|
6
|
+
* whether the bytes are an archive we are willing to look at; this module
|
|
7
|
+
* decides whether the archive is *the package the manifest describes*, and only
|
|
8
|
+
* then writes it into an isolated staging directory.
|
|
9
|
+
*
|
|
10
|
+
* Reconciliation is exact in both directions. Every regular payload file except
|
|
11
|
+
* the manifest itself must be declared, every declaration must be present, and
|
|
12
|
+
* each one must agree on size, digest, kind, executable bit and script status.
|
|
13
|
+
* A partial match is a rejection: "mostly the manifest the user reviewed" is
|
|
14
|
+
* how an undeclared script gets installed.
|
|
15
|
+
*
|
|
16
|
+
* Nothing in the package is executed, at any point, by any code path here.
|
|
17
|
+
*
|
|
18
|
+
* @module lib/skills/package-validator
|
|
19
|
+
*/
|
|
20
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
21
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.SKILL_SCRIPT_EXTENSIONS = exports.SKILL_STAGING_ENTRY_PREFIX = exports.SKILL_STAGED_EXECUTABLE_MODE = exports.SKILL_STAGED_FILE_MODE = exports.SKILL_STAGING_DIR_MODE = void 0;
|
|
25
|
+
exports.isSkillScriptPayload = isSkillScriptPayload;
|
|
26
|
+
exports.deriveSkillFileKind = deriveSkillFileKind;
|
|
27
|
+
exports.validateSkillPackage = validateSkillPackage;
|
|
28
|
+
exports.inspectSkillPackage = inspectSkillPackage;
|
|
29
|
+
exports.materializeSkillPackage = materializeSkillPackage;
|
|
30
|
+
exports.cleanupSkillStagingRoot = cleanupSkillStagingRoot;
|
|
31
|
+
const crypto_1 = require("crypto");
|
|
32
|
+
const fs_1 = require("fs");
|
|
33
|
+
const path_1 = __importDefault(require("path"));
|
|
34
|
+
const system_directories_1 = require("../../config/system-directories");
|
|
35
|
+
const skills_1 = require("../../lib/skills");
|
|
36
|
+
const integrity_1 = require("../../lib/skills/integrity");
|
|
37
|
+
const package_reader_1 = require("../../lib/skills/package-reader");
|
|
38
|
+
const safe_yaml_1 = require("../../lib/skills/safe-yaml");
|
|
39
|
+
// =============================================================================
|
|
40
|
+
// Staging policy
|
|
41
|
+
// =============================================================================
|
|
42
|
+
/** Staging directories are private to the service account. */
|
|
43
|
+
exports.SKILL_STAGING_DIR_MODE = 0o700;
|
|
44
|
+
/** Non-executable payload files land read/write for the owner only. */
|
|
45
|
+
exports.SKILL_STAGED_FILE_MODE = 0o600;
|
|
46
|
+
/** Declared executables additionally get the owner execute bit. Nothing else. */
|
|
47
|
+
exports.SKILL_STAGED_EXECUTABLE_MODE = 0o700;
|
|
48
|
+
/** Prefix of a staging directory, used to recognize orphans after a restart. */
|
|
49
|
+
exports.SKILL_STAGING_ENTRY_PREFIX = 'pkg-';
|
|
50
|
+
const STAGING_ENTRY_PATTERN = /^pkg-[0-9a-f]{32}$/;
|
|
51
|
+
/** `O_NOFOLLOW` is POSIX-only; on platforms without it the flag is a no-op. */
|
|
52
|
+
const O_NOFOLLOW = fs_1.constants.O_NOFOLLOW ?? 0;
|
|
53
|
+
// =============================================================================
|
|
54
|
+
// Script classification
|
|
55
|
+
// =============================================================================
|
|
56
|
+
/**
|
|
57
|
+
* Extensions treated as scripts regardless of content.
|
|
58
|
+
*
|
|
59
|
+
* Classification is deliberately over-broad: a file wrongly called a script
|
|
60
|
+
* only forces the publisher to declare it, while a missed one would install an
|
|
61
|
+
* interpreted payload the user never saw listed.
|
|
62
|
+
*/
|
|
63
|
+
exports.SKILL_SCRIPT_EXTENSIONS = [
|
|
64
|
+
'.bash',
|
|
65
|
+
'.bat',
|
|
66
|
+
'.cjs',
|
|
67
|
+
'.cmd',
|
|
68
|
+
'.fish',
|
|
69
|
+
'.js',
|
|
70
|
+
'.lua',
|
|
71
|
+
'.mjs',
|
|
72
|
+
'.php',
|
|
73
|
+
'.pl',
|
|
74
|
+
'.ps1',
|
|
75
|
+
'.py',
|
|
76
|
+
'.rb',
|
|
77
|
+
'.sh',
|
|
78
|
+
'.ts',
|
|
79
|
+
'.zsh',
|
|
80
|
+
];
|
|
81
|
+
const INSTRUCTION_EXTENSIONS = ['.md', '.markdown', '.rst', '.txt'];
|
|
82
|
+
function extensionOf(filePath) {
|
|
83
|
+
const base = filePath.slice(filePath.lastIndexOf('/') + 1);
|
|
84
|
+
const dot = base.lastIndexOf('.');
|
|
85
|
+
return dot <= 0 ? '' : base.slice(dot).toLowerCase();
|
|
86
|
+
}
|
|
87
|
+
/** Whether a payload file is an interpreted script, by extension or shebang. */
|
|
88
|
+
function isSkillScriptPayload(filePath, bytes) {
|
|
89
|
+
if (exports.SKILL_SCRIPT_EXTENSIONS.includes(extensionOf(filePath)))
|
|
90
|
+
return true;
|
|
91
|
+
return bytes.length >= 2 && bytes[0] === 0x23 && bytes[1] === 0x21;
|
|
92
|
+
}
|
|
93
|
+
/** Role CommandMate derives for a payload file, independent of the declaration. */
|
|
94
|
+
function deriveSkillFileKind(filePath, bytes) {
|
|
95
|
+
if (filePath === skills_1.SKILL_MD_FILENAME)
|
|
96
|
+
return 'skill_md';
|
|
97
|
+
if (isSkillScriptPayload(filePath, bytes))
|
|
98
|
+
return 'script';
|
|
99
|
+
return INSTRUCTION_EXTENSIONS.includes(extensionOf(filePath)) ? 'instruction' : 'asset';
|
|
100
|
+
}
|
|
101
|
+
// =============================================================================
|
|
102
|
+
// Helpers
|
|
103
|
+
// =============================================================================
|
|
104
|
+
function fail(code, detail) {
|
|
105
|
+
throw new package_reader_1.SkillPackageError(code, detail);
|
|
106
|
+
}
|
|
107
|
+
function findFile(table, filePath) {
|
|
108
|
+
return table.files.find((file) => file.path === filePath);
|
|
109
|
+
}
|
|
110
|
+
// =============================================================================
|
|
111
|
+
// Manifest reconciliation
|
|
112
|
+
// =============================================================================
|
|
113
|
+
function readManifest(table) {
|
|
114
|
+
const manifestEntry = findFile(table, skills_1.SKILL_MANIFEST_FILENAME);
|
|
115
|
+
if (!manifestEntry)
|
|
116
|
+
fail(package_reader_1.SkillPackageErrorCode.MANIFEST_MISSING, { reason: 'absent' });
|
|
117
|
+
for (const file of table.files) {
|
|
118
|
+
if (file.path !== skills_1.SKILL_MANIFEST_FILENAME && file.path.endsWith(`/${skills_1.SKILL_MANIFEST_FILENAME}`)) {
|
|
119
|
+
fail(package_reader_1.SkillPackageErrorCode.LAYOUT_INVALID, {
|
|
120
|
+
reason: 'nested-manifest',
|
|
121
|
+
entry: (0, package_reader_1.encodeEntryPathForError)(file.path),
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
let parsed;
|
|
126
|
+
try {
|
|
127
|
+
parsed = (0, safe_yaml_1.parseSkillYaml)(manifestEntry.bytes);
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
if ((0, safe_yaml_1.isSkillYamlError)(error)) {
|
|
131
|
+
fail(package_reader_1.SkillPackageErrorCode.MANIFEST_INVALID, { reason: error.code });
|
|
132
|
+
}
|
|
133
|
+
throw error;
|
|
134
|
+
}
|
|
135
|
+
const result = (0, skills_1.validateSkillManifest)(parsed);
|
|
136
|
+
if (!result.ok) {
|
|
137
|
+
const first = result.errors[0];
|
|
138
|
+
fail(package_reader_1.SkillPackageErrorCode.MANIFEST_INVALID, { reason: first.code, field: first.path });
|
|
139
|
+
}
|
|
140
|
+
return result.value;
|
|
141
|
+
}
|
|
142
|
+
function assertRequiredEntries(table) {
|
|
143
|
+
for (const required of skills_1.REQUIRED_PACKAGE_ENTRIES) {
|
|
144
|
+
if (!findFile(table, required)) {
|
|
145
|
+
fail(package_reader_1.SkillPackageErrorCode.LAYOUT_INVALID, {
|
|
146
|
+
reason: 'missing-required-entry',
|
|
147
|
+
entry: required,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
function assertSkillMdConsistency(table, manifest) {
|
|
153
|
+
const skillMd = findFile(table, skills_1.SKILL_MD_FILENAME);
|
|
154
|
+
if (!skillMd)
|
|
155
|
+
fail(package_reader_1.SkillPackageErrorCode.SKILL_MD_INVALID, { reason: 'absent' });
|
|
156
|
+
let frontmatter;
|
|
157
|
+
try {
|
|
158
|
+
frontmatter = (0, safe_yaml_1.parseSkillFrontmatter)(Buffer.from(skillMd.bytes).toString('utf8'));
|
|
159
|
+
}
|
|
160
|
+
catch (error) {
|
|
161
|
+
if ((0, safe_yaml_1.isSkillYamlError)(error)) {
|
|
162
|
+
fail(package_reader_1.SkillPackageErrorCode.SKILL_MD_INVALID, { reason: error.code });
|
|
163
|
+
}
|
|
164
|
+
throw error;
|
|
165
|
+
}
|
|
166
|
+
if (frontmatter === null || typeof frontmatter !== 'object' || Array.isArray(frontmatter)) {
|
|
167
|
+
fail(package_reader_1.SkillPackageErrorCode.SKILL_MD_INVALID, { reason: 'frontmatter-missing' });
|
|
168
|
+
}
|
|
169
|
+
const name = frontmatter['name'];
|
|
170
|
+
if (typeof name !== 'string') {
|
|
171
|
+
fail(package_reader_1.SkillPackageErrorCode.SKILL_MD_INVALID, { reason: 'frontmatter-name-missing' });
|
|
172
|
+
}
|
|
173
|
+
const consistency = (0, skills_1.validateSkillIdentityConsistency)({
|
|
174
|
+
directoryName: manifest.id,
|
|
175
|
+
skillMdName: name,
|
|
176
|
+
manifestId: manifest.id,
|
|
177
|
+
manifestName: manifest.name,
|
|
178
|
+
});
|
|
179
|
+
if (!consistency.ok) {
|
|
180
|
+
fail(package_reader_1.SkillPackageErrorCode.SKILL_MD_INVALID, { reason: consistency.errors[0].code });
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Both directions of the file-set comparison.
|
|
185
|
+
*
|
|
186
|
+
* Self-declaration and duplicate declarations are already refused by
|
|
187
|
+
* `validateSkillManifest` (#1228); what is left for this step is the package
|
|
188
|
+
* the manifest is being compared against.
|
|
189
|
+
*/
|
|
190
|
+
function assertFileSetMatches(table, manifest) {
|
|
191
|
+
const result = (0, skills_1.validateManifestFileSet)(manifest, table.files.map((file) => file.path));
|
|
192
|
+
if (!result.ok) {
|
|
193
|
+
const first = result.errors[0];
|
|
194
|
+
fail(package_reader_1.SkillPackageErrorCode.MANIFEST_MISMATCH, {
|
|
195
|
+
reason: first.message,
|
|
196
|
+
entry: (0, package_reader_1.encodeEntryPathForError)(String(first.detail?.['path'] ?? '')),
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/** Cross-check one payload file against its declaration on every axis. */
|
|
201
|
+
function assertDeclarationMatches(entry, manifest) {
|
|
202
|
+
const declared = manifest.files.find((file) => file.path === entry.path);
|
|
203
|
+
if (!declared) {
|
|
204
|
+
fail(package_reader_1.SkillPackageErrorCode.MANIFEST_MISMATCH, {
|
|
205
|
+
reason: 'undeclared-file',
|
|
206
|
+
entry: (0, package_reader_1.encodeEntryPathForError)(entry.path),
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
const detail = { entry: (0, package_reader_1.encodeEntryPathForError)(entry.path) };
|
|
210
|
+
if (declared.size !== entry.size)
|
|
211
|
+
fail(package_reader_1.SkillPackageErrorCode.SIZE_MISMATCH, detail);
|
|
212
|
+
if (!(0, integrity_1.digestMatches)(declared.sha256, entry.sha256)) {
|
|
213
|
+
fail(package_reader_1.SkillPackageErrorCode.DIGEST_MISMATCH, detail);
|
|
214
|
+
}
|
|
215
|
+
const derivedKind = deriveSkillFileKind(entry.path, entry.bytes);
|
|
216
|
+
const isScript = isSkillScriptPayload(entry.path, entry.bytes);
|
|
217
|
+
if (isScript && (!declared.script || declared.kind !== 'script')) {
|
|
218
|
+
fail(package_reader_1.SkillPackageErrorCode.UNDECLARED_SCRIPT, detail);
|
|
219
|
+
}
|
|
220
|
+
if (declared.kind === 'script' && !declared.script) {
|
|
221
|
+
fail(package_reader_1.SkillPackageErrorCode.MANIFEST_MISMATCH, { ...detail, reason: 'kind-script-not-declared' });
|
|
222
|
+
}
|
|
223
|
+
if ((derivedKind === 'skill_md') !== (declared.kind === 'skill_md')) {
|
|
224
|
+
fail(package_reader_1.SkillPackageErrorCode.MANIFEST_MISMATCH, { ...detail, reason: 'kind-mismatch' });
|
|
225
|
+
}
|
|
226
|
+
if (entry.executable && !declared.executable) {
|
|
227
|
+
fail(package_reader_1.SkillPackageErrorCode.UNDECLARED_EXECUTABLE, detail);
|
|
228
|
+
}
|
|
229
|
+
if (!entry.executable && declared.executable) {
|
|
230
|
+
fail(package_reader_1.SkillPackageErrorCode.MANIFEST_MISMATCH, { ...detail, reason: 'executable-not-present' });
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
// =============================================================================
|
|
234
|
+
// Validation
|
|
235
|
+
// =============================================================================
|
|
236
|
+
/**
|
|
237
|
+
* Reconcile a parsed package with its manifest and the Catalog coordinates.
|
|
238
|
+
*
|
|
239
|
+
* @param table Entry table from `readSkillPackage`
|
|
240
|
+
* @param options Coordinates the Catalog published this version under
|
|
241
|
+
* @returns An immutable snapshot, or throws before any consumer can see it
|
|
242
|
+
* @throws SkillPackageError for every rejection
|
|
243
|
+
*/
|
|
244
|
+
function validateSkillPackage(table, options) {
|
|
245
|
+
assertRequiredEntries(table);
|
|
246
|
+
const manifest = readManifest(table);
|
|
247
|
+
if (manifest.id !== options.skillId) {
|
|
248
|
+
fail(package_reader_1.SkillPackageErrorCode.MANIFEST_MISMATCH, { reason: 'id' });
|
|
249
|
+
}
|
|
250
|
+
if (manifest.version !== options.version) {
|
|
251
|
+
fail(package_reader_1.SkillPackageErrorCode.MANIFEST_MISMATCH, { reason: 'version' });
|
|
252
|
+
}
|
|
253
|
+
assertSkillMdConsistency(table, manifest);
|
|
254
|
+
assertFileSetMatches(table, manifest);
|
|
255
|
+
for (const entry of table.files) {
|
|
256
|
+
if (entry.path === skills_1.SKILL_MANIFEST_FILENAME)
|
|
257
|
+
continue;
|
|
258
|
+
assertDeclarationMatches(entry, manifest);
|
|
259
|
+
}
|
|
260
|
+
const executablePaths = manifest.files.filter((f) => f.executable).map((f) => f.path).sort();
|
|
261
|
+
const scriptPaths = manifest.files.filter((f) => f.script).map((f) => f.path).sort();
|
|
262
|
+
const inspection = {
|
|
263
|
+
executable_paths: executablePaths,
|
|
264
|
+
script_paths: scriptPaths,
|
|
265
|
+
network_hosts: [...manifest.requirements.network_hosts],
|
|
266
|
+
declared_permissions: [...manifest.declared_permissions],
|
|
267
|
+
};
|
|
268
|
+
const computedRisk = (0, skills_1.computeSkillRisk)(inspection);
|
|
269
|
+
const byPath = new Map(table.files.map((file) => [file.path, file.bytes]));
|
|
270
|
+
const files = table.files
|
|
271
|
+
.map((file) => ({
|
|
272
|
+
path: file.path,
|
|
273
|
+
sha256: file.sha256,
|
|
274
|
+
size: file.size,
|
|
275
|
+
executable: file.executable,
|
|
276
|
+
}))
|
|
277
|
+
.sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0));
|
|
278
|
+
return Object.freeze({
|
|
279
|
+
skillId: options.skillId,
|
|
280
|
+
version: options.version,
|
|
281
|
+
manifest,
|
|
282
|
+
files: Object.freeze(files),
|
|
283
|
+
directories: Object.freeze([...table.directories].sort()),
|
|
284
|
+
inspection: Object.freeze(inspection),
|
|
285
|
+
declaredRisk: manifest.declared_risk,
|
|
286
|
+
computedRisk,
|
|
287
|
+
effectiveRisk: (0, skills_1.resolveEffectiveSkillRisk)(manifest.declared_risk, computedRisk),
|
|
288
|
+
readFile(filePath) {
|
|
289
|
+
const bytes = byPath.get(filePath);
|
|
290
|
+
if (!bytes) {
|
|
291
|
+
fail(package_reader_1.SkillPackageErrorCode.MANIFEST_MISMATCH, {
|
|
292
|
+
reason: 'unknown-file',
|
|
293
|
+
entry: (0, package_reader_1.encodeEntryPathForError)(filePath),
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
return new Uint8Array(bytes);
|
|
297
|
+
},
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Read and reconcile an artifact in one step.
|
|
302
|
+
*
|
|
303
|
+
* The two halves are separately testable but must always run together: a table
|
|
304
|
+
* that was read but not reconciled is not a package, and nothing downstream
|
|
305
|
+
* should be able to obtain one.
|
|
306
|
+
*
|
|
307
|
+
* @throws SkillPackageError for every rejection
|
|
308
|
+
*/
|
|
309
|
+
function inspectSkillPackage(artifact, options) {
|
|
310
|
+
return validateSkillPackage((0, package_reader_1.readSkillPackage)(artifact, options), options);
|
|
311
|
+
}
|
|
312
|
+
// =============================================================================
|
|
313
|
+
// Materialization
|
|
314
|
+
// =============================================================================
|
|
315
|
+
function assertNotAborted(signal) {
|
|
316
|
+
if (signal?.aborted)
|
|
317
|
+
fail(package_reader_1.SkillPackageErrorCode.ABORTED);
|
|
318
|
+
}
|
|
319
|
+
/** Create a directory that must not already exist and must not be a symlink. */
|
|
320
|
+
function createDirectory(target) {
|
|
321
|
+
try {
|
|
322
|
+
(0, fs_1.mkdirSync)(target, { mode: exports.SKILL_STAGING_DIR_MODE });
|
|
323
|
+
}
|
|
324
|
+
catch {
|
|
325
|
+
fail(package_reader_1.SkillPackageErrorCode.STAGING_IO, { reason: 'mkdir' });
|
|
326
|
+
}
|
|
327
|
+
const stats = (0, fs_1.lstatSync)(target);
|
|
328
|
+
if (!stats.isDirectory())
|
|
329
|
+
fail(package_reader_1.SkillPackageErrorCode.STAGING_IO, { reason: 'not-a-directory' });
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Write one payload file.
|
|
333
|
+
*
|
|
334
|
+
* `O_CREAT|O_EXCL|O_NOFOLLOW` means the write either creates the file itself or
|
|
335
|
+
* fails: a symlink or an existing file planted between the directory scan and
|
|
336
|
+
* this call cannot be written through. The digest is re-read afterwards, so a
|
|
337
|
+
* file that changed underneath us never reaches the inventory.
|
|
338
|
+
*/
|
|
339
|
+
function writePayloadFile(target, snapshot, file) {
|
|
340
|
+
const bytes = snapshot.readFile(file.path);
|
|
341
|
+
const declared = snapshot.manifest.files.find((entry) => entry.path === file.path);
|
|
342
|
+
const mode = declared?.executable ? exports.SKILL_STAGED_EXECUTABLE_MODE : exports.SKILL_STAGED_FILE_MODE;
|
|
343
|
+
let fd;
|
|
344
|
+
try {
|
|
345
|
+
fd = (0, fs_1.openSync)(target, fs_1.constants.O_WRONLY | fs_1.constants.O_CREAT | fs_1.constants.O_EXCL | O_NOFOLLOW, mode);
|
|
346
|
+
}
|
|
347
|
+
catch {
|
|
348
|
+
fail(package_reader_1.SkillPackageErrorCode.STAGING_IO, { reason: 'open' });
|
|
349
|
+
}
|
|
350
|
+
try {
|
|
351
|
+
let written = 0;
|
|
352
|
+
while (written < bytes.byteLength) {
|
|
353
|
+
written += (0, fs_1.writeSync)(fd, bytes, written, bytes.byteLength - written);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
catch {
|
|
357
|
+
(0, fs_1.closeSync)(fd);
|
|
358
|
+
fail(package_reader_1.SkillPackageErrorCode.STAGING_IO, { reason: 'write' });
|
|
359
|
+
}
|
|
360
|
+
(0, fs_1.closeSync)(fd);
|
|
361
|
+
const stats = (0, fs_1.lstatSync)(target);
|
|
362
|
+
if (!stats.isFile() || stats.nlink !== 1 || stats.size !== bytes.byteLength) {
|
|
363
|
+
fail(package_reader_1.SkillPackageErrorCode.STAGING_IO, { reason: 'verify-stat' });
|
|
364
|
+
}
|
|
365
|
+
if (!(0, integrity_1.digestMatches)((0, integrity_1.computeSha256Hex)((0, fs_1.readFileSync)(target)), file.sha256)) {
|
|
366
|
+
fail(package_reader_1.SkillPackageErrorCode.DIGEST_MISMATCH, { reason: 'staged-readback' });
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Write a validated package into a fresh, private staging directory.
|
|
371
|
+
*
|
|
372
|
+
* Nothing outside the new directory is touched and nothing from the archive
|
|
373
|
+
* (owner, timestamps, mode) is applied: directories and files get fixed modes,
|
|
374
|
+
* and only files the manifest declared executable get an execute bit.
|
|
375
|
+
*
|
|
376
|
+
* On any failure — including an abort — the whole staging directory is removed
|
|
377
|
+
* before the error propagates, so no consumer can ever observe a partial
|
|
378
|
+
* package.
|
|
379
|
+
*
|
|
380
|
+
* @throws SkillPackageError with `STAGING_IO`, `ABORTED` or `DIGEST_MISMATCH`
|
|
381
|
+
*/
|
|
382
|
+
function materializeSkillPackage(snapshot, options) {
|
|
383
|
+
const root = path_1.default.resolve(options.stagingRoot);
|
|
384
|
+
if ((0, system_directories_1.isSystemDirectory)(root))
|
|
385
|
+
fail(package_reader_1.SkillPackageErrorCode.STAGING_IO, { reason: 'system-directory' });
|
|
386
|
+
try {
|
|
387
|
+
(0, fs_1.mkdirSync)(root, { recursive: true, mode: exports.SKILL_STAGING_DIR_MODE });
|
|
388
|
+
}
|
|
389
|
+
catch {
|
|
390
|
+
fail(package_reader_1.SkillPackageErrorCode.STAGING_IO, { reason: 'mkdir-root' });
|
|
391
|
+
}
|
|
392
|
+
const stagingDir = path_1.default.join(root, `${exports.SKILL_STAGING_ENTRY_PREFIX}${(0, crypto_1.randomBytes)(16).toString('hex')}`);
|
|
393
|
+
createDirectory(stagingDir);
|
|
394
|
+
try {
|
|
395
|
+
assertNotAborted(options.signal);
|
|
396
|
+
const directories = new Set(snapshot.directories);
|
|
397
|
+
for (const file of snapshot.files) {
|
|
398
|
+
const parents = file.path.split('/').slice(0, -1);
|
|
399
|
+
let walked = '';
|
|
400
|
+
for (const segment of parents) {
|
|
401
|
+
walked = walked === '' ? segment : `${walked}/${segment}`;
|
|
402
|
+
directories.add(walked);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
for (const directory of [...directories].sort()) {
|
|
406
|
+
createDirectory(path_1.default.join(stagingDir, directory));
|
|
407
|
+
}
|
|
408
|
+
for (const file of snapshot.files) {
|
|
409
|
+
assertNotAborted(options.signal);
|
|
410
|
+
writePayloadFile(path_1.default.join(stagingDir, file.path), snapshot, file);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
catch (error) {
|
|
414
|
+
(0, fs_1.rmSync)(stagingDir, { recursive: true, force: true });
|
|
415
|
+
throw error;
|
|
416
|
+
}
|
|
417
|
+
let disposed = false;
|
|
418
|
+
return {
|
|
419
|
+
skillId: snapshot.skillId,
|
|
420
|
+
version: snapshot.version,
|
|
421
|
+
stagingDir,
|
|
422
|
+
inventory: snapshot.files,
|
|
423
|
+
dispose() {
|
|
424
|
+
if (disposed)
|
|
425
|
+
return;
|
|
426
|
+
disposed = true;
|
|
427
|
+
(0, fs_1.rmSync)(stagingDir, { recursive: true, force: true });
|
|
428
|
+
},
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Remove staging directories left behind by a crashed or killed process.
|
|
433
|
+
*
|
|
434
|
+
* Only entries this module creates are removed, so pointing it at a directory
|
|
435
|
+
* that holds anything else cannot destroy that content.
|
|
436
|
+
*
|
|
437
|
+
* @returns Number of staging directories removed
|
|
438
|
+
*/
|
|
439
|
+
function cleanupSkillStagingRoot(stagingRoot) {
|
|
440
|
+
const root = path_1.default.resolve(stagingRoot);
|
|
441
|
+
if ((0, system_directories_1.isSystemDirectory)(root) || !(0, fs_1.existsSync)(root))
|
|
442
|
+
return 0;
|
|
443
|
+
let removed = 0;
|
|
444
|
+
for (const entry of (0, fs_1.readdirSync)(root)) {
|
|
445
|
+
if (!STAGING_ENTRY_PATTERN.test(entry))
|
|
446
|
+
continue;
|
|
447
|
+
(0, fs_1.rmSync)(path_1.default.join(root, entry), { recursive: true, force: true });
|
|
448
|
+
removed += 1;
|
|
449
|
+
}
|
|
450
|
+
return removed;
|
|
451
|
+
}
|