harnery 0.40.0 → 0.42.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/README.md +1 -1
- package/dist/commander.js +4 -0
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +34 -20
- package/dist/commands/artifacts.d.ts.map +1 -1
- package/dist/commands/artifacts.js +113 -12
- package/dist/commands/browse-ai.d.ts.map +1 -1
- package/dist/commands/browse-ai.js +4 -0
- package/dist/commands/browse.d.ts +164 -0
- package/dist/commands/browse.d.ts.map +1 -1
- package/dist/commands/browse.js +388 -45
- package/dist/commands/checkpoint.js +8 -12
- package/dist/commands/claude-desktop.d.ts.map +1 -1
- package/dist/commands/claude-desktop.js +52 -0
- package/dist/commands/deinit.d.ts +1 -1
- package/dist/commands/deinit.d.ts.map +1 -1
- package/dist/commands/deinit.js +8 -4
- package/dist/commands/disk.d.ts +6 -0
- package/dist/commands/disk.d.ts.map +1 -0
- package/dist/commands/disk.js +80 -0
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +2 -0
- package/dist/commands/doctor.d.ts +8 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +58 -3
- package/dist/commands/fetch.d.ts.map +1 -1
- package/dist/commands/fetch.js +10 -0
- package/dist/commands/files.d.ts +16 -0
- package/dist/commands/files.d.ts.map +1 -1
- package/dist/commands/files.js +54 -2
- package/dist/commands/init.d.ts +21 -5
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +271 -109
- package/dist/commands/instructions.js +5 -4
- package/dist/commands/ledger-v3.d.ts.map +1 -1
- package/dist/commands/ledger-v3.js +2 -1
- package/dist/commands/rm.d.ts +4 -0
- package/dist/commands/rm.d.ts.map +1 -0
- package/dist/commands/rm.js +87 -0
- package/dist/commands/servers.d.ts +7 -0
- package/dist/commands/servers.d.ts.map +1 -0
- package/dist/commands/servers.js +394 -0
- package/dist/commands/tunnel.d.ts.map +1 -1
- package/dist/commands/tunnel.js +82 -2
- package/dist/commands/webview.d.ts +4 -0
- package/dist/commands/webview.d.ts.map +1 -0
- package/dist/commands/webview.js +94 -0
- package/dist/core/adapter.d.ts +50 -1
- package/dist/core/adapter.d.ts.map +1 -1
- package/dist/core/adapter.js +59 -1
- package/dist/core/adapters/attestation.d.ts.map +1 -1
- package/dist/core/adapters/attestation.js +3 -2
- package/dist/core/adapters/profiles.d.ts +29 -3
- package/dist/core/adapters/profiles.d.ts.map +1 -1
- package/dist/core/adapters/profiles.js +53 -1
- package/dist/core/adapters/registry.d.ts.map +1 -1
- package/dist/core/adapters/registry.js +33 -0
- package/dist/core/adapters/types.d.ts +9 -0
- package/dist/core/adapters/types.d.ts.map +1 -1
- package/dist/core/agents/canonical-emit.d.ts +1 -1
- package/dist/core/agents/canonical-emit.d.ts.map +1 -1
- package/dist/core/agents/canonical-emit.js +2 -7
- package/dist/core/agents/cli.js +25 -16
- package/dist/core/agents/coord-client.d.ts.map +1 -1
- package/dist/core/agents/coord-client.js +7 -2
- package/dist/core/agents/render/session-context.d.ts.map +1 -1
- package/dist/core/agents/render/session-context.js +2 -0
- package/dist/core/agents/rules/claim-conflict.d.ts.map +1 -1
- package/dist/core/agents/rules/claim-conflict.js +3 -9
- package/dist/core/agents/rules/commit-conflict.d.ts.map +1 -1
- package/dist/core/agents/rules/commit-conflict.js +2 -8
- package/dist/core/agents/rules/stop-hook.d.ts +2 -0
- package/dist/core/agents/rules/stop-hook.d.ts.map +1 -1
- package/dist/core/agents/rules/stop-hook.js +1 -1
- package/dist/core/agents/session-events.d.ts +6 -2
- package/dist/core/agents/session-events.d.ts.map +1 -1
- package/dist/core/agents/session-events.js +105 -26
- package/dist/core/agents/session-finalization-state-v3.d.ts.map +1 -1
- package/dist/core/agents/session-finalization-state-v3.js +2 -1
- package/dist/core/agents/session-finalizer-v3.d.ts.map +1 -1
- package/dist/core/agents/session-finalizer-v3.js +5 -4
- package/dist/core/agents/session-name-display.d.ts +28 -0
- package/dist/core/agents/session-name-display.d.ts.map +1 -1
- package/dist/core/agents/session-name-display.js +43 -0
- package/dist/core/agents/state/heartbeat-reader.d.ts +7 -0
- package/dist/core/agents/state/heartbeat-reader.d.ts.map +1 -1
- package/dist/core/agents/state/heartbeat-writer.d.ts +10 -0
- package/dist/core/agents/state/heartbeat-writer.d.ts.map +1 -1
- package/dist/core/agents/state/heartbeat-writer.js +21 -2
- package/dist/core/agents/state/live-coordination-view.d.ts +20 -0
- package/dist/core/agents/state/live-coordination-view.d.ts.map +1 -1
- package/dist/core/agents/state/live-coordination-view.js +61 -0
- package/dist/core/agents/state/live-coordination-writer.js +3 -0
- package/dist/core/agents/state/stale-sweep.d.ts.map +1 -1
- package/dist/core/agents/state/stale-sweep.js +2 -10
- package/dist/core/agents/turn-changes.d.ts +17 -0
- package/dist/core/agents/turn-changes.d.ts.map +1 -0
- package/dist/core/agents/turn-changes.js +76 -0
- package/dist/core/artifacts/delivery-card.d.ts.map +1 -1
- package/dist/core/artifacts/delivery-card.js +11 -3
- package/dist/core/artifacts/index.d.ts +140 -4
- package/dist/core/artifacts/index.d.ts.map +1 -1
- package/dist/core/artifacts/index.js +526 -52
- package/dist/core/config.d.ts +73 -11
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +142 -3
- package/dist/core/context/index.d.ts.map +1 -1
- package/dist/core/context/index.js +2 -1
- package/dist/core/conversations/archive.d.ts.map +1 -1
- package/dist/core/conversations/archive.js +4 -3
- package/dist/core/diagnostics/bundle.d.ts.map +1 -1
- package/dist/core/diagnostics/bundle.js +5 -4
- package/dist/core/events/legacy-storage/canary.d.ts.map +1 -1
- package/dist/core/events/legacy-storage/canary.js +5 -4
- package/dist/core/events/legacy-storage/compression.d.ts.map +1 -1
- package/dist/core/events/legacy-storage/compression.js +2 -1
- package/dist/core/events/v3/adapter-id.d.ts +10 -2
- package/dist/core/events/v3/adapter-id.d.ts.map +1 -1
- package/dist/core/events/v3/adapter-id.js +16 -0
- package/dist/core/events/v3/authority-outbox.d.ts.map +1 -1
- package/dist/core/events/v3/authority-outbox.js +2 -1
- package/dist/core/events/v3/bootstrap.d.ts.map +1 -1
- package/dist/core/events/v3/bootstrap.js +5 -4
- package/dist/core/events/v3/capabilities.d.ts.map +1 -1
- package/dist/core/events/v3/capabilities.js +17 -0
- package/dist/core/events/v3/contract.d.ts +5 -0
- package/dist/core/events/v3/contract.d.ts.map +1 -1
- package/dist/core/events/v3/contract.js +7 -1
- package/dist/core/events/v3/control-witness.d.ts.map +1 -1
- package/dist/core/events/v3/control-witness.js +3 -2
- package/dist/core/events/v3/coordination-transaction-recovery.d.ts.map +1 -1
- package/dist/core/events/v3/coordination-transaction-recovery.js +4 -3
- package/dist/core/events/v3/fingerprint-keys.d.ts.map +1 -1
- package/dist/core/events/v3/fingerprint-keys.js +7 -6
- package/dist/core/events/v3/generated.d.ts +1 -1
- package/dist/core/events/v3/generated.js +1 -1
- package/dist/core/events/v3/live-feed.d.ts.map +1 -1
- package/dist/core/events/v3/live-feed.js +5 -4
- package/dist/core/events/v3/producers/command-recorder.d.ts.map +1 -1
- package/dist/core/events/v3/producers/command-recorder.js +8 -7
- package/dist/core/events/v3/producers/coordination-recorder.d.ts.map +1 -1
- package/dist/core/events/v3/producers/coordination-recorder.js +8 -7
- package/dist/core/events/v3/producers/diagnostic-summaries.d.ts.map +1 -1
- package/dist/core/events/v3/producers/diagnostic-summaries.js +5 -4
- package/dist/core/events/v3/producers/hook-base.d.ts +1 -0
- package/dist/core/events/v3/producers/hook-base.d.ts.map +1 -1
- package/dist/core/events/v3/producers/hook-base.js +10 -4
- package/dist/core/events/v3/producers/hook.d.ts +2 -0
- package/dist/core/events/v3/producers/hook.d.ts.map +1 -1
- package/dist/core/events/v3/producers/hook.js +16 -1
- package/dist/core/events/v3/producers/intake.d.ts.map +1 -1
- package/dist/core/events/v3/producers/intake.js +16 -6
- package/dist/core/events/v3/producers/recorder.d.ts +2 -4
- package/dist/core/events/v3/producers/recorder.d.ts.map +1 -1
- package/dist/core/events/v3/producers/recorder.js +125 -101
- package/dist/core/events/v3/projection.js +9 -1
- package/dist/core/events/v3/recovery.d.ts.map +1 -1
- package/dist/core/events/v3/recovery.js +4 -3
- package/dist/core/events/v3/support-storage/inventory.d.ts.map +1 -1
- package/dist/core/events/v3/support-storage/inventory.js +2 -1
- package/dist/core/events/v3/support-storage/maintenance.d.ts.map +1 -1
- package/dist/core/events/v3/support-storage/maintenance.js +4 -3
- package/dist/core/events/v3/support-storage/pack-reader.d.ts.map +1 -1
- package/dist/core/events/v3/support-storage/pack-reader.js +4 -3
- package/dist/core/events/v3/support-storage/pack-writer.d.ts.map +1 -1
- package/dist/core/events/v3/support-storage/pack-writer.js +6 -5
- package/dist/core/events/v3/tool-line-changes.d.ts +8 -0
- package/dist/core/events/v3/tool-line-changes.d.ts.map +1 -0
- package/dist/core/events/v3/tool-line-changes.js +135 -0
- package/dist/core/events/v3/writer.d.ts.map +1 -1
- package/dist/core/events/v3/writer.js +8 -7
- package/dist/core/governor/planning.d.ts.map +1 -1
- package/dist/core/governor/planning.js +6 -5
- package/dist/core/governor/service.d.ts.map +1 -1
- package/dist/core/governor/service.js +12 -11
- package/dist/core/governor/state.d.ts.map +1 -1
- package/dist/core/governor/state.js +7 -6
- package/dist/core/guard/evaluator.js +1 -0
- package/dist/core/guard/storage.d.ts.map +1 -1
- package/dist/core/guard/storage.js +3 -2
- package/dist/core/hooks/adapter/behaviors/claude-code.d.ts +4 -0
- package/dist/core/hooks/adapter/behaviors/claude-code.d.ts.map +1 -0
- package/dist/core/hooks/adapter/behaviors/claude-code.js +31 -0
- package/dist/core/hooks/adapter/behaviors/codex.d.ts +15 -0
- package/dist/core/hooks/adapter/behaviors/codex.d.ts.map +1 -0
- package/dist/core/hooks/adapter/behaviors/codex.js +82 -0
- package/dist/core/hooks/adapter/behaviors/cursor.d.ts +7 -0
- package/dist/core/hooks/adapter/behaviors/cursor.d.ts.map +1 -0
- package/dist/core/hooks/adapter/behaviors/cursor.js +35 -0
- package/dist/core/hooks/adapter/behaviors/index.d.ts +11 -0
- package/dist/core/hooks/adapter/behaviors/index.d.ts.map +1 -0
- package/dist/core/hooks/adapter/behaviors/index.js +20 -0
- package/dist/core/hooks/adapter/behaviors/openclaw.d.ts +7 -0
- package/dist/core/hooks/adapter/behaviors/openclaw.d.ts.map +1 -0
- package/dist/core/hooks/adapter/behaviors/openclaw.js +34 -0
- package/dist/core/hooks/adapter/behaviors/opencode.d.ts +7 -0
- package/dist/core/hooks/adapter/behaviors/opencode.d.ts.map +1 -0
- package/dist/core/hooks/adapter/behaviors/opencode.js +34 -0
- package/dist/core/hooks/adapter/behaviors/types.d.ts +89 -0
- package/dist/core/hooks/adapter/behaviors/types.d.ts.map +1 -0
- package/dist/core/hooks/adapter/behaviors/types.js +1 -0
- package/dist/core/hooks/adapter/detect.d.ts +1 -1
- package/dist/core/hooks/adapter/detect.d.ts.map +1 -1
- package/dist/core/hooks/adapter/detect.js +2 -3
- package/dist/core/hooks/adapter/events.d.ts +46 -1
- package/dist/core/hooks/adapter/events.d.ts.map +1 -1
- package/dist/core/hooks/adapter/events.js +36 -0
- package/dist/core/hooks/adapter/opencode-plugin.d.ts +60 -0
- package/dist/core/hooks/adapter/opencode-plugin.d.ts.map +1 -0
- package/dist/core/hooks/adapter/opencode-plugin.js +129 -0
- package/dist/core/hooks/adapter/output.d.ts +7 -0
- package/dist/core/hooks/adapter/output.d.ts.map +1 -1
- package/dist/core/hooks/adapter/output.js +8 -1
- package/dist/core/hooks/adapter/runtime-telemetry.js +3 -1
- package/dist/core/hooks/adapter/wiring.d.ts +52 -8
- package/dist/core/hooks/adapter/wiring.d.ts.map +1 -1
- package/dist/core/hooks/adapter/wiring.js +133 -12
- package/dist/core/hooks/cli.js +676 -531
- package/dist/core/hooks/effects/image-capture.d.ts.map +1 -1
- package/dist/core/hooks/effects/image-capture.js +2 -1
- package/dist/core/hooks/prompt-context/contract.d.ts.map +1 -1
- package/dist/core/hooks/prompt-context/contract.js +1 -0
- package/dist/core/hooks/resolve/transcript.d.ts +1 -1
- package/dist/core/hooks/resolve/transcript.d.ts.map +1 -1
- package/dist/core/hooks/resolve/transcript.js +35 -4
- package/dist/core/hooks/run-markers.d.ts +37 -0
- package/dist/core/hooks/run-markers.d.ts.map +1 -0
- package/dist/core/hooks/run-markers.js +109 -0
- package/dist/core/hooks/session-name-presence.d.ts +3 -1
- package/dist/core/hooks/session-name-presence.d.ts.map +1 -1
- package/dist/core/hooks/session-name-presence.js +7 -2
- package/dist/core/hooks/shell-waiter.d.ts +2 -0
- package/dist/core/hooks/shell-waiter.d.ts.map +1 -0
- package/dist/core/hooks/shell-waiter.js +173 -0
- package/dist/core/resources/service.d.ts.map +1 -1
- package/dist/core/resources/service.js +5 -4
- package/dist/core/semantic/review.d.ts.map +1 -1
- package/dist/core/semantic/review.js +5 -4
- package/dist/core/semantic/service.d.ts.map +1 -1
- package/dist/core/semantic/service.js +15 -14
- package/dist/core/semantic/storage.d.ts.map +1 -1
- package/dist/core/semantic/storage.js +5 -4
- package/dist/core/servers/index.d.ts +211 -0
- package/dist/core/servers/index.d.ts.map +1 -0
- package/dist/core/servers/index.js +560 -0
- package/dist/core/servers/net.d.ts +58 -0
- package/dist/core/servers/net.d.ts.map +1 -0
- package/dist/core/servers/net.js +270 -0
- package/dist/core/servers/tunnels.d.ts +14 -0
- package/dist/core/servers/tunnels.d.ts.map +1 -0
- package/dist/core/servers/tunnels.js +33 -0
- package/dist/core/storage/atomic-json.d.ts.map +1 -1
- package/dist/core/storage/atomic-json.js +7 -3
- package/dist/core/storage/builtins.js +1 -0
- package/dist/core/storage/durable-history.d.ts.map +1 -1
- package/dist/core/storage/durable-history.js +6 -5
- package/dist/core/storage/maintenance-providers.d.ts.map +1 -1
- package/dist/core/storage/maintenance-providers.js +2 -1
- package/dist/core/storage/maintenance.d.ts.map +1 -1
- package/dist/core/storage/maintenance.js +7 -6
- package/dist/core/storage/metrics.d.ts.map +1 -1
- package/dist/core/storage/metrics.js +5 -1
- package/dist/core/storage/modes.d.ts +17 -0
- package/dist/core/storage/modes.d.ts.map +1 -0
- package/dist/core/storage/modes.js +47 -0
- package/dist/core/storage/process-log.d.ts.map +1 -1
- package/dist/core/storage/process-log.js +3 -2
- package/dist/core/storage/receipts.d.ts.map +1 -1
- package/dist/core/storage/receipts.js +4 -3
- package/dist/core/storage/segments.d.ts.map +1 -1
- package/dist/core/storage/segments.js +7 -6
- package/dist/core/supervisor/hook-health.d.ts +2 -1
- package/dist/core/supervisor/hook-health.d.ts.map +1 -1
- package/dist/core/supervisor/hook-health.js +4 -3
- package/dist/core/supervisor/service.d.ts.map +1 -1
- package/dist/core/supervisor/service.js +7 -6
- package/dist/core/work/state.d.ts.map +1 -1
- package/dist/core/work/state.js +8 -7
- package/dist/core/workflow/adapters.d.ts +7 -0
- package/dist/core/workflow/adapters.d.ts.map +1 -1
- package/dist/core/workflow/adapters.js +9 -0
- package/dist/core/workflow/approvals.d.ts.map +1 -1
- package/dist/core/workflow/approvals.js +6 -5
- package/dist/core/workflow/billing.d.ts.map +1 -1
- package/dist/core/workflow/billing.js +33 -4
- package/dist/core/workflow/durable-record.d.ts.map +1 -1
- package/dist/core/workflow/durable-record.js +4 -3
- package/dist/core/workflow/engine.d.ts.map +1 -1
- package/dist/core/workflow/engine.js +30 -1
- package/dist/core/workflow/live-session-v3.d.ts.map +1 -1
- package/dist/core/workflow/live-session-v3.js +2 -3
- package/dist/core/workflow/run-state.d.ts.map +1 -1
- package/dist/core/workflow/run-state.js +3 -2
- package/dist/core/workflow/sandbox-projection.d.ts +13 -2
- package/dist/core/workflow/sandbox-projection.d.ts.map +1 -1
- package/dist/core/workflow/sandbox-projection.js +23 -0
- package/dist/core/workflow/spawn-claude.d.ts.map +1 -1
- package/dist/core/workflow/spawn-claude.js +6 -1
- package/dist/core/workflow/spawn-codex.d.ts +2 -0
- package/dist/core/workflow/spawn-codex.d.ts.map +1 -1
- package/dist/core/workflow/spawn-codex.js +20 -1
- package/dist/core/workflow/spawn-cursor.d.ts.map +1 -1
- package/dist/core/workflow/spawn-cursor.js +6 -1
- package/dist/core/workflow/spawn-opencode.d.ts +36 -0
- package/dist/core/workflow/spawn-opencode.d.ts.map +1 -0
- package/dist/core/workflow/spawn-opencode.js +135 -0
- package/dist/core/workflow/transcript.d.ts.map +1 -1
- package/dist/core/workflow/transcript.js +3 -2
- package/dist/core/workflow/types.d.ts +47 -2
- package/dist/core/workflow/types.d.ts.map +1 -1
- package/dist/core/workflow/worker-access.d.ts +92 -0
- package/dist/core/workflow/worker-access.d.ts.map +1 -0
- package/dist/core/workflow/worker-access.js +450 -0
- package/dist/core/workflow/workspaces/leases.d.ts.map +1 -1
- package/dist/core/workflow/workspaces/leases.js +5 -4
- package/dist/core/workflow/workspaces/local-git.d.ts.map +1 -1
- package/dist/core/workflow/workspaces/local-git.js +3 -2
- package/dist/core/workflow/workspaces/paths.d.ts.map +1 -1
- package/dist/core/workflow/workspaces/paths.js +2 -1
- package/dist/core/workflow/workspaces/state.d.ts.map +1 -1
- package/dist/core/workflow/workspaces/state.js +10 -9
- package/dist/lazy-commands.js +8 -1
- package/dist/lib/agent-browser/client.d.ts +9 -0
- package/dist/lib/agent-browser/client.d.ts.map +1 -1
- package/dist/lib/agent-browser/client.js +13 -0
- package/dist/lib/browser/batch-steps.d.ts +18 -0
- package/dist/lib/browser/batch-steps.d.ts.map +1 -0
- package/dist/lib/browser/batch-steps.js +82 -0
- package/dist/lib/browser/client.d.ts +35 -1
- package/dist/lib/browser/client.d.ts.map +1 -1
- package/dist/lib/browser/client.js +117 -8
- package/dist/lib/browser/collect/collector.d.ts +99 -0
- package/dist/lib/browser/collect/collector.d.ts.map +1 -0
- package/dist/lib/browser/collect/collector.js +202 -0
- package/dist/lib/browser/collect/fields.d.ts +31 -0
- package/dist/lib/browser/collect/fields.d.ts.map +1 -0
- package/dist/lib/browser/collect/fields.js +75 -0
- package/dist/lib/browser/collect/index.d.ts +6 -0
- package/dist/lib/browser/collect/index.d.ts.map +1 -0
- package/dist/lib/browser/collect/index.js +5 -0
- package/dist/lib/browser/collect/page-driver.d.ts +14 -0
- package/dist/lib/browser/collect/page-driver.d.ts.map +1 -0
- package/dist/lib/browser/collect/page-driver.js +306 -0
- package/dist/lib/browser/collect/presets.d.ts +52 -0
- package/dist/lib/browser/collect/presets.d.ts.map +1 -0
- package/dist/lib/browser/collect/presets.js +176 -0
- package/dist/lib/browser/collect/scroll-plan.d.ts +85 -0
- package/dist/lib/browser/collect/scroll-plan.d.ts.map +1 -0
- package/dist/lib/browser/collect/scroll-plan.js +118 -0
- package/dist/lib/browser/identity.d.ts +25 -0
- package/dist/lib/browser/identity.d.ts.map +1 -0
- package/dist/lib/browser/identity.js +66 -0
- package/dist/lib/browser/index.d.ts +3 -2
- package/dist/lib/browser/index.d.ts.map +1 -1
- package/dist/lib/browser/index.js +2 -1
- package/dist/lib/browser/launch-args.d.ts +26 -0
- package/dist/lib/browser/launch-args.d.ts.map +1 -1
- package/dist/lib/browser/launch-args.js +41 -1
- package/dist/lib/browser/page-review-judge.d.ts +2 -0
- package/dist/lib/browser/page-review-judge.d.ts.map +1 -1
- package/dist/lib/browser/page-review-judge.js +13 -0
- package/dist/lib/browser/qa-run-contracts.d.ts +10 -0
- package/dist/lib/browser/qa-run-contracts.d.ts.map +1 -1
- package/dist/lib/browser/qa-run.d.ts.map +1 -1
- package/dist/lib/browser/qa-run.js +1 -0
- package/dist/lib/browser/user-agent.d.ts +53 -0
- package/dist/lib/browser/user-agent.d.ts.map +1 -0
- package/dist/lib/browser/user-agent.js +79 -0
- package/dist/lib/browser/windows-chrome.d.ts +59 -0
- package/dist/lib/browser/windows-chrome.d.ts.map +1 -0
- package/dist/lib/browser/windows-chrome.js +179 -0
- package/dist/lib/claude-desktop-share.d.ts +136 -0
- package/dist/lib/claude-desktop-share.d.ts.map +1 -0
- package/dist/lib/claude-desktop-share.js +394 -0
- package/dist/lib/disk-usage.d.ts +50 -0
- package/dist/lib/disk-usage.d.ts.map +1 -0
- package/dist/lib/disk-usage.js +303 -0
- package/dist/lib/docs-lint.d.ts +6 -0
- package/dist/lib/docs-lint.d.ts.map +1 -1
- package/dist/lib/docs-lint.js +8 -3
- package/dist/lib/docs-metadata-managed.d.ts +1 -0
- package/dist/lib/docs-metadata-managed.d.ts.map +1 -1
- package/dist/lib/docs-metadata-managed.js +17 -1
- package/dist/lib/guarded-remove.d.ts +34 -0
- package/dist/lib/guarded-remove.d.ts.map +1 -0
- package/dist/lib/guarded-remove.js +310 -0
- package/dist/lib/identities/assume.d.ts.map +1 -1
- package/dist/lib/identities/assume.js +4 -9
- package/dist/lib/instructions/apply.d.ts.map +1 -1
- package/dist/lib/instructions/apply.js +2 -0
- package/dist/lib/instructions/templates.js +8 -8
- package/dist/lib/pace/index.d.ts +2 -0
- package/dist/lib/pace/index.d.ts.map +1 -0
- package/dist/lib/pace/index.js +1 -0
- package/dist/lib/pace/pace.d.ts +95 -0
- package/dist/lib/pace/pace.d.ts.map +1 -0
- package/dist/lib/pace/pace.js +313 -0
- package/dist/lib/tunnel/error-page.d.ts +1 -1
- package/dist/lib/tunnel/error-page.d.ts.map +1 -1
- package/dist/lib/tunnel/error-page.js +19 -8
- package/dist/lib/tunnel/forward-headers.d.ts +11 -0
- package/dist/lib/tunnel/forward-headers.d.ts.map +1 -0
- package/dist/lib/tunnel/forward-headers.js +17 -0
- package/dist/lib/tunnel/gate.js +34 -10
- package/dist/lib/tunnel/path-scope.d.ts +22 -0
- package/dist/lib/tunnel/path-scope.d.ts.map +1 -0
- package/dist/lib/tunnel/path-scope.js +62 -0
- package/dist/lib/tunnel/state.d.ts +5 -0
- package/dist/lib/tunnel/state.d.ts.map +1 -1
- package/dist/lib/tunnel/state.js +17 -3
- package/dist/lib/webview/index.d.ts +2 -0
- package/dist/lib/webview/index.d.ts.map +1 -0
- package/dist/lib/webview/index.js +1 -0
- package/dist/lib/webview/webview.d.ts +116 -0
- package/dist/lib/webview/webview.d.ts.map +1 -0
- package/dist/lib/webview/webview.js +289 -0
- package/opencode-plugin/package.json +19 -0
- package/opencode-plugin/src/index.ts +791 -0
- package/package.json +16 -4
- package/schemas/config.schema.json +104 -0
- package/schemas/event-v3.schema.json +164 -0
- package/src/commander.ts +26 -0
- package/src/commands/agents.ts +47 -18
- package/src/commands/artifacts.ts +171 -19
- package/src/commands/browse-ai.ts +8 -0
- package/src/commands/browse.ts +570 -48
- package/src/commands/checkpoint.ts +7 -9
- package/src/commands/claude-desktop.ts +61 -0
- package/src/commands/deinit.ts +9 -4
- package/src/commands/disk.ts +114 -0
- package/src/commands/docs.ts +2 -0
- package/src/commands/doctor.ts +63 -3
- package/src/commands/fetch.ts +14 -0
- package/src/commands/files.ts +93 -2
- package/src/commands/init.ts +334 -122
- package/src/commands/instructions.ts +8 -4
- package/src/commands/ledger-v3.ts +2 -1
- package/src/commands/rm.ts +115 -0
- package/src/commands/servers.ts +506 -0
- package/src/commands/tunnel.ts +102 -2
- package/src/commands/webview.ts +159 -0
- package/src/core/adapter.ts +102 -1
- package/src/core/adapters/attestation.ts +3 -2
- package/src/core/adapters/profiles.ts +63 -1
- package/src/core/adapters/registry.ts +37 -0
- package/src/core/adapters/types.ts +10 -0
- package/src/core/agents/canonical-emit.ts +2 -5
- package/src/core/agents/cli.ts +26 -17
- package/src/core/agents/coord-client.ts +9 -3
- package/src/core/agents/render/session-context.ts +1 -0
- package/src/core/agents/rules/claim-conflict.ts +3 -8
- package/src/core/agents/rules/commit-conflict.ts +2 -7
- package/src/core/agents/rules/stop-hook.ts +3 -1
- package/src/core/agents/session-events.ts +120 -26
- package/src/core/agents/session-finalization-state-v3.ts +2 -1
- package/src/core/agents/session-finalizer-v3.ts +5 -4
- package/src/core/agents/session-name-display.ts +48 -0
- package/src/core/agents/state/heartbeat-reader.ts +7 -0
- package/src/core/agents/state/heartbeat-writer.ts +24 -2
- package/src/core/agents/state/live-coordination-view.ts +74 -0
- package/src/core/agents/state/live-coordination-writer.ts +3 -0
- package/src/core/agents/state/stale-sweep.ts +2 -9
- package/src/core/agents/turn-changes.ts +97 -0
- package/src/core/artifacts/delivery-card.ts +12 -3
- package/src/core/artifacts/index.ts +701 -47
- package/src/core/config.ts +206 -4
- package/src/core/context/index.ts +2 -1
- package/src/core/conversations/archive.ts +4 -3
- package/src/core/diagnostics/bundle.ts +5 -3
- package/src/core/events/legacy-storage/canary.ts +5 -4
- package/src/core/events/legacy-storage/compression.ts +2 -1
- package/src/core/events/v3/adapter-id.ts +29 -1
- package/src/core/events/v3/authority-outbox.ts +2 -1
- package/src/core/events/v3/bootstrap.ts +5 -4
- package/src/core/events/v3/capabilities.ts +17 -0
- package/src/core/events/v3/contract.ts +9 -1
- package/src/core/events/v3/control-witness.ts +3 -2
- package/src/core/events/v3/coordination-transaction-recovery.ts +4 -3
- package/src/core/events/v3/fingerprint-keys.ts +7 -6
- package/src/core/events/v3/generated.ts +1 -1
- package/src/core/events/v3/live-feed.ts +5 -4
- package/src/core/events/v3/producers/command-recorder.ts +8 -6
- package/src/core/events/v3/producers/coordination-recorder.ts +8 -7
- package/src/core/events/v3/producers/diagnostic-summaries.ts +5 -4
- package/src/core/events/v3/producers/hook-base.ts +11 -4
- package/src/core/events/v3/producers/hook.ts +19 -1
- package/src/core/events/v3/producers/intake.ts +18 -6
- package/src/core/events/v3/producers/recorder.ts +139 -114
- package/src/core/events/v3/projection.ts +11 -1
- package/src/core/events/v3/recovery.ts +4 -3
- package/src/core/events/v3/support-storage/inventory.ts +2 -1
- package/src/core/events/v3/support-storage/maintenance.ts +8 -3
- package/src/core/events/v3/support-storage/pack-reader.ts +4 -3
- package/src/core/events/v3/support-storage/pack-writer.ts +6 -5
- package/src/core/events/v3/tool-line-changes.ts +139 -0
- package/src/core/events/v3/writer.ts +8 -7
- package/src/core/governor/planning.ts +6 -5
- package/src/core/governor/service.ts +12 -11
- package/src/core/governor/state.ts +7 -6
- package/src/core/guard/evaluator.ts +1 -0
- package/src/core/guard/storage.ts +3 -2
- package/src/core/hooks/adapter/behaviors/claude-code.ts +33 -0
- package/src/core/hooks/adapter/behaviors/codex.ts +96 -0
- package/src/core/hooks/adapter/behaviors/cursor.ts +37 -0
- package/src/core/hooks/adapter/behaviors/index.ts +31 -0
- package/src/core/hooks/adapter/behaviors/openclaw.ts +36 -0
- package/src/core/hooks/adapter/behaviors/opencode.ts +36 -0
- package/src/core/hooks/adapter/behaviors/types.ts +110 -0
- package/src/core/hooks/adapter/detect.ts +2 -3
- package/src/core/hooks/adapter/events.ts +72 -1
- package/src/core/hooks/adapter/opencode-plugin.ts +177 -0
- package/src/core/hooks/adapter/output.ts +8 -1
- package/src/core/hooks/adapter/runtime-telemetry.ts +3 -1
- package/src/core/hooks/adapter/wiring.ts +198 -16
- package/src/core/hooks/cli.ts +776 -539
- package/src/core/hooks/effects/image-capture.ts +2 -1
- package/src/core/hooks/prompt-context/contract.ts +1 -0
- package/src/core/hooks/resolve/transcript.ts +42 -5
- package/src/core/hooks/run-markers.ts +132 -0
- package/src/core/hooks/session-name-presence.ts +10 -3
- package/src/core/hooks/shell-waiter.ts +166 -0
- package/src/core/resources/service.ts +5 -4
- package/src/core/semantic/review.ts +5 -4
- package/src/core/semantic/service.ts +15 -14
- package/src/core/semantic/storage.ts +5 -4
- package/src/core/servers/index.ts +712 -0
- package/src/core/servers/net.ts +283 -0
- package/src/core/servers/tunnels.ts +39 -0
- package/src/core/storage/atomic-json.ts +7 -3
- package/src/core/storage/builtins.ts +1 -0
- package/src/core/storage/durable-history.ts +6 -5
- package/src/core/storage/maintenance-providers.ts +2 -1
- package/src/core/storage/maintenance.ts +7 -6
- package/src/core/storage/metrics.ts +5 -1
- package/src/core/storage/modes.ts +53 -0
- package/src/core/storage/process-log.ts +3 -2
- package/src/core/storage/receipts.ts +4 -3
- package/src/core/storage/segments.ts +7 -6
- package/src/core/supervisor/hook-health.ts +4 -4
- package/src/core/supervisor/service.ts +7 -6
- package/src/core/work/state.ts +8 -7
- package/src/core/workflow/adapters.ts +15 -0
- package/src/core/workflow/approvals.ts +6 -5
- package/src/core/workflow/billing.ts +34 -4
- package/src/core/workflow/durable-record.ts +4 -3
- package/src/core/workflow/engine.ts +38 -1
- package/src/core/workflow/live-session-v3.ts +2 -3
- package/src/core/workflow/run-state.ts +3 -2
- package/src/core/workflow/sandbox-projection.ts +38 -2
- package/src/core/workflow/spawn-claude.ts +5 -1
- package/src/core/workflow/spawn-codex.ts +18 -1
- package/src/core/workflow/spawn-cursor.ts +5 -1
- package/src/core/workflow/spawn-opencode.ts +153 -0
- package/src/core/workflow/transcript.ts +3 -2
- package/src/core/workflow/types.ts +62 -2
- package/src/core/workflow/worker-access.ts +525 -0
- package/src/core/workflow/workspaces/leases.ts +5 -4
- package/src/core/workflow/workspaces/local-git.ts +3 -2
- package/src/core/workflow/workspaces/paths.ts +2 -1
- package/src/core/workflow/workspaces/state.ts +10 -9
- package/src/lazy-commands.ts +11 -1
- package/src/lib/agent-browser/client.ts +18 -0
- package/src/lib/browser/batch-steps.ts +79 -0
- package/src/lib/browser/client.ts +147 -9
- package/src/lib/browser/collect/collector.ts +306 -0
- package/src/lib/browser/collect/fields.ts +87 -0
- package/src/lib/browser/collect/index.ts +47 -0
- package/src/lib/browser/collect/page-driver.ts +327 -0
- package/src/lib/browser/collect/presets.ts +237 -0
- package/src/lib/browser/collect/scroll-plan.ts +179 -0
- package/src/lib/browser/identity.ts +64 -0
- package/src/lib/browser/index.ts +16 -1
- package/src/lib/browser/launch-args.ts +53 -1
- package/src/lib/browser/page-review-judge.ts +16 -0
- package/src/lib/browser/qa-run-contracts.ts +11 -0
- package/src/lib/browser/qa-run.ts +1 -0
- package/src/lib/browser/user-agent.ts +130 -0
- package/src/lib/browser/windows-chrome.ts +227 -0
- package/src/lib/claude-desktop-share.ts +511 -0
- package/src/lib/disk-usage.ts +347 -0
- package/src/lib/docs-lint.ts +8 -3
- package/src/lib/docs-metadata-managed.ts +21 -0
- package/src/lib/guarded-remove.ts +376 -0
- package/src/lib/identities/assume.ts +7 -7
- package/src/lib/instructions/apply.ts +2 -0
- package/src/lib/instructions/templates.ts +8 -8
- package/src/lib/pace/index.ts +14 -0
- package/src/lib/pace/pace.ts +370 -0
- package/src/lib/tunnel/error-page.ts +25 -9
- package/src/lib/tunnel/forward-headers.ts +16 -0
- package/src/lib/tunnel/gate.ts +39 -10
- package/src/lib/tunnel/path-scope.ts +73 -0
- package/src/lib/tunnel/state.ts +20 -3
- package/src/lib/webview/index.ts +13 -0
- package/src/lib/webview/webview.ts +457 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type EventAdapterIdV3, normalizeEventAdapterIdV3 } from "../events/v3/adapter-id.ts";
|
|
1
2
|
import {
|
|
2
3
|
HOOK_HEALTH_EVENT,
|
|
3
4
|
HOOK_HEALTH_RECEIPT_VERSION,
|
|
@@ -18,7 +19,7 @@ export interface CompletedHookHealth {
|
|
|
18
19
|
id: string;
|
|
19
20
|
observed_at: string;
|
|
20
21
|
hook_name: string;
|
|
21
|
-
adapter:
|
|
22
|
+
adapter: EventAdapterIdV3 | "unknown";
|
|
22
23
|
outcome: HookHealthOutcome;
|
|
23
24
|
duration_ms: number;
|
|
24
25
|
rss_start_bytes: number;
|
|
@@ -267,9 +268,8 @@ function token(value: unknown): string | undefined {
|
|
|
267
268
|
}
|
|
268
269
|
|
|
269
270
|
function adapterValue(value: unknown): CompletedHookHealth["adapter"] | undefined {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
: undefined;
|
|
271
|
+
if (value === "unknown") return value;
|
|
272
|
+
return normalizeEventAdapterIdV3(value) ?? undefined;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
function outcomeValue(value: unknown): HookHealthOutcome | undefined {
|
|
@@ -28,6 +28,7 @@ import { readResourceServiceStatus } from "../resources/service-status.ts";
|
|
|
28
28
|
import { resourcePaths } from "../resources/storage.ts";
|
|
29
29
|
import { writePrivateJsonAtomic } from "../storage/atomic-json.ts";
|
|
30
30
|
import { closeProcessLoggers, legacyLogFields, processLogger } from "../storage/logger.ts";
|
|
31
|
+
import { stateDirMode, stateFileMode } from "../storage/modes.ts";
|
|
31
32
|
import { collectSupervisorActivitySnapshot } from "./activity.ts";
|
|
32
33
|
import {
|
|
33
34
|
SUPERVISOR_PRESSURE_SCHEMA_VERSION,
|
|
@@ -103,7 +104,7 @@ export async function spawnSupervisor(
|
|
|
103
104
|
const intervalMs = normalizeInterval(options.intervalMs);
|
|
104
105
|
const idleExitMs = normalizeIdleExit(options.idleExitMs);
|
|
105
106
|
const paths = supervisorPaths(coordRoot);
|
|
106
|
-
mkdirSync(paths.root, { recursive: true, mode:
|
|
107
|
+
mkdirSync(paths.root, { recursive: true, mode: stateDirMode() });
|
|
107
108
|
rmSync(paths.stop, { force: true });
|
|
108
109
|
const cliPath = fileURLToPath(
|
|
109
110
|
new URL(import.meta.url.endsWith(".ts") ? "../../cli.ts" : "../../cli.js", import.meta.url),
|
|
@@ -170,7 +171,7 @@ export function requestSupervisorStop(coordRootRaw: string): SupervisorStatus {
|
|
|
170
171
|
const coordRoot = resolve(coordRootRaw);
|
|
171
172
|
const paths = supervisorPaths(coordRoot);
|
|
172
173
|
const status = readSupervisorStatus(coordRoot);
|
|
173
|
-
mkdirSync(paths.root, { recursive: true, mode:
|
|
174
|
+
mkdirSync(paths.root, { recursive: true, mode: stateDirMode() });
|
|
174
175
|
writePrivateJsonAtomic(paths.stop, {
|
|
175
176
|
requested_at: new Date().toISOString(),
|
|
176
177
|
requested_by_pid: process.pid,
|
|
@@ -352,8 +353,8 @@ export async function runSupervisor(
|
|
|
352
353
|
});
|
|
353
354
|
}
|
|
354
355
|
pressureHysteresis = assessment.hysteresis;
|
|
355
|
-
mkdirSync(paths.timelines, { recursive: true, mode:
|
|
356
|
-
mkdirSync(paths.explanations, { recursive: true, mode:
|
|
356
|
+
mkdirSync(paths.timelines, { recursive: true, mode: stateDirMode() });
|
|
357
|
+
mkdirSync(paths.explanations, { recursive: true, mode: stateDirMode() });
|
|
357
358
|
const projectionUpdates = [
|
|
358
359
|
...findings.active.filter((finding) => !priorActiveFindingIds.has(finding.id)),
|
|
359
360
|
...findings.transitions.filter(
|
|
@@ -495,7 +496,7 @@ function observeLedgerControlState(
|
|
|
495
496
|
|
|
496
497
|
function acquireLease(coordRoot: string, now: Date): SupervisorLease {
|
|
497
498
|
const paths = supervisorPaths(coordRoot);
|
|
498
|
-
mkdirSync(paths.root, { recursive: true, mode:
|
|
499
|
+
mkdirSync(paths.root, { recursive: true, mode: stateDirMode() });
|
|
499
500
|
for (let attempt = 0; attempt < 2; attempt++) {
|
|
500
501
|
const startToken = processStartToken(process.pid);
|
|
501
502
|
const lease: SupervisorLease = {
|
|
@@ -506,7 +507,7 @@ function acquireLease(coordRoot: string, now: Date): SupervisorLease {
|
|
|
506
507
|
created_at: now.toISOString(),
|
|
507
508
|
};
|
|
508
509
|
try {
|
|
509
|
-
const fd = openSync(paths.lease, "wx",
|
|
510
|
+
const fd = openSync(paths.lease, "wx", stateFileMode());
|
|
510
511
|
try {
|
|
511
512
|
writeFileSync(fd, `${JSON.stringify(lease)}\n`, "utf8");
|
|
512
513
|
} finally {
|
package/src/core/work/state.ts
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
appendSegmentedJsonlFile,
|
|
18
18
|
readSegmentedJsonlFileSync,
|
|
19
19
|
} from "../storage/durable-history.ts";
|
|
20
|
+
import { stateDirMode, stateFileMode } from "../storage/modes.ts";
|
|
20
21
|
import { readWorkflowApproval } from "../workflow/approvals.ts";
|
|
21
22
|
import { stableDigest } from "../workflow/durable-record.ts";
|
|
22
23
|
import { readWorkflowProof } from "../workflow/proof.ts";
|
|
@@ -260,9 +261,9 @@ export function createWorkItem(input: CreateWorkItemInput): WorkRecord {
|
|
|
260
261
|
created_at: new Date().toISOString(),
|
|
261
262
|
};
|
|
262
263
|
const dir = workDir(coordRoot, id);
|
|
263
|
-
mkdirSync(dirname(dir), { recursive: true, mode:
|
|
264
|
-
mkdirSync(dir, { mode:
|
|
265
|
-
chmodSync(dir,
|
|
264
|
+
mkdirSync(dirname(dir), { recursive: true, mode: stateDirMode() });
|
|
265
|
+
mkdirSync(dir, { mode: stateDirMode() });
|
|
266
|
+
chmodSync(dir, stateDirMode());
|
|
266
267
|
writePrivateJson(join(dir, "intent.json"), intent, MAX_INTENT_BYTES);
|
|
267
268
|
const release = acquireWorkLease(coordRoot, id);
|
|
268
269
|
try {
|
|
@@ -1250,13 +1251,13 @@ function acquireWorkFileLease(
|
|
|
1250
1251
|
};
|
|
1251
1252
|
const acquire = (): boolean => {
|
|
1252
1253
|
try {
|
|
1253
|
-
const fd = openSync(path, "wx",
|
|
1254
|
+
const fd = openSync(path, "wx", stateFileMode());
|
|
1254
1255
|
try {
|
|
1255
1256
|
writeFileSync(fd, `${JSON.stringify(owner)}\n`, "utf8");
|
|
1256
1257
|
} finally {
|
|
1257
1258
|
closeSync(fd);
|
|
1258
1259
|
}
|
|
1259
|
-
chmodSync(path,
|
|
1260
|
+
chmodSync(path, stateFileMode());
|
|
1260
1261
|
return true;
|
|
1261
1262
|
} catch (error) {
|
|
1262
1263
|
if ((error as NodeJS.ErrnoException).code !== "EEXIST") throw error;
|
|
@@ -1337,8 +1338,8 @@ function writePrivateJson(path: string, value: unknown, maxBytes: number): void
|
|
|
1337
1338
|
const body = `${JSON.stringify(value, null, 2)}\n`;
|
|
1338
1339
|
if (Buffer.byteLength(body) > maxBytes)
|
|
1339
1340
|
throw new Error(`private record exceeds ${maxBytes} bytes`);
|
|
1340
|
-
writeFileSync(path, body, { encoding: "utf8", flag: "wx", mode:
|
|
1341
|
-
chmodSync(path,
|
|
1341
|
+
writeFileSync(path, body, { encoding: "utf8", flag: "wx", mode: stateFileMode() });
|
|
1342
|
+
chmodSync(path, stateFileMode());
|
|
1342
1343
|
}
|
|
1343
1344
|
|
|
1344
1345
|
function readBoundedLines(
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* but they do drift — keep this module the single place they live.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
import type { Adapter } from "../adapter.ts";
|
|
11
|
+
import { probeBinaryVersion } from "../adapters/bench.ts";
|
|
10
12
|
import { BUILTIN_ADAPTER_PROFILES } from "../adapters/profiles.ts";
|
|
11
13
|
import type { AdapterName } from "./types.ts";
|
|
12
14
|
|
|
@@ -24,6 +26,19 @@ export const ADAPTER_LOGIN_HINTS: Record<string, string> = Object.fromEntries(
|
|
|
24
26
|
Object.values(BUILTIN_ADAPTER_PROFILES).map((profile) => [profile.id, profile.loginHint]),
|
|
25
27
|
);
|
|
26
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Adapter ids whose CLI answers a version probe on this machine's PATH, in
|
|
31
|
+
* `BUILTIN_ADAPTER_PROFILES` order. The probe is injectable so callers can keep
|
|
32
|
+
* tests deterministic instead of keying on the host's toolchain.
|
|
33
|
+
*/
|
|
34
|
+
export function detectInstalledAdapters(
|
|
35
|
+
probe: (binary: string) => unknown = probeBinaryVersion,
|
|
36
|
+
): Adapter[] {
|
|
37
|
+
return (Object.keys(ADAPTER_BINARIES) as Adapter[]).filter(
|
|
38
|
+
(id) => probe(ADAPTER_BINARIES[id]) !== null,
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
27
42
|
/** One-line "it's missing, here's the fix" string for spawn adapters. */
|
|
28
43
|
export function notFoundError(adapter: AdapterName): string {
|
|
29
44
|
const binary = ADAPTER_BINARIES[adapter] ?? adapter;
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
} from "node:fs";
|
|
13
13
|
import { dirname, join } from "node:path";
|
|
14
14
|
import type { PolicyEvaluation, PolicyRequestSummary, PolicyVerdict } from "../policy/index.ts";
|
|
15
|
+
import { stateDirMode, stateFileMode } from "../storage/modes.ts";
|
|
15
16
|
import { appendWorkflowTranscriptEvent } from "./transcript.ts";
|
|
16
17
|
|
|
17
18
|
export const WORKFLOW_APPROVAL_SCHEMA_VERSION = 1 as const;
|
|
@@ -108,8 +109,8 @@ export function createWorkflowApproval(input: CreateWorkflowApprovalInput): {
|
|
|
108
109
|
request_sha256: requestSha256,
|
|
109
110
|
};
|
|
110
111
|
const dir = approvalDir(input.coordRoot, id);
|
|
111
|
-
mkdirSync(dir, { recursive: true, mode:
|
|
112
|
-
chmodSync(dir,
|
|
112
|
+
mkdirSync(dir, { recursive: true, mode: stateDirMode() });
|
|
113
|
+
chmodSync(dir, stateDirMode());
|
|
113
114
|
const created = writeExclusiveJson(join(dir, "request.json"), record);
|
|
114
115
|
const approval = readWorkflowApproval(input.coordRoot, id);
|
|
115
116
|
if (
|
|
@@ -249,17 +250,17 @@ function writeExclusiveJson(path: string, value: unknown): boolean {
|
|
|
249
250
|
if (Buffer.byteLength(body) > RECORD_LIMIT_BYTES) {
|
|
250
251
|
throw new Error(`approval record exceeds ${RECORD_LIMIT_BYTES} bytes`);
|
|
251
252
|
}
|
|
252
|
-
mkdirSync(dirname(path), { recursive: true, mode:
|
|
253
|
+
mkdirSync(dirname(path), { recursive: true, mode: stateDirMode() });
|
|
253
254
|
const temporary = `${path}.tmp-${process.pid}-${randomUUID()}`;
|
|
254
255
|
try {
|
|
255
|
-
writeFileSync(temporary, body, { encoding: "utf8", flag: "wx", mode:
|
|
256
|
+
writeFileSync(temporary, body, { encoding: "utf8", flag: "wx", mode: stateFileMode() });
|
|
256
257
|
try {
|
|
257
258
|
linkSync(temporary, path);
|
|
258
259
|
} catch (error) {
|
|
259
260
|
if ((error as NodeJS.ErrnoException).code === "EEXIST") return false;
|
|
260
261
|
throw error;
|
|
261
262
|
}
|
|
262
|
-
chmodSync(path,
|
|
263
|
+
chmodSync(path, stateFileMode());
|
|
263
264
|
return true;
|
|
264
265
|
} finally {
|
|
265
266
|
if (existsSync(temporary)) unlinkSync(temporary);
|
|
@@ -85,10 +85,7 @@ export function probeBilling(adapter: AdapterName, io: ProbeIo = {}): BillingPro
|
|
|
85
85
|
break;
|
|
86
86
|
}
|
|
87
87
|
case "cursor":
|
|
88
|
-
|
|
89
|
-
// live install (adapter itself is pending verification); never claim
|
|
90
|
-
// presence or absence we can't prove.
|
|
91
|
-
login = "unknown";
|
|
88
|
+
login = probeCursorLogin(env, home);
|
|
92
89
|
break;
|
|
93
90
|
default:
|
|
94
91
|
// External adapters own their authentication. The generic engine must
|
|
@@ -126,6 +123,39 @@ function probeClaudeLogin(home: string): LoginState {
|
|
|
126
123
|
return existsSync(dir) ? "unknown" : "absent";
|
|
127
124
|
}
|
|
128
125
|
|
|
126
|
+
/**
|
|
127
|
+
* cursor-agent: the stored login is `auth.json` holding `accessToken` and
|
|
128
|
+
* `refreshToken`. The path follows the CLI's own resolution, read from the
|
|
129
|
+
* installed 2026.09.18 build: `$CURSOR_CONFIG_DIR` when set, else
|
|
130
|
+
* `%APPDATA%\\cursor` on Windows, `~/.cursor` on macOS, and
|
|
131
|
+
* `$XDG_CONFIG_HOME/cursor` (default `~/.config/cursor`) elsewhere.
|
|
132
|
+
* `cursor-agent status --format json` reports the same two tokens as
|
|
133
|
+
* `hasAccessToken` / `hasRefreshToken`.
|
|
134
|
+
*/
|
|
135
|
+
function probeCursorLogin(env: NodeJS.ProcessEnv, home: string): LoginState {
|
|
136
|
+
const authPath = join(cursorConfigDir(env, home), "auth.json");
|
|
137
|
+
if (!existsSync(authPath)) return "absent";
|
|
138
|
+
try {
|
|
139
|
+
const parsed = JSON.parse(readFileSync(authPath, "utf8")) as {
|
|
140
|
+
accessToken?: string;
|
|
141
|
+
refreshToken?: string;
|
|
142
|
+
};
|
|
143
|
+
return parsed.accessToken?.trim() || parsed.refreshToken?.trim() ? "present" : "absent";
|
|
144
|
+
} catch {
|
|
145
|
+
return "unknown";
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function cursorConfigDir(env: NodeJS.ProcessEnv, home: string): string {
|
|
150
|
+
const override = env.CURSOR_CONFIG_DIR?.trim();
|
|
151
|
+
if (override) return override;
|
|
152
|
+
const platform = env.HARNERY_BILLING_PLATFORM?.trim() || process.platform;
|
|
153
|
+
if (platform === "win32")
|
|
154
|
+
return join(env.APPDATA?.trim() || join(home, "AppData", "Roaming"), "cursor");
|
|
155
|
+
if (platform === "darwin") return join(home, ".cursor");
|
|
156
|
+
return join(env.XDG_CONFIG_HOME?.trim() || join(home, ".config"), "cursor");
|
|
157
|
+
}
|
|
158
|
+
|
|
129
159
|
/** codex: auth lives at $CODEX_HOME/auth.json (default ~/.codex). A `tokens`
|
|
130
160
|
* object means a ChatGPT (subscription) login; an OPENAI_API_KEY field means
|
|
131
161
|
* a stored API key (`codex login --api-key`). */
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
writeFileSync,
|
|
14
14
|
} from "node:fs";
|
|
15
15
|
import { dirname } from "node:path";
|
|
16
|
+
import { stateDirMode, stateFileMode } from "../storage/modes.ts";
|
|
16
17
|
|
|
17
18
|
const JSON_LIMIT = 512 * 1024;
|
|
18
19
|
|
|
@@ -33,18 +34,18 @@ export function writeImmutableJson(path: string, value: unknown): boolean {
|
|
|
33
34
|
if (Buffer.byteLength(body) > JSON_LIMIT) {
|
|
34
35
|
throw new Error(`immutable record exceeds ${JSON_LIMIT} bytes`);
|
|
35
36
|
}
|
|
36
|
-
mkdirSync(dirname(path), { recursive: true, mode:
|
|
37
|
+
mkdirSync(dirname(path), { recursive: true, mode: stateDirMode() });
|
|
37
38
|
const temporary = `${path}.tmp-${process.pid}-${randomUUID()}`;
|
|
38
39
|
let fd: number | undefined;
|
|
39
40
|
try {
|
|
40
|
-
fd = openSync(temporary, "wx",
|
|
41
|
+
fd = openSync(temporary, "wx", stateFileMode());
|
|
41
42
|
writeFileSync(fd, body, "utf8");
|
|
42
43
|
fsyncSync(fd);
|
|
43
44
|
closeSync(fd);
|
|
44
45
|
fd = undefined;
|
|
45
46
|
try {
|
|
46
47
|
linkSync(temporary, path);
|
|
47
|
-
chmodSync(path,
|
|
48
|
+
chmodSync(path, stateFileMode());
|
|
48
49
|
fsyncParentDirectory(path);
|
|
49
50
|
return true;
|
|
50
51
|
} catch (error) {
|
|
@@ -21,6 +21,7 @@ import { createHash, randomBytes } from "node:crypto";
|
|
|
21
21
|
import { existsSync, mkdirSync, readFileSync, statSync } from "node:fs";
|
|
22
22
|
import { isAbsolute, join, resolve } from "node:path";
|
|
23
23
|
import { pathToFileURL } from "node:url";
|
|
24
|
+
import { workflowWorkerFullAccessConfig } from "../config.ts";
|
|
24
25
|
import { snapshotRepo } from "../context/index.ts";
|
|
25
26
|
import type {
|
|
26
27
|
ExternalMutationRequest,
|
|
@@ -69,6 +70,7 @@ import type {
|
|
|
69
70
|
BlockedInput,
|
|
70
71
|
EngineOpts,
|
|
71
72
|
GitAdministrativeGrant,
|
|
73
|
+
ParentAccessEvidence,
|
|
72
74
|
RunReport,
|
|
73
75
|
SpawnFilesystemPolicy,
|
|
74
76
|
SpawnResult,
|
|
@@ -88,6 +90,11 @@ import type {
|
|
|
88
90
|
import { WORKFLOW_DIAGNOSTIC_ADMISSION_SCHEMA_VERSION } from "./types.ts";
|
|
89
91
|
import { parseStageOutput, validateAgainstSchema } from "./validate.ts";
|
|
90
92
|
import { freezeWorkflowWorkContext } from "./work-context.ts";
|
|
93
|
+
import {
|
|
94
|
+
decideWorkerAccess,
|
|
95
|
+
detectParentAccess,
|
|
96
|
+
parseWorkerFullAccessPolicy,
|
|
97
|
+
} from "./worker-access.ts";
|
|
91
98
|
import {
|
|
92
99
|
attestTerminal,
|
|
93
100
|
attestWorkspaceFailure,
|
|
@@ -464,6 +471,13 @@ async function executeWorkflow(
|
|
|
464
471
|
writableRoots: [...(requestedPolicy.writableRoots ?? []), ...gitGrantRoots],
|
|
465
472
|
}
|
|
466
473
|
: undefined;
|
|
474
|
+
// Worker full access (ADR 0192) is decided per launch. The host policy is
|
|
475
|
+
// read once per run; the parent probe runs at most once, and only when a
|
|
476
|
+
// launch has already cleared every cheaper condition.
|
|
477
|
+
const workerFullAccess = parseWorkerFullAccessPolicy(
|
|
478
|
+
workflowWorkerFullAccessConfig(opts.coordRoot),
|
|
479
|
+
);
|
|
480
|
+
let parentAccess: ParentAccessEvidence | undefined;
|
|
467
481
|
const executionRepoBefore = resumeState?.manifest.repository_before ?? snapshotRepo(executionCwd);
|
|
468
482
|
if (!resumeState) {
|
|
469
483
|
writeWorkflowRunManifest({
|
|
@@ -992,6 +1006,22 @@ async function executeWorkflow(
|
|
|
992
1006
|
|
|
993
1007
|
if (!spawnCountClaimed) agentsSpawned++;
|
|
994
1008
|
|
|
1009
|
+
const access = decideWorkerAccess({
|
|
1010
|
+
adapter,
|
|
1011
|
+
model: agentOpts.model,
|
|
1012
|
+
effort: agentOpts.effort,
|
|
1013
|
+
policy: workerFullAccess,
|
|
1014
|
+
filesystemPolicy,
|
|
1015
|
+
parent: () => {
|
|
1016
|
+
if (!parentAccess) {
|
|
1017
|
+
parentAccess = (opts.detectParentAccess ?? detectParentAccess)();
|
|
1018
|
+
transcript("worker_access.parent", { ...parentAccess });
|
|
1019
|
+
}
|
|
1020
|
+
return parentAccess;
|
|
1021
|
+
},
|
|
1022
|
+
});
|
|
1023
|
+
agentProof.access = access;
|
|
1024
|
+
|
|
995
1025
|
await acquire();
|
|
996
1026
|
try {
|
|
997
1027
|
await ensureDiagnosticAdmissionObserved();
|
|
@@ -1003,7 +1033,11 @@ async function executeWorkflow(
|
|
|
1003
1033
|
specialist: agentOpts.specialist ?? null,
|
|
1004
1034
|
model: agentOpts.model ?? null,
|
|
1005
1035
|
effort: agentOpts.effort ?? null,
|
|
1036
|
+
access,
|
|
1006
1037
|
});
|
|
1038
|
+
if (access.mode === "full-access") {
|
|
1039
|
+
log(`[access] ${id} ${adapter}: full access (${access.detail})`);
|
|
1040
|
+
}
|
|
1007
1041
|
log(`[${name}] ${currentStage || "(no stage)"} → ${id} [${adapter}] ${label}`);
|
|
1008
1042
|
|
|
1009
1043
|
// Headless children do not reliably fire adapter hooks. The engine owns
|
|
@@ -1033,7 +1067,10 @@ async function executeWorkflow(
|
|
|
1033
1067
|
runId,
|
|
1034
1068
|
agentId: id,
|
|
1035
1069
|
subscriptionOnly,
|
|
1036
|
-
|
|
1070
|
+
// A full-access launch has no sandbox to project a policy into.
|
|
1071
|
+
...(access.mode === "full-access"
|
|
1072
|
+
? { access: "full-access" as const }
|
|
1073
|
+
: { filesystemPolicy }),
|
|
1037
1074
|
});
|
|
1038
1075
|
agentProof.attempts = attempt;
|
|
1039
1076
|
agentProof.duration_ms += last.durationMs;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Adapter, adapterFromPlatform } from "../adapter.ts";
|
|
2
2
|
import { recordLiveTaskChangeV3 } from "../agents/live-authority-v3.ts";
|
|
3
3
|
import { endSessionExplicitV3 } from "../agents/session-finalizer-v3.ts";
|
|
4
4
|
import {
|
|
@@ -115,8 +115,7 @@ function requireV3Route(coordRoot: string) {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
function workflowAdapter(adapter: string | undefined): Adapter {
|
|
118
|
-
|
|
119
|
-
return "claude-code";
|
|
118
|
+
return adapterFromPlatform(adapter, { context: "workflow-child" });
|
|
120
119
|
}
|
|
121
120
|
|
|
122
121
|
export { stableScopeId } from "./scope-id.ts";
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
type PolicyNetworkAccess,
|
|
21
21
|
policyDigest,
|
|
22
22
|
} from "../policy/index.ts";
|
|
23
|
+
import { stateFileMode } from "../storage/modes.ts";
|
|
23
24
|
import { assertWorkflowRunId, readWorkflowApproval } from "./approvals.ts";
|
|
24
25
|
import { isCanonicalWorkflowAttemptContext } from "./attempt-context.ts";
|
|
25
26
|
import { readJsonRecord, writeImmutableJson } from "./durable-record.ts";
|
|
@@ -205,13 +206,13 @@ export function acquireWorkflowResumeLease(coordRoot: string, runId: string): ()
|
|
|
205
206
|
|
|
206
207
|
const acquire = (): boolean => {
|
|
207
208
|
try {
|
|
208
|
-
const fd = openSync(path, "wx",
|
|
209
|
+
const fd = openSync(path, "wx", stateFileMode());
|
|
209
210
|
try {
|
|
210
211
|
writeFileSync(fd, `${JSON.stringify(owner)}\n`, "utf8");
|
|
211
212
|
} finally {
|
|
212
213
|
closeSync(fd);
|
|
213
214
|
}
|
|
214
|
-
chmodSync(path,
|
|
215
|
+
chmodSync(path, stateFileMode());
|
|
215
216
|
return true;
|
|
216
217
|
} catch (error) {
|
|
217
218
|
if ((error as NodeJS.ErrnoException).code !== "EEXIST") throw error;
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
* not, which is worse than refusing and worse than never offering the feature.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
import { builtinAdapterProfile } from "../adapters/profiles.ts";
|
|
17
18
|
import type { AdapterSandboxProjection } from "../adapters/types.ts";
|
|
18
|
-
import type { GitAdministrativeGrant, SpawnFilesystemPolicy } from "./types.ts";
|
|
19
|
+
import type { GitAdministrativeGrant, SpawnFilesystemPolicy, SpawnRequest } from "./types.ts";
|
|
19
20
|
import type { WorkspaceBinding } from "./workspaces/types.ts";
|
|
20
21
|
|
|
21
22
|
export class SandboxProjectionError extends Error {
|
|
@@ -25,7 +26,9 @@ export class SandboxProjectionError extends Error {
|
|
|
25
26
|
| "writable_roots_unrepresentable"
|
|
26
27
|
| "no_projection"
|
|
27
28
|
| "writable_root_escapes_workspace"
|
|
28
|
-
| "git_grant_unavailable"
|
|
29
|
+
| "git_grant_unavailable"
|
|
30
|
+
| "full_access_unrepresentable"
|
|
31
|
+
| "full_access_conflicts_with_policy";
|
|
29
32
|
|
|
30
33
|
constructor(adapter: string, reason: SandboxProjectionError["reason"], message: string) {
|
|
31
34
|
super(message);
|
|
@@ -148,3 +151,36 @@ export function resolveGitGrantRoots(
|
|
|
148
151
|
// repeated writable root is noise in the rendered argv and in proof.
|
|
149
152
|
return [...new Set([repository.gitdir.realpath, repository.common_dir.realpath])];
|
|
150
153
|
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* The vendor arguments for an unsandboxed launch, or undefined for an ordinary
|
|
157
|
+
* sandboxed one (ADR 0192).
|
|
158
|
+
*
|
|
159
|
+
* The engine decides whether a worker qualifies; this only renders the result,
|
|
160
|
+
* and refuses rather than degrades. An adapter with no declared full-access
|
|
161
|
+
* rendering cannot honor the request, and a request that also carries a
|
|
162
|
+
* filesystem policy asks for two contradictory things, so both fail before
|
|
163
|
+
* launch instead of silently picking one.
|
|
164
|
+
*/
|
|
165
|
+
export function resolveFullAccessArgv(
|
|
166
|
+
adapter: string,
|
|
167
|
+
req: Pick<SpawnRequest, "access" | "filesystemPolicy">,
|
|
168
|
+
): readonly string[] | undefined {
|
|
169
|
+
if (req.access !== "full-access") return undefined;
|
|
170
|
+
if (req.filesystemPolicy) {
|
|
171
|
+
throw new SandboxProjectionError(
|
|
172
|
+
adapter,
|
|
173
|
+
"full_access_conflicts_with_policy",
|
|
174
|
+
`${adapter} was asked for full access and a "${req.filesystemPolicy.mode}" filesystem policy at once; a launch gets one or the other`,
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
const rendering = builtinAdapterProfile(adapter)?.fullAccess;
|
|
178
|
+
if (!rendering) {
|
|
179
|
+
throw new SandboxProjectionError(
|
|
180
|
+
adapter,
|
|
181
|
+
"full_access_unrepresentable",
|
|
182
|
+
`${adapter} declares no full-access mode, so a worker on it cannot run without its sandbox`,
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
return rendering.argv;
|
|
186
|
+
}
|
|
@@ -23,7 +23,7 @@ import { builtinAdapterProfile, validateAdapterEffort } from "../adapters/profil
|
|
|
23
23
|
import type { AdapterInvocation, AdapterRawResult } from "../adapters/types.ts";
|
|
24
24
|
import { notFoundError } from "./adapters.ts";
|
|
25
25
|
import { buildChildEnv } from "./child-env.ts";
|
|
26
|
-
import { resolveSandboxProjection } from "./sandbox-projection.ts";
|
|
26
|
+
import { resolveFullAccessArgv, resolveSandboxProjection } from "./sandbox-projection.ts";
|
|
27
27
|
import { isUpstreamFailureText, vendorFailureText } from "./spawn-failure.ts";
|
|
28
28
|
import type { Spawner, SpawnRequest, SpawnResult } from "./types.ts";
|
|
29
29
|
|
|
@@ -56,6 +56,10 @@ export function buildClaudeInvocation(req: SpawnRequest): AdapterInvocation {
|
|
|
56
56
|
"--max-turns",
|
|
57
57
|
String(req.maxTurns),
|
|
58
58
|
];
|
|
59
|
+
// A qualified launch removes the permission prompt and the Bash sandbox
|
|
60
|
+
// (ADR 0192); an ordinary one leaves Claude Code's own settings in charge.
|
|
61
|
+
const fullAccess = resolveFullAccessArgv("claude-code", req);
|
|
62
|
+
if (fullAccess) argv.push(...fullAccess);
|
|
59
63
|
if (req.model) argv.push("--model", req.model);
|
|
60
64
|
if (req.effort) argv.push("--effort", req.effort);
|
|
61
65
|
return { argv };
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* experimental `--json` JSONL event stream.
|
|
11
11
|
* - `--skip-git-repo-check` keeps non-repo cwds working; `--sandbox
|
|
12
12
|
* workspace-write` matches workflow-stage expectations (children may edit).
|
|
13
|
+
* A launch the engine qualified for full access renders `--sandbox
|
|
14
|
+
* danger-full-access` instead (ADR 0192).
|
|
13
15
|
* - No per-run cost or session-id surface in this mode → both left undefined.
|
|
14
16
|
* - No max-turns equivalent → `maxTurns` is accepted and ignored (documented
|
|
15
17
|
* in the CLI docs page).
|
|
@@ -24,13 +26,28 @@ import { builtinAdapterProfile, validateAdapterEffort } from "../adapters/profil
|
|
|
24
26
|
import type { AdapterInvocation, AdapterRawResult } from "../adapters/types.ts";
|
|
25
27
|
import { notFoundError } from "./adapters.ts";
|
|
26
28
|
import { buildChildEnv } from "./child-env.ts";
|
|
27
|
-
import { resolveSandboxProjection } from "./sandbox-projection.ts";
|
|
29
|
+
import { resolveFullAccessArgv, resolveSandboxProjection } from "./sandbox-projection.ts";
|
|
28
30
|
import { isUpstreamFailureText, vendorFailureText } from "./spawn-failure.ts";
|
|
29
31
|
import type { Spawner, SpawnRequest, SpawnResult } from "./types.ts";
|
|
30
32
|
|
|
31
33
|
export function buildCodexInvocation(req: SpawnRequest, resultFile?: string): AdapterInvocation {
|
|
32
34
|
validateAdapterEffort("codex", req.effort);
|
|
33
35
|
if (!resultFile) throw new Error("codex adapter requires a final-message result file");
|
|
36
|
+
const fullAccess = resolveFullAccessArgv("codex", req);
|
|
37
|
+
if (fullAccess) {
|
|
38
|
+
const argv = [
|
|
39
|
+
"codex",
|
|
40
|
+
"exec",
|
|
41
|
+
req.prompt,
|
|
42
|
+
"--output-last-message",
|
|
43
|
+
resultFile,
|
|
44
|
+
"--skip-git-repo-check",
|
|
45
|
+
...fullAccess,
|
|
46
|
+
];
|
|
47
|
+
if (req.model) argv.push("--model", req.model);
|
|
48
|
+
if (req.effort) argv.push("-c", `model_reasoning_effort=${JSON.stringify(req.effort)}`);
|
|
49
|
+
return { argv, resultFile };
|
|
50
|
+
}
|
|
34
51
|
// Default stays workspace-write so an unprojected request is unchanged.
|
|
35
52
|
const projection = req.filesystemPolicy
|
|
36
53
|
? resolveSandboxProjection(
|
|
@@ -24,7 +24,7 @@ import { builtinAdapterProfile, validateAdapterEffort } from "../adapters/profil
|
|
|
24
24
|
import type { AdapterInvocation, AdapterRawResult } from "../adapters/types.ts";
|
|
25
25
|
import { notFoundError } from "./adapters.ts";
|
|
26
26
|
import { buildChildEnv } from "./child-env.ts";
|
|
27
|
-
import { resolveSandboxProjection } from "./sandbox-projection.ts";
|
|
27
|
+
import { resolveFullAccessArgv, resolveSandboxProjection } from "./sandbox-projection.ts";
|
|
28
28
|
import { isUpstreamFailureText, vendorFailureText } from "./spawn-failure.ts";
|
|
29
29
|
import type { Spawner, SpawnRequest, SpawnResult } from "./types.ts";
|
|
30
30
|
|
|
@@ -69,6 +69,10 @@ export function buildCursorInvocation(req: SpawnRequest): AdapterInvocation {
|
|
|
69
69
|
// commands. Neither flag maps host policy into child tools; that capability
|
|
70
70
|
// remains explicitly unsupported.
|
|
71
71
|
const argv = ["cursor-agent", "-p", req.prompt, "--output-format", "json", "--trust", "--force"];
|
|
72
|
+
// A qualified launch also turns the Cursor sandbox off (ADR 0192); an
|
|
73
|
+
// ordinary one leaves the configured sandbox setting untouched.
|
|
74
|
+
const fullAccess = resolveFullAccessArgv("cursor", req);
|
|
75
|
+
if (fullAccess) argv.push(...fullAccess);
|
|
72
76
|
if (req.model) argv.push("--model", req.model);
|
|
73
77
|
return { argv };
|
|
74
78
|
}
|