commandmate 0.14.1 → 0.16.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/.env.example +7 -0
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +418 -354
- package/.next/app-path-routes-manifest.json +42 -34
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +9 -9
- package/.next/react-loadable-manifest.json +22 -24
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +15 -0
- 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.js +1 -1
- package/.next/server/app/api/assistant/conversation/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/current-output/route.js +1 -1
- package/.next/server/app/api/assistant/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/messages/route.js +1 -1
- package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/session/route.js +1 -1
- package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/start/route.js +1 -1
- package/.next/server/app/api/assistant/start/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/terminal/route.js +1 -1
- package/.next/server/app/api/assistant/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/tools/route.js +1 -1
- package/.next/server/app/api/assistant/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/route_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.js +1 -1
- package/.next/server/app/api/external-apps/[id]/health/route.js.nft.json +1 -1
- package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/route.js +1 -1
- package/.next/server/app/api/external-apps/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/route.js +1 -1
- package/.next/server/app/api/external-apps/route.js.nft.json +1 -1
- package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/browse/route.js +7 -0
- package/.next/server/app/api/fs/browse/route.js.nft.json +1 -0
- package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/fs/recent-paths/route.js +7 -0
- package/.next/server/app/api/fs/recent-paths/route.js.nft.json +1 -0
- package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/hooks/claude-done/route.js +1 -1
- package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/subscriptions/route.js +1 -1
- package/.next/server/app/api/push/subscriptions/route.js.nft.json +1 -1
- package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/vapid/route.js +1 -1
- package/.next/server/app/api/push/vapid/route.js.nft.json +1 -1
- package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/route.js +1 -1
- package/.next/server/app/api/repositories/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/excluded/route.js +1 -1
- package/.next/server/app/api/repositories/excluded/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/route.js +1 -1
- package/.next/server/app/api/repositories/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/validate-path/route.js +1 -0
- package/.next/server/app/api/repositories/validate-path/route.js.nft.json +1 -0
- package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sidebar/group-order/route.js +2 -2
- package/.next/server/app/api/sidebar/group-order/route.js.nft.json +1 -1
- package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/[id]/route.js +1 -1
- package/.next/server/app/api/skills/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/installations/route.js +23 -0
- package/.next/server/app/api/skills/installations/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/operations/route.js +13 -0
- package/.next/server/app/api/skills/operations/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/reindex/route.js +23 -0
- package/.next/server/app/api/skills/reindex/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/route.js +1 -1
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/slash-commands/route.js +1 -1
- package/.next/server/app/api/slash-commands/route.js.nft.json +1 -1
- package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/[id]/route.js +1 -1
- package/.next/server/app/api/templates/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/route.js +1 -1
- package/.next/server/app/api/templates/route.js.nft.json +1 -1
- package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/todos/route.js +1 -1
- package/.next/server/app/api/todos/route.js.nft.json +1 -1
- package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/execution-logs/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/marp-render/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/schedules/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +18 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/start-polling/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/start-polling/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
- package/.next/server/app/chat/page.js +1 -1
- 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_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 +1 -1
- package/.next/server/app/more/page_client-reference-manifest.js +1 -1
- package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/proxy/[...path]/route.js +1 -1
- package/.next/server/app/proxy/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/repositories/page.js +2 -2
- package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/[skillId]/page.js +2 -2
- package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -1
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/installed/page.js +2 -0
- package/.next/server/app/skills/installed/page.js.nft.json +1 -0
- package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -0
- package/.next/server/app/skills/page.js +2 -2
- package/.next/server/app/skills/page.js.nft.json +1 -1
- package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page.js +1 -1
- 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_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +42 -34
- package/.next/server/chunks/1117.js +1 -1
- package/.next/server/chunks/1185.js +1 -0
- package/.next/server/chunks/1239.js +1 -0
- package/.next/server/chunks/1355.js +1 -0
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/22.js +1 -1
- package/.next/server/chunks/2328.js +1 -1
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/2710.js +2 -0
- package/.next/server/chunks/28.js +35 -0
- package/.next/server/chunks/3042.js +1 -2
- package/.next/server/chunks/3543.js +1 -1
- package/.next/server/chunks/3722.js +1 -1
- package/.next/server/chunks/3736.js +1 -1
- package/.next/server/chunks/3753.js +1 -1
- package/.next/server/chunks/3945.js +1 -1
- package/.next/server/chunks/4390.js +1 -0
- package/.next/server/chunks/4440.js +2 -0
- package/.next/server/chunks/4444.js +1 -1
- package/.next/server/chunks/4548.js +1 -0
- package/.next/server/chunks/5064.js +1 -1
- package/.next/server/chunks/5326.js +1 -1
- package/.next/server/chunks/5381.js +1 -1
- package/.next/server/chunks/5456.js +1 -1
- package/.next/server/chunks/5737.js +1 -0
- package/.next/server/chunks/5793.js +1 -0
- package/.next/server/chunks/5959.js +2 -2
- package/.next/server/chunks/6065.js +1 -1
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/646.js +2 -2
- package/.next/server/chunks/7593.js +1 -0
- package/.next/server/chunks/8356.js +1 -1
- package/.next/server/chunks/8681.js +1 -1
- package/.next/server/chunks/8807.js +66 -3
- package/.next/server/chunks/9051.js +1 -0
- package/.next/server/chunks/9123.js +1 -1
- package/.next/server/chunks/9687.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/server/src/middleware.js.map +1 -1
- package/.next/static/AKqbAyuzbFfg05qpbCI_K/_buildManifest.js +1 -0
- package/.next/static/chunks/1191-b7dfdfe86b1d31d1.js +1 -0
- package/.next/static/chunks/2751-7fabd91275b14ca3.js +1 -0
- package/.next/static/chunks/{4459.03172449db395039.js → 4459.a94b52985a76509a.js} +1 -1
- package/.next/static/chunks/{4560-04e5aebcab96bfa1.js → 4560-8ffb0bb19f2ba998.js} +1 -1
- package/.next/static/chunks/530.e31cc754677fed0f.js +1 -0
- package/.next/static/chunks/5542-b6457f305d724a6b.js +1 -0
- package/.next/static/chunks/{6488-74d2f443e43c07b7.js → 6488-c2a968ec806975c2.js} +1 -1
- package/.next/static/chunks/{7485.43871aedf3dbb980.js → 7485.442b21101fca7257.js} +1 -1
- package/.next/static/chunks/8562-6e2ab32452f4fa5b.js +1 -0
- package/.next/static/chunks/8566-a6a7c70558927410.js +1 -0
- package/.next/static/chunks/9263.5259f73f89220d64.js +1 -0
- package/.next/static/chunks/9599-d29d2f8eeaf7c249.js +1 -0
- package/.next/static/chunks/app/api/app/update/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/app/update-check/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/assistant/conversation/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/assistant/current-output/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/assistant/messages/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/assistant/session/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/assistant/start/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/assistant/terminal/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/assistant/tools/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/fs/browse/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/fs/recent-paths/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/repositories/validate-path/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/skills/installations/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/skills/operations/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/skills/reindex/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/skills/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/templates/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/todos/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/chat/page-83a2238ab453afaa.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/more/{page-082d4ae496f9a36e.js → page-1619018cac999bbc.js} +1 -1
- package/.next/static/chunks/app/proxy/[...path]/route-55e398bd20e2d7a9.js +1 -0
- package/.next/static/chunks/app/repositories/page-3c4fb889da48ce24.js +1 -0
- package/.next/static/chunks/app/skills/[skillId]/page-6008b904225ebb25.js +1 -0
- package/.next/static/chunks/app/skills/installed/page-6641f95e6a6e5f9d.js +1 -0
- package/.next/static/chunks/app/skills/page-184f8e23e31a3667.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/files/[...path]/{page-6a45f3744da50d95.js → page-6041d3c3db326317.js} +1 -1
- package/.next/static/chunks/app/worktrees/[id]/page-59a63a2c013ec1eb.js +1 -0
- package/.next/static/chunks/webpack-180bebdee221b6f4.js +1 -0
- package/.next/static/css/d3453a6876553d32.css +1 -0
- package/.next/trace +11 -11
- package/.next/types/app/api/fs/browse/route.ts +347 -0
- package/.next/types/app/api/fs/recent-paths/route.ts +347 -0
- package/.next/types/app/api/repositories/validate-path/route.ts +347 -0
- package/.next/types/app/api/skills/installations/route.ts +347 -0
- package/.next/types/app/api/skills/operations/route.ts +347 -0
- package/.next/types/app/api/skills/reindex/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.ts +347 -0
- package/.next/types/app/skills/installed/page.ts +84 -0
- package/.next/types/routes.d.ts +10 -2
- package/.next/types/validator.ts +72 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +15 -0
- package/dist/cli/commands/skill.d.ts +2 -1
- package/dist/cli/commands/skill.d.ts.map +1 -1
- package/dist/cli/commands/skill.js +136 -2
- package/dist/cli/types/api-responses.d.ts +40 -0
- package/dist/cli/types/api-responses.d.ts.map +1 -1
- package/dist/cli/types/index.d.ts +12 -0
- package/dist/cli/types/index.d.ts.map +1 -1
- package/dist/cli/utils/env-setup.d.ts +8 -0
- package/dist/cli/utils/env-setup.d.ts.map +1 -1
- package/dist/cli/utils/env-setup.js +23 -0
- package/dist/server/src/lib/db/migrations/index.js +2 -0
- package/dist/server/src/lib/db/migrations/runner.js +1 -1
- package/dist/server/src/lib/db/migrations/v48-skill-operations-audit-index.js +117 -0
- package/dist/server/src/lib/git/git-exec.js +48 -1
- package/dist/server/src/lib/selected-agents-validator.js +3 -2
- package/dist/server/src/lib/skills/compatibility-matrix.js +256 -0
- package/dist/server/src/lib/skills/compatibility.js +132 -11
- package/dist/server/src/lib/skills/operation-audit.js +85 -15
- package/dist/server/src/lib/skills/operation-journal.js +14 -1
- package/dist/server/src/types/markdown-editor.js +13 -1
- package/package.json +1 -1
- package/.next/server/chunks/1808.js +0 -1
- package/.next/server/chunks/186.js +0 -1
- package/.next/server/chunks/5226.js +0 -28
- package/.next/server/chunks/5306.js +0 -2
- package/.next/server/chunks/7013.js +0 -1
- package/.next/server/chunks/9067.js +0 -1
- package/.next/server/chunks/9192.js +0 -1
- package/.next/static/1WyelLMRgPnhvA2HmhZmm/_buildManifest.js +0 -1
- package/.next/static/chunks/1668-e703b8b55775844b.js +0 -1
- package/.next/static/chunks/2069-c55de93eb6403961.js +0 -1
- package/.next/static/chunks/3418-7e47651340d940b0.js +0 -1
- package/.next/static/chunks/4027-000402aee1e3520b.js +0 -1
- package/.next/static/chunks/530.e377b0f1a7a89620.js +0 -1
- package/.next/static/chunks/6007-de36119357dcd418.js +0 -1
- package/.next/static/chunks/6497-ea466b22a6c1ae89.js +0 -1
- package/.next/static/chunks/8361.4bf062be2d2962f4.js +0 -1
- package/.next/static/chunks/8566-9da32e46c9d3fd54.js +0 -1
- package/.next/static/chunks/934-a37509667baa86ee.js +0 -1
- package/.next/static/chunks/app/api/app/update/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/app/update-check/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/assistant/conversation/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/assistant/current-output/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/assistant/messages/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/assistant/session/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/assistant/start/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/assistant/terminal/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/assistant/tools/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/skills/[id]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/skills/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/templates/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/todos/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/chat/page-623f5cb9040de639.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-56dad0523d3c4a92.js +0 -1
- package/.next/static/chunks/app/repositories/page-70d4b997492884b8.js +0 -1
- package/.next/static/chunks/app/skills/[skillId]/page-68ed5e9186efe56d.js +0 -1
- package/.next/static/chunks/app/skills/page-46242c428ee8bccf.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-983a80ece6289026.js +0 -1
- package/.next/static/chunks/webpack-e655374fed175528.js +0 -1
- package/.next/static/css/b4bdb1f3457fe9a7.css +0 -1
- /package/.next/static/{1WyelLMRgPnhvA2HmhZmm → AKqbAyuzbFfg05qpbCI_K}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";exports.id=2710,exports.ids=[2710],exports.modules={32520:(a,b,c)=>{c.d(b,{Bi:()=>i,F5:()=>m,Hg:()=>p,KX:()=>j,Oj:()=>w,SA:()=>o,WS:()=>k,X7:()=>s,gT:()=>n,h6:()=>r,iC:()=>v,oM:()=>t,rV:()=>l,uM:()=>q,xo:()=>u});var d=c(75359);let e="Kewton/commandmate-skills",f=[{host:"raw.githubusercontent.com",pathPrefix:`/${e}/`}],g=[{host:"github.com",pathPrefix:`/${e}/releases/download/`}],h=[...g,{host:"objects.githubusercontent.com"},{host:"release-assets.githubusercontent.com"}],i={catalog:{kind:"catalog",entryHosts:f,redirectHosts:f,accept:"application/json",contentTypes:["application/json","text/plain"],maxBytes:4194304},artifact:{kind:"artifact",entryHosts:g,redirectHosts:h,accept:d.gJ,contentTypes:[d.gJ,"application/octet-stream"],maxBytes:d.a6}},j=5,k=1e4,l=12e4,m=["authorization","cookie","proxy-authorization"],n="CommandMate",o="skill-snapshots",p=448,q=256,r=18e5,s=0x10000000,t=64,u=16,v=/^[0-9a-f]{32}$/,w=6e4},33095:(a,b,c)=>{c.d(b,{Hg:()=>s,M$:()=>u,QL:()=>n,Uf:()=>v,bh:()=>t,cu:()=>p,tP:()=>y,yj:()=>o});var d=c(55511),e=c(29021),f=c(33873),g=c.n(f),h=c(46065),i=c(96210),j=c(93356),k=c(55926);let l={NEW_FILE:"SKILL_DIFF_NEW_FILE",CONTENT_IDENTICAL:"SKILL_DIFF_CONTENT_IDENTICAL",MANAGED_UPDATE:"SKILL_DIFF_MANAGED_UPDATE",LOCAL_MODIFICATION:"SKILL_DIFF_LOCAL_MODIFICATION",UNMANAGED_SKILL:"SKILL_DIFF_UNMANAGED_SKILL",RECEIPT_ORPHAN:"SKILL_DIFF_RECEIPT_ORPHAN",NOT_A_REGULAR_FILE:"SKILL_DIFF_NOT_A_REGULAR_FILE"},m={DETACHED_HEAD:"SKILL_PREVIEW_DETACHED_HEAD",UNBORN_HEAD:"SKILL_PREVIEW_UNBORN_HEAD",HEAD_UNRESOLVED:"SKILL_PREVIEW_HEAD_UNRESOLVED",WORKING_TREE_DIRTY:"SKILL_PREVIEW_WORKING_TREE_DIRTY",PATH_GIT_IGNORED:"SKILL_PREVIEW_PATH_GIT_IGNORED",DIFF_TRUNCATED:"SKILL_PREVIEW_DIFF_TRUNCATED",BINARY_CONTENT:"SKILL_PREVIEW_BINARY_CONTENT",LINE_ENDING_CRLF:"SKILL_PREVIEW_LINE_ENDING_CRLF",TREE_SCAN_TRUNCATED:"SKILL_PREVIEW_TREE_SCAN_TRUNCATED"};function n(a,b){return`${a}/${b}`}function o(a,b,c){if(!i.X0.test(c)||c.length>i.cj)throw Error("Skill ID is not a valid install root segment");let d=g().resolve(a),e=g().resolve(d,b,c),f=g().relative(d,e);if(f!==g().join(b,c)||f.startsWith("..")||g().isAbsolute(f))throw Error("Skill install root escapes the worktree");return e}function p(a,b){return o(a,i.Co,b)}function q(a){let b=Math.min(a.length,8e3);for(let c=0;c<b;c+=1)if(0===a[c])return!0;return!1}function r(a){let b=Buffer.from(a).toString("utf-8");if(0===b.length)return[];let c=b.split("\n");return""===c[c.length-1]&&c.pop(),c}function s(a){let b=[...a].sort((a,b)=>a.path<b.path?-1:+(a.path>b.path)).map(a=>`${a.path}\0${a.sha256}\0${a.executable?"1":"0"}`).join("\n");return(0,d.createHash)("sha256").update(`skill-tree-v1
|
|
2
|
+
${b}`).digest("hex")}function t(a){let b;try{b=(0,e.lstatSync)(a)}catch{return{present:!1,files:[],irregularPaths:[],truncated:!1}}if(!b.isDirectory())return{present:!0,files:[],irregularPaths:[""],truncated:!1};let c=[],d=[],f=!1,h=0,k=(a,b,l)=>{let m;if(!f){if(l>16){f=!0;return}try{m=(0,e.readdirSync)(a,{withFileTypes:!0})}catch{f=!0;return}for(let n of m.sort((a,b)=>a.name<b.name?-1:1)){let m,o;if(f)return;if((h+=1)>2e3){f=!0;return}let p=b?`${b}/${n.name}`:n.name,q=g().join(a,n.name);if(n.isDirectory()){k(q,p,l+1);continue}if(!n.isFile()){d.push(p);continue}try{m=(0,e.lstatSync)(q)}catch{d.push(p);continue}if(!m.isFile()||m.size>i.em){d.push(p);continue}try{o=(0,e.readFileSync)(q)}catch{d.push(p);continue}c.push({path:p,sha256:(0,j.Q_)(o),size:o.byteLength,executable:(73&m.mode)!=0,bytes:o})}}};return k(a,"",0),{present:!0,files:c,irregularPaths:d,truncated:f}}async function u(a){let[b,c,d]=await Promise.all([(0,h.Bc)(["symbolic-ref","--quiet","--short","HEAD"],a),(0,h.Bc)(["rev-parse","HEAD"],a),(0,h.Bc)(["status","--porcelain"],a)]),e=c&&/^[0-9a-f]{40}$/.test(c)?c:null;return{headState:b&&e?"attached":!b&&e?"detached":b&&!e?"unborn":"unknown",branch:b&&b.length>0?b:null,headCommit:e,dirty:null!==d&&d.length>0}}async function v(a,b){if(0===b.length)return new Set;try{let{stdout:c}=await (0,h.mf)("git",["check-ignore","-z","--",...b],{cwd:a,timeout:3e3});return w(c)}catch(b){let a=b.stdout;return"string"==typeof a?w(a):new Set}}function w(a){return new Set(a.split("\0").filter(a=>a.length>0))}function x(){return{text:null,truncated:!1,additions:0,deletions:0}}function y(a){let b=n(a.installRootPrefix??i.Co,a.skillId),c=new Map(a.plannedFiles.map(a=>[a.relativePath,a])),d=new Map(a.existing.files.map(a=>[a.path,a])),e=[...new Set([...c.keys(),...d.keys(),...a.receiptFiles?[...a.receiptFiles.keys()]:[]])].filter(a=>!(0,k.hm)(`${b}/${a}`)).sort(),f={remainingBytes:524288},g=[],h={added:0,modified:0,unchanged:0,conflicted:0,unmanaged:0,binaryFiles:0,truncatedFiles:0,diffBytes:0},j=!1;for(let i of e){let e=c.get(i)??null,k=d.get(i)??null,m=a.receiptFiles?.get(i)??null,{change:n,reason:o}=k?m?k.sha256!==m.sha256||k.executable!==m.executable?{change:"conflict",reason:l.LOCAL_MODIFICATION}:e?e.sha256===k.sha256&&e.executable===k.executable?{change:"unchanged",reason:l.CONTENT_IDENTICAL}:{change:"modify",reason:l.MANAGED_UPDATE}:{change:"unmanaged",reason:l.RECEIPT_ORPHAN}:{change:"unmanaged",reason:l.UNMANAGED_SKILL}:e?{change:"add",reason:l.NEW_FILE}:{change:"unchanged",reason:l.RECEIPT_ORPHAN},p=`${b}/${i}`,s=e?.bytes??k?.bytes??null,t=!!e&&q(e.bytes)||!!k&&q(k.bytes),u=s?function(a){let b=0,c=0;for(let d=0;d<a.length;d+=1)10===a[d]&&(d>0&&13===a[d-1]?b+=1:c+=1);return b>0&&c>0?"mixed":b>0?"crlf":c>0?"lf":"none"}(s):"none";e&&("crlf"===u||"mixed"===u)&&(j=!0);let v=t||"unchanged"===n?x():function(a,b,c){if(null===a&&null===b)return x();let d=a?r(a):[],e=b?r(b):[],f=0,g=Math.min(d.length,e.length);for(;f<g&&d[f]===e[f];)f+=1;let h=0;for(;h<g-f&&d[d.length-1-h]===e[e.length-1-h];)h+=1;let i=d.slice(f,d.length-h),j=e.slice(f,e.length-h);if(0===i.length&&0===j.length)return x();let k=Math.max(0,f-3),l=d.slice(k,f),m=d.slice(d.length-h,Math.min(d.length,d.length-h+3)),n=l.length+i.length+m.length,o=l.length+j.length+m.length,p=0===n?0:k+1,q=0===o?0:k+1,s=[`@@ -${p},${n} +${q},${o} @@`],t=!1,u=s[0].length+1,v=(a,b)=>{if(s.length>=401)return!1;let d=`${a}${b}`,e=d.length+1;return!(u+e>65536)&&!(e>c.remainingBytes-u)&&(s.push(d),u+=e,!0)};for(let a of l)if(!v(" ",a)){t=!0;break}if(!t){for(let a of i)if(!v("-",a)){t=!0;break}}if(!t){for(let a of j)if(!v("+",a)){t=!0;break}}if(!t){for(let a of m)if(!v(" ",a)){t=!0;break}}t&&s.push("… diff truncated");let w=s.join("\n");return c.remainingBytes=Math.max(0,c.remainingBytes-w.length),{text:w,truncated:t,additions:j.length,deletions:i.length}}(k?.bytes??null,e?.bytes??null,f);g.push({path:p,change:n,reason:o,generated:e?.generated??!1,sha256:e?.sha256??null,size:e?.size??null,executable:e?.executable??k?.executable??!1,currentSha256:k?.sha256??null,currentSize:k?.size??null,binary:t,lineEnding:u,gitIgnored:a.gitIgnoredPaths.has(p),diff:v.text,diffTruncated:v.truncated,additions:v.additions,deletions:v.deletions}),"add"===n?h.added+=1:"modify"===n?h.modified+=1:"unchanged"===n?h.unchanged+=1:"conflict"===n?h.conflicted+=1:h.unmanaged+=1,t&&(h.binaryFiles+=1),v.truncated&&(h.truncatedFiles+=1),h.diffBytes+=v.text?.length??0}for(let c of a.existing.irregularPaths){let d=c?`${b}/${c}`:b;g.push({path:d,change:"conflict",reason:l.NOT_A_REGULAR_FILE,generated:!1,sha256:null,size:null,executable:!1,currentSha256:null,currentSize:null,binary:!1,lineEnding:"none",gitIgnored:a.gitIgnoredPaths.has(d),diff:null,diffTruncated:!1,additions:0,deletions:0}),h.conflicted+=1}let o=function(a,b,c,d){let e=[];return"detached"===a.git.headState&&e.push(m.DETACHED_HEAD),"unborn"===a.git.headState&&e.push(m.UNBORN_HEAD),"unknown"===a.git.headState&&e.push(m.HEAD_UNRESOLVED),a.git.dirty&&e.push(m.WORKING_TREE_DIRTY),b.some(a=>a.gitIgnored)&&e.push(m.PATH_GIT_IGNORED),c.truncatedFiles>0&&e.push(m.DIFF_TRUNCATED),c.binaryFiles>0&&e.push(m.BINARY_CONTENT),d&&e.push(m.LINE_ENDING_CRLF),a.existing.truncated&&e.push(m.TREE_SCAN_TRUNCATED),e}(a,g,h,j),p=a.plannedFiles.map(a=>({path:a.relativePath,sha256:a.sha256,executable:a.executable}));for(let b of a.existing.files)c.has(b.path)||p.push({path:b.path,sha256:b.sha256,executable:b.executable});return{installRoot:b,entries:g.sort((a,b)=>a.path<b.path?-1:+(a.path>b.path)),stats:h,warnings:o,currentTreeHash:s(a.existing.files),plannedTreeHash:s(p)}}},52710:(a,b,c)=>{c.d(b,{ER:()=>m,Jg:()=>v,Pw:()=>q,Q6:()=>z,Rq:()=>p,Y9:()=>x,c$:()=>j,gk:()=>y,nf:()=>o,q$:()=>r,sK:()=>k,vg:()=>l,zi:()=>i});var d=c(55511),e=c(13075),f=c(96210),g=c(89936),h=c(33095);let i=".commandmate-receipt.json",j=6e5,k=32,l=/^[0-9a-f]{48}$/,m={NOT_FOUND:"SKILL_PLAN_NOT_FOUND",EXPIRED:"SKILL_PLAN_EXPIRED",CONSUMED:"SKILL_PLAN_CONSUMED",STALE:"SKILL_PLAN_STALE",BINDING_MISMATCH:"SKILL_PLAN_BINDING_MISMATCH",NOT_INSTALLABLE:"SKILL_PLAN_NOT_INSTALLABLE",RISK_NOT_ACKNOWLEDGED:"SKILL_PLAN_RISK_NOT_ACKNOWLEDGED",TARGET_UNSAFE:"SKILL_PLAN_TARGET_UNSAFE"},n={[m.NOT_FOUND]:404,[m.EXPIRED]:410,[m.CONSUMED]:409,[m.STALE]:409,[m.BINDING_MISMATCH]:409,[m.NOT_INSTALLABLE]:409,[m.RISK_NOT_ACKNOWLEDGED]:409,[m.TARGET_UNSAFE]:400};class o extends Error{constructor(a,b){super(`Skill install plan rejected: ${a}`),this.code=a,this.detail=b,this.name="SkillPlanError"}get status(){return n[this.code]}}function p(a){return a instanceof o}function q(a){return a.install_roots&&a.install_roots.length>0?[...a.install_roots]:[a.install_root]}function r(a){try{let b=JSON.parse(Buffer.from(a).toString("utf-8"));if(!b||"object"!=typeof b||"string"!=typeof b.skill_id||!Array.isArray(b.files))return null;return b}catch{return null}}let s=globalThis.__skillInstallPlans??(globalThis.__skillInstallPlans={records:new Map});function t(a){s.records.delete(a.token),null===a.consumedAt&&(0,g.TO)(a.binding.snapshotId)}function u(a,b){let c=0;for(let d of[...s.records.values()])d.token!==b&&a>=d.expiresAt&&(t(d),c+=1);return c}function v(a={}){return u(a.now??Date.now())}function w(a,b){if(!l.test(a))throw new o(m.NOT_FOUND);let c=s.records.get(a);if(u(b,a),!c)throw new o(m.NOT_FOUND);let e=Buffer.from(a,"utf-8"),f=Buffer.from(c.token,"utf-8");if(e.length!==f.length||!(0,d.timingSafeEqual)(e,f))throw new o(m.NOT_FOUND);if(b>=c.expiresAt)throw t(c),new o(m.EXPIRED);if(null!==c.consumedAt)throw new o(m.CONSUMED);return c}function x(a,b={}){return w(a,b.now??Date.now())}function y(a,b,c,d={}){let e=d.now??Date.now(),f=w(a,e),{binding:g}=f;if(g.actor.type!==b.actor.type||g.actor.id!==b.actor.id||g.worktreeId!==b.worktreeId||g.skillId!==b.skillId||g.version!==b.version)throw new o(m.BINDING_MISMATCH);if(!f.dto.installable)throw new o(m.NOT_INSTALLABLE);if(f.dto.requiresRiskAcknowledgement&&!b.riskAcknowledged)throw new o(m.RISK_NOT_ACKNOWLEDGED);let{binding:h}=f;if(c.branch!==h.branch||c.headCommit!==h.headCommit||c.currentTreeHash!==h.currentTreeHash)throw new o(m.STALE);return f.consumedAt=e,f}async function z(a){let b,c=a.now??Date.now(),{snapshot:g}=a,l=a.targets&&a.targets.length>0?[...a.targets]:[f.Co];try{b=l.map(b=>({prefix:b,abs:(0,h.yj)(a.worktree.path,b,g.skillId),rel:(0,h.QL)(b,g.skillId)}))}catch{throw new o(m.TARGET_UNSAFE)}let n=function(a){let{snapshot:b,version:c}=a,d=b.files.map(a=>({path:a.path,sha256:a.sha256,size:a.size,executable:a.executable})),e=c.compatibility.agents.map(a=>({agent:a.agent,support:a.support,evidence:a.evidence})),g=(a.rootPrefixes&&a.rootPrefixes.length>0?[...a.rootPrefixes]:[f.Co]).map(a=>(0,h.QL)(a,b.skillId));return{schema_version:f.jq,skill_id:b.skillId,version:b.version,install_root:g[0],...g.length>1?{install_roots:g}:{},source:{repository:c.source.repository,ref:c.source.ref,commit:c.source.commit},artifact:{asset_name:c.artifact.asset_name,sha256:c.artifact.sha256,size:c.artifact.size,format:c.artifact.format},files:d,declared_risk:b.declaredRisk,computed_risk:b.computedRisk,effective_risk:b.effectiveRisk,declared_permissions:[...b.inspection.declared_permissions],agent_compatibility:e}}({snapshot:g,version:a.version,rootPrefixes:l}),p=Buffer.from((0,e.en)(n),"utf-8"),q=(0,d.createHash)("sha256").update(p).digest("hex"),v=[...g.files.map(a=>({relativePath:a.path,sha256:a.sha256,size:a.size,executable:a.executable,bytes:g.readFile(a.path),generated:!1})),{relativePath:i,sha256:q,size:p.byteLength,executable:!1,bytes:p,generated:!0}],w=await (0,h.M$)(a.worktree.path),x=await (0,h.Uf)(a.worktree.path,b.flatMap(a=>v.map(b=>`${a.rel}/${b.relativePath}`))),y=b.map(b=>{let c=(0,h.bh)(b.abs),d=function(a){let b=a.files.find(a=>a.path===i);if(!b)return null;let c=r(b.bytes);return c?{receipt:c,digest:b.sha256}:null}(c),e=d?new Map([...d.receipt.files.map(a=>[a.path,{sha256:a.sha256,executable:a.executable}]),[i,{sha256:d.digest,executable:!1}]]):null,f=(0,h.tP)({skillId:g.skillId,worktreePath:a.worktree.path,installRootPrefix:b.prefix,plannedFiles:v,existing:c,receiptFiles:e,git:w,gitIgnoredPaths:x});return{root:b,installedReceipt:d,preview:f}}),z=y[0],A=z.root.rel,B=z.installedReceipt,C=b.map(a=>a.rel),D=y.flatMap(a=>[...a.preview.entries]).sort((a,b)=>a.path<b.path?-1:+(a.path>b.path)),E=y.reduce((a,b)=>({added:a.added+b.preview.stats.added,modified:a.modified+b.preview.stats.modified,unchanged:a.unchanged+b.preview.stats.unchanged,conflicted:a.conflicted+b.preview.stats.conflicted,unmanaged:a.unmanaged+b.preview.stats.unmanaged,binaryFiles:a.binaryFiles+b.preview.stats.binaryFiles,truncatedFiles:a.truncatedFiles+b.preview.stats.truncatedFiles,diffBytes:a.diffBytes+b.preview.stats.diffBytes}),{added:0,modified:0,unchanged:0,conflicted:0,unmanaged:0,binaryFiles:0,truncatedFiles:0,diffBytes:0}),F=[...new Set(y.flatMap(a=>[...a.preview.warnings]))],G=D.filter(a=>"conflict"===a.change||"unmanaged"===a.change).map(a=>({code:a.reason,path:a.path}));"compatible"!==a.compatibility.status&&G.push({code:a.compatibility.messageKey,path:null});let H="high"===g.effectiveRisk,I=!0===a.riskAcknowledged,J=(0,d.randomBytes)(24).toString("hex"),K=c+j,L={actor:a.actor,operation:"install",worktreeId:a.worktree.id,skillId:g.skillId,version:g.version,artifactSha256:a.version.artifact.sha256,snapshotId:a.snapshotId,branch:w.branch,headCommit:w.headCommit,currentTreeHash:z.preview.currentTreeHash,plannedTreeHash:z.preview.plannedTreeHash,receiptDigest:q,riskAcknowledged:I},M={token:J,expiresAt:new Date(K).toISOString().replace(/\.\d{3}Z$/,"Z"),installable:0===G.length,requiresRiskAcknowledgement:H,riskAcknowledged:I,riskAcknowledgementMessageKey:H?"skills.plan.highRiskAcknowledgement":null,blockers:G,warnings:F,target:{worktreeId:a.worktree.id,worktreeName:a.worktree.name,repositoryName:a.worktree.repositoryName,syncedBranch:a.worktree.syncedBranch,branch:w.branch,headState:w.headState,headCommit:w.headCommit,workingTreeDirty:w.dirty,installRoot:z.preview.installRoot,installRoots:C,currentTreeHash:z.preview.currentTreeHash,plannedTreeHash:z.preview.plannedTreeHash,existingInstall:B?{version:B.receipt.version,receiptDigest:B.digest}:null},skill:function(a){let{manifest:b}=a.snapshot;return{id:a.snapshot.skillId,name:b.name,version:a.snapshot.version,summary:b.summary,description:b.description,capabilities:[...b.capabilities],expectedOutcomes:[...b.expected_outcomes],provider:{...b.provider},license:b.license,homepage:b.homepage??null,declaredPermissions:[...a.snapshot.inspection.declared_permissions],requirements:{commands:b.requirements.commands.map(a=>({name:a.name,versionRange:a.version_range??null})),networkHosts:[...b.requirements.network_hosts]},declaredRisk:a.snapshot.declaredRisk,computedRisk:a.snapshot.computedRisk,effectiveRisk:a.snapshot.effectiveRisk,riskRationale:b.risk_rationale,executablePaths:[...a.snapshot.inspection.executable_paths],scriptPaths:[...a.snapshot.inspection.script_paths],compatibility:{commandmate:a.compatibility,agents:a.version.compatibility.agents.map(a=>({...a}))},source:{repository:a.version.source.repository,ref:a.version.source.ref,commit:a.version.source.commit},artifact:{assetName:a.version.artifact.asset_name,sha256:a.version.artifact.sha256,size:a.version.artifact.size,format:a.version.artifact.format}}}(a),receipt:{path:`${A}/${i}`,sha256:q,size:p.byteLength},files:D,stats:E},N={token:J,binding:L,bindingHash:(0,d.createHash)("sha256").update(function a(b){if(null===b||"object"!=typeof b)return JSON.stringify(b)??"null";if(Array.isArray(b))return`[${b.map(a).join(",")}]`;let c=Object.entries(b).filter(([,a])=>void 0!==a).sort(([a],[b])=>a<b?-1:+(a>b));return`{${c.map(([b,c])=>`${JSON.stringify(b)}:${a(c)}`).join(",")}}`}(L)).digest("hex"),createdAt:c,expiresAt:K,consumedAt:null,worktreePath:a.worktree.path,rootPrefixes:l,receipt:n,receiptBytes:p,dto:M};for(u(c);s.records.size>=k;){let a=[...s.records.values()].sort((a,b)=>a.createdAt-b.createdAt)[0];if(!a)break;t(a)}return s.records.set(J,N),N}},55926:(a,b,c)=>{c.d(b,{Pq:()=>k,V8:()=>j,dI:()=>r,f$:()=>p,hm:()=>o,m_:()=>l,of:()=>q,vg:()=>i,wr:()=>m});var d=c(29021),e=c(33873),f=c(55511),g=c(96210),h=c(48870);let i="locks",j="journal",k=384;function l(a,b={}){let c=(0,e.join)(function(a={}){return a.root??(0,e.join)((0,h.GQ)(),"skills")}(b),a);return(0,d.mkdirSync)(c,{recursive:!0,mode:448}),(0,d.chmodSync)(c,448),c}function m(a,b=g.Co){return(0,e.join)(a,b,g.B3)}let n=g.y2.map(a=>`${a}/${g.B3}`);function o(a){let b=a.replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"");return n.some(a=>b===a||b.startsWith(`${a}/`))}function p(a){let b=a;return(b=(b=(b=(b=(b=(b=(b=(b=b.replace(/https?:\/\/\S+/gi,a=>{try{let b=new URL(a);return`${b.protocol}//${b.host}${b.pathname}`}catch{return"[url]"}})).replace(/\b(?:Bearer|Basic)\s+[A-Za-z0-9._~+/=-]+/gi,"[redacted]")).replace(/\bgh[pousr]_[A-Za-z0-9]{16,}\b/g,"[redacted]")).replace(/\bgithub_pat_[A-Za-z0-9_]{16,}\b/g,"[redacted]")).replace(/\bxox[baprs]-[A-Za-z0-9-]{10,}\b/g,"[redacted]")).replace(/\b(token|secret|password|api[_-]?key|authorization)\s*[=:]\s*\S+/gi,"$1=[redacted]")).replace(/(^|[\s"'(\[<])(\/[A-Za-z0-9._@+-]+){2,}\/?/g,"$1[path]")).replace(/(^|[\s"'(\[<])[A-Za-z]:\\[^\s"'\])>]*/g,"$1[path]")).length>500?`${b.slice(0,500)}…`:b}function q(a,b){let c=`${a}.tmp-${(0,f.randomBytes)(8).toString("hex")}`;(0,d.writeFileSync)(c,JSON.stringify(b),{mode:k}),(0,d.chmodSync)(c,k);try{(0,d.renameSync)(c,a)}catch(a){try{(0,d.unlinkSync)(c)}catch{}throw a}}function r(a){try{return JSON.parse((0,d.readFileSync)(a,"utf-8"))}catch{return null}}},75359:(a,b,c)=>{c.d(b,{Z4:()=>d.Z4,wD:()=>d.wD,x2:()=>d.x2,gJ:()=>d.gJ,jn:()=>d.jn,a6:()=>d.a6,xP:()=>d.xP,em:()=>d.em,KH:()=>d.KH,Wr:()=>d.Wr,WL:()=>d.WL,l9:()=>d.l9,MD:()=>f.MD,vy:()=>f.vy,BO:()=>e.BO,qZ:()=>f.qZ,Yz:()=>f.Yz,EU:()=>f.EU,bX:()=>f.bX,r5:()=>f.r5});var d=c(96210);c(55432);var e=c(36931),f=c(13075),g=c(15194);d.jq,d.q3,[...g.XH],[...d.h3],d.G0,d.AH.source,d.mg.source,d.Z4.source,d.x2.source,d.mt.length,[...d.mt],[...d.wI],d.S$,d.jq,d.X0.source,d.cj,d.q3,e.l2.source,d.BQ,d.t9,d.yV,d.$K,d.yV,d.$K,d.DA.source,d.Ue,d.UN,d.SU,d._Z,d.PB.source,d.gI,d.xP,d.em,[...d.Hx],d.jq,d.Gm,d.X0.source,d.cj,d.q3,d.BQ,d.DA.source,d.Ue,d.UN,e.l2.source,d.Xk,e.l2.source,d.b,d.qu.source,d.a6,d.gJ,d.jn,d.jq,d.X0.source,d.cj,e.l2.source,d.y2.length,d.a6,d.jn,d.xP,d.em},89936:(a,b,c)=>{c.d(b,{Jk:()=>z,LH:()=>y,Oi:()=>x,TO:()=>w,lw:()=>n,nW:()=>p,yn:()=>v});var d=c(55511),e=c(29021),f=c(33873),g=c.n(f),h=c(48870),i=c(32520),j=c(7956),k=c(75359),l=c(93356);let m=globalThis.__skillSnapshotStore??(globalThis.__skillSnapshotStore={rootDir:null,records:new Map,totalBytes:0});function n(a={}){let b=g().resolve(a.rootDir??g().join((0,h.WI)(),"data",i.SA));if((0,j.fW)(b))throw new l.q2(l.Fk.STORE_IO,{reason:"system-directory"});if(m.rootDir===b)return b;try{(0,e.mkdirSync)(b,{recursive:!0,mode:i.Hg}),(0,e.chmodSync)(b,i.Hg)}catch{throw new l.q2(l.Fk.STORE_IO,{reason:"mkdir"})}return m.rootDir=b,m.records.clear(),m.totalBytes=0,q(),b}function o(){if(!m.rootDir)throw new l.q2(l.Fk.STORE_UNINITIALIZED);return m.rootDir}function p(){return null!==m.rootDir}function q(){let a,b=o(),c=new Set([...m.records.values()].map(a=>a.filename));try{a=(0,e.readdirSync)(b)}catch{throw new l.q2(l.Fk.STORE_IO,{reason:"readdir"})}for(let d of a)c.has(d)||(0,e.rmSync)(g().join(b,d),{force:!0,recursive:!0})}function r(a){return g().join(o(),a.filename)}function s(a){(0,e.rmSync)(r(a),{force:!0}),m.records.delete(a.snapshotId),m.totalBytes-=a.size}function t(a){if(o(),!i.iC.test(a))throw new l.q2(l.Fk.SNAPSHOT_NOT_FOUND);let b=m.records.get(a);if(!b)throw new l.q2(l.Fk.SNAPSHOT_NOT_FOUND);if(0===b.refCount&&Date.now()>=b.expiresAt)throw s(b),new l.q2(l.Fk.SNAPSHOT_EXPIRED);return b}function u(a){return{snapshotId:a.snapshotId,skillId:a.skillId,version:a.version,commit:a.commit,sha256:a.sha256,size:a.size,expiresAt:a.expiresAt}}function v(a){let b=o(),c=Date.now(),f=a.bytes.byteLength;if(f<=0||f>k.a6)throw new l.q2(l.Fk.SIZE_LIMIT_EXCEEDED,{limit:k.a6});if(!(0,l.U2)(a.sha256,(0,l.Q_)(a.bytes)))throw new l.q2(l.Fk.CHECKSUM_MISMATCH);for(let b of m.records.values())if(b.sha256===a.sha256&&(0,e.existsSync)(r(b)))return b.refCount+=1,b.lastAccessedAt=c,b.expiresAt=c+i.h6,u(b);!function(a,b){let c=()=>m.totalBytes+a<=i.X7&&m.records.size<i.oM;if(!c()){for(let a of[...m.records.values()].filter(a=>0===a.refCount).sort((a,c)=>{let d=b>=a.expiresAt?0:1,e=b>=c.expiresAt?0:1;return d!==e?d-e:a.lastAccessedAt-c.lastAccessedAt})){if(c())return;s(a)}if(!c())throw new l.q2(l.Fk.QUOTA_EXCEEDED,{requested:a,limit:i.X7})}}(f,c);let h=(0,d.randomBytes)(i.xo).toString("hex"),j=`${h}.artifact`,n=g().join(b,j),p=`${n}.tmp`;try{(0,e.writeFileSync)(p,a.bytes,{mode:384}),(0,e.chmodSync)(p,i.uM),(0,e.renameSync)(p,n)}catch{throw(0,e.rmSync)(p,{force:!0}),new l.q2(l.Fk.STORE_IO,{reason:"write"})}let q={snapshotId:h,skillId:a.skillId,version:a.version,commit:a.commit,sha256:a.sha256,size:f,expiresAt:c+i.h6,refCount:1,lastAccessedAt:c,filename:j};return m.records.set(h,q),m.totalBytes+=f,u(q)}function w(a){let b=m.records.get(a);b&&(b.refCount>0&&(b.refCount-=1),0===b.refCount&&(b.lastAccessedAt=Date.now()))}function x(a){return u(t(a))}function y(a){let b=t(a);try{let a=(0,e.readFileSync)(r(b));return b.lastAccessedAt=Date.now(),a}catch{throw new l.q2(l.Fk.STORE_IO,{reason:"read"})}}function z(a={}){o();let b=a.now??Date.now(),c=0;for(let a of[...m.records.values()])0===a.refCount&&b>=a.expiresAt&&(s(a),c+=1);return q(),c}},93356:(a,b,c)=>{c.d(b,{Fk:()=>f,Ld:()=>o,Q_:()=>l,U2:()=>m,eG:()=>j,i1:()=>n,of:()=>k,q2:()=>i});var d=c(55511),e=c(75359);let f={URL_INVALID:"SKILL_FETCH_URL_INVALID",SOURCE_NOT_ALLOWED:"SKILL_FETCH_SOURCE_NOT_ALLOWED",REDIRECT_INVALID:"SKILL_FETCH_REDIRECT_INVALID",REDIRECT_LIMIT_EXCEEDED:"SKILL_FETCH_REDIRECT_LIMIT_EXCEEDED",HTTP_STATUS:"SKILL_FETCH_HTTP_STATUS",CONTENT_TYPE_INVALID:"SKILL_FETCH_CONTENT_TYPE_INVALID",BODY_MISSING:"SKILL_FETCH_BODY_MISSING",SIZE_LIMIT_EXCEEDED:"SKILL_FETCH_SIZE_LIMIT_EXCEEDED",SIZE_MISMATCH:"SKILL_FETCH_SIZE_MISMATCH",CHECKSUM_MISMATCH:"SKILL_FETCH_CHECKSUM_MISMATCH",BINDING_INVALID:"SKILL_FETCH_BINDING_INVALID",TIMEOUT:"SKILL_FETCH_TIMEOUT",ABORTED:"SKILL_FETCH_ABORTED",NETWORK:"SKILL_FETCH_NETWORK",SNAPSHOT_NOT_FOUND:"SKILL_SNAPSHOT_NOT_FOUND",SNAPSHOT_EXPIRED:"SKILL_SNAPSHOT_EXPIRED",QUOTA_EXCEEDED:"SKILL_SNAPSHOT_QUOTA_EXCEEDED",STORE_IO:"SKILL_SNAPSHOT_STORE_IO",STORE_UNINITIALIZED:"SKILL_SNAPSHOT_STORE_UNINITIALIZED"},g=new Set([f.TIMEOUT,f.NETWORK,f.HTTP_STATUS,f.STORE_IO]),h={[f.URL_INVALID]:"Skill source URL is not a usable HTTPS URL",[f.SOURCE_NOT_ALLOWED]:"Skill source is not on the official allowlist",[f.REDIRECT_INVALID]:"Skill source redirect was malformed",[f.REDIRECT_LIMIT_EXCEEDED]:"Skill source exceeded the redirect limit",[f.HTTP_STATUS]:"Skill source responded with an error status",[f.CONTENT_TYPE_INVALID]:"Skill source returned an unexpected media type",[f.BODY_MISSING]:"Skill source response had no body",[f.SIZE_LIMIT_EXCEEDED]:"Skill source response exceeded the size limit",[f.SIZE_MISMATCH]:"Skill artifact size did not match the catalog",[f.CHECKSUM_MISMATCH]:"Skill artifact checksum did not match the catalog",[f.BINDING_INVALID]:"Skill catalog version is not bound to an immutable source",[f.TIMEOUT]:"Skill source request timed out",[f.ABORTED]:"Skill source request was aborted",[f.NETWORK]:"Skill source could not be reached",[f.SNAPSHOT_NOT_FOUND]:"Skill snapshot is unknown or already released",[f.SNAPSHOT_EXPIRED]:"Skill snapshot has expired",[f.QUOTA_EXCEEDED]:"Skill snapshot store quota exceeded",[f.STORE_IO]:"Skill snapshot store could not be accessed",[f.STORE_UNINITIALIZED]:"Skill snapshot store is not initialized"};class i extends Error{constructor(a,b){super(h[a]),this.name="SkillFetchError",this.code=a,this.retryable=g.has(a),b&&(this.detail=b)}}function j(a){return a instanceof i}function k(){let a=(0,d.createHash)("sha256");return{update(b){a.update(b)},hex:()=>a.digest("hex")}}function l(a){return(0,d.createHash)("sha256").update(a).digest("hex")}function m(a,b){return!!e.x2.test(a)&&!!e.x2.test(b)&&(0,d.timingSafeEqual)(Buffer.from(a,"hex"),Buffer.from(b,"hex"))}function n(a,b){let c=a=>{throw new i(f.BINDING_INVALID,{field:a})};(0,e.BO)(b.version)||c("version"),e.Z4.test(b.source.commit)||c("source.commit"),b.artifact.asset_name!==(0,e.l9)(a,b.version)&&c("artifact.asset_name"),b.artifact.format!==e.jn&&c("artifact.format"),b.artifact.content_type!==e.gJ&&c("artifact.content_type"),e.x2.test(b.artifact.sha256)||c("artifact.sha256"),(!Number.isSafeInteger(b.artifact.size)||b.artifact.size<=0||b.artifact.size>e.a6)&&c("artifact.size")}function o(a){if(a.actualSize!==a.expectedSize)throw new i(f.SIZE_MISMATCH,{expected:a.expectedSize,actual:a.actualSize});if(!m(a.expectedSha256,a.actualSha256))throw new i(f.CHECKSUM_MISMATCH)}}};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";exports.id=28,exports.ids=[28],exports.modules={10500:(a,b,c)=>{c.d(b,{XF:()=>k,ob:()=>l});var d=c(29021),e=c(33873),f=c(55511),g=c(52710),h=c(33095),i=c(50300);function j(a,b){try{let c=(0,d.readFileSync)((0,e.join)((0,h.cu)(a,b),g.zi));return(0,f.createHash)("sha256").update(c).digest("hex")}catch{return null}}function k(a,b,c){if(!(0,i.iZ)(a))return!0;let d=j(b,c);return null!==d&&(null===a.receiptDigest||a.receiptDigest===d)}function l(a,b,c){return!(0,i.iZ)(a)||null===j(b,c)}},50300:(a,b,c)=>{c.d(b,{IF:()=>p,Pg:()=>o,Y9:()=>q,iZ:()=>r,mZ:()=>m});var d=c(29021),e=c(33873),f=c(55511),g=c(55926);let h=["PREPARING","FS_COMMITTED","INDEXED","SUCCEEDED","FAILED_RECONCILABLE"],i={PREPARING:["FS_COMMITTED","FAILED_RECONCILABLE"],FS_COMMITTED:["INDEXED","FAILED_RECONCILABLE"],INDEXED:["SUCCEEDED","FAILED_RECONCILABLE"],FAILED_RECONCILABLE:["INDEXED","SUCCEEDED","FAILED_RECONCILABLE"],SUCCEEDED:[]};class j extends Error{constructor(a,b,c){super(`Illegal Skill operation transition ${a} -> ${b}: ${c}`),this.from=a,this.to=b,this.name="SkillOperationTransitionError"}}function k(a){return(0,f.createHash)("sha256").update(function a(b){if(null===b||"object"!=typeof b)return JSON.stringify(b)??"null";if(Array.isArray(b))return`[${b.map(a).join(",")}]`;let c=Object.entries(b).filter(([,a])=>void 0!==a).sort(([a],[b])=>a<b?-1:+(a>b));return`{${c.map(([b,c])=>`${JSON.stringify(b)}:${a(c)}`).join(",")}}`}({actor:a.actor,operation:a.operation,target:a.target,planHash:a.planHash})).digest("hex")}function l(a,b){let c=(0,f.createHash)("sha256").update(a).digest("hex");return(0,e.join)((0,g.m_)(g.V8,b),`${c}.json`)}function m(a,b={}){let c=(0,g.dI)(l(a,b));return"object"==typeof c&&null!==c&&"string"==typeof c.operationId&&"string"==typeof c.idempotencyKey&&"string"==typeof c.bindingHash&&"string"==typeof c.state&&h.includes(c.state)?c:null}function n(a,b={}){(0,g.of)(l(a.idempotencyKey,b),a)}function o(a,b={}){try{(0,d.unlinkSync)(l(a,b))}catch{}}function p(a,b={}){let c=k(a.binding),d=a.idempotencyKey??k(a.binding),e=m(d,b);if(null!==e){if(e.bindingHash!==c)return{ok:!1,reason:"IDEMPOTENCY_KEY_CONFLICT",entry:e};if("PREPARING"===e.state||a.isReplayable?.(e)!==!1)return{ok:!0,entry:e,replayed:!0};o(d,b)}let g=b.now??Date.now(),h={schemaVersion:1,operationId:(0,f.randomUUID)(),idempotencyKey:d,bindingHash:c,operation:a.binding.operation,state:"PREPARING",actor:a.binding.actor,target:a.binding.target,source:a.source??null,lockKey:a.lockKey,createdAt:g,updatedAt:g,fsCommittedAt:null,receiptDigest:null,error:null,history:[{state:"PREPARING",at:g}]};return n(h,b),{ok:!0,entry:h,replayed:!1}}function q(a,b,c={},d={}){if(!i[a.state].includes(b))throw new j(a.state,b,"edge is not defined");let e=d.now??Date.now(),f="FS_COMMITTED"===b?a.fsCommittedAt??e:a.fsCommittedAt;if(("INDEXED"===b||"SUCCEEDED"===b)&&null===f)throw new j(a.state,b,"no filesystem commit point was recorded");let h={...a,state:b,updatedAt:e,fsCommittedAt:f,source:void 0!==c.source?c.source:a.source,receiptDigest:void 0!==c.receiptDigest?c.receiptDigest:a.receiptDigest,error:void 0!==c.error?null===c.error?null:{code:c.error.code,message:(0,g.f$)(c.error.message)}:a.error,history:[...a.history,{state:b,at:e}]};return n(h,d),h}function r(a){return null!==a.fsCommittedAt}},55317:(a,b,c)=>{c.d(b,{Bv:()=>i,Tk:()=>g,c7:()=>h,fk:()=>j});var d=c(55511);let e=`
|
|
2
|
+
id, worktree_id, skill_id, version, install_root, install_roots, receipt_sha256,
|
|
3
|
+
source_repository, source_ref, source_commit, artifact_sha256,
|
|
4
|
+
effective_risk, operation_id, installed_at, updated_at
|
|
5
|
+
`;function f(a){return{id:a.id,worktreeId:a.worktree_id,skillId:a.skill_id,version:a.version,installRoot:a.install_root,installRoots:function(a,b){if(null===a)return[b];try{let b=JSON.parse(a);if(Array.isArray(b)&&b.length>0&&b.every(a=>"string"==typeof a))return b}catch{}return[b]}(a.install_roots,a.install_root),receiptSha256:a.receipt_sha256,sourceRepository:a.source_repository,sourceRef:a.source_ref,sourceCommit:a.source_commit,artifactSha256:a.artifact_sha256,effectiveRisk:a.effective_risk,operationId:a.operation_id,installedAt:a.installed_at,updatedAt:a.updated_at}}function g(a,b){let{receipt:c}=b,e=c.install_roots&&c.install_roots.length>0?c.install_roots:[c.install_root];a.prepare(`INSERT INTO skill_installations (
|
|
6
|
+
id, worktree_id, skill_id, version, install_root, install_roots, receipt_sha256,
|
|
7
|
+
source_repository, source_ref, source_commit, artifact_sha256,
|
|
8
|
+
effective_risk, operation_id, installed_at, updated_at
|
|
9
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
10
|
+
ON CONFLICT (worktree_id, skill_id) DO UPDATE SET
|
|
11
|
+
version = excluded.version,
|
|
12
|
+
install_root = excluded.install_root,
|
|
13
|
+
install_roots = excluded.install_roots,
|
|
14
|
+
receipt_sha256 = excluded.receipt_sha256,
|
|
15
|
+
source_repository = excluded.source_repository,
|
|
16
|
+
source_ref = excluded.source_ref,
|
|
17
|
+
source_commit = excluded.source_commit,
|
|
18
|
+
artifact_sha256 = excluded.artifact_sha256,
|
|
19
|
+
effective_risk = excluded.effective_risk,
|
|
20
|
+
operation_id = excluded.operation_id,
|
|
21
|
+
updated_at = excluded.updated_at`).run((0,d.randomUUID)(),b.worktreeId,c.skill_id,c.version,c.install_root,JSON.stringify(e),b.receiptSha256,c.source.repository,c.source.ref,c.source.commit,c.artifact.sha256,c.effective_risk,b.operationId,b.installedAt,b.installedAt);let f=h(a,b.worktreeId,c.skill_id);if(null===f)throw Error("Skill installation row disappeared immediately after being written");return f}function h(a,b,c){let d=a.prepare(`SELECT ${e} FROM skill_installations
|
|
22
|
+
WHERE worktree_id = ? AND skill_id = ?`).get(b,c);return d?f(d):null}function i(a,b){return a.prepare(`SELECT ${e} FROM skill_installations
|
|
23
|
+
WHERE worktree_id = ? ORDER BY skill_id ASC`).all(b).map(f)}function j(a,b,c){return a.prepare("DELETE FROM skill_installations WHERE worktree_id = ? AND skill_id = ?").run(b,c).changes>0}},74516:(a,b,c)=>{c.d(b,{Cm:()=>l,JM:()=>i,ek:()=>h,oj:()=>j,tr:()=>k});var d=c(55511),e=c(55926);function f(a){return{id:a.id,operationId:a.operation_id,idempotencyKey:a.idempotency_key,bindingHash:a.binding_hash,operation:a.operation,state:a.state,result:a.result,actorType:a.actor_type,actorId:a.actor_id,worktreeId:a.worktree_id,skillId:a.skill_id,skillVersion:a.skill_version,fromVersion:a.from_version,toVersion:a.to_version,sourceOrigin:a.source_origin,sourceRepository:a.source_repository,sourceRef:a.source_ref,sourceCommit:a.source_commit,artifactSha256:a.artifact_sha256,errorCode:a.error_code,errorMessage:a.error_message,recordedAt:a.recorded_at}}let g=`
|
|
24
|
+
id, operation_id, idempotency_key, binding_hash, operation, state, result,
|
|
25
|
+
actor_type, actor_id, worktree_id, skill_id, skill_version, from_version, to_version,
|
|
26
|
+
source_origin, source_repository, source_ref, source_commit, artifact_sha256,
|
|
27
|
+
error_code, error_message, recorded_at
|
|
28
|
+
`;function h(a,b,c){let d="uninstall"===a.operation;return{operationId:a.operationId,idempotencyKey:a.idempotencyKey,bindingHash:a.bindingHash,operation:a.operation,state:a.state,result:b,actorType:a.actor.type,actorId:a.actor.id,worktreeId:a.target.worktreeId,skillId:a.target.skillId,skillVersion:a.target.version,fromVersion:d?a.target.version:null,toVersion:d?null:a.target.version,sourceOrigin:a.source?.origin??null,sourceRepository:a.source?.repository??null,sourceRef:a.source?.ref??null,sourceCommit:a.source?.commit??null,artifactSha256:a.source?.artifactSha256??null,errorCode:a.error?.code??null,errorMessage:a.error?.message??null,recordedAt:c}}function i(a,b){let c={...b,id:(0,d.randomUUID)(),errorMessage:null===b.errorMessage?null:(0,e.f$)(b.errorMessage),recordedAt:b.recordedAt??Date.now()};return a.prepare(`INSERT INTO skill_operations (
|
|
29
|
+
id, operation_id, idempotency_key, binding_hash, operation, state, result,
|
|
30
|
+
actor_type, actor_id, worktree_id, skill_id, skill_version, from_version, to_version,
|
|
31
|
+
source_origin, source_repository, source_ref, source_commit, artifact_sha256,
|
|
32
|
+
error_code, error_message, recorded_at
|
|
33
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(c.id,c.operationId,c.idempotencyKey,c.bindingHash,c.operation,c.state,c.result,c.actorType,c.actorId,c.worktreeId,c.skillId,c.skillVersion,c.fromVersion,c.toVersion,c.sourceOrigin,c.sourceRepository,c.sourceRef,c.sourceCommit,c.artifactSha256,c.errorCode,c.errorMessage,c.recordedAt),c}let j=50,k=200;function l(a,b={}){let c=Math.min(Math.max(1,Math.trunc(b.limit??j)),k),{clause:d,params:e}=function(a){let b=[],c=[];return void 0!==a.worktreeId&&(b.push("worktree_id = ?"),c.push(a.worktreeId)),void 0!==a.skillId&&(b.push("skill_id = ?"),c.push(a.skillId)),void 0!==a.operation&&(b.push("operation = ?"),c.push(a.operation)),void 0!==a.result&&(b.push("result = ?"),c.push(a.result)),void 0!==a.since&&(b.push("recorded_at >= ?"),c.push(a.since)),void 0!==a.until&&(b.push("recorded_at < ?"),c.push(a.until)),void 0!==a.after&&(b.push("(recorded_at < ? OR (recorded_at = ? AND id < ?))"),c.push(a.after.recordedAt,a.after.recordedAt,a.after.id)),{clause:b.length>0?`WHERE ${b.join(" AND ")}`:"",params:c}}(b),h=a.prepare(`SELECT ${g} FROM skill_operations
|
|
34
|
+
${d}
|
|
35
|
+
ORDER BY recorded_at DESC, id DESC LIMIT ?`).all(...e,c+1),i=h.length>c,m=(i?h.slice(0,c):h).map(f),n=m[m.length-1];return{records:m,hasMore:i,nextCursor:i&&n?{recordedAt:n.recordedAt,id:n.id}:null}}},89476:(a,b,c)=>{c.d(b,{k8:()=>q,p8:()=>k,x3:()=>r});var d=c(29021),e=c(21820),f=c(33873),g=c(55511),h=c(55926);let i=(0,g.randomUUID)();function j(a){if(!Number.isInteger(a)||a<=0)return!1;try{return process.kill(a,0),!0}catch(a){return"EPERM"===a.code}}function k(a,b){return(0,g.createHash)("sha256").update(`${a}\0${b}`).digest("hex")}function l(a,b){return(0,f.join)((0,h.m_)(h.vg,b),`${a}.lock`)}function m(a){if("object"!=typeof a||null===a)return!1;let b=a.owner;return"string"==typeof a.key&&"string"==typeof a.operationId&&"number"==typeof a.leaseExpiresAt&&Number.isFinite(a.leaseExpiresAt)&&"object"==typeof b&&null!==b&&"string"==typeof b.nonce&&"number"==typeof b.pid&&"string"==typeof b.host}function n(a,b={}){let c=(0,h.dI)(l(a,b));return m(c)?c:null}function o(a,b={}){if(null===a)return"FREE";let c=b.now??Date.now();if(c<a.leaseExpiresAt)return"HELD";let d=b.isProcessAlive??j;return a.owner.host!==(0,e.hostname)()?c-a.leaseExpiresAt>6e5?"RECLAIMABLE":"HELD_UNVERIFIABLE_OWNER":d(a.owner.pid)?"HELD_BY_LIVE_OWNER":"RECLAIMABLE"}function p(a,b){let c;try{c=(0,d.openSync)(a,d.constants.O_CREAT|d.constants.O_EXCL|d.constants.O_WRONLY,h.Pq)}catch{return!1}try{return(0,d.writeSync)(c,JSON.stringify(b)),!0}finally{(0,d.closeSync)(c)}}function q(a,b={}){var c,f;let j=b.now??Date.now(),k=a.leaseMs??3e4,r=l(a.key,b),s=(c=a.key,f=a.operationId,{schemaVersion:1,key:c,operationId:f,owner:{nonce:(0,g.randomBytes)(24).toString("hex"),pid:process.pid,host:(0,e.hostname)(),processGeneration:i},acquiredAt:j,renewedAt:j,leaseExpiresAt:j+k});if(p(r,s))return{ok:!0,lock:s,reclaimed:!1};let t=n(a.key,b),u=null===t?(0,d.existsSync)(r)?"RECLAIMABLE":"FREE":o(t,b),v=t?{operationId:t.operationId,acquiredAt:t.acquiredAt,leaseExpiresAt:t.leaseExpiresAt}:null;if("HELD"===u||"HELD_BY_LIVE_OWNER"===u)return{ok:!1,reason:u,heldBy:v};if("HELD_UNVERIFIABLE_OWNER"===u)return{ok:!1,reason:"HELD_UNVERIFIABLE_OWNER",heldBy:v};if("FREE"===u)return p(r,s)?{ok:!0,lock:s,reclaimed:!1}:{ok:!1,reason:"RACE_LOST",heldBy:null};let w=function(a,b,c){let e=`${a}.reclaim-${(0,g.randomBytes)(8).toString("hex")}`;try{(0,d.renameSync)(a,e)}catch{return{ok:!1,reason:"RACE_LOST"}}let f=(0,h.dI)(e),i=m(f)?f:null;if(!(null===b?null===i:null===i||i.owner.nonce===b.owner.nonce&&"RECLAIMABLE"===o(i,c))){try{(0,d.renameSync)(e,a)}catch{}return{ok:!1,reason:"RACE_LOST"}}try{(0,d.unlinkSync)(e)}catch{}return{ok:!0}}(r,t,b);return w.ok?p(r,s)?{ok:!0,lock:s,reclaimed:!0}:{ok:!1,reason:"RACE_LOST",heldBy:null}:{ok:!1,reason:w.reason,heldBy:v}}function r(a,b={}){let c=n(a.key,b);if(null===c||c.owner.nonce!==a.owner.nonce)return!1;try{return(0,d.unlinkSync)(l(a.key,b)),!0}catch{return!1}}}};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";exports.id=3042,exports.ids=[3042],exports.modules={1185:(a,b,c)=>{c.d(b,{II:()=>p,_t:()=>l,hN:()=>x,jb:()=>k,kq:()=>t,l6:()=>v,lB:()=>w,oY:()=>y});var d=c(55511),e=c(96210),f=c(93356),g=c(52710),h=c(33095);let i={MANAGED_UNCHANGED:"SKILL_UNINSTALL_MANAGED_UNCHANGED",LOCAL_MODIFICATION:"SKILL_UNINSTALL_LOCAL_MODIFICATION",RECEIPT_ORPHAN:"SKILL_UNINSTALL_RECEIPT_ORPHAN",UNMANAGED_FILE:"SKILL_UNINSTALL_UNMANAGED_FILE",NOT_A_REGULAR_FILE:"SKILL_UNINSTALL_NOT_A_REGULAR_FILE",NOT_INSTALLED:"SKILL_UNINSTALL_NOT_INSTALLED",RECEIPT_MISSING:"SKILL_UNINSTALL_RECEIPT_MISSING",RECEIPT_UNREADABLE:"SKILL_UNINSTALL_RECEIPT_UNREADABLE",RECEIPT_FOREIGN:"SKILL_UNINSTALL_RECEIPT_FOREIGN",TREE_SCAN_TRUNCATED:"SKILL_UNINSTALL_TREE_SCAN_TRUNCATED"},j={[i.MANAGED_UNCHANGED]:"skills.uninstall.reason.managedUnchanged",[i.LOCAL_MODIFICATION]:"skills.uninstall.reason.localModification",[i.RECEIPT_ORPHAN]:"skills.uninstall.reason.receiptOrphan",[i.UNMANAGED_FILE]:"skills.uninstall.reason.unmanagedFile",[i.NOT_A_REGULAR_FILE]:"skills.uninstall.reason.notARegularFile",[i.NOT_INSTALLED]:"skills.uninstall.reason.notInstalled",[i.RECEIPT_MISSING]:"skills.uninstall.reason.receiptMissing",[i.RECEIPT_UNREADABLE]:"skills.uninstall.reason.receiptUnreadable",[i.RECEIPT_FOREIGN]:"skills.uninstall.reason.receiptForeign",[i.TREE_SCAN_TRUNCATED]:"skills.uninstall.reason.treeScanTruncated"},k={removable:"skills.uninstall.nextAction.removable",blocked:"skills.uninstall.nextAction.blocked",succeeded:"skills.uninstall.nextAction.succeeded",committedReconciling:"skills.uninstall.nextAction.committedReconciling",failed:"skills.uninstall.nextAction.failed"},l={native:"skills.uninstall.reload.native",commandmate_runtime:"skills.uninstall.reload.commandmateRuntime",unsupported:"skills.uninstall.reload.unsupported",unknown:"skills.uninstall.reload.unknown"};function m(a,b){return{code:a,path:b,messageKey:j[a]}}let n={remove:i.MANAGED_UNCHANGED,modified:i.LOCAL_MODIFICATION,missing:i.RECEIPT_ORPHAN,unknown:i.UNMANAGED_FILE},o={remove:"removable",modified:"modified",missing:"missing",unknown:"unknown"};function p(a,b,c={}){let d=(0,h.QL)(c.rootPrefix??e.Co,b),j=c.existing??(0,h.bh)(a),k=(0,h.Hg)(j.files),l={installRoot:d,present:j.present,receipt:null,receiptDigest:null,entries:[],blockers:[],removable:!1,currentTreeHash:k,stats:{removable:0,modified:0,missing:0,unknown:0,irregular:0}};if(!j.present)return{...l,blockers:[m(i.NOT_INSTALLED,d)]};let q=[];j.truncated&&q.push(m(i.TREE_SCAN_TRUNCATED,d));let r=j.files.find(a=>a.path===g.zi),s=r?(0,g.q$)(r.bytes):null;r?null===s?q.push(m(i.RECEIPT_UNREADABLE,`${d}/${g.zi}`)):s.skill_id!==b&&q.push(m(i.RECEIPT_FOREIGN,`${d}/${g.zi}`)):q.push(m(i.RECEIPT_MISSING,`${d}/${g.zi}`));let t=r&&null!==s&&s.skill_id===b?s:null,u=new Map;if(t&&r){for(let a of t.files)u.set(a.path,{sha256:a.sha256,executable:a.executable,size:a.size});u.set(g.zi,{sha256:r.sha256,executable:!1,size:r.size})}let v=new Map(j.files.map(a=>[a.path,a])),w=[],x={removable:0,modified:0,missing:0,unknown:0,irregular:0};for(let a of[...new Set([...u.keys(),...v.keys()])].sort()){let b,c=u.get(a)??null,e=v.get(a)??null,h=n[b=null===c?"unknown":null===e?"missing":(0,f.U2)(e.sha256,c.sha256)&&e.executable===c.executable?"remove":"modified"];w.push({path:`${d}/${a}`,relativePath:a,disposition:b,reason:h,generated:a===g.zi,recordedSha256:c?.sha256??null,currentSha256:e?.sha256??null,size:e?.size??c?.size??null,executable:e?.executable??c?.executable??!1}),x[o[b]]+=1,"remove"!==b&&q.push(m(h,`${d}/${a}`))}for(let a of j.irregularPaths){let b=a?`${d}/${a}`:d;w.push({path:b,relativePath:a,disposition:"irregular",reason:i.NOT_A_REGULAR_FILE,generated:!1,recordedSha256:u.get(a)?.sha256??null,currentSha256:null,size:null,executable:!1}),x.irregular+=1,q.push(m(i.NOT_A_REGULAR_FILE,b))}return{installRoot:d,present:!0,receipt:t,receiptDigest:r?.sha256??null,entries:w.sort((a,b)=>a.path<b.path?-1:+(a.path>b.path)),blockers:q,removable:null!==t&&0===q.length,currentTreeHash:k,stats:x}}let q=globalThis.__skillUninstallPlans??(globalThis.__skillUninstallPlans={records:new Map}),r=/^[0-9a-f]{48}$/;function s(a,b){let c=0;for(let d of[...q.records.values()])d.token!==b&&a>=d.expiresAt&&(q.records.delete(d.token),c+=1);return c}function t(a={}){return s(a.now??Date.now())}function u(a,b){if(!r.test(a))throw new g.nf(g.ER.NOT_FOUND);let c=q.records.get(a);if(s(b,a),!c)throw new g.nf(g.ER.NOT_FOUND);let e=Buffer.from(a,"utf-8"),f=Buffer.from(c.token,"utf-8");if(e.length!==f.length||!(0,d.timingSafeEqual)(e,f))throw new g.nf(g.ER.NOT_FOUND);if(b>=c.expiresAt)throw q.records.delete(c.token),new g.nf(g.ER.EXPIRED);if(null!==c.consumedAt)throw new g.nf(g.ER.CONSUMED);return c}function v(a,b={}){return u(a,b.now??Date.now())}function w(a,b,c,d={}){let e=d.now??Date.now(),h=u(a,e),{binding:i}=h;if(i.actor.type!==b.actor.type||i.actor.id!==b.actor.id||i.worktreeId!==b.worktreeId||i.skillId!==b.skillId)throw new g.nf(g.ER.BINDING_MISMATCH);if(!h.dto.removable)throw new g.nf(g.ER.NOT_INSTALLABLE);if(c.branch!==i.branch||c.headCommit!==i.headCommit||c.currentTreeHash!==i.currentTreeHash||null===c.receiptDigest||!(0,f.U2)(c.receiptDigest,i.receiptDigest))throw new g.nf(g.ER.STALE);return h.consumedAt=e,h}function x(a){if(!e.X0.test(a.skillId)||a.skillId.length>e.cj)throw new g.nf(g.ER.TARGET_UNSAFE);let b=a.now??Date.now(),c=p(a.installRootAbs,a.skillId);if(!c.present)throw new g.nf(g.ER.NOT_FOUND);let f=(0,d.randomBytes)(24).toString("hex"),h=b+g.c$,i=c.receipt,j=c.entries.find(a=>a.generated)??null,m={actor:a.actor,operation:"uninstall",worktreeId:a.worktree.id,skillId:a.skillId,version:i?.version??"",receiptDigest:c.receiptDigest??"",branch:a.git.branch,headCommit:a.git.headCommit,currentTreeHash:c.currentTreeHash},n={token:f,expiresAt:new Date(h).toISOString().replace(/\.\d{3}Z$/,"Z"),removable:c.removable,blockers:c.blockers,nextActionKey:c.removable?k.removable:k.blocked,target:{worktreeId:a.worktree.id,worktreeName:a.worktree.name,repositoryName:a.worktree.repositoryName,branch:a.git.branch,headState:a.git.headState,headCommit:a.git.headCommit,workingTreeDirty:a.git.dirty,installRoot:c.installRoot,currentTreeHash:c.currentTreeHash},skill:{id:a.skillId,version:i?.version??"",source:i?{...i.source}:{repository:"",ref:"",commit:""},artifact:{assetName:i?.artifact.asset_name??"",sha256:i?.artifact.sha256??""},effectiveRisk:i?.effective_risk??"low",agents:(i?.agent_compatibility??[]).map(a=>({agent:a.agent,support:a.support,messageKey:l[a.support]}))},receipt:{path:`${c.installRoot}/${g.zi}`,sha256:c.receiptDigest??"",size:j?.size??0},removals:c.entries.filter(a=>"remove"===a.disposition),retained:c.entries.filter(a=>"remove"!==a.disposition),stats:c.stats},o={token:f,binding:m,bindingHash:(0,d.createHash)("sha256").update(function a(b){if(null===b||"object"!=typeof b)return JSON.stringify(b)??"null";if(Array.isArray(b))return`[${b.map(a).join(",")}]`;let c=Object.entries(b).filter(([,a])=>void 0!==a).sort(([a],[b])=>a<b?-1:+(a>b));return`{${c.map(([b,c])=>`${JSON.stringify(b)}:${a(c)}`).join(",")}}`}(m)).digest("hex"),createdAt:b,expiresAt:h,consumedAt:null,worktreePath:a.worktree.path,receipt:i??{},assessment:c,dto:n};for(s(b);q.records.size>=g.sK;){let a=[...q.records.values()].sort((a,b)=>a.createdAt-b.createdAt)[0];if(!a)break;q.records.delete(a.token)}return q.records.set(f,o),o}function y(a){let b=a.files.find(a=>a.path===g.zi);return b?null===(0,g.q$)(b.bytes)?null:(0,f.Q_)(b.bytes):null}},27289:(a,b,c)=>{c.d(b,{t:()=>h});var d=c(10641),e=c(88807),f=c(56791),g=c(66007);function h(a){if(!(0,g.h6)(a))return d.NextResponse.json({error:"Invalid worktree ID format"},{status:400});let b=(0,e.getDbInstance)(),c=(0,f.Ui)(b,a);return c||d.NextResponse.json({error:"Worktree not found"},{status:404})}},32520:(a,b,c)=>{c.d(b,{Bi:()=>i,F5:()=>m,Hg:()=>p,KX:()=>j,Oj:()=>w,SA:()=>o,WS:()=>k,X7:()=>s,gT:()=>n,h6:()=>r,iC:()=>v,oM:()=>t,rV:()=>l,uM:()=>q,xo:()=>u});var d=c(75359);let e="Kewton/commandmate-skills",f=[{host:"raw.githubusercontent.com",pathPrefix:`/${e}/`}],g=[{host:"github.com",pathPrefix:`/${e}/releases/download/`}],h=[...g,{host:"objects.githubusercontent.com"},{host:"release-assets.githubusercontent.com"}],i={catalog:{kind:"catalog",entryHosts:f,redirectHosts:f,accept:"application/json",contentTypes:["application/json","text/plain"],maxBytes:4194304},artifact:{kind:"artifact",entryHosts:g,redirectHosts:h,accept:d.gJ,contentTypes:[d.gJ,"application/octet-stream"],maxBytes:d.a6}},j=5,k=1e4,l=12e4,m=["authorization","cookie","proxy-authorization"],n="CommandMate",o="skill-snapshots",p=448,q=256,r=18e5,s=0x10000000,t=64,u=16,v=/^[0-9a-f]{32}$/,w=6e4},33095:(a,b,c)=>{c.d(b,{Hg:()=>r,M$:()=>t,QL:()=>n,Uf:()=>u,bh:()=>s,tP:()=>x,yj:()=>o});var d=c(55511),e=c(29021),f=c(33873),g=c.n(f),h=c(46065),i=c(96210),j=c(93356),k=c(55926);let l={NEW_FILE:"SKILL_DIFF_NEW_FILE",CONTENT_IDENTICAL:"SKILL_DIFF_CONTENT_IDENTICAL",MANAGED_UPDATE:"SKILL_DIFF_MANAGED_UPDATE",LOCAL_MODIFICATION:"SKILL_DIFF_LOCAL_MODIFICATION",UNMANAGED_SKILL:"SKILL_DIFF_UNMANAGED_SKILL",RECEIPT_ORPHAN:"SKILL_DIFF_RECEIPT_ORPHAN",NOT_A_REGULAR_FILE:"SKILL_DIFF_NOT_A_REGULAR_FILE"},m={DETACHED_HEAD:"SKILL_PREVIEW_DETACHED_HEAD",UNBORN_HEAD:"SKILL_PREVIEW_UNBORN_HEAD",HEAD_UNRESOLVED:"SKILL_PREVIEW_HEAD_UNRESOLVED",WORKING_TREE_DIRTY:"SKILL_PREVIEW_WORKING_TREE_DIRTY",PATH_GIT_IGNORED:"SKILL_PREVIEW_PATH_GIT_IGNORED",DIFF_TRUNCATED:"SKILL_PREVIEW_DIFF_TRUNCATED",BINARY_CONTENT:"SKILL_PREVIEW_BINARY_CONTENT",LINE_ENDING_CRLF:"SKILL_PREVIEW_LINE_ENDING_CRLF",TREE_SCAN_TRUNCATED:"SKILL_PREVIEW_TREE_SCAN_TRUNCATED"};function n(a,b){return`${a}/${b}`}function o(a,b,c){if(!i.X0.test(c)||c.length>i.cj)throw Error("Skill ID is not a valid install root segment");let d=g().resolve(a),e=g().resolve(d,b,c),f=g().relative(d,e);if(f!==g().join(b,c)||f.startsWith("..")||g().isAbsolute(f))throw Error("Skill install root escapes the worktree");return e}function p(a){let b=Math.min(a.length,8e3);for(let c=0;c<b;c+=1)if(0===a[c])return!0;return!1}function q(a){let b=Buffer.from(a).toString("utf-8");if(0===b.length)return[];let c=b.split("\n");return""===c[c.length-1]&&c.pop(),c}function r(a){let b=[...a].sort((a,b)=>a.path<b.path?-1:+(a.path>b.path)).map(a=>`${a.path}\0${a.sha256}\0${a.executable?"1":"0"}`).join("\n");return(0,d.createHash)("sha256").update(`skill-tree-v1
|
|
2
|
-
${b}`).digest("hex")}function s(a){let b;try{b=(0,e.lstatSync)(a)}catch{return{present:!1,files:[],irregularPaths:[],truncated:!1}}if(!b.isDirectory())return{present:!0,files:[],irregularPaths:[""],truncated:!1};let c=[],d=[],f=!1,h=0,k=(a,b,l)=>{let m;if(!f){if(l>16){f=!0;return}try{m=(0,e.readdirSync)(a,{withFileTypes:!0})}catch{f=!0;return}for(let n of m.sort((a,b)=>a.name<b.name?-1:1)){let m,o;if(f)return;if((h+=1)>2e3){f=!0;return}let p=b?`${b}/${n.name}`:n.name,q=g().join(a,n.name);if(n.isDirectory()){k(q,p,l+1);continue}if(!n.isFile()){d.push(p);continue}try{m=(0,e.lstatSync)(q)}catch{d.push(p);continue}if(!m.isFile()||m.size>i.em){d.push(p);continue}try{o=(0,e.readFileSync)(q)}catch{d.push(p);continue}c.push({path:p,sha256:(0,j.Q_)(o),size:o.byteLength,executable:(73&m.mode)!=0,bytes:o})}}};return k(a,"",0),{present:!0,files:c,irregularPaths:d,truncated:f}}async function t(a){let[b,c,d]=await Promise.all([(0,h.Bc)(["symbolic-ref","--quiet","--short","HEAD"],a),(0,h.Bc)(["rev-parse","HEAD"],a),(0,h.Bc)(["status","--porcelain"],a)]),e=c&&/^[0-9a-f]{40}$/.test(c)?c:null;return{headState:b&&e?"attached":!b&&e?"detached":b&&!e?"unborn":"unknown",branch:b&&b.length>0?b:null,headCommit:e,dirty:null!==d&&d.length>0}}async function u(a,b){if(0===b.length)return new Set;try{let{stdout:c}=await (0,h.mf)("git",["check-ignore","-z","--",...b],{cwd:a,timeout:3e3});return v(c)}catch(b){let a=b.stdout;return"string"==typeof a?v(a):new Set}}function v(a){return new Set(a.split("\0").filter(a=>a.length>0))}function w(){return{text:null,truncated:!1,additions:0,deletions:0}}function x(a){let b=n(a.installRootPrefix??i.Co,a.skillId),c=new Map(a.plannedFiles.map(a=>[a.relativePath,a])),d=new Map(a.existing.files.map(a=>[a.path,a])),e=[...new Set([...c.keys(),...d.keys(),...a.receiptFiles?[...a.receiptFiles.keys()]:[]])].filter(a=>!(0,k.hm)(`${b}/${a}`)).sort(),f={remainingBytes:524288},g=[],h={added:0,modified:0,unchanged:0,conflicted:0,unmanaged:0,binaryFiles:0,truncatedFiles:0,diffBytes:0},j=!1;for(let i of e){let e=c.get(i)??null,k=d.get(i)??null,m=a.receiptFiles?.get(i)??null,{change:n,reason:o}=k?m?k.sha256!==m.sha256||k.executable!==m.executable?{change:"conflict",reason:l.LOCAL_MODIFICATION}:e?e.sha256===k.sha256&&e.executable===k.executable?{change:"unchanged",reason:l.CONTENT_IDENTICAL}:{change:"modify",reason:l.MANAGED_UPDATE}:{change:"unmanaged",reason:l.RECEIPT_ORPHAN}:{change:"unmanaged",reason:l.UNMANAGED_SKILL}:e?{change:"add",reason:l.NEW_FILE}:{change:"unchanged",reason:l.RECEIPT_ORPHAN},r=`${b}/${i}`,s=e?.bytes??k?.bytes??null,t=!!e&&p(e.bytes)||!!k&&p(k.bytes),u=s?function(a){let b=0,c=0;for(let d=0;d<a.length;d+=1)10===a[d]&&(d>0&&13===a[d-1]?b+=1:c+=1);return b>0&&c>0?"mixed":b>0?"crlf":c>0?"lf":"none"}(s):"none";e&&("crlf"===u||"mixed"===u)&&(j=!0);let v=t||"unchanged"===n?w():function(a,b,c){if(null===a&&null===b)return w();let d=a?q(a):[],e=b?q(b):[],f=0,g=Math.min(d.length,e.length);for(;f<g&&d[f]===e[f];)f+=1;let h=0;for(;h<g-f&&d[d.length-1-h]===e[e.length-1-h];)h+=1;let i=d.slice(f,d.length-h),j=e.slice(f,e.length-h);if(0===i.length&&0===j.length)return w();let k=Math.max(0,f-3),l=d.slice(k,f),m=d.slice(d.length-h,Math.min(d.length,d.length-h+3)),n=l.length+i.length+m.length,o=l.length+j.length+m.length,p=0===n?0:k+1,r=0===o?0:k+1,s=[`@@ -${p},${n} +${r},${o} @@`],t=!1,u=s[0].length+1,v=(a,b)=>{if(s.length>=401)return!1;let d=`${a}${b}`,e=d.length+1;return!(u+e>65536)&&!(e>c.remainingBytes-u)&&(s.push(d),u+=e,!0)};for(let a of l)if(!v(" ",a)){t=!0;break}if(!t){for(let a of i)if(!v("-",a)){t=!0;break}}if(!t){for(let a of j)if(!v("+",a)){t=!0;break}}if(!t){for(let a of m)if(!v(" ",a)){t=!0;break}}t&&s.push("… diff truncated");let x=s.join("\n");return c.remainingBytes=Math.max(0,c.remainingBytes-x.length),{text:x,truncated:t,additions:j.length,deletions:i.length}}(k?.bytes??null,e?.bytes??null,f);g.push({path:r,change:n,reason:o,generated:e?.generated??!1,sha256:e?.sha256??null,size:e?.size??null,executable:e?.executable??k?.executable??!1,currentSha256:k?.sha256??null,currentSize:k?.size??null,binary:t,lineEnding:u,gitIgnored:a.gitIgnoredPaths.has(r),diff:v.text,diffTruncated:v.truncated,additions:v.additions,deletions:v.deletions}),"add"===n?h.added+=1:"modify"===n?h.modified+=1:"unchanged"===n?h.unchanged+=1:"conflict"===n?h.conflicted+=1:h.unmanaged+=1,t&&(h.binaryFiles+=1),v.truncated&&(h.truncatedFiles+=1),h.diffBytes+=v.text?.length??0}for(let c of a.existing.irregularPaths){let d=c?`${b}/${c}`:b;g.push({path:d,change:"conflict",reason:l.NOT_A_REGULAR_FILE,generated:!1,sha256:null,size:null,executable:!1,currentSha256:null,currentSize:null,binary:!1,lineEnding:"none",gitIgnored:a.gitIgnoredPaths.has(d),diff:null,diffTruncated:!1,additions:0,deletions:0}),h.conflicted+=1}let o=function(a,b,c,d){let e=[];return"detached"===a.git.headState&&e.push(m.DETACHED_HEAD),"unborn"===a.git.headState&&e.push(m.UNBORN_HEAD),"unknown"===a.git.headState&&e.push(m.HEAD_UNRESOLVED),a.git.dirty&&e.push(m.WORKING_TREE_DIRTY),b.some(a=>a.gitIgnored)&&e.push(m.PATH_GIT_IGNORED),c.truncatedFiles>0&&e.push(m.DIFF_TRUNCATED),c.binaryFiles>0&&e.push(m.BINARY_CONTENT),d&&e.push(m.LINE_ENDING_CRLF),a.existing.truncated&&e.push(m.TREE_SCAN_TRUNCATED),e}(a,g,h,j),s=a.plannedFiles.map(a=>({path:a.relativePath,sha256:a.sha256,executable:a.executable}));for(let b of a.existing.files)c.has(b.path)||s.push({path:b.path,sha256:b.sha256,executable:b.executable});return{installRoot:b,entries:g.sort((a,b)=>a.path<b.path?-1:+(a.path>b.path)),stats:h,warnings:o,currentTreeHash:r(a.existing.files),plannedTreeHash:r(s)}}},52710:(a,b,c)=>{c.d(b,{ER:()=>m,Jg:()=>v,Pw:()=>q,Q6:()=>z,Rq:()=>p,Y9:()=>x,c$:()=>j,gk:()=>y,nf:()=>o,q$:()=>r,sK:()=>k,vg:()=>l,zi:()=>i});var d=c(55511),e=c(13075),f=c(96210),g=c(89936),h=c(33095);let i=".commandmate-receipt.json",j=6e5,k=32,l=/^[0-9a-f]{48}$/,m={NOT_FOUND:"SKILL_PLAN_NOT_FOUND",EXPIRED:"SKILL_PLAN_EXPIRED",CONSUMED:"SKILL_PLAN_CONSUMED",STALE:"SKILL_PLAN_STALE",BINDING_MISMATCH:"SKILL_PLAN_BINDING_MISMATCH",NOT_INSTALLABLE:"SKILL_PLAN_NOT_INSTALLABLE",RISK_NOT_ACKNOWLEDGED:"SKILL_PLAN_RISK_NOT_ACKNOWLEDGED",TARGET_UNSAFE:"SKILL_PLAN_TARGET_UNSAFE"},n={[m.NOT_FOUND]:404,[m.EXPIRED]:410,[m.CONSUMED]:409,[m.STALE]:409,[m.BINDING_MISMATCH]:409,[m.NOT_INSTALLABLE]:409,[m.RISK_NOT_ACKNOWLEDGED]:409,[m.TARGET_UNSAFE]:400};class o extends Error{constructor(a,b){super(`Skill install plan rejected: ${a}`),this.code=a,this.detail=b,this.name="SkillPlanError"}get status(){return n[this.code]}}function p(a){return a instanceof o}function q(a){return a.install_roots&&a.install_roots.length>0?[...a.install_roots]:[a.install_root]}function r(a){try{let b=JSON.parse(Buffer.from(a).toString("utf-8"));if(!b||"object"!=typeof b||"string"!=typeof b.skill_id||!Array.isArray(b.files))return null;return b}catch{return null}}let s=globalThis.__skillInstallPlans??(globalThis.__skillInstallPlans={records:new Map});function t(a){s.records.delete(a.token),null===a.consumedAt&&(0,g.TO)(a.binding.snapshotId)}function u(a,b){let c=0;for(let d of[...s.records.values()])d.token!==b&&a>=d.expiresAt&&(t(d),c+=1);return c}function v(a={}){return u(a.now??Date.now())}function w(a,b){if(!l.test(a))throw new o(m.NOT_FOUND);let c=s.records.get(a);if(u(b,a),!c)throw new o(m.NOT_FOUND);let e=Buffer.from(a,"utf-8"),f=Buffer.from(c.token,"utf-8");if(e.length!==f.length||!(0,d.timingSafeEqual)(e,f))throw new o(m.NOT_FOUND);if(b>=c.expiresAt)throw t(c),new o(m.EXPIRED);if(null!==c.consumedAt)throw new o(m.CONSUMED);return c}function x(a,b={}){return w(a,b.now??Date.now())}function y(a,b,c,d={}){let e=d.now??Date.now(),f=w(a,e),{binding:g}=f;if(g.actor.type!==b.actor.type||g.actor.id!==b.actor.id||g.worktreeId!==b.worktreeId||g.skillId!==b.skillId||g.version!==b.version)throw new o(m.BINDING_MISMATCH);if(!f.dto.installable)throw new o(m.NOT_INSTALLABLE);if(f.dto.requiresRiskAcknowledgement&&!b.riskAcknowledged)throw new o(m.RISK_NOT_ACKNOWLEDGED);let{binding:h}=f;if(c.branch!==h.branch||c.headCommit!==h.headCommit||c.currentTreeHash!==h.currentTreeHash)throw new o(m.STALE);return f.consumedAt=e,f}async function z(a){let b,c=a.now??Date.now(),{snapshot:g}=a,l=a.targets&&a.targets.length>0?[...a.targets]:[f.Co];try{b=l.map(b=>({prefix:b,abs:(0,h.yj)(a.worktree.path,b,g.skillId),rel:(0,h.QL)(b,g.skillId)}))}catch{throw new o(m.TARGET_UNSAFE)}let n=function(a){let{snapshot:b,version:c}=a,d=b.files.map(a=>({path:a.path,sha256:a.sha256,size:a.size,executable:a.executable})),e=c.compatibility.agents.map(a=>({agent:a.agent,support:a.support,evidence:a.evidence})),g=(a.rootPrefixes&&a.rootPrefixes.length>0?[...a.rootPrefixes]:[f.Co]).map(a=>(0,h.QL)(a,b.skillId));return{schema_version:f.jq,skill_id:b.skillId,version:b.version,install_root:g[0],...g.length>1?{install_roots:g}:{},source:{repository:c.source.repository,ref:c.source.ref,commit:c.source.commit},artifact:{asset_name:c.artifact.asset_name,sha256:c.artifact.sha256,size:c.artifact.size,format:c.artifact.format},files:d,declared_risk:b.declaredRisk,computed_risk:b.computedRisk,effective_risk:b.effectiveRisk,declared_permissions:[...b.inspection.declared_permissions],agent_compatibility:e}}({snapshot:g,version:a.version,rootPrefixes:l}),p=Buffer.from((0,e.en)(n),"utf-8"),q=(0,d.createHash)("sha256").update(p).digest("hex"),v=[...g.files.map(a=>({relativePath:a.path,sha256:a.sha256,size:a.size,executable:a.executable,bytes:g.readFile(a.path),generated:!1})),{relativePath:i,sha256:q,size:p.byteLength,executable:!1,bytes:p,generated:!0}],w=await (0,h.M$)(a.worktree.path),x=await (0,h.Uf)(a.worktree.path,b.flatMap(a=>v.map(b=>`${a.rel}/${b.relativePath}`))),y=b.map(b=>{let c=(0,h.bh)(b.abs),d=function(a){let b=a.files.find(a=>a.path===i);if(!b)return null;let c=r(b.bytes);return c?{receipt:c,digest:b.sha256}:null}(c),e=d?new Map([...d.receipt.files.map(a=>[a.path,{sha256:a.sha256,executable:a.executable}]),[i,{sha256:d.digest,executable:!1}]]):null,f=(0,h.tP)({skillId:g.skillId,worktreePath:a.worktree.path,installRootPrefix:b.prefix,plannedFiles:v,existing:c,receiptFiles:e,git:w,gitIgnoredPaths:x});return{root:b,installedReceipt:d,preview:f}}),z=y[0],A=z.root.rel,B=z.installedReceipt,C=b.map(a=>a.rel),D=y.flatMap(a=>[...a.preview.entries]).sort((a,b)=>a.path<b.path?-1:+(a.path>b.path)),E=y.reduce((a,b)=>({added:a.added+b.preview.stats.added,modified:a.modified+b.preview.stats.modified,unchanged:a.unchanged+b.preview.stats.unchanged,conflicted:a.conflicted+b.preview.stats.conflicted,unmanaged:a.unmanaged+b.preview.stats.unmanaged,binaryFiles:a.binaryFiles+b.preview.stats.binaryFiles,truncatedFiles:a.truncatedFiles+b.preview.stats.truncatedFiles,diffBytes:a.diffBytes+b.preview.stats.diffBytes}),{added:0,modified:0,unchanged:0,conflicted:0,unmanaged:0,binaryFiles:0,truncatedFiles:0,diffBytes:0}),F=[...new Set(y.flatMap(a=>[...a.preview.warnings]))],G=D.filter(a=>"conflict"===a.change||"unmanaged"===a.change).map(a=>({code:a.reason,path:a.path}));"compatible"!==a.compatibility.status&&G.push({code:a.compatibility.messageKey,path:null});let H="high"===g.effectiveRisk,I=!0===a.riskAcknowledged,J=(0,d.randomBytes)(24).toString("hex"),K=c+j,L={actor:a.actor,operation:"install",worktreeId:a.worktree.id,skillId:g.skillId,version:g.version,artifactSha256:a.version.artifact.sha256,snapshotId:a.snapshotId,branch:w.branch,headCommit:w.headCommit,currentTreeHash:z.preview.currentTreeHash,plannedTreeHash:z.preview.plannedTreeHash,receiptDigest:q,riskAcknowledged:I},M={token:J,expiresAt:new Date(K).toISOString().replace(/\.\d{3}Z$/,"Z"),installable:0===G.length,requiresRiskAcknowledgement:H,riskAcknowledged:I,riskAcknowledgementMessageKey:H?"skills.plan.highRiskAcknowledgement":null,blockers:G,warnings:F,target:{worktreeId:a.worktree.id,worktreeName:a.worktree.name,repositoryName:a.worktree.repositoryName,syncedBranch:a.worktree.syncedBranch,branch:w.branch,headState:w.headState,headCommit:w.headCommit,workingTreeDirty:w.dirty,installRoot:z.preview.installRoot,installRoots:C,currentTreeHash:z.preview.currentTreeHash,plannedTreeHash:z.preview.plannedTreeHash,existingInstall:B?{version:B.receipt.version,receiptDigest:B.digest}:null},skill:function(a){let{manifest:b}=a.snapshot;return{id:a.snapshot.skillId,name:b.name,version:a.snapshot.version,summary:b.summary,description:b.description,capabilities:[...b.capabilities],expectedOutcomes:[...b.expected_outcomes],provider:{...b.provider},license:b.license,homepage:b.homepage??null,declaredPermissions:[...a.snapshot.inspection.declared_permissions],requirements:{commands:b.requirements.commands.map(a=>({name:a.name,versionRange:a.version_range??null})),networkHosts:[...b.requirements.network_hosts]},declaredRisk:a.snapshot.declaredRisk,computedRisk:a.snapshot.computedRisk,effectiveRisk:a.snapshot.effectiveRisk,riskRationale:b.risk_rationale,executablePaths:[...a.snapshot.inspection.executable_paths],scriptPaths:[...a.snapshot.inspection.script_paths],compatibility:{commandmate:a.compatibility,agents:a.version.compatibility.agents.map(a=>({...a}))},source:{repository:a.version.source.repository,ref:a.version.source.ref,commit:a.version.source.commit},artifact:{assetName:a.version.artifact.asset_name,sha256:a.version.artifact.sha256,size:a.version.artifact.size,format:a.version.artifact.format}}}(a),receipt:{path:`${A}/${i}`,sha256:q,size:p.byteLength},files:D,stats:E},N={token:J,binding:L,bindingHash:(0,d.createHash)("sha256").update(function a(b){if(null===b||"object"!=typeof b)return JSON.stringify(b)??"null";if(Array.isArray(b))return`[${b.map(a).join(",")}]`;let c=Object.entries(b).filter(([,a])=>void 0!==a).sort(([a],[b])=>a<b?-1:+(a>b));return`{${c.map(([b,c])=>`${JSON.stringify(b)}:${a(c)}`).join(",")}}`}(L)).digest("hex"),createdAt:c,expiresAt:K,consumedAt:null,worktreePath:a.worktree.path,rootPrefixes:l,receipt:n,receiptBytes:p,dto:M};for(u(c);s.records.size>=k;){let a=[...s.records.values()].sort((a,b)=>a.createdAt-b.createdAt)[0];if(!a)break;t(a)}return s.records.set(J,N),N}},55926:(a,b,c)=>{c.d(b,{Pq:()=>k,V8:()=>j,dI:()=>r,f$:()=>p,hm:()=>o,m_:()=>l,of:()=>q,vg:()=>i,wr:()=>m});var d=c(29021),e=c(33873),f=c(55511),g=c(96210),h=c(48870);let i="locks",j="journal",k=384;function l(a,b={}){let c=(0,e.join)(function(a={}){return a.root??(0,e.join)((0,h.GQ)(),"skills")}(b),a);return(0,d.mkdirSync)(c,{recursive:!0,mode:448}),(0,d.chmodSync)(c,448),c}function m(a,b=g.Co){return(0,e.join)(a,b,g.B3)}let n=g.y2.map(a=>`${a}/${g.B3}`);function o(a){let b=a.replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"");return n.some(a=>b===a||b.startsWith(`${a}/`))}function p(a){let b=a;return(b=(b=(b=(b=(b=(b=(b=(b=b.replace(/https?:\/\/\S+/gi,a=>{try{let b=new URL(a);return`${b.protocol}//${b.host}${b.pathname}`}catch{return"[url]"}})).replace(/\b(?:Bearer|Basic)\s+[A-Za-z0-9._~+/=-]+/gi,"[redacted]")).replace(/\bgh[pousr]_[A-Za-z0-9]{16,}\b/g,"[redacted]")).replace(/\bgithub_pat_[A-Za-z0-9_]{16,}\b/g,"[redacted]")).replace(/\bxox[baprs]-[A-Za-z0-9-]{10,}\b/g,"[redacted]")).replace(/\b(token|secret|password|api[_-]?key|authorization)\s*[=:]\s*\S+/gi,"$1=[redacted]")).replace(/(^|[\s"'(\[<])(\/[A-Za-z0-9._@+-]+){2,}\/?/g,"$1[path]")).replace(/(^|[\s"'(\[<])[A-Za-z]:\\[^\s"'\])>]*/g,"$1[path]")).length>500?`${b.slice(0,500)}…`:b}function q(a,b){let c=`${a}.tmp-${(0,f.randomBytes)(8).toString("hex")}`;(0,d.writeFileSync)(c,JSON.stringify(b),{mode:k}),(0,d.chmodSync)(c,k);try{(0,d.renameSync)(c,a)}catch(a){try{(0,d.unlinkSync)(c)}catch{}throw a}}function r(a){try{return JSON.parse((0,d.readFileSync)(a,"utf-8"))}catch{return null}}},56791:(a,b,c)=>{c.d(b,{AC:()=>d.AC,ug:()=>d.ug,lm:()=>d.lm,KG:()=>d.KG,cD:()=>d.cD,Jj:()=>d.Jj,YX:()=>d.YX,G4:()=>d.G4,hL:()=>d.hL,qp:()=>d.qp,To:()=>d.To,oH:()=>d.oH,py:()=>d.py,yy:()=>d.yy,pE:()=>d.pE,z2:()=>d.z2,cP:()=>d.cP,DF:()=>d.DF,lA:()=>d.lA,Qp:()=>d.Qp,th:()=>d.th,oZ:()=>d.oZ,ZP:()=>d.ZP,Ys:()=>d.Ys,vg:()=>d.vg,Rm:()=>d.Rm,BN:()=>d.BN,m0:()=>d.m0,Tk:()=>d.Tk,iT:()=>d.iT,gp:()=>d.gp,yE:()=>d.yE,BE:()=>d.BE,qK:()=>d.qK,p4:()=>d.p4,r8:()=>d.r8,of:()=>d.of,DN:()=>d.DN,pZ:()=>d.pZ,kA:()=>d.kA,VL:()=>d.VL,CF:()=>d.CF,NV:()=>d.NV,ce:()=>d.ce,y1:()=>d.y1,Nr:()=>d.Nr,ob:()=>d.ob,fr:()=>d.fr,Ui:()=>d.Ui,P9:()=>d.P9,eN:()=>d.eN,vi:()=>d.vi,uJ:()=>d.uJ,yT:()=>d.yT,PL:()=>d.PL,jp:()=>d.jp,nQ:()=>d.nQ,yb:()=>d.yb,GA:()=>d.GA,Cs:()=>d.Cs,xR:()=>d.xR,az:()=>d.az,nZ:()=>d.nZ,PP:()=>d.PP,Dx:()=>d.Dx,O:()=>d.O,EU:()=>d.EU,HZ:()=>d.HZ,UY:()=>d.UY,cw:()=>d.cw,jJ:()=>d.jJ,DC:()=>d.DC,gb:()=>d.gb,yB:()=>d.yB,uy:()=>d.uy,s:()=>d.s,iu:()=>d.iu,hq:()=>d.hq,z1:()=>d.z1,bl:()=>d.bl,jA:()=>d.jA,ZL:()=>d.ZL});var d=c(25537);c(88807),c(80499),c(20416),c(10406),c(29021),c(33873),c(21820),c(7956),(0,c(72626).h)("db-migration-path")},66007:(a,b,c)=>{c.d(b,{B9:()=>m,Px:()=>o,b$:()=>n,h6:()=>k});var d=c(33873),e=c.n(d),f=c(29021),g=c(72626),h=c(80438);let i=(0,g.h)("path-validator"),j=/^[a-zA-Z0-9_-]+$/;function k(a){return!!a&&0!==a.length&&j.test(a)}function l(a,b){return a===b||a.startsWith(b+e().sep)}function m(a,b){if(!a||""===a.trim()||a.includes("\0"))return!1;let c=a;try{c=decodeURIComponent(a)}catch{c=a}if(c.includes("\0"))return!1;let d=e().resolve(b),f=e().resolve(b,c),g=e().relative(d,f);return!(g.startsWith("..")||e().isAbsolute(g))}function n(a,b){if(!a||""===a.trim())throw Error("Invalid path: Path cannot be empty");if(a.includes("\0"))throw Error("Invalid path: Null bytes not allowed");if(!m(a,b))throw Error(`Path is outside allowed directory: ${a} (allowed root: ${b})`);let c=a;try{c=decodeURIComponent(a)}catch{c=a}return e().resolve(b,c)}function o(a,b){let c;try{c=(0,f.realpathSync)(b)}catch{return!1}let d=e().resolve(b,a);if((0,f.existsSync)(d))try{let b=(0,f.realpathSync)(d),e=l(b,c);return e||(0,h.h)(i,"symlink-rejected",{targetPath:a,resolvedTarget:b}),e}catch{return!1}try{if((0,f.lstatSync)(d).isSymbolicLink())try{let b=(0,f.readlinkSync)(d),g=e().resolve(e().dirname(d),b),j=l(g,c);return j||(0,h.h)(i,"dangling-symlink-rejected",{targetPath:a,resolvedLinkTarget:g}),j}catch{return!1}}catch{}let g=e().dirname(d);for(;g!==e().dirname(g);){if((0,f.existsSync)(g))try{let a=(0,f.realpathSync)(g),b=l(a,c);return b||(0,h.h)(i,"symlink-ancestor-rejected",{currentPath:g,resolvedAncestor:a}),b}catch{break}g=e().dirname(g)}return!1}},75359:(a,b,c)=>{c.d(b,{Z4:()=>d.Z4,wD:()=>d.wD,x2:()=>d.x2,gJ:()=>d.gJ,jn:()=>d.jn,a6:()=>d.a6,xP:()=>d.xP,em:()=>d.em,KH:()=>d.KH,Wr:()=>d.Wr,WL:()=>d.WL,l9:()=>d.l9,MD:()=>f.MD,vy:()=>f.vy,BO:()=>e.BO,qZ:()=>f.qZ,Yz:()=>f.Yz,EU:()=>f.EU,bX:()=>f.bX,r5:()=>f.r5});var d=c(96210);c(55432);var e=c(36931),f=c(13075),g=c(15194);d.jq,d.q3,[...g.XH],[...d.h3],d.G0,d.AH.source,d.mg.source,d.Z4.source,d.x2.source,d.mt.length,[...d.mt],[...d.wI],d.S$,d.jq,d.X0.source,d.cj,d.q3,e.l2.source,d.BQ,d.t9,d.yV,d.$K,d.yV,d.$K,d.DA.source,d.Ue,d.UN,d.SU,d._Z,d.PB.source,d.gI,d.xP,d.em,[...d.Hx],d.jq,d.Gm,d.X0.source,d.cj,d.q3,d.BQ,d.DA.source,d.Ue,d.UN,e.l2.source,d.Xk,e.l2.source,d.b,d.qu.source,d.a6,d.gJ,d.jn,d.jq,d.X0.source,d.cj,e.l2.source,d.y2.length,d.a6,d.jn,d.xP,d.em},80438:(a,b,c)=>{c.d(b,{h:()=>d});function d(a,b,c){a.warn(`security:${b}`,c)}},89936:(a,b,c)=>{c.d(b,{Jk:()=>z,LH:()=>y,Oi:()=>x,TO:()=>w,lw:()=>n,nW:()=>p,yn:()=>v});var d=c(55511),e=c(29021),f=c(33873),g=c.n(f),h=c(48870),i=c(32520),j=c(7956),k=c(75359),l=c(93356);let m=globalThis.__skillSnapshotStore??(globalThis.__skillSnapshotStore={rootDir:null,records:new Map,totalBytes:0});function n(a={}){let b=g().resolve(a.rootDir??g().join((0,h.WI)(),"data",i.SA));if((0,j.fW)(b))throw new l.q2(l.Fk.STORE_IO,{reason:"system-directory"});if(m.rootDir===b)return b;try{(0,e.mkdirSync)(b,{recursive:!0,mode:i.Hg}),(0,e.chmodSync)(b,i.Hg)}catch{throw new l.q2(l.Fk.STORE_IO,{reason:"mkdir"})}return m.rootDir=b,m.records.clear(),m.totalBytes=0,q(),b}function o(){if(!m.rootDir)throw new l.q2(l.Fk.STORE_UNINITIALIZED);return m.rootDir}function p(){return null!==m.rootDir}function q(){let a,b=o(),c=new Set([...m.records.values()].map(a=>a.filename));try{a=(0,e.readdirSync)(b)}catch{throw new l.q2(l.Fk.STORE_IO,{reason:"readdir"})}for(let d of a)c.has(d)||(0,e.rmSync)(g().join(b,d),{force:!0,recursive:!0})}function r(a){return g().join(o(),a.filename)}function s(a){(0,e.rmSync)(r(a),{force:!0}),m.records.delete(a.snapshotId),m.totalBytes-=a.size}function t(a){if(o(),!i.iC.test(a))throw new l.q2(l.Fk.SNAPSHOT_NOT_FOUND);let b=m.records.get(a);if(!b)throw new l.q2(l.Fk.SNAPSHOT_NOT_FOUND);if(0===b.refCount&&Date.now()>=b.expiresAt)throw s(b),new l.q2(l.Fk.SNAPSHOT_EXPIRED);return b}function u(a){return{snapshotId:a.snapshotId,skillId:a.skillId,version:a.version,commit:a.commit,sha256:a.sha256,size:a.size,expiresAt:a.expiresAt}}function v(a){let b=o(),c=Date.now(),f=a.bytes.byteLength;if(f<=0||f>k.a6)throw new l.q2(l.Fk.SIZE_LIMIT_EXCEEDED,{limit:k.a6});if(!(0,l.U2)(a.sha256,(0,l.Q_)(a.bytes)))throw new l.q2(l.Fk.CHECKSUM_MISMATCH);for(let b of m.records.values())if(b.sha256===a.sha256&&(0,e.existsSync)(r(b)))return b.refCount+=1,b.lastAccessedAt=c,b.expiresAt=c+i.h6,u(b);!function(a,b){let c=()=>m.totalBytes+a<=i.X7&&m.records.size<i.oM;if(!c()){for(let a of[...m.records.values()].filter(a=>0===a.refCount).sort((a,c)=>{let d=b>=a.expiresAt?0:1,e=b>=c.expiresAt?0:1;return d!==e?d-e:a.lastAccessedAt-c.lastAccessedAt})){if(c())return;s(a)}if(!c())throw new l.q2(l.Fk.QUOTA_EXCEEDED,{requested:a,limit:i.X7})}}(f,c);let h=(0,d.randomBytes)(i.xo).toString("hex"),j=`${h}.artifact`,n=g().join(b,j),p=`${n}.tmp`;try{(0,e.writeFileSync)(p,a.bytes,{mode:384}),(0,e.chmodSync)(p,i.uM),(0,e.renameSync)(p,n)}catch{throw(0,e.rmSync)(p,{force:!0}),new l.q2(l.Fk.STORE_IO,{reason:"write"})}let q={snapshotId:h,skillId:a.skillId,version:a.version,commit:a.commit,sha256:a.sha256,size:f,expiresAt:c+i.h6,refCount:1,lastAccessedAt:c,filename:j};return m.records.set(h,q),m.totalBytes+=f,u(q)}function w(a){let b=m.records.get(a);b&&(b.refCount>0&&(b.refCount-=1),0===b.refCount&&(b.lastAccessedAt=Date.now()))}function x(a){return u(t(a))}function y(a){let b=t(a);try{let a=(0,e.readFileSync)(r(b));return b.lastAccessedAt=Date.now(),a}catch{throw new l.q2(l.Fk.STORE_IO,{reason:"read"})}}function z(a={}){o();let b=a.now??Date.now(),c=0;for(let a of[...m.records.values()])0===a.refCount&&b>=a.expiresAt&&(s(a),c+=1);return q(),c}},93356:(a,b,c)=>{c.d(b,{Fk:()=>f,Ld:()=>o,Q_:()=>l,U2:()=>m,eG:()=>j,i1:()=>n,of:()=>k,q2:()=>i});var d=c(55511),e=c(75359);let f={URL_INVALID:"SKILL_FETCH_URL_INVALID",SOURCE_NOT_ALLOWED:"SKILL_FETCH_SOURCE_NOT_ALLOWED",REDIRECT_INVALID:"SKILL_FETCH_REDIRECT_INVALID",REDIRECT_LIMIT_EXCEEDED:"SKILL_FETCH_REDIRECT_LIMIT_EXCEEDED",HTTP_STATUS:"SKILL_FETCH_HTTP_STATUS",CONTENT_TYPE_INVALID:"SKILL_FETCH_CONTENT_TYPE_INVALID",BODY_MISSING:"SKILL_FETCH_BODY_MISSING",SIZE_LIMIT_EXCEEDED:"SKILL_FETCH_SIZE_LIMIT_EXCEEDED",SIZE_MISMATCH:"SKILL_FETCH_SIZE_MISMATCH",CHECKSUM_MISMATCH:"SKILL_FETCH_CHECKSUM_MISMATCH",BINDING_INVALID:"SKILL_FETCH_BINDING_INVALID",TIMEOUT:"SKILL_FETCH_TIMEOUT",ABORTED:"SKILL_FETCH_ABORTED",NETWORK:"SKILL_FETCH_NETWORK",SNAPSHOT_NOT_FOUND:"SKILL_SNAPSHOT_NOT_FOUND",SNAPSHOT_EXPIRED:"SKILL_SNAPSHOT_EXPIRED",QUOTA_EXCEEDED:"SKILL_SNAPSHOT_QUOTA_EXCEEDED",STORE_IO:"SKILL_SNAPSHOT_STORE_IO",STORE_UNINITIALIZED:"SKILL_SNAPSHOT_STORE_UNINITIALIZED"},g=new Set([f.TIMEOUT,f.NETWORK,f.HTTP_STATUS,f.STORE_IO]),h={[f.URL_INVALID]:"Skill source URL is not a usable HTTPS URL",[f.SOURCE_NOT_ALLOWED]:"Skill source is not on the official allowlist",[f.REDIRECT_INVALID]:"Skill source redirect was malformed",[f.REDIRECT_LIMIT_EXCEEDED]:"Skill source exceeded the redirect limit",[f.HTTP_STATUS]:"Skill source responded with an error status",[f.CONTENT_TYPE_INVALID]:"Skill source returned an unexpected media type",[f.BODY_MISSING]:"Skill source response had no body",[f.SIZE_LIMIT_EXCEEDED]:"Skill source response exceeded the size limit",[f.SIZE_MISMATCH]:"Skill artifact size did not match the catalog",[f.CHECKSUM_MISMATCH]:"Skill artifact checksum did not match the catalog",[f.BINDING_INVALID]:"Skill catalog version is not bound to an immutable source",[f.TIMEOUT]:"Skill source request timed out",[f.ABORTED]:"Skill source request was aborted",[f.NETWORK]:"Skill source could not be reached",[f.SNAPSHOT_NOT_FOUND]:"Skill snapshot is unknown or already released",[f.SNAPSHOT_EXPIRED]:"Skill snapshot has expired",[f.QUOTA_EXCEEDED]:"Skill snapshot store quota exceeded",[f.STORE_IO]:"Skill snapshot store could not be accessed",[f.STORE_UNINITIALIZED]:"Skill snapshot store is not initialized"};class i extends Error{constructor(a,b){super(h[a]),this.name="SkillFetchError",this.code=a,this.retryable=g.has(a),b&&(this.detail=b)}}function j(a){return a instanceof i}function k(){let a=(0,d.createHash)("sha256");return{update(b){a.update(b)},hex:()=>a.digest("hex")}}function l(a){return(0,d.createHash)("sha256").update(a).digest("hex")}function m(a,b){return!!e.x2.test(a)&&!!e.x2.test(b)&&(0,d.timingSafeEqual)(Buffer.from(a,"hex"),Buffer.from(b,"hex"))}function n(a,b){let c=a=>{throw new i(f.BINDING_INVALID,{field:a})};(0,e.BO)(b.version)||c("version"),e.Z4.test(b.source.commit)||c("source.commit"),b.artifact.asset_name!==(0,e.l9)(a,b.version)&&c("artifact.asset_name"),b.artifact.format!==e.jn&&c("artifact.format"),b.artifact.content_type!==e.gJ&&c("artifact.content_type"),e.x2.test(b.artifact.sha256)||c("artifact.sha256"),(!Number.isSafeInteger(b.artifact.size)||b.artifact.size<=0||b.artifact.size>e.a6)&&c("artifact.size")}function o(a){if(a.actualSize!==a.expectedSize)throw new i(f.SIZE_MISMATCH,{expected:a.expectedSize,actual:a.actualSize});if(!m(a.expectedSha256,a.actualSha256))throw new i(f.CHECKSUM_MISMATCH)}},98170:(a,b,c)=>{c.d(b,{mF:()=>k});var d=c(32520),e=c(72626),f=c(52710),g=c(1185),h=c(89936);let i=(0,e.h)("lib/skills/plan-sweeper"),j=globalThis.__skillPlanSweeper??(globalThis.__skillPlanSweeper={timer:null});function k(){if(j.timer)return;let a=setInterval(()=>{try{let a=function(a={}){let b=a.now??Date.now(),c=(0,f.Jg)({now:b}),d=(0,g.kq)({now:b});return{installPlans:c,uninstallPlans:d,snapshots:(0,h.nW)()?(0,h.Jk)({now:b}):0}}();(a.installPlans||a.uninstallPlans||a.snapshots)&&i.debug("skill-plan-sweep",{...a})}catch(a){i.warn("skill-plan-sweep-failed",{error:a instanceof Error?a.message:String(a)})}},d.Oj);a.unref(),j.timer=a}}};
|
|
1
|
+
"use strict";exports.id=3042,exports.ids=[3042],exports.modules={27289:(a,b,c)=>{c.d(b,{t:()=>h});var d=c(10641),e=c(88807),f=c(56791),g=c(66007);function h(a){if(!(0,g.h6)(a))return d.NextResponse.json({error:"Invalid worktree ID format"},{status:400});let b=(0,e.getDbInstance)(),c=(0,f.Ui)(b,a);return c||d.NextResponse.json({error:"Worktree not found"},{status:404})}},56791:(a,b,c)=>{c.d(b,{AC:()=>d.AC,ug:()=>d.ug,lm:()=>d.lm,KG:()=>d.KG,cD:()=>d.cD,Jj:()=>d.Jj,YX:()=>d.YX,G4:()=>d.G4,hL:()=>d.hL,qp:()=>d.qp,To:()=>d.To,oH:()=>d.oH,py:()=>d.py,yy:()=>d.yy,pE:()=>d.pE,z2:()=>d.z2,cP:()=>d.cP,DF:()=>d.DF,lA:()=>d.lA,Qp:()=>d.Qp,th:()=>d.th,oZ:()=>d.oZ,ZP:()=>d.ZP,Ys:()=>d.Ys,vg:()=>d.vg,Rm:()=>d.Rm,BN:()=>d.BN,m0:()=>d.m0,Tk:()=>d.Tk,iT:()=>d.iT,gp:()=>d.gp,yE:()=>d.yE,BE:()=>d.BE,qK:()=>d.qK,p4:()=>d.p4,r8:()=>d.r8,of:()=>d.of,DN:()=>d.DN,pZ:()=>d.pZ,kA:()=>d.kA,VL:()=>d.VL,CF:()=>d.CF,NV:()=>d.NV,ce:()=>d.ce,y1:()=>d.y1,Nr:()=>d.Nr,ob:()=>d.ob,fr:()=>d.fr,Ui:()=>d.Ui,P9:()=>d.P9,eN:()=>d.eN,vi:()=>d.vi,uJ:()=>d.uJ,yT:()=>d.yT,PL:()=>d.PL,jp:()=>d.jp,nQ:()=>d.nQ,yb:()=>d.yb,GA:()=>d.GA,Cs:()=>d.Cs,xR:()=>d.xR,az:()=>d.az,nZ:()=>d.nZ,PP:()=>d.PP,Dx:()=>d.Dx,O:()=>d.O,EU:()=>d.EU,HZ:()=>d.HZ,UY:()=>d.UY,cw:()=>d.cw,jJ:()=>d.jJ,DC:()=>d.DC,gb:()=>d.gb,yB:()=>d.yB,uy:()=>d.uy,s:()=>d.s,iu:()=>d.iu,hq:()=>d.hq,z1:()=>d.z1,bl:()=>d.bl,jA:()=>d.jA,ZL:()=>d.ZL});var d=c(25537);c(88807),c(71634),c(20416),c(10406),c(29021),c(33873),c(21820),c(7956),(0,c(72626).h)("db-migration-path")},66007:(a,b,c)=>{c.d(b,{B9:()=>m,Px:()=>o,b$:()=>n,h6:()=>k});var d=c(33873),e=c.n(d),f=c(29021),g=c(72626),h=c(80438);let i=(0,g.h)("path-validator"),j=/^[a-zA-Z0-9_-]+$/;function k(a){return!!a&&0!==a.length&&j.test(a)}function l(a,b){return a===b||a.startsWith(b+e().sep)}function m(a,b){if(!a||""===a.trim()||a.includes("\0"))return!1;let c=a;try{c=decodeURIComponent(a)}catch{c=a}if(c.includes("\0"))return!1;let d=e().resolve(b),f=e().resolve(b,c),g=e().relative(d,f);return!(g.startsWith("..")||e().isAbsolute(g))}function n(a,b){if(!a||""===a.trim())throw Error("Invalid path: Path cannot be empty");if(a.includes("\0"))throw Error("Invalid path: Null bytes not allowed");if(!m(a,b))throw Error(`Path is outside allowed directory: ${a} (allowed root: ${b})`);let c=a;try{c=decodeURIComponent(a)}catch{c=a}return e().resolve(b,c)}function o(a,b){let c;try{c=(0,f.realpathSync)(b)}catch{return!1}let d=e().resolve(b,a);if((0,f.existsSync)(d))try{let b=(0,f.realpathSync)(d),e=l(b,c);return e||(0,h.h)(i,"symlink-rejected",{targetPath:a,resolvedTarget:b}),e}catch{return!1}try{if((0,f.lstatSync)(d).isSymbolicLink())try{let b=(0,f.readlinkSync)(d),g=e().resolve(e().dirname(d),b),j=l(g,c);return j||(0,h.h)(i,"dangling-symlink-rejected",{targetPath:a,resolvedLinkTarget:g}),j}catch{return!1}}catch{}let g=e().dirname(d);for(;g!==e().dirname(g);){if((0,f.existsSync)(g))try{let a=(0,f.realpathSync)(g),b=l(a,c);return b||(0,h.h)(i,"symlink-ancestor-rejected",{currentPath:g,resolvedAncestor:a}),b}catch{break}g=e().dirname(g)}return!1}},80438:(a,b,c)=>{c.d(b,{h:()=>d});function d(a,b,c){a.warn(`security:${b}`,c)}},98170:(a,b,c)=>{c.d(b,{mF:()=>k});var d=c(32520),e=c(72626),f=c(52710),g=c(1185),h=c(89936);let i=(0,e.h)("lib/skills/plan-sweeper"),j=globalThis.__skillPlanSweeper??(globalThis.__skillPlanSweeper={timer:null});function k(){if(j.timer)return;let a=setInterval(()=>{try{let a=function(a={}){let b=a.now??Date.now(),c=(0,f.Jg)({now:b}),d=(0,g.kq)({now:b});return{installPlans:c,uninstallPlans:d,snapshots:(0,h.nW)()?(0,h.Jk)({now:b}):0}}();(a.installPlans||a.uninstallPlans||a.snapshots)&&i.debug("skill-plan-sweep",{...a})}catch(a){i.warn("skill-plan-sweep-failed",{error:a instanceof Error?a.message:String(a)})}},d.Oj);a.unref(),j.timer=a}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=3543,exports.ids=[3543],exports.modules={73543:a=>{a.exports=JSON.parse('{"sessions":{"idleAgents":"{count} idle","activeAgents":"{count} active","title":"Sessions","description":"All worktree sessions across repositories.","filterPlaceholder":"Filter by name or repository...","filterAriaLabel":"Filter sessions by name or repository","sortByAriaLabel":"Sort by","sortAscending":"Sort ascending","sortDescending":"Sort descending","loadingAriaLabel":"Loading sessions","refreshError":"Failed to refresh sessions: {message}","loadError":"Failed to load sessions: {message}","noMatching":"No matching sessions found.","empty":"No sessions yet."},"nav":{"home":"Home","chat":"Chat","sessions":"Sessions","repositories":"Repositories","repositoriesShort":"Repos","review":"Review","reviewReport":"Review/Report","more":"More","skills":"Skills"},"repositories":{"empty":"No repositories registered yet.","add":"Add Repository","syncAll":"Sync All","syncing":"Syncing...","addNewTitle":"Add New Repository","localPathTab":"Local Path","cloneUrlTab":"Clone URL","localPathDescription":"Enter the absolute path to a git repository containing worktrees.","localPathLabel":"Repository Path","localPathExample":"Example:
|
|
1
|
+
"use strict";exports.id=3543,exports.ids=[3543],exports.modules={73543:a=>{a.exports=JSON.parse('{"sessions":{"idleAgents":"{count} idle","activeAgents":"{count} active","title":"Sessions","description":"All worktree sessions across repositories.","filterPlaceholder":"Filter by name or repository...","filterAriaLabel":"Filter sessions by name or repository","sortByAriaLabel":"Sort by","sortAscending":"Sort ascending","sortDescending":"Sort descending","loadingAriaLabel":"Loading sessions","refreshError":"Failed to refresh sessions: {message}","loadError":"Failed to load sessions: {message}","noMatching":"No matching sessions found.","empty":"No sessions yet."},"nav":{"home":"Home","chat":"Chat","sessions":"Sessions","repositories":"Repositories","repositoriesShort":"Repos","review":"Review","reviewReport":"Review/Report","more":"More","skills":"Skills"},"repositories":{"empty":"No repositories registered yet.","add":"Add Repository","syncAll":"Sync All","syncing":"Syncing...","addNewTitle":"Add New Repository","localPathTab":"Local Path","cloneUrlTab":"Clone URL","localPathDescription":"Enter the absolute path to a git repository containing worktrees.","localPathLabel":"Repository Path","localPathExample":"Example: {example}","localPathAllowedRoots":"Allowed roots: {roots}","browse":"Browse…","pickerTitle":"Select a repository folder","pickerRootsLabel":"Allowed roots","pickerRecentLabel":"Recently used","pickerSelectHere":"Select this folder","pickerUp":"Up one level","pickerEmpty":"No subfolders here.","pickerTruncated":"Showing the first {limit} folders only.","pickerLoading":"Loading…","pickerWorktreeCount":"{count} worktree(s)","validationGitRepo":"Git repository detected ({count} worktree(s))","validationNotGitRepo":"This folder is not a git repository.","validationNotFound":"This folder does not exist.","validationOutsideRoots":"Outside the allowed roots ({roots}).","scan":"Scan & Add","scanning":"Scanning...","cloneUrlDescription":"Enter a git clone URL to clone a remote repository.","cloneUrlLabel":"Clone URL","cloneUrlHelp":"Supports HTTPS and SSH URLs","clone":"Clone","forkAndClone":"Fork & Add","forkOptionLabel":"Fork before adding (gh repo fork)","forkOptionHelp":"Creates a fork in your GitHub account and clones that (origin = your fork, upstream = original). Requires an authenticated GitHub CLI (gh).","cloning":"Cloning...","cloneSuccess":"Repository cloned successfully","cloneFailed":"Clone failed","pathRequired":"Repository path is required","urlRequired":"Clone URL is required","urlInvalid":"Invalid URL format","loading":"Loading repositories"},"cancel":"Cancel","send":"Send","sending":"Sending...","sendMessagePlaceholder":"Send a message...","end":"End","ending":"Ending...","retry":"Retry","reload":"Reload","reconnect":"Reconnect","close":"Close","back":"Back","menu":"Menu","sidebar":{"open":"Open sidebar","close":"Close sidebar","branchNavigation":"Branch navigation","branches":"Branches","searchBranches":"Search branches...","noBranchesFound":"No branches found","noBranchesAvailable":"No branches available","dragToReorderGroup":"Drag to reorder group","switchToFlatView":"Switch to flat view","switchToGroupedView":"Switch to grouped view"},"confirmDelete":"Delete \\"{name}\\"?","favorites":{"add":"Add to favorites","remove":"Remove from favorites"},"syncSuccess":"Synced {count} worktrees","syncError":"Sync failed","syncAuthError":"Authentication error","syncButtonLabel":"Sync branches","tooltips":{"viewMode":"Toggle view mode (grouped / flat)","sort":"Sort branches","sync":"Sync worktrees","repositories":"Manage repositories (add / sync)"},"displaySize":{"ariaLabel":"Display size","large":"Large","medium":"Medium","small":"Small","xsmall":"Extra small"},"confirmDialog":{"title":"Confirm","confirm":"OK"},"language":"Language","loadingPage":"Loading page","closeNotification":"Close notification","status":{"idle":"Idle","ready":"Ready","running":"Running","generating":"Generating","waiting":"Waiting for response","error":"Error","unknown":"Unknown"},"sort":{"options":"Sort options","updatedAt":"Updated","repositoryName":"Repository","branchName":"Branch","status":"Status","lastSent":"Last Sent"},"branchItem":{"cliToolStatus":"CLI tool status","hasUnread":"Has unread messages"},"connection":{"reconnecting":"Reconnecting","offline":"Offline","reconnectingTooltip":"Re-establishing the live connection (running on polling)","offlineTooltip":"No live connection (running on polling)"},"versionMismatch":{"title":"A new version is running","description":"The server is now on {serverVersion}, but this tab is still on {clientVersion}. Reload to get the latest.","reload":"Reload","dismiss":"Dismiss"},"meta":{"description":"Git worktree management with Claude CLI and tmux sessions"}}')}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=3722,exports.ids=[3722],exports.modules={53722:a=>{a.exports=JSON.parse('{"title":"Keyboard shortcuts","scopes":{"global":"Global","terminal":"Terminal","composer":"Composer"},"shortcuts":{"commandPalette":"Open command palette","keyboardHelp":"Show keyboard shortcuts","closeOverlay":"Close overlay or dialog","navigateList":"Move selection up / down","terminalSearch":"Search terminal output","sendMessage":"Send message","composerNewline":"Insert a new line"}}')}};
|
|
1
|
+
"use strict";exports.id=3722,exports.ids=[3722],exports.modules={53722:a=>{a.exports=JSON.parse('{"title":"Keyboard shortcuts","scopes":{"global":"Global","terminal":"Terminal","composer":"Composer","editor":"File editor"},"shortcuts":{"commandPalette":"Open command palette","keyboardHelp":"Show keyboard shortcuts","closeOverlay":"Close overlay or dialog","navigateList":"Move selection up / down","terminalSearch":"Search terminal output","sendMessage":"Send message","composerNewline":"Insert a new line","editorIndent":"Indent line or selection","editorOutdent":"Outdent line or selection","editorTabFocus":"Toggle whether Tab moves focus","editorSave":"Save file","editorFullscreen":"Toggle fullscreen editor"}}')}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=3736,exports.ids=[3736],exports.modules={73736:(a,b,c)=>{function d(a){return Date.UTC(a.y,a.m-1,a.d,a.h,a.i,a.s)}function e(a,b){return a.y===b.y&&a.m===b.m&&a.d===b.d&&a.h===b.h&&a.i===b.i&&a.s===b.s}function f(a,b,c){return g(function(a,b){let c=new Date(Date.parse(a));if(isNaN(c))throw Error("Invalid ISO8601 passed to timezone parser.");let d=a.substring(9);return d.includes("Z")||d.includes("+")||d.includes("-")?i(c.getUTCFullYear(),c.getUTCMonth()+1,c.getUTCDate(),c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),"Etc/UTC"):i(c.getFullYear(),c.getMonth()+1,c.getDate(),c.getHours(),c.getMinutes(),c.getSeconds(),b)}(a,b),c)}function g(a,b){let c=new Date(d(a)),f=h(c,a.tz),g=d(a),i=d(f),j=new Date(c.getTime()+(g-i)),k=h(j,a.tz);if(e(k,a)){let b=new Date(j.getTime()-36e5);return e(h(b,a.tz),a)?b:j}let l=new Date(j.getTime()+d(a)-d(k));if(e(h(l,a.tz),a))return l;if(b)throw Error("Invalid date passed to fromTZ()");return j.getTime()>l.getTime()?j:l}function h(a,b){let c;try{c=new Intl.DateTimeFormat("en-US",{timeZone:b,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).formatToParts(a)}catch(c){let a=c instanceof Error?c.message:String(c);throw RangeError(`toTZ: Invalid timezone '${b}' or date. Please provide a valid IANA timezone (e.g., 'America/New_York', 'Europe/Stockholm'). Original error: ${a}`)}let d={year:0,month:0,day:0,hour:0,minute:0,second:0};for(let a of c)("year"===a.type||"month"===a.type||"day"===a.type||"hour"===a.type||"minute"===a.type||"second"===a.type)&&(d[a.type]=parseInt(a.value,10));if(isNaN(d.year)||isNaN(d.month)||isNaN(d.day)||isNaN(d.hour)||isNaN(d.minute)||isNaN(d.second))throw Error(`toTZ: Failed to parse all date components from timezone '${b}'. This may indicate an invalid date or timezone configuration. Parsed components: ${JSON.stringify(d)}`);return 24===d.hour&&(d.hour=0),{y:d.year,m:d.month,d:d.day,h:d.hour,i:d.minute,s:d.second,tz:b}}function i(a,b,c,d,e,f,g){return{y:a,m:b,d:c,h:d,i:e,s:f,tz:g}}c.d(b,{l4:()=>q});var j=[1,2,4,8,16],k=class{pattern;timezone;mode;alternativeWeekdays;sloppyRanges;second;minute;hour;day;month;dayOfWeek;year;lastDayOfMonth;lastWeekday;nearestWeekdays;starDOM;starDOW;starYear;useAndLogic;constructor(a,b,c){this.pattern=a,this.timezone=b,this.mode=c?.mode??"auto",this.alternativeWeekdays=c?.alternativeWeekdays??!1,this.sloppyRanges=c?.sloppyRanges??!1,this.second=Array(60).fill(0),this.minute=Array(60).fill(0),this.hour=Array(24).fill(0),this.day=Array(31).fill(0),this.month=Array(12).fill(0),this.dayOfWeek=Array(7).fill(0),this.year=Array(1e4).fill(0),this.lastDayOfMonth=!1,this.lastWeekday=!1,this.nearestWeekdays=Array(31).fill(0),this.starDOM=!1,this.starDOW=!1,this.starYear=!1,this.useAndLogic=!1,this.parse()}parse(){if(!("string"==typeof this.pattern||this.pattern instanceof String))throw TypeError("CronPattern: Pattern has to be of type string.");this.pattern.indexOf("@")>=0&&(this.pattern=this.handleNicknames(this.pattern).trim());let a=this.pattern.match(/\S+/g)||[""],b=a.length;if(a.length<5||a.length>7)throw TypeError("CronPattern: invalid configuration format ('"+this.pattern+"'), exactly five, six, or seven space separated parts are required.");if("auto"!==this.mode){let a;switch(this.mode){case"5-part":a=5;break;case"6-part":a=6;break;case"7-part":a=7;break;case"5-or-6-parts":a=[5,6];break;case"6-or-7-parts":a=[6,7];break;default:a=0}if(!(Array.isArray(a)?a.includes(b):b===a)){let c=Array.isArray(a)?a.join(" or "):a.toString();throw TypeError(`CronPattern: mode '${this.mode}' requires exactly ${c} parts, but pattern '${this.pattern}' has ${b} parts.`)}}if(5===a.length&&a.unshift("0"),6===a.length&&a.push("*"),"LW"===a[3].toUpperCase()?(this.lastWeekday=!0,a[3]=""):a[3].toUpperCase().indexOf("L")>=0&&(a[3]=a[3].replace(/L/gi,""),this.lastDayOfMonth=!0),"*"==a[3]&&(this.starDOM=!0),"*"==a[6]&&(this.starYear=!0),a[4].length>=3&&(a[4]=this.replaceAlphaMonths(a[4])),a[5].length>=3&&(a[5]=this.alternativeWeekdays?this.replaceAlphaDaysQuartz(a[5]):this.replaceAlphaDays(a[5])),a[5].startsWith("+")&&(this.useAndLogic=!0,a[5]=a[5].substring(1),""===a[5]))throw TypeError("CronPattern: Day-of-week field cannot be empty after '+' modifier.");switch("*"==a[5]&&(this.starDOW=!0),this.pattern.indexOf("?")>=0&&(a[0]=a[0].replace(/\?/g,"*"),a[1]=a[1].replace(/\?/g,"*"),a[2]=a[2].replace(/\?/g,"*"),a[3]=a[3].replace(/\?/g,"*"),a[4]=a[4].replace(/\?/g,"*"),a[5]=a[5].replace(/\?/g,"*"),a[6]&&(a[6]=a[6].replace(/\?/g,"*"))),this.mode){case"5-part":a[0]="0",a[6]="*";break;case"6-part":case"5-or-6-parts":a[6]="*"}this.throwAtIllegalCharacters(a),this.partToArray("second",a[0],0,1),this.partToArray("minute",a[1],0,1),this.partToArray("hour",a[2],0,1),this.partToArray("day",a[3],-1,1),this.partToArray("month",a[4],-1,1);let c=this.alternativeWeekdays?-1:0;this.partToArray("dayOfWeek",a[5],c,63),this.partToArray("year",a[6],0,1),!this.alternativeWeekdays&&this.dayOfWeek[7]&&(this.dayOfWeek[0]=this.dayOfWeek[7])}partToArray(a,b,c,d){let e=this[a],f="day"===a&&this.lastDayOfMonth,g="day"===a&&this.lastWeekday;if(""===b&&!f&&!g)throw TypeError("CronPattern: configuration entry "+a+" ("+b+") is empty, check for trailing spaces.");if("*"===b)return e.fill(d);let h=b.split(",");if(h.length>1)for(let b=0;b<h.length;b++)this.partToArray(a,h[b],c,d);else -1!==b.indexOf("-")&&-1!==b.indexOf("/")?this.handleRangeWithStepping(b,a,c,d):-1!==b.indexOf("-")?this.handleRange(b,a,c,d):-1!==b.indexOf("/")?this.handleStepping(b,a,c,d):""!==b&&this.handleNumber(b,a,c,d)}throwAtIllegalCharacters(a){for(let b=0;b<a.length;b++)if((3===b?/[^/*0-9,\-WwLl]+/:5===b?/[^/*0-9,\-#Ll]+/:/[^/*0-9,\-]+/).test(a[b]))throw TypeError("CronPattern: configuration entry "+b+" ("+a[b]+") contains illegal characters.")}handleNumber(a,b,c,d){let e=this.extractNth(a,b),f=a.toUpperCase().includes("W");if("day"!==b&&f)throw TypeError("CronPattern: Nearest weekday modifier (W) only allowed in day-of-month.");f&&(b="nearestWeekdays");let g=parseInt(e[0],10)+c;if(isNaN(g))throw TypeError("CronPattern: "+b+" is not a number: '"+a+"'");this.setPart(b,g,e[1]||d)}setPart(a,b,c){if(!Object.prototype.hasOwnProperty.call(this,a))throw TypeError("CronPattern: Invalid part specified: "+a);if("dayOfWeek"===a){if(7===b&&(b=0),b<0||b>6)throw RangeError("CronPattern: Invalid value for dayOfWeek: "+b);this.setNthWeekdayOfMonth(b,c);return}if("second"===a||"minute"===a){if(b<0||b>=60)throw RangeError("CronPattern: Invalid value for "+a+": "+b)}else if("hour"===a){if(b<0||b>=24)throw RangeError("CronPattern: Invalid value for "+a+": "+b)}else if("day"===a||"nearestWeekdays"===a){if(b<0||b>=31)throw RangeError("CronPattern: Invalid value for "+a+": "+b)}else if("month"===a){if(b<0||b>=12)throw RangeError("CronPattern: Invalid value for "+a+": "+b)}else if("year"===a&&(b<1||b>=1e4))throw RangeError("CronPattern: Invalid value for "+a+": "+b+" (supported range: 1-9999)");this[a][b]=c}validateNotNaN(a,b){if(isNaN(a))throw TypeError(b)}validateRange(a,b,c,d,e){if(a>b)throw TypeError("CronPattern: From value is larger than to value: '"+e+"'");if(void 0!==c){if(0===c)throw TypeError("CronPattern: Syntax error, illegal stepping: 0");if(c>this[d].length)throw TypeError("CronPattern: Syntax error, steps cannot be greater than maximum value of part ("+this[d].length+")")}}handleRangeWithStepping(a,b,c,d){if(a.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in ranges with stepping.");let e=this.extractNth(a,b),f=e[0].match(/^(\d+)-(\d+)\/(\d+)$/);if(null===f)throw TypeError("CronPattern: Syntax error, illegal range with stepping: '"+a+"'");let[,g,h,i]=f,j=parseInt(g,10)+c,k=parseInt(h,10)+c,l=parseInt(i,10);this.validateNotNaN(j,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(k,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateNotNaN(l,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(j,k,l,b,a);for(let a=j;a<=k;a+=l)this.setPart(b,a,e[1]||d)}extractNth(a,b){let c=a,d;if(c.includes("#")){if("dayOfWeek"!==b)throw Error("CronPattern: nth (#) only allowed in day-of-week field");d=c.split("#")[1],c=c.split("#")[0]}else if(c.toUpperCase().endsWith("L")){if("dayOfWeek"!==b)throw Error("CronPattern: L modifier only allowed in day-of-week field (use L alone for day-of-month)");d="L",c=c.slice(0,-1)}return[c,d]}handleRange(a,b,c,d){if(a.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in a range.");let e=this.extractNth(a,b),f=e[0].split("-");if(2!==f.length)throw TypeError("CronPattern: Syntax error, illegal range: '"+a+"'");let g=parseInt(f[0],10)+c,h=parseInt(f[1],10)+c;this.validateNotNaN(g,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(h,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateRange(g,h,void 0,b,a);for(let a=g;a<=h;a++)this.setPart(b,a,e[1]||d)}handleStepping(a,b,c,d){if(a.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in parts with stepping.");let e=this.extractNth(a,b),f=e[0].split("/");if(2!==f.length)throw TypeError("CronPattern: Syntax error, illegal stepping: '"+a+"'");if(this.sloppyRanges)""===f[0]&&(f[0]="*");else{if(""===f[0])throw TypeError("CronPattern: Syntax error, stepping with missing prefix ('"+a+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.");if("*"!==f[0])throw TypeError("CronPattern: Syntax error, stepping with numeric prefix ('"+a+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.")}let g=0;"*"!==f[0]&&(g=parseInt(f[0],10)+c);let h=parseInt(f[1],10);this.validateNotNaN(h,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(0,this[b].length-1,h,b,a);for(let a=g;a<this[b].length;a+=h)this.setPart(b,a,e[1]||d)}replaceAlphaDays(a){return a.replace(/-sun/gi,"-7").replace(/sun/gi,"0").replace(/mon/gi,"1").replace(/tue/gi,"2").replace(/wed/gi,"3").replace(/thu/gi,"4").replace(/fri/gi,"5").replace(/sat/gi,"6")}replaceAlphaDaysQuartz(a){return a.replace(/sun/gi,"1").replace(/mon/gi,"2").replace(/tue/gi,"3").replace(/wed/gi,"4").replace(/thu/gi,"5").replace(/fri/gi,"6").replace(/sat/gi,"7")}replaceAlphaMonths(a){return a.replace(/jan/gi,"1").replace(/feb/gi,"2").replace(/mar/gi,"3").replace(/apr/gi,"4").replace(/may/gi,"5").replace(/jun/gi,"6").replace(/jul/gi,"7").replace(/aug/gi,"8").replace(/sep/gi,"9").replace(/oct/gi,"10").replace(/nov/gi,"11").replace(/dec/gi,"12")}handleNicknames(a){let b=a.trim().toLowerCase();if("@yearly"===b||"@annually"===b)return"0 0 1 1 *";if("@monthly"===b)return"0 0 1 * *";if("@weekly"===b)return"0 0 * * 0";if("@daily"===b||"@midnight"===b)return"0 0 * * *";if("@hourly"===b)return"0 * * * *";if("@reboot"===b)throw TypeError("CronPattern: @reboot is not supported in this environment. This is an event-based trigger that requires system startup detection.");return a}setNthWeekdayOfMonth(a,b){if("number"!=typeof b&&"L"===b.toUpperCase())this.dayOfWeek[a]=32|this.dayOfWeek[a];else if(63===b)this.dayOfWeek[a]=63;else if(b<6&&b>0)this.dayOfWeek[a]=this.dayOfWeek[a]|j[b-1];else throw TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${b}, Type: ${typeof b}`)}},l=[31,28,31,30,31,30,31,31,30,31,30,31],m=[["month","year",0],["day","month",-1],["hour","day",0],["minute","hour",0],["second","minute",0]],n=class a{tz;ms;second;minute;hour;day;month;year;constructor(b,c){if(this.tz=c,b&&b instanceof Date)if(isNaN(b))throw TypeError("CronDate: Invalid date passed to CronDate constructor");else this.fromDate(b);else if(null==b)this.fromDate(new Date);else if(b&&"string"==typeof b)this.fromString(b);else if(b instanceof a)this.fromCronDate(b);else throw TypeError("CronDate: Invalid type ("+typeof b+") passed to CronDate constructor")}getLastDayOfMonth(a,b){return 1!==b?l[b]:new Date(Date.UTC(a,b+1,0)).getUTCDate()}getLastWeekday(a,b){let c=this.getLastDayOfMonth(a,b),d=new Date(Date.UTC(a,b,c)).getUTCDay();return 0===d?c-2:6===d?c-1:c}getNearestWeekday(a,b,c){let d=this.getLastDayOfMonth(a,b);if(c>d)return -1;let e=new Date(Date.UTC(a,b,c)).getUTCDay();return 0===e?c===d?c-2:c+1:6===e?1===c?c+2:c-1:c}isNthWeekdayOfMonth(a,b,c,d){let e=new Date(Date.UTC(a,b,c)).getUTCDay(),f=0;for(let d=1;d<=c;d++)new Date(Date.UTC(a,b,d)).getUTCDay()===e&&f++;if(63&d&&j[f-1]&d)return!0;if(32&d){let d=this.getLastDayOfMonth(a,b);for(let f=c+1;f<=d;f++)if(new Date(Date.UTC(a,b,f)).getUTCDay()===e)return!1;return!0}return!1}fromDate(a){if(void 0!==this.tz)if("number"==typeof this.tz)this.ms=a.getUTCMilliseconds(),this.second=a.getUTCSeconds(),this.minute=a.getUTCMinutes()+this.tz,this.hour=a.getUTCHours(),this.day=a.getUTCDate(),this.month=a.getUTCMonth(),this.year=a.getUTCFullYear(),this.apply();else try{let b=h(a,this.tz);this.ms=a.getMilliseconds(),this.second=b.s,this.minute=b.i,this.hour=b.h,this.day=b.d,this.month=b.m-1,this.year=b.y}catch(b){let a=b instanceof Error?b.message:String(b);throw TypeError(`CronDate: Failed to convert date to timezone '${this.tz}'. This may happen with invalid timezone names or dates. Original error: ${a}`)}else this.ms=a.getMilliseconds(),this.second=a.getSeconds(),this.minute=a.getMinutes(),this.hour=a.getHours(),this.day=a.getDate(),this.month=a.getMonth(),this.year=a.getFullYear()}fromCronDate(a){this.tz=a.tz,this.year=a.year,this.month=a.month,this.day=a.day,this.hour=a.hour,this.minute=a.minute,this.second=a.second,this.ms=a.ms}apply(){if(!(this.month>11)&&!(this.month<0)&&!(this.day>l[this.month])&&!(this.day<1)&&!(this.hour>59)&&!(this.minute>59)&&!(this.second>59)&&!(this.hour<0)&&!(this.minute<0)&&!(this.second<0))return!1;{let a=new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms));return this.ms=a.getUTCMilliseconds(),this.second=a.getUTCSeconds(),this.minute=a.getUTCMinutes(),this.hour=a.getUTCHours(),this.day=a.getUTCDate(),this.month=a.getUTCMonth(),this.year=a.getUTCFullYear(),!0}}fromString(a){if("number"!=typeof this.tz)return this.fromDate(f(a,this.tz));{let b=f(a);this.ms=b.getUTCMilliseconds(),this.second=b.getUTCSeconds(),this.minute=b.getUTCMinutes(),this.hour=b.getUTCHours(),this.day=b.getUTCDate(),this.month=b.getUTCMonth(),this.year=b.getUTCFullYear(),this.apply()}}findNext(a,b,c,d){return this._findMatch(a,b,c,d,1)}_findMatch(a,b,c,d,e){let f=this[b],g;c.lastDayOfMonth&&(g=this.getLastDayOfMonth(this.year,this.month));let h=c.starDOW||"day"!=b?void 0:new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay(),i=this[b]+d,j=1===e?a=>a<c[b].length:a=>a>=0;for(let k=i;j(k);k+=e){let e=c[b][k];if("day"===b&&!e){for(let a=0;a<c.nearestWeekdays.length;a++)if(c.nearestWeekdays[a]){let b=this.getNearestWeekday(this.year,this.month,a-d);if(-1===b)continue;if(b===k-d){e=1;break}}}if("day"===b&&c.lastWeekday&&k-d===this.getLastWeekday(this.year,this.month)&&(e=1),"day"===b&&c.lastDayOfMonth&&k-d==g&&(e=1),"day"===b&&!c.starDOW){let b=c.dayOfWeek[(h+(k-d-1))%7];if(b&&63&b)b=+!!this.isNthWeekdayOfMonth(this.year,this.month,k-d,b);else if(b)throw Error(`CronDate: Invalid value for dayOfWeek encountered. ${b}`);e=c.useAndLogic||a.domAndDow||c.starDOM?e&&b:e||b}if(e)return this[b]=k-d,f!==this[b]?2:1}return 3}recurse(a,b,c){if(0===c&&!a.starYear){if(this.year>=0&&this.year<a.year.length&&0===a.year[this.year]){let b=-1;for(let c=this.year+1;c<a.year.length&&c<1e4;c++)if(1===a.year[c]){b=c;break}if(-1===b)return null;this.year=b,this.month=0,this.day=1,this.hour=0,this.minute=0,this.second=0,this.ms=0}if(this.year>=1e4)return null}let d=this.findNext(b,m[c][0],a,m[c][2]);if(d>1){let e=c+1;for(;e<m.length;)this[m[e][0]]=-m[e][2],e++;if(3===d){if(this[m[c][1]]++,this[m[c][0]]=-m[c][2],this.apply(),0===c&&!a.starYear){for(;this.year>=0&&this.year<a.year.length&&0===a.year[this.year]&&this.year<1e4;)this.year++;if(this.year>=1e4||this.year>=a.year.length)return null}return this.recurse(a,b,0)}if(this.apply())return this.recurse(a,b,c-1)}return(c+=1)>=m.length?this:(a.starYear?this.year>=3e3:this.year>=1e4)?null:this.recurse(a,b,c)}increment(a,b,c){return this.second+=void 0!==b.interval&&b.interval>1&&c?b.interval:1,this.ms=0,this.apply(),this.recurse(a,b,0)}decrement(a,b){return this.second-=void 0!==b.interval&&b.interval>1?b.interval:1,this.ms=0,this.apply(),this.recurseBackward(a,b,0,0)}recurseBackward(a,b,c,d=0){if(d>1e4)return null;if(0===c&&!a.starYear){if(this.year>=0&&this.year<a.year.length&&0===a.year[this.year]){let b=-1;for(let c=this.year-1;c>=0;c--)if(1===a.year[c]){b=c;break}if(-1===b)return null;this.year=b,this.month=11,this.day=31,this.hour=23,this.minute=59,this.second=59,this.ms=0}if(this.year<0)return null}let e=this.findPrevious(b,m[c][0],a,m[c][2]);if(e>1){let f=c+1;for(;f<m.length;){let b=m[f][0],c=m[f][2],d=this.getMaxPatternValue(b,a,c);this[b]=d,f++}if(3===e){if(this[m[c][1]]--,0===c){let a=this.getLastDayOfMonth(this.year,this.month);this.day>a&&(this.day=a)}if(1===c)if(this.day<=0)this.day=1;else{let a=this.year,b=this.month;for(;b<0;)b+=12,a--;for(;b>11;)b-=12,a++;let c=1!==b?l[b]:new Date(Date.UTC(a,b+1,0)).getUTCDate();this.day>c&&(this.day=c)}this.apply();let e=m[c][0],f=m[c][2],g=this.getMaxPatternValue(e,a,f);if("day"===e){let a=this.getLastDayOfMonth(this.year,this.month);this[e]=Math.min(g,a)}else this[e]=g;if(this.apply(),0===c){let b=m[1][2],c=Math.min(this.getMaxPatternValue("day",a,b),this.getLastDayOfMonth(this.year,this.month));c!==this.day&&(this.day=c,this.hour=this.getMaxPatternValue("hour",a,m[2][2]),this.minute=this.getMaxPatternValue("minute",a,m[3][2]),this.second=this.getMaxPatternValue("second",a,m[4][2]))}if(0===c&&!a.starYear){for(;this.year>=0&&this.year<a.year.length&&0===a.year[this.year];)this.year--;if(this.year<0)return null}return this.recurseBackward(a,b,0,d+1)}if(this.apply())return this.recurseBackward(a,b,c-1,d+1)}return(c+=1)>=m.length?this:this.year<0?null:this.recurseBackward(a,b,c,d+1)}getMaxPatternValue(a,b,c){if("day"===a&&b.lastDayOfMonth||"day"===a&&!b.starDOW)return this.getLastDayOfMonth(this.year,this.month);for(let d=b[a].length-1;d>=0;d--)if(b[a][d])return d-c;return b[a].length-1-c}findPrevious(a,b,c,d){return this._findMatch(a,b,c,d,-1)}getDate(a){return a||void 0===this.tz?new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms):"number"==typeof this.tz?new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute-this.tz,this.second,this.ms)):g(i(this.year,this.month+1,this.day,this.hour,this.minute,this.second,this.tz),!1)}getTime(){return this.getDate(!1).getTime()}match(a,b){if(!a.starYear&&(this.year<0||this.year>=a.year.length||0===a.year[this.year]))return!1;for(let c=0;c<m.length;c++){let d=m[c][0],e=m[c][2],f=this[d];if(f+e<0||f+e>=a[d].length)return!1;let g=a[d][f+e];if("day"===d){if(!g){for(let b=0;b<a.nearestWeekdays.length;b++)if(a.nearestWeekdays[b]){let a=this.getNearestWeekday(this.year,this.month,b-e);if(-1!==a&&a===f){g=1;break}}}if(a.lastWeekday&&f===this.getLastWeekday(this.year,this.month)&&(g=1),a.lastDayOfMonth&&f===this.getLastDayOfMonth(this.year,this.month)&&(g=1),!a.starDOW){let c=new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay(),d=a.dayOfWeek[(c+(f-1))%7];d&&63&d&&(d=+!!this.isNthWeekdayOfMonth(this.year,this.month,f,d)),g=a.useAndLogic||b.domAndDow||a.starDOM?g&&d:g||d}}if(!g)return!1}return!0}};function o(a){return"[object Function]"===Object.prototype.toString.call(a)||"function"==typeof a||a instanceof Function}var p=[],q=class{name;options;_states;fn;getTz(){return this.options.timezone||this.options.utcOffset}applyDayOffset(a){if(void 0!==this.options.dayOffset&&0!==this.options.dayOffset){let b=24*this.options.dayOffset*36e5;return new Date(a.getTime()+b)}return a}constructor(a,b,c){let d,e;if(o(b))e=b;else if("object"==typeof b)d=b;else if(void 0!==b)throw Error("Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).");if(o(c))e=c;else if("object"==typeof c)d=c;else if(void 0!==c)throw Error("Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).");if(this.name=d?.name,this.options=function(a){if(void 0===a&&(a={}),delete a.name,void 0!==a.legacyMode&&void 0===a.domAndDow?a.domAndDow=!a.legacyMode:void 0===a.domAndDow&&(a.domAndDow=!1),a.legacyMode=!a.domAndDow,a.paused=void 0!==a.paused&&a.paused,a.maxRuns=void 0===a.maxRuns?1/0:a.maxRuns,a.catch=void 0!==a.catch&&a.catch,a.interval=void 0===a.interval?0:parseInt(a.interval.toString(),10),a.utcOffset=void 0===a.utcOffset?void 0:parseInt(a.utcOffset.toString(),10),a.dayOffset=void 0===a.dayOffset?0:parseInt(a.dayOffset.toString(),10),a.unref=void 0!==a.unref&&a.unref,a.mode=void 0===a.mode?"auto":a.mode,a.alternativeWeekdays=void 0!==a.alternativeWeekdays&&a.alternativeWeekdays,a.sloppyRanges=void 0!==a.sloppyRanges&&a.sloppyRanges,!["auto","5-part","6-part","7-part","5-or-6-parts","6-or-7-parts"].includes(a.mode))throw Error("CronOptions: mode must be one of 'auto', '5-part', '6-part', '7-part', '5-or-6-parts', or '6-or-7-parts'.");if(a.startAt&&(a.startAt=new n(a.startAt,a.timezone)),a.stopAt&&(a.stopAt=new n(a.stopAt,a.timezone)),null!==a.interval){if(isNaN(a.interval))throw Error("CronOptions: Supplied value for interval is not a number");if(a.interval<0)throw Error("CronOptions: Supplied value for interval can not be negative")}if(void 0!==a.utcOffset){if(isNaN(a.utcOffset))throw Error("CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.");if(a.utcOffset<-870||a.utcOffset>870)throw Error("CronOptions: utcOffset out of bounds.");if(void 0!==a.utcOffset&&a.timezone)throw Error("CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.")}if(!0!==a.unref&&!1!==a.unref)throw Error("CronOptions: Unref should be either true, false or undefined(false).");if(void 0!==a.dayOffset&&0!==a.dayOffset&&isNaN(a.dayOffset))throw Error("CronOptions: Invalid value passed for dayOffset, should be a number representing days to offset.");return a}(d),this._states={kill:!1,blocking:!1,previousRun:void 0,currentRun:void 0,once:void 0,currentTimeout:void 0,maxRuns:d?d.maxRuns:void 0,paused:!!d&&d.paused,pattern:new k("* * * * *",void 0,{mode:"auto"})},a&&(a instanceof Date||"string"==typeof a&&a.indexOf(":")>0)?this._states.once=new n(a,this.getTz()):this._states.pattern=new k(a,this.options.timezone,{mode:this.options.mode,alternativeWeekdays:this.options.alternativeWeekdays,sloppyRanges:this.options.sloppyRanges}),this.name){if(p.find(a=>a.name===this.name))throw Error("Cron: Tried to initialize new named job '"+this.name+"', but name already taken.");p.push(this)}return void 0!==e&&o(e)&&(this.fn=e,this.schedule()),this}nextRun(a){let b=this._next(a);return b?this.applyDayOffset(b.getDate(!1)):null}nextRuns(a,b){void 0!==this._states.maxRuns&&a>this._states.maxRuns&&(a=this._states.maxRuns);let c=b||this._states.currentRun||void 0;return this._enumerateRuns(a,c,"next")}previousRuns(a,b){return this._enumerateRuns(a,b||void 0,"previous")}_enumerateRuns(a,b,c){let d=[],e=b?new n(b,this.getTz()):null,f="next"===c?this._next:this._previous;for(;a--;){let a=f.call(this,e);if(!a)break;let b=a.getDate(!1);d.push(this.applyDayOffset(b)),e=a}return d}match(a){if(this._states.once){let b=new n(a,this.getTz());b.ms=0;let c=new n(this._states.once,this.getTz());return c.ms=0,b.getTime()===c.getTime()}let b=new n(a,this.getTz());return b.ms=0,b.match(this._states.pattern,this.options)}getPattern(){if(!this._states.once)return this._states.pattern?this._states.pattern.pattern:void 0}getOnce(){return this._states.once?this._states.once.getDate():null}isRunning(){let a=this.nextRun(this._states.currentRun),b=!this._states.paused,c=void 0!==this.fn,d=!this._states.kill;return b&&c&&d&&null!==a}isStopped(){return this._states.kill}isBusy(){return this._states.blocking}currentRun(){return this._states.currentRun?this._states.currentRun.getDate():null}previousRun(){return this._states.previousRun?this._states.previousRun.getDate():null}msToNext(a){let b=this._next(a);return b?a instanceof n||a instanceof Date?b.getTime()-a.getTime():b.getTime()-new n(a).getTime():null}stop(){this._states.kill=!0,this._states.currentTimeout&&clearTimeout(this._states.currentTimeout);let a=p.indexOf(this);a>=0&&p.splice(a,1)}pause(){return this._states.paused=!0,!this._states.kill}resume(){return this._states.paused=!1,!this._states.kill}schedule(a){var b;if(a&&this.fn)throw Error("Cron: It is not allowed to schedule two functions using the same Croner instance.");a&&(this.fn=a);let c=this.msToNext(),d=this.nextRun(this._states.currentRun);return null==c||isNaN(c)||null===d||(c>3e4&&(c=3e4),this._states.currentTimeout=setTimeout(()=>this._checkTrigger(d),c),this._states.currentTimeout&&this.options.unref&&(b=this._states.currentTimeout,"u">typeof Deno&&"u">typeof Deno.unrefTimer?Deno.unrefTimer(b):b&&"u">typeof b.unref&&b.unref())),this}async _trigger(a){this._states.blocking=!0,this._states.currentRun=new n(void 0,this.getTz());try{if(this.options.catch)try{void 0!==this.fn&&await this.fn(this,this.options.context)}catch(a){if(o(this.options.catch))try{this.options.catch(a,this)}catch{}}else void 0!==this.fn&&await this.fn(this,this.options.context)}finally{this._states.previousRun=new n(a,this.getTz()),this._states.blocking=!1}}async trigger(){await this._trigger()}runsLeft(){return this._states.maxRuns}_checkTrigger(a){let b=new Date,c=!this._states.paused&&b.getTime()>=a.getTime(),d=this._states.blocking&&this.options.protect;c&&!d?(void 0!==this._states.maxRuns&&this._states.maxRuns--,this._trigger()):c&&d&&o(this.options.protect)&&setTimeout(()=>this.options.protect(this),0),this.schedule()}_next(a){let b=!!(a||this._states.currentRun),c=!1;!a&&this.options.startAt&&this.options.interval&&([a,b]=this._calculatePreviousRun(a,b),c=!a),a=new n(a,this.getTz()),this.options.startAt&&a&&a.getTime()<this.options.startAt.getTime()&&(a=this.options.startAt);let d=this._states.once||new n(a,this.getTz());return c||d===this._states.once||(d=d.increment(this._states.pattern,this.options,b)),this._states.once&&this._states.once.getTime()<=a.getTime()||null===d||void 0!==this._states.maxRuns&&this._states.maxRuns<=0||this._states.kill||this.options.stopAt&&d.getTime()>=this.options.stopAt.getTime()?null:d}_previous(a){let b=new n(a,this.getTz());this.options.stopAt&&b.getTime()>this.options.stopAt.getTime()&&(b=this.options.stopAt);let c=new n(b,this.getTz());return this._states.once?this._states.once.getTime()<b.getTime()?this._states.once:null:null===(c=c.decrement(this._states.pattern,this.options))||this.options.startAt&&c.getTime()<this.options.startAt.getTime()?null:c}_calculatePreviousRun(a,b){let c=new n(void 0,this.getTz()),d=a;if(this.options.startAt.getTime()<=c.getTime()){let a=(d=this.options.startAt).getTime()+1e3*this.options.interval;for(;a<=c.getTime();)a=(d=new n(d,this.getTz()).increment(this._states.pattern,this.options,!0)).getTime()+1e3*this.options.interval;b=!0}return null===d&&(d=void 0),[d,b]}}}};
|
|
1
|
+
"use strict";exports.id=3736,exports.ids=[3736],exports.modules={3453:(a,b,c)=>{c.d(b,{T1:()=>l});var d=c(72626),e=c(80438);let f=(0,d.h)("ip-restriction"),g=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,h=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\/(\d{1,2})$/,i=process.env.CM_ALLOWED_IPS?.trim()||"",j=process.env.CM_TRUST_PROXY?.trim()||"";""!==j&&"true"!==j&&"false"!==j&&(0,e.h)(f,"trust-proxy-unexpected",{value:j});let k="true"===j;function l(a){if(k){let b=a.get("x-forwarded-for");if(b){let a=b.split(",")[0].trim();if(a)return a}}return a.get("x-real-ip")||null}i.length>0&&function(a){let b=a.trim();if(0===b.length)return;let c=b.split(",").map(a=>a.trim()).filter(a=>a.length>0);if(c.length>256)throw Error(`CM_ALLOWED_IPS: too many entries (${c.length}). Maximum is 256.`);let d=[];for(let a of c){if(a.length>18)throw Error(`CM_ALLOWED_IPS: entry "${a}" exceeds maximum length of 18 characters.`);let b=a.match(h);if(b){let c=[parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10),parseInt(b[4],10)],e=parseInt(b[5],10);for(let b of c)if(b<0||b>255)throw Error(`CM_ALLOWED_IPS: invalid octet in "${a}". Octets must be 0-255.`);if(e<0||e>32)throw Error(`CM_ALLOWED_IPS: invalid prefix length in "${a}". Must be 0-32.`);let f=(c[0]<<24|c[1]<<16|c[2]<<8|c[3])>>>0,g=0===e?0:0xffffffff<<32-e>>>0;d.push({network:(f&g)>>>0,mask:g});continue}let c=a.match(g);if(c){let b=[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10),parseInt(c[4],10)];for(let c of b)if(c<0||c>255)throw Error(`CM_ALLOWED_IPS: invalid octet in "${a}". Octets must be 0-255.`);let e=(b[0]<<24|b[1]<<16|b[2]<<8|b[3])>>>0;d.push({network:e,mask:0xffffffff});continue}throw Error(`CM_ALLOWED_IPS: invalid entry "${a}". Expected IPv4 address or CIDR notation.`)}}(i)},66007:(a,b,c)=>{c.d(b,{B9:()=>m,Px:()=>o,b$:()=>n,h6:()=>k});var d=c(33873),e=c.n(d),f=c(29021),g=c(72626),h=c(80438);let i=(0,g.h)("path-validator"),j=/^[a-zA-Z0-9_-]+$/;function k(a){return!!a&&0!==a.length&&j.test(a)}function l(a,b){return a===b||a.startsWith(b+e().sep)}function m(a,b){if(!a||""===a.trim()||a.includes("\0"))return!1;let c=a;try{c=decodeURIComponent(a)}catch{c=a}if(c.includes("\0"))return!1;let d=e().resolve(b),f=e().resolve(b,c),g=e().relative(d,f);return!(g.startsWith("..")||e().isAbsolute(g))}function n(a,b){if(!a||""===a.trim())throw Error("Invalid path: Path cannot be empty");if(a.includes("\0"))throw Error("Invalid path: Null bytes not allowed");if(!m(a,b))throw Error(`Path is outside allowed directory: ${a} (allowed root: ${b})`);let c=a;try{c=decodeURIComponent(a)}catch{c=a}return e().resolve(b,c)}function o(a,b){let c;try{c=(0,f.realpathSync)(b)}catch{return!1}let d=e().resolve(b,a);if((0,f.existsSync)(d))try{let b=(0,f.realpathSync)(d),e=l(b,c);return e||(0,h.h)(i,"symlink-rejected",{targetPath:a,resolvedTarget:b}),e}catch{return!1}try{if((0,f.lstatSync)(d).isSymbolicLink())try{let b=(0,f.readlinkSync)(d),g=e().resolve(e().dirname(d),b),j=l(g,c);return j||(0,h.h)(i,"dangling-symlink-rejected",{targetPath:a,resolvedLinkTarget:g}),j}catch{return!1}}catch{}let g=e().dirname(d);for(;g!==e().dirname(g);){if((0,f.existsSync)(g))try{let a=(0,f.realpathSync)(g),b=l(a,c);return b||(0,h.h)(i,"symlink-ancestor-rejected",{currentPath:g,resolvedAncestor:a}),b}catch{break}g=e().dirname(g)}return!1}},80438:(a,b,c)=>{c.d(b,{h:()=>d});function d(a,b,c){a.warn(`security:${b}`,c)}},93390:(a,b,c)=>{c.d(b,{aq:()=>f,sO:()=>j,r0:()=>p,x:()=>q,zr:()=>o,y2:()=>n,nr:()=>m});var d=c(55511),e=c.n(d);let f="cm_auth_token",g=/^[0-9a-f]{64}$/,h=2592e6,i={maxAttempts:5,lockoutDuration:9e5,cleanupInterval:36e5},j=86400,k=(()=>{let a=process.env.CM_AUTH_TOKEN_HASH||void 0;return a?!function(a){return!!a&&g.test(a)}(a)?void console.error("[auth] CM_AUTH_TOKEN_HASH is not a valid SHA-256 hash"):a:void 0})(),l=function(){let a=process.env.CM_AUTH_EXPIRE,b=Date.now();if(a)try{return b+function(a){let b=a.match(/^(\d+)([hdm])$/);if(!b)throw Error(`Invalid duration format: "${a}". Use Nh, Nd, or Nm (e.g., "24h", "7d", "90m")`);let c=parseInt(b[1],10),d=b[2],e={h:36e5,d:864e5,m:6e4}[d];if(void 0===e)throw Error(`Invalid duration unit: "${d}"`);let f=c*e;if(f<36e5)throw Error(`Duration too short: minimum is 1h (60m). Got: "${a}"`);if(f>h)throw Error(`Duration too long: maximum is 30d (720h). Got: "${a}"`);return f}(a)}catch{return b+864e5}return process.env.CM_AUTH_TOKEN_HASH?b+864e5:null}();function m(a){if(!k||!a||"string"!=typeof a||null!==l&&Date.now()>l)return!1;let b=e().createHash("sha256").update(a).digest("hex"),c=Buffer.from(b,"hex"),d=Buffer.from(k,"hex");return c.length===d.length&&e().timingSafeEqual(c,d)}function n(){return!!k}function o(){if(null===l)return 0;let a=l-Date.now();return a<=0?0:Math.floor(a/1e3)}function p(a){return{httpOnly:!0,sameSite:"strict",secure:!!process.env.CM_HTTPS_CERT,maxAge:a,path:"/"}}function q(){let a=new Map,b=setInterval(()=>{let b=Date.now();for(let[c,d]of a){let e=null===d.lockedUntil||b>d.lockedUntil,f=b-d.lastAttempt>i.lockoutDuration;e&&f&&a.delete(c)}},i.cleanupInterval);return b.unref&&b.unref(),{checkLimit(b){let c=a.get(b);if(!c)return{allowed:!0};if(null!==c.lockedUntil){let a=Date.now();if(a<c.lockedUntil)return{allowed:!1,retryAfter:Math.ceil((c.lockedUntil-a)/1e3)};c.attempts=0,c.lockedUntil=null}return{allowed:!0}},recordFailure(b){let c=Date.now(),d=a.get(b)||{attempts:0,lockedUntil:null,lastAttempt:c};d.attempts++,d.lastAttempt=c,d.attempts>=i.maxAttempts&&(d.lockedUntil=c+i.lockoutDuration),a.set(b,d)},recordSuccess(b){a.delete(b)},destroy(){clearInterval(b),a.clear()}}}}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=3753,exports.ids=[3753],exports.modules={
|
|
1
|
+
"use strict";exports.id=3753,exports.ids=[3753],exports.modules={15194:(a,b,c)=>{c.d(b,{Ab:()=>g,FV:()=>s,NL:()=>r,QP:()=>t,Sj:()=>k,VA:()=>f,XH:()=>d,_J:()=>u,ef:()=>m,hR:()=>n,lu:()=>p,n6:()=>j,oo:()=>o,pL:()=>l,pQ:()=>h,vz:()=>q});let d=["claude","codex","gemini","vibe-local","opencode","copilot","antigravity"],e=new Set(["claude","opencode","copilot"]);function f(a){return e.has(a)}let g=10,h=50,i=/^[a-zA-Z0-9_-]+$/;function j(a){return"string"==typeof a&&a.length>0&&a.length<=64&&i.test(a)}function k(a,b){return!a||a===b}function l(a,b){let c=`${b}-`;return a.startsWith(c)?a.slice(c.length):a}let m={claude:"Claude",codex:"Codex",gemini:"Gemini","vibe-local":"Vibe Local",opencode:"OpenCode",copilot:"Copilot",antigravity:"Antigravity"};function n(a){return d.includes(a)}function o(a){return m[a]??a}function p(a){return a.map((a,b)=>({id:a,cliTool:a,alias:o(a),order:b}))}let q=128,r=2097152;function s(a){return"number"==typeof a&&Number.isInteger(a)&&a>=q&&a<=r}let t=/^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$/;function u(a){return"function"==typeof a.supportsImage&&!0===a.supportsImage()}},52201:(a,b,c)=>{c.d(b,{MJ:()=>h,nW:()=>g});var d=c(15194);let e=["claude","codex","antigravity"];function f(a){return a.length<2||a.length>6?{valid:!1,error:"Must be 2-6 elements"}:a.every(a=>"string"==typeof a&&d.XH.includes(a))?new Set(a).size!==a.length?{valid:!1,error:"Duplicate tool IDs not allowed"}:{valid:!0,value:a}:{valid:!1,error:"Invalid CLI tool ID"}}function g(a){if(!a)return e;try{let b=JSON.parse(a);if(!Array.isArray(b))return e;let c=f(b);if(!c.valid)return e;return c.value}catch{return e}}function h(a){return!Array.isArray(a)||a.length<2||a.length>6?{valid:!1,error:"selected_agents must be an array of 2-6 elements"}:f(a)}},52660:(a,b,c)=>{c.d(b,{DF:()=>l,EU:()=>o,PL:()=>t,Qp:()=>n,VL:()=>i,cw:()=>s,jp:()=>p,kA:()=>r,ks:()=>f,lA:()=>m,lr:()=>q,oH:()=>h,pE:()=>k,r8:()=>j});var d=c(55511);let e=(0,c(72626).h)("chat-db"),f="AND archived = 0";function g(a){let b=a.cli_tool_id??"claude";return{id:a.id,worktreeId:a.worktree_id,role:a.role,content:a.content,summary:a.summary||void 0,timestamp:new Date(a.timestamp),logFileName:a.log_file_name||void 0,requestId:a.request_id||void 0,messageType:a.message_type||"normal",promptData:a.prompt_data?JSON.parse(a.prompt_data):void 0,cliToolId:b,instanceId:a.instance_id??b,archived:1===a.archived}}function h(a,b){var c,e;let f=(0,d.randomUUID)(),g=b.cliToolId||"claude",h=b.instanceId||g;return a.prepare(`
|
|
2
2
|
INSERT INTO chat_messages
|
|
3
3
|
(id, worktree_id, role, content, summary, timestamp, log_file_name, request_id, message_type, prompt_data, cli_tool_id, instance_id)
|
|
4
4
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=3945,exports.ids=[3945],exports.modules={53945:a=>{a.exports=JSON.parse('{"sessions":{"idleAgents":"アイドル {count} 件","activeAgents":"稼働 {count} 件","title":"セッション","description":"全リポジトリの worktree セッション。","filterPlaceholder":"名前またはリポジトリで絞り込み...","filterAriaLabel":"名前またはリポジトリでセッションを絞り込む","sortByAriaLabel":"並び替え","sortAscending":"昇順に並び替え","sortDescending":"降順に並び替え","loadingAriaLabel":"セッションを読み込み中","refreshError":"セッションの更新に失敗しました: {message}","loadError":"セッションの読み込みに失敗しました: {message}","noMatching":"一致するセッションがありません。","empty":"セッションがまだありません。"},"nav":{"home":"ホーム","chat":"チャット","sessions":"セッション","repositories":"リポジトリ","repositoriesShort":"リポジトリ","review":"レビュー","reviewReport":"レビュー/レポート","more":"その他","skills":"スキル"},"repositories":{"empty":"リポジトリが登録されていません。","add":"リポジトリを追加","syncAll":"すべて同期","syncing":"同期中...","addNewTitle":"リポジトリを新規追加","localPathTab":"ローカルパス","cloneUrlTab":"クローン URL","localPathDescription":"worktree を含む git リポジトリの絶対パスを入力してください。","localPathLabel":"リポジトリパス","localPathExample":"例:
|
|
1
|
+
"use strict";exports.id=3945,exports.ids=[3945],exports.modules={53945:a=>{a.exports=JSON.parse('{"sessions":{"idleAgents":"アイドル {count} 件","activeAgents":"稼働 {count} 件","title":"セッション","description":"全リポジトリの worktree セッション。","filterPlaceholder":"名前またはリポジトリで絞り込み...","filterAriaLabel":"名前またはリポジトリでセッションを絞り込む","sortByAriaLabel":"並び替え","sortAscending":"昇順に並び替え","sortDescending":"降順に並び替え","loadingAriaLabel":"セッションを読み込み中","refreshError":"セッションの更新に失敗しました: {message}","loadError":"セッションの読み込みに失敗しました: {message}","noMatching":"一致するセッションがありません。","empty":"セッションがまだありません。"},"nav":{"home":"ホーム","chat":"チャット","sessions":"セッション","repositories":"リポジトリ","repositoriesShort":"リポジトリ","review":"レビュー","reviewReport":"レビュー/レポート","more":"その他","skills":"スキル"},"repositories":{"empty":"リポジトリが登録されていません。","add":"リポジトリを追加","syncAll":"すべて同期","syncing":"同期中...","addNewTitle":"リポジトリを新規追加","localPathTab":"ローカルパス","cloneUrlTab":"クローン URL","localPathDescription":"worktree を含む git リポジトリの絶対パスを入力してください。","localPathLabel":"リポジトリパス","localPathExample":"例: {example}","localPathAllowedRoots":"許可ルート: {roots}","browse":"参照…","pickerTitle":"リポジトリのフォルダを選択","pickerRootsLabel":"許可ルート","pickerRecentLabel":"最近使ったパス","pickerSelectHere":"このフォルダを選択","pickerUp":"1 階層上へ","pickerEmpty":"サブフォルダがありません。","pickerTruncated":"先頭 {limit} 件のみ表示しています。","pickerLoading":"読み込み中…","pickerWorktreeCount":"worktree {count} 件","validationGitRepo":"git リポジトリです(worktree {count} 件検出)","validationNotGitRepo":"このフォルダは git リポジトリではありません。","validationNotFound":"このフォルダは存在しません。","validationOutsideRoots":"許可ルート外です({roots})。","scan":"スキャンして追加","scanning":"スキャン中...","cloneUrlDescription":"リモートリポジトリをクローンする git の URL を入力してください。","cloneUrlLabel":"クローン URL","cloneUrlHelp":"HTTPS と SSH の URL に対応しています","clone":"クローン","forkAndClone":"Fork して追加","forkOptionLabel":"追加前に fork する(gh repo fork)","forkOptionHelp":"自分の GitHub アカウントに fork を作成し、それをクローンします(origin=自分の fork、upstream=元リポジトリ)。認証済みの GitHub CLI(gh)が必要です。","cloning":"クローン中...","cloneSuccess":"リポジトリをクローンしました","cloneFailed":"クローンに失敗しました","pathRequired":"リポジトリパスを入力してください","urlRequired":"クローン URL を入力してください","urlInvalid":"URL の形式が正しくありません","loading":"リポジトリを読み込み中"},"cancel":"キャンセル","send":"送信","sending":"送信中...","sendMessagePlaceholder":"メッセージを送信...","end":"終了する","ending":"終了中...","retry":"再試行","reload":"再読み込み","reconnect":"再接続","close":"閉じる","back":"戻る","menu":"メニュー","sidebar":{"open":"サイドバーを開く","close":"サイドバーを閉じる","branchNavigation":"ブランチナビゲーション","branches":"ブランチ","searchBranches":"ブランチを検索...","noBranchesFound":"ブランチが見つかりません","noBranchesAvailable":"ブランチがありません","dragToReorderGroup":"ドラッグでグループを並べ替え","switchToFlatView":"フラット表示に切り替え","switchToGroupedView":"グループ表示に切り替え"},"confirmDelete":"「{name}」を削除しますか?","favorites":{"add":"お気に入りに追加","remove":"お気に入りを解除"},"syncSuccess":"{count}件のworktreeを同期しました","syncError":"同期に失敗しました","syncAuthError":"認証エラー","syncButtonLabel":"ブランチを同期","tooltips":{"viewMode":"表示モード切替(グループ / フラット)","sort":"ブランチの並び替え","sync":"worktree を同期","repositories":"リポジトリを管理(追加・同期)"},"displaySize":{"ariaLabel":"表示サイズ","large":"大","medium":"中","small":"小","xsmall":"極小"},"confirmDialog":{"title":"確認","confirm":"OK"},"language":"言語","loadingPage":"ページを読み込み中","closeNotification":"通知を閉じる","status":{"idle":"アイドル","ready":"準備完了","running":"実行中","generating":"生成中","waiting":"応答待ち","error":"エラー","unknown":"不明"},"sort":{"options":"並び替えオプション","updatedAt":"更新日時","repositoryName":"リポジトリ","branchName":"ブランチ","status":"ステータス","lastSent":"最終送信"},"branchItem":{"cliToolStatus":"CLI ツールのステータス","hasUnread":"未読メッセージあり"},"connection":{"reconnecting":"再接続中","offline":"オフライン","reconnectingTooltip":"ライブ接続を再確立しています(ポーリングで動作中)","offlineTooltip":"ライブ接続なし(ポーリングで動作中)"},"versionMismatch":{"title":"新しいバージョンが起動しています","description":"サーバーは {serverVersion} になりましたが、このタブは {clientVersion} のままです。最新の状態にするには再読み込みしてください。","reload":"再読み込み","dismiss":"閉じる"},"meta":{"description":"Claude CLI と tmux セッションによる Git worktree 管理"}}')}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exports.id=4390,exports.ids=[4390],exports.modules={7956:(a,b,c)=>{"use strict";c.d(b,{ZU:()=>i,fW:()=>k});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f);let h=["/etc","/usr","/bin","/sbin","/var","/tmp","/dev","/sys","/proc"];function i(a,b){let c=b.endsWith("/")?b.slice(0,-1):b;return a===c||a.startsWith(c+"/")}let j=null;function k(a){let b=g().resolve(a),c=function(a){let b=[],c=a;for(;;)try{let a=e().realpathSync(c);return b.length>0?g().join(a,...b):a}catch{let d=g().dirname(c);if(d===c)return a;b.unshift(g().basename(c)),c=d}}(b);return(function(){if(null!==j)return j;let a=new Set;for(let b of h){a.add(b);try{a.add(e().realpathSync(b))}catch{}}return j=Array.from(a)})().some(a=>i(b,a)||i(c,a))}},20416:(a,b,c)=>{"use strict";c.d(b,{$b:()=>i,Sv:()=>j});var d=c(33873),e=c.n(d),f=c(21820),g=c(48870),h=c(7956);function i(){return(0,g.TJ)()?e().join((0,f.homedir)(),".commandmate","data","cm.db"):e().resolve(process.cwd(),"data","cm.db")}function j(a){let b=e().resolve(a);if((0,g.TJ)()){let a=(0,f.homedir)();if(!(0,h.ZU)(b,a))throw Error(`Security error: DB path must be within home directory: ${b}`)}else if((0,h.fW)(b))throw Error(`Security error: DB path cannot be in system directory: ${b}`);return b}},48870:(a,b,c)=>{"use strict";c.d(b,{GQ:()=>j,TJ:()=>g,Tf:()=>h,WI:()=>i});var d=c(29021),e=c(33873),f=c(21820);function g(){let a=(0,e.dirname)(__dirname);return a.includes("/lib/node_modules/")||a.includes("\\node_modules\\")||a.includes("/node_modules/commandmate")}function h(){let a=(0,e.dirname)(__dirname);return a.includes("/_npx/")||a.includes("\\_npx\\")}function i(){if(g()){let a=(0,e.join)((0,f.homedir)(),".commandmate");if((0,d.existsSync)(a)){let b=(0,d.realpathSync)(a),c=(0,d.realpathSync)((0,f.homedir)());if(!b.startsWith(c))throw Error(`Security error: Config directory ${a} is outside home directory`);return b}return a}let a=process.cwd();return(0,d.realpathSync)(a)}function j(){let a=g()?(0,e.join)((0,f.homedir)(),".commandmate"):process.cwd();return(0,d.existsSync)(a)||(0,d.mkdirSync)(a,{recursive:!0,mode:448}),i()}},72626:(a,b,c)=>{"use strict";c.d(b,{K:()=>i,h:()=>j});var d=c(87447);let e=[{pattern:/Bearer\s+[A-Za-z0-9\-._~+/]+=*/gi,replacement:"Bearer [REDACTED]"},{pattern:/(password|passwd|pwd)[=:]\s*\S+/gi,replacement:"$1=[REDACTED]"},{pattern:/(token|secret|api_key|apikey|auth)[=:]\s*\S+/gi,replacement:"$1=[REDACTED]"},{pattern:/Authorization:\s*\S+/gi,replacement:"Authorization: [REDACTED]"},{pattern:/-----BEGIN\s+\w+\s+PRIVATE\s+KEY-----[\s\S]*?-----END\s+\w+\s+PRIVATE\s+KEY-----/g,replacement:"[SSH_KEY_REDACTED]"},{pattern:/(\w+:\/\/)[^/@\s]+@/g,replacement:"$1[REDACTED]@"}],f=/password|secret|token|key|auth/i,g={debug:0,info:1,warn:2,error:3};function h(a,b,c,h,i){let j=(0,d.nR)().level;if(g[a]<g[j])return;let k=h?function a(b){if("string"==typeof b){let a=b;for(let{pattern:b,replacement:c}of e)a=a.replace(b,c);return a}if("object"==typeof b&&null!==b){if(Array.isArray(b))return b.map(a);let c={};for(let[d,e]of Object.entries(b))f.test(d)?c[d]="[REDACTED]":c[d]=a(e);return c}return b}(h):void 0,l=function(a){if("json"===(0,d.nR)().format)return JSON.stringify(a);let{timestamp:b,level:c,module:e,action:f,data:g,worktreeId:h,cliToolId:i,requestId:j}=a,k=[h,i].filter(Boolean),l=k.length>0?` [${k.join(":")}]`:"",m=j?` (${j.slice(0,8)})`:"",n=g?` ${JSON.stringify(g)}`:"";return`[${b}] [${c.toUpperCase()}] [${e}]${l}${m} ${f}${n}`}({level:a,module:b,action:c,timestamp:new Date().toISOString(),...i,...k&&{data:k}});switch(a){case"error":console.error(l);break;case"warn":console.warn(l);break;default:console.log(l)}}function i(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{let b=16*Math.random()|0;return("x"===a?b:3&b|8).toString(16)})}function j(a){let b=c=>({debug:(b,d)=>h("debug",a,b,d,c),info:(b,d)=>h("info",a,b,d,c),warn:(b,d)=>h("warn",a,b,d,c),error:(b,d)=>h("error",a,b,d,c),withContext:a=>b({...c,...a})});return b()}},78335:()=>{},87447:(a,b,c)=>{"use strict";c.d(b,{_$:()=>l,_p:()=>i,nR:()=>k});var d=c(33873),e=c.n(d),f=c(20416);let g={CM_ROOT_DIR:"MCBD_ROOT_DIR",CM_PORT:"MCBD_PORT",CM_BIND:"MCBD_BIND",CM_LOG_LEVEL:"MCBD_LOG_LEVEL",CM_LOG_FORMAT:"MCBD_LOG_FORMAT",CM_LOG_DIR:"MCBD_LOG_DIR",CM_DB_PATH:"MCBD_DB_PATH"},h=new Set;function i(a){var b=g[a];let c=process.env[a];if(void 0!==c)return c;let d=process.env[b];return void 0!==d?(h.has(b)||(console.warn(`[DEPRECATED] ${b} is deprecated, use ${a} instead`),h.add(b)),d):void 0}let j=!1;function k(){let a=i("CM_LOG_LEVEL")?.toLowerCase(),b=i("CM_LOG_FORMAT")?.toLowerCase();return{level:void 0!==a&&["debug","info","warn","error"].includes(a)?a:"info",format:"json"===b?"json":"text"}}function l(){let a,b=i("CM_ROOT_DIR")||process.cwd(),c=parseInt(i("CM_PORT")||"3000",10),d=i("CM_BIND")||"127.0.0.1",g=i("CM_DB_PATH"),h=g||function(){let a=process.env.DATABASE_PATH;return a&&!j&&(console.warn("[DEPRECATED] DATABASE_PATH is deprecated. Use CM_DB_PATH instead."),j=!0),a}()||(0,f.$b)();if(!b)throw Error("CM_ROOT_DIR (or MCBD_ROOT_DIR) is required");if(isNaN(c)||c<1||c>65535)throw Error(`Invalid CM_PORT: ${i("CM_PORT")}. Must be between 1 and 65535.`);if("127.0.0.1"!==d&&"0.0.0.0"!==d&&"localhost"!==d)throw Error(`Invalid CM_BIND: ${d}. Must be '127.0.0.1', '0.0.0.0', or 'localhost'.`);try{a=(0,f.Sv)(h)}catch(b){if(void 0!==g){let a=b instanceof Error?b.message:String(b);throw Error(`Invalid CM_DB_PATH: ${a}. Set CM_DB_PATH to an allowed location, or unset it to use the default (${(0,f.$b)()}).`)}console.warn(`[Security] Invalid DB path "${h}", using default.`),a=(0,f.Sv)((0,f.$b)())}return{CM_ROOT_DIR:e().resolve(b),CM_PORT:c,CM_BIND:d,CM_DB_PATH:a}}},96487:()=>{}};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";exports.id=4440,exports.ids=[4440],exports.modules={44440:(a,b,c)=>{c.d(b,{an:()=>l,pM:()=>m,pg:()=>h});var d=c(75359);let e={BYTES_LIMIT:"SKILL_YAML_BYTES_LIMIT",DEPTH_LIMIT:"SKILL_YAML_DEPTH_LIMIT",NODE_LIMIT:"SKILL_YAML_NODE_LIMIT",SCALAR_LIMIT:"SKILL_YAML_SCALAR_LIMIT",ALIAS_FORBIDDEN:"SKILL_YAML_ALIAS_FORBIDDEN",MERGE_KEY_FORBIDDEN:"SKILL_YAML_MERGE_KEY_FORBIDDEN",TAG_FORBIDDEN:"SKILL_YAML_TAG_FORBIDDEN",DUPLICATE_KEY:"SKILL_YAML_DUPLICATE_KEY",FORBIDDEN_KEY:"SKILL_YAML_FORBIDDEN_KEY",MULTIPLE_DOCUMENTS:"SKILL_YAML_MULTIPLE_DOCUMENTS",ENCODING:"SKILL_YAML_ENCODING",UNSUPPORTED:"SKILL_YAML_UNSUPPORTED",SYNTAX:"SKILL_YAML_SYNTAX"},f={[e.BYTES_LIMIT]:"YAML document exceeds the size limit",[e.DEPTH_LIMIT]:"YAML document is nested too deeply",[e.NODE_LIMIT]:"YAML document has too many nodes",[e.SCALAR_LIMIT]:"YAML scalar exceeds the length limit",[e.ALIAS_FORBIDDEN]:"YAML anchors and aliases are not accepted",[e.MERGE_KEY_FORBIDDEN]:"YAML merge keys are not accepted",[e.TAG_FORBIDDEN]:"YAML tags are not accepted",[e.DUPLICATE_KEY]:"YAML mapping declares the same key twice",[e.FORBIDDEN_KEY]:"YAML mapping uses a forbidden key",[e.MULTIPLE_DOCUMENTS]:"YAML stream carries more than one document",[e.ENCODING]:"YAML document is not valid UTF-8 text",[e.UNSUPPORTED]:"YAML document uses an unsupported construct",[e.SYNTAX]:"YAML document could not be parsed"};class g extends Error{constructor(a,b){super(f[a]),this.name="SkillYamlError",this.code=a,void 0!==b&&(this.line=b)}}function h(a){return a instanceof g}let i=/^(?:"(?:[^"\\]|\\.)*"|'(?:[^']|'')*'|[A-Za-z_][A-Za-z0-9_.-]*)[ \t]*:(?:[ \t]|$)/;function j(a){let b=null;for(let c=0;c<a.length;c++){let d=a[c];if('"'===b)"\\"===d?c++:'"'===d&&(b=null);else if("'"===b)"'"===d&&(b=null);else if('"'===d||"'"===d)b=d;else if("#"===d&&(0===c||" "===a[c-1]||" "===a[c-1]))return a.slice(0,c)}return a}class k{constructor(a,b){this.cursor=0,this.nodes=0,this.documentEnded=!1,this.documentStarted=!1,this.lines=a,this.profile=b}parseDocument(){let a=this.peek();if(!a)return null;if(0!==a.indent)throw new g(e.SYNTAX,a.number);let b=this.parseNode(0,1);this.skipToSignificant();let c=this.peek();if(c)throw new g(e.SYNTAX,c.number);return b}skipToSignificant(){for(;this.cursor<this.lines.length;){let a=this.lines[this.cursor];if(!a.significant){this.cursor++;continue}let b=a.content.trim();if("..."===b){this.documentEnded=!0,this.cursor++;continue}if("---"===b){if(this.documentStarted)throw new g(e.MULTIPLE_DOCUMENTS,a.number);this.documentStarted=!0,this.cursor++;continue}if(this.documentEnded)throw new g(e.MULTIPLE_DOCUMENTS,a.number);this.documentStarted=!0;return}}peek(){return this.skipToSignificant(),this.cursor<this.lines.length?this.lines[this.cursor]:null}countNode(a){if(this.nodes++,this.nodes>this.profile.maxNodes)throw new g(e.NODE_LIMIT,a.number)}checkDepth(a,b){if(a>this.profile.maxDepth)throw new g(e.DEPTH_LIMIT,b.number)}parseNode(a,b){let c=this.peek();return c?(this.checkDepth(b,c),this.isSequenceEntry(c.content)?this.parseSequence(a,b):this.parseMapping(a,b)):null}isSequenceEntry(a){return"-"===a||a.startsWith("- ")}parseMapping(a,b){let c=Object.create(null),d=new Set;for(;;){let f=this.peek();if(!f||f.indent<a)break;if(f.indent>a||this.isSequenceEntry(f.content))throw new g(e.SYNTAX,f.number);this.countNode(f);let h=this.readKey(f);if(d.has(h)&&!this.profile.allowDuplicateKeys)throw new g(e.DUPLICATE_KEY,f.number);d.add(h);let i=f.content.indexOf(":",this.keyTokenLength(f.content)),k=j(f.content.slice(i+1)).trim();this.cursor++,c[h]=this.parseValue(k,a,b,f)}return c}parseSequence(a,b){let c=[];for(;;){let d=this.peek();if(!d||d.indent<a)break;if(d.indent>a)throw new g(e.SYNTAX,d.number);if(!this.isSequenceEntry(d.content))break;this.countNode(d);let f="-"===d.content?"":d.content.slice(2),h=d.content.length-f.length,k=j(f).trim();if(""===k){this.cursor++,c.push(this.parseIndentedValue(a,b+1,d));continue}if(this.isSequenceEntry(k))throw new g(e.UNSUPPORTED,d.number);if(i.test(f.trimStart())){let e=a+h+(f.length-f.trimStart().length);d.indent=e,d.content=f.trimStart(),this.checkDepth(b+1,d),c.push(this.parseMapping(e,b+1));continue}this.cursor++,this.countNode(d),c.push(this.parseScalar(k,d))}return c}keyTokenLength(a){if(a.startsWith('"')||a.startsWith("'")){let b=a[0];for(let c=1;c<a.length;c++){if('"'===b&&"\\"===a[c]){c++;continue}if(a[c]===b)return c+1}}return 0}readKey(a){let b=a.content;if(b.startsWith("<<"))throw new g(e.MERGE_KEY_FORBIDDEN,a.number);if(b.startsWith("&")||b.startsWith("*"))throw new g(e.ALIAS_FORBIDDEN,a.number);if(b.startsWith("!"))throw new g(e.TAG_FORBIDDEN,a.number);if(b.startsWith("?")||b.startsWith("[")||b.startsWith("{"))throw new g(e.UNSUPPORTED,a.number);if(!i.test(b))throw new g(e.SYNTAX,a.number);let c=this.keyTokenLength(b),d=b.indexOf(":",c),f=b.slice(0,d).trim(),h=f.startsWith('"')||f.startsWith("'")?this.parseQuoted(f,a):f;if(h.length>this.profile.maxScalarLength)throw new g(e.SCALAR_LIMIT,a.number);if(this.profile.forbiddenKeys.includes(h))throw new g(e.FORBIDDEN_KEY,a.number);return h}parseValue(a,b,c,d){if(""===a){let a=this.peek();return a&&a.indent===b&&this.isSequenceEntry(a.content)?(this.checkDepth(c+1,a),this.parseSequence(b,c+1)):this.parseIndentedValue(b,c+1,d)}return"|"===a[0]||">"===a[0]?this.parseBlockScalar(a,b,d):(this.countNode(d),this.parseScalar(a,d))}parseIndentedValue(a,b,c){let d=this.peek();return!d||d.indent<=a?(this.countNode(c),null):(this.checkDepth(b,d),this.parseNode(d.indent,b))}parseScalar(a,b){if(a.startsWith("&")||a.startsWith("*"))throw new g(e.ALIAS_FORBIDDEN,b.number);if(a.startsWith("!"))throw new g(e.TAG_FORBIDDEN,b.number);if("[]"===a)return this.countNode(b),[];if("{}"===a)return this.countNode(b),Object.create(null);if(a.startsWith("[")||a.startsWith("{")||a.startsWith("%")||a.startsWith("`"))throw new g(e.UNSUPPORTED,b.number);if(a.startsWith('"')||a.startsWith("'")){let c=this.parseQuoted(a,b);return this.checkScalarLength(c,b),c}return this.checkScalarLength(a,b),this.resolvePlain(a)}checkScalarLength(a,b){if(a.length>this.profile.maxScalarLength)throw new g(e.SCALAR_LIMIT,b.number)}resolvePlain(a){if("~"===a||"null"===a||"Null"===a||"NULL"===a)return null;if("true"===a||"True"===a||"TRUE"===a)return!0;if("false"===a||"False"===a||"FALSE"===a)return!1;if(/^-?(?:0|[1-9][0-9]*)$/.test(a)){let b=Number(a);return Number.isSafeInteger(b)?b:a}return/^-?(?:0|[1-9][0-9]*)\.[0-9]+$/.test(a)?Number(a):a}parseQuoted(a,b){let c=a[0];if(a.length<2||!a.endsWith(c))throw new g(e.SYNTAX,b.number);let d=a.slice(1,-1);if("'"===c){let a="";for(let c=0;c<d.length;c++){if("'"===d[c]){if("'"!==d[c+1])throw new g(e.SYNTAX,b.number);c++}a+=d[c]}return a}let f="";for(let a=0;a<d.length;a++){let c=d[a];if("\\"!==c){if('"'===c)throw new g(e.SYNTAX,b.number);f+=c;continue}let h=d[++a];switch(h){case'"':case"\\":case"/":f+=h;break;case"n":f+="\n";break;case"t":f+=" ";break;case"r":f+="\r";break;case"u":{let c=d.slice(a+1,a+5);if(!/^[0-9a-fA-F]{4}$/.test(c))throw new g(e.SYNTAX,b.number);f+=String.fromCharCode(parseInt(c,16)),a+=4;break}default:throw new g(e.UNSUPPORTED,b.number)}}return f}parseBlockScalar(a,b,c){let d,f=/^([|>])([-+]?)$/.exec(a.trim());if(!f)throw new g(e.UNSUPPORTED,c.number);let[,h,i]=f,j=[],k=-1;for(;this.cursor<this.lines.length;){let a=this.lines[this.cursor],c=""===a.raw.trim();if(!c&&a.indent<=b)break;c||-1!==k||(k=a.indent),j.push(c?"":a.raw.slice(k)),this.cursor++}for(;j.length>0&&""===j[j.length-1];)j.pop();return this.countNode(c),d="|"===h?j.join("\n"):j.reduce((a,b,c)=>{if(0===c)return b;let d=j[c-1];return""===b||""===d?`${a}
|
|
2
|
+
${b}`:`${a} ${b}`},""),"-"!==i&&j.length>0&&(d+="\n"),this.checkScalarLength(d,c),d}}function l(a,b=d.WL){if(b.allowAliases||b.allowCustomTags)throw new g(e.UNSUPPORTED);return new k(function(a){if(a.includes("\uFEFF"))throw new g(e.ENCODING);let b=a.replace(/\r\n/g,"\n");if(b.includes("\r"))throw new g(e.ENCODING);let c=[],d=b.split("\n");for(let a=0;a<d.length;a++){let b=d[a],f=a+1;for(let a=0;a<b.length;a++){let c=b.charCodeAt(a);if(c<32&&9!==c||127===c)throw new g(e.ENCODING,f)}let h=0;for(;h<b.length&&" "===b[h];)h++;if(" "===b[h])throw new g(e.SYNTAX,f);let i=b.slice(h);c.push({number:f,raw:b,indent:h,content:i,significant:i.length>0&&!i.startsWith("#")})}return c}(function(a,b){if(("string"==typeof a?Buffer.byteLength(a,"utf8"):a.byteLength)>b)throw new g(e.BYTES_LIMIT);if("string"==typeof a)return a;try{return new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!1}).decode(a)}catch{throw new g(e.ENCODING)}}(a,b.maxBytes)),b).parseDocument()}function m(a,b=d.WL){let c=a.replace(/\r\n/g,"\n");if(!c.startsWith("---\n"))return null;let e=c.indexOf("\n---",3);return -1===e?null:l(c.slice(4,e+1),b)}}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=4444,exports.ids=[4444],exports.modules={12462:(a,b,c)=>{c.d(b,{T8:()=>j,o4:()=>k});var d=c(31766),e=c(56791),f=c(
|
|
1
|
+
"use strict";exports.id=4444,exports.ids=[4444],exports.modules={12462:(a,b,c)=>{c.d(b,{T8:()=>j,o4:()=>k});var d=c(31766),e=c(56791),f=c(69297),g=c(82450),h=c(15194);let i=(0,c(72626).h)("assistant-response-saver");function j(a,b){switch(b){case"claude":return(0,g.NN)(a);case"gemini":return(0,g.IS)(a);case"opencode":return(0,g.aW)(a);case"copilot":return(0,g.LH)(a);default:return a.trim()}}async function k(a,b,c,g,k){let l=k??c;try{let m;if((0,h.VA)(c))return null;let n=(0,e.y1)(a,b,l),o=n?.lastCapturedLine||0;try{m=await (0,d.Wh)(b,c,1e4,k)}catch{return i.info("failed-to-capture"),null}if(!m)return null;let p=m.split("\n"),q=p.length;for(;q>0&&""===p[q-1].trim();)q--;let r=q,{bufferReset:s,reason:t}=r>0&&o>25&&r+25<o?{bufferReset:!0,reason:"shrink"}:r>0&&o>50&&r<50?{bufferReset:!0,reason:"restart"}:{bufferReset:!1,reason:null};s&&i.info("buffer:reset-detected",{reason:t,currentLineCount:r,lastCapturedLine:o});let u=s?0:o;if(!s&&r<=o)return r<o&&((0,e.gb)(a,b,c,r,k),i.info("position:corrected-stale",{from:o,to:r})),null;let v=p.slice(u).join("\n"),w=j(v,c);if(!w||""===w.trim())return(0,e.gb)(a,b,c,r,k),i.debug("response:empty-after-clean",{currentLineCount:r}),null;let x=new Date(g.getTime()-1),y=(0,e.oH)(a,{worktreeId:b,role:"assistant",content:w,messageType:"normal",timestamp:x,cliToolId:c,instanceId:l});return(0,e.gb)(a,b,c,r,k),(0,f.Lo)("message",{worktreeId:b,message:y}),i.info("response:saved",{fromLine:o,toLine:r}),y}catch(a){return i.error("error:",{error:a instanceof Error?a.message:String(a)}),null}}},16700:(a,b,c)=>{c.d(b,{A:()=>e,Y:()=>f});let d=new Set(["claude","codex","antigravity"]);function e(a){return d.has(a)?"non_interactive":"interactive"}function f(a){return"non_interactive"===e(a)}},46961:(a,b,c)=>{c.d(b,{e:()=>f});var d=c(56791),e=c(82149);function f(a,b){if(!(0,d.iT)(a,b))return;let c=(0,d.ce)(a,b),f=(0,e.kx)(b);c&&!f&&((0,d.az)(a,c.id,{status:"failed",finishedAt:new Date,stderrText:[c.stderrText??"","[Execution reconciled after process registry loss]"].filter(Boolean).join("\n")}),(0,d.xR)(a,b,{status:"ready"}))}},49070:(a,b,c)=>{c.d(b,{A:()=>l});var d=c(31766),e=c(3523),f=c(12462),g=c(56791),h=c(57821),i=c(72626),j=c(26283);let k=(0,i.h)("assistant/conversation-response-saver");async function l(a,b,c,i=new Date){try{let k=(0,g.qK)(a,b),l=k?.lastCapturedLine??0,m=(0,h.G)(b),n=await (0,d.Wh)(m,c,1e4),o="codex"===c?function(a,b){let c=a.split("\n"),d=c.length;for(;d>0&&""===c[d-1].trim();)d--;let e=c.slice(0,d),f=[];for(let a=Math.max(0,b);a<e.length;a++){let b=(0,j.aJ)(e[a]).trimEnd();/^›(?:\s+.*)?$/.test(b)&&f.push(a)}if(f.length<2)return null;let g=f[f.length-2],h=f[f.length-1],i=(0,j.aJ)(e.slice(g+1,h).join("\n")).trim();return i?!function(a){let b=a.trim();return/^•\s+Working\s+\(\d+s\s+•\s+esc to interrupt\)$/i.test(b)||/^•\s+Thinking\s+\(\d+s\s+•\s+esc to interrupt\)$/i.test(b)||/^•\s+Running/i.test(b)}(i)?{response:i,lineCount:h}:null:{response:"",lineCount:h}}(n,l):null,p=o?{response:o.response,isComplete:!0,lineCount:o.lineCount,bufferReset:!1}:(0,e.z$)(n,l,c);if(!p||!p.isComplete||!p.bufferReset&&p.lineCount<=l)return null;let q=(0,f.T8)(p.response,c);if(!q||""===q.trim()||"[No content]"===q)return(0,g.PP)(a,b,p.lineCount),null;let r=(0,g.qp)(a,{conversationId:b,role:"assistant",content:q,messageType:"normal",timestamp:i});return(0,g.PP)(a,b,p.lineCount),r}catch(a){return k.debug("save:skipped",{conversationId:b,cliToolId:c,error:a instanceof Error?a.message:String(a)}),null}}},57821:(a,b,c)=>{c.d(b,{G:()=>e,O:()=>f});var d=c(31268);function e(a){return`assistant-${a}`}function f(a,b){let c=d.s.getInstance().getTool(a),f=e(b),g=c.getSessionName(f);return{cliTool:c,worktreeId:f,sessionName:g}}},67502:(a,b,c)=>{c.d(b,{JD:()=>h,_$:()=>g});var d=c(15194),e=c(10406),f=c(73753);function g(a,b,c=new Date){var h;let i=(0,d.oo)(a);return[`You are an assistant using ${i}, running inside CommandMate.`,"",(h="commandmate-cli"===process.env.CM_LAUNCHED_BY?"commandmate":"commandmatedev",`## CommandMate CLI Reference
|
|
2
2
|
|
|
3
3
|
The user runs a CommandMate server locally. These are the CLI commands available from their terminal:
|
|
4
4
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=4548,exports.ids=[4548],exports.modules={4548:(a,b,c)=>{c.d(b,{uu:()=>o}),c(55511);var d=c(29021);c(33873),c(7956);var e=c(75359),f=c(93356),g=c(55927),h=c(44440);d.constants.O_NOFOLLOW;let i=[".bash",".bat",".cjs",".cmd",".fish",".js",".lua",".mjs",".php",".pl",".ps1",".py",".rb",".sh",".ts",".zsh"],j=[".md",".markdown",".rst",".txt"];function k(a){let b=a.slice(a.lastIndexOf("/")+1),c=b.lastIndexOf(".");return c<=0?"":b.slice(c).toLowerCase()}function l(a,b){return!!i.includes(k(a))||b.length>=2&&35===b[0]&&33===b[1]}function m(a,b){throw new g.Om(a,b)}function n(a,b){return a.files.find(a=>a.path===b)}function o(a,b){return function(a,b){let c;for(let b of e.wD)n(a,b)||m(g.xC.LAYOUT_INVALID,{reason:"missing-required-entry",entry:b});let d=function(a){let b,c=n(a,e.KH);for(let b of(c||m(g.xC.MANIFEST_MISSING,{reason:"absent"}),a.files))b.path!==e.KH&&b.path.endsWith(`/${e.KH}`)&&m(g.xC.LAYOUT_INVALID,{reason:"nested-manifest",entry:(0,g.FC)(b.path)});try{b=(0,h.an)(c.bytes)}catch(a){throw(0,h.pg)(a)&&m(g.xC.MANIFEST_INVALID,{reason:a.code}),a}let d=(0,e.bX)(b);if(!d.ok){let a=d.errors[0];m(g.xC.MANIFEST_INVALID,{reason:a.code,field:a.path})}return d.value}(a);d.id!==b.skillId&&m(g.xC.MANIFEST_MISMATCH,{reason:"id"}),d.version!==b.version&&m(g.xC.MANIFEST_MISMATCH,{reason:"version"});let i=n(a,e.Wr);i||m(g.xC.SKILL_MD_INVALID,{reason:"absent"});try{c=(0,h.pM)(Buffer.from(i.bytes).toString("utf8"))}catch(a){throw(0,h.pg)(a)&&m(g.xC.SKILL_MD_INVALID,{reason:a.code}),a}(null===c||"object"!=typeof c||Array.isArray(c))&&m(g.xC.SKILL_MD_INVALID,{reason:"frontmatter-missing"});let o=c.name;"string"!=typeof o&&m(g.xC.SKILL_MD_INVALID,{reason:"frontmatter-name-missing"});let p=(0,e.EU)({directoryName:d.id,skillMdName:o,manifestId:d.id,manifestName:d.name});p.ok||m(g.xC.SKILL_MD_INVALID,{reason:p.errors[0].code});let q=(0,e.Yz)(d,a.files.map(a=>a.path));if(!q.ok){let a=q.errors[0];m(g.xC.MANIFEST_MISMATCH,{reason:a.message,entry:(0,g.FC)(String(a.detail?.path??""))})}for(let b of a.files)b.path!==e.KH&&function(a,b){var c,d;let h=b.files.find(b=>b.path===a.path);h||m(g.xC.MANIFEST_MISMATCH,{reason:"undeclared-file",entry:(0,g.FC)(a.path)});let i={entry:(0,g.FC)(a.path)};h.size!==a.size&&m(g.xC.SIZE_MISMATCH,i),(0,f.U2)(h.sha256,a.sha256)||m(g.xC.DIGEST_MISMATCH,i);let n=(c=a.path,d=a.bytes,c===e.Wr?"skill_md":l(c,d)?"script":j.includes(k(c))?"instruction":"asset");l(a.path,a.bytes)&&(!h.script||"script"!==h.kind)&&m(g.xC.UNDECLARED_SCRIPT,i),"script"!==h.kind||h.script||m(g.xC.MANIFEST_MISMATCH,{...i,reason:"kind-script-not-declared"}),"skill_md"===n!=("skill_md"===h.kind)&&m(g.xC.MANIFEST_MISMATCH,{...i,reason:"kind-mismatch"}),a.executable&&!h.executable&&m(g.xC.UNDECLARED_EXECUTABLE,i),!a.executable&&h.executable&&m(g.xC.MANIFEST_MISMATCH,{...i,reason:"executable-not-present"})}(b,d);let r={executable_paths:d.files.filter(a=>a.executable).map(a=>a.path).sort(),script_paths:d.files.filter(a=>a.script).map(a=>a.path).sort(),network_hosts:[...d.requirements.network_hosts],declared_permissions:[...d.declared_permissions]},s=(0,e.MD)(r),t=new Map(a.files.map(a=>[a.path,a.bytes])),u=a.files.map(a=>({path:a.path,sha256:a.sha256,size:a.size,executable:a.executable})).sort((a,b)=>a.path<b.path?-1:+(a.path>b.path));return Object.freeze({skillId:b.skillId,version:b.version,manifest:d,files:Object.freeze(u),directories:Object.freeze([...a.directories].sort()),inspection:Object.freeze(r),declaredRisk:d.declared_risk,computedRisk:s,effectiveRisk:(0,e.qZ)(d.declared_risk,s),readFile(a){let b=t.get(a);return b||m(g.xC.MANIFEST_MISMATCH,{reason:"unknown-file",entry:(0,g.FC)(a)}),new Uint8Array(b)}})}((0,g.qt)(a,b),b)}},55927:(a,b,c)=>{c.d(b,{FC:()=>l,Om:()=>j,qt:()=>q,uI:()=>k,xC:()=>g});var d=c(74075),e=c(75359),f=c(93356);let g={ARCHIVE_FORMAT:"SKILL_PACKAGE_ARCHIVE_FORMAT",ARCHIVE_TRUNCATED:"SKILL_PACKAGE_ARCHIVE_TRUNCATED",ENTRY_TYPE_FORBIDDEN:"SKILL_PACKAGE_ENTRY_TYPE_FORBIDDEN",ENTRY_PATH_UNSAFE:"SKILL_PACKAGE_ENTRY_PATH_UNSAFE",ENTRY_DUPLICATE:"SKILL_PACKAGE_ENTRY_DUPLICATE",ENTRY_COLLISION:"SKILL_PACKAGE_ENTRY_COLLISION",ENTRY_MODE_FORBIDDEN:"SKILL_PACKAGE_ENTRY_MODE_FORBIDDEN",ENTRY_LIMIT_EXCEEDED:"SKILL_PACKAGE_ENTRY_LIMIT_EXCEEDED",SIZE_LIMIT_EXCEEDED:"SKILL_PACKAGE_SIZE_LIMIT_EXCEEDED",COMPRESSION_RATIO_EXCEEDED:"SKILL_PACKAGE_COMPRESSION_RATIO_EXCEEDED",LAYOUT_INVALID:"SKILL_PACKAGE_LAYOUT_INVALID",MANIFEST_MISSING:"SKILL_PACKAGE_MANIFEST_MISSING",MANIFEST_INVALID:"SKILL_PACKAGE_MANIFEST_INVALID",MANIFEST_MISMATCH:"SKILL_PACKAGE_MANIFEST_MISMATCH",UNDECLARED_EXECUTABLE:"SKILL_PACKAGE_UNDECLARED_EXECUTABLE",UNDECLARED_SCRIPT:"SKILL_PACKAGE_UNDECLARED_SCRIPT",DIGEST_MISMATCH:"SKILL_PACKAGE_DIGEST_MISMATCH",SIZE_MISMATCH:"SKILL_PACKAGE_SIZE_MISMATCH",SKILL_MD_INVALID:"SKILL_PACKAGE_SKILL_MD_INVALID",STAGING_IO:"SKILL_PACKAGE_STAGING_IO",ABORTED:"SKILL_PACKAGE_ABORTED"},h={[g.ARCHIVE_FORMAT]:"archive",[g.ARCHIVE_TRUNCATED]:"archive",[g.ENTRY_TYPE_FORBIDDEN]:"path",[g.ENTRY_PATH_UNSAFE]:"path",[g.ENTRY_DUPLICATE]:"path",[g.ENTRY_COLLISION]:"path",[g.ENTRY_MODE_FORBIDDEN]:"path",[g.ENTRY_LIMIT_EXCEEDED]:"limit",[g.SIZE_LIMIT_EXCEEDED]:"limit",[g.COMPRESSION_RATIO_EXCEEDED]:"limit",[g.LAYOUT_INVALID]:"manifest",[g.MANIFEST_MISSING]:"manifest",[g.MANIFEST_INVALID]:"manifest",[g.MANIFEST_MISMATCH]:"manifest",[g.UNDECLARED_EXECUTABLE]:"manifest",[g.UNDECLARED_SCRIPT]:"manifest",[g.DIGEST_MISMATCH]:"integrity",[g.SIZE_MISMATCH]:"integrity",[g.SKILL_MD_INVALID]:"manifest",[g.STAGING_IO]:"staging",[g.ABORTED]:"staging"},i={[g.ARCHIVE_FORMAT]:"Skill package is not a readable tar.gz archive",[g.ARCHIVE_TRUNCATED]:"Skill package archive is truncated",[g.ENTRY_TYPE_FORBIDDEN]:"Skill package contains a forbidden entry type",[g.ENTRY_PATH_UNSAFE]:"Skill package contains an unsafe entry path",[g.ENTRY_DUPLICATE]:"Skill package declares the same entry twice",[g.ENTRY_COLLISION]:"Skill package contains colliding entry paths",[g.ENTRY_MODE_FORBIDDEN]:"Skill package entry carries forbidden mode bits",[g.ENTRY_LIMIT_EXCEEDED]:"Skill package contains too many entries",[g.SIZE_LIMIT_EXCEEDED]:"Skill package exceeds a size limit",[g.COMPRESSION_RATIO_EXCEEDED]:"Skill package decompression ratio exceeds the limit",[g.LAYOUT_INVALID]:"Skill package layout does not match the contract",[g.MANIFEST_MISSING]:"Skill package manifest is missing or misplaced",[g.MANIFEST_INVALID]:"Skill package manifest is not valid",[g.MANIFEST_MISMATCH]:"Skill package manifest does not match the package",[g.UNDECLARED_EXECUTABLE]:"Skill package contains an undeclared executable",[g.UNDECLARED_SCRIPT]:"Skill package contains an undeclared script",[g.DIGEST_MISMATCH]:"Skill package file digest does not match the manifest",[g.SIZE_MISMATCH]:"Skill package file size does not match the manifest",[g.SKILL_MD_INVALID]:"Skill package SKILL.md is missing or inconsistent",[g.STAGING_IO]:"Skill package staging could not be prepared",[g.ABORTED]:"Skill package processing was aborted"};class j extends Error{constructor(a,b){super(i[a]),this.name="SkillPackageError",this.code=a,this.category=h[a],b&&(this.detail=b)}}function k(a){return a instanceof j}function l(a){let b=a.replace(/[^A-Za-z0-9._/-]/g,a=>[...a].map(a=>`%${a.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`).join(""));return b.length>120?`${b.slice(0,120)}…`:b}function m(a,b){throw new j(a,b)}let n=new Set(["0","\0"]);function o(a,b,c){let d=a.subarray(b,b+c),e=d.indexOf(0);-1===e&&(e=d.length);for(let a=e;a<d.length;a++)0!==d[a]&&m(g.ARCHIVE_FORMAT,{field:"padding"});let f=Buffer.from(d.subarray(0,e)),h=f.toString("utf8");return Buffer.from(h,"utf8").equals(f)||m(g.ARCHIVE_FORMAT,{field:"encoding"}),h}function p(a,b,c){(128&a[b])!=0&&m(g.ARCHIVE_FORMAT,{field:"numeric-encoding"});let d="";for(let e=b;e<b+c;e++){let b=a[e];0!==b&&32!==b&&((b<48||b>55)&&m(g.ARCHIVE_FORMAT,{field:"numeric"}),d+=String.fromCharCode(b))}if(""===d)return 0;let e=parseInt(d,8);return Number.isSafeInteger(e)||m(g.ARCHIVE_FORMAT,{field:"numeric-range"}),e}function q(a,b){let c;(a.byteLength<2||31!==a[0]||139!==a[1])&&m(g.ARCHIVE_FORMAT,{field:"gzip-magic"});try{c=(0,d.gunzipSync)(a,{maxOutputLength:0x4000000})}catch(a){"ERR_BUFFER_TOO_LARGE"===a?.code&&m(g.SIZE_LIMIT_EXCEEDED,{limit:0x4000000}),m(g.ARCHIVE_FORMAT,{field:"gzip"})}c.byteLength>1048576&&c.byteLength/a.byteLength>200&&m(g.COMPRESSION_RATIO_EXCEEDED,{limit:200});let h=(function(a){(0===a.byteLength||a.byteLength%512!=0)&&m(g.ARCHIVE_TRUNCATED,{field:"alignment"});let b=[],c=0;for(;c+512<=a.byteLength;){let d=a.subarray(c,c+512);if(function(a){for(let b=0;b<a.length;b++)if(0!==a[b])return!1;return!0}(d)){for(let b=c;b<a.byteLength;b++)0!==a[b]&&m(g.ARCHIVE_FORMAT,{field:"trailer"});return b}!function(a,b){let c=0,d=0;for(let b=0;b<512;b++){let e=b>=148&&b<156?32:a[b];c+=e,d+=e>127?e-256:e}b!==c&&b!==d&&m(g.ARCHIVE_FORMAT,{field:"checksum"})}(d,p(d,148,8)),"ustar"!==o(d,257,6).trim()&&m(g.ARCHIVE_FORMAT,{field:"magic"});let f=o(d,156,1)||"\0",h="5"===f;h||n.has(f)||m(g.ENTRY_TYPE_FORBIDDEN,{typeflag:l(f)}),""!==o(d,157,100)&&m(g.ENTRY_TYPE_FORBIDDEN,{typeflag:"link"});let i=p(d,100,8);(3584&i)!=0&&m(g.ENTRY_MODE_FORBIDDEN,{bits:(3584&i).toString(8)});let j=o(d,345,155),k=o(d,0,100),q=""===j?k:`${j}/${k}`,r=p(d,124,12);h&&0!==r&&m(g.ARCHIVE_FORMAT,{field:"directory-size"}),r>e.em&&m(g.SIZE_LIMIT_EXCEEDED,{limit:e.em});let s=c+512,t=s+r;t>a.byteLength&&m(g.ARCHIVE_TRUNCATED),b.push({name:q,isDirectory:h,mode:i,size:r,bytes:h?new Uint8Array(0):a.subarray(s,t)}),b.length>1e3&&m(g.ENTRY_LIMIT_EXCEEDED,{limit:1e3}),c=s+512*Math.ceil(r/512)}return m(g.ARCHIVE_TRUNCATED,{field:"trailer"})})(c).map(a=>({entry:a,...function(a){let b=a;b.startsWith("./")&&(b=b.slice(2));let c=b.endsWith("/");return c&&(b=b.slice(0,-1)),""===b&&m(g.ENTRY_PATH_UNSAFE,{reason:"empty"}),{path:b,trailingSlash:c}}(a.name)})),i=function(a,b){let c=[b.skillId,`${b.skillId}-${b.version}`],d=new Set(a.map(a=>a.split("/")[0]));if(1!==d.size)return null;let e=[...d][0];return a.some(a=>a.startsWith(`${e}/`))?(c.includes(e)||m(g.LAYOUT_INVALID,{reason:"root-directory",entry:l(e)}),e):null}(h.map(a=>a.path),b),j=[],k=[],q=new Map,r=new Map,s=0;for(let a of h){let b=a.path;if(null!==i){if(b===i)continue;b=b.slice(i.length+1)}let c=a.entry.isDirectory||a.trailingSlash,d=(0,e.r5)(b,"/entry");d.ok||m(g.ENTRY_PATH_UNSAFE,{entry:l(b),reason:d.errors[0].message}),q.has(b)&&m(g.ENTRY_DUPLICATE,{entry:l(b)});let h=b.split("/").map(a=>(0,e.vy)(a)).join("/");if(void 0!==r.get(h)&&m(g.ENTRY_COLLISION,{entry:l(b)}),q.set(b,c),r.set(h,b),c){k.push(b);continue}(s+=a.entry.size)>0x4000000&&m(g.SIZE_LIMIT_EXCEEDED,{limit:0x4000000});let n=new Uint8Array(a.entry.bytes);j.push({path:b,size:a.entry.size,sha256:(0,f.Q_)(n),executable:(73&a.entry.mode)!=0,bytes:n})}for(let a of(j.filter(a=>a.path!==e.KH).length>e.xP&&m(g.ENTRY_LIMIT_EXCEEDED,{limit:e.xP}),k))j.some(b=>b.path===a)&&m(g.ENTRY_DUPLICATE,{entry:l(a)});for(let a of j){let b=a.path.split("/").slice(0,-1),c="";for(let d of b)c=""===c?d:`${c}/${d}`,j.some(a=>a.path===c)&&m(g.ENTRY_PATH_UNSAFE,{entry:l(a.path),reason:"parent-is-file"})}return{rootName:i,files:j,directories:k,compressedSize:a.byteLength,decompressedSize:c.byteLength}}}};
|