commandmate 0.33.1 → 0.33.3
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 +307 -307
- package/.next/app-path-routes-manifest.json +28 -28
- package/.next/build-manifest.json +5 -5
- package/.next/diagnostics/framework.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +15 -15
- package/.next/required-server-files.json +1 -2
- 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.js +1 -1
- package/.next/server/app/api/app/update-check/route.js.nft.json +1 -1
- package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/conversation/route.js +1 -1
- package/.next/server/app/api/assistant/conversation/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/current-output/route.js +1 -1
- package/.next/server/app/api/assistant/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/messages/route.js +1 -1
- package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/session/route.js +1 -1
- package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/start/route.js +32 -1
- package/.next/server/app/api/assistant/start/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/terminal/route.js +33 -2
- package/.next/server/app/api/assistant/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/tools/route.js +1 -1
- package/.next/server/app/api/assistant/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/capabilities/route.js +1 -1
- package/.next/server/app/api/capabilities/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/hooks/agent-event/route.js.nft.json +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.js +2 -2
- package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js.nft.json +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_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.js +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/route.js +1 -1
- package/.next/server/app/api/relays/route.js.nft.json +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_client-reference-manifest.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.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/route.js +1 -1
- package/.next/server/app/api/repositories/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/default-agents/route.js +1 -1
- package/.next/server/app/api/settings/default-agents/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/skills/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/installations/route.js +1 -1
- package/.next/server/app/api/skills/installations/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/slash-commands/route_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_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_client-reference-manifest.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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +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_client-reference-manifest.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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.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_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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
- 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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js.nft.json +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_client-reference-manifest.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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/tasks/route.js.nft.json +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.js +103 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.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_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.js.nft.json +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.js.nft.json +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_client-reference-manifest.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_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.js.nft.json +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_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_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/[skillId]/page_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 +10 -10
- 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 +28 -28
- package/.next/server/chunks/1068.js +1 -0
- package/.next/server/chunks/1210.js +1 -1
- package/.next/server/chunks/1331.js +2 -2
- package/.next/server/chunks/1366.js +5 -3
- package/.next/server/chunks/1501.js +6 -2
- 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/2839.js +1 -0
- package/.next/server/chunks/3123.js +1 -1
- package/.next/server/chunks/3241.js +1 -1
- package/.next/server/chunks/3323.js +1 -0
- package/.next/server/chunks/3707.js +1 -1
- package/.next/server/chunks/3708.js +1 -1
- package/.next/server/chunks/4443.js +1 -1
- package/.next/server/chunks/5220.js +1 -1
- package/.next/server/chunks/595.js +2 -2
- package/.next/server/chunks/6130.js +1 -0
- package/.next/server/chunks/650.js +1 -0
- package/.next/server/chunks/6661.js +1 -1
- package/.next/server/chunks/6781.js +1 -0
- package/.next/server/chunks/6808.js +1 -0
- package/.next/server/chunks/7875.js +3 -3
- package/.next/server/chunks/7905.js +1 -1
- package/.next/server/chunks/8918.js +107 -5
- package/.next/server/chunks/9553.js +1 -0
- package/.next/server/chunks/9627.js +1 -1
- package/.next/server/middleware-build-manifest.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/server/src/middleware.js.map +1 -1
- package/.next/static/chunks/1255-7e5873f06b25e129.js +1 -0
- package/.next/static/chunks/{4718-2bc5cdf06573bf54.js → 4718-814f4ecfd7fcc513.js} +1 -1
- package/.next/static/chunks/6022-7a7d1760fc9814c7.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-3af707e74a75172b.js +1 -0
- package/.next/static/chunks/{main-6092074a0dc78280.js → main-ac91ed6e71380841.js} +1 -1
- package/.next/trace +13 -14
- package/dist/server/locales/en/worktree.json +9 -2
- package/dist/server/locales/ja/worktree.json +9 -2
- package/dist/server/src/lib/assistant-response-saver.js +168 -12
- package/dist/server/src/lib/cli-tools/vibe-local.js +10 -0
- package/dist/server/src/lib/hooks/hook-settings-generator.js +61 -1
- package/dist/server/src/lib/hooks/sources/antigravity/history.js +497 -27
- package/dist/server/src/lib/hooks/sources/antigravity/transcript.js +103 -0
- package/dist/server/src/lib/hooks/sources/claude/history.js +29 -3
- package/dist/server/src/lib/hooks/sources/codex/history.js +29 -3
- package/dist/server/src/lib/hooks/sources/command-code/history.js +29 -3
- package/dist/server/src/lib/hooks/stop-history-capture.js +30 -4
- package/dist/server/src/lib/polling/response-checker.js +258 -9
- package/dist/server/src/lib/polling/response-poller-core.js +20 -0
- package/dist/server/src/lib/polling/structured-history-gate.js +94 -10
- package/dist/server/src/lib/response-cleaner.js +84 -0
- package/dist/server/src/lib/session/agent-session-lifecycle.js +31 -1
- package/dist/server/src/lib/session/session-generation-archive.js +194 -0
- package/dist/server/src/lib/tasks/contract-message.js +83 -9
- package/dist/server/src/lib/tasks/contract-parser.js +2 -0
- package/package.json +2 -2
- package/.next/server/chunks/153.js +0 -1
- package/.next/server/chunks/21.js +0 -1
- package/.next/server/chunks/3086.js +0 -1
- package/.next/server/chunks/3270.js +0 -1
- package/.next/server/chunks/3925.js +0 -1
- package/.next/server/chunks/4299.js +0 -1
- package/.next/server/chunks/5043.js +0 -1
- package/.next/server/chunks/6306.js +0 -1
- package/.next/server/chunks/6363.js +0 -1
- package/.next/server/chunks/6491.js +0 -103
- package/.next/server/chunks/6838.js +0 -1
- package/.next/server/chunks/7366.js +0 -5
- package/.next/server/chunks/7890.js +0 -1
- package/.next/server/chunks/8063.js +0 -32
- package/.next/server/chunks/8687.js +0 -1
- package/.next/static/chunks/1255-8cb587d9170b45ed.js +0 -1
- package/.next/static/chunks/6022-2fa0b5a82d4ce7b6.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-13ca0ba551fe5cfb.js +0 -1
- /package/.next/static/{9lgw9hA727UMyFhXryGWG → 9x6U1h52hH_r6pOsGwI_p}/_buildManifest.js +0 -0
- /package/.next/static/{9lgw9hA727UMyFhXryGWG → 9x6U1h52hH_r6pOsGwI_p}/_ssgManifest.js +0 -0
|
@@ -11,6 +11,7 @@ exports.cleanClaudeResponse = cleanClaudeResponse;
|
|
|
11
11
|
exports.cleanGeminiResponse = cleanGeminiResponse;
|
|
12
12
|
exports.cleanCopilotResponse = cleanCopilotResponse;
|
|
13
13
|
exports.cleanOpenCodeResponse = cleanOpenCodeResponse;
|
|
14
|
+
exports.cleanScrollbackResponse = cleanScrollbackResponse;
|
|
14
15
|
exports.truncateMessage = truncateMessage;
|
|
15
16
|
const cli_patterns_1 = require("./detection/cli-patterns");
|
|
16
17
|
const tui_accumulator_1 = require("./tui-accumulator");
|
|
@@ -409,6 +410,89 @@ function cleanOpenCodeResponse(response) {
|
|
|
409
410
|
}
|
|
410
411
|
return cleanedLines.join('\n').trim();
|
|
411
412
|
}
|
|
413
|
+
/**
|
|
414
|
+
* Locate the bottom-pinned chrome of an inline-rendering tool, or -1.
|
|
415
|
+
*
|
|
416
|
+
* Only two of the four tools {@link cleanScrollbackResponse} serves have a
|
|
417
|
+
* measured structural reader, and that is deliberate rather than a gap left to
|
|
418
|
+
* fill later:
|
|
419
|
+
*
|
|
420
|
+
* - **codex** — {@link findCodexChromeStart}, which reads the composer by
|
|
421
|
+
* #2310's SGR rule (composer glyph bold, transcript echo dim) rather than by
|
|
422
|
+
* its placeholder wording. That distinction is the whole point here: the
|
|
423
|
+
* previous guard named codex 0.1x placeholders (`Implement`, `Find and fix`,
|
|
424
|
+
* `Type`) and silently stopped matching when 0.15x started drawing `Ask Codex
|
|
425
|
+
* to do anything` (#2400);
|
|
426
|
+
* - **command-code** — {@link findCommandCodeChromeStart}, anchored on the two
|
|
427
|
+
* full-pane rules that fence its `❯` composer (#2250).
|
|
428
|
+
*
|
|
429
|
+
* agy and vibe-local pin no composer this repository has measured a landmark
|
|
430
|
+
* for, so they get -1 and their whole capture is filtered by their own skip
|
|
431
|
+
* patterns. Inventing a landmark for them would be a guess, and a boundary that
|
|
432
|
+
* is wrong deletes replies instead of chrome.
|
|
433
|
+
*
|
|
434
|
+
* @param lines - Capture rows, ANSI intact — both readers read attributes
|
|
435
|
+
*/
|
|
436
|
+
function findScrollbackChromeStart(lines, cliToolId) {
|
|
437
|
+
switch (cliToolId) {
|
|
438
|
+
case 'codex':
|
|
439
|
+
return (0, cli_patterns_1.findCodexChromeStart)(lines);
|
|
440
|
+
case 'command-code':
|
|
441
|
+
return (0, cli_patterns_1.findCommandCodeChromeStart)(lines);
|
|
442
|
+
default:
|
|
443
|
+
return -1;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Clean a capture from a scrollback-rendering tool that has no cleaner of its
|
|
448
|
+
* own (Issue #2437): codex, command-code, antigravity and vibe-local.
|
|
449
|
+
*
|
|
450
|
+
* Until #2437 `cleanCliResponse` returned these tools' captures verbatim, under
|
|
451
|
+
* a comment claiming codex "doesn't need special cleaning". The pre-send flush
|
|
452
|
+
* (`savePendingAssistantResponse`) therefore saved codex's **idle composer** as
|
|
453
|
+
* an assistant reply — measured 10 times on `commandagent-develop` from
|
|
454
|
+
* 2026-09-07, each row a copy of
|
|
455
|
+
*
|
|
456
|
+
* ```text
|
|
457
|
+
* › Ask Codex to do anything
|
|
458
|
+
*
|
|
459
|
+
* gpt-6-astra xhigh · ~/share/work/… · Main [default]
|
|
460
|
+
* ```
|
|
461
|
+
*
|
|
462
|
+
* Two steps, in this order, and both are needed:
|
|
463
|
+
*
|
|
464
|
+
* 1. cut the bottom-pinned chrome structurally
|
|
465
|
+
* ({@link findScrollbackChromeStart}) — the composer's text is whatever the
|
|
466
|
+
* tool decides to print in it, so no pattern can own that boundary;
|
|
467
|
+
* 2. filter what is left with the tool's own skip patterns, the same list
|
|
468
|
+
* `response-checker` already applies on the poller path
|
|
469
|
+
* ({@link getCliToolPatterns}). Sharing the list is what keeps the two
|
|
470
|
+
* paths from disagreeing about what counts as furniture.
|
|
471
|
+
*
|
|
472
|
+
* ANSI is stripped **per row, after** the boundary is found: both chrome readers
|
|
473
|
+
* classify rows by their SGR attributes, and stripping first would destroy the
|
|
474
|
+
* evidence they read.
|
|
475
|
+
*
|
|
476
|
+
* @param response - Raw capture, ANSI intact
|
|
477
|
+
* @param cliToolId - The tool the capture came from
|
|
478
|
+
* @returns Cleaned response, or an empty string when the capture was all chrome
|
|
479
|
+
*/
|
|
480
|
+
function cleanScrollbackResponse(response, cliToolId) {
|
|
481
|
+
const allLines = response.split('\n');
|
|
482
|
+
const chromeStart = findScrollbackChromeStart(allLines, cliToolId);
|
|
483
|
+
const bodyLines = chromeStart >= 0 ? allLines.slice(0, chromeStart) : allLines;
|
|
484
|
+
const { skipPatterns } = (0, cli_patterns_1.getCliToolPatterns)(cliToolId);
|
|
485
|
+
const cleanedLines = [];
|
|
486
|
+
for (const rawLine of bodyLines) {
|
|
487
|
+
const line = (0, cli_patterns_1.stripAnsi)(rawLine);
|
|
488
|
+
if (!line.trim())
|
|
489
|
+
continue;
|
|
490
|
+
if (skipPatterns.some(pattern => pattern.test(line)))
|
|
491
|
+
continue;
|
|
492
|
+
cleanedLines.push(line);
|
|
493
|
+
}
|
|
494
|
+
return cleanedLines.join('\n').trim();
|
|
495
|
+
}
|
|
412
496
|
/**
|
|
413
497
|
* Truncate a message to fit within a maximum character length.
|
|
414
498
|
* Issue #571: Prevents excessively large messages from being saved to the database.
|
|
@@ -42,14 +42,26 @@ exports.prepareAgentLaunch = prepareAgentLaunch;
|
|
|
42
42
|
exports.buildAgentLaunchCommandLine = buildAgentLaunchCommandLine;
|
|
43
43
|
const sources_1 = require("../../lib/hooks/sources");
|
|
44
44
|
const agent_event_state_1 = require("../../lib/session/agent-event-state");
|
|
45
|
+
const session_generation_archive_1 = require("../../lib/session/session-generation-archive");
|
|
45
46
|
const logger_1 = require("../../lib/logger");
|
|
46
47
|
const logger = (0, logger_1.createLogger)('lib/session/agent-session-lifecycle');
|
|
47
48
|
/**
|
|
48
|
-
* Open a new event generation for an agent instance that is about to start
|
|
49
|
+
* Open a new event generation for an agent instance that is about to start,
|
|
50
|
+
* and retire the previous process's chat history (Issue #2444).
|
|
49
51
|
*
|
|
50
52
|
* Safe to call for a tool that emits nothing: the fence is a timestamp, and a
|
|
51
53
|
* tool with no events simply never has any to fence.
|
|
52
54
|
*
|
|
55
|
+
* The archive rides here rather than in its own seam because this function is
|
|
56
|
+
* already the answer to "a new agent process is being created for this
|
|
57
|
+
* (worktree, instance)" — the one fact that distinguishes a replacement from a
|
|
58
|
+
* reconnect, and the fact `chat_messages.archived` needs. See
|
|
59
|
+
* `lib/session/session-generation-archive` for why observing the *death*
|
|
60
|
+
* instead would archive live conversations. Note that the boundary is this call
|
|
61
|
+
* and not the adoption mark: codex's and opencode's relaunch paths run
|
|
62
|
+
* `reconcileExistingSession`, which sets an adoption mark, so a reader of that
|
|
63
|
+
* mark would miss exactly the endings this exists for.
|
|
64
|
+
*
|
|
53
65
|
* @param target - The instance being created
|
|
54
66
|
* @param at - Epoch ms; defaults to now
|
|
55
67
|
*/
|
|
@@ -70,6 +82,24 @@ function beginAgentSession(target, at = Date.now()) {
|
|
|
70
82
|
// learn by noticing their `respond` no longer has anything to answer.
|
|
71
83
|
decisionsEvicted: after - before,
|
|
72
84
|
});
|
|
85
|
+
// Issue #2444: the rows the replaced process wrote are a previous session's
|
|
86
|
+
// history now. Inside a `try` and after the fence on purpose — this module
|
|
87
|
+
// otherwise touches nothing but memory, and a database that is missing,
|
|
88
|
+
// locked or mid-migration must cost a log line, never a session that refuses
|
|
89
|
+
// to start. It is also a no-op by construction wherever there is no database
|
|
90
|
+
// to reach (see `resolveSessionArchiveDatabase`), which is what keeps the
|
|
91
|
+
// suites that call this with tmux mocked and no DB at all unchanged.
|
|
92
|
+
try {
|
|
93
|
+
(0, session_generation_archive_1.archiveSupersededSessionMessages)(target);
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
logger.warn('session-generation-archive-failed', {
|
|
97
|
+
worktreeId: target.worktreeId,
|
|
98
|
+
cliToolId: target.cliToolId,
|
|
99
|
+
instanceId: target.instanceId ?? target.cliToolId,
|
|
100
|
+
error: error instanceof Error ? error.message : String(error),
|
|
101
|
+
});
|
|
102
|
+
}
|
|
73
103
|
}
|
|
74
104
|
/**
|
|
75
105
|
* The command that starts this agent, with whatever config it needs written
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Retire the previous process's chat history when a new one takes its place
|
|
4
|
+
* (Issue #2444).
|
|
5
|
+
*
|
|
6
|
+
* `chat_messages.archived` means "a previous session's history", and until this
|
|
7
|
+
* module the only thing that ever wrote it was
|
|
8
|
+
* `POST /api/worktrees/:id/kill-session`. That covers the one ending nobody
|
|
9
|
+
* actually gets: a session killed *through CommandMate*. A tmux server that
|
|
10
|
+
* went away, a CLI that was `/exit`ed back to its shell, a machine that
|
|
11
|
+
* rebooted — none of those pass through that route, so the dead session's rows
|
|
12
|
+
* stayed `archived = 0` and the chat surface kept showing them as the current
|
|
13
|
+
* conversation. Worse, the route refuses to help afterwards: with no live
|
|
14
|
+
* session left to kill it returns 404 *before* reaching the archive call, so
|
|
15
|
+
* the rows could not be retired by hand either.
|
|
16
|
+
*
|
|
17
|
+
* ## Why the seam is "a new process starts", not "the old one died"
|
|
18
|
+
*
|
|
19
|
+
* Observing the death is the tempting place — `current-output-builder`'s
|
|
20
|
+
* `!running` branch already knows — and it is the wrong one. `isRunning` is a
|
|
21
|
+
* `has-session` probe with a timeout in front of it and a liquid status
|
|
22
|
+
* verdict behind it; a single slow probe reads as `false` for a session that is
|
|
23
|
+
* very much alive, and archiving there would throw away a live conversation.
|
|
24
|
+
* "A new agent process is being created for this (worktree, instance)" is not a
|
|
25
|
+
* judgement call: {@link beginAgentSession} is called on exactly that fact, on
|
|
26
|
+
* every tool's creation path and on codex's / opencode's relaunch-into-the-same-pane
|
|
27
|
+
* path (#2070), and deliberately NOT on opencode's live-reuse path, where the
|
|
28
|
+
* process is the same process. The rows that belong to the process being
|
|
29
|
+
* replaced are precisely the ones to retire.
|
|
30
|
+
*
|
|
31
|
+
* ## Why it is its own module
|
|
32
|
+
*
|
|
33
|
+
* `agent-session-lifecycle` is an in-memory fence and nothing else — no
|
|
34
|
+
* database, no sockets — and every `src/lib/cli-tools/<tool>.ts` imports it.
|
|
35
|
+
* Keeping the database and the WebSocket here means that graph does not change:
|
|
36
|
+
* the lifecycle module calls one function, inside a `try`, and a failure to
|
|
37
|
+
* archive is a logged warning rather than a session that refuses to start.
|
|
38
|
+
*
|
|
39
|
+
* ## Known limitation
|
|
40
|
+
*
|
|
41
|
+
* A transcript reader that INSERTs a *new* row for the previous session after
|
|
42
|
+
* this has run writes it with `archived = 0`, so it lands in the new session's
|
|
43
|
+
* history. Updates to rows that already exist are unaffected: no writer touches
|
|
44
|
+
* `archived` on update. Measured as rare enough to leave alone — the readers
|
|
45
|
+
* run behind the same `startSession` that triggers this — and it is recorded
|
|
46
|
+
* here rather than guarded, because guarding it means a second notion of "which
|
|
47
|
+
* generation is this row from" and that is the schema #168 rejected.
|
|
48
|
+
*
|
|
49
|
+
* @module lib/session/session-generation-archive
|
|
50
|
+
*/
|
|
51
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
52
|
+
if (k2 === undefined) k2 = k;
|
|
53
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
54
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
55
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
56
|
+
}
|
|
57
|
+
Object.defineProperty(o, k2, desc);
|
|
58
|
+
}) : (function(o, m, k, k2) {
|
|
59
|
+
if (k2 === undefined) k2 = k;
|
|
60
|
+
o[k2] = m[k];
|
|
61
|
+
}));
|
|
62
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
63
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
64
|
+
}) : function(o, v) {
|
|
65
|
+
o["default"] = v;
|
|
66
|
+
});
|
|
67
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
68
|
+
var ownKeys = function(o) {
|
|
69
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
70
|
+
var ar = [];
|
|
71
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
72
|
+
return ar;
|
|
73
|
+
};
|
|
74
|
+
return ownKeys(o);
|
|
75
|
+
};
|
|
76
|
+
return function (mod) {
|
|
77
|
+
if (mod && mod.__esModule) return mod;
|
|
78
|
+
var result = {};
|
|
79
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
80
|
+
__setModuleDefault(result, mod);
|
|
81
|
+
return result;
|
|
82
|
+
};
|
|
83
|
+
})();
|
|
84
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
85
|
+
exports.resolveSessionArchiveDatabase = resolveSessionArchiveDatabase;
|
|
86
|
+
exports.archiveSupersededSessionMessages = archiveSupersededSessionMessages;
|
|
87
|
+
const db_instance_1 = require("../../lib/db/db-instance");
|
|
88
|
+
const chat_db_1 = require("../../lib/db/chat-db");
|
|
89
|
+
const types_1 = require("../../lib/realtime/types");
|
|
90
|
+
const logger_1 = require("../../lib/logger");
|
|
91
|
+
const logger = (0, logger_1.createLogger)('lib/session/session-generation-archive');
|
|
92
|
+
/**
|
|
93
|
+
* The database this module archives through, or `null` when there is none to
|
|
94
|
+
* archive through.
|
|
95
|
+
*
|
|
96
|
+
* `getDbInstance()` **creates** a database when the file is not there yet, and
|
|
97
|
+
* that is the one thing this call must never do from here. Every production
|
|
98
|
+
* caller arrives via an API route that has already opened the connection, so
|
|
99
|
+
* the singleton is warm and this is a map lookup. A Vitest worker is the
|
|
100
|
+
* opposite case: `beginAgentSession` is reached by a dozen suites that mock
|
|
101
|
+
* tmux and never touch a database, and opening one for them would either
|
|
102
|
+
* fabricate `<cwd>/data/cm.db` or — when the suite runs in a checkout that has
|
|
103
|
+
* one — hand those fixtures the developer's real chat history to write into.
|
|
104
|
+
*
|
|
105
|
+
* So under Vitest the answer is "no database" unless a test hands one in
|
|
106
|
+
* explicitly (see {@link archiveSupersededSessionMessages}'s `db` parameter) or
|
|
107
|
+
* mocks `@/lib/db/db-instance` **and** clears `VITEST`, which is how the
|
|
108
|
+
* integration test drives the production branch. Only `VITEST` is consulted,
|
|
109
|
+
* never `NODE_ENV`: `vitest.config.ts` `define`s `process.env.NODE_ENV` to the
|
|
110
|
+
* literal `'test'` at transform time, so a `NODE_ENV` check here would fold to
|
|
111
|
+
* a constant and no test could ever reach the other branch.
|
|
112
|
+
*/
|
|
113
|
+
function resolveSessionArchiveDatabase() {
|
|
114
|
+
if (process.env.VITEST)
|
|
115
|
+
return null;
|
|
116
|
+
return (0, db_instance_1.getDbInstance)();
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Archive the active chat rows of the process being replaced.
|
|
120
|
+
*
|
|
121
|
+
* Scoped to one `(worktreeId, instanceId)` pair, which is what makes a restart
|
|
122
|
+
* of `codex` leave `codex-2`'s conversation alone — the two share a worktree and
|
|
123
|
+
* a tool id and nothing else. Already-archived rows are not touched (the SQL
|
|
124
|
+
* filters on `archived = 0`), so calling this twice is not two generations.
|
|
125
|
+
*
|
|
126
|
+
* Nothing happens when there was nothing to archive: no `recomputeLastUserMessage`
|
|
127
|
+
* (the sidebar's value cannot have changed) and no frame on the wire (a client
|
|
128
|
+
* asked to re-read identical history would just be paying for a round trip).
|
|
129
|
+
* That is also what keeps a healthy-reuse `startSession` — the path that never
|
|
130
|
+
* calls in here at all — indistinguishable from a first-ever launch.
|
|
131
|
+
*
|
|
132
|
+
* Throws whatever the database throws; the caller in `agent-session-lifecycle`
|
|
133
|
+
* catches, because failing to retire old rows must not stop a session from
|
|
134
|
+
* starting.
|
|
135
|
+
*
|
|
136
|
+
* @param target - The instance whose previous process is being replaced
|
|
137
|
+
* @param db - The database to write through; defaults to
|
|
138
|
+
* {@link resolveSessionArchiveDatabase}
|
|
139
|
+
* @returns The row count and the instance it was scoped to
|
|
140
|
+
*/
|
|
141
|
+
function archiveSupersededSessionMessages(target, db = resolveSessionArchiveDatabase()) {
|
|
142
|
+
const instanceId = target.instanceId ?? target.cliToolId;
|
|
143
|
+
if (!db)
|
|
144
|
+
return { archived: 0, instanceId };
|
|
145
|
+
const archived = (0, chat_db_1.deleteMessagesByInstance)(db, target.worktreeId, instanceId);
|
|
146
|
+
if (archived === 0)
|
|
147
|
+
return { archived: 0, instanceId };
|
|
148
|
+
// Same pairing `kill-session` uses: the sidebar's `last_user_message` is
|
|
149
|
+
// derived from the *active* rows, so archiving without recomputing leaves it
|
|
150
|
+
// quoting a conversation the surface no longer shows.
|
|
151
|
+
(0, chat_db_1.recomputeLastUserMessage)(db, target.worktreeId);
|
|
152
|
+
logger.info('session-generation-archived', {
|
|
153
|
+
worktreeId: target.worktreeId,
|
|
154
|
+
cliToolId: target.cliToolId,
|
|
155
|
+
instanceId,
|
|
156
|
+
archived,
|
|
157
|
+
});
|
|
158
|
+
broadcastMessagesInvalidated(target.worktreeId, target.cliToolId, instanceId);
|
|
159
|
+
return { archived, instanceId };
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Tell every open pane for this instance to re-read its history.
|
|
163
|
+
*
|
|
164
|
+
* A scope rather than a payload, for the reason `MESSAGES_INVALIDATED_EVENT_TYPE`
|
|
165
|
+
* gives: an archive has no row to publish — `message` / `message_updated` can
|
|
166
|
+
* only ever say what a row now *looks like* — so the settled state has to come
|
|
167
|
+
* from the server. PC split panes and the phone both listen through
|
|
168
|
+
* `useSplitMessages`, which matches on (worktreeId, cliToolId, instanceId) and
|
|
169
|
+
* does not branch on `reason`.
|
|
170
|
+
*
|
|
171
|
+
* Detached, and the `ws-server` import is dynamic, for the same bargain
|
|
172
|
+
* `broadcastRecordedRow` in `current-output-builder` strikes: this module sits
|
|
173
|
+
* in the import graph of every `src/lib/cli-tools/<tool>.ts` (through
|
|
174
|
+
* `agent-session-lifecycle`), and none of them should pull the WebSocket server
|
|
175
|
+
* in just by starting a pane. The rows are already committed when this runs, so
|
|
176
|
+
* a socket write that throws cannot turn a completed archive into a failure.
|
|
177
|
+
*/
|
|
178
|
+
function broadcastMessagesInvalidated(worktreeId, cliToolId, instanceId) {
|
|
179
|
+
void Promise.resolve().then(() => __importStar(require('../../lib/ws-server'))).then(({ broadcastMessage }) => {
|
|
180
|
+
broadcastMessage(types_1.MESSAGES_INVALIDATED_EVENT_TYPE, {
|
|
181
|
+
worktreeId,
|
|
182
|
+
cliToolId,
|
|
183
|
+
instanceId,
|
|
184
|
+
reason: 'session_generation',
|
|
185
|
+
});
|
|
186
|
+
})
|
|
187
|
+
.catch((error) => {
|
|
188
|
+
logger.warn('session-generation-invalidate-broadcast-failed', {
|
|
189
|
+
worktreeId,
|
|
190
|
+
instanceId,
|
|
191
|
+
error: error instanceof Error ? error.message : String(error),
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
}
|
|
@@ -15,14 +15,16 @@
|
|
|
15
15
|
* @module lib/tasks/contract-message
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.REQUIRE_COMMIT_SOURCE_CONTRACT = exports.REQUIRE_COMMIT_SOURCE_CONFIG = void 0;
|
|
18
|
+
exports.BUILT_IN_GATE_ORDER = exports.REQUIRE_COMMIT_SOURCE_CONTRACT = exports.REQUIRE_COMMIT_SOURCE_CONFIG = void 0;
|
|
19
19
|
exports.resolveRequireCommit = resolveRequireCommit;
|
|
20
20
|
exports.resolveContractGateIds = resolveContractGateIds;
|
|
21
|
+
exports.runsEnvCleanGate = runsEnvCleanGate;
|
|
21
22
|
exports.contractGateDefinitions = contractGateDefinitions;
|
|
22
23
|
exports.validateContractAgainstVerifyConfig = validateContractAgainstVerifyConfig;
|
|
23
24
|
exports.resolveGateCommands = resolveGateCommands;
|
|
24
25
|
exports.composeContractMessage = composeContractMessage;
|
|
25
26
|
const verify_config_1 = require("../../lib/verification/verify-config");
|
|
27
|
+
const env_clean_gate_1 = require("../../lib/verification/env-clean-gate");
|
|
26
28
|
/**
|
|
27
29
|
* How the built-in gates read in the preamble; they run git plumbing, not shell
|
|
28
30
|
* commands.
|
|
@@ -35,6 +37,14 @@ const verify_config_1 = require("../../lib/verification/verify-config");
|
|
|
35
37
|
const WORK_EVIDENCE_ANY_CHANGE_LABEL = `${verify_config_1.WORK_EVIDENCE_GATE_ID}(commit または未 commit の変更が存在すること)`;
|
|
36
38
|
const WORK_EVIDENCE_COMMIT_LABEL = `${verify_config_1.WORK_EVIDENCE_GATE_ID}(commit が存在すること。未 commit の変更は作業証跡として数えない)`;
|
|
37
39
|
const SCOPE_LABEL = `${verify_config_1.SCOPE_GATE_ID}(変更ファイルが scope.allow の内側に収まっていること)`;
|
|
40
|
+
/**
|
|
41
|
+
* `env-clean` reads the machine, not the repository, so the preamble has to say
|
|
42
|
+
* so (#2442). Without this row the gate would run — and could fail the run —
|
|
43
|
+
* without ever having been named in the completion criterion the agent was sent,
|
|
44
|
+
* which is the same "declared and never checked" defect pointed the other way.
|
|
45
|
+
*/
|
|
46
|
+
const ENV_CLEAN_LABEL = `${verify_config_1.ENV_CLEAN_GATE_ID}(タスク開始時に在ったポート・tmux セッション・$HOME / ~/.commandmate ` +
|
|
47
|
+
'直下のエントリが、増えても減っても不合格)';
|
|
38
48
|
/** The obligation line, in the two forms the pipeline can actually enforce. */
|
|
39
49
|
const COMMIT_REQUIRED_LINE = '- 作業完了後は必ず commit すること(未 commit の作業は未完了とみなされる)';
|
|
40
50
|
const COMMIT_EXPECTED_LINE = '- 作業完了後は commit すること(ただし work-evidence は未 commit の変更も作業証跡として' +
|
|
@@ -63,6 +73,18 @@ function resolveRequireCommit(contract, config) {
|
|
|
63
73
|
sources.push(exports.REQUIRE_COMMIT_SOURCE_CONTRACT);
|
|
64
74
|
return { required: sources.length > 0, sources };
|
|
65
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* The built-in gates, in the order `gate-runner` runs them.
|
|
78
|
+
*
|
|
79
|
+
* Named once because two things have to agree with it: the resolved gate id list
|
|
80
|
+
* below and the preamble's command list. A contract that typed
|
|
81
|
+
* `gates: [lint, env-clean]` must still be told the order the run will take.
|
|
82
|
+
*/
|
|
83
|
+
exports.BUILT_IN_GATE_ORDER = [
|
|
84
|
+
verify_config_1.WORK_EVIDENCE_GATE_ID,
|
|
85
|
+
verify_config_1.SCOPE_GATE_ID,
|
|
86
|
+
verify_config_1.ENV_CLEAN_GATE_ID,
|
|
87
|
+
];
|
|
66
88
|
/**
|
|
67
89
|
* The gate ids a contract asks for, or null for "every gate".
|
|
68
90
|
*
|
|
@@ -70,24 +92,54 @@ function resolveRequireCommit(contract, config) {
|
|
|
70
92
|
* gates run. A contract that required work evidence or a clean scope while
|
|
71
93
|
* listing only `[lint, unit]` would otherwise declare rules that nothing
|
|
72
94
|
* checked: the flags would read as enforced and the gates would never run.
|
|
95
|
+
*
|
|
96
|
+
* `env-clean` joined that rule in #2442. Only the contract's own half is visible
|
|
97
|
+
* here — `options.requireEnvClean` lives in verify.yaml, which this function does
|
|
98
|
+
* not take — so callers that hold a config OR the two together;
|
|
99
|
+
* `selectGates` in gate-runner already does, and so does
|
|
100
|
+
* {@link resolveGateCommands} for the sentence the agent reads.
|
|
73
101
|
*/
|
|
74
102
|
function resolveContractGateIds(contract) {
|
|
75
103
|
const gates = contract.verify.gates;
|
|
76
104
|
if (!gates)
|
|
77
105
|
return null;
|
|
78
|
-
const
|
|
106
|
+
const required = new Map([
|
|
79
107
|
[verify_config_1.WORK_EVIDENCE_GATE_ID, contract.success.requireWorkEvidence],
|
|
80
108
|
[verify_config_1.SCOPE_GATE_ID, contract.success.requireScopeClean],
|
|
81
|
-
|
|
109
|
+
[verify_config_1.ENV_CLEAN_GATE_ID, contract.success.requireEnvClean],
|
|
110
|
+
]);
|
|
82
111
|
// Built-ins are listed first and in their execution order even when the
|
|
83
112
|
// contract already named one, so the resolved list reads as the order the run
|
|
84
113
|
// will actually take rather than the order the contract happened to type.
|
|
85
|
-
const selected =
|
|
86
|
-
|
|
87
|
-
.map(([id]) => id);
|
|
88
|
-
const rest = gates.filter((id) => !builtIns.some(([builtIn]) => builtIn === id));
|
|
114
|
+
const selected = exports.BUILT_IN_GATE_ORDER.filter((id) => required.get(id) === true || gates.includes(id));
|
|
115
|
+
const rest = gates.filter((id) => !exports.BUILT_IN_GATE_ORDER.includes(id));
|
|
89
116
|
return [...selected, ...rest];
|
|
90
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Whether a verification run for this contract will include `env-clean` (#2442).
|
|
120
|
+
*
|
|
121
|
+
* Three declarations can put the gate in a run and the baseline has to be
|
|
122
|
+
* recorded for all three, because the snapshot is taken once — at send — and
|
|
123
|
+
* cannot be reconstructed later:
|
|
124
|
+
*
|
|
125
|
+
* 1. `options.requireEnvClean` in the repository's verify.yaml,
|
|
126
|
+
* 2. `success.requireEnvClean` in the contract,
|
|
127
|
+
* 3. the contract naming `env-clean` in `verify.gates`.
|
|
128
|
+
*
|
|
129
|
+
* (3) is the one that was easy to miss. Opening the id to `verify.gates` without
|
|
130
|
+
* also asking here would have made every contract that used it report UNKNOWN
|
|
131
|
+
* forever: `selectGates` would run the gate, and `recordEnvBaseline` — reading
|
|
132
|
+
* only the OR of (1) and (2) — would never have written anything to compare
|
|
133
|
+
* against. An operator's `verify --gates env-clean` on a task created without any
|
|
134
|
+
* of the three still reports UNKNOWN, which is correct: no baseline exists, and
|
|
135
|
+
* inventing one from the state at verification time is the fail-open this gate
|
|
136
|
+
* refuses.
|
|
137
|
+
*/
|
|
138
|
+
function runsEnvCleanGate(contract, config) {
|
|
139
|
+
if ((0, env_clean_gate_1.resolveRequireEnvClean)(contract, config).required)
|
|
140
|
+
return true;
|
|
141
|
+
return resolveContractGateIds(contract)?.includes(verify_config_1.ENV_CLEAN_GATE_ID) ?? false;
|
|
142
|
+
}
|
|
91
143
|
/**
|
|
92
144
|
* The gates this contract defines itself (#1791).
|
|
93
145
|
*
|
|
@@ -146,7 +198,16 @@ function validateContractAgainstVerifyConfig(contract, config) {
|
|
|
146
198
|
"repository's own — rename the contract gate.");
|
|
147
199
|
}
|
|
148
200
|
if (gates) {
|
|
149
|
-
|
|
201
|
+
// `env-clean` joins the built-ins a contract may name (#2442). It is a
|
|
202
|
+
// reserved id, so it can never appear in `configIds` — leaving it out of this
|
|
203
|
+
// set made `verify.gates: [env-clean]` an unknown id at send, which is how
|
|
204
|
+
// the gate ended up reachable only through the repository-wide switch.
|
|
205
|
+
const known = new Set([
|
|
206
|
+
verify_config_1.WORK_EVIDENCE_GATE_ID,
|
|
207
|
+
verify_config_1.SCOPE_GATE_ID,
|
|
208
|
+
verify_config_1.ENV_CLEAN_GATE_ID,
|
|
209
|
+
...configIds,
|
|
210
|
+
]);
|
|
150
211
|
const defined = new Set(definitions.map((gate) => gate.id));
|
|
151
212
|
const unknown = gates.filter((id) => !known.has(id) && !defined.has(id));
|
|
152
213
|
if (unknown.length > 0) {
|
|
@@ -174,11 +235,16 @@ function resolveGateCommands(contract, config) {
|
|
|
174
235
|
const builtInLabels = new Map([
|
|
175
236
|
[verify_config_1.WORK_EVIDENCE_GATE_ID, workEvidenceLabel],
|
|
176
237
|
[verify_config_1.SCOPE_GATE_ID, SCOPE_LABEL],
|
|
238
|
+
// Without this row a contract naming `env-clean` resolved to `undefined` and
|
|
239
|
+
// the preamble handed the agent the literal string "undefined" as one of the
|
|
240
|
+
// commands it had to pass.
|
|
241
|
+
[verify_config_1.ENV_CLEAN_GATE_ID, ENV_CLEAN_LABEL],
|
|
177
242
|
]);
|
|
178
243
|
// Contract-defined gates run after the repository's own, so the preamble
|
|
179
244
|
// lists them in that order too — the line claims to be "the commands that
|
|
180
245
|
// will run", and an order it invents would be the first thing to drift.
|
|
181
246
|
const declared = [...config.gates, ...contractGateDefinitions(contract)];
|
|
247
|
+
const envCleanRequired = (0, env_clean_gate_1.resolveRequireEnvClean)(contract, config).required;
|
|
182
248
|
const selected = resolveContractGateIds(contract);
|
|
183
249
|
if (!selected) {
|
|
184
250
|
// An omitted gates list runs every gate, and the built-ins are still governed
|
|
@@ -186,10 +252,18 @@ function resolveGateCommands(contract, config) {
|
|
|
186
252
|
const builtIns = [workEvidenceLabel];
|
|
187
253
|
if (contract.success.requireScopeClean)
|
|
188
254
|
builtIns.push(SCOPE_LABEL);
|
|
255
|
+
if (envCleanRequired)
|
|
256
|
+
builtIns.push(ENV_CLEAN_LABEL);
|
|
189
257
|
return [...builtIns, ...declared.map((gate) => gate.command)];
|
|
190
258
|
}
|
|
259
|
+
// Re-derive the built-in prefix instead of trusting `selected`'s: the
|
|
260
|
+
// repository-wide `options.requireEnvClean` forces the gate into the run
|
|
261
|
+
// without appearing in the contract at all, and a preamble that omitted it
|
|
262
|
+
// would hand the agent a completion criterion the run does not use.
|
|
263
|
+
const builtIns = exports.BUILT_IN_GATE_ORDER.filter((id) => selected.includes(id) || (id === verify_config_1.ENV_CLEAN_GATE_ID && envCleanRequired));
|
|
264
|
+
const rest = selected.filter((id) => !exports.BUILT_IN_GATE_ORDER.includes(id));
|
|
191
265
|
const byId = new Map(declared.map((gate) => [gate.id, gate.command]));
|
|
192
|
-
return
|
|
266
|
+
return [...builtIns, ...rest].map((id) => builtInLabels.get(id) ?? byId.get(id));
|
|
193
267
|
}
|
|
194
268
|
/**
|
|
195
269
|
* Compose the message sent to the agent: contract preamble, then the goal.
|
|
@@ -76,6 +76,7 @@ const SUCCESS_KEYS = [
|
|
|
76
76
|
'requireWorkEvidence',
|
|
77
77
|
'requireScopeClean',
|
|
78
78
|
'requireCommit',
|
|
79
|
+
'requireEnvClean',
|
|
79
80
|
'autoVerifyOnStop',
|
|
80
81
|
];
|
|
81
82
|
class TaskContractError extends Error {
|
|
@@ -314,6 +315,7 @@ function validateSuccess(value, issues) {
|
|
|
314
315
|
requireWorkEvidence: true,
|
|
315
316
|
requireScopeClean: true,
|
|
316
317
|
requireCommit: false,
|
|
318
|
+
requireEnvClean: false,
|
|
317
319
|
autoVerifyOnStop: false,
|
|
318
320
|
};
|
|
319
321
|
if (value === undefined || value === null)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "commandmate",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.3",
|
|
4
4
|
"description": "A local control plane for agent CLIs — orchestration and visibility for Claude Code, Codex, Gemini CLI, and more across Git worktrees",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"jsdom": "^28.1.0",
|
|
89
89
|
"lucide-react": "^0.554.0",
|
|
90
90
|
"mermaid": "^11.12.2",
|
|
91
|
-
"next": "^15.5.
|
|
91
|
+
"next": "^15.5.25",
|
|
92
92
|
"next-intl": "^4.8.2",
|
|
93
93
|
"next-themes": "^0.4.6",
|
|
94
94
|
"postcss": "^8.5.6",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=153,exports.ids=[153],exports.modules={35613:(a,b,c)=>{c.d(b,{_M:()=>p});var d=c(32520),e=c(93356),f=c(26838);let g=new Set([301,302,303,307,308]);function h(a,b){let c;try{c=new URL(a)}catch{throw new e.q2(e.Fk.URL_INVALID,{reason:"malformed"})}if("https:"!==c.protocol)throw new e.q2(e.Fk.URL_INVALID,{reason:"scheme"});if(""!==c.username||""!==c.password)throw new e.q2(e.Fk.URL_INVALID,{reason:"userinfo"});if(""!==c.port)throw new e.q2(e.Fk.URL_INVALID,{reason:"port"});let d=c.hostname.toLowerCase(),f=b.find(a=>a.host===d);if(!f||void 0!==f.pathPrefix&&!c.pathname.startsWith(f.pathPrefix))throw new e.q2(e.Fk.SOURCE_NOT_ALLOWED,{host:d});return c}class i{constructor(a){this.controller=new AbortController,this.timedOut=!1,this.callerAborted=!1,this.onCallerAbort=()=>{this.callerAborted=!0,this.controller.abort()},this.totalTimer=setTimeout(()=>{this.timedOut=!0,this.controller.abort()},d.rV),a&&(this.callerSignal=a,a.aborted?this.onCallerAbort():a.addEventListener("abort",this.onCallerAbort,{once:!0}))}async withHeaderTimeout(a){let b=setTimeout(()=>{this.timedOut=!0,this.controller.abort()},d.WS);try{return await a()}finally{clearTimeout(b)}}dispose(){clearTimeout(this.totalTimer),this.callerSignal?.removeEventListener("abort",this.onCallerAbort)}translate(a){return a instanceof e.q2?a:new e.q2(this.timedOut?e.Fk.TIMEOUT:this.callerAborted?e.Fk.ABORTED:e.Fk.NETWORK)}}async function j(a){try{await a.body?.cancel()}catch{}}async function k(a,b,c){let i=h(a,b.entryHosts),k={accept:b.accept,"user-agent":`${d.gT}/${(0,f.Mj)()}`};for(let a=0;;a++){let f,l=await c.withHeaderTimeout(()=>fetch(i.toString(),{method:"GET",redirect:"manual",cache:"no-store",headers:k,signal:c.controller.signal}));if(!g.has(l.status))return l;let m=l.headers.get("location");if(await j(l),a>=d.KX)throw new e.q2(e.Fk.REDIRECT_LIMIT_EXCEEDED,{limit:d.KX});if(!m)throw new e.q2(e.Fk.REDIRECT_INVALID,{reason:"no-location"});try{f=new URL(m,i)}catch{throw new e.q2(e.Fk.REDIRECT_INVALID,{reason:"malformed"})}let n=h(f.toString(),b.redirectHosts);n.origin!==i.origin&&(k=function(a){let b={};for(let[c,e]of Object.entries(a))d.F5.includes(c.toLowerCase())||(b[c]=e);return b}(k)),i=n}}async function l(a,b){let c=a.body;if(!c)throw new e.q2(e.Fk.BODY_MISSING);let d=c.getReader(),f=(0,e.of)(),g=[],h=0;for(;;){let{done:a,value:c}=await d.read();if(a)break;if(c&&0!==c.byteLength){if((h+=c.byteLength)>b)throw await d.cancel().catch(()=>void 0),new e.q2(e.Fk.SIZE_LIMIT_EXCEEDED,{limit:b});f.update(c),g.push(c)}}return{bytes:Buffer.concat(g,h),sha256:f.hex(),size:h}}async function m(a,b,c={}){let f=d.Bi[b],g=new i(c.signal);try{let b=await k(a,f,g);try{!function(a,b,c){if(!a.ok)throw new e.q2(e.Fk.HTTP_STATUS,{status:a.status});let d=a.headers.get("content-type"),f=d?.split(";")[0]?.trim().toLowerCase()??"";if(!b.contentTypes.includes(f))throw new e.q2(e.Fk.CONTENT_TYPE_INVALID,{received:f||"<absent>"});let g=a.headers.get("content-length");if(null===g)return;let h=Number(g);if(!Number.isSafeInteger(h)||h<0)throw new e.q2(e.Fk.SIZE_MISMATCH,{reason:"content-length"});if(h>b.maxBytes)throw new e.q2(e.Fk.SIZE_LIMIT_EXCEEDED,{limit:b.maxBytes});if(void 0!==c&&h!==c)throw new e.q2(e.Fk.SIZE_MISMATCH,{expected:c,actual:h})}(b,f,c.expectedSize)}catch(a){throw await j(b),a}return await l(b,f.maxBytes)}catch(a){throw g.translate(a)}finally{g.dispose()}}let n=globalThis.__skillArtifactDownloads??(globalThis.__skillArtifactDownloads=new Map);async function o(a,b){let{artifact:c}=b,d=await m(c.url,"artifact",{expectedSize:c.size});return(0,e.Ld)({expectedSha256:c.sha256,expectedSize:c.size,actualSha256:d.sha256,actualSize:d.size}),{...d,skillId:a,version:b.version,commit:b.source.commit}}async function p(a,b,c={}){var d,f;(0,e.i1)(a,b);let g=`${a}@${b.version}#${b.artifact.sha256}`,h=n.get(g);return h||(h=o(a,b),n.set(g,h),h.catch(()=>void 0).finally(()=>{n.get(g)===h&&n.delete(g)})),c.signal?(d=h,(f=c.signal).aborted?Promise.reject(new e.q2(e.Fk.ABORTED)):new Promise((a,b)=>{let c=()=>b(new e.q2(e.Fk.ABORTED));f.addEventListener("abort",c,{once:!0}),d.then(b=>{f.removeEventListener("abort",c),a(b)},a=>{f.removeEventListener("abort",c),b(a)})})):h}},88573:(a,b,c)=>{c.d(b,{Lw:()=>s});let d="https://raw.githubusercontent.com/Kewton/commandmate-skills/main/catalog/v1/catalog.json",e=[d],f=/^[A-Za-z0-9/+=_."-]{1,128}$/;var g=c(72626),h=c(13075);let i=(0,g.h)("lib/skills/catalog-client"),j={FETCH_FAILED:"SKILL_CATALOG_FETCH_FAILED",RATE_LIMITED:"SKILL_CATALOG_RATE_LIMITED",OVERSIZED:"SKILL_CATALOG_OVERSIZED",MALFORMED:"SKILL_CATALOG_MALFORMED",INVALID_SCHEMA:"SKILL_CATALOG_INVALID_SCHEMA"},k=globalThis.__skillCatalogCache??={catalog:null,validatedAt:0,confirmedAt:0,etag:null,revision:null,rateLimitResetAt:null,inflight:null};class l extends Error{}let m={[j.FETCH_FAILED]:"The Skill Catalog could not be retrieved.",[j.RATE_LIMITED]:"The Skill Catalog origin is rate limiting requests.",[j.OVERSIZED]:"The Skill Catalog response exceeded the allowed size.",[j.MALFORMED]:"The Skill Catalog response was not valid JSON.",[j.INVALID_SCHEMA]:"The Skill Catalog response did not match the supported Catalog schema."};function n(a){return new Date(a).toISOString()}function o(a,b,c){return{catalog:a,fetchedAt:n(k.validatedAt),revalidatedAt:n(k.confirmedAt),state:b,stale:"stale"===b,offline:"stale"===b,staleReason:c,source:{repository:"Kewton/commandmate-skills",ref:"main",revision:k.revision}}}function p(a,b=[]){return k.catalog?{ok:!0,snapshot:o(k.catalog,"stale",a)}:{ok:!1,failure:{code:a,message:m[a],errors:b}}}async function q(a,b){let c=a.headers.get("Content-Length");if(null!==c){let a=Number(c);if(!Number.isFinite(a)||a<0||a>b)throw new l("content-length out of bounds")}let d=a.body;if(!d||"function"!=typeof d.getReader){let c=await a.text();if(new TextEncoder().encode(c).length>b)throw new l("body exceeded size cap");return c}let e=d.getReader(),f=[],g=0;for(;;){let{done:a,value:c}=await e.read();if(a)break;if(c){if((g+=c.byteLength)>b)throw await e.cancel(),new l("body exceeded size cap");f.push(c)}}let h=new Uint8Array(g),i=0;for(let a of f)h.set(a,i),i+=a.byteLength;return new TextDecoder("utf-8").decode(h)}async function r(a){let b,c,g;if(!e.includes(d))return p(j.FETCH_FAILED);let m={Accept:"application/json","User-Agent":`CommandMate/${a}`};null!==k.catalog&&null!==k.etag&&(m["If-None-Match"]=k.etag);try{b=await fetch(d,{headers:m,cache:"no-store",signal:AbortSignal.timeout(5e3)})}catch{return i.warn("catalog-fetch-failed",{reason:j.FETCH_FAILED}),p(j.FETCH_FAILED)}if(304===b.status&&null!==k.catalog)return k.confirmedAt=Date.now(),{ok:!0,snapshot:o(k.catalog,"revalidated",null)};if(403===b.status||429===b.status)return!function(a){let b=Date.now(),c=b+864e5,d=a.headers.get("X-RateLimit-Reset");if(null!==d){let a=Number(d);if(Number.isFinite(a)&&a>0){k.rateLimitResetAt=Math.min(1e3*a,c);return}}let e=a.headers.get("Retry-After");if(null!==e){let a=Number(e);if(Number.isFinite(a)&&a>0){k.rateLimitResetAt=Math.min(b+1e3*a,c);return}}k.rateLimitResetAt=b+36e5}(b),i.warn("catalog-rate-limited",{status:b.status}),p(j.RATE_LIMITED);if(!b.ok)return i.warn("catalog-fetch-failed",{status:b.status}),p(j.FETCH_FAILED);try{c=await q(b,1048576)}catch(b){let a=b instanceof l?j.OVERSIZED:j.FETCH_FAILED;return i.warn("catalog-body-rejected",{reason:a}),p(a)}try{g=JSON.parse(c)}catch{return i.warn("catalog-malformed",{reason:j.MALFORMED}),p(j.MALFORMED)}let n=(0,h.JJ)(g);if(!n.ok)return i.warn("catalog-invalid-schema",{errorCount:n.errors.length}),p(j.INVALID_SCHEMA,n.errors);let r=Date.now();return k.catalog=n.value,k.validatedAt=r,k.confirmedAt=r,k.etag=b.headers.get("ETag"),k.revision=function(a){if(null===a)return null;let b=a.trim();return f.test(b)?b:null}(k.etag),{ok:!0,snapshot:o(n.value,"fresh",null)}}async function s(a={}){let{hostVersion:b="0.0.0",forceRevalidate:c=!1}=a;return!c&&null!==k.catalog&&Date.now()-k.confirmedAt<9e5&&null!==k.catalog?{ok:!0,snapshot:o(k.catalog,"cached",null)}:null!==k.rateLimitResetAt&&(!(Date.now()>=k.rateLimitResetAt)||(k.rateLimitResetAt=null,0))?p(j.RATE_LIMITED):(null===k.inflight&&(k.inflight=r(b).finally(()=>{k.inflight=null})),k.inflight)}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=21,exports.ids=[21,3925,6306,8687],exports.modules={23197:(a,b,c)=>{c.d(b,{$M:()=>e,H1:()=>d,q5:()=>f});let d="__global__",e=2e3,f=900},23854:(a,b,c)=>{c.d(b,{$G:()=>f,AL:()=>h,DZ:()=>d,Qe:()=>g,ie:()=>e});let d=4e3,e=15e3;function f(a){var b,c;if(b=a.from,c=a.to,b.worktreeId===c.worktreeId&&b.instanceId===c.instanceId)return{code:"RELAY_SELF_TARGET",message:"A session cannot relay a reply to itself. --reply-to must name a different worktree or a different agent instance."};let d=null===a.parentHops?1:a.parentHops+1;return null===a.parentHops||a.allowRelayChain?d>3?{code:"RELAY_HOPS_EXCEEDED",message:`Relay chains stop at 3 hops; this one would be ${d}. Report the reply to whoever asked instead of forwarding it again.`}:a.openBetween>=1?{code:"RELAY_DUPLICATE_PENDING",message:"There is already an open relay between these two sessions. Wait for it, or withdraw it with `commandmate relays cancel <id>`."}:{ok:!0,hops:d}:{code:"RELAY_CHAIN_BLOCKED",message:"The last message this session was given arrived over a relay, so opening another one would chain two deliveries together. Pass --allow-relay-chain if that is what you mean."}}function g(a){return"code"in a}function h(a){return void 0!==a&&Number.isFinite(a)?Math.min(6048e5,Math.max(6e4,Math.trunc(a))):864e5}},32002:(a,b,c)=>{c.d(b,{e:()=>h});var d=c(56791),e=c(26923),f=c(52201),g=c(15194);function h(a,b,c){let h=(0,d.getAgentInstances)(a,b);return h.length>0?h:(0,g.lu)((0,f.eG)({worktree:c,appSettings:(0,e.Ds)(a)}))}},43925:(a,b,c)=>{c.d(b,{PJ:()=>i,dz:()=>j,vQ:()=>g});var d=c(57836),e=c(23854);let f=(0,c(72626).h)("relay-triggers");function g(a,b,d,e){let g={worktreeId:a,cliToolId:b,instanceId:d??b};(async()=>{try{let{notifyRelayTurnCompleted:a}=await Promise.all([c.e(1503),c.e(1634),c.e(4299),c.e(6838),c.e(9130),c.e(4443),c.e(8800),c.e(1719),c.e(7905),c.e(2119),c.e(2445),c.e(6337),c.e(1886),c.e(595),c.e(6491),c.e(8918),c.e(7875),c.e(3077),c.e(1210)]).then(c.bind(c,71210));await a(g,{settled:e})}catch(c){f.warn("relay-turn-trigger-failed",{worktreeId:a,cliToolId:b,instanceId:g.instanceId,error:c instanceof Error?c.message:String(c)})}})()}async function h(){try{let{runRelayMaintenanceTick:a}=await Promise.all([c.e(1503),c.e(1634),c.e(4299),c.e(6838),c.e(9130),c.e(4443),c.e(8800),c.e(1719),c.e(7905),c.e(2119),c.e(2445),c.e(6337),c.e(1886),c.e(595),c.e(6491),c.e(8918),c.e(7875),c.e(3077),c.e(1210)]).then(c.bind(c,71210));await a()}catch(a){f.warn("relay-maintenance-failed",{error:a instanceof Error?a.message:String(a)})}}function i(){j(),globalThis.__relayTriggersUnsubscribe=(0,d.wN)(a=>{a.waiting&&"prompt"===a.kind&&function(a,b,d){let e={worktreeId:a,cliToolId:b,instanceId:d??b};(async()=>{try{let{notifyRelayPromptWaiting:a}=await Promise.all([c.e(1503),c.e(1634),c.e(4299),c.e(6838),c.e(9130),c.e(4443),c.e(8800),c.e(1719),c.e(7905),c.e(2119),c.e(2445),c.e(6337),c.e(1886),c.e(595),c.e(6491),c.e(8918),c.e(7875),c.e(3077),c.e(1210)]).then(c.bind(c,71210));a(e)}catch(c){f.warn("relay-prompt-trigger-failed",{worktreeId:a,cliToolId:b,instanceId:e.instanceId,error:c instanceof Error?c.message:String(c)})}})()}(a.worktreeId,a.cliToolId,a.instanceId)});let a=setInterval(()=>void h(),e.ie);a.unref?.(),globalThis.__relayMaintenanceTimer=a}function j(){let a=globalThis.__relayTriggersUnsubscribe;a&&(a(),globalThis.__relayTriggersUnsubscribe=void 0),globalThis.__relayMaintenanceTimer&&(clearInterval(globalThis.__relayMaintenanceTimer),globalThis.__relayMaintenanceTimer=void 0)}},57836:(a,b,c)=>{c.d(b,{Jp:()=>k,Te:()=>l,hd:()=>j,wN:()=>h});var d=c(24455);let e=(0,c(72626).h)("waiting-episode-state"),f=globalThis.__sessionWaitingEpisodes??(globalThis.__sessionWaitingEpisodes=new Map),g=globalThis.__sessionWaitingTransitionListeners??(globalThis.__sessionWaitingTransitionListeners=new Set);function h(a){return g.add(a),()=>{g.delete(a)}}function i(a){for(let b of g)try{b(a)}catch(b){e.error("waiting-transition-listener-failed",{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId,waiting:a.waiting,error:b instanceof Error?b.message:String(b)})}}function j({worktreeId:a,cliToolId:b,instanceId:c,waiting:e,kind:g=null,structuredSince:h=null,now:j=Date.now()}){let k=(0,d.v7)(a,b,c),l=f.get(k);if(!e)return void 0===l||(f.delete(k),i({worktreeId:a,cliToolId:b,instanceId:c,waiting:!1,since:null,kind:null,at:j})),null;if(void 0!==l)return l.kind=g,l.since;let m=h??j;return f.set(k,{since:m,kind:g}),i({worktreeId:a,cliToolId:b,instanceId:c,waiting:!0,since:m,kind:g,at:j}),m}function k(a,b,c){return f.get((0,d.v7)(a,b,c))??null}function l(a){let b=`${a}${d.CS}`;for(let a of f.keys())if(a.startsWith(b))return!0;return!1}},89398:(a,b,c)=>{c.d(b,{z:()=>v,B:()=>y});var d=c(43234),e=c(15194),f=c(31990),g=c(95595),h=c(37717),i=c(67882),j=c(23365),k=c(50945),l=c(45017),m=c(23197),n=c(30008),o=c(40043),p=c(57836),q=c(48083),r=c(26547),s=c(129),t=c(66101);let u=(0,c(72626).h)("lib/session/worktree-status-helper");function v(){return{probeCount:0,captureCount:0,healthCheckCount:0}}let w={prompt:3,menu:2,unclassified:1};async function x(a,b,d,e,m,v,w,x,y){let z=m.has(e),A=z,B=null;if(A){y&&y.healthCheckCount++;let a=await (0,k.S)(e,b);a.alive||(A=!1,B=a.reason)}let C=!1,D=!1,E=null,F=null,G=null,H=null;if(A)try{var I;let e=(0,j.y)(b).statusLines;y&&y.captureCount++;let h=await (0,f.Wh)(a,b,e,d),k=(0,l.v7)(a,b,d),m=(0,l.xU)(k),p=m?new Date(m):void 0,s=(0,g.WC)(h,b,p);(0,q.vm)(a,b,d,(0,r.jw)(b,h)),({isWaitingForResponse:C,isProcessing:D}=(0,i.O_)(s.status)),H=s.reason,G=s.evidence,(0,o.ox)(k,{status:s.status,reason:s.reason,evidence:G});let t=(0,n.xF)({worktreeId:a,cliToolId:b,instanceId:d,scraper:{status:s.status,reason:s.reason,hasActivePrompt:s.hasActivePrompt}});C=C||t.waiting,F=t.structured?.at??null,E=(I={waiting:C,hasActivePrompt:s.hasActivePrompt,scraperStatus:s.status,scraperReason:s.reason}).waiting?I.hasActivePrompt?"prompt":"waiting"===I.scraperStatus&&g.ug.has(I.scraperReason)?"menu":"unclassified":null,!s.hasActivePrompt&&w(v,a,{limit:10,cliToolId:b,instanceId:d}).some(a=>"prompt"===a.messageType&&a.promptData?.status!=="answered")&&x(v,a,b,d,b=>{Promise.resolve().then(c.bind(c,49640)).then(({broadcastMessage:c})=>{c("message_updated",{worktreeId:a,message:b})}).catch(b=>{u.warn("prompt-sweep-broadcast-failed",{worktreeId:a,error:b instanceof Error?b.message:String(b)})})})}catch{D=!0}let J=(0,p.hd)({worktreeId:a,cliToolId:b,instanceId:d,waiting:C,kind:E,structuredSince:F}),{model:K,effort:L}=(0,q.jl)(a,b,d),M=(0,l.v7)(a,b,d);A||(0,o.xG)(M);let N=A?(0,o.AD)(M):null,O=A?function(a,b,c){try{let d=(0,s.VM)(b),e=(0,t.Kf)(d,d.liveness({worktreeId:a,cliToolId:b,instanceId:c}),Date.now());if(void 0===e.degradedReason&&void 0===e.liveness)return null;return e}catch{return null}}(a,b,d):null;try{z?await (0,f.N5)({sessionName:e,worktreeId:a,cliToolId:b,instanceId:d,status:(0,i.kA)({isRunning:A,isWaitingForResponse:C,isProcessing:D})}):(0,f.Lw)(e)}catch(a){u.debug("tmux-surface:publish-failed",{sessionName:e,error:a instanceof Error?a.message:String(a)})}return{isRunning:A,isWaitingForResponse:C,isProcessing:D,waitingKind:E,waitingSince:J,awaitingInstruction:A&&(0,q.pI)(a,b,d),...null!==K?{model:K}:{},...null!==L?{reasoningEffort:L}:{},...null!==G?{statusEvidence:G}:{},...null!==H?{sessionStatusReason:H}:{},...null!==B?{sessionStatusReason:h.g.EXITED,statusEvidence:"positive"}:{},...null!==N?{lastKnownStatus:N.status,lastKnownStatusAt:N.at}:{},...null!==O?{eventSource:O}:{}}}async function y(a,b,c,f,g,h,i){if(a===m.H1)return{sessionStatusByCli:{},sessionStatusByInstance:{},isSessionRunning:!1,isWaitingForResponse:!1,isProcessing:!1};let j=d.CLIToolManager.getInstance(),k=e.XH,l=h(c,a).filter(a=>a.id!==a.cliTool),n=k.map(b=>({cliToolId:b,instanceId:b,sessionName:j.getTool(b).getSessionName(a,b)}));for(let b of l)n.push({cliToolId:b.cliTool,instanceId:b.id,sessionName:j.getTool(b.cliTool).getSessionName(a,b.id)});i&&(i.probeCount+=n.length);let o=await Promise.all(n.map(async d=>{let e=await x(a,d.cliToolId,d.instanceId,d.sessionName,b,c,f,g,i);return{...d,status:e}})),p={},q={};for(let{cliToolId:a,instanceId:b,status:c}of o){q[b]=c;let d=p[a];p[a]=d?function(a,b){var c,d,e,f;return{isRunning:a.isRunning||b.isRunning,isWaitingForResponse:a.isWaitingForResponse||b.isWaitingForResponse,isProcessing:a.isProcessing||b.isProcessing,waitingKind:(c=a.waitingKind,d=b.waitingKind,null===c?d:null===d||w[c]>=w[d]?c:d),waitingSince:(e=a.waitingSince,f=b.waitingSince,null===e?f:null===f?e:Math.min(e,f)),awaitingInstruction:a.awaitingInstruction||b.awaitingInstruction}}(d,c):c}let r=!1,s=!1,t=!1;for(let a of Object.values(p))a&&(a.isRunning&&(r=!0),a.isWaitingForResponse&&(s=!0),a.isProcessing&&(t=!0));return{sessionStatusByCli:p,sessionStatusByInstance:q,isSessionRunning:r,isWaitingForResponse:s,isProcessing:t}}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=3086,exports.ids=[3086,3925,5220,6306,8687],exports.modules={23854:(a,b,c)=>{c.d(b,{$G:()=>f,AL:()=>h,DZ:()=>d,Qe:()=>g,ie:()=>e});let d=4e3,e=15e3;function f(a){var b,c;if(b=a.from,c=a.to,b.worktreeId===c.worktreeId&&b.instanceId===c.instanceId)return{code:"RELAY_SELF_TARGET",message:"A session cannot relay a reply to itself. --reply-to must name a different worktree or a different agent instance."};let d=null===a.parentHops?1:a.parentHops+1;return null===a.parentHops||a.allowRelayChain?d>3?{code:"RELAY_HOPS_EXCEEDED",message:`Relay chains stop at 3 hops; this one would be ${d}. Report the reply to whoever asked instead of forwarding it again.`}:a.openBetween>=1?{code:"RELAY_DUPLICATE_PENDING",message:"There is already an open relay between these two sessions. Wait for it, or withdraw it with `commandmate relays cancel <id>`."}:{ok:!0,hops:d}:{code:"RELAY_CHAIN_BLOCKED",message:"The last message this session was given arrived over a relay, so opening another one would chain two deliveries together. Pass --allow-relay-chain if that is what you mean."}}function g(a){return"code"in a}function h(a){return void 0!==a&&Number.isFinite(a)?Math.min(6048e5,Math.max(6e4,Math.trunc(a))):864e5}},43925:(a,b,c)=>{c.d(b,{PJ:()=>i,dz:()=>j,vQ:()=>g});var d=c(57836),e=c(23854);let f=(0,c(72626).h)("relay-triggers");function g(a,b,d,e){let g={worktreeId:a,cliToolId:b,instanceId:d??b};(async()=>{try{let{notifyRelayTurnCompleted:a}=await Promise.all([c.e(1503),c.e(1634),c.e(4299),c.e(6838),c.e(9130),c.e(4443),c.e(8800),c.e(1719),c.e(7905),c.e(2119),c.e(2445),c.e(6337),c.e(1886),c.e(595),c.e(6491),c.e(8918),c.e(7875),c.e(3077),c.e(1210)]).then(c.bind(c,71210));await a(g,{settled:e})}catch(c){f.warn("relay-turn-trigger-failed",{worktreeId:a,cliToolId:b,instanceId:g.instanceId,error:c instanceof Error?c.message:String(c)})}})()}async function h(){try{let{runRelayMaintenanceTick:a}=await Promise.all([c.e(1503),c.e(1634),c.e(4299),c.e(6838),c.e(9130),c.e(4443),c.e(8800),c.e(1719),c.e(7905),c.e(2119),c.e(2445),c.e(6337),c.e(1886),c.e(595),c.e(6491),c.e(8918),c.e(7875),c.e(3077),c.e(1210)]).then(c.bind(c,71210));await a()}catch(a){f.warn("relay-maintenance-failed",{error:a instanceof Error?a.message:String(a)})}}function i(){j(),globalThis.__relayTriggersUnsubscribe=(0,d.wN)(a=>{a.waiting&&"prompt"===a.kind&&function(a,b,d){let e={worktreeId:a,cliToolId:b,instanceId:d??b};(async()=>{try{let{notifyRelayPromptWaiting:a}=await Promise.all([c.e(1503),c.e(1634),c.e(4299),c.e(6838),c.e(9130),c.e(4443),c.e(8800),c.e(1719),c.e(7905),c.e(2119),c.e(2445),c.e(6337),c.e(1886),c.e(595),c.e(6491),c.e(8918),c.e(7875),c.e(3077),c.e(1210)]).then(c.bind(c,71210));a(e)}catch(c){f.warn("relay-prompt-trigger-failed",{worktreeId:a,cliToolId:b,instanceId:e.instanceId,error:c instanceof Error?c.message:String(c)})}})()}(a.worktreeId,a.cliToolId,a.instanceId)});let a=setInterval(()=>void h(),e.ie);a.unref?.(),globalThis.__relayMaintenanceTimer=a}function j(){let a=globalThis.__relayTriggersUnsubscribe;a&&(a(),globalThis.__relayTriggersUnsubscribe=void 0),globalThis.__relayMaintenanceTimer&&(clearInterval(globalThis.__relayMaintenanceTimer),globalThis.__relayMaintenanceTimer=void 0)}},57836:(a,b,c)=>{c.d(b,{Jp:()=>k,Te:()=>l,hd:()=>j,wN:()=>h});var d=c(24455);let e=(0,c(72626).h)("waiting-episode-state"),f=globalThis.__sessionWaitingEpisodes??(globalThis.__sessionWaitingEpisodes=new Map),g=globalThis.__sessionWaitingTransitionListeners??(globalThis.__sessionWaitingTransitionListeners=new Set);function h(a){return g.add(a),()=>{g.delete(a)}}function i(a){for(let b of g)try{b(a)}catch(b){e.error("waiting-transition-listener-failed",{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId,waiting:a.waiting,error:b instanceof Error?b.message:String(b)})}}function j({worktreeId:a,cliToolId:b,instanceId:c,waiting:e,kind:g=null,structuredSince:h=null,now:j=Date.now()}){let k=(0,d.v7)(a,b,c),l=f.get(k);if(!e)return void 0===l||(f.delete(k),i({worktreeId:a,cliToolId:b,instanceId:c,waiting:!1,since:null,kind:null,at:j})),null;if(void 0!==l)return l.kind=g,l.since;let m=h??j;return f.set(k,{since:m,kind:g}),i({worktreeId:a,cliToolId:b,instanceId:c,waiting:!0,since:m,kind:g,at:j}),m}function k(a,b,c){return f.get((0,d.v7)(a,b,c))??null}function l(a){let b=`${a}${d.CS}`;for(let a of f.keys())if(a.startsWith(b))return!0;return!1}},95220:(a,b,c)=>{c.r(b),c.d(b,{accumulateTuiContent:()=>g.IZ,cleanClaudeResponse:()=>f.NN,cleanCopilotResponse:()=>f.LH,cleanGeminiResponse:()=>f.IS,cleanOpenCodeResponse:()=>f.aW,clearPromptHashCache:()=>h.iX,clearTuiAccumulator:()=>g.q1,extractCopilotContentLines:()=>g.o0,extractTuiContentLines:()=>g.K0,findOverlapIndex:()=>g.vQ,getAccumulatedContent:()=>g.Uz,getActivePollers:()=>d.KQ,initTuiAccumulator:()=>g.tb,isDuplicatePrompt:()=>h.gv,isOpenCodeComplete:()=>e.bE,migrateResponsePollerWorktreeIds:()=>d.sR,normalizeCopilotLine:()=>g.IW,normalizePromptForDedup:()=>h.zm,renamePromptHashCacheKey:()=>h.i2,resolveExtractionStartIndex:()=>e.QM,startPolling:()=>d.g8,stopAllPolling:()=>d.fq,stopPolling:()=>d.Et,truncateMessage:()=>f.Sj});var d=c(45146),e=c(60),f=c(82450),g=c(13033),h=c(72457)}};
|