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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "harnery",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "Multi-agent coordination for AI coding agents - Claude Code, Cursor, and Codex.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ryan Kelly",
|
|
@@ -137,6 +137,11 @@
|
|
|
137
137
|
"types": "./dist/core/supervisor/index.d.ts",
|
|
138
138
|
"import": "./dist/core/supervisor/index.js"
|
|
139
139
|
},
|
|
140
|
+
"./core/servers": {
|
|
141
|
+
"bun": "./src/core/servers/index.ts",
|
|
142
|
+
"types": "./dist/core/servers/index.d.ts",
|
|
143
|
+
"import": "./dist/core/servers/index.js"
|
|
144
|
+
},
|
|
140
145
|
"./core/diagnostics": {
|
|
141
146
|
"bun": "./src/core/diagnostics/index.ts",
|
|
142
147
|
"types": "./dist/core/diagnostics/index.d.ts",
|
|
@@ -187,6 +192,11 @@
|
|
|
187
192
|
"types": "./dist/lib/http/index.d.ts",
|
|
188
193
|
"import": "./dist/lib/http/index.js"
|
|
189
194
|
},
|
|
195
|
+
"./lib/pace": {
|
|
196
|
+
"bun": "./src/lib/pace/index.ts",
|
|
197
|
+
"types": "./dist/lib/pace/index.d.ts",
|
|
198
|
+
"import": "./dist/lib/pace/index.js"
|
|
199
|
+
},
|
|
190
200
|
"./lib/machine": {
|
|
191
201
|
"bun": "./src/lib/machine.ts",
|
|
192
202
|
"types": "./dist/lib/machine.d.ts",
|
|
@@ -219,6 +229,8 @@
|
|
|
219
229
|
"src",
|
|
220
230
|
"dist",
|
|
221
231
|
"schemas",
|
|
232
|
+
"opencode-plugin/package.json",
|
|
233
|
+
"opencode-plugin/src/index.ts",
|
|
222
234
|
"README.md",
|
|
223
235
|
"LICENSE",
|
|
224
236
|
"!src/**/*.test.ts",
|
|
@@ -242,13 +254,13 @@
|
|
|
242
254
|
"clean": "rm -rf dist",
|
|
243
255
|
"prepublishOnly": "npm run build",
|
|
244
256
|
"typecheck": "bun x tsc --noEmit",
|
|
245
|
-
"lint": "bun x @biomejs/biome check src openclaw-plugin",
|
|
257
|
+
"lint": "bun x @biomejs/biome check src openclaw-plugin opencode-plugin",
|
|
246
258
|
"check:portability": "bun run scripts/check-portability.ts",
|
|
247
259
|
"check:public-surface": "bun run scripts/check-public-surface.ts",
|
|
248
260
|
"check:layering": "bun run scripts/check-layering.ts",
|
|
249
261
|
"probe:supervisor-budget": "bun run scripts/probe-supervisor-budget.ts",
|
|
250
|
-
"lint:fix": "bun x @biomejs/biome check --write src openclaw-plugin",
|
|
251
|
-
"format": "bun x @biomejs/biome format --write src openclaw-plugin",
|
|
262
|
+
"lint:fix": "bun x @biomejs/biome check --write src openclaw-plugin opencode-plugin",
|
|
263
|
+
"format": "bun x @biomejs/biome format --write src openclaw-plugin opencode-plugin",
|
|
252
264
|
"test": "bun run scripts/test.mjs",
|
|
253
265
|
"test:list": "bun run scripts/test.mjs --list",
|
|
254
266
|
"test:web": "cd web && bun install && bun test",
|
|
@@ -216,6 +216,19 @@
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
},
|
|
219
|
+
"storage": {
|
|
220
|
+
"type": "object",
|
|
221
|
+
"additionalProperties": false,
|
|
222
|
+
"description": "Who can use this project's .harnery/ state. Read from the project file only.",
|
|
223
|
+
"properties": {
|
|
224
|
+
"sharing": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"enum": ["private", "group"],
|
|
227
|
+
"default": "private",
|
|
228
|
+
"description": "private: state is 0700/0600, owner-only. group: 2770/0660 for several Unix users sharing the project directory's group (the directory must be setgid). Never opens state to other users. Env override: HARNERY_STORAGE_SHARING."
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
},
|
|
219
232
|
"artifacts": {
|
|
220
233
|
"type": "object",
|
|
221
234
|
"additionalProperties": false,
|
|
@@ -227,6 +240,53 @@
|
|
|
227
240
|
"maximum": 3650,
|
|
228
241
|
"default": 3,
|
|
229
242
|
"description": "Retention for `harn artifacts create` when --days is absent. Env override: HARNERY_ARTIFACT_RETENTION_DAYS."
|
|
243
|
+
},
|
|
244
|
+
"auto_clean": {
|
|
245
|
+
"type": "boolean",
|
|
246
|
+
"default": true,
|
|
247
|
+
"description": "Run the throttled artifact cleanup at session start and before new artifact work. Env override: HARNERY_ARTIFACT_AUTO_CLEAN."
|
|
248
|
+
},
|
|
249
|
+
"max_bytes": {
|
|
250
|
+
"type": "integer",
|
|
251
|
+
"minimum": 67108864,
|
|
252
|
+
"maximum": 1099511627776,
|
|
253
|
+
"default": 21474836480,
|
|
254
|
+
"description": "Soft repository budget in bytes of disk use for unheld managed workspaces. Env override: HARNERY_ARTIFACT_MAX_BYTES."
|
|
255
|
+
},
|
|
256
|
+
"max_unit_bytes": {
|
|
257
|
+
"type": "integer",
|
|
258
|
+
"minimum": 16777216,
|
|
259
|
+
"maximum": 1099511627776,
|
|
260
|
+
"default": 1073741824,
|
|
261
|
+
"description": "Per-workspace ceiling in bytes of disk use; a workspace created with --big is exempt. Env override: HARNERY_ARTIFACT_MAX_UNIT_BYTES."
|
|
262
|
+
},
|
|
263
|
+
"idle_grace_hours": {
|
|
264
|
+
"type": "integer",
|
|
265
|
+
"minimum": 1,
|
|
266
|
+
"maximum": 8760,
|
|
267
|
+
"default": 24,
|
|
268
|
+
"description": "Hours an unexpired workspace must be idle (no file change, no owner heartbeat) before a size rule may delete it. Env override: HARNERY_ARTIFACT_IDLE_GRACE_HOURS."
|
|
269
|
+
},
|
|
270
|
+
"hold_days": {
|
|
271
|
+
"type": "integer",
|
|
272
|
+
"minimum": 1,
|
|
273
|
+
"maximum": 365,
|
|
274
|
+
"default": 14,
|
|
275
|
+
"description": "Days a hold protects a workspace before it lapses unless renewed with `harn artifacts hold` (same id and reason). Env override: HARNERY_ARTIFACT_HOLD_DAYS."
|
|
276
|
+
},
|
|
277
|
+
"max_held_bytes": {
|
|
278
|
+
"type": "integer",
|
|
279
|
+
"minimum": 67108864,
|
|
280
|
+
"maximum": 1099511627776,
|
|
281
|
+
"default": 21474836480,
|
|
282
|
+
"description": "Advisory budget in bytes of disk use for held workspaces. Exceeding it produces warnings; held work is never deleted. Env override: HARNERY_ARTIFACT_MAX_HELD_BYTES."
|
|
283
|
+
},
|
|
284
|
+
"min_free_bytes": {
|
|
285
|
+
"type": "integer",
|
|
286
|
+
"minimum": 0,
|
|
287
|
+
"maximum": 1125899906842624,
|
|
288
|
+
"default": 21474836480,
|
|
289
|
+
"description": "Free-disk floor for the artifact store. Below it, artifact commands warn and `artifacts create --big` refuses without --allow-low-disk. 0 disables the floor. Env override: HARNERY_ARTIFACT_MIN_FREE_BYTES."
|
|
230
290
|
}
|
|
231
291
|
}
|
|
232
292
|
},
|
|
@@ -293,6 +353,37 @@
|
|
|
293
353
|
"type": "boolean",
|
|
294
354
|
"default": false,
|
|
295
355
|
"description": "Pin `workflow run` to subscription billing: API-key vars are scrubbed from every child env. Stamped true by `harn init` when the key is absent. Env override: HARNERY_WORKFLOW_SUBSCRIPTION_ONLY=1|0."
|
|
356
|
+
},
|
|
357
|
+
"workerFullAccess": {
|
|
358
|
+
"type": "object",
|
|
359
|
+
"additionalProperties": false,
|
|
360
|
+
"description": "Let qualifying workflow workers launch without their vendor sandbox (ADR 0192). A launch qualifies only when this is enabled, the launching session itself can be shown to run with full access, and the worker's exact model and effort meet a floor listed here. Anything else keeps the ordinary sandboxed projection. Project config only; a user-global file cannot grant it. HARNERY_WORKFLOW_WORKER_FULL_ACCESS=0 turns it off for one process. An invalid value disables it entirely.",
|
|
361
|
+
"properties": {
|
|
362
|
+
"enabled": { "type": "boolean", "default": false },
|
|
363
|
+
"floors": {
|
|
364
|
+
"type": "object",
|
|
365
|
+
"description": "Per-adapter list of models a worker may run unsandboxed on. Keys are adapter ids.",
|
|
366
|
+
"additionalProperties": {
|
|
367
|
+
"type": "array",
|
|
368
|
+
"items": {
|
|
369
|
+
"type": "object",
|
|
370
|
+
"additionalProperties": false,
|
|
371
|
+
"required": ["model"],
|
|
372
|
+
"properties": {
|
|
373
|
+
"model": {
|
|
374
|
+
"type": "string",
|
|
375
|
+
"minLength": 1,
|
|
376
|
+
"description": "Exact model id the worker must name. Aliases and the adapter's default model never match."
|
|
377
|
+
},
|
|
378
|
+
"minEffort": {
|
|
379
|
+
"type": "string",
|
|
380
|
+
"description": "Lowest qualifying effort on the adapter's declared effort scale. Required for an adapter with an effort scale; not allowed for one that encodes effort in the model id."
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
296
387
|
}
|
|
297
388
|
}
|
|
298
389
|
},
|
|
@@ -336,6 +427,19 @@
|
|
|
336
427
|
"default": 65536
|
|
337
428
|
}
|
|
338
429
|
}
|
|
430
|
+
},
|
|
431
|
+
"codexWindowsBridge": {
|
|
432
|
+
"type": "object",
|
|
433
|
+
"additionalProperties": false,
|
|
434
|
+
"required": ["entryPoint"],
|
|
435
|
+
"description": "Route Windows-native Codex hooks through a resident WSL bridge (decision record 0197). init writes a commandWindows on each Codex hook that calls entryPoint when it is on PATH and the working directory is a WSL path, and otherwise runs the usual command. Project config only.",
|
|
436
|
+
"properties": {
|
|
437
|
+
"entryPoint": {
|
|
438
|
+
"type": "string",
|
|
439
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
|
|
440
|
+
"description": "Windows command name the bridge installs, for example codex-wsl-hook. Only a bridge that implements the decision record 0197 contract should install it."
|
|
441
|
+
}
|
|
442
|
+
}
|
|
339
443
|
}
|
|
340
444
|
}
|
|
341
445
|
},
|
|
@@ -23775,6 +23775,170 @@
|
|
|
23775
23775
|
}
|
|
23776
23776
|
}
|
|
23777
23777
|
},
|
|
23778
|
+
"line_changes": {
|
|
23779
|
+
"anyOf": [
|
|
23780
|
+
{
|
|
23781
|
+
"additionalProperties": false,
|
|
23782
|
+
"type": "object",
|
|
23783
|
+
"required": [
|
|
23784
|
+
"state",
|
|
23785
|
+
"value",
|
|
23786
|
+
"attestation",
|
|
23787
|
+
"confidence"
|
|
23788
|
+
],
|
|
23789
|
+
"properties": {
|
|
23790
|
+
"state": {
|
|
23791
|
+
"const": "observed",
|
|
23792
|
+
"type": "string"
|
|
23793
|
+
},
|
|
23794
|
+
"value": {
|
|
23795
|
+
"additionalProperties": false,
|
|
23796
|
+
"type": "object",
|
|
23797
|
+
"required": [
|
|
23798
|
+
"added",
|
|
23799
|
+
"removed"
|
|
23800
|
+
],
|
|
23801
|
+
"properties": {
|
|
23802
|
+
"added": {
|
|
23803
|
+
"minimum": 0,
|
|
23804
|
+
"type": "integer"
|
|
23805
|
+
},
|
|
23806
|
+
"removed": {
|
|
23807
|
+
"minimum": 0,
|
|
23808
|
+
"type": "integer"
|
|
23809
|
+
}
|
|
23810
|
+
}
|
|
23811
|
+
},
|
|
23812
|
+
"attestation": {
|
|
23813
|
+
"anyOf": [
|
|
23814
|
+
{
|
|
23815
|
+
"const": "native",
|
|
23816
|
+
"type": "string"
|
|
23817
|
+
},
|
|
23818
|
+
{
|
|
23819
|
+
"const": "derived",
|
|
23820
|
+
"type": "string"
|
|
23821
|
+
},
|
|
23822
|
+
{
|
|
23823
|
+
"const": "inferred",
|
|
23824
|
+
"type": "string"
|
|
23825
|
+
}
|
|
23826
|
+
]
|
|
23827
|
+
},
|
|
23828
|
+
"confidence": {
|
|
23829
|
+
"anyOf": [
|
|
23830
|
+
{
|
|
23831
|
+
"const": "exact",
|
|
23832
|
+
"type": "string"
|
|
23833
|
+
},
|
|
23834
|
+
{
|
|
23835
|
+
"const": "high",
|
|
23836
|
+
"type": "string"
|
|
23837
|
+
},
|
|
23838
|
+
{
|
|
23839
|
+
"const": "medium",
|
|
23840
|
+
"type": "string"
|
|
23841
|
+
},
|
|
23842
|
+
{
|
|
23843
|
+
"const": "low",
|
|
23844
|
+
"type": "string"
|
|
23845
|
+
}
|
|
23846
|
+
]
|
|
23847
|
+
}
|
|
23848
|
+
}
|
|
23849
|
+
},
|
|
23850
|
+
{
|
|
23851
|
+
"additionalProperties": false,
|
|
23852
|
+
"type": "object",
|
|
23853
|
+
"required": [
|
|
23854
|
+
"state",
|
|
23855
|
+
"capability"
|
|
23856
|
+
],
|
|
23857
|
+
"properties": {
|
|
23858
|
+
"state": {
|
|
23859
|
+
"const": "unsupported",
|
|
23860
|
+
"type": "string"
|
|
23861
|
+
},
|
|
23862
|
+
"capability": {
|
|
23863
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/+-]{0,127}$",
|
|
23864
|
+
"type": "string"
|
|
23865
|
+
}
|
|
23866
|
+
}
|
|
23867
|
+
},
|
|
23868
|
+
{
|
|
23869
|
+
"additionalProperties": false,
|
|
23870
|
+
"type": "object",
|
|
23871
|
+
"required": [
|
|
23872
|
+
"state",
|
|
23873
|
+
"capability",
|
|
23874
|
+
"reason"
|
|
23875
|
+
],
|
|
23876
|
+
"properties": {
|
|
23877
|
+
"state": {
|
|
23878
|
+
"const": "expected_but_missing",
|
|
23879
|
+
"type": "string"
|
|
23880
|
+
},
|
|
23881
|
+
"capability": {
|
|
23882
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/+-]{0,127}$",
|
|
23883
|
+
"type": "string"
|
|
23884
|
+
},
|
|
23885
|
+
"reason": {
|
|
23886
|
+
"pattern": "^[a-z0-9][a-z0-9._-]{0,79}$",
|
|
23887
|
+
"type": "string"
|
|
23888
|
+
}
|
|
23889
|
+
}
|
|
23890
|
+
},
|
|
23891
|
+
{
|
|
23892
|
+
"additionalProperties": false,
|
|
23893
|
+
"type": "object",
|
|
23894
|
+
"required": [
|
|
23895
|
+
"state",
|
|
23896
|
+
"reason"
|
|
23897
|
+
],
|
|
23898
|
+
"properties": {
|
|
23899
|
+
"state": {
|
|
23900
|
+
"const": "redacted",
|
|
23901
|
+
"type": "string"
|
|
23902
|
+
},
|
|
23903
|
+
"reason": {
|
|
23904
|
+
"pattern": "^[a-z0-9][a-z0-9._-]{0,79}$",
|
|
23905
|
+
"type": "string"
|
|
23906
|
+
}
|
|
23907
|
+
}
|
|
23908
|
+
},
|
|
23909
|
+
{
|
|
23910
|
+
"additionalProperties": false,
|
|
23911
|
+
"type": "object",
|
|
23912
|
+
"required": [
|
|
23913
|
+
"state",
|
|
23914
|
+
"reason"
|
|
23915
|
+
],
|
|
23916
|
+
"properties": {
|
|
23917
|
+
"state": {
|
|
23918
|
+
"const": "unknown",
|
|
23919
|
+
"type": "string"
|
|
23920
|
+
},
|
|
23921
|
+
"reason": {
|
|
23922
|
+
"pattern": "^[a-z0-9][a-z0-9._-]{0,79}$",
|
|
23923
|
+
"type": "string"
|
|
23924
|
+
}
|
|
23925
|
+
}
|
|
23926
|
+
},
|
|
23927
|
+
{
|
|
23928
|
+
"additionalProperties": false,
|
|
23929
|
+
"type": "object",
|
|
23930
|
+
"required": [
|
|
23931
|
+
"state"
|
|
23932
|
+
],
|
|
23933
|
+
"properties": {
|
|
23934
|
+
"state": {
|
|
23935
|
+
"const": "not_applicable",
|
|
23936
|
+
"type": "string"
|
|
23937
|
+
}
|
|
23938
|
+
}
|
|
23939
|
+
}
|
|
23940
|
+
]
|
|
23941
|
+
},
|
|
23778
23942
|
"span": {
|
|
23779
23943
|
"additionalProperties": false,
|
|
23780
23944
|
"type": "object",
|
package/src/commander.ts
CHANGED
|
@@ -320,6 +320,12 @@ function harneryCommandBundles({
|
|
|
320
320
|
binName,
|
|
321
321
|
}: CommandBundleContext): LazyCommandBundle[] {
|
|
322
322
|
return [
|
|
323
|
+
lazy(
|
|
324
|
+
"disk [path]",
|
|
325
|
+
"Measure checkout disk usage, including nested repositories and ignored files",
|
|
326
|
+
async (program) => (await import("./commands/disk.ts")).registerDiskCommand(program, emit),
|
|
327
|
+
{ hasOptions: true },
|
|
328
|
+
),
|
|
323
329
|
lazy(
|
|
324
330
|
"tokens <files...>",
|
|
325
331
|
"Count tokens in text/markdown files (offline, uses o200k_base as Claude proxy)",
|
|
@@ -507,6 +513,13 @@ function harneryCommandBundles({
|
|
|
507
513
|
(await import("./commands/browse-ai.ts")).registerBrowseAiCommand(program, emit, context),
|
|
508
514
|
{ hasOptions: true },
|
|
509
515
|
),
|
|
516
|
+
lazy(
|
|
517
|
+
"webview <url>",
|
|
518
|
+
`Lightweight headless page probe through Bun.WebView (experimental, Bun 1.4+). Fresh ephemeral browser per call; use ${binName} browse for login, cookies, HAR, and QA.`,
|
|
519
|
+
async (program) =>
|
|
520
|
+
(await import("./commands/webview.ts")).registerWebviewCommand(program, emit, binName),
|
|
521
|
+
{ hasOptions: true },
|
|
522
|
+
),
|
|
510
523
|
{
|
|
511
524
|
commands: [
|
|
512
525
|
{
|
|
@@ -589,6 +602,13 @@ function harneryCommandBundles({
|
|
|
589
602
|
async (program) =>
|
|
590
603
|
(await import("./commands/storage.ts")).registerStorageCommand(program, emit, context),
|
|
591
604
|
),
|
|
605
|
+
lazy(
|
|
606
|
+
"rm <paths...>",
|
|
607
|
+
"Preview guarded removal of untracked files; --yes applies permanent deletion",
|
|
608
|
+
async (program) =>
|
|
609
|
+
(await import("./commands/rm.ts")).registerRmCommand(program, emit, context),
|
|
610
|
+
{ hasOptions: true },
|
|
611
|
+
),
|
|
592
612
|
lazy("logs", "List and query bounded Harnery log families", async (program) =>
|
|
593
613
|
(await import("./commands/logs.ts")).registerLogsCommand(program, emit, context),
|
|
594
614
|
),
|
|
@@ -654,6 +674,12 @@ function harneryCommandBundles({
|
|
|
654
674
|
async (program) =>
|
|
655
675
|
(await import("./commands/tunnel.ts")).registerTunnelCommand(program, emit, context),
|
|
656
676
|
),
|
|
677
|
+
lazy(
|
|
678
|
+
"servers",
|
|
679
|
+
"Every local server started in this project: list, stop, clean up idle session servers, read logs",
|
|
680
|
+
async (program) =>
|
|
681
|
+
(await import("./commands/servers.ts")).registerServersCommand(program, emit, context),
|
|
682
|
+
),
|
|
657
683
|
lazy(
|
|
658
684
|
"docs",
|
|
659
685
|
"Documentation tooling: freshness report, metadata, lint, sweep, index",
|
package/src/commands/agents.ts
CHANGED
|
@@ -78,6 +78,9 @@ import {
|
|
|
78
78
|
readHeartbeat as readHeartbeatCache,
|
|
79
79
|
} from "../core/agents/state/heartbeat-writer.ts";
|
|
80
80
|
import {
|
|
81
|
+
describeLiveAuthorityBlockV3,
|
|
82
|
+
liveAuthorityBlockHintV3,
|
|
83
|
+
liveAuthorityBlockV3,
|
|
81
84
|
readLiveCoordinationRow,
|
|
82
85
|
readLiveCoordinationRows,
|
|
83
86
|
} from "../core/agents/state/live-coordination-view.ts";
|
|
@@ -86,13 +89,18 @@ import {
|
|
|
86
89
|
foldSessionState,
|
|
87
90
|
type TaskState,
|
|
88
91
|
} from "../core/agents/state/session-state.ts";
|
|
92
|
+
import { turnChangesStatusRow } from "../core/agents/turn-changes.ts";
|
|
89
93
|
import { turnElapsedStatusRow } from "../core/agents/turn-elapsed.ts";
|
|
90
94
|
import {
|
|
91
95
|
coordFreshnessSeconds,
|
|
92
96
|
resolveBinName,
|
|
93
97
|
sessionFinalizationConfig,
|
|
94
98
|
} from "../core/config.ts";
|
|
95
|
-
import {
|
|
99
|
+
import {
|
|
100
|
+
EVENT_ADAPTER_IDS_V3,
|
|
101
|
+
type EventAdapterIdV3,
|
|
102
|
+
normalizeEventAdapterIdV3,
|
|
103
|
+
} from "../core/events/v3/adapter-id.ts";
|
|
96
104
|
import type { EventTypeV3 } from "../core/events/v3/contract.ts";
|
|
97
105
|
import { readEventV3ControlState } from "../core/events/v3/control.ts";
|
|
98
106
|
import {
|
|
@@ -611,7 +619,7 @@ export function registerAgentsCommand(
|
|
|
611
619
|
.option(
|
|
612
620
|
"--adapter <id>",
|
|
613
621
|
"(--kind cache) adapter used to validate the authoritative V3 generation: " +
|
|
614
|
-
"claude-code | cursor | codex.",
|
|
622
|
+
"claude-code | cursor | codex | opencode.",
|
|
615
623
|
)
|
|
616
624
|
.option(
|
|
617
625
|
"--pid <pid>",
|
|
@@ -1275,7 +1283,7 @@ function runWhoami(opts: { json?: boolean }): void {
|
|
|
1275
1283
|
if (!hb) {
|
|
1276
1284
|
emit.error({
|
|
1277
1285
|
code: "no_live_generation",
|
|
1278
|
-
message: noLiveGenerationMessage(myOwner),
|
|
1286
|
+
message: noLiveGenerationMessage(root, myOwner),
|
|
1279
1287
|
});
|
|
1280
1288
|
process.exit(1);
|
|
1281
1289
|
}
|
|
@@ -1473,9 +1481,23 @@ function normalizeKind(kind: string | undefined | null): string {
|
|
|
1473
1481
|
* This id is actionable: the reader may pass it to cache repair or explicit
|
|
1474
1482
|
* finalization. Abbreviate ids for display elsewhere, never in a diagnostic
|
|
1475
1483
|
* whose purpose is to hand the caller a canonical identity.
|
|
1484
|
+
*
|
|
1485
|
+
* The message also names the recovery. A session whose generation ended while
|
|
1486
|
+
* it sat idle (a stale sweep, or a `done` it has since outlived) still has a
|
|
1487
|
+
* live process, and `agents lifecycle active` is the one command that opens a
|
|
1488
|
+
* fresh generation for it (ADR 0088). Without the pointer every coordination
|
|
1489
|
+
* command refuses in turn and the caller has no way to guess the path back.
|
|
1476
1490
|
*/
|
|
1477
|
-
function noLiveGenerationMessage(owner: string): string {
|
|
1478
|
-
|
|
1491
|
+
function noLiveGenerationMessage(root: string, owner: string): string {
|
|
1492
|
+
const block = liveAuthorityBlockV3(root, owner);
|
|
1493
|
+
if (block) {
|
|
1494
|
+
return `resolved owner=${owner}; ${describeLiveAuthorityBlockV3(block)}; ${liveAuthorityBlockHintV3(resolveBinName(root))}`;
|
|
1495
|
+
}
|
|
1496
|
+
return `resolved owner=${owner} but no authority-safe live V3 generation exists for it; ${lifecycleReopenHint(root)}`;
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
function lifecycleReopenHint(root: string): string {
|
|
1500
|
+
return `run \`${resolveBinName(root)} agents lifecycle active\` to open a fresh generation for this continuing session`;
|
|
1479
1501
|
}
|
|
1480
1502
|
|
|
1481
1503
|
/**
|
|
@@ -1750,7 +1772,7 @@ function cursorEnvSessionId(): string | null {
|
|
|
1750
1772
|
}
|
|
1751
1773
|
|
|
1752
1774
|
interface CommandSessionBootstrap {
|
|
1753
|
-
adapter:
|
|
1775
|
+
adapter: Adapter;
|
|
1754
1776
|
sessionId: string;
|
|
1755
1777
|
}
|
|
1756
1778
|
|
|
@@ -2009,7 +2031,7 @@ function runLifecycle(rawState: string, opts: { reason?: string; sessionId?: str
|
|
|
2009
2031
|
if (state !== "active") {
|
|
2010
2032
|
emit.error({
|
|
2011
2033
|
code: "no_live_generation",
|
|
2012
|
-
message:
|
|
2034
|
+
message: noLiveGenerationMessage(root, myOwner),
|
|
2013
2035
|
});
|
|
2014
2036
|
process.exitCode = 1;
|
|
2015
2037
|
return;
|
|
@@ -2269,7 +2291,7 @@ function runStatus(opts: {
|
|
|
2269
2291
|
if (!hb) {
|
|
2270
2292
|
emit.error({
|
|
2271
2293
|
code: "no_live_generation",
|
|
2272
|
-
message: noLiveGenerationMessage(myOwner),
|
|
2294
|
+
message: noLiveGenerationMessage(root, myOwner),
|
|
2273
2295
|
});
|
|
2274
2296
|
process.exit(1);
|
|
2275
2297
|
}
|
|
@@ -2421,6 +2443,7 @@ function runStatus(opts: {
|
|
|
2421
2443
|
// one inside the same session. Best-effort by contract — no turn evidence,
|
|
2422
2444
|
// no row.
|
|
2423
2445
|
const turnElapsed = turnElapsedStatusRow({ coordRoot: root, instanceId: hb.instance_id });
|
|
2446
|
+
const turnChanges = turnChangesStatusRow({ coordRoot: root, instanceId: hb.instance_id });
|
|
2424
2447
|
const resources = readResourceStatus(root);
|
|
2425
2448
|
|
|
2426
2449
|
const data = {
|
|
@@ -2430,6 +2453,7 @@ function runStatus(opts: {
|
|
|
2430
2453
|
session_age_secs: ageSecs,
|
|
2431
2454
|
turn_elapsed_secs: turnElapsed ? turnElapsed.elapsed.secs : null,
|
|
2432
2455
|
turn_complete: turnElapsed ? turnElapsed.elapsed.complete : null,
|
|
2456
|
+
turn_changes: turnChanges.changes,
|
|
2433
2457
|
activity: activityOf(hb),
|
|
2434
2458
|
activity_updated_at: hb.activity_updated_at ?? null,
|
|
2435
2459
|
activity_source: hb.activity_source ?? null,
|
|
@@ -2477,6 +2501,7 @@ function runStatus(opts: {
|
|
|
2477
2501
|
const rows: Array<[string, string]> = [
|
|
2478
2502
|
["session", formatAge(ageSecs)],
|
|
2479
2503
|
...(turnElapsed ? ([["turn", turnElapsed.value]] as Array<[string, string]>) : []),
|
|
2504
|
+
["changes", turnChanges.value],
|
|
2480
2505
|
["activity", activityOf(hb)],
|
|
2481
2506
|
["lifecycle", lifecycleLabel(hb)],
|
|
2482
2507
|
["context", ctxStr],
|
|
@@ -2777,11 +2802,7 @@ export function readAgentDiagnosticEventsInWindow(
|
|
|
2777
2802
|
|
|
2778
2803
|
/** Normalize adapter event data into the heartbeat platform value. */
|
|
2779
2804
|
function adapterToPlatform(adapter: string | undefined): string {
|
|
2780
|
-
|
|
2781
|
-
if (adapter === "cursor") return "cursor";
|
|
2782
|
-
if (adapter === "codex") return "codex";
|
|
2783
|
-
if (adapter === "openclaw") return "openclaw";
|
|
2784
|
-
return "unknown";
|
|
2805
|
+
return normalizeEventAdapterIdV3(adapter) ?? "unknown";
|
|
2785
2806
|
}
|
|
2786
2807
|
|
|
2787
2808
|
/** Project a canonical health.* event into the HealEvent shape the aggregators
|
|
@@ -5040,11 +5061,12 @@ function runHeal(opts: {
|
|
|
5040
5061
|
opts.adapter &&
|
|
5041
5062
|
opts.adapter !== "claude-code" &&
|
|
5042
5063
|
opts.adapter !== "cursor" &&
|
|
5043
|
-
opts.adapter !== "codex"
|
|
5064
|
+
opts.adapter !== "codex" &&
|
|
5065
|
+
opts.adapter !== "opencode"
|
|
5044
5066
|
) {
|
|
5045
5067
|
emit.error({
|
|
5046
5068
|
code: "bad_adapter",
|
|
5047
|
-
message: "--adapter must be one of: claude-code, cursor, codex",
|
|
5069
|
+
message: "--adapter must be one of: claude-code, cursor, codex, opencode",
|
|
5048
5070
|
});
|
|
5049
5071
|
process.exit(1);
|
|
5050
5072
|
}
|
|
@@ -5215,6 +5237,13 @@ function runHeal(opts: {
|
|
|
5215
5237
|
}
|
|
5216
5238
|
|
|
5217
5239
|
if (proc.status !== 0) {
|
|
5240
|
+
const block = liveAuthorityBlockV3(root, owner);
|
|
5241
|
+
if (block) {
|
|
5242
|
+
emitHealFailure(
|
|
5243
|
+
"authority_blocked",
|
|
5244
|
+
`${describeLiveAuthorityBlockV3(block)}; a cache rebuild cannot restore authority the ledger withholds; ${liveAuthorityBlockHintV3(resolveBinName(root))}`,
|
|
5245
|
+
);
|
|
5246
|
+
}
|
|
5218
5247
|
emitHealFailure(
|
|
5219
5248
|
healFailureReason(root, owner, sessionId, healAdapter),
|
|
5220
5249
|
spawnFailureMessage(proc, `agent-coord ${action}`),
|
|
@@ -5293,7 +5322,7 @@ function cacheHealAuthorityRefusal(
|
|
|
5293
5322
|
root: string,
|
|
5294
5323
|
owner: string,
|
|
5295
5324
|
sessionId: string,
|
|
5296
|
-
adapter:
|
|
5325
|
+
adapter: Adapter,
|
|
5297
5326
|
currentRow: LiveCoordinationRow | null,
|
|
5298
5327
|
): HealAuthorityRefusal | null {
|
|
5299
5328
|
if (currentRow && normalizeAdapter(currentRow.platform) !== adapter) {
|
|
@@ -5314,7 +5343,7 @@ function cacheHealAuthorityRefusal(
|
|
|
5314
5343
|
if (producer?.terminal) {
|
|
5315
5344
|
return {
|
|
5316
5345
|
reason: "terminal_generation",
|
|
5317
|
-
message:
|
|
5346
|
+
message: `the matching generation is terminal and cannot be repaired or reopened by heal; ${lifecycleReopenHint(root)}`,
|
|
5318
5347
|
};
|
|
5319
5348
|
}
|
|
5320
5349
|
if (producer && producer.instance_id !== liveInstanceIdV3(owner)) {
|
|
@@ -5356,7 +5385,7 @@ function healFailureReason(
|
|
|
5356
5385
|
root: string,
|
|
5357
5386
|
owner: string,
|
|
5358
5387
|
sessionId: string,
|
|
5359
|
-
adapter:
|
|
5388
|
+
adapter: Adapter,
|
|
5360
5389
|
): string {
|
|
5361
5390
|
const refusal = cacheHealAuthorityRefusal(
|
|
5362
5391
|
root,
|