commandmate 0.33.0 → 0.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +280 -273
- package/.next/app-path-routes-manifest.json +31 -30
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +9 -9
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +8 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/versions/route_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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/capabilities/route_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/metrics/vibe/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/escalation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/subscriptions/route.js +1 -1
- package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/route.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/todos/route.js +1 -1
- package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/route.js +1 -1
- package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-reference/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/env/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/notes/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/instances/notes/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +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_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-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_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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/repositories/page.js +1 -1
- package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sessions/page.js +1 -1
- package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/page_client-reference-manifest.js +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 +12 -12
- 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 +31 -30
- package/.next/server/chunks/1191.js +1 -1
- package/.next/server/chunks/1886.js +2 -2
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/5354.js +1 -1
- package/.next/server/chunks/6337.js +1 -1
- package/.next/server/chunks/6401.js +1 -1
- package/.next/server/chunks/6661.js +1 -1
- package/.next/server/chunks/6838.js +1 -1
- package/.next/server/chunks/7875.js +1 -1
- package/.next/server/chunks/8807.js +163 -131
- package/.next/server/chunks/9584.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{4718-d97f52cd932dc1ee.js → 4718-2bc5cdf06573bf54.js} +1 -1
- package/.next/static/chunks/app/api/{app/update/route-8bc5b680c5f3eae4.js → agents/update/route-c4d2d5016c5f2a0a.js} +1 -1
- package/.next/static/chunks/app/api/agents/{update/route-8bc5b680c5f3eae4.js → versions/route-c4d2d5016c5f2a0a.js} +1 -1
- package/.next/static/chunks/app/api/app/{update-check/route-8bc5b680c5f3eae4.js → update/route-c4d2d5016c5f2a0a.js} +1 -1
- package/.next/static/chunks/app/api/{agents/versions/route-8bc5b680c5f3eae4.js → app/update-check/route-c4d2d5016c5f2a0a.js} +1 -1
- package/.next/static/chunks/app/api/assistant/conversation/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/assistant/current-output/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/assistant/messages/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/assistant/session/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/assistant/start/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/assistant/terminal/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/assistant/tools/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/capabilities/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/fs/browse/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/fs/recent-paths/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/hooks/agent-event/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/hooks/permission-request/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/metrics/vibe/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/push/escalation/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/relays/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/remote/pair/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/repositories/validate-path/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/settings/default-agents/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/skills/installations/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/skills/operations/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/skills/reindex/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/skills/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/templates/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/todos/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/{page-6871cca022b24807.js → page-022090bf6f932818.js} +1 -1
- package/.next/static/chunks/app/proxy/[...path]/route-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/repositories/{page-788ded1b72963d94.js → page-2576158c8420fda0.js} +1 -1
- package/.next/static/chunks/app/sessions/page-584adf11ae51df10.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/layout-c4d2d5016c5f2a0a.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-13ca0ba551fe5cfb.js +1 -0
- package/.next/static/css/acd46e25427a2080.css +1 -0
- package/.next/trace +14 -13
- package/.next/types/app/api/worktrees/[id]/instances/notes/route.ts +347 -0
- package/.next/types/routes.d.ts +2 -1
- package/.next/types/validator.ts +9 -0
- package/dist/server/locales/en/worktree.json +8 -0
- package/dist/server/locales/ja/worktree.json +8 -0
- package/dist/server/src/lib/cli-tools/base.js +311 -1
- package/dist/server/src/lib/cli-tools/start-availability.js +52 -0
- package/dist/server/src/lib/db/agent-instances-db.js +213 -1
- 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/v61-session-notes.js +85 -0
- package/dist/server/src/lib/push/failure-push-notifier.js +68 -1
- package/dist/server/src/lib/push/push-sender.js +16 -5
- package/dist/server/src/lib/session/current-output-builder.js +156 -4
- package/package.json +1 -1
- package/.next/static/chunks/app/api/assistant/conversation/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/assistant/current-output/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/assistant/messages/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/assistant/session/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/assistant/start/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/assistant/terminal/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/assistant/tools/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/capabilities/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/fs/browse/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/fs/recent-paths/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/hooks/agent-event/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/hooks/permission-request/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/metrics/vibe/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/push/escalation/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/relays/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/remote/pair/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/repositories/validate-path/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/settings/default-agents/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/skills/[id]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/skills/installations/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/skills/operations/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/skills/reindex/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/skills/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/templates/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/todos/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/sessions/page-fa2d62f3e8436c69.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/layout-8bc5b680c5f3eae4.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-18a7d9374bd8c218.js +0 -1
- package/.next/static/css/fb455b4e308adbaa.css +0 -1
- /package/.next/static/{eVkZd6vpcQwyJIlbymCUg → 9lgw9hA727UMyFhXryGWG}/_buildManifest.js +0 -0
- /package/.next/static/{eVkZd6vpcQwyJIlbymCUg → 9lgw9hA727UMyFhXryGWG}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,153 @@
|
|
|
1
|
-
"use strict";exports.id=8807,exports.ids=[8807],exports.modules={23718:(a,b,c)=>{c.d(b,{a1:()=>j,ko:()=>i});var d=c(55511),e=c(33873),f=c.n(e);function g(a){return a.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}let h="worktree";function i(a,b=[]){let c=b instanceof Set?b:new Set(b),e=g(f().basename(a))||h;if(!c.has(e))return e;let j=(0,d.createHash)("sha256").update(a).digest("hex");for(let a=8;a<=j.length;a+=8){let b=`${e}-${j.slice(0,a)}`;if(!c.has(b))return b}for(let a=2;;a++){let b=`${e}-${j}-${a}`;if(!c.has(b))return b}}function j(a,b){if(!a)return!1;let c=g(f().basename(b))||h;if(a===c)return!0;if(!a.startsWith(`${c}-`))return!1;let e=a.slice(c.length+1),i=(0,d.createHash)("sha256").update(b).digest("hex");return!!(e.length>0&&e.length%8==0&&e.length<=i.length&&i.startsWith(e))||/^-[0-9]+$/.test(e.slice(i.length))&&e.startsWith(i)}},
|
|
1
|
+
"use strict";exports.id=8807,exports.ids=[8807],exports.modules={23718:(a,b,c)=>{c.d(b,{a1:()=>j,ko:()=>i});var d=c(55511),e=c(33873),f=c.n(e);function g(a){return a.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}let h="worktree";function i(a,b=[]){let c=b instanceof Set?b:new Set(b),e=g(f().basename(a))||h;if(!c.has(e))return e;let j=(0,d.createHash)("sha256").update(a).digest("hex");for(let a=8;a<=j.length;a+=8){let b=`${e}-${j.slice(0,a)}`;if(!c.has(b))return b}for(let a=2;;a++){let b=`${e}-${j}-${a}`;if(!c.has(b))return b}}function j(a,b){if(!a)return!1;let c=g(f().basename(b))||h;if(a===c)return!0;if(!a.startsWith(`${c}-`))return!1;let e=a.slice(c.length+1),i=(0,d.createHash)("sha256").update(b).digest("hex");return!!(e.length>0&&e.length%8==0&&e.length<=i.length&&i.startsWith(e))||/^-[0-9]+$/.test(e.slice(i.length))&&e.startsWith(i)}},28274:(a,b,c)=>{c.d(b,{AC:()=>f,BN:()=>k,Cs:()=>n,NU:()=>p,Oe:()=>q,Uq:()=>o,YN:()=>r,bK:()=>v,ds:()=>t,fs:()=>m,m0:()=>j,pq:()=>w,sB:()=>l,ug:()=>g,w$:()=>s,w_:()=>u});var d=c(79827),e=c(15194);class f extends Error{constructor(a,b=e.Ab){super(`Worktree ${a} cannot have more than ${b} agent instances`),this.name="AgentInstanceLimitError"}}class g extends Error{constructor(a){super(a),this.name="InvalidAgentInstanceError"}}function h(a){let b=a.cli_tool_id,c=a.alias&&a.alias.length>0?a.alias:(0,e.hR)(a.cli_tool_id)?(0,e.oo)(b):a.cli_tool_id;return{id:a.instance_id,cliTool:b,alias:c,order:a.sort_order}}function i(a){if(!(0,e.n6)(a.id))throw new g(`Invalid instance id: ${String(a.id)}`);if(!(0,e.hR)(a.cliTool))throw new g(`Invalid CLI tool: ${String(a.cliTool)}`);if("string"==typeof a.alias&&a.alias.length>e.pQ)throw new g(`Alias exceeds ${e.pQ} characters`)}function j(a,b){return a.prepare(`
|
|
2
|
+
SELECT worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at
|
|
3
|
+
FROM agent_instances
|
|
4
|
+
WHERE worktree_id = ?
|
|
5
|
+
ORDER BY sort_order ASC, instance_id ASC
|
|
6
|
+
`).all(b).map(h)}function k(a,b,c){let d=a.prepare(`
|
|
7
|
+
SELECT worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at
|
|
8
|
+
FROM agent_instances
|
|
9
|
+
WHERE worktree_id = ? AND instance_id = ?
|
|
10
|
+
`).get(b,c);return d?h(d):null}function l(a,b,c,d){if(!c)return{ok:!0,cliToolId:d??null};let f=k(a,b,c);return f&&(0,e.hR)(f.cliTool)?d&&d!==f.cliTool?{ok:!1,instanceId:c,rosterCliTool:f.cliTool,requestedCliTool:d}:{ok:!0,cliToolId:f.cliTool}:d?{ok:!0,cliToolId:d}:(0,e.hR)(c)?{ok:!0,cliToolId:c}:{ok:!0,cliToolId:null}}function m(a,b){return a.prepare(`
|
|
11
|
+
SELECT COUNT(*) as count FROM agent_instances WHERE worktree_id = ?
|
|
12
|
+
`).get(b).count}function n(a,b,c){if(c.length>e.Ab)throw new f(b);let d=new Set;for(let a of c){if(i(a),d.has(a.id))throw new g(`Duplicate instance id: ${a.id}`);d.add(a.id)}let h=Date.now();a.transaction(()=>{a.prepare("DELETE FROM agent_instances WHERE worktree_id = ?").run(b),function(a,b,c){if(0===c.length)return a.prepare(`
|
|
13
|
+
DELETE FROM opencode_instance_settings WHERE worktree_id = ?
|
|
14
|
+
`).run(b).changes;let d=c.map(()=>"?").join(", ");a.prepare(`
|
|
15
|
+
DELETE FROM opencode_instance_settings
|
|
16
|
+
WHERE worktree_id = ? AND instance_id NOT IN (${d})
|
|
17
|
+
`).run(b,...c).changes}(a,b,c.map(a=>a.id)),function(a,b,c){if(0===c.length)return a.prepare(`
|
|
18
|
+
DELETE FROM session_notes WHERE worktree_id = ?
|
|
19
|
+
`).run(b).changes;let d=c.map(()=>"?").join(", ");a.prepare(`
|
|
20
|
+
DELETE FROM session_notes
|
|
21
|
+
WHERE worktree_id = ? AND instance_id NOT IN (${d})
|
|
22
|
+
`).run(b,...c).changes}(a,b,c.map(a=>a.id));let d=a.prepare(`
|
|
23
|
+
INSERT INTO agent_instances
|
|
24
|
+
(worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at)
|
|
25
|
+
VALUES (?, ?, ?, ?, ?, ?)
|
|
26
|
+
`);c.forEach((a,c)=>{let e=a.alias??"",f=Number.isInteger(a.order)?a.order:c;d.run(b,a.id,a.cliTool,e,f,h)})})()}function o(a,b,c){i(c),a.transaction(()=>{let d=m(a,b);if(d>=e.Ab)throw new f(b);if(k(a,b,c.id))throw new g(`Instance ${c.id} already exists for worktree ${b}`);let h=Number.isInteger(c.order)?c.order:d;a.prepare(`
|
|
27
|
+
INSERT INTO agent_instances
|
|
28
|
+
(worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at)
|
|
29
|
+
VALUES (?, ?, ?, ?, ?, ?)
|
|
30
|
+
`).run(b,c.id,c.cliTool,c.alias??"",h,Date.now())})()}function p(a,b,c){let d=a.prepare(`
|
|
31
|
+
DELETE FROM agent_instances WHERE worktree_id = ? AND instance_id = ?
|
|
32
|
+
`).run(b,c);return a.prepare(`
|
|
33
|
+
DELETE FROM opencode_instance_settings WHERE worktree_id = ? AND instance_id = ?
|
|
34
|
+
`).run(b,c),a.prepare(`
|
|
35
|
+
DELETE FROM session_notes WHERE worktree_id = ? AND instance_id = ?
|
|
36
|
+
`).run(b,c),d.changes>0}function q(a,b){let c=a.prepare(`
|
|
37
|
+
SELECT instance_id, agent, provider_id, model_id, variant
|
|
38
|
+
FROM opencode_instance_settings
|
|
39
|
+
WHERE worktree_id = ?
|
|
40
|
+
`).all(b),e={};for(let a of c)e[a.instance_id]=(0,d.ZH)({agent:a.agent,providerId:a.provider_id,modelId:a.model_id,variant:a.variant});return e}function r(a,b,c,f,h=Date.now()){if(!(0,e.n6)(c))throw new g(`Invalid instance id: ${String(c)}`);let i=(0,d.ZH)(f);return(0,d.Mj)(i)?a.prepare(`
|
|
41
|
+
INSERT INTO opencode_instance_settings
|
|
42
|
+
(worktree_id, instance_id, agent, provider_id, model_id, variant, updated_at)
|
|
43
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
44
|
+
ON CONFLICT(worktree_id, instance_id) DO UPDATE SET
|
|
45
|
+
agent = excluded.agent,
|
|
46
|
+
provider_id = excluded.provider_id,
|
|
47
|
+
model_id = excluded.model_id,
|
|
48
|
+
variant = excluded.variant,
|
|
49
|
+
updated_at = excluded.updated_at
|
|
50
|
+
`).run(b,c,i.agent,i.providerId,i.modelId,i.variant,h):a.prepare(`
|
|
51
|
+
DELETE FROM opencode_instance_settings WHERE worktree_id = ? AND instance_id = ?
|
|
52
|
+
`).run(b,c),i}let s=100;class t extends Error{constructor(a=s){super(`Session note exceeds ${a} characters`),this.name="SessionNoteTooLongError"}}function u(a,b){let c=a.prepare(`
|
|
53
|
+
SELECT instance_id, note, updated_at
|
|
54
|
+
FROM session_notes
|
|
55
|
+
WHERE worktree_id = ?
|
|
56
|
+
`).all(b),d={};for(let a of c)d[a.instance_id]={text:a.note,updatedAt:a.updated_at};return d}function v(a){let b=a.prepare(`
|
|
57
|
+
SELECT worktree_id, instance_id, note, updated_at
|
|
58
|
+
FROM session_notes
|
|
59
|
+
`).all(),c={};for(let a of b)(c[a.worktree_id]??(c[a.worktree_id]={}))[a.instance_id]={text:a.note,updatedAt:a.updated_at};return c}function w(a,b,c,d,f=Date.now()){if(!(0,e.n6)(c))throw new g(`Invalid instance id: ${String(c)}`);let h=function(a){if("string"!=typeof a)return"";let b="";for(let c of a){let a=c.codePointAt(0)??0;b+=a<32||127===a?" ":c}return b.replace(/\s+/g," ").trim()}(d);if(Array.from(h).length>s)throw new t;return 0===h.length?(a.prepare(`
|
|
60
|
+
DELETE FROM session_notes WHERE worktree_id = ? AND instance_id = ?
|
|
61
|
+
`).run(b,c),null):(a.prepare(`
|
|
62
|
+
INSERT INTO session_notes (worktree_id, instance_id, note, updated_at)
|
|
63
|
+
VALUES (?, ?, ?, ?)
|
|
64
|
+
ON CONFLICT(worktree_id, instance_id) DO UPDATE SET
|
|
65
|
+
note = excluded.note,
|
|
66
|
+
updated_at = excluded.updated_at
|
|
67
|
+
`).run(b,c,h,f),{text:h,updatedAt:f})}},34129:(a,b,c)=>{c.d(b,{$$:()=>n,CR:()=>h,DP:()=>i,GF:()=>o,Ud:()=>m,Xm:()=>r,_O:()=>k,j2:()=>l,jf:()=>q,kx:()=>j,ul:()=>p});var d=c(55511),e=c(87374);let f="id, worktree_id, cli_tool_id, instance_id, message, delay_ms, scheduled_send_time, status, created_at, sent_at, error";function g(a){return{id:a.id,worktreeId:a.worktree_id,cliToolId:a.cli_tool_id,instanceId:a.instance_id??a.cli_tool_id,message:a.message,delayMs:a.delay_ms,scheduledSendTime:a.scheduled_send_time,status:a.status,createdAt:a.created_at,sentAt:a.sent_at,error:a.error??null}}function h(a,b){let c=(0,d.randomUUID)(),e=Date.now(),f=e+b.delayMs,g=b.instanceId??b.cliToolId;return a.prepare(`
|
|
68
|
+
INSERT INTO timer_messages (id, worktree_id, cli_tool_id, instance_id, message, delay_ms, scheduled_send_time, status, created_at, sent_at)
|
|
69
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, 'pending', ?, NULL)
|
|
70
|
+
`).run(c,b.worktreeId,b.cliToolId,g,b.message,b.delayMs,f,e),{id:c,worktreeId:b.worktreeId,cliToolId:b.cliToolId,instanceId:g,message:b.message,delayMs:b.delayMs,scheduledSendTime:f,status:"pending",createdAt:e,sentAt:null,error:null}}function i(a,b,c){let{before:d,limit:h=e.XS}=c??{},i=`SELECT ${f} FROM timer_messages WHERE worktree_id = ?`,j=[b];return void 0!==d&&(i+=" AND created_at < ?",j.push(d)),i+=" ORDER BY created_at DESC LIMIT ?",j.push(h+1),a.prepare(i).all(...j).map(g)}function j(a,b){let c=a.prepare(`
|
|
71
|
+
SELECT ${f}
|
|
72
|
+
FROM timer_messages
|
|
73
|
+
WHERE id = ?
|
|
74
|
+
`).get(b);return c?g(c):void 0}function k(a){return a.prepare(`
|
|
75
|
+
SELECT ${f}
|
|
76
|
+
FROM timer_messages
|
|
77
|
+
WHERE status = 'pending'
|
|
78
|
+
ORDER BY scheduled_send_time ASC
|
|
79
|
+
`).all().map(g)}function l(a,b,c,d,e){let f=["status = ?"],g=[c];void 0!==d&&(f.push("sent_at = ?"),g.push(d)),void 0!==e&&(f.push("error = ?"),g.push(e)),g.push(b),a.prepare(`UPDATE timer_messages SET ${f.join(", ")} WHERE id = ?`).run(...g)}function m(a,b){return a.prepare(`
|
|
80
|
+
UPDATE timer_messages SET status = 'cancelled' WHERE id = ? AND status = 'pending'
|
|
81
|
+
`).run(b).changes>0}function n(a,b){return a.prepare(`
|
|
82
|
+
UPDATE timer_messages SET status = 'cancelled' WHERE worktree_id = ? AND status = 'pending'
|
|
83
|
+
`).run(b).changes}function o(a,b){return a.prepare(`
|
|
84
|
+
SELECT COUNT(*) as count FROM timer_messages WHERE worktree_id = ? AND status = 'pending'
|
|
85
|
+
`).get(b).count}function p(a,b){let c=Date.now()-24*b*36e5;return a.prepare(`
|
|
86
|
+
DELETE FROM timer_messages
|
|
87
|
+
WHERE status NOT IN ('pending', 'sending')
|
|
88
|
+
AND created_at < ?
|
|
89
|
+
`).run(c).changes}function q(a,b){return a.prepare(`
|
|
90
|
+
DELETE FROM timer_messages
|
|
91
|
+
WHERE worktree_id = ?
|
|
92
|
+
AND status NOT IN ('pending', 'sending')
|
|
93
|
+
`).run(b).changes}function r(a){return a.prepare(`
|
|
94
|
+
UPDATE timer_messages SET status = 'failed', error = ? WHERE status = 'sending'
|
|
95
|
+
`).run("Recovered from a stuck 'sending' state after a server restart.").changes}},43167:(a,b,c)=>{c.d(b,{CF:()=>k,Se:()=>l,VP:()=>g,Zj:()=>o,gn:()=>m,jA:()=>j,jJ:()=>p,rC:()=>n,s6:()=>f,th:()=>q});var d=c(55511);let e={prompt:"enabled_prompt",failure:"enabled_prompt",completion:"enabled_completion"},f={enabledPrompt:!0,enabledCompletion:!1},g=1;function h(a){return{id:a.id,endpoint:a.endpoint,keys:{p256dh:a.p256dh,auth:a.auth},deviceLabel:a.device_label,enabledPrompt:1===a.enabled_prompt,enabledCompletion:1===a.enabled_completion,locale:a.locale,defaultsVersion:a.defaults_version,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at)}}let i=`
|
|
96
|
+
id, endpoint, p256dh, auth, device_label,
|
|
97
|
+
enabled_prompt, enabled_completion, locale, defaults_version, created_at, updated_at
|
|
98
|
+
`;function j(a,b){let c=Date.now(),e=b.deviceLabel??null,h=b.locale??null;a.prepare(`
|
|
99
|
+
INSERT INTO push_subscriptions (
|
|
100
|
+
id, endpoint, p256dh, auth, device_label,
|
|
101
|
+
enabled_prompt, enabled_completion, locale, defaults_version, created_at, updated_at
|
|
102
|
+
)
|
|
103
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
104
|
+
ON CONFLICT(endpoint) DO UPDATE SET
|
|
105
|
+
p256dh = excluded.p256dh,
|
|
106
|
+
auth = excluded.auth,
|
|
107
|
+
device_label = excluded.device_label,
|
|
108
|
+
locale = COALESCE(excluded.locale, push_subscriptions.locale),
|
|
109
|
+
updated_at = excluded.updated_at
|
|
110
|
+
`).run((0,d.randomUUID)(),b.endpoint,b.p256dh,b.auth,e,+!!f.enabledPrompt,+!!f.enabledCompletion,h,g,c,c);let i=k(a,b.endpoint);if(!i)throw Error("Failed to persist push subscription");return i}function k(a,b){let c=a.prepare(`SELECT ${i} FROM push_subscriptions WHERE endpoint = ?`).get(b);return c?h(c):null}function l(a){return a.prepare(`SELECT ${i} FROM push_subscriptions ORDER BY created_at ASC`).all().map(h)}function m(a,b){let c=e[b];return a.prepare(`SELECT ${i} FROM push_subscriptions WHERE ${c} = 1 ORDER BY created_at ASC`).all().map(h)}function n(a,b){let c=e[b];return a.prepare(`SELECT COUNT(*) AS total FROM push_subscriptions WHERE ${c} = 1`).get().total}function o(a){return a.defaultsVersion<g}function p(a,b,c){let d=["updated_at = ?"],e=[Date.now()];return void 0!==c.enabledPrompt&&(d.push("enabled_prompt = ?"),e.push(+!!c.enabledPrompt)),void 0!==c.enabledCompletion&&(d.push("enabled_completion = ?"),e.push(+!!c.enabledCompletion)),c.acknowledgeDefaultsNotice&&(d.push("defaults_version = ?"),e.push(g)),e.push(b),a.prepare(`UPDATE push_subscriptions SET ${d.join(", ")} WHERE endpoint = ?`).run(...e),k(a,b)}function q(a,b){return a.prepare("DELETE FROM push_subscriptions WHERE endpoint = ?").run(b).changes>0}},48524:(a,b,c)=>{c.d(b,{EL:()=>g,Hi:()=>e,MH:()=>r,UT:()=>l,Vk:()=>n,Zj:()=>q,__:()=>p,gg:()=>m,sA:()=>f,uB:()=>i,xZ:()=>o});var d=c(55511);let e=["pending","running","waiting_input","verifying","succeeded","failed","not_started","cancelled"],f=["succeeded","failed","not_started","cancelled"],g=["running","waiting_input","verifying"],h=[...g,"failed","not_started"];function i(a){return f.includes(a)}let j=`
|
|
111
|
+
id, worktree_id, cli_tool_id, instance_id, title, goal, contract_path, contract_json,
|
|
112
|
+
status, last_verification_run_id, created_at, updated_at, started_at, finished_at
|
|
113
|
+
`;function k(a){return{id:a.id,worktreeId:a.worktree_id,cliToolId:a.cli_tool_id,instanceId:a.instance_id,title:a.title,goal:a.goal,contractPath:a.contract_path,contract:JSON.parse(a.contract_json),status:a.status,lastVerificationRunId:a.last_verification_run_id,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at),startedAt:null===a.started_at?null:new Date(a.started_at),finishedAt:null===a.finished_at?null:new Date(a.finished_at)}}function l(a,b){let c=Date.now(),e=(0,d.randomUUID)(),f=b.status??"pending";a.prepare(`
|
|
114
|
+
INSERT INTO tasks (
|
|
115
|
+
id, worktree_id, cli_tool_id, instance_id, title, goal, contract_path, contract_json,
|
|
116
|
+
status, last_verification_run_id, created_at, updated_at, started_at, finished_at
|
|
117
|
+
)
|
|
118
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, NULL, ?, ?, ?, NULL)
|
|
119
|
+
`).run(e,b.worktreeId,b.cliToolId,b.instanceId??null,b.contract.title,b.contract.goal,b.contractPath??null,JSON.stringify(b.contract),f,c,c,"pending"===f?null:c);let g=m(a,e);if(!g)throw Error("Failed to persist task");return g}function m(a,b){let c=a.prepare(`SELECT ${j} FROM tasks WHERE id = ?`).get(b);return c?k(c):null}function n(a,b,c=20){return a.prepare(`
|
|
120
|
+
SELECT ${j} FROM tasks
|
|
121
|
+
WHERE worktree_id = ?
|
|
122
|
+
ORDER BY created_at DESC, rowid DESC
|
|
123
|
+
LIMIT ?
|
|
124
|
+
`).all(b,c).map(k)}function o(a,b,c,d={}){let e=Date.now();if(0===a.prepare(`
|
|
125
|
+
UPDATE tasks
|
|
126
|
+
SET status = ?,
|
|
127
|
+
updated_at = ?,
|
|
128
|
+
started_at = CASE WHEN ? = 'pending' THEN started_at ELSE COALESCE(started_at, ?) END,
|
|
129
|
+
finished_at = CASE WHEN ? = 1 THEN ? ELSE finished_at END,
|
|
130
|
+
last_verification_run_id = COALESCE(?, last_verification_run_id)
|
|
131
|
+
WHERE id = ?
|
|
132
|
+
`).run(c,e,c,e,+!!i(c),e,d.lastVerificationRunId??null,b).changes)throw Error(`Task ${b} not found`);return m(a,b)}function p(a,b,c,d){let e=["worktree_id = ?"],f=[b];void 0!==c&&(e.push("cli_tool_id = ?"),f.push(c)),void 0!==d&&(e.push("instance_id = ?"),f.push(d));let h=g.map(()=>"?").join(", "),i=a.prepare(`
|
|
133
|
+
SELECT ${j} FROM tasks
|
|
134
|
+
WHERE ${e.join(" AND ")} AND status IN (${h})
|
|
135
|
+
ORDER BY updated_at DESC, created_at DESC, rowid DESC
|
|
136
|
+
LIMIT 1
|
|
137
|
+
`).get(...f,...g);return i?k(i):null}function q(a,b){let c=h.map(()=>"?").join(", "),d=a.prepare(`
|
|
138
|
+
SELECT ${j} FROM tasks
|
|
139
|
+
WHERE worktree_id = ? AND status IN (${c})
|
|
140
|
+
ORDER BY updated_at DESC, created_at DESC, rowid DESC
|
|
141
|
+
LIMIT 1
|
|
142
|
+
`).get(b,...h);return d?k(d):null}function r(a,b,c,d){let e=d===c,f=g.map(()=>"?").join(", "),h=a.prepare(`
|
|
143
|
+
SELECT ${j} FROM tasks
|
|
144
|
+
WHERE worktree_id = ?
|
|
145
|
+
AND cli_tool_id = ?
|
|
146
|
+
AND (instance_id = ? OR (instance_id IS NULL AND ?))
|
|
147
|
+
AND status IN (${f})
|
|
148
|
+
ORDER BY updated_at DESC, created_at DESC, rowid DESC
|
|
149
|
+
LIMIT 1
|
|
150
|
+
`).get(b,c,d,+!!e,...g);return h?k(h):null}},67469:(a,b,c)=>{c.d(b,{FT:()=>f,Mj:()=>g,PS:()=>h,Wy:()=>ab,vI:()=>aa,i6:()=>i});var d=c(33873),e=c.n(d);let f=61;function g(a){try{let b=a.prepare("SELECT MAX(version) as version FROM schema_version").get();return b?.version??0}catch{return 0}}function h(a){try{return a.prepare(`
|
|
2
151
|
SELECT version, name, applied_at
|
|
3
152
|
FROM schema_version
|
|
4
153
|
ORDER BY version ASC
|
|
@@ -1123,7 +1272,17 @@
|
|
|
1123
1272
|
`),a.exec(`
|
|
1124
1273
|
CREATE INDEX IF NOT EXISTS idx_session_relays_open
|
|
1125
1274
|
ON session_relays(state, expires_at);
|
|
1126
|
-
`)},down:a=>{a.exec("DROP TABLE IF EXISTS session_relays;")}}
|
|
1275
|
+
`)},down:a=>{a.exec("DROP TABLE IF EXISTS session_relays;")}},{version:61,name:"session-notes",up:a=>{a.exec(`
|
|
1276
|
+
CREATE TABLE IF NOT EXISTS session_notes (
|
|
1277
|
+
worktree_id TEXT NOT NULL,
|
|
1278
|
+
instance_id TEXT NOT NULL,
|
|
1279
|
+
note TEXT NOT NULL,
|
|
1280
|
+
updated_at INTEGER NOT NULL,
|
|
1281
|
+
|
|
1282
|
+
PRIMARY KEY (worktree_id, instance_id),
|
|
1283
|
+
FOREIGN KEY (worktree_id) REFERENCES worktrees(id) ON DELETE CASCADE
|
|
1284
|
+
);
|
|
1285
|
+
`)},down:a=>{a.exec("DROP TABLE IF EXISTS session_notes;")}}];function aa(a){!function(a,b){a.exec(`
|
|
1127
1286
|
CREATE TABLE IF NOT EXISTS schema_version (
|
|
1128
1287
|
version INTEGER PRIMARY KEY,
|
|
1129
1288
|
name TEXT NOT NULL,
|
|
@@ -1132,134 +1291,7 @@
|
|
|
1132
1291
|
`);let c=g(a);if(console.log(`Current schema version: ${c}`),c>f)throw Error(`This database (schema v${c}) was created by a newer version of CommandMate (this build supports up to v${f}). Please update: commandmate update`);let d=b.filter(a=>a.version>c);if(0===d.length)return console.log("Schema is up to date");for(let b of(console.log(`Found ${d.length} pending migration(s)`),d)){console.log(`Applying migration ${b.version}: ${b.name}...`);try{a.transaction(()=>{b.up(a),a.prepare(`
|
|
1133
1292
|
INSERT INTO schema_version (version, name, applied_at)
|
|
1134
1293
|
VALUES (?, ?, ?)
|
|
1135
|
-
`).run(b.version,b.name,Date.now())})(),console.log(`Migration ${b.version} applied successfully`)}catch(c){let a=c instanceof Error?c.message:String(c);throw console.error(`Migration ${b.version} failed:`,a),Error(`Migration ${b.version} (${b.name}) failed: ${a}`)}}console.log(`All migrations completed. Current version: ${g(a)}`)}(a,_)}function ab(a,b){!function(a,b,c){let d=g(a);if(c>=d)return console.log("No rollback needed");for(let e of(console.log(`Rolling back from version ${d} to ${c}...`),b.filter(a=>a.version>c&&a.version<=d).sort((a,b)=>b.version-a.version))){if(!e.down)throw Error(`Cannot rollback migration ${e.version} (${e.name}): no down() function defined`);console.log(`Rolling back migration ${e.version}: ${e.name}...`);try{a.transaction(()=>{e.down(a),a.prepare("DELETE FROM schema_version WHERE version = ?").run(e.version)})(),console.log(`Migration ${e.version} rolled back`)}catch(b){let a=b instanceof Error?b.message:String(b);throw console.error(`Rollback ${e.version} failed:`,a),Error(`Rollback of migration ${e.version} failed: ${a}`)}}console.log(`Rollback completed. Current version: ${g(a)}`)}(a,_,b)}},
|
|
1136
|
-
SELECT worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at
|
|
1137
|
-
FROM agent_instances
|
|
1138
|
-
WHERE worktree_id = ?
|
|
1139
|
-
ORDER BY sort_order ASC, instance_id ASC
|
|
1140
|
-
`).all(b).map(h)}function k(a,b,c){let d=a.prepare(`
|
|
1141
|
-
SELECT worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at
|
|
1142
|
-
FROM agent_instances
|
|
1143
|
-
WHERE worktree_id = ? AND instance_id = ?
|
|
1144
|
-
`).get(b,c);return d?h(d):null}function l(a,b,c,d){if(!c)return{ok:!0,cliToolId:d??null};let f=k(a,b,c);return f&&(0,e.hR)(f.cliTool)?d&&d!==f.cliTool?{ok:!1,instanceId:c,rosterCliTool:f.cliTool,requestedCliTool:d}:{ok:!0,cliToolId:f.cliTool}:d?{ok:!0,cliToolId:d}:(0,e.hR)(c)?{ok:!0,cliToolId:c}:{ok:!0,cliToolId:null}}function m(a,b){return a.prepare(`
|
|
1145
|
-
SELECT COUNT(*) as count FROM agent_instances WHERE worktree_id = ?
|
|
1146
|
-
`).get(b).count}function n(a,b,c){if(c.length>e.Ab)throw new f(b);let d=new Set;for(let a of c){if(i(a),d.has(a.id))throw new g(`Duplicate instance id: ${a.id}`);d.add(a.id)}let h=Date.now();a.transaction(()=>{a.prepare("DELETE FROM agent_instances WHERE worktree_id = ?").run(b),function(a,b,c){if(0===c.length)return a.prepare(`
|
|
1147
|
-
DELETE FROM opencode_instance_settings WHERE worktree_id = ?
|
|
1148
|
-
`).run(b).changes;let d=c.map(()=>"?").join(", ");a.prepare(`
|
|
1149
|
-
DELETE FROM opencode_instance_settings
|
|
1150
|
-
WHERE worktree_id = ? AND instance_id NOT IN (${d})
|
|
1151
|
-
`).run(b,...c).changes}(a,b,c.map(a=>a.id));let d=a.prepare(`
|
|
1152
|
-
INSERT INTO agent_instances
|
|
1153
|
-
(worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at)
|
|
1154
|
-
VALUES (?, ?, ?, ?, ?, ?)
|
|
1155
|
-
`);c.forEach((a,c)=>{let e=a.alias??"",f=Number.isInteger(a.order)?a.order:c;d.run(b,a.id,a.cliTool,e,f,h)})})()}function o(a,b,c){i(c),a.transaction(()=>{let d=m(a,b);if(d>=e.Ab)throw new f(b);if(k(a,b,c.id))throw new g(`Instance ${c.id} already exists for worktree ${b}`);let h=Number.isInteger(c.order)?c.order:d;a.prepare(`
|
|
1156
|
-
INSERT INTO agent_instances
|
|
1157
|
-
(worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at)
|
|
1158
|
-
VALUES (?, ?, ?, ?, ?, ?)
|
|
1159
|
-
`).run(b,c.id,c.cliTool,c.alias??"",h,Date.now())})()}function p(a,b,c){let d=a.prepare(`
|
|
1160
|
-
DELETE FROM agent_instances WHERE worktree_id = ? AND instance_id = ?
|
|
1161
|
-
`).run(b,c);return a.prepare(`
|
|
1162
|
-
DELETE FROM opencode_instance_settings WHERE worktree_id = ? AND instance_id = ?
|
|
1163
|
-
`).run(b,c),d.changes>0}function q(a,b){let c=a.prepare(`
|
|
1164
|
-
SELECT instance_id, agent, provider_id, model_id, variant
|
|
1165
|
-
FROM opencode_instance_settings
|
|
1166
|
-
WHERE worktree_id = ?
|
|
1167
|
-
`).all(b),e={};for(let a of c)e[a.instance_id]=(0,d.ZH)({agent:a.agent,providerId:a.provider_id,modelId:a.model_id,variant:a.variant});return e}function r(a,b,c,f,h=Date.now()){if(!(0,e.n6)(c))throw new g(`Invalid instance id: ${String(c)}`);let i=(0,d.ZH)(f);return(0,d.Mj)(i)?a.prepare(`
|
|
1168
|
-
INSERT INTO opencode_instance_settings
|
|
1169
|
-
(worktree_id, instance_id, agent, provider_id, model_id, variant, updated_at)
|
|
1170
|
-
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
1171
|
-
ON CONFLICT(worktree_id, instance_id) DO UPDATE SET
|
|
1172
|
-
agent = excluded.agent,
|
|
1173
|
-
provider_id = excluded.provider_id,
|
|
1174
|
-
model_id = excluded.model_id,
|
|
1175
|
-
variant = excluded.variant,
|
|
1176
|
-
updated_at = excluded.updated_at
|
|
1177
|
-
`).run(b,c,i.agent,i.providerId,i.modelId,i.variant,h):a.prepare(`
|
|
1178
|
-
DELETE FROM opencode_instance_settings WHERE worktree_id = ? AND instance_id = ?
|
|
1179
|
-
`).run(b,c),i}},34129:(a,b,c)=>{c.d(b,{$$:()=>n,CR:()=>h,DP:()=>i,GF:()=>o,Ud:()=>m,Xm:()=>r,_O:()=>k,j2:()=>l,jf:()=>q,kx:()=>j,ul:()=>p});var d=c(55511),e=c(87374);let f="id, worktree_id, cli_tool_id, instance_id, message, delay_ms, scheduled_send_time, status, created_at, sent_at, error";function g(a){return{id:a.id,worktreeId:a.worktree_id,cliToolId:a.cli_tool_id,instanceId:a.instance_id??a.cli_tool_id,message:a.message,delayMs:a.delay_ms,scheduledSendTime:a.scheduled_send_time,status:a.status,createdAt:a.created_at,sentAt:a.sent_at,error:a.error??null}}function h(a,b){let c=(0,d.randomUUID)(),e=Date.now(),f=e+b.delayMs,g=b.instanceId??b.cliToolId;return a.prepare(`
|
|
1180
|
-
INSERT INTO timer_messages (id, worktree_id, cli_tool_id, instance_id, message, delay_ms, scheduled_send_time, status, created_at, sent_at)
|
|
1181
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, 'pending', ?, NULL)
|
|
1182
|
-
`).run(c,b.worktreeId,b.cliToolId,g,b.message,b.delayMs,f,e),{id:c,worktreeId:b.worktreeId,cliToolId:b.cliToolId,instanceId:g,message:b.message,delayMs:b.delayMs,scheduledSendTime:f,status:"pending",createdAt:e,sentAt:null,error:null}}function i(a,b,c){let{before:d,limit:h=e.XS}=c??{},i=`SELECT ${f} FROM timer_messages WHERE worktree_id = ?`,j=[b];return void 0!==d&&(i+=" AND created_at < ?",j.push(d)),i+=" ORDER BY created_at DESC LIMIT ?",j.push(h+1),a.prepare(i).all(...j).map(g)}function j(a,b){let c=a.prepare(`
|
|
1183
|
-
SELECT ${f}
|
|
1184
|
-
FROM timer_messages
|
|
1185
|
-
WHERE id = ?
|
|
1186
|
-
`).get(b);return c?g(c):void 0}function k(a){return a.prepare(`
|
|
1187
|
-
SELECT ${f}
|
|
1188
|
-
FROM timer_messages
|
|
1189
|
-
WHERE status = 'pending'
|
|
1190
|
-
ORDER BY scheduled_send_time ASC
|
|
1191
|
-
`).all().map(g)}function l(a,b,c,d,e){let f=["status = ?"],g=[c];void 0!==d&&(f.push("sent_at = ?"),g.push(d)),void 0!==e&&(f.push("error = ?"),g.push(e)),g.push(b),a.prepare(`UPDATE timer_messages SET ${f.join(", ")} WHERE id = ?`).run(...g)}function m(a,b){return a.prepare(`
|
|
1192
|
-
UPDATE timer_messages SET status = 'cancelled' WHERE id = ? AND status = 'pending'
|
|
1193
|
-
`).run(b).changes>0}function n(a,b){return a.prepare(`
|
|
1194
|
-
UPDATE timer_messages SET status = 'cancelled' WHERE worktree_id = ? AND status = 'pending'
|
|
1195
|
-
`).run(b).changes}function o(a,b){return a.prepare(`
|
|
1196
|
-
SELECT COUNT(*) as count FROM timer_messages WHERE worktree_id = ? AND status = 'pending'
|
|
1197
|
-
`).get(b).count}function p(a,b){let c=Date.now()-24*b*36e5;return a.prepare(`
|
|
1198
|
-
DELETE FROM timer_messages
|
|
1199
|
-
WHERE status NOT IN ('pending', 'sending')
|
|
1200
|
-
AND created_at < ?
|
|
1201
|
-
`).run(c).changes}function q(a,b){return a.prepare(`
|
|
1202
|
-
DELETE FROM timer_messages
|
|
1203
|
-
WHERE worktree_id = ?
|
|
1204
|
-
AND status NOT IN ('pending', 'sending')
|
|
1205
|
-
`).run(b).changes}function r(a){return a.prepare(`
|
|
1206
|
-
UPDATE timer_messages SET status = 'failed', error = ? WHERE status = 'sending'
|
|
1207
|
-
`).run("Recovered from a stuck 'sending' state after a server restart.").changes}},43167:(a,b,c)=>{c.d(b,{CF:()=>k,Se:()=>l,VP:()=>g,Zj:()=>o,gn:()=>m,jA:()=>j,jJ:()=>p,rC:()=>n,s6:()=>f,th:()=>q});var d=c(55511);let e={prompt:"enabled_prompt",failure:"enabled_prompt",completion:"enabled_completion"},f={enabledPrompt:!0,enabledCompletion:!1},g=1;function h(a){return{id:a.id,endpoint:a.endpoint,keys:{p256dh:a.p256dh,auth:a.auth},deviceLabel:a.device_label,enabledPrompt:1===a.enabled_prompt,enabledCompletion:1===a.enabled_completion,locale:a.locale,defaultsVersion:a.defaults_version,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at)}}let i=`
|
|
1208
|
-
id, endpoint, p256dh, auth, device_label,
|
|
1209
|
-
enabled_prompt, enabled_completion, locale, defaults_version, created_at, updated_at
|
|
1210
|
-
`;function j(a,b){let c=Date.now(),e=b.deviceLabel??null,h=b.locale??null;a.prepare(`
|
|
1211
|
-
INSERT INTO push_subscriptions (
|
|
1212
|
-
id, endpoint, p256dh, auth, device_label,
|
|
1213
|
-
enabled_prompt, enabled_completion, locale, defaults_version, created_at, updated_at
|
|
1214
|
-
)
|
|
1215
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
1216
|
-
ON CONFLICT(endpoint) DO UPDATE SET
|
|
1217
|
-
p256dh = excluded.p256dh,
|
|
1218
|
-
auth = excluded.auth,
|
|
1219
|
-
device_label = excluded.device_label,
|
|
1220
|
-
locale = COALESCE(excluded.locale, push_subscriptions.locale),
|
|
1221
|
-
updated_at = excluded.updated_at
|
|
1222
|
-
`).run((0,d.randomUUID)(),b.endpoint,b.p256dh,b.auth,e,+!!f.enabledPrompt,+!!f.enabledCompletion,h,g,c,c);let i=k(a,b.endpoint);if(!i)throw Error("Failed to persist push subscription");return i}function k(a,b){let c=a.prepare(`SELECT ${i} FROM push_subscriptions WHERE endpoint = ?`).get(b);return c?h(c):null}function l(a){return a.prepare(`SELECT ${i} FROM push_subscriptions ORDER BY created_at ASC`).all().map(h)}function m(a,b){let c=e[b];return a.prepare(`SELECT ${i} FROM push_subscriptions WHERE ${c} = 1 ORDER BY created_at ASC`).all().map(h)}function n(a,b){let c=e[b];return a.prepare(`SELECT COUNT(*) AS total FROM push_subscriptions WHERE ${c} = 1`).get().total}function o(a){return a.defaultsVersion<g}function p(a,b,c){let d=["updated_at = ?"],e=[Date.now()];return void 0!==c.enabledPrompt&&(d.push("enabled_prompt = ?"),e.push(+!!c.enabledPrompt)),void 0!==c.enabledCompletion&&(d.push("enabled_completion = ?"),e.push(+!!c.enabledCompletion)),c.acknowledgeDefaultsNotice&&(d.push("defaults_version = ?"),e.push(g)),e.push(b),a.prepare(`UPDATE push_subscriptions SET ${d.join(", ")} WHERE endpoint = ?`).run(...e),k(a,b)}function q(a,b){return a.prepare("DELETE FROM push_subscriptions WHERE endpoint = ?").run(b).changes>0}},48524:(a,b,c)=>{c.d(b,{EL:()=>g,Hi:()=>e,MH:()=>r,UT:()=>l,Vk:()=>n,Zj:()=>q,__:()=>p,gg:()=>m,sA:()=>f,uB:()=>i,xZ:()=>o});var d=c(55511);let e=["pending","running","waiting_input","verifying","succeeded","failed","not_started","cancelled"],f=["succeeded","failed","not_started","cancelled"],g=["running","waiting_input","verifying"],h=[...g,"failed","not_started"];function i(a){return f.includes(a)}let j=`
|
|
1223
|
-
id, worktree_id, cli_tool_id, instance_id, title, goal, contract_path, contract_json,
|
|
1224
|
-
status, last_verification_run_id, created_at, updated_at, started_at, finished_at
|
|
1225
|
-
`;function k(a){return{id:a.id,worktreeId:a.worktree_id,cliToolId:a.cli_tool_id,instanceId:a.instance_id,title:a.title,goal:a.goal,contractPath:a.contract_path,contract:JSON.parse(a.contract_json),status:a.status,lastVerificationRunId:a.last_verification_run_id,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at),startedAt:null===a.started_at?null:new Date(a.started_at),finishedAt:null===a.finished_at?null:new Date(a.finished_at)}}function l(a,b){let c=Date.now(),e=(0,d.randomUUID)(),f=b.status??"pending";a.prepare(`
|
|
1226
|
-
INSERT INTO tasks (
|
|
1227
|
-
id, worktree_id, cli_tool_id, instance_id, title, goal, contract_path, contract_json,
|
|
1228
|
-
status, last_verification_run_id, created_at, updated_at, started_at, finished_at
|
|
1229
|
-
)
|
|
1230
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, NULL, ?, ?, ?, NULL)
|
|
1231
|
-
`).run(e,b.worktreeId,b.cliToolId,b.instanceId??null,b.contract.title,b.contract.goal,b.contractPath??null,JSON.stringify(b.contract),f,c,c,"pending"===f?null:c);let g=m(a,e);if(!g)throw Error("Failed to persist task");return g}function m(a,b){let c=a.prepare(`SELECT ${j} FROM tasks WHERE id = ?`).get(b);return c?k(c):null}function n(a,b,c=20){return a.prepare(`
|
|
1232
|
-
SELECT ${j} FROM tasks
|
|
1233
|
-
WHERE worktree_id = ?
|
|
1234
|
-
ORDER BY created_at DESC, rowid DESC
|
|
1235
|
-
LIMIT ?
|
|
1236
|
-
`).all(b,c).map(k)}function o(a,b,c,d={}){let e=Date.now();if(0===a.prepare(`
|
|
1237
|
-
UPDATE tasks
|
|
1238
|
-
SET status = ?,
|
|
1239
|
-
updated_at = ?,
|
|
1240
|
-
started_at = CASE WHEN ? = 'pending' THEN started_at ELSE COALESCE(started_at, ?) END,
|
|
1241
|
-
finished_at = CASE WHEN ? = 1 THEN ? ELSE finished_at END,
|
|
1242
|
-
last_verification_run_id = COALESCE(?, last_verification_run_id)
|
|
1243
|
-
WHERE id = ?
|
|
1244
|
-
`).run(c,e,c,e,+!!i(c),e,d.lastVerificationRunId??null,b).changes)throw Error(`Task ${b} not found`);return m(a,b)}function p(a,b,c,d){let e=["worktree_id = ?"],f=[b];void 0!==c&&(e.push("cli_tool_id = ?"),f.push(c)),void 0!==d&&(e.push("instance_id = ?"),f.push(d));let h=g.map(()=>"?").join(", "),i=a.prepare(`
|
|
1245
|
-
SELECT ${j} FROM tasks
|
|
1246
|
-
WHERE ${e.join(" AND ")} AND status IN (${h})
|
|
1247
|
-
ORDER BY updated_at DESC, created_at DESC, rowid DESC
|
|
1248
|
-
LIMIT 1
|
|
1249
|
-
`).get(...f,...g);return i?k(i):null}function q(a,b){let c=h.map(()=>"?").join(", "),d=a.prepare(`
|
|
1250
|
-
SELECT ${j} FROM tasks
|
|
1251
|
-
WHERE worktree_id = ? AND status IN (${c})
|
|
1252
|
-
ORDER BY updated_at DESC, created_at DESC, rowid DESC
|
|
1253
|
-
LIMIT 1
|
|
1254
|
-
`).get(b,...h);return d?k(d):null}function r(a,b,c,d){let e=d===c,f=g.map(()=>"?").join(", "),h=a.prepare(`
|
|
1255
|
-
SELECT ${j} FROM tasks
|
|
1256
|
-
WHERE worktree_id = ?
|
|
1257
|
-
AND cli_tool_id = ?
|
|
1258
|
-
AND (instance_id = ? OR (instance_id IS NULL AND ?))
|
|
1259
|
-
AND status IN (${f})
|
|
1260
|
-
ORDER BY updated_at DESC, created_at DESC, rowid DESC
|
|
1261
|
-
LIMIT 1
|
|
1262
|
-
`).get(b,c,d,+!!e,...g);return h?k(h):null}},79827:(a,b,c)=>{c.d(b,{Mj:()=>i,ZH:()=>k,gF:()=>h,qQ:()=>m,sw:()=>l});let d=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/,e=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/,f=/^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$/,g=/^[A-Za-z0-9][A-Za-z0-9._-]{0,31}$/,h=Object.freeze({agent:null,providerId:null,modelId:null,variant:null});function i(a){return!!a&&!!(a.agent||a.providerId||a.modelId||a.variant)}function j(a,b){if("string"!=typeof a)return null;let c=a.trim();return 0===c.length?null:b.test(c)?c:null}function k(a){if("object"!=typeof a||null===a)return{...h};let b=j(a.providerId,e),c=j(a.modelId,f),i=null!==b&&null!==c;return{agent:j(a.agent,d),providerId:i?b:null,modelId:i?c:null,variant:j(a.variant,g)}}function l(a){return a?.providerId&&a.modelId?`${a.providerId}/${a.modelId}`:null}let m={connected:!1,providers:[],agents:[]}},87009:(a,b,c)=>{function d(a){return{id:a.id,taskId:a.task_id,event:a.event,fromStatus:a.from_status,toStatus:a.to_status,payload:null===a.payload_json?null:JSON.parse(a.payload_json),createdAt:new Date(a.created_at)}}function e(a,b){let c=void 0===b.payload||0===Object.keys(b.payload).length?null:JSON.stringify(b.payload);return Number(a.prepare(`
|
|
1294
|
+
`).run(b.version,b.name,Date.now())})(),console.log(`Migration ${b.version} applied successfully`)}catch(c){let a=c instanceof Error?c.message:String(c);throw console.error(`Migration ${b.version} failed:`,a),Error(`Migration ${b.version} (${b.name}) failed: ${a}`)}}console.log(`All migrations completed. Current version: ${g(a)}`)}(a,_)}function ab(a,b){!function(a,b,c){let d=g(a);if(c>=d)return console.log("No rollback needed");for(let e of(console.log(`Rolling back from version ${d} to ${c}...`),b.filter(a=>a.version>c&&a.version<=d).sort((a,b)=>b.version-a.version))){if(!e.down)throw Error(`Cannot rollback migration ${e.version} (${e.name}): no down() function defined`);console.log(`Rolling back migration ${e.version}: ${e.name}...`);try{a.transaction(()=>{e.down(a),a.prepare("DELETE FROM schema_version WHERE version = ?").run(e.version)})(),console.log(`Migration ${e.version} rolled back`)}catch(b){let a=b instanceof Error?b.message:String(b);throw console.error(`Rollback ${e.version} failed:`,a),Error(`Rollback of migration ${e.version} failed: ${a}`)}}console.log(`Rollback completed. Current version: ${g(a)}`)}(a,_,b)}},79827:(a,b,c)=>{c.d(b,{Mj:()=>i,ZH:()=>k,gF:()=>h,qQ:()=>m,sw:()=>l});let d=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/,e=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/,f=/^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$/,g=/^[A-Za-z0-9][A-Za-z0-9._-]{0,31}$/,h=Object.freeze({agent:null,providerId:null,modelId:null,variant:null});function i(a){return!!a&&!!(a.agent||a.providerId||a.modelId||a.variant)}function j(a,b){if("string"!=typeof a)return null;let c=a.trim();return 0===c.length?null:b.test(c)?c:null}function k(a){if("object"!=typeof a||null===a)return{...h};let b=j(a.providerId,e),c=j(a.modelId,f),i=null!==b&&null!==c;return{agent:j(a.agent,d),providerId:i?b:null,modelId:i?c:null,variant:j(a.variant,g)}}function l(a){return a?.providerId&&a.modelId?`${a.providerId}/${a.modelId}`:null}let m={connected:!1,providers:[],agents:[]}},87009:(a,b,c)=>{function d(a){return{id:a.id,taskId:a.task_id,event:a.event,fromStatus:a.from_status,toStatus:a.to_status,payload:null===a.payload_json?null:JSON.parse(a.payload_json),createdAt:new Date(a.created_at)}}function e(a,b){let c=void 0===b.payload||0===Object.keys(b.payload).length?null:JSON.stringify(b.payload);return Number(a.prepare(`
|
|
1263
1295
|
INSERT INTO task_events (task_id, event, from_status, to_status, payload_json, created_at)
|
|
1264
1296
|
VALUES (?, ?, ?, ?, ?, ?)
|
|
1265
1297
|
`).run(b.taskId,b.event,b.fromStatus,b.toStatus,c,b.createdAt).lastInsertRowid)}function f(a,b,c=200){return a.prepare(`
|
|
@@ -1268,7 +1300,7 @@
|
|
|
1268
1300
|
WHERE task_id = ?
|
|
1269
1301
|
ORDER BY created_at ASC, id ASC
|
|
1270
1302
|
LIMIT ?
|
|
1271
|
-
`).all(b,c).map(d)}c.d(b,{H:()=>f,P:()=>e})},87374:(a,b,c)=>{c.d(b,{Dr:()=>i,HR:()=>h,Ky:()=>f,XS:()=>e,ms:()=>g,u8:()=>d}),Array.from({length:Math.floor(104)+1},(a,b)=>3e5+3e5*b);let d=5,e=50,f=100,g=1e4,h={PENDING:"pending",SENDING:"sending",SENT:"sent",FAILED:"failed",CANCELLED:"cancelled",NO_SESSION:"no_session"};function i(a){return"number"==typeof a&&a>=3e5&&a<=315e5&&a%3e5==0}},88807:(a,b,c)=>{c.r(b),c.d(b,{closeDbInstance:()=>q,getDbInstance:()=>p});var d=c(33873),e=c.n(d),f=c(
|
|
1303
|
+
`).all(b,c).map(d)}c.d(b,{H:()=>f,P:()=>e})},87374:(a,b,c)=>{c.d(b,{Dr:()=>i,HR:()=>h,Ky:()=>f,XS:()=>e,ms:()=>g,u8:()=>d}),Array.from({length:Math.floor(104)+1},(a,b)=>3e5+3e5*b);let d=5,e=50,f=100,g=1e4,h={PENDING:"pending",SENDING:"sending",SENT:"sent",FAILED:"failed",CANCELLED:"cancelled",NO_SESSION:"no_session"};function i(a){return"number"==typeof a&&a>=3e5&&a<=315e5&&a%3e5==0}},88807:(a,b,c)=>{c.r(b),c.d(b,{closeDbInstance:()=>q,getDbInstance:()=>p});var d=c(33873),e=c.n(d),f=c(67469),g=c(79646),h=c(87550),i=c.n(h);let j=!1;function k(a){return a instanceof Error&&"ERR_DLOPEN_FAILED"===a.code&&a.message.includes("NODE_MODULE_VERSION")}function l(a,b){let c=["better-sqlite3 could not be loaded: it was built for a different Node.js version.","This usually happens after switching Node.js versions (nvm, fnm, Homebrew, ...).","",`Automatic recovery failed: ${a}`,"","How to fix it manually:"];return b?c.push(" The install directory is not writable by the current user, so the addon"," cannot be rebuilt in place. Do not re-run this with sudo — root-owned"," files there will break future installs and updates.",""," Either switch back to the Node.js version CommandMate was installed with:",` node -v (currently ${process.version}, NODE_MODULE_VERSION ${process.versions.modules})`,""," Or reinstall CommandMate under a Node.js version manager, which keeps"," global packages in a user-owned directory:"," nvm use <version> && npm install -g commandmate"):c.push(` 1. cd ${process.cwd()}`," 2. npm rebuild better-sqlite3"," 3. Start CommandMate again",""," If that fails, reinstalling picks up the current Node.js version:"," npm install -g commandmate"),c.join("\n")}var m=c(93636),n=c(87447);let o=null;function p(){if(!o){let a=(0,n._$)().CM_DB_PATH,b=c(29021),d=e().dirname(a);b.existsSync(d)||b.mkdirSync(d,{recursive:!0,mode:448});let h=function(a){try{return new(i())(a)}catch(c){if(!k(c))throw c;if(j)throw Error(l("a rebuild was already attempted in this process.",!1));j=!0,console.error("[commandmate] better-sqlite3 was built for a different Node.js version.\n[commandmate] Rebuilding it automatically — this can take a few minutes...");let b=function(){let a=(0,g.spawnSync)("npm",["rebuild","better-sqlite3"],{cwd:process.cwd(),encoding:"utf-8",timeout:3e5,env:{...process.env,PATH:`${e().dirname(process.execPath)}${e().delimiter}${process.env.PATH??""}`}}),b=`${a.stdout??""}${a.stderr??""}`;return a.error||0!==a.status?{success:!1,permissionDenied:/EACCES|permission denied/i.test(b),output:b}:{success:!0,permissionDenied:!1,output:b}}();if(!b.success)throw Error(l("npm rebuild better-sqlite3 failed.",b.permissionDenied));console.error("[commandmate] Rebuild succeeded. Continuing startup.");try{return new(i())(a)}catch(a){if(k(a))throw Error(l("the addon still reports a version mismatch after rebuilding.",!1));throw a}}}(a);h.pragma("foreign_keys = ON"),h.pragma("journal_mode = WAL"),h.pragma("busy_timeout = 5000");try{(0,f.vI)(h)}catch(a){throw h.close(),a}o=h,(0,m.fe)(h)}return o}function q(){o&&((0,m.zZ)(),o.close(),o=null)}},90444:(a,b,c)=>{function d(a){a.exec(`
|
|
1272
1304
|
CREATE TABLE IF NOT EXISTS worktrees (
|
|
1273
1305
|
id TEXT PRIMARY KEY,
|
|
1274
1306
|
name TEXT NOT NULL,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=9584,exports.ids=[9584],exports.modules={4548:(a,b,c)=>{c.d(b,{TW:()=>i,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}}},56791:(a,b,c)=>{c.r(b),c.d(b,{ACTIVE_FILTER:()=>d.ks,ACTIVE_TASK_STATUSES:()=>d.EL,AgentInstanceLimitError:()=>d.AC,CURRENT_SCHEMA_VERSION:()=>f.FT,DEFAULT_RUN_HISTORY_LIMIT:()=>d.Tu,InvalidAgentInstanceError:()=>d.ug,MAX_DISABLED_REPOSITORIES:()=>h.nc,MAX_RUN_HISTORY_DAYS:()=>d.eP,MAX_RUN_HISTORY_LIMIT:()=>d.mg,MemoDbError:()=>d.lm,NEW_SUBSCRIPTION_DEFAULTS:()=>d.s6,PUSH_DEFAULTS_VERSION:()=>d.VP,RepositoryDbError:()=>h.j8,TASK_STATUSES:()=>d.Hi,TERMINAL_TASK_STATUSES:()=>d.sA,VERIFICATION_GATE_SOURCES:()=>d.Dx,VERIFICATION_TRIGGERS:()=>d.af,WORKTREE_TODO_STATUSES:()=>d.KG,addAgentInstance:()=>d.Uq,archiveAllAssistantMessages:()=>d.cD,archiveAssistantMessagesFrom:()=>d.Jj,cancelTimer:()=>d.Ud,cancelTimersByWorktree:()=>d.$$,cleanupOldTimers:()=>d.ul,clearInProgressMessageId:()=>d.YX,clearLastUserMessage:()=>d.cf,clearTimerHistory:()=>d.jf,closeDbInstance:()=>e.closeDbInstance,countAgentInstances:()=>d.fs,countDisabledRepositories:()=>h.QJ,countPushSubscriptionsForKind:()=>d.rC,countWorktreesByRepositoryPath:()=>h.kp,createAssistantConversation:()=>d.G4,createAssistantExecution:()=>d.hL,createAssistantMessage:()=>d.qp,createCloneJob:()=>h.tw,createGateResult:()=>d.hl,createMemo:()=>d.To,createMessage:()=>d.oH,createRepository:()=>h.vB,createTask:()=>d.UT,createTimer:()=>d.CR,createTodo:()=>d.py,createVerificationRun:()=>d.rY,createWorktreeTodo:()=>d.yy,deleteAllMessages:()=>d.pE,deleteAssistantSessionState:()=>d.z2,deleteMemo:()=>d.cP,deleteMessageById:()=>d.DF,deleteMessagesByCliTool:()=>d.lA,deleteMessagesByInstance:()=>d.Qp,deletePushSubscriptionByEndpoint:()=>d.th,deleteRepository:()=>h.oG,deleteRepositoryWorktrees:()=>d.oZ,deleteSessionState:()=>d.ZP,deleteTodo:()=>d.Ys,deleteWorktreeTodo:()=>d.vg,deleteWorktreesByIds:()=>d.Rm,disableExistingRepository:()=>h.eP,disableRepository:()=>h.l$,ensureEnvRepositoriesRegistered:()=>h.ES,filterExcludedPaths:()=>h.Ho,findMessageByRequestId:()=>d.Ow,finishGateResult:()=>d.C8,finishVerificationRun:()=>d.u$,getActiveCloneJobByUrl:()=>h.fD,getActiveTask:()=>d.__,getActiveTaskForInstance:()=>d.MH,getAgentInstance:()=>d.BN,getAgentInstances:()=>d.m0,getAliasedWorktreeIds:()=>d.r3,getAllPushSubscriptions:()=>d.Se,getAllRepositories:()=>h.Yg,getAllRepositoriesWithWorktreeCount:()=>h._D,getAllTodos:()=>d.Tk,getAllWorktreeAliases:()=>d.fX,getAllWorktreeIds:()=>d.nO,getAllWorktreePathIds:()=>d.Sj,getAssistantConversationById:()=>d.iT,getAssistantConversationByRepositoryAndCliTool:()=>d.gp,getAssistantExecutionById:()=>d.$r,getAssistantMessageById:()=>d.yE,getAssistantMessages:()=>d.BE,getAssistantSessionState:()=>d.qK,getCloneJob:()=>h.bM,getCloneJobsByStatus:()=>h.n_,getCurrentVersion:()=>f.Mj,getDailyReport:()=>d.ap,getDbInstance:()=>e.getDbInstance,getDefaultDbPath:()=>g.$b,getExcludedRepositories:()=>h.lS,getExcludedRepositoryPaths:()=>h.pr,getInitialBranch:()=>d.p4,getIssueDbPath:()=>g.zm,getLastAssistantMessageAt:()=>d.nP,getLastMessage:()=>d.sy,getLastUserMessage:()=>d.r8,getLatestAssistantExecutionByConversation:()=>d.of,getLegacyDbPaths:()=>q,getMemoById:()=>d.DN,getMemosByWorktreeId:()=>d.pZ,getMessageById:()=>d.kA,getMessages:()=>d.VL,getMessagesByDateRange:()=>d.lr,getMigrationHistory:()=>f.PS,getPendingTimerCountByWorktree:()=>d.GF,getPendingTimers:()=>d._O,getPushSubscriptionByEndpoint:()=>d.CF,getPushSubscriptionsForKind:()=>d.gn,getRepositories:()=>d.NV,getRepositoryById:()=>h.r,getRepositoryByNormalizedUrl:()=>h.Uj,getRepositoryByPath:()=>h.Dp,getRunningAssistantExecutionByConversation:()=>d.ce,getRunningVerificationRun:()=>d.WZ,getSessionState:()=>d.y1,getTask:()=>d.gg,getTimerById:()=>d.kx,getTimersByWorktree:()=>d.DP,getTodoById:()=>d.Nr,getTodosByRepositoryId:()=>d.ob,getTodosByWorktreeId:()=>d.fr,getVerificationRun:()=>d.J6,getWorktreeAliases:()=>d.Q2,getWorktreeById:()=>d.Ui,getWorktreeIdsByRepository:()=>d.P9,getWorktreeTodoById:()=>d.eN,getWorktrees:()=>d.vi,getWorktreesByRepository:()=>d.uJ,initDatabase:()=>d.s4,isTerminalTaskStatus:()=>d.uB,isWorktreeTodoStatus:()=>d.yT,listRunningAssistantExecutions:()=>d.b2,listRunningVerificationRuns:()=>d.Fi,listTaskEvents:()=>d.HB,listTasks:()=>d.Vk,listVerificationRuns:()=>d.Mt,listVerificationRunsForPeriod:()=>d.UE,markPendingPromptsAsAnswered:()=>d.PL,migrateDbIfNeeded:()=>r,migrateWorktreeIdPreservingChildren:()=>d._h,pushSubscriptionNeedsDefaultsNotice:()=>d.Zj,recomputeLastUserMessage:()=>d.jp,recordAnsweredPrompt:()=>d.pG,recordWorktreeAlias:()=>d.xJ,recoverStuckSendingTimers:()=>d.Xm,registerAndFilterRepositories:()=>h.$G,removeAgentInstance:()=>d.NU,reorderMemos:()=>d.nQ,reorderWorktreeTodos:()=>d.yb,resolveAndValidatePath:()=>p,resolveRepositoryPath:()=>h.mE,resolveWorktreeIdWithAlias:()=>d.l0,restoreRepository:()=>h.RS,rollbackMigrations:()=>f.Wy,runMigrations:()=>f.vI,saveDailyReport:()=>d.tt,saveInitialBranch:()=>d.GA,setAgentInstances:()=>d.Cs,setInProgressMessageId:()=>d.OF,setRepositoryEnabled:()=>h.iQ,updateAssistantConversation:()=>d.xR,updateAssistantExecution:()=>d.az,updateAssistantMessageStatus:()=>d.nZ,updateAssistantSessionState:()=>d.PP,updateCliToolId:()=>d.WU,updateCloneJob:()=>h.k5,updateDailyReportContent:()=>d.IF,updateFavorite:()=>d.O,updateLastUserMessage:()=>d.EU,updateLastViewedAt:()=>d.HZ,updateMemo:()=>d.UY,updateMessageContent:()=>d.e8,updatePromptData:()=>d.cw,updatePushSubscriptionPreferences:()=>d.jJ,updateRepository:()=>h.Ir,updateSelectedAgents:()=>d.DC,updateSessionState:()=>d.gb,updateStatus:()=>d.yB,updateTimerStatus:()=>d.j2,updateTodo:()=>d.uy,updateVibeLocalContextWindow:()=>d.s,updateVibeLocalModel:()=>d.iu,updateWorktreeDescription:()=>d.hq,updateWorktreeLink:()=>d.z1,updateWorktreeTodo:()=>d.bl,upsertPushSubscription:()=>d.jA,upsertWorktree:()=>d.ZL,validateDbPath:()=>g.Sv,validateRepositoryPath:()=>h.Ux,validateSchema:()=>f.i6});var d=c(90444),e=c(88807),f=c(28037),g=c(20416),h=c(10406),i=c(29021),j=c.n(i),k=c(33873),l=c.n(k),m=c(21820),n=c(7956);let o=(0,c(72626).h)("db-migration-path");function p(a,b){try{if(!j().existsSync(a))return null;let c=j().realpathSync(a);if((0,n.fW)(c))return o.warn(`[Security] ${b} points to system directory, skipping: ${c}`),null;return c}catch{return o.warn(`[Security] Failed to resolve ${b}: ${a}`),null}}function q(){let a=[];a.push(l().join(process.cwd(),"data","db.sqlite")),a.push(l().join(process.cwd(),"data","cm.db")),a.push(l().join((0,m.homedir)(),".commandmate","data","db.sqlite"));let b=process.env.DATABASE_PATH;if(b)try{let c=l().resolve(b);(0,n.fW)(c)?o.warn(`[Security] Skipping DATABASE_PATH in system directory: ${c}`):a.push(b)}catch{o.warn(`[Security] Invalid DATABASE_PATH: ${b}`)}return a}function r(a){let b=l().resolve(a);if((0,n.fW)(b))throw Error(`Security error: Target path cannot be in system directory: ${b}`);if(j().existsSync(a)){let b=p(a,"target path");if(b)return{migrated:!1,targetPath:b}}for(let a of q()){let c=p(a,"legacy path");if(!c)continue;let d=`${c}.bak`;j().copyFileSync(c,d),j().chmodSync(d,384);let e=l().dirname(b);return j().existsSync(e)||j().mkdirSync(e,{recursive:!0,mode:448}),j().copyFileSync(c,b),o.info(`[Migration] Database migrated from ${c} to ${b}`),o.info(`[Migration] Backup created at ${d}`),{migrated:!0,sourcePath:c,targetPath:b,backupPath:d}}return{migrated:!1,targetPath:b}}},82484:(a,b,c)=>{c.d(b,{E4:()=>y,QY:()=>r,Sw:()=>C,cl:()=>z,jY:()=>t,ne:()=>w});var d=c(55511),e=c(33873),f=c.n(e),g=c(96210),h=c(93356),i=c(52710),j=c(33095),k=c(1185),l=c(89936),m=c(4548),n=c(36931);let o={LOCAL_CHANGES:"SKILL_UPDATE_LOCAL_CHANGES",ROOT_MISSING:"SKILL_UPDATE_ROOT_MISSING",RECEIPT_MISSING:"SKILL_UPDATE_RECEIPT_MISSING",RECEIPT_UNREADABLE:"SKILL_UPDATE_RECEIPT_UNREADABLE",RECEIPT_FOREIGN:"SKILL_UPDATE_RECEIPT_FOREIGN",ROOT_RECEIPT_DIVERGED:"SKILL_UPDATE_ROOT_RECEIPT_DIVERGED",TREE_SCAN_TRUNCATED:"SKILL_UPDATE_TREE_SCAN_TRUNCATED",INCOMPATIBLE:"SKILL_UPDATE_INCOMPATIBLE"},p={[o.LOCAL_CHANGES]:"skills.update.blocked.localChanges",[o.ROOT_MISSING]:"skills.update.blocked.rootMissing",[o.RECEIPT_MISSING]:"skills.update.blocked.receiptMissing",[o.RECEIPT_UNREADABLE]:"skills.update.blocked.receiptUnreadable",[o.RECEIPT_FOREIGN]:"skills.update.blocked.receiptForeign",[o.ROOT_RECEIPT_DIVERGED]:"skills.update.blocked.rootReceiptDiverged",[o.TREE_SCAN_TRUNCATED]:"skills.update.blocked.treeScanTruncated",[o.INCOMPATIBLE]:"skills.update.blocked.incompatible"},q={updatable:"skills.update.nextAction.updatable",blocked:"skills.update.nextAction.blocked"};function r(a,b,c){let d;if(!g.X0.test(b)||b.length>g.cj)throw new i.nf(i.ER.TARGET_UNSAFE);try{d=(0,j.yj)(a,c,b)}catch{throw new i.nf(i.ER.TARGET_UNSAFE)}let e=(0,j.bh)(d);if(!e.present)return{state:"not_installed"};let f=e.files.find(a=>a.path===i.zi);if(!f)return{state:"receipt_missing"};let h=(0,i.q$)(f.bytes);return null===h?{state:"receipt_unreadable"}:h.skill_id!==b?{state:"receipt_foreign"}:{state:"ok",receipt:h,receiptDigest:f.sha256}}let s=globalThis.__skillUpdatePlans??(globalThis.__skillUpdatePlans={records:new Map}),t=/^[0-9a-f]{48}$/;function u(a){s.records.delete(a.token),null===a.consumedAt&&(0,l.TO)(a.binding.snapshotId)}function v(a,b){let c=0;for(let d of[...s.records.values()])d.token!==b&&a>=d.expiresAt&&(u(d),c+=1);return c}function w(a={}){return v(a.now??Date.now())}function x(a,b){if(!t.test(a))throw new i.nf(i.ER.NOT_FOUND);let c=s.records.get(a);if(v(b,a),!c)throw new i.nf(i.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 i.nf(i.ER.NOT_FOUND);if(b>=c.expiresAt)throw u(c),new i.nf(i.ER.EXPIRED);if(null!==c.consumedAt)throw new i.nf(i.ER.CONSUMED);return c}function y(a,b={}){return x(a,b.now??Date.now())}function z(a,b,c,d={}){let e=d.now??Date.now(),f=x(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.toVersion!==b.toVersion)throw new i.nf(i.ER.BINDING_MISMATCH);if(!f.dto.updatable)throw new i.nf(i.ER.NOT_INSTALLABLE);if(f.dto.requiresRiskAcknowledgement&&!b.riskAcknowledged)throw new i.nf(i.ER.RISK_NOT_ACKNOWLEDGED);if(f.dto.riskIncreased&&!b.riskIncreaseAcknowledged)throw new i.nf(i.ER.RISK_NOT_ACKNOWLEDGED,{riskIncreased:!0});if(c.branch!==g.branch||c.headCommit!==g.headCommit||c.currentTreeHash!==g.currentTreeHash||null===c.receiptDigest||!(0,h.U2)(c.receiptDigest,g.currentReceiptDigest))throw new i.nf(i.ER.STALE);return f.consumedAt=e,f}function A(a,b,c=null){return{code:a,path:b,messageKey:p[a],detail:c}}let B={[k.sJ.LOCAL_MODIFICATION]:o.LOCAL_CHANGES,[k.sJ.RECEIPT_ORPHAN]:o.LOCAL_CHANGES,[k.sJ.UNMANAGED_FILE]:o.LOCAL_CHANGES,[k.sJ.NOT_A_REGULAR_FILE]:o.LOCAL_CHANGES,[k.sJ.NOT_INSTALLED]:o.ROOT_MISSING,[k.sJ.RECEIPT_MISSING]:o.RECEIPT_MISSING,[k.sJ.RECEIPT_UNREADABLE]:o.RECEIPT_UNREADABLE,[k.sJ.RECEIPT_FOREIGN]:o.RECEIPT_FOREIGN,[k.sJ.TREE_SCAN_TRUNCATED]:o.TREE_SCAN_TRUNCATED};function C(a){let b;if(!g.X0.test(a.skillId)||a.skillId.length>g.cj)throw new i.nf(i.ER.TARGET_UNSAFE);let c=a.now??Date.now(),{snapshot:e}=a,l=r(a.worktree.path,a.skillId,g.pg);if("not_installed"===l.state)throw new i.nf(i.ER.NOT_FOUND);if("ok"!==l.state||l.receipt.version!==a.fromVersion)throw new i.nf(i.ER.STALE);let p=l.receipt;try{b=(0,i.Pw)(p).map(b=>{let c=f().posix.dirname(b),d=(0,j.yj)(a.worktree.path,c,a.skillId),e=(0,j.bh)(d);return{prefix:c,rel:(0,j.QL)(c,a.skillId),existing:e,assessment:(0,k.II)(d,a.skillId,{existing:e,rootPrefix:c})}})}catch{throw new i.nf(i.ER.TARGET_UNSAFE)}let t=b[0],w=[];for(let a of b){for(let b of a.assessment.blockers){let a=B[b.code];a&&w.push(A(a,b.path,b.code))}a!==t&&null!==a.assessment.receiptDigest&&a.assessment.receiptDigest!==t.assessment.receiptDigest&&w.push(A(o.ROOT_RECEIPT_DIVERGED,`${a.rel}/${i.zi}`))}"compatible"!==a.compatibility.status&&w.push(A(o.INCOMPATIBLE,null));let x=b.map(a=>a.prefix),y=(0,i.$h)({snapshot:e,version:a.version,rootPrefixes:x}),z=(0,i.tJ)(y),C=(0,d.createHash)("sha256").update(z).digest("hex"),D=new Map(p.files.map(a=>[a.path,{sha256:a.sha256,size:a.size,executable:a.executable}])),E=t.existing.files.find(a=>a.path===i.zi);D.set(i.zi,{sha256:l.receiptDigest,size:E?.size??null,executable:!1});let F=new Map(e.files.map(a=>[a.path,{sha256:a.sha256,size:a.size,executable:a.executable,generated:!1}]));F.set(i.zi,{sha256:C,size:z.byteLength,executable:!1,generated:!0});let G=new Map(t.existing.files.map(a=>[a.path,a])),H={remainingBytes:j.mo},I=[],J={added:0,updated:0,removed:0,unchanged:0,localModified:0,localMissing:0,localUnknown:0,irregular:0},K=!1,L=!1;for(let a of[...new Set([...D.keys(),...F.keys()])].sort()){let b,c,d=D.get(a)??null,f=F.get(a)??null,g=G.get(a)??null;b=d&&f?(0,h.U2)(d.sha256,f.sha256)&&d.executable===f.executable?"unchanged":"update":f?"add":"remove",c=null===d?null===g?"match":"unknown":null===g?"missing":(0,h.U2)(g.sha256,d.sha256)&&g.executable===d.executable?"match":"modified";let k=f?.generated??a===i.zi,l=null!==d&&null!==g&&"match"===c?g.bytes:null,m=null===f?null:k?z:e.readFile(a),n=null!==l&&(0,j.VA)(l)||null!==m&&(0,j.VA)(m),o=null!==d&&"match"!==c,p=n||o||"unchanged"===b?{text:null,truncated:!1,additions:0,deletions:0}:(0,j.kt)(l,m,H);I.push({path:`${t.rel}/${a}`,relativePath:a,change:b,generated:k,recordedSha256:d?.sha256??null,candidateSha256:f?.sha256??null,currentSha256:g?.sha256??null,localState:c,size:f?.size??d?.size??null,executable:f?.executable??d?.executable??!1,binary:n,diff:p.text,diffTruncated:p.truncated,additions:p.additions,deletions:p.deletions}),"add"===b?J.added+=1:"update"===b?J.updated+=1:"remove"===b?J.removed+=1:J.unchanged+=1,n&&(K=!0),p.truncated&&(L=!0)}for(let a of b)J.localModified+=a.assessment.stats.modified,J.localMissing+=a.assessment.stats.missing,J.localUnknown+=a.assessment.stats.unknown,J.irregular+=a.assessment.stats.irregular;let M=(0,j.Hg)([...F.entries()].map(([a,b])=>({path:a,sha256:b.sha256,executable:b.executable}))),N=[];"detached"===a.git.headState&&N.push(j.OV.DETACHED_HEAD),"unborn"===a.git.headState&&N.push(j.OV.UNBORN_HEAD),"unknown"===a.git.headState&&N.push(j.OV.HEAD_UNRESOLVED),a.git.dirty&&N.push(j.OV.WORKING_TREE_DIRTY),K&&N.push(j.OV.BINARY_CONTENT),L&&N.push(j.OV.DIFF_TRUNCATED),b.some(a=>a.existing.truncated)&&N.push(j.OV.TREE_SCAN_TRUNCATED);let O=function(a,b,c,d){let e={declared:a.declared_risk,computed:a.computed_risk,effective:a.effective_risk},f={declared:b.declaredRisk,computed:b.computedRisk,effective:b.effectiveRisk},h=new Set(a.declared_permissions),i=new Set(b.inspection.declared_permissions),j={added:[...i].filter(a=>!h.has(a)),removed:[...h].filter(a=>!i.has(a)),unchanged:[...i].filter(a=>h.has(a))},k=new Set(a.files.map(a=>a.path)),l=new Set(b.files.map(a=>a.path)),o=a.files.filter(a=>a.executable).map(a=>a.path),p=b.files.filter(a=>a.executable).map(a=>a.path),q={added:p.filter(a=>!o.includes(a)),removed:o.filter(a=>!p.includes(a))},r={added:b.inspection.script_paths.filter(a=>!k.has(a)),removed:[...k].filter(a=>(function(a){let b=a.slice(a.lastIndexOf("/")+1),c=b.lastIndexOf(".");return!(c<=0)&&m.TW.includes(b.slice(c).toLowerCase())})(a)&&!l.has(a))},s=d.versions.filter(b=>{let d=(0,n.Cg)(b.version,a.version),e=(0,n.Cg)(b.version,c.version);return null!==d&&d>0&&null!==e&&e<=0}).sort((a,b)=>(0,n.Cg)(b.version,a.version)??0).map(a=>({version:a.version,changelog:a.changelog}));return{risk:{from:e,to:f,increased:g.$Y[f.effective]>g.$Y[e.effective]},permissions:j,executables:q,scripts:r,requirements:{commands:b.manifest.requirements.commands.map(a=>({name:a.name,versionRange:a.version_range??null})),networkHosts:[...b.manifest.requirements.network_hosts]},changelogs:s,agents:{from:a.agent_compatibility.map(a=>({...a})),to:c.compatibility.agents.map(a=>({...a}))}}}(p,e,a.version,a.catalogEntry),P="high"===e.effectiveRisk,Q=O.risk.increased,R=(0,d.randomBytes)(24).toString("hex"),S=c+i.c$,T={actor:a.actor,operation:"update",worktreeId:a.worktree.id,skillId:a.skillId,fromVersion:p.version,toVersion:e.version,artifactSha256:a.version.artifact.sha256,snapshotId:a.snapshotId,currentReceiptDigest:l.receiptDigest,branch:a.git.branch,headCommit:a.git.headCommit,currentTreeHash:t.assessment.currentTreeHash,plannedTreeHash:M},U={token:R,expiresAt:new Date(S).toISOString().replace(/\.\d{3}Z$/,"Z"),updatable:0===w.length,blockers:w,nextActionKey:0===w.length?q.updatable:q.blocked,requiresRiskAcknowledgement:P,riskAcknowledgementMessageKey:P?"skills.update.highRiskAcknowledgement":null,riskIncreased:Q,riskIncreaseMessageKey:Q?"skills.update.riskIncreaseAcknowledgement":null,update:{fromVersion:p.version,toVersion:e.version,latestVersion:a.latestVersion,reasonCode:a.reasonCode,prerelease:a.prerelease},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:t.rel,installRoots:b.map(a=>a.rel),roots:b.map(a=>({installRoot:a.rel,rootPrefix:a.prefix,clean:a.assessment.removable,receiptDigest:a.assessment.receiptDigest,currentTreeHash:a.assessment.currentTreeHash})),currentTreeHash:t.assessment.currentTreeHash,plannedTreeHash:M},skill:function(a,b,c){let{manifest:d}=a;return{id:a.skillId,name:d.name,version:a.version,summary:d.summary,description:d.description,capabilities:[...d.capabilities],expectedOutcomes:[...d.expected_outcomes],provider:{...d.provider},license:d.license,homepage:d.homepage??null,declaredPermissions:[...a.inspection.declared_permissions],requirements:{commands:d.requirements.commands.map(a=>({name:a.name,versionRange:a.version_range??null})),networkHosts:[...d.requirements.network_hosts]},declaredRisk:a.declaredRisk,computedRisk:a.computedRisk,effectiveRisk:a.effectiveRisk,riskRationale:d.risk_rationale,executablePaths:[...a.inspection.executable_paths],scriptPaths:[...a.inspection.script_paths],compatibility:{commandmate:c,agents:b.compatibility.agents.map(a=>({...a}))},source:{repository:b.source.repository,ref:b.source.ref,commit:b.source.commit},artifact:{assetName:b.artifact.asset_name,sha256:b.artifact.sha256,size:b.artifact.size,format:b.artifact.format}}}(e,a.version,a.compatibility),securityDiff:O,receipt:{path:`${t.rel}/${i.zi}`,sha256:C,size:z.byteLength},files:I,stats:J,warnings:N},V={token:R,binding:T,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(",")}}`}(T)).digest("hex"),createdAt:c,expiresAt:S,consumedAt:null,worktreePath:a.worktree.path,rootPrefixes:x,receipt:y,receiptBytes:z,dto:U};for(v(c);s.records.size>=i.sK;){let a=[...s.records.values()].sort((a,b)=>a.createdAt-b.createdAt)[0];if(!a)break;u(a)}return s.records.set(R,V),V}},98170:(a,b,c)=>{c.d(b,{mF:()=>l});var d=c(32520),e=c(72626),f=c(52710),g=c(1185),h=c(82484),i=c(89936);let j=(0,e.h)("lib/skills/plan-sweeper"),k=globalThis.__skillPlanSweeper??(globalThis.__skillPlanSweeper={timer:null});function l(){if(k.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}),e=(0,h.ne)({now:b});return{installPlans:c,uninstallPlans:d,updatePlans:e,snapshots:(0,i.nW)()?(0,i.Jk)({now:b}):0}}();(a.installPlans||a.uninstallPlans||a.updatePlans||a.snapshots)&&j.debug("skill-plan-sweep",{...a})}catch(a){j.warn("skill-plan-sweep-failed",{error:a instanceof Error?a.message:String(a)})}},d.Oj);a.unref(),k.timer=a}}};
|
|
1
|
+
"use strict";exports.id=9584,exports.ids=[9584],exports.modules={4548:(a,b,c)=>{c.d(b,{TW:()=>i,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}}},56791:(a,b,c)=>{c.r(b),c.d(b,{ACTIVE_FILTER:()=>d.ks,ACTIVE_TASK_STATUSES:()=>d.EL,AgentInstanceLimitError:()=>d.AC,CURRENT_SCHEMA_VERSION:()=>f.FT,DEFAULT_RUN_HISTORY_LIMIT:()=>d.Tu,InvalidAgentInstanceError:()=>d.ug,MAX_DISABLED_REPOSITORIES:()=>h.nc,MAX_RUN_HISTORY_DAYS:()=>d.eP,MAX_RUN_HISTORY_LIMIT:()=>d.mg,MemoDbError:()=>d.lm,NEW_SUBSCRIPTION_DEFAULTS:()=>d.s6,PUSH_DEFAULTS_VERSION:()=>d.VP,RepositoryDbError:()=>h.j8,TASK_STATUSES:()=>d.Hi,TERMINAL_TASK_STATUSES:()=>d.sA,VERIFICATION_GATE_SOURCES:()=>d.Dx,VERIFICATION_TRIGGERS:()=>d.af,WORKTREE_TODO_STATUSES:()=>d.KG,addAgentInstance:()=>d.Uq,archiveAllAssistantMessages:()=>d.cD,archiveAssistantMessagesFrom:()=>d.Jj,cancelTimer:()=>d.Ud,cancelTimersByWorktree:()=>d.$$,cleanupOldTimers:()=>d.ul,clearInProgressMessageId:()=>d.YX,clearLastUserMessage:()=>d.cf,clearTimerHistory:()=>d.jf,closeDbInstance:()=>e.closeDbInstance,countAgentInstances:()=>d.fs,countDisabledRepositories:()=>h.QJ,countPushSubscriptionsForKind:()=>d.rC,countWorktreesByRepositoryPath:()=>h.kp,createAssistantConversation:()=>d.G4,createAssistantExecution:()=>d.hL,createAssistantMessage:()=>d.qp,createCloneJob:()=>h.tw,createGateResult:()=>d.hl,createMemo:()=>d.To,createMessage:()=>d.oH,createRepository:()=>h.vB,createTask:()=>d.UT,createTimer:()=>d.CR,createTodo:()=>d.py,createVerificationRun:()=>d.rY,createWorktreeTodo:()=>d.yy,deleteAllMessages:()=>d.pE,deleteAssistantSessionState:()=>d.z2,deleteMemo:()=>d.cP,deleteMessageById:()=>d.DF,deleteMessagesByCliTool:()=>d.lA,deleteMessagesByInstance:()=>d.Qp,deletePushSubscriptionByEndpoint:()=>d.th,deleteRepository:()=>h.oG,deleteRepositoryWorktrees:()=>d.oZ,deleteSessionState:()=>d.ZP,deleteTodo:()=>d.Ys,deleteWorktreeTodo:()=>d.vg,deleteWorktreesByIds:()=>d.Rm,disableExistingRepository:()=>h.eP,disableRepository:()=>h.l$,ensureEnvRepositoriesRegistered:()=>h.ES,filterExcludedPaths:()=>h.Ho,findMessageByRequestId:()=>d.Ow,finishGateResult:()=>d.C8,finishVerificationRun:()=>d.u$,getActiveCloneJobByUrl:()=>h.fD,getActiveTask:()=>d.__,getActiveTaskForInstance:()=>d.MH,getAgentInstance:()=>d.BN,getAgentInstances:()=>d.m0,getAliasedWorktreeIds:()=>d.r3,getAllPushSubscriptions:()=>d.Se,getAllRepositories:()=>h.Yg,getAllRepositoriesWithWorktreeCount:()=>h._D,getAllTodos:()=>d.Tk,getAllWorktreeAliases:()=>d.fX,getAllWorktreeIds:()=>d.nO,getAllWorktreePathIds:()=>d.Sj,getAssistantConversationById:()=>d.iT,getAssistantConversationByRepositoryAndCliTool:()=>d.gp,getAssistantExecutionById:()=>d.$r,getAssistantMessageById:()=>d.yE,getAssistantMessages:()=>d.BE,getAssistantSessionState:()=>d.qK,getCloneJob:()=>h.bM,getCloneJobsByStatus:()=>h.n_,getCurrentVersion:()=>f.Mj,getDailyReport:()=>d.ap,getDbInstance:()=>e.getDbInstance,getDefaultDbPath:()=>g.$b,getExcludedRepositories:()=>h.lS,getExcludedRepositoryPaths:()=>h.pr,getInitialBranch:()=>d.p4,getIssueDbPath:()=>g.zm,getLastAssistantMessageAt:()=>d.nP,getLastMessage:()=>d.sy,getLastUserMessage:()=>d.r8,getLatestAssistantExecutionByConversation:()=>d.of,getLegacyDbPaths:()=>q,getMemoById:()=>d.DN,getMemosByWorktreeId:()=>d.pZ,getMessageById:()=>d.kA,getMessages:()=>d.VL,getMessagesByDateRange:()=>d.lr,getMigrationHistory:()=>f.PS,getPendingTimerCountByWorktree:()=>d.GF,getPendingTimers:()=>d._O,getPushSubscriptionByEndpoint:()=>d.CF,getPushSubscriptionsForKind:()=>d.gn,getRepositories:()=>d.NV,getRepositoryById:()=>h.r,getRepositoryByNormalizedUrl:()=>h.Uj,getRepositoryByPath:()=>h.Dp,getRunningAssistantExecutionByConversation:()=>d.ce,getRunningVerificationRun:()=>d.WZ,getSessionState:()=>d.y1,getTask:()=>d.gg,getTimerById:()=>d.kx,getTimersByWorktree:()=>d.DP,getTodoById:()=>d.Nr,getTodosByRepositoryId:()=>d.ob,getTodosByWorktreeId:()=>d.fr,getVerificationRun:()=>d.J6,getWorktreeAliases:()=>d.Q2,getWorktreeById:()=>d.Ui,getWorktreeIdsByRepository:()=>d.P9,getWorktreeTodoById:()=>d.eN,getWorktrees:()=>d.vi,getWorktreesByRepository:()=>d.uJ,initDatabase:()=>d.s4,isTerminalTaskStatus:()=>d.uB,isWorktreeTodoStatus:()=>d.yT,listRunningAssistantExecutions:()=>d.b2,listRunningVerificationRuns:()=>d.Fi,listTaskEvents:()=>d.HB,listTasks:()=>d.Vk,listVerificationRuns:()=>d.Mt,listVerificationRunsForPeriod:()=>d.UE,markPendingPromptsAsAnswered:()=>d.PL,migrateDbIfNeeded:()=>r,migrateWorktreeIdPreservingChildren:()=>d._h,pushSubscriptionNeedsDefaultsNotice:()=>d.Zj,recomputeLastUserMessage:()=>d.jp,recordAnsweredPrompt:()=>d.pG,recordWorktreeAlias:()=>d.xJ,recoverStuckSendingTimers:()=>d.Xm,registerAndFilterRepositories:()=>h.$G,removeAgentInstance:()=>d.NU,reorderMemos:()=>d.nQ,reorderWorktreeTodos:()=>d.yb,resolveAndValidatePath:()=>p,resolveRepositoryPath:()=>h.mE,resolveWorktreeIdWithAlias:()=>d.l0,restoreRepository:()=>h.RS,rollbackMigrations:()=>f.Wy,runMigrations:()=>f.vI,saveDailyReport:()=>d.tt,saveInitialBranch:()=>d.GA,setAgentInstances:()=>d.Cs,setInProgressMessageId:()=>d.OF,setRepositoryEnabled:()=>h.iQ,updateAssistantConversation:()=>d.xR,updateAssistantExecution:()=>d.az,updateAssistantMessageStatus:()=>d.nZ,updateAssistantSessionState:()=>d.PP,updateCliToolId:()=>d.WU,updateCloneJob:()=>h.k5,updateDailyReportContent:()=>d.IF,updateFavorite:()=>d.O,updateLastUserMessage:()=>d.EU,updateLastViewedAt:()=>d.HZ,updateMemo:()=>d.UY,updateMessageContent:()=>d.e8,updatePromptData:()=>d.cw,updatePushSubscriptionPreferences:()=>d.jJ,updateRepository:()=>h.Ir,updateSelectedAgents:()=>d.DC,updateSessionState:()=>d.gb,updateStatus:()=>d.yB,updateTimerStatus:()=>d.j2,updateTodo:()=>d.uy,updateVibeLocalContextWindow:()=>d.s,updateVibeLocalModel:()=>d.iu,updateWorktreeDescription:()=>d.hq,updateWorktreeLink:()=>d.z1,updateWorktreeTodo:()=>d.bl,upsertPushSubscription:()=>d.jA,upsertWorktree:()=>d.ZL,validateDbPath:()=>g.Sv,validateRepositoryPath:()=>h.Ux,validateSchema:()=>f.i6});var d=c(90444),e=c(88807),f=c(67469),g=c(20416),h=c(10406),i=c(29021),j=c.n(i),k=c(33873),l=c.n(k),m=c(21820),n=c(7956);let o=(0,c(72626).h)("db-migration-path");function p(a,b){try{if(!j().existsSync(a))return null;let c=j().realpathSync(a);if((0,n.fW)(c))return o.warn(`[Security] ${b} points to system directory, skipping: ${c}`),null;return c}catch{return o.warn(`[Security] Failed to resolve ${b}: ${a}`),null}}function q(){let a=[];a.push(l().join(process.cwd(),"data","db.sqlite")),a.push(l().join(process.cwd(),"data","cm.db")),a.push(l().join((0,m.homedir)(),".commandmate","data","db.sqlite"));let b=process.env.DATABASE_PATH;if(b)try{let c=l().resolve(b);(0,n.fW)(c)?o.warn(`[Security] Skipping DATABASE_PATH in system directory: ${c}`):a.push(b)}catch{o.warn(`[Security] Invalid DATABASE_PATH: ${b}`)}return a}function r(a){let b=l().resolve(a);if((0,n.fW)(b))throw Error(`Security error: Target path cannot be in system directory: ${b}`);if(j().existsSync(a)){let b=p(a,"target path");if(b)return{migrated:!1,targetPath:b}}for(let a of q()){let c=p(a,"legacy path");if(!c)continue;let d=`${c}.bak`;j().copyFileSync(c,d),j().chmodSync(d,384);let e=l().dirname(b);return j().existsSync(e)||j().mkdirSync(e,{recursive:!0,mode:448}),j().copyFileSync(c,b),o.info(`[Migration] Database migrated from ${c} to ${b}`),o.info(`[Migration] Backup created at ${d}`),{migrated:!0,sourcePath:c,targetPath:b,backupPath:d}}return{migrated:!1,targetPath:b}}},82484:(a,b,c)=>{c.d(b,{E4:()=>y,QY:()=>r,Sw:()=>C,cl:()=>z,jY:()=>t,ne:()=>w});var d=c(55511),e=c(33873),f=c.n(e),g=c(96210),h=c(93356),i=c(52710),j=c(33095),k=c(1185),l=c(89936),m=c(4548),n=c(36931);let o={LOCAL_CHANGES:"SKILL_UPDATE_LOCAL_CHANGES",ROOT_MISSING:"SKILL_UPDATE_ROOT_MISSING",RECEIPT_MISSING:"SKILL_UPDATE_RECEIPT_MISSING",RECEIPT_UNREADABLE:"SKILL_UPDATE_RECEIPT_UNREADABLE",RECEIPT_FOREIGN:"SKILL_UPDATE_RECEIPT_FOREIGN",ROOT_RECEIPT_DIVERGED:"SKILL_UPDATE_ROOT_RECEIPT_DIVERGED",TREE_SCAN_TRUNCATED:"SKILL_UPDATE_TREE_SCAN_TRUNCATED",INCOMPATIBLE:"SKILL_UPDATE_INCOMPATIBLE"},p={[o.LOCAL_CHANGES]:"skills.update.blocked.localChanges",[o.ROOT_MISSING]:"skills.update.blocked.rootMissing",[o.RECEIPT_MISSING]:"skills.update.blocked.receiptMissing",[o.RECEIPT_UNREADABLE]:"skills.update.blocked.receiptUnreadable",[o.RECEIPT_FOREIGN]:"skills.update.blocked.receiptForeign",[o.ROOT_RECEIPT_DIVERGED]:"skills.update.blocked.rootReceiptDiverged",[o.TREE_SCAN_TRUNCATED]:"skills.update.blocked.treeScanTruncated",[o.INCOMPATIBLE]:"skills.update.blocked.incompatible"},q={updatable:"skills.update.nextAction.updatable",blocked:"skills.update.nextAction.blocked"};function r(a,b,c){let d;if(!g.X0.test(b)||b.length>g.cj)throw new i.nf(i.ER.TARGET_UNSAFE);try{d=(0,j.yj)(a,c,b)}catch{throw new i.nf(i.ER.TARGET_UNSAFE)}let e=(0,j.bh)(d);if(!e.present)return{state:"not_installed"};let f=e.files.find(a=>a.path===i.zi);if(!f)return{state:"receipt_missing"};let h=(0,i.q$)(f.bytes);return null===h?{state:"receipt_unreadable"}:h.skill_id!==b?{state:"receipt_foreign"}:{state:"ok",receipt:h,receiptDigest:f.sha256}}let s=globalThis.__skillUpdatePlans??(globalThis.__skillUpdatePlans={records:new Map}),t=/^[0-9a-f]{48}$/;function u(a){s.records.delete(a.token),null===a.consumedAt&&(0,l.TO)(a.binding.snapshotId)}function v(a,b){let c=0;for(let d of[...s.records.values()])d.token!==b&&a>=d.expiresAt&&(u(d),c+=1);return c}function w(a={}){return v(a.now??Date.now())}function x(a,b){if(!t.test(a))throw new i.nf(i.ER.NOT_FOUND);let c=s.records.get(a);if(v(b,a),!c)throw new i.nf(i.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 i.nf(i.ER.NOT_FOUND);if(b>=c.expiresAt)throw u(c),new i.nf(i.ER.EXPIRED);if(null!==c.consumedAt)throw new i.nf(i.ER.CONSUMED);return c}function y(a,b={}){return x(a,b.now??Date.now())}function z(a,b,c,d={}){let e=d.now??Date.now(),f=x(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.toVersion!==b.toVersion)throw new i.nf(i.ER.BINDING_MISMATCH);if(!f.dto.updatable)throw new i.nf(i.ER.NOT_INSTALLABLE);if(f.dto.requiresRiskAcknowledgement&&!b.riskAcknowledged)throw new i.nf(i.ER.RISK_NOT_ACKNOWLEDGED);if(f.dto.riskIncreased&&!b.riskIncreaseAcknowledged)throw new i.nf(i.ER.RISK_NOT_ACKNOWLEDGED,{riskIncreased:!0});if(c.branch!==g.branch||c.headCommit!==g.headCommit||c.currentTreeHash!==g.currentTreeHash||null===c.receiptDigest||!(0,h.U2)(c.receiptDigest,g.currentReceiptDigest))throw new i.nf(i.ER.STALE);return f.consumedAt=e,f}function A(a,b,c=null){return{code:a,path:b,messageKey:p[a],detail:c}}let B={[k.sJ.LOCAL_MODIFICATION]:o.LOCAL_CHANGES,[k.sJ.RECEIPT_ORPHAN]:o.LOCAL_CHANGES,[k.sJ.UNMANAGED_FILE]:o.LOCAL_CHANGES,[k.sJ.NOT_A_REGULAR_FILE]:o.LOCAL_CHANGES,[k.sJ.NOT_INSTALLED]:o.ROOT_MISSING,[k.sJ.RECEIPT_MISSING]:o.RECEIPT_MISSING,[k.sJ.RECEIPT_UNREADABLE]:o.RECEIPT_UNREADABLE,[k.sJ.RECEIPT_FOREIGN]:o.RECEIPT_FOREIGN,[k.sJ.TREE_SCAN_TRUNCATED]:o.TREE_SCAN_TRUNCATED};function C(a){let b;if(!g.X0.test(a.skillId)||a.skillId.length>g.cj)throw new i.nf(i.ER.TARGET_UNSAFE);let c=a.now??Date.now(),{snapshot:e}=a,l=r(a.worktree.path,a.skillId,g.pg);if("not_installed"===l.state)throw new i.nf(i.ER.NOT_FOUND);if("ok"!==l.state||l.receipt.version!==a.fromVersion)throw new i.nf(i.ER.STALE);let p=l.receipt;try{b=(0,i.Pw)(p).map(b=>{let c=f().posix.dirname(b),d=(0,j.yj)(a.worktree.path,c,a.skillId),e=(0,j.bh)(d);return{prefix:c,rel:(0,j.QL)(c,a.skillId),existing:e,assessment:(0,k.II)(d,a.skillId,{existing:e,rootPrefix:c})}})}catch{throw new i.nf(i.ER.TARGET_UNSAFE)}let t=b[0],w=[];for(let a of b){for(let b of a.assessment.blockers){let a=B[b.code];a&&w.push(A(a,b.path,b.code))}a!==t&&null!==a.assessment.receiptDigest&&a.assessment.receiptDigest!==t.assessment.receiptDigest&&w.push(A(o.ROOT_RECEIPT_DIVERGED,`${a.rel}/${i.zi}`))}"compatible"!==a.compatibility.status&&w.push(A(o.INCOMPATIBLE,null));let x=b.map(a=>a.prefix),y=(0,i.$h)({snapshot:e,version:a.version,rootPrefixes:x}),z=(0,i.tJ)(y),C=(0,d.createHash)("sha256").update(z).digest("hex"),D=new Map(p.files.map(a=>[a.path,{sha256:a.sha256,size:a.size,executable:a.executable}])),E=t.existing.files.find(a=>a.path===i.zi);D.set(i.zi,{sha256:l.receiptDigest,size:E?.size??null,executable:!1});let F=new Map(e.files.map(a=>[a.path,{sha256:a.sha256,size:a.size,executable:a.executable,generated:!1}]));F.set(i.zi,{sha256:C,size:z.byteLength,executable:!1,generated:!0});let G=new Map(t.existing.files.map(a=>[a.path,a])),H={remainingBytes:j.mo},I=[],J={added:0,updated:0,removed:0,unchanged:0,localModified:0,localMissing:0,localUnknown:0,irregular:0},K=!1,L=!1;for(let a of[...new Set([...D.keys(),...F.keys()])].sort()){let b,c,d=D.get(a)??null,f=F.get(a)??null,g=G.get(a)??null;b=d&&f?(0,h.U2)(d.sha256,f.sha256)&&d.executable===f.executable?"unchanged":"update":f?"add":"remove",c=null===d?null===g?"match":"unknown":null===g?"missing":(0,h.U2)(g.sha256,d.sha256)&&g.executable===d.executable?"match":"modified";let k=f?.generated??a===i.zi,l=null!==d&&null!==g&&"match"===c?g.bytes:null,m=null===f?null:k?z:e.readFile(a),n=null!==l&&(0,j.VA)(l)||null!==m&&(0,j.VA)(m),o=null!==d&&"match"!==c,p=n||o||"unchanged"===b?{text:null,truncated:!1,additions:0,deletions:0}:(0,j.kt)(l,m,H);I.push({path:`${t.rel}/${a}`,relativePath:a,change:b,generated:k,recordedSha256:d?.sha256??null,candidateSha256:f?.sha256??null,currentSha256:g?.sha256??null,localState:c,size:f?.size??d?.size??null,executable:f?.executable??d?.executable??!1,binary:n,diff:p.text,diffTruncated:p.truncated,additions:p.additions,deletions:p.deletions}),"add"===b?J.added+=1:"update"===b?J.updated+=1:"remove"===b?J.removed+=1:J.unchanged+=1,n&&(K=!0),p.truncated&&(L=!0)}for(let a of b)J.localModified+=a.assessment.stats.modified,J.localMissing+=a.assessment.stats.missing,J.localUnknown+=a.assessment.stats.unknown,J.irregular+=a.assessment.stats.irregular;let M=(0,j.Hg)([...F.entries()].map(([a,b])=>({path:a,sha256:b.sha256,executable:b.executable}))),N=[];"detached"===a.git.headState&&N.push(j.OV.DETACHED_HEAD),"unborn"===a.git.headState&&N.push(j.OV.UNBORN_HEAD),"unknown"===a.git.headState&&N.push(j.OV.HEAD_UNRESOLVED),a.git.dirty&&N.push(j.OV.WORKING_TREE_DIRTY),K&&N.push(j.OV.BINARY_CONTENT),L&&N.push(j.OV.DIFF_TRUNCATED),b.some(a=>a.existing.truncated)&&N.push(j.OV.TREE_SCAN_TRUNCATED);let O=function(a,b,c,d){let e={declared:a.declared_risk,computed:a.computed_risk,effective:a.effective_risk},f={declared:b.declaredRisk,computed:b.computedRisk,effective:b.effectiveRisk},h=new Set(a.declared_permissions),i=new Set(b.inspection.declared_permissions),j={added:[...i].filter(a=>!h.has(a)),removed:[...h].filter(a=>!i.has(a)),unchanged:[...i].filter(a=>h.has(a))},k=new Set(a.files.map(a=>a.path)),l=new Set(b.files.map(a=>a.path)),o=a.files.filter(a=>a.executable).map(a=>a.path),p=b.files.filter(a=>a.executable).map(a=>a.path),q={added:p.filter(a=>!o.includes(a)),removed:o.filter(a=>!p.includes(a))},r={added:b.inspection.script_paths.filter(a=>!k.has(a)),removed:[...k].filter(a=>(function(a){let b=a.slice(a.lastIndexOf("/")+1),c=b.lastIndexOf(".");return!(c<=0)&&m.TW.includes(b.slice(c).toLowerCase())})(a)&&!l.has(a))},s=d.versions.filter(b=>{let d=(0,n.Cg)(b.version,a.version),e=(0,n.Cg)(b.version,c.version);return null!==d&&d>0&&null!==e&&e<=0}).sort((a,b)=>(0,n.Cg)(b.version,a.version)??0).map(a=>({version:a.version,changelog:a.changelog}));return{risk:{from:e,to:f,increased:g.$Y[f.effective]>g.$Y[e.effective]},permissions:j,executables:q,scripts:r,requirements:{commands:b.manifest.requirements.commands.map(a=>({name:a.name,versionRange:a.version_range??null})),networkHosts:[...b.manifest.requirements.network_hosts]},changelogs:s,agents:{from:a.agent_compatibility.map(a=>({...a})),to:c.compatibility.agents.map(a=>({...a}))}}}(p,e,a.version,a.catalogEntry),P="high"===e.effectiveRisk,Q=O.risk.increased,R=(0,d.randomBytes)(24).toString("hex"),S=c+i.c$,T={actor:a.actor,operation:"update",worktreeId:a.worktree.id,skillId:a.skillId,fromVersion:p.version,toVersion:e.version,artifactSha256:a.version.artifact.sha256,snapshotId:a.snapshotId,currentReceiptDigest:l.receiptDigest,branch:a.git.branch,headCommit:a.git.headCommit,currentTreeHash:t.assessment.currentTreeHash,plannedTreeHash:M},U={token:R,expiresAt:new Date(S).toISOString().replace(/\.\d{3}Z$/,"Z"),updatable:0===w.length,blockers:w,nextActionKey:0===w.length?q.updatable:q.blocked,requiresRiskAcknowledgement:P,riskAcknowledgementMessageKey:P?"skills.update.highRiskAcknowledgement":null,riskIncreased:Q,riskIncreaseMessageKey:Q?"skills.update.riskIncreaseAcknowledgement":null,update:{fromVersion:p.version,toVersion:e.version,latestVersion:a.latestVersion,reasonCode:a.reasonCode,prerelease:a.prerelease},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:t.rel,installRoots:b.map(a=>a.rel),roots:b.map(a=>({installRoot:a.rel,rootPrefix:a.prefix,clean:a.assessment.removable,receiptDigest:a.assessment.receiptDigest,currentTreeHash:a.assessment.currentTreeHash})),currentTreeHash:t.assessment.currentTreeHash,plannedTreeHash:M},skill:function(a,b,c){let{manifest:d}=a;return{id:a.skillId,name:d.name,version:a.version,summary:d.summary,description:d.description,capabilities:[...d.capabilities],expectedOutcomes:[...d.expected_outcomes],provider:{...d.provider},license:d.license,homepage:d.homepage??null,declaredPermissions:[...a.inspection.declared_permissions],requirements:{commands:d.requirements.commands.map(a=>({name:a.name,versionRange:a.version_range??null})),networkHosts:[...d.requirements.network_hosts]},declaredRisk:a.declaredRisk,computedRisk:a.computedRisk,effectiveRisk:a.effectiveRisk,riskRationale:d.risk_rationale,executablePaths:[...a.inspection.executable_paths],scriptPaths:[...a.inspection.script_paths],compatibility:{commandmate:c,agents:b.compatibility.agents.map(a=>({...a}))},source:{repository:b.source.repository,ref:b.source.ref,commit:b.source.commit},artifact:{assetName:b.artifact.asset_name,sha256:b.artifact.sha256,size:b.artifact.size,format:b.artifact.format}}}(e,a.version,a.compatibility),securityDiff:O,receipt:{path:`${t.rel}/${i.zi}`,sha256:C,size:z.byteLength},files:I,stats:J,warnings:N},V={token:R,binding:T,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(",")}}`}(T)).digest("hex"),createdAt:c,expiresAt:S,consumedAt:null,worktreePath:a.worktree.path,rootPrefixes:x,receipt:y,receiptBytes:z,dto:U};for(v(c);s.records.size>=i.sK;){let a=[...s.records.values()].sort((a,b)=>a.createdAt-b.createdAt)[0];if(!a)break;u(a)}return s.records.set(R,V),V}},98170:(a,b,c)=>{c.d(b,{mF:()=>l});var d=c(32520),e=c(72626),f=c(52710),g=c(1185),h=c(82484),i=c(89936);let j=(0,e.h)("lib/skills/plan-sweeper"),k=globalThis.__skillPlanSweeper??(globalThis.__skillPlanSweeper={timer:null});function l(){if(k.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}),e=(0,h.ne)({now:b});return{installPlans:c,uninstallPlans:d,updatePlans:e,snapshots:(0,i.nW)()?(0,i.Jk)({now:b}):0}}();(a.installPlans||a.uninstallPlans||a.updatePlans||a.snapshots)&&j.debug("skill-plan-sweep",{...a})}catch(a){j.warn("skill-plan-sweep-failed",{error:a instanceof Error?a.message:String(a)})}},d.Oj);a.unref(),k.timer=a}}};
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"wasm": [],
|
|
18
18
|
"assets": [],
|
|
19
19
|
"env": {
|
|
20
|
-
"__NEXT_BUILD_ID": "
|
|
21
|
-
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "
|
|
22
|
-
"__NEXT_PREVIEW_MODE_ID": "
|
|
23
|
-
"__NEXT_PREVIEW_MODE_SIGNING_KEY": "
|
|
24
|
-
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "
|
|
20
|
+
"__NEXT_BUILD_ID": "9lgw9hA727UMyFhXryGWG",
|
|
21
|
+
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "iF5rmg/pUFibI2dOF5RRQwWpaP9DBxo8mMgoVViLNVo=",
|
|
22
|
+
"__NEXT_PREVIEW_MODE_ID": "fd6dafe718d7c72562b8bc39480578eb",
|
|
23
|
+
"__NEXT_PREVIEW_MODE_SIGNING_KEY": "57937a8cbcc7cd29da48056612a11543ce89ae2adbeb834bc590ab05771e875f",
|
|
24
|
+
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "d92b6728459c7ab5a5a9d6b416b276eda7849e316e51eab7dd04dd6f577c94b9"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-1dc9eb5ebb4fa5ff.js" defer=""></script><script src="/_next/static/chunks/framework-eaf13c96191cb608.js" defer=""></script><script src="/_next/static/chunks/main-6092074a0dc78280.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4b3fb5e477a0267f.js" defer=""></script><script src="/_next/static/chunks/pages/_error-c970d8b55ace1b48.js" defer=""></script><script src="/_next/static/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-1dc9eb5ebb4fa5ff.js" defer=""></script><script src="/_next/static/chunks/framework-eaf13c96191cb608.js" defer=""></script><script src="/_next/static/chunks/main-6092074a0dc78280.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4b3fb5e477a0267f.js" defer=""></script><script src="/_next/static/chunks/pages/_error-c970d8b55ace1b48.js" defer=""></script><script src="/_next/static/9lgw9hA727UMyFhXryGWG/_buildManifest.js" defer=""></script><script src="/_next/static/9lgw9hA727UMyFhXryGWG/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"9lgw9hA727UMyFhXryGWG","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"iF5rmg/pUFibI2dOF5RRQwWpaP9DBxo8mMgoVViLNVo="}
|