commandmate 0.33.2 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +160 -160
- package/.next/app-path-routes-manifest.json +28 -28
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +12 -12
- package/.next/required-server-files.json +1 -1
- 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 +2 -2
- 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 +3 -3
- 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.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.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.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.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.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.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 +2 -2
- 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 +2 -2
- 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.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.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.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/1049.js +1 -0
- package/.next/server/chunks/1501.js +6 -2
- package/.next/server/chunks/1886.js +3 -3
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/2404.js +1 -1
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/3123.js +1 -1
- package/.next/server/chunks/3241.js +1 -1
- package/.next/server/chunks/3323.js +1 -1
- package/.next/server/chunks/3480.js +2 -2
- package/.next/server/chunks/4443.js +1 -1
- package/.next/server/chunks/4802.js +1 -1
- package/.next/server/chunks/5164.js +1 -1
- package/.next/server/chunks/5571.js +1 -1
- package/.next/server/chunks/595.js +2 -2
- package/.next/server/chunks/6130.js +1 -0
- package/.next/server/chunks/6285.js +1 -1
- package/.next/server/chunks/6286.js +7 -7
- package/.next/server/chunks/6337.js +1 -1
- package/.next/server/chunks/650.js +1 -1
- package/.next/server/chunks/663.js +1 -1
- package/.next/server/chunks/6661.js +1 -1
- package/.next/server/chunks/6677.js +25 -0
- package/.next/server/chunks/6781.js +1 -1
- package/.next/server/chunks/7075.js +1 -0
- package/.next/server/chunks/7905.js +1 -1
- package/.next/server/chunks/8583.js +1 -0
- package/.next/server/chunks/8918.js +7 -5
- package/.next/server/chunks/9080.js +1 -0
- package/.next/server/chunks/9627.js +1 -1
- package/.next/server/chunks/964.js +1 -0
- 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/2053-9ac860ab4e92ac89.js +1 -0
- package/.next/static/chunks/2652-18b8fea64413467e.js +1 -0
- package/.next/static/chunks/{4718-441a2af91f0374e9.js → 4718-2d9f0397a8f931c4.js} +1 -1
- package/.next/static/chunks/6022-7a7d1760fc9814c7.js +1 -0
- package/.next/static/chunks/{8361-9bb887203c456edb.js → 8361-0142beb59be2abf3.js} +1 -1
- package/.next/static/chunks/app/{page-022090bf6f932818.js → page-26a42881c8648cd3.js} +1 -1
- package/.next/static/chunks/app/sessions/page-a3ab6f122ec60d5a.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-a39ec2a0732d11a6.js +1 -0
- package/.next/static/css/b09bede85744e1cf.css +1 -0
- package/.next/trace +13 -13
- package/dist/cli/commands/ask.d.ts.map +1 -1
- package/dist/cli/commands/ask.js +11 -2
- package/dist/cli/commands/respond.d.ts.map +1 -1
- package/dist/cli/commands/respond.js +8 -4
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +18 -0
- package/dist/cli/commands/wait.d.ts +18 -3
- package/dist/cli/commands/wait.d.ts.map +1 -1
- package/dist/cli/commands/wait.js +137 -2
- package/dist/cli/docs/agent-operations.d.ts +2 -2
- package/dist/cli/docs/agent-operations.d.ts.map +1 -1
- package/dist/cli/docs/agent-operations.js +41 -1
- package/dist/cli/utils/session-target.d.ts +23 -6
- package/dist/cli/utils/session-target.d.ts.map +1 -1
- package/dist/cli/utils/session-target.js +33 -5
- package/dist/server/locales/en/worktree.json +30 -4
- package/dist/server/locales/ja/worktree.json +30 -4
- package/dist/server/src/config/schedule-config.js +45 -3
- package/dist/server/src/lib/cli-tools/antigravity.js +95 -10
- package/dist/server/src/lib/cli-tools/submit-verified-sender.js +377 -16
- package/dist/server/src/lib/cli-tools/vibe-local.js +10 -0
- package/dist/server/src/lib/cmate-parser.js +8 -1
- package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +140 -19
- package/dist/server/src/lib/detection/tools/claude/detect.js +13 -2
- package/dist/server/src/lib/detection/tools/claude/picker-chrome.js +239 -0
- package/dist/server/src/lib/detection/tools/claude/prompt.js +74 -6
- package/dist/server/src/lib/hooks/hook-settings-generator.js +61 -1
- package/dist/server/src/lib/hooks/sources/antigravity/history.js +302 -27
- package/dist/server/src/lib/hooks/sources/antigravity/transcript.js +103 -0
- package/dist/server/src/lib/hooks/sources/claude/history.js +391 -34
- package/dist/server/src/lib/hooks/sources/claude/transcript.js +91 -0
- package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +114 -11
- package/dist/server/src/lib/polling/response-checker.js +82 -3
- package/dist/server/src/lib/polling/structured-history-gate.js +68 -4
- package/dist/server/src/lib/schedule-manager.js +178 -19
- package/dist/server/src/lib/session/agent-session-lifecycle.js +31 -1
- package/dist/server/src/lib/session/ask-user-question-prompt.js +4 -2
- package/dist/server/src/lib/session/claude-executor.js +33 -2
- package/dist/server/src/lib/session/resolve-session-target.js +37 -9
- 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/dist/server/src/lib/verification/env-clean-gate.js +81 -4
- package/dist/server/src/types/agent-transcript.js +143 -1
- package/package.json +1 -1
- package/.next/server/chunks/1068.js +0 -1
- package/.next/server/chunks/153.js +0 -1
- package/.next/server/chunks/4299.js +0 -1
- package/.next/server/chunks/6808.js +0 -1
- package/.next/server/chunks/6838.js +0 -1
- package/.next/server/chunks/7366.js +0 -5
- package/.next/server/chunks/7875.js +0 -25
- package/.next/static/chunks/2053-3f299a7a2c7d6767.js +0 -1
- package/.next/static/chunks/6022-2fa0b5a82d4ce7b6.js +0 -1
- package/.next/static/chunks/8772-9be53a530950d804.js +0 -1
- package/.next/static/chunks/app/sessions/page-584adf11ae51df10.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-38edcd53e51f53b0.js +0 -1
- package/.next/static/css/acd46e25427a2080.css +0 -1
- /package/.next/static/{0a4qrU8WdUwQrlO4mfLMu → gniPBCKoXtbIOQey8kNcx}/_buildManifest.js +0 -0
- /package/.next/static/{0a4qrU8WdUwQrlO4mfLMu → gniPBCKoXtbIOQey8kNcx}/_ssgManifest.js +0 -0
|
@@ -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
|
|
@@ -100,9 +100,11 @@ function corresponds(a, b) {
|
|
|
100
100
|
* Containment rather than the prefix rule the labels use, because the two are
|
|
101
101
|
* extracted differently. An option label is a parsed line; the question is
|
|
102
102
|
* whatever the detector's upward scan swept together, and on a real capture that
|
|
103
|
-
*
|
|
103
|
+
* was several lines glued into one — before Issue #2486 the canary frame yielded
|
|
104
104
|
* `"⏺ I'll load the TaskCreate tool schema first. ☐ First task Which task would
|
|
105
|
-
* you like to start with?"` for a question that is only its last clause.
|
|
105
|
+
* you like to start with?"` for a question that is only its last clause. The
|
|
106
|
+
* picker's tab row now caps that scan, but the scan still reads at most a few
|
|
107
|
+
* rows, so a long question arrives cut and containment is still the right test.
|
|
106
108
|
*
|
|
107
109
|
* The floor stops a short question ("Continue?") from matching unrelated prose;
|
|
108
110
|
* the uniqueness requirement in {@link matchAskUserQuestion} does the rest. On
|
|
@@ -106,7 +106,7 @@ function truncateOutput(output) {
|
|
|
106
106
|
* - vibe-local: [-p <message> -y] or [--model <model> -p <message> -y]
|
|
107
107
|
* - opencode: run --format json [-m <model>] [--agent <a>] [--variant <v>] [-c] [--title <t>] <message>
|
|
108
108
|
* - antigravity: -p <message> --dangerously-skip-permissions
|
|
109
|
-
* - command-code: -p <message> --output-format json [--yolo | --permission-mode <permission>]
|
|
109
|
+
* - command-code: -p <message> --output-format json [--yolo | --permission-mode <permission>] --no-auto-update
|
|
110
110
|
* - others: -p <message> (fallback)
|
|
111
111
|
*
|
|
112
112
|
* @param message - Prompt message
|
|
@@ -201,13 +201,44 @@ function buildCliArgs(message, cliToolId, permission, options) {
|
|
|
201
201
|
// `--yolo` does not override `.commandcode/settings.json`
|
|
202
202
|
// `permissions.deny`; a denied tool call still ends the run with exit 4,
|
|
203
203
|
// which {@link describeCommandCodeExit} names in the failure reason.
|
|
204
|
+
//
|
|
205
|
+
// ## Issue #2454: `yolo` is a Permission *column* value, and the default
|
|
206
|
+
//
|
|
207
|
+
// Every `--permission-mode` value leaves print mode read-only. The 1.53.0
|
|
208
|
+
// bundle injects a `print-permission-gate` mod whenever `--yolo` was not
|
|
209
|
+
// passed, and that mod answers `edit_file` / `write_file` /
|
|
210
|
+
// `shell_command` / `monitor_command` / `kill_shell` with `block: true`;
|
|
211
|
+
// the mode flag never reaches it. A blocked call does not fail the run —
|
|
212
|
+
// it ends exit 0 with `subtype: "success"` — so a schedule that asked for
|
|
213
|
+
// `default` looked successful and changed nothing.
|
|
214
|
+
//
|
|
215
|
+
// So the column now spells `--yolo` as the value `yolo`
|
|
216
|
+
// ({@link COMMAND_CODE_SCHEDULE_PERMISSIONS}, copilot's shape), and the
|
|
217
|
+
// parser fills an empty cell with it. The `else` below used to be the
|
|
218
|
+
// only way to reach `--yolo` and was unreachable from a schedule, because
|
|
219
|
+
// `DEFAULT_PERMISSIONS['command-code']` was `'default'`.
|
|
204
220
|
const args = ['-p', message, '--output-format', 'json'];
|
|
205
|
-
if (schedule_config_1.
|
|
221
|
+
if (permission === schedule_config_1.COMMAND_CODE_YOLO_PERMISSION) {
|
|
222
|
+
args.push('--yolo');
|
|
223
|
+
}
|
|
224
|
+
else if (schedule_config_1.COMMAND_CODE_PERMISSIONS.includes(permission)) {
|
|
206
225
|
args.push('--permission-mode', permission);
|
|
207
226
|
}
|
|
208
227
|
else {
|
|
228
|
+
// Not reachable through the parser (it falls back to `yolo`); this is
|
|
229
|
+
// the direct-call guard.
|
|
209
230
|
args.push('--yolo');
|
|
210
231
|
}
|
|
232
|
+
// Issue #2454: without this, `resolveCliStartupPlan` runs an update check
|
|
233
|
+
// and a background self-update on every scheduled run. Spelled as a
|
|
234
|
+
// literal for the same reason `getCommandForTool` spells `commandcode` as
|
|
235
|
+
// one — importing `COMMAND_CODE_LAUNCH_FLAGS` from
|
|
236
|
+
// `@/lib/cli-tools/command-code` would pull the tmux transport into the
|
|
237
|
+
// scheduler's dependency graph. The unit test imports both and asserts
|
|
238
|
+
// the spelling matches, so the copy cannot drift. `--trust` /
|
|
239
|
+
// `--skip-onboarding` are *not* copied: print mode dispatches before the
|
|
240
|
+
// TUI's trust and onboarding gates, so they have nothing to answer.
|
|
241
|
+
args.push('--no-auto-update');
|
|
211
242
|
return args;
|
|
212
243
|
}
|
|
213
244
|
case 'antigravity':
|
|
@@ -27,9 +27,12 @@
|
|
|
27
27
|
*
|
|
28
28
|
* The roster outranks the explicit request because it is the user-maintained
|
|
29
29
|
* declaration of what a named instance is; a contradiction is reported rather
|
|
30
|
-
* than silently resolved.
|
|
31
|
-
*
|
|
32
|
-
* the
|
|
30
|
+
* than silently resolved. A tool-named instance id is a declaration too — the
|
|
31
|
+
* id `codex` says which agent it is — so with no roster row an explicit request
|
|
32
|
+
* for another tool is reported against the primary anchor the same way (Issue
|
|
33
|
+
* #2487). Callers decide what to do with it: routes with a side effect answer
|
|
34
|
+
* 400, read-only routes answer 200 and surface the conflict in the payload
|
|
35
|
+
* (design §4 D5 / DR3-015).
|
|
33
36
|
*/
|
|
34
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
38
|
exports.INSTANCE_TOOL_CONFLICT = exports.DEFAULT_SESSION_CLI_TOOL = void 0;
|
|
@@ -61,7 +64,8 @@ exports.INSTANCE_TOOL_CONFLICT = 'instance_tool_conflict';
|
|
|
61
64
|
* @param db - Database instance
|
|
62
65
|
* @param worktreeId - Worktree ID (already canonicalized and validated)
|
|
63
66
|
* @param options - Targeting signals carried by the request
|
|
64
|
-
* @returns The resolved target, with `conflict` set when the request contradicts
|
|
67
|
+
* @returns The resolved target, with `conflict` set when the request contradicts
|
|
68
|
+
* the roster or the primary-instance anchor
|
|
65
69
|
*/
|
|
66
70
|
function resolveSessionTarget(db, worktreeId, options = {}) {
|
|
67
71
|
const { instanceId, requestedCliTool } = options;
|
|
@@ -94,9 +98,27 @@ function resolveSessionTarget(db, worktreeId, options = {}) {
|
|
|
94
98
|
}
|
|
95
99
|
return target;
|
|
96
100
|
}
|
|
97
|
-
// The roster does not know this instance
|
|
98
|
-
// flow)
|
|
101
|
+
// The roster does not know this instance, so for an ad-hoc id (the
|
|
102
|
+
// `send --instance <new-id>` flow) an explicit tool is the only declaration
|
|
103
|
+
// there is. A tool-named id declares itself (#868, below), and a request for
|
|
104
|
+
// a different tool contradicts that exactly as it would a roster row (Issue
|
|
105
|
+
// #2487). Taking the request instead started `mcbd-<requested>-<wt>-<id>`, a
|
|
106
|
+
// session nothing that names the id alone ever reads: `ask --instance
|
|
107
|
+
// antigravity --agent command-code` sent there, then waited on agy.
|
|
99
108
|
if (requestedCliTool) {
|
|
109
|
+
if ((0, types_1.isCliToolType)(instanceId) && requestedCliTool !== instanceId) {
|
|
110
|
+
return {
|
|
111
|
+
cliToolId: instanceId,
|
|
112
|
+
instanceId,
|
|
113
|
+
resolvedBy: 'primary',
|
|
114
|
+
conflict: {
|
|
115
|
+
instanceId,
|
|
116
|
+
rosterCliTool: instanceId,
|
|
117
|
+
requestedCliTool,
|
|
118
|
+
primaryAnchor: true,
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
}
|
|
100
122
|
return { cliToolId: requestedCliTool, instanceId, resolvedBy: 'explicit' };
|
|
101
123
|
}
|
|
102
124
|
// #868: an instance id that names a CLI tool *is* that tool's primary
|
|
@@ -145,11 +167,17 @@ function resolveSessionTargetStrict(db, worktreeId, options = {}) {
|
|
|
145
167
|
return { ok: true, target };
|
|
146
168
|
}
|
|
147
169
|
/**
|
|
148
|
-
* The sentence shown to a human when the
|
|
149
|
-
* Names both declarations and the three ways out, because the
|
|
150
|
-
* pick which one is wrong.
|
|
170
|
+
* The sentence shown to a human when the instance's declaration and the
|
|
171
|
+
* request disagree. Names both declarations and the three ways out, because the
|
|
172
|
+
* operator has to pick which one is wrong. A primary-anchor conflict has no
|
|
173
|
+
* roster entry to update, so its third way out is another instance.
|
|
151
174
|
*/
|
|
152
175
|
function describeSessionTargetConflict(conflict) {
|
|
176
|
+
if (conflict.primaryAnchor) {
|
|
177
|
+
return (`Agent instance '${conflict.instanceId}' is the primary instance of ${conflict.rosterCliTool}, `
|
|
178
|
+
+ `but ${conflict.requestedCliTool} was requested. `
|
|
179
|
+
+ `Omit the agent, pass ${conflict.rosterCliTool}, or target a ${conflict.requestedCliTool} instance instead.`);
|
|
180
|
+
}
|
|
153
181
|
return (`Agent instance '${conflict.instanceId}' is registered as ${conflict.rosterCliTool}, `
|
|
154
182
|
+ `but ${conflict.requestedCliTool} was requested. `
|
|
155
183
|
+ `Omit the agent, pass ${conflict.rosterCliTool}, or update the instance's roster entry.`);
|
|
@@ -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)
|