harnery 0.34.1 → 0.36.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/dist/commander.d.ts +30 -5
- package/dist/commander.d.ts.map +1 -1
- package/dist/commander.js +124 -94
- package/dist/commands/agents.d.ts +37 -6
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +466 -371
- package/dist/commands/backup.d.ts.map +1 -1
- package/dist/commands/backup.js +10 -10
- package/dist/commands/browse-session.d.ts.map +1 -1
- package/dist/commands/browse-session.js +12 -0
- package/dist/commands/browse.d.ts +1 -1
- package/dist/commands/browse.d.ts.map +1 -1
- package/dist/commands/browse.js +31 -6
- package/dist/commands/conversations.d.ts +10 -0
- package/dist/commands/conversations.d.ts.map +1 -0
- package/dist/commands/conversations.js +201 -0
- package/dist/commands/decision.d.ts.map +1 -1
- package/dist/commands/decision.js +2 -2
- package/dist/commands/deinit.d.ts.map +1 -1
- package/dist/commands/deinit.js +5 -0
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +13 -2
- package/dist/commands/doctor.d.ts +5 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +51 -7
- package/dist/commands/events.d.ts.map +1 -1
- package/dist/commands/events.js +18 -1
- package/dist/commands/fetch.js +6 -5
- package/dist/commands/files.d.ts +22 -0
- package/dist/commands/files.d.ts.map +1 -0
- package/dist/commands/files.js +113 -0
- package/dist/commands/governor.js +14 -12
- package/dist/commands/inbox.d.ts +5 -0
- package/dist/commands/inbox.d.ts.map +1 -0
- package/dist/commands/inbox.js +57 -0
- package/dist/commands/init.d.ts +4 -5
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +63 -13
- package/dist/commands/ledger-v3.d.ts.map +1 -1
- package/dist/commands/ledger-v3.js +347 -1
- package/dist/commands/logs.d.ts +4 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +169 -0
- package/dist/commands/messages.d.ts +5 -0
- package/dist/commands/messages.d.ts.map +1 -0
- package/dist/commands/messages.js +45 -0
- package/dist/commands/outline.d.ts +1 -1
- package/dist/commands/outline.d.ts.map +1 -1
- package/dist/commands/outline.js +2 -2
- package/dist/commands/presence.d.ts.map +1 -1
- package/dist/commands/presence.js +2 -2
- package/dist/commands/read.d.ts +1 -1
- package/dist/commands/read.d.ts.map +1 -1
- package/dist/commands/read.js +2 -2
- package/dist/commands/semantic.d.ts +4 -0
- package/dist/commands/semantic.d.ts.map +1 -0
- package/dist/commands/semantic.js +199 -0
- package/dist/commands/storage.d.ts +4 -0
- package/dist/commands/storage.d.ts.map +1 -0
- package/dist/commands/storage.js +238 -0
- package/dist/commands/tunnel.d.ts +5 -1
- package/dist/commands/tunnel.d.ts.map +1 -1
- package/dist/commands/tunnel.js +44 -31
- package/dist/commands/web.d.ts +3 -0
- package/dist/commands/web.d.ts.map +1 -1
- package/dist/commands/web.js +84 -7
- package/dist/commands/work.js +3 -3
- package/dist/commands/workflow.js +13 -13
- package/dist/core/adapters/profiles.d.ts +1 -1
- package/dist/core/agents/canonical-emit.d.ts +3 -0
- package/dist/core/agents/canonical-emit.d.ts.map +1 -1
- package/dist/core/agents/canonical-emit.js +12 -0
- package/dist/core/agents/claim-path.d.ts +11 -0
- package/dist/core/agents/claim-path.d.ts.map +1 -0
- package/dist/core/agents/claim-path.js +22 -0
- package/dist/core/agents/cli.js +209 -39
- package/dist/core/agents/coord-client.d.ts +29 -3
- package/dist/core/agents/coord-client.d.ts.map +1 -1
- package/dist/core/agents/coord-client.js +88 -9
- package/dist/core/agents/live-authority-v3.d.ts +47 -1
- package/dist/core/agents/live-authority-v3.d.ts.map +1 -1
- package/dist/core/agents/live-authority-v3.js +245 -13
- package/dist/core/agents/live-lifecycle-v3.js +9 -4
- package/dist/core/agents/live-observation-v3.d.ts.map +1 -1
- package/dist/core/agents/live-observation-v3.js +8 -3
- package/dist/core/agents/render/prompt-context.d.ts +9 -3
- package/dist/core/agents/render/prompt-context.d.ts.map +1 -1
- package/dist/core/agents/render/prompt-context.js +36 -17
- 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 +115 -22
- package/dist/core/agents/rules/verdict.d.ts +1 -0
- package/dist/core/agents/rules/verdict.d.ts.map +1 -1
- package/dist/core/agents/session-events.d.ts.map +1 -1
- package/dist/core/agents/session-events.js +4 -0
- package/dist/core/agents/session-finalization-state-v3.js +1 -1
- package/dist/core/agents/session-finalizer-v3.js +5 -1
- package/dist/core/agents/session-name-display.d.ts +1 -0
- package/dist/core/agents/session-name-display.d.ts.map +1 -1
- package/dist/core/agents/session-name-display.js +8 -1
- package/dist/core/agents/state/activity-log.d.ts +3 -0
- package/dist/core/agents/state/activity-log.d.ts.map +1 -1
- package/dist/core/agents/state/activity-log.js +6 -3
- package/dist/core/agents/state/heartbeat-reader.d.ts +46 -0
- package/dist/core/agents/state/heartbeat-reader.d.ts.map +1 -0
- package/dist/core/agents/state/heartbeat-reader.js +25 -0
- package/dist/core/agents/state/heartbeat-writer.d.ts +9 -48
- package/dist/core/agents/state/heartbeat-writer.d.ts.map +1 -1
- package/dist/core/agents/state/heartbeat-writer.js +34 -34
- package/dist/core/agents/state/live-coordination-view.d.ts +6 -8
- package/dist/core/agents/state/live-coordination-view.d.ts.map +1 -1
- package/dist/core/agents/state/live-coordination-view.js +16 -67
- package/dist/core/agents/state/live-coordination-writer.d.ts +12 -0
- package/dist/core/agents/state/live-coordination-writer.d.ts.map +1 -0
- package/dist/core/agents/state/live-coordination-writer.js +92 -0
- package/dist/core/agents/state/names.d.ts +9 -1
- package/dist/core/agents/state/names.d.ts.map +1 -1
- package/dist/core/agents/state/names.js +190 -182
- package/dist/core/agents/state/stale-sweep.d.ts.map +1 -1
- package/dist/core/agents/state/stale-sweep.js +23 -5
- package/dist/core/artifacts/constants.d.ts +5 -0
- package/dist/core/artifacts/constants.d.ts.map +1 -0
- package/dist/core/artifacts/constants.js +4 -0
- package/dist/core/artifacts/index.d.ts +24 -3
- package/dist/core/artifacts/index.d.ts.map +1 -1
- package/dist/core/artifacts/index.js +96 -8
- package/dist/core/config.d.ts +62 -4
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +98 -4
- package/dist/core/conversations/archive.d.ts +49 -0
- package/dist/core/conversations/archive.d.ts.map +1 -0
- package/dist/core/conversations/archive.js +136 -0
- package/dist/core/conversations/catalog.d.ts +10 -0
- package/dist/core/conversations/catalog.d.ts.map +1 -0
- package/dist/core/conversations/catalog.js +72 -0
- package/dist/core/conversations/context-pack.d.ts +6 -0
- package/dist/core/conversations/context-pack.d.ts.map +1 -0
- package/dist/core/conversations/context-pack.js +60 -0
- package/dist/core/conversations/contract.d.ts +155 -0
- package/dist/core/conversations/contract.d.ts.map +1 -0
- package/dist/core/conversations/contract.js +1 -0
- package/dist/core/conversations/evaluation.d.ts +16 -0
- package/dist/core/conversations/evaluation.d.ts.map +1 -0
- package/dist/core/conversations/evaluation.js +9 -0
- package/dist/core/conversations/index.d.ts +10 -0
- package/dist/core/conversations/index.d.ts.map +1 -0
- package/dist/core/conversations/index.js +9 -0
- package/dist/core/conversations/lifecycle.d.ts +28 -0
- package/dist/core/conversations/lifecycle.d.ts.map +1 -0
- package/dist/core/conversations/lifecycle.js +29 -0
- package/dist/core/conversations/normalize.d.ts +14 -0
- package/dist/core/conversations/normalize.d.ts.map +1 -0
- package/dist/core/conversations/normalize.js +82 -0
- package/dist/core/conversations/query.d.ts +8 -0
- package/dist/core/conversations/query.d.ts.map +1 -0
- package/dist/core/conversations/query.js +280 -0
- package/dist/core/conversations/search-index.d.ts +9 -0
- package/dist/core/conversations/search-index.d.ts.map +1 -0
- package/dist/core/conversations/search-index.js +29 -0
- package/dist/core/events/legacy-storage/canary.d.ts +18 -0
- package/dist/core/events/legacy-storage/canary.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/canary.js +150 -0
- package/dist/core/events/legacy-storage/fence.d.ts +15 -0
- package/dist/core/events/legacy-storage/fence.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/fence.js +115 -0
- package/dist/core/events/legacy-storage/index.d.ts +6 -0
- package/dist/core/events/legacy-storage/index.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/index.js +5 -0
- package/dist/core/events/legacy-storage/inventory.d.ts +10 -0
- package/dist/core/events/legacy-storage/inventory.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/inventory.js +40 -0
- package/dist/core/events/legacy-storage/manifest.d.ts +23 -0
- package/dist/core/events/legacy-storage/manifest.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/manifest.js +108 -0
- package/dist/core/events/legacy-storage/reader.d.ts +15 -0
- package/dist/core/events/legacy-storage/reader.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/reader.js +154 -0
- package/dist/core/events/v3/authority-outbox.d.ts +7 -2
- package/dist/core/events/v3/authority-outbox.d.ts.map +1 -1
- package/dist/core/events/v3/authority-outbox.js +16 -3
- package/dist/core/events/v3/base-contract.d.ts +851 -16
- package/dist/core/events/v3/base-contract.d.ts.map +1 -1
- package/dist/core/events/v3/base-contract.js +50 -7
- package/dist/core/events/v3/bootstrap.d.ts +39 -0
- package/dist/core/events/v3/bootstrap.d.ts.map +1 -1
- package/dist/core/events/v3/bootstrap.js +167 -3
- package/dist/core/events/v3/capabilities.d.ts +11 -0
- package/dist/core/events/v3/capabilities.d.ts.map +1 -1
- package/dist/core/events/v3/capabilities.js +26 -3
- package/dist/core/events/v3/control-witness.d.ts +44 -0
- package/dist/core/events/v3/control-witness.d.ts.map +1 -0
- package/dist/core/events/v3/control-witness.js +233 -0
- package/dist/core/events/v3/control-writer.d.ts +4 -0
- package/dist/core/events/v3/control-writer.d.ts.map +1 -0
- package/dist/core/events/v3/control-writer.js +16 -0
- package/dist/core/events/v3/control.d.ts +8 -2
- package/dist/core/events/v3/control.d.ts.map +1 -1
- package/dist/core/events/v3/control.js +46 -18
- package/dist/core/events/v3/coordination-transaction-recovery.d.ts +42 -0
- package/dist/core/events/v3/coordination-transaction-recovery.d.ts.map +1 -0
- package/dist/core/events/v3/coordination-transaction-recovery.js +342 -0
- package/dist/core/events/v3/coordination-view.d.ts.map +1 -1
- package/dist/core/events/v3/coordination-view.js +16 -1
- package/dist/core/events/v3/generated.d.ts +1 -1
- package/dist/core/events/v3/generated.js +1 -1
- package/dist/core/events/v3/index.d.ts +8 -5
- package/dist/core/events/v3/index.d.ts.map +1 -1
- package/dist/core/events/v3/index.js +7 -4
- package/dist/core/events/v3/latency.d.ts +31 -1
- package/dist/core/events/v3/latency.d.ts.map +1 -1
- package/dist/core/events/v3/latency.js +127 -3
- package/dist/core/events/v3/live-route-observer.d.ts +31 -0
- package/dist/core/events/v3/live-route-observer.d.ts.map +1 -0
- package/dist/core/events/v3/live-route-observer.js +58 -0
- package/dist/core/events/v3/live-routing.d.ts +42 -20
- package/dist/core/events/v3/live-routing.d.ts.map +1 -1
- package/dist/core/events/v3/live-routing.js +153 -41
- package/dist/core/events/v3/producers/command-recorder.d.ts.map +1 -1
- package/dist/core/events/v3/producers/command-recorder.js +10 -1
- package/dist/core/events/v3/producers/coordination-recorder.d.ts +11 -1
- package/dist/core/events/v3/producers/coordination-recorder.d.ts.map +1 -1
- package/dist/core/events/v3/producers/coordination-recorder.js +90 -13
- package/dist/core/events/v3/producers/diagnostic-summaries.d.ts +129 -0
- package/dist/core/events/v3/producers/diagnostic-summaries.d.ts.map +1 -0
- package/dist/core/events/v3/producers/diagnostic-summaries.js +499 -0
- package/dist/core/events/v3/producers/hook-base.d.ts +17 -1
- package/dist/core/events/v3/producers/hook-base.d.ts.map +1 -1
- package/dist/core/events/v3/producers/hook-base.js +83 -2
- package/dist/core/events/v3/producers/intake.d.ts +13 -0
- package/dist/core/events/v3/producers/intake.d.ts.map +1 -1
- package/dist/core/events/v3/producers/intake.js +36 -2
- package/dist/core/events/v3/producers/producer-state-observer.d.ts +8 -0
- package/dist/core/events/v3/producers/producer-state-observer.d.ts.map +1 -0
- package/dist/core/events/v3/producers/producer-state-observer.js +45 -0
- package/dist/core/events/v3/producers/recorder.d.ts +117 -1
- package/dist/core/events/v3/producers/recorder.d.ts.map +1 -1
- package/dist/core/events/v3/producers/recorder.js +992 -27
- package/dist/core/events/v3/reader.d.ts +51 -0
- package/dist/core/events/v3/reader.d.ts.map +1 -1
- package/dist/core/events/v3/reader.js +181 -1
- package/dist/core/events/v3/rotation-config.d.ts +9 -0
- package/dist/core/events/v3/rotation-config.d.ts.map +1 -0
- package/dist/core/events/v3/rotation-config.js +91 -0
- package/dist/core/events/v3/runtime-build.d.ts +11 -0
- package/dist/core/events/v3/runtime-build.d.ts.map +1 -0
- package/dist/core/events/v3/runtime-build.js +39 -0
- package/dist/core/events/v3/runtime-identity.d.ts +5 -0
- package/dist/core/events/v3/runtime-identity.d.ts.map +1 -0
- package/dist/core/events/v3/runtime-identity.js +18 -0
- package/dist/core/events/v3/runtime-telemetry-capabilities.d.ts +52 -0
- package/dist/core/events/v3/runtime-telemetry-capabilities.d.ts.map +1 -0
- package/dist/core/events/v3/runtime-telemetry-capabilities.js +54 -0
- package/dist/core/events/v3/support-storage/classify.d.ts +46 -0
- package/dist/core/events/v3/support-storage/classify.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/classify.js +149 -0
- package/dist/core/events/v3/support-storage/eligibility.d.ts +29 -0
- package/dist/core/events/v3/support-storage/eligibility.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/eligibility.js +35 -0
- package/dist/core/events/v3/support-storage/index.d.ts +10 -0
- package/dist/core/events/v3/support-storage/index.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/index.js +9 -0
- package/dist/core/events/v3/support-storage/inventory.d.ts +30 -0
- package/dist/core/events/v3/support-storage/inventory.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/inventory.js +94 -0
- package/dist/core/events/v3/support-storage/logical-authority.d.ts +14 -0
- package/dist/core/events/v3/support-storage/logical-authority.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/logical-authority.js +104 -0
- package/dist/core/events/v3/support-storage/maintenance.d.ts +98 -0
- package/dist/core/events/v3/support-storage/maintenance.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/maintenance.js +352 -0
- package/dist/core/events/v3/support-storage/pack-contract.d.ts +59 -0
- package/dist/core/events/v3/support-storage/pack-contract.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/pack-contract.js +249 -0
- package/dist/core/events/v3/support-storage/pack-reader.d.ts +34 -0
- package/dist/core/events/v3/support-storage/pack-reader.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/pack-reader.js +258 -0
- package/dist/core/events/v3/support-storage/pack-writer.d.ts +30 -0
- package/dist/core/events/v3/support-storage/pack-writer.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/pack-writer.js +268 -0
- package/dist/core/events/v3/support-storage/recovery.d.ts +15 -0
- package/dist/core/events/v3/support-storage/recovery.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/recovery.js +22 -0
- package/dist/core/events/v3/turn-telemetry.d.ts +21 -6
- package/dist/core/events/v3/turn-telemetry.d.ts.map +1 -1
- package/dist/core/events/v3/turn-telemetry.js +32 -2
- package/dist/core/events/v3/writer.d.ts +13 -1
- package/dist/core/events/v3/writer.d.ts.map +1 -1
- package/dist/core/events/v3/writer.js +126 -12
- package/dist/core/governor/plan-read.d.ts.map +1 -1
- package/dist/core/governor/plan-read.js +5 -21
- package/dist/core/governor/planning.js +6 -8
- package/dist/core/governor/service-read.d.ts +12 -0
- package/dist/core/governor/service-read.d.ts.map +1 -1
- package/dist/core/governor/service-read.js +266 -2
- package/dist/core/governor/service.d.ts +1 -0
- package/dist/core/governor/service.d.ts.map +1 -1
- package/dist/core/governor/service.js +53 -18
- package/dist/core/guard/evidence-v3.d.ts.map +1 -1
- package/dist/core/guard/evidence-v3.js +2 -0
- package/dist/core/hooks/adapter/events.d.ts.map +1 -1
- package/dist/core/hooks/adapter/events.js +1 -0
- package/dist/core/hooks/adapter/output.d.ts +4 -2
- package/dist/core/hooks/adapter/output.d.ts.map +1 -1
- package/dist/core/hooks/adapter/output.js +13 -5
- package/dist/core/hooks/adapter/parse.d.ts +3 -0
- package/dist/core/hooks/adapter/parse.d.ts.map +1 -1
- package/dist/core/hooks/adapter/parse.js +14 -0
- package/dist/core/hooks/adapter/runtime-telemetry.d.ts +142 -0
- package/dist/core/hooks/adapter/runtime-telemetry.d.ts.map +1 -0
- package/dist/core/hooks/adapter/runtime-telemetry.js +869 -0
- package/dist/core/hooks/cli.js +318 -61
- package/dist/core/hooks/effects/image-capture.d.ts +1 -1
- package/dist/core/hooks/effects/image-capture.d.ts.map +1 -1
- package/dist/core/hooks/effects/image-capture.js +4 -2
- package/dist/core/hooks/remediation-cap.d.ts +39 -0
- package/dist/core/hooks/remediation-cap.d.ts.map +1 -0
- package/dist/core/hooks/remediation-cap.js +63 -0
- package/dist/core/hooks/resolve/coord-root.d.ts +22 -9
- package/dist/core/hooks/resolve/coord-root.d.ts.map +1 -1
- package/dist/core/hooks/resolve/coord-root.js +92 -11
- package/dist/core/hooks/resolve/owner.d.ts.map +1 -1
- package/dist/core/hooks/resolve/owner.js +5 -0
- package/dist/core/hooks/resolve/transcript.d.ts +33 -9
- package/dist/core/hooks/resolve/transcript.d.ts.map +1 -1
- package/dist/core/hooks/resolve/transcript.js +33 -10
- package/dist/core/inbox/contract.d.ts +64 -0
- package/dist/core/inbox/contract.d.ts.map +1 -0
- package/dist/core/inbox/contract.js +13 -0
- package/dist/core/inbox/index.d.ts +5 -0
- package/dist/core/inbox/index.d.ts.map +1 -0
- package/dist/core/inbox/index.js +4 -0
- package/dist/core/inbox/lifecycle.d.ts +22 -0
- package/dist/core/inbox/lifecycle.d.ts.map +1 -0
- package/dist/core/inbox/lifecycle.js +41 -0
- package/dist/core/inbox/service.d.ts +36 -0
- package/dist/core/inbox/service.d.ts.map +1 -0
- package/dist/core/inbox/service.js +210 -0
- package/dist/core/inbox/watcher.d.ts +7 -0
- package/dist/core/inbox/watcher.d.ts.map +1 -0
- package/dist/core/inbox/watcher.js +26 -0
- package/dist/core/presence/codec-digest.d.ts.map +1 -1
- package/dist/core/presence/codec-digest.js +14 -3
- package/dist/core/presence/relay-client.d.ts +1 -0
- package/dist/core/presence/relay-client.d.ts.map +1 -1
- package/dist/core/presence/relay-client.js +52 -8
- package/dist/core/semantic/adapters.d.ts +37 -0
- package/dist/core/semantic/adapters.d.ts.map +1 -0
- package/dist/core/semantic/adapters.js +360 -0
- package/dist/core/semantic/contract.d.ts +1072 -0
- package/dist/core/semantic/contract.d.ts.map +1 -0
- package/dist/core/semantic/contract.js +331 -0
- package/dist/core/semantic/evidence.d.ts +11 -0
- package/dist/core/semantic/evidence.d.ts.map +1 -0
- package/dist/core/semantic/evidence.js +262 -0
- package/dist/core/semantic/index.d.ts +14 -0
- package/dist/core/semantic/index.d.ts.map +1 -0
- package/dist/core/semantic/index.js +13 -0
- package/dist/core/semantic/once.d.ts +38 -0
- package/dist/core/semantic/once.d.ts.map +1 -0
- package/dist/core/semantic/once.js +364 -0
- package/dist/core/semantic/prompt.d.ts +12 -0
- package/dist/core/semantic/prompt.d.ts.map +1 -0
- package/dist/core/semantic/prompt.js +83 -0
- package/dist/core/semantic/review.d.ts +144 -0
- package/dist/core/semantic/review.d.ts.map +1 -0
- package/dist/core/semantic/review.js +544 -0
- package/dist/core/semantic/routes.d.ts +10 -0
- package/dist/core/semantic/routes.d.ts.map +1 -0
- package/dist/core/semantic/routes.js +21 -0
- package/dist/core/semantic/scheduler.d.ts +27 -0
- package/dist/core/semantic/scheduler.d.ts.map +1 -0
- package/dist/core/semantic/scheduler.js +91 -0
- package/dist/core/semantic/service-status.d.ts +51 -0
- package/dist/core/semantic/service-status.d.ts.map +1 -0
- package/dist/core/semantic/service-status.js +140 -0
- package/dist/core/semantic/service.d.ts +52 -0
- package/dist/core/semantic/service.d.ts.map +1 -0
- package/dist/core/semantic/service.js +559 -0
- package/dist/core/semantic/soak.d.ts +75 -0
- package/dist/core/semantic/soak.d.ts.map +1 -0
- package/dist/core/semantic/soak.js +476 -0
- package/dist/core/semantic/storage.d.ts +81 -0
- package/dist/core/semantic/storage.d.ts.map +1 -0
- package/dist/core/semantic/storage.js +180 -0
- package/dist/core/semantic/usage.d.ts +43 -0
- package/dist/core/semantic/usage.d.ts.map +1 -0
- package/dist/core/semantic/usage.js +193 -0
- package/dist/core/semantic/validate.d.ts +18 -0
- package/dist/core/semantic/validate.d.ts.map +1 -0
- package/dist/core/semantic/validate.js +207 -0
- package/dist/core/storage/buffer.d.ts +28 -0
- package/dist/core/storage/buffer.d.ts.map +1 -0
- package/dist/core/storage/buffer.js +101 -0
- package/dist/core/storage/builtins.d.ts +3 -0
- package/dist/core/storage/builtins.d.ts.map +1 -0
- package/dist/core/storage/builtins.js +683 -0
- package/dist/core/storage/catalog.d.ts +19 -0
- package/dist/core/storage/catalog.d.ts.map +1 -0
- package/dist/core/storage/catalog.js +365 -0
- package/dist/core/storage/config.d.ts +16 -0
- package/dist/core/storage/config.d.ts.map +1 -0
- package/dist/core/storage/config.js +311 -0
- package/dist/core/storage/contract.d.ts +275 -0
- package/dist/core/storage/contract.d.ts.map +1 -0
- package/dist/core/storage/contract.js +3 -0
- package/dist/core/storage/durable-history.d.ts +36 -0
- package/dist/core/storage/durable-history.d.ts.map +1 -0
- package/dist/core/storage/durable-history.js +606 -0
- package/dist/core/storage/health.d.ts +4 -0
- package/dist/core/storage/health.d.ts.map +1 -0
- package/dist/core/storage/health.js +65 -0
- package/dist/core/storage/index.d.ts +16 -0
- package/dist/core/storage/index.d.ts.map +1 -0
- package/dist/core/storage/index.js +15 -0
- package/dist/core/storage/inventory.d.ts +25 -0
- package/dist/core/storage/inventory.d.ts.map +1 -0
- package/dist/core/storage/inventory.js +666 -0
- package/dist/core/storage/jsonl.d.ts +52 -0
- package/dist/core/storage/jsonl.d.ts.map +1 -0
- package/dist/core/storage/jsonl.js +156 -0
- package/dist/core/storage/log-retention.d.ts +52 -0
- package/dist/core/storage/log-retention.d.ts.map +1 -0
- package/dist/core/storage/log-retention.js +419 -0
- package/dist/core/storage/logger.d.ts +82 -0
- package/dist/core/storage/logger.d.ts.map +1 -0
- package/dist/core/storage/logger.js +411 -0
- package/dist/core/storage/maintenance-providers.d.ts +26 -0
- package/dist/core/storage/maintenance-providers.d.ts.map +1 -0
- package/dist/core/storage/maintenance-providers.js +141 -0
- package/dist/core/storage/maintenance.d.ts +125 -0
- package/dist/core/storage/maintenance.d.ts.map +1 -0
- package/dist/core/storage/maintenance.js +609 -0
- package/dist/core/storage/metrics.d.ts +60 -0
- package/dist/core/storage/metrics.d.ts.map +1 -0
- package/dist/core/storage/metrics.js +134 -0
- package/dist/core/storage/policy.d.ts +7 -0
- package/dist/core/storage/policy.d.ts.map +1 -0
- package/dist/core/storage/policy.js +110 -0
- package/dist/core/storage/process-log.d.ts +38 -0
- package/dist/core/storage/process-log.d.ts.map +1 -0
- package/dist/core/storage/process-log.js +165 -0
- package/dist/core/storage/query.d.ts +34 -0
- package/dist/core/storage/query.d.ts.map +1 -0
- package/dist/core/storage/query.js +295 -0
- package/dist/core/storage/receipts.d.ts +23 -0
- package/dist/core/storage/receipts.d.ts.map +1 -0
- package/dist/core/storage/receipts.js +117 -0
- package/dist/core/storage/segments.d.ts +84 -0
- package/dist/core/storage/segments.d.ts.map +1 -0
- package/dist/core/storage/segments.js +542 -0
- package/dist/core/storage/sink-graph.d.ts +65 -0
- package/dist/core/storage/sink-graph.d.ts.map +1 -0
- package/dist/core/storage/sink-graph.js +213 -0
- package/dist/core/storage/storm-control.d.ts +23 -0
- package/dist/core/storage/storm-control.d.ts.map +1 -0
- package/dist/core/storage/storm-control.js +59 -0
- package/dist/core/work/state.d.ts.map +1 -1
- package/dist/core/work/state.js +10 -14
- package/dist/core/workflow/live-session-v3.d.ts.map +1 -1
- package/dist/core/workflow/live-session-v3.js +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/lazy-commands.d.ts +26 -0
- package/dist/lazy-commands.d.ts.map +1 -0
- package/dist/lazy-commands.js +210 -0
- package/dist/lib/browser/client.d.ts +11 -0
- package/dist/lib/browser/client.d.ts.map +1 -1
- package/dist/lib/browser/client.js +13 -0
- package/dist/lib/browser/index.d.ts +1 -0
- package/dist/lib/browser/index.d.ts.map +1 -1
- package/dist/lib/browser/standalone-html.d.ts +25 -0
- package/dist/lib/browser/standalone-html.d.ts.map +1 -0
- package/dist/lib/browser/standalone-html.js +284 -0
- package/dist/lib/docs-lint.d.ts +2 -0
- package/dist/lib/docs-lint.d.ts.map +1 -1
- package/dist/lib/docs-lint.js +45 -80
- package/dist/lib/docs-metadata-audit.d.ts +3 -0
- package/dist/lib/docs-metadata-audit.d.ts.map +1 -1
- package/dist/lib/docs-metadata-audit.js +13 -23
- package/dist/lib/docs-metadata-sync.d.ts +1 -0
- package/dist/lib/docs-metadata-sync.d.ts.map +1 -1
- package/dist/lib/docs-metadata-sync.js +28 -10
- package/dist/lib/docs-repository-view.d.ts +22 -0
- package/dist/lib/docs-repository-view.d.ts.map +1 -0
- package/dist/lib/docs-repository-view.js +185 -0
- package/dist/lib/http/client.d.ts +11 -5
- package/dist/lib/http/client.d.ts.map +1 -1
- package/dist/lib/http/client.js +22 -4
- package/dist/lib/http/index.d.ts +1 -1
- package/dist/lib/http/index.d.ts.map +1 -1
- package/dist/lib/http/index.js +1 -1
- package/dist/lib/indexer-exclusions.d.ts +27 -0
- package/dist/lib/indexer-exclusions.d.ts.map +1 -0
- package/dist/lib/indexer-exclusions.js +176 -0
- package/dist/lib/instructions/apply.d.ts.map +1 -1
- package/dist/lib/instructions/apply.js +1 -0
- package/dist/lib/instructions/templates.d.ts +2 -0
- package/dist/lib/instructions/templates.d.ts.map +1 -1
- package/dist/lib/instructions/templates.js +149 -4
- package/dist/lib/local-file-url.d.ts +9 -0
- package/dist/lib/local-file-url.d.ts.map +1 -0
- package/dist/lib/local-file-url.js +20 -0
- package/dist/lib/web-performance.d.ts +118 -0
- package/dist/lib/web-performance.d.ts.map +1 -0
- package/dist/lib/web-performance.js +192 -0
- package/package.json +34 -2
- package/schemas/config.schema.json +58 -0
- package/schemas/event-v3.schema.json +3073 -581
- package/src/commander.ts +462 -93
- package/src/commands/agents.ts +617 -355
- package/src/commands/backup.ts +18 -14
- package/src/commands/browse-session.ts +12 -0
- package/src/commands/browse.ts +31 -9
- package/src/commands/conversations.ts +279 -0
- package/src/commands/decision.ts +8 -2
- package/src/commands/deinit.ts +6 -0
- package/src/commands/docs.ts +25 -6
- package/src/commands/doctor.ts +75 -9
- package/src/commands/events.ts +21 -1
- package/src/commands/fetch.ts +7 -6
- package/src/commands/files.ts +143 -0
- package/src/commands/governor.ts +13 -12
- package/src/commands/inbox.ts +61 -0
- package/src/commands/init.ts +78 -16
- package/src/commands/ledger-v3.ts +421 -1
- package/src/commands/logs.ts +224 -0
- package/src/commands/messages.ts +61 -0
- package/src/commands/outline.ts +6 -2
- package/src/commands/presence.ts +7 -2
- package/src/commands/read.ts +6 -2
- package/src/commands/semantic.ts +244 -0
- package/src/commands/storage.ts +310 -0
- package/src/commands/tunnel.ts +66 -52
- package/src/commands/web.ts +92 -7
- package/src/commands/work.ts +3 -3
- package/src/commands/workflow.ts +13 -13
- package/src/core/agents/canonical-emit.ts +15 -0
- package/src/core/agents/claim-path.ts +23 -0
- package/src/core/agents/cli.ts +259 -53
- package/src/core/agents/coord-client.ts +92 -8
- package/src/core/agents/live-authority-v3.ts +342 -14
- package/src/core/agents/live-lifecycle-v3.ts +14 -4
- package/src/core/agents/live-observation-v3.ts +13 -3
- package/src/core/agents/render/prompt-context.ts +40 -16
- package/src/core/agents/rules/stop-hook.ts +129 -25
- package/src/core/agents/rules/verdict.ts +1 -0
- package/src/core/agents/session-events.ts +4 -0
- package/src/core/agents/session-finalization-state-v3.ts +1 -1
- package/src/core/agents/session-finalizer-v3.ts +4 -1
- package/src/core/agents/session-name-display.ts +9 -1
- package/src/core/agents/state/activity-log.ts +7 -2
- package/src/core/agents/state/heartbeat-reader.ts +69 -0
- package/src/core/agents/state/heartbeat-writer.ts +47 -84
- package/src/core/agents/state/live-coordination-view.ts +17 -81
- package/src/core/agents/state/live-coordination-writer.ts +141 -0
- package/src/core/agents/state/names.ts +190 -182
- package/src/core/agents/state/stale-sweep.ts +25 -5
- package/src/core/artifacts/constants.ts +4 -0
- package/src/core/artifacts/index.ts +113 -8
- package/src/core/config.ts +126 -5
- package/src/core/conversations/archive.ts +237 -0
- package/src/core/conversations/catalog.ts +79 -0
- package/src/core/conversations/context-pack.ts +72 -0
- package/src/core/conversations/contract.ts +178 -0
- package/src/core/conversations/evaluation.ts +30 -0
- package/src/core/conversations/index.ts +9 -0
- package/src/core/conversations/lifecycle.ts +63 -0
- package/src/core/conversations/normalize.ts +105 -0
- package/src/core/conversations/query.ts +318 -0
- package/src/core/conversations/search-index.ts +48 -0
- package/src/core/events/legacy-storage/canary.ts +177 -0
- package/src/core/events/legacy-storage/fence.ts +129 -0
- package/src/core/events/legacy-storage/index.ts +5 -0
- package/src/core/events/legacy-storage/inventory.ts +51 -0
- package/src/core/events/legacy-storage/manifest.ts +136 -0
- package/src/core/events/legacy-storage/reader.ts +178 -0
- package/src/core/events/v3/authority-outbox.ts +22 -1
- package/src/core/events/v3/base-contract.ts +56 -7
- package/src/core/events/v3/bootstrap.ts +195 -2
- package/src/core/events/v3/capabilities.ts +37 -3
- package/src/core/events/v3/control-witness.ts +339 -0
- package/src/core/events/v3/control-writer.ts +16 -0
- package/src/core/events/v3/control.ts +54 -18
- package/src/core/events/v3/coordination-transaction-recovery.ts +477 -0
- package/src/core/events/v3/coordination-view.ts +17 -1
- package/src/core/events/v3/generated.ts +1 -1
- package/src/core/events/v3/index.ts +26 -2
- package/src/core/events/v3/latency.ts +213 -2
- package/src/core/events/v3/live-route-observer.ts +80 -0
- package/src/core/events/v3/live-routing.ts +182 -45
- package/src/core/events/v3/producers/command-recorder.ts +10 -1
- package/src/core/events/v3/producers/coordination-recorder.ts +112 -15
- package/src/core/events/v3/producers/diagnostic-summaries.ts +593 -0
- package/src/core/events/v3/producers/hook-base.ts +116 -2
- package/src/core/events/v3/producers/intake.ts +48 -2
- package/src/core/events/v3/producers/producer-state-observer.ts +52 -0
- package/src/core/events/v3/producers/recorder.ts +1403 -30
- package/src/core/events/v3/reader.ts +243 -2
- package/src/core/events/v3/rotation-config.ts +98 -0
- package/src/core/events/v3/runtime-build.ts +41 -0
- package/src/core/events/v3/runtime-identity.ts +16 -0
- package/src/core/events/v3/runtime-telemetry-capabilities.ts +143 -0
- package/src/core/events/v3/support-storage/classify.ts +209 -0
- package/src/core/events/v3/support-storage/eligibility.ts +58 -0
- package/src/core/events/v3/support-storage/index.ts +9 -0
- package/src/core/events/v3/support-storage/inventory.ts +135 -0
- package/src/core/events/v3/support-storage/logical-authority.ts +117 -0
- package/src/core/events/v3/support-storage/maintenance.ts +501 -0
- package/src/core/events/v3/support-storage/pack-contract.ts +337 -0
- package/src/core/events/v3/support-storage/pack-reader.ts +346 -0
- package/src/core/events/v3/support-storage/pack-writer.ts +352 -0
- package/src/core/events/v3/support-storage/recovery.ts +43 -0
- package/src/core/events/v3/turn-telemetry.ts +66 -5
- package/src/core/events/v3/writer.ts +168 -16
- package/src/core/governor/plan-read.ts +5 -18
- package/src/core/governor/planning.ts +5 -8
- package/src/core/governor/service-read.ts +320 -2
- package/src/core/governor/service.ts +49 -22
- package/src/core/guard/evidence-v3.ts +1 -0
- package/src/core/hooks/adapter/events.ts +1 -0
- package/src/core/hooks/adapter/output.ts +12 -5
- package/src/core/hooks/adapter/parse.ts +16 -0
- package/src/core/hooks/adapter/runtime-telemetry.ts +1200 -0
- package/src/core/hooks/cli.ts +342 -64
- package/src/core/hooks/effects/image-capture.ts +4 -1
- package/src/core/hooks/remediation-cap.ts +83 -0
- package/src/core/hooks/resolve/coord-root.ts +91 -11
- package/src/core/hooks/resolve/owner.ts +4 -0
- package/src/core/hooks/resolve/transcript.ts +55 -11
- package/src/core/inbox/contract.ts +81 -0
- package/src/core/inbox/index.ts +4 -0
- package/src/core/inbox/lifecycle.ts +104 -0
- package/src/core/inbox/service.ts +305 -0
- package/src/core/inbox/watcher.ts +36 -0
- package/src/core/presence/codec-digest.ts +15 -9
- package/src/core/presence/relay-client.ts +55 -7
- package/src/core/semantic/adapters.ts +452 -0
- package/src/core/semantic/contract.ts +430 -0
- package/src/core/semantic/evidence.ts +336 -0
- package/src/core/semantic/index.ts +201 -0
- package/src/core/semantic/once.ts +496 -0
- package/src/core/semantic/prompt.ts +96 -0
- package/src/core/semantic/review.ts +803 -0
- package/src/core/semantic/routes.ts +30 -0
- package/src/core/semantic/scheduler.ts +151 -0
- package/src/core/semantic/service-status.ts +212 -0
- package/src/core/semantic/service.ts +681 -0
- package/src/core/semantic/soak.ts +638 -0
- package/src/core/semantic/storage.ts +300 -0
- package/src/core/semantic/usage.ts +272 -0
- package/src/core/semantic/validate.ts +243 -0
- package/src/core/storage/buffer.ts +124 -0
- package/src/core/storage/builtins.ts +916 -0
- package/src/core/storage/catalog.ts +467 -0
- package/src/core/storage/config.ts +423 -0
- package/src/core/storage/contract.ts +342 -0
- package/src/core/storage/durable-history.ts +738 -0
- package/src/core/storage/health.ts +76 -0
- package/src/core/storage/index.ts +15 -0
- package/src/core/storage/inventory.ts +859 -0
- package/src/core/storage/jsonl.ts +213 -0
- package/src/core/storage/log-retention.ts +555 -0
- package/src/core/storage/logger.ts +546 -0
- package/src/core/storage/maintenance-providers.ts +200 -0
- package/src/core/storage/maintenance.ts +929 -0
- package/src/core/storage/metrics.ts +199 -0
- package/src/core/storage/policy.ts +141 -0
- package/src/core/storage/process-log.ts +203 -0
- package/src/core/storage/query.ts +360 -0
- package/src/core/storage/receipts.ts +162 -0
- package/src/core/storage/segments.ts +721 -0
- package/src/core/storage/sink-graph.ts +343 -0
- package/src/core/storage/storm-control.ts +91 -0
- package/src/core/work/state.ts +12 -21
- package/src/core/workflow/live-session-v3.ts +2 -4
- package/src/index.ts +2 -0
- package/src/lazy-commands.ts +294 -0
- package/src/lib/browser/client.ts +21 -0
- package/src/lib/browser/index.ts +4 -0
- package/src/lib/browser/standalone-html.ts +312 -0
- package/src/lib/docs-lint.ts +58 -77
- package/src/lib/docs-metadata-audit.ts +26 -21
- package/src/lib/docs-metadata-sync.ts +32 -9
- package/src/lib/docs-repository-view.ts +220 -0
- package/src/lib/http/client.ts +44 -8
- package/src/lib/http/index.ts +6 -1
- package/src/lib/indexer-exclusions.ts +173 -0
- package/src/lib/instructions/apply.ts +1 -0
- package/src/lib/instructions/templates.ts +154 -4
- package/src/lib/local-file-url.ts +31 -0
- package/src/lib/web-performance.ts +335 -0
package/src/commander.ts
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
* `createHarneryProgram` is the composition point.
|
|
3
3
|
*
|
|
4
4
|
* harn (this package's CLI) calls this with `binName: 'harn'`.
|
|
5
|
-
* Consumer CLIs call this with their own binName,
|
|
6
|
-
*
|
|
5
|
+
* Consumer CLIs call this with their own binName, register their
|
|
6
|
+
* domain-specific subcommands, and then use `parseAsync()`.
|
|
7
7
|
*
|
|
8
|
-
* The returned Commander program
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* The returned Commander program initially contains lightweight top-level
|
|
9
|
+
* metadata. `parseAsync()` materializes only the selected implementation.
|
|
10
|
+
* Consumers that inspect the complete nested tree must first call
|
|
11
|
+
* `loadAllLazyCommands(program)`.
|
|
11
12
|
*
|
|
12
13
|
* Future commands wire in via `registerXxxCommand(program)` calls below.
|
|
13
14
|
* Each subdirectory under src/commands/ exports its `register…` function
|
|
@@ -18,48 +19,21 @@ import { readFileSync } from "node:fs";
|
|
|
18
19
|
import { dirname, join } from "node:path";
|
|
19
20
|
import { fileURLToPath } from "node:url";
|
|
20
21
|
import { Command } from "commander";
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
import { registerDevtoolsCommand } from "./commands/devtools.ts";
|
|
37
|
-
import { registerDocsCommand } from "./commands/docs.ts";
|
|
38
|
-
import { registerDoctorCommand } from "./commands/doctor.ts";
|
|
39
|
-
import { registerEditBatchCommand } from "./commands/edit-batch.ts";
|
|
40
|
-
import { registerEmlCommand } from "./commands/eml.ts";
|
|
41
|
-
import { registerEnvCommand } from "./commands/env.ts";
|
|
42
|
-
import { registerEventsCommand } from "./commands/events.ts";
|
|
43
|
-
import { registerFetchCommand } from "./commands/fetch.ts";
|
|
44
|
-
import { registerFileHistoryCommand } from "./commands/file-history.ts";
|
|
45
|
-
import { registerGovernorCommand } from "./commands/governor.ts";
|
|
46
|
-
import { registerGrepCommand } from "./commands/grep.ts";
|
|
47
|
-
import { registerInitCommand } from "./commands/init.ts";
|
|
48
|
-
import { registerInstructionsCommand } from "./commands/instructions.ts";
|
|
49
|
-
import { registerJournalCommand } from "./commands/journal.ts";
|
|
50
|
-
import { registerLedgerV3Command } from "./commands/ledger-v3.ts";
|
|
51
|
-
import { registerOutlineCommand } from "./commands/outline.ts";
|
|
52
|
-
import { registerPolicyCommand } from "./commands/policy.ts";
|
|
53
|
-
import { registerPresenceCommand } from "./commands/presence.ts";
|
|
54
|
-
import { registerReadCommand } from "./commands/read.ts";
|
|
55
|
-
import { registerRelayCommand } from "./commands/relay.ts";
|
|
56
|
-
import { registerSyncCommand } from "./commands/sync.ts";
|
|
57
|
-
import { registerSectionCommand, registerTocCommand } from "./commands/toc.ts";
|
|
58
|
-
import { registerTokensCommand } from "./commands/tokens.ts";
|
|
59
|
-
import { registerTunnelCommand } from "./commands/tunnel.ts";
|
|
60
|
-
import { registerWebCommand } from "./commands/web.ts";
|
|
61
|
-
import { registerWorkCommand } from "./commands/work.ts";
|
|
62
|
-
import { registerWorkflowCommand } from "./commands/workflow.ts";
|
|
22
|
+
import {
|
|
23
|
+
type LazyCommandBundle,
|
|
24
|
+
type LazyCommandDefinition,
|
|
25
|
+
loadAllLazyCommands,
|
|
26
|
+
registerLazyCommandBundles,
|
|
27
|
+
} from "./lazy-commands.ts";
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
type LazyCommandBundle,
|
|
31
|
+
type LazyCommandDefinition,
|
|
32
|
+
loadAllLazyCommands,
|
|
33
|
+
loadLazyCommand,
|
|
34
|
+
onLazyCommandLoaded,
|
|
35
|
+
registerLazyCommandBundles,
|
|
36
|
+
} from "./lazy-commands.ts";
|
|
63
37
|
|
|
64
38
|
export interface HarneryContextOpts {
|
|
65
39
|
/**
|
|
@@ -155,6 +129,10 @@ export interface HarneryProgramContext {
|
|
|
155
129
|
* reports `skipped` rather than a false pass.
|
|
156
130
|
*/
|
|
157
131
|
critiqueProvider?: import("./lib/browser/critique.ts").CritiqueProvider;
|
|
132
|
+
/** Load a host vision provider only when browse critique is requested. */
|
|
133
|
+
critiqueProviderLoader?: () => Promise<
|
|
134
|
+
import("./lib/browser/critique.ts").CritiqueProvider | undefined
|
|
135
|
+
>;
|
|
158
136
|
/**
|
|
159
137
|
* Shell-completion provider-key lookup. Consumers wire this to a function
|
|
160
138
|
* mapping (commandPath, option/positional) to a provider key, so that
|
|
@@ -190,6 +168,22 @@ export interface HarneryProgramContext {
|
|
|
190
168
|
* checked (their entry tiers differ from the parent's).
|
|
191
169
|
*/
|
|
192
170
|
docsRootAllowlist?: readonly string[];
|
|
171
|
+
/**
|
|
172
|
+
* Construction-time storage families, logger bindings, and explicit host
|
|
173
|
+
* exclusions. Harnery validates these against its source-owned catalog;
|
|
174
|
+
* hosts cannot replace or weaken Harnery descriptors at runtime.
|
|
175
|
+
*/
|
|
176
|
+
storage?: import("./core/storage/contract.ts").HarneryHostStorageRegistration;
|
|
177
|
+
/** Maintenance implementations registered at construction time by storage owners. */
|
|
178
|
+
storageMaintenanceProviders?: readonly import("./core/storage/maintenance.ts").HarneryMaintenanceProvider[];
|
|
179
|
+
/** Private inbox implementation. Omission keeps the commands visible but unavailable to invoke. */
|
|
180
|
+
coordinationInbox?: import("./core/inbox/service.ts").HarneryInboxService;
|
|
181
|
+
/** Adapter-native conversation providers. Omission keeps explicit history access unavailable. */
|
|
182
|
+
conversations?: {
|
|
183
|
+
catalog: import("./core/conversations/catalog.ts").HarneryConversationCatalog;
|
|
184
|
+
projectScopeId: string;
|
|
185
|
+
records?: () => readonly import("./core/conversations/contract.ts").HarneryConversationRecordV1[];
|
|
186
|
+
};
|
|
193
187
|
/**
|
|
194
188
|
* Default Host header for `tunnel up` when `--vhost` is omitted: a literal
|
|
195
189
|
* host, or a resolver evaluated at start time (e.g. read a dev stack's
|
|
@@ -254,65 +248,440 @@ export const defaultEmit: EmitContext = {
|
|
|
254
248
|
},
|
|
255
249
|
};
|
|
256
250
|
|
|
251
|
+
/** Mount Harnery's storage and log commands below an arbitrary host namespace. */
|
|
252
|
+
export interface HarneryLogStorageCommandOptions
|
|
253
|
+
extends Pick<HarneryContextOpts, "emit" | "context"> {
|
|
254
|
+
commands?: readonly ("storage" | "logs")[];
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export async function registerHarneryLogStorageCommands(
|
|
258
|
+
parent: Command,
|
|
259
|
+
options: HarneryLogStorageCommandOptions = {},
|
|
260
|
+
): Promise<Command> {
|
|
261
|
+
const emit = options.emit ?? defaultEmit;
|
|
262
|
+
const commands = new Set(options.commands ?? ["storage", "logs"]);
|
|
263
|
+
if (commands.has("storage")) {
|
|
264
|
+
const { registerStorageCommand } = await import("./commands/storage.ts");
|
|
265
|
+
registerStorageCommand(parent, emit, options.context);
|
|
266
|
+
}
|
|
267
|
+
if (commands.has("logs")) {
|
|
268
|
+
const { registerLogsCommand } = await import("./commands/logs.ts");
|
|
269
|
+
registerLogsCommand(parent, emit, options.context);
|
|
270
|
+
}
|
|
271
|
+
return parent;
|
|
272
|
+
}
|
|
273
|
+
|
|
257
274
|
export function createHarneryProgram(opts: HarneryContextOpts = {}): Command {
|
|
258
275
|
const program = new Command();
|
|
259
276
|
const emit = opts.emit ?? defaultEmit;
|
|
260
277
|
const skip = new Set(opts.skipCommands ?? []);
|
|
261
|
-
const
|
|
278
|
+
const binName = opts.binName ?? "harn";
|
|
262
279
|
|
|
263
280
|
program
|
|
264
|
-
.name(
|
|
281
|
+
.name(binName)
|
|
265
282
|
.description("Multi-agent coordination + adapter adapters + portable CLI utilities.")
|
|
266
283
|
.version(readVersion());
|
|
267
284
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
registerRelayCommand(program, emit);
|
|
273
|
-
registerConfigGetCommand(program, emit);
|
|
274
|
-
registerFileHistoryCommand(program, emit);
|
|
275
|
-
registerOutlineCommand(program, emit);
|
|
276
|
-
registerTocCommand(program, emit);
|
|
277
|
-
registerSectionCommand(program, emit);
|
|
278
|
-
registerCallersCommand(program, emit, opts.context);
|
|
279
|
-
registerEditBatchCommand(program, emit);
|
|
280
|
-
registerGrepCommand(program, emit, opts.context);
|
|
281
|
-
registerAdapterCommand(program, emit);
|
|
282
|
-
registerPolicyCommand(program, emit);
|
|
283
|
-
registerCookiesCommand(program, emit);
|
|
284
|
-
registerFetchCommand(program, emit, opts.context);
|
|
285
|
-
registerReadCommand(program, emit);
|
|
286
|
-
registerBrowseCommand(program, emit, opts.context);
|
|
287
|
-
registerBrowseSessionCommand(program, emit);
|
|
288
|
-
registerBrowseAiCommand(program, emit);
|
|
289
|
-
registerCompletionCommand(program, emit, opts.context);
|
|
290
|
-
registerCheckpointCommand(program, emit, opts.context);
|
|
291
|
-
registerJournalCommand(program, emit);
|
|
292
|
-
registerLedgerV3Command(program, emit, opts.context);
|
|
293
|
-
registerEventsCommand(program, emit, opts.context);
|
|
294
|
-
registerArtifactsCommand(program, emit, opts.context);
|
|
295
|
-
registerDecisionCommand(program, emit);
|
|
296
|
-
registerDevtoolsCommand(program, emit);
|
|
297
|
-
registerTunnelCommand(program, emit, opts.context);
|
|
298
|
-
registerDocsCommand(program, emit, opts.context);
|
|
299
|
-
registerAgentsCommand(program, emit, opts.context);
|
|
300
|
-
registerCouncilCommands(program);
|
|
301
|
-
registerDoctorCommand(program, emit);
|
|
302
|
-
registerInstructionsCommand(program, emit);
|
|
303
|
-
registerInitCommand(program, emit, opts.binName);
|
|
304
|
-
registerDeinitCommand(program, emit, opts.binName);
|
|
305
|
-
registerBackupCommand(program, emit);
|
|
306
|
-
registerClaudeDesktopCommand(program, emit, opts.context);
|
|
307
|
-
registerSyncCommand(program, emit);
|
|
308
|
-
registerWorkflowCommand(program, emit);
|
|
309
|
-
registerWorkCommand(program, emit);
|
|
310
|
-
registerGovernorCommand(program, emit);
|
|
311
|
-
if (include("web")) registerWebCommand(program, emit);
|
|
285
|
+
const bundles = harneryCommandBundles({ emit, context: opts.context, binName }).filter((bundle) =>
|
|
286
|
+
bundle.commands.every((command) => !skip.has(commandName(command.command))),
|
|
287
|
+
);
|
|
288
|
+
registerLazyCommandBundles(program, bundles);
|
|
312
289
|
|
|
313
290
|
return program;
|
|
314
291
|
}
|
|
315
292
|
|
|
293
|
+
interface CommandBundleContext {
|
|
294
|
+
emit: EmitContext;
|
|
295
|
+
context: HarneryProgramContext | undefined;
|
|
296
|
+
binName: string;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
function lazy(
|
|
300
|
+
command: string,
|
|
301
|
+
description: string,
|
|
302
|
+
load: LazyCommandBundle["load"],
|
|
303
|
+
options: Omit<LazyCommandDefinition, "command" | "description"> = {},
|
|
304
|
+
): LazyCommandBundle {
|
|
305
|
+
return { commands: [{ command, description, ...options }], load };
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
function harneryCommandBundles({
|
|
309
|
+
emit,
|
|
310
|
+
context,
|
|
311
|
+
binName,
|
|
312
|
+
}: CommandBundleContext): LazyCommandBundle[] {
|
|
313
|
+
return [
|
|
314
|
+
lazy(
|
|
315
|
+
"tokens <files...>",
|
|
316
|
+
"Count tokens in text/markdown files (offline, uses o200k_base as Claude proxy)",
|
|
317
|
+
async (program) =>
|
|
318
|
+
(await import("./commands/tokens.ts")).registerTokensCommand(program, emit),
|
|
319
|
+
{ hasOptions: true },
|
|
320
|
+
),
|
|
321
|
+
lazy(
|
|
322
|
+
"eml <file>",
|
|
323
|
+
"Parse a Gmail .eml file into a clean chronological markdown thread",
|
|
324
|
+
async (program) => (await import("./commands/eml.ts")).registerEmlCommand(program, emit),
|
|
325
|
+
{ hasOptions: true },
|
|
326
|
+
),
|
|
327
|
+
lazy(
|
|
328
|
+
"env [section]",
|
|
329
|
+
"Show environment status (runtimes, docker, git; hosts can add sections)",
|
|
330
|
+
async (program) =>
|
|
331
|
+
(await import("./commands/env.ts")).registerEnvCommand(program, emit, context),
|
|
332
|
+
),
|
|
333
|
+
lazy(
|
|
334
|
+
"presence",
|
|
335
|
+
"Presence: mobile/office state (get/set/clear/detect) + cross-machine session presence (publish/fetch/peers)",
|
|
336
|
+
async (program) =>
|
|
337
|
+
(await import("./commands/presence.ts")).registerPresenceCommand(program, emit),
|
|
338
|
+
),
|
|
339
|
+
lazy(
|
|
340
|
+
"relay",
|
|
341
|
+
"Self-host the presence relay (see also relay/worker/ for the Cloudflare host)",
|
|
342
|
+
async (program) => (await import("./commands/relay.ts")).registerRelayCommand(program, emit),
|
|
343
|
+
),
|
|
344
|
+
lazy(
|
|
345
|
+
"config-get <file> <key>",
|
|
346
|
+
"Extract a single value from a JSON/YAML config file by dotted-path. Bracket notation supported: `config-get tsconfig.json compilerOptions.paths`.",
|
|
347
|
+
async (program) =>
|
|
348
|
+
(await import("./commands/config-get.ts")).registerConfigGetCommand(program, emit),
|
|
349
|
+
{ hasOptions: true },
|
|
350
|
+
),
|
|
351
|
+
lazy(
|
|
352
|
+
"file-history <path>",
|
|
353
|
+
"Concise per-file git history: summary stats + N most-recent commits with line impact.",
|
|
354
|
+
async (program) =>
|
|
355
|
+
(await import("./commands/file-history.ts")).registerFileHistoryCommand(program, emit),
|
|
356
|
+
{ hasOptions: true },
|
|
357
|
+
),
|
|
358
|
+
lazy(
|
|
359
|
+
"outline <file>",
|
|
360
|
+
`Print the structural skeleton of a code file (imports + top-level decls + line numbers). Supports TS/JS/TSX/JSX (AST), PHP/Python (regex). Use \`${binName} toc\` for markdown.`,
|
|
361
|
+
async (program) =>
|
|
362
|
+
(await import("./commands/outline.ts")).registerOutlineCommand(program, emit, binName),
|
|
363
|
+
{ hasOptions: true },
|
|
364
|
+
),
|
|
365
|
+
lazy(
|
|
366
|
+
"toc <file>",
|
|
367
|
+
"Print the markdown header outline (level + text + line number).",
|
|
368
|
+
async (program) => (await import("./commands/toc.ts")).registerTocCommand(program, emit),
|
|
369
|
+
{ hasOptions: true },
|
|
370
|
+
),
|
|
371
|
+
lazy(
|
|
372
|
+
"section <file> <header...>",
|
|
373
|
+
"Extract one section from a markdown file by header substring (case-insensitive by default). Joins multi-word args into one query string.",
|
|
374
|
+
async (program) => (await import("./commands/toc.ts")).registerSectionCommand(program, emit),
|
|
375
|
+
{ hasOptions: true },
|
|
376
|
+
),
|
|
377
|
+
lazy(
|
|
378
|
+
"callers <symbol>",
|
|
379
|
+
"Find references to a symbol across the monorepo with kind classification (call / import / type / decl / ref). Heuristic: filters out declarations + single-line comments by default; opt back in with --include-decl / --include-comments.",
|
|
380
|
+
async (program) =>
|
|
381
|
+
(await import("./commands/callers.ts")).registerCallersCommand(program, emit, context),
|
|
382
|
+
{ hasOptions: true },
|
|
383
|
+
),
|
|
384
|
+
lazy(
|
|
385
|
+
"edit-batch <old> <new> <files...>",
|
|
386
|
+
"Coordinated find/replace across N files (literal by default; --regex for pattern). Atomic per-file. Use --dry-run to preview.",
|
|
387
|
+
async (program) =>
|
|
388
|
+
(await import("./commands/edit-batch.ts")).registerEditBatchCommand(program, emit),
|
|
389
|
+
{ hasOptions: true },
|
|
390
|
+
),
|
|
391
|
+
lazy(
|
|
392
|
+
"grep <pattern> [paths...]",
|
|
393
|
+
"Monorepo-aware code search (ripgrep when available, GNU grep fallback). Skips dist/.next/node_modules/.git/... by default. Use --repo, --all-repos, --lang for scoping; --and/--without for file-level composition. Regex by default; -F for literal.",
|
|
394
|
+
async (program) =>
|
|
395
|
+
(await import("./commands/grep.ts")).registerGrepCommand(program, emit, context),
|
|
396
|
+
{ hasOptions: true },
|
|
397
|
+
),
|
|
398
|
+
lazy(
|
|
399
|
+
"adapter",
|
|
400
|
+
"Inspect registered adapter capabilities and run their conformance bench.",
|
|
401
|
+
async (program) =>
|
|
402
|
+
(await import("./commands/adapter.ts")).registerAdapterCommand(program, emit),
|
|
403
|
+
),
|
|
404
|
+
lazy("policy", "Inspect host-enforced workflow policy documents.", async (program) =>
|
|
405
|
+
(await import("./commands/policy.ts")).registerPolicyCommand(program, emit),
|
|
406
|
+
),
|
|
407
|
+
lazy(
|
|
408
|
+
"cookies",
|
|
409
|
+
"Manage the shared browser cookie store (default: ~/.cache/harnery/cookies.json). Format is CDP-native (compatible with Playwright/agent-browser).",
|
|
410
|
+
async (program) =>
|
|
411
|
+
(await import("./commands/cookies.ts")).registerCookiesCommand(program, emit),
|
|
412
|
+
{ hasOptions: true },
|
|
413
|
+
),
|
|
414
|
+
lazy(
|
|
415
|
+
"fetch <url>",
|
|
416
|
+
`HTTP GET (or --method) with cookie-jar attach + persist. Default jar is ~/.cache/harnery/cookies.json (shared with ${binName} cookies / ${binName} browse).`,
|
|
417
|
+
async (program) =>
|
|
418
|
+
(await import("./commands/fetch.ts")).registerFetchCommand(program, emit, context),
|
|
419
|
+
{ hasOptions: true },
|
|
420
|
+
),
|
|
421
|
+
lazy("files", "Mint browser links for files served by the local dashboard", async (program) =>
|
|
422
|
+
(await import("./commands/files.ts")).registerFilesCommand(program, emit, context),
|
|
423
|
+
),
|
|
424
|
+
lazy(
|
|
425
|
+
"read [html-file]",
|
|
426
|
+
`Extract clean readable markdown from HTML. Reads from file or stdin (use '-'). Pair with \`${binName} fetch\` or \`${binName} browse\` for scrape-to-markdown.`,
|
|
427
|
+
async (program) =>
|
|
428
|
+
(await import("./commands/read.ts")).registerReadCommand(program, emit, binName),
|
|
429
|
+
{ hasOptions: true },
|
|
430
|
+
),
|
|
431
|
+
lazy(
|
|
432
|
+
"browse <url>",
|
|
433
|
+
"Headless Chromium with persistent profile + cookie jar. Default writes a trio of files (last.png, last.html, last.json) for the LLM iteration loop; --snapshot/--html/--json switch to stdout-print mode.",
|
|
434
|
+
async (program) =>
|
|
435
|
+
(await import("./commands/browse.ts")).registerBrowseCommand(
|
|
436
|
+
program,
|
|
437
|
+
emit,
|
|
438
|
+
context,
|
|
439
|
+
binName,
|
|
440
|
+
),
|
|
441
|
+
{ hasOptions: true },
|
|
442
|
+
),
|
|
443
|
+
lazy(
|
|
444
|
+
"browse-session",
|
|
445
|
+
"Control an opted-in headed browse session through an owner-only descriptor",
|
|
446
|
+
async (program) =>
|
|
447
|
+
(await import("./commands/browse-session.ts")).registerBrowseSessionCommand(program, emit),
|
|
448
|
+
),
|
|
449
|
+
lazy(
|
|
450
|
+
"browse-ai <url>",
|
|
451
|
+
`agent-browser (Vercel Labs) wrapper: accessibility-tree snapshots with element refs (@e1, @e2) for LLM consumption. Daemon-mode: successive calls reuse the same browser instance. Sister to ${binName} browse (Playwright).`,
|
|
452
|
+
async (program) =>
|
|
453
|
+
(await import("./commands/browse-ai.ts")).registerBrowseAiCommand(program, emit),
|
|
454
|
+
{ hasOptions: true },
|
|
455
|
+
),
|
|
456
|
+
{
|
|
457
|
+
commands: [
|
|
458
|
+
{
|
|
459
|
+
command: "completion",
|
|
460
|
+
description:
|
|
461
|
+
"Shell tab-completion. Emit a script per shell or install to the standard location.",
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
command: "__complete <provider> [partial]",
|
|
465
|
+
description: "Internal: dynamic-value completion callback for the shell",
|
|
466
|
+
hidden: true,
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
command: "__complete-line <cword> [words...]",
|
|
470
|
+
description: "Internal: full-line completion callback for the dynamic shell shim",
|
|
471
|
+
hidden: true,
|
|
472
|
+
},
|
|
473
|
+
],
|
|
474
|
+
load: async (program) => {
|
|
475
|
+
await loadAllLazyCommands(program);
|
|
476
|
+
(await import("./commands/completion.ts")).registerCompletionCommand(
|
|
477
|
+
program,
|
|
478
|
+
emit,
|
|
479
|
+
context,
|
|
480
|
+
);
|
|
481
|
+
},
|
|
482
|
+
},
|
|
483
|
+
lazy(
|
|
484
|
+
"checkpoint",
|
|
485
|
+
"Durable context-continuity capsules: create one, show the latest, or report continuity phase.",
|
|
486
|
+
async (program) =>
|
|
487
|
+
(await import("./commands/checkpoint.ts")).registerCheckpointCommand(
|
|
488
|
+
program,
|
|
489
|
+
emit,
|
|
490
|
+
context,
|
|
491
|
+
),
|
|
492
|
+
{ hasOptions: true },
|
|
493
|
+
),
|
|
494
|
+
lazy(
|
|
495
|
+
"journal",
|
|
496
|
+
"Per-agent markdown journal: append-only timestamped entries. Survives in-session compaction, archived at session end, pruned after 7 days.",
|
|
497
|
+
async (program) =>
|
|
498
|
+
(await import("./commands/journal.ts")).registerJournalCommand(program, emit),
|
|
499
|
+
),
|
|
500
|
+
lazy(
|
|
501
|
+
"ledger-v3",
|
|
502
|
+
"Inspect or initialize the universal event-ledger V3 epoch",
|
|
503
|
+
async (program) =>
|
|
504
|
+
(await import("./commands/ledger-v3.ts")).registerLedgerV3Command(program, emit, context),
|
|
505
|
+
),
|
|
506
|
+
lazy(
|
|
507
|
+
"semantic",
|
|
508
|
+
"Build and inspect evidence-cited semantic readings of active V3 generations",
|
|
509
|
+
async (program) =>
|
|
510
|
+
(await import("./commands/semantic.ts")).registerSemanticCommand(program, emit, context),
|
|
511
|
+
),
|
|
512
|
+
lazy(
|
|
513
|
+
"storage",
|
|
514
|
+
"Inspect registered Harnery storage without reading file bodies",
|
|
515
|
+
async (program) =>
|
|
516
|
+
(await import("./commands/storage.ts")).registerStorageCommand(program, emit, context),
|
|
517
|
+
),
|
|
518
|
+
lazy("logs", "List and query bounded Harnery log families", async (program) =>
|
|
519
|
+
(await import("./commands/logs.ts")).registerLogsCommand(program, emit, context),
|
|
520
|
+
),
|
|
521
|
+
lazy("inbox", "Inspect private coordination inbox state", async (program) =>
|
|
522
|
+
(await import("./commands/inbox.ts")).registerInboxCommand(
|
|
523
|
+
program,
|
|
524
|
+
emit,
|
|
525
|
+
context?.coordinationInbox,
|
|
526
|
+
),
|
|
527
|
+
),
|
|
528
|
+
lazy(
|
|
529
|
+
"messages",
|
|
530
|
+
"Queue a durable coordination message; dry-run unless --yes",
|
|
531
|
+
async (program) =>
|
|
532
|
+
(await import("./commands/messages.ts")).registerMessagesCommand(
|
|
533
|
+
program,
|
|
534
|
+
emit,
|
|
535
|
+
context?.coordinationInbox,
|
|
536
|
+
),
|
|
537
|
+
{ hasOptions: true },
|
|
538
|
+
),
|
|
539
|
+
lazy("conversations", "Query conversation evidence", async (program) => {
|
|
540
|
+
const { registerConversationsCommand } = await import("./commands/conversations.ts");
|
|
541
|
+
registerConversationsCommand(
|
|
542
|
+
program,
|
|
543
|
+
emit,
|
|
544
|
+
context?.conversations?.catalog,
|
|
545
|
+
context?.conversations
|
|
546
|
+
? {
|
|
547
|
+
project_scope_id: context.conversations.projectScopeId,
|
|
548
|
+
...(context.conversations.records ? { records: context.conversations.records } : {}),
|
|
549
|
+
}
|
|
550
|
+
: undefined,
|
|
551
|
+
);
|
|
552
|
+
}),
|
|
553
|
+
lazy("events", "Inspect the canonical event ledger", async (program) =>
|
|
554
|
+
(await import("./commands/events.ts")).registerEventsCommand(program, emit, context),
|
|
555
|
+
),
|
|
556
|
+
lazy(
|
|
557
|
+
"artifacts",
|
|
558
|
+
"Manage repository-local working artifacts under .harnery/artifacts/",
|
|
559
|
+
async (program) =>
|
|
560
|
+
(await import("./commands/artifacts.ts")).registerArtifactsCommand(program, emit, context),
|
|
561
|
+
{ aliases: ["artifact"] },
|
|
562
|
+
),
|
|
563
|
+
lazy(
|
|
564
|
+
"decision",
|
|
565
|
+
"Decision docket: file a decision an agent would otherwise escalate, deliberate it, resolve with cited evidence, review async.",
|
|
566
|
+
async (program) =>
|
|
567
|
+
(await import("./commands/decision.ts")).registerDecisionCommand(program, emit),
|
|
568
|
+
{ aliases: ["decisions"] },
|
|
569
|
+
),
|
|
570
|
+
lazy(
|
|
571
|
+
"devtools",
|
|
572
|
+
"Local status of the AI coding agents (Claude Code, Codex, Cursor)",
|
|
573
|
+
async (program) =>
|
|
574
|
+
(await import("./commands/devtools.ts")).registerDevtoolsCommand(program, emit),
|
|
575
|
+
{ hasOptions: true },
|
|
576
|
+
),
|
|
577
|
+
lazy(
|
|
578
|
+
"tunnel",
|
|
579
|
+
"Provider-backed tunnel(s) in front of a local upstream (default upstream: 127.0.0.1:8001). Run several at once with --name <instance>.",
|
|
580
|
+
async (program) =>
|
|
581
|
+
(await import("./commands/tunnel.ts")).registerTunnelCommand(program, emit, context),
|
|
582
|
+
),
|
|
583
|
+
lazy(
|
|
584
|
+
"docs",
|
|
585
|
+
"Documentation tooling: freshness report, metadata, lint, sweep, index",
|
|
586
|
+
async (program) =>
|
|
587
|
+
(await import("./commands/docs.ts")).registerDocsCommand(program, emit, context),
|
|
588
|
+
{ hasOptions: true },
|
|
589
|
+
),
|
|
590
|
+
lazy(
|
|
591
|
+
"agents",
|
|
592
|
+
"The live agent sessions in this project: who is running now, what they hold, and their coordination state (whoami / list / status / health).",
|
|
593
|
+
async (program) =>
|
|
594
|
+
(await import("./commands/agents.ts")).registerAgentsCommand(
|
|
595
|
+
program,
|
|
596
|
+
emit,
|
|
597
|
+
context,
|
|
598
|
+
binName,
|
|
599
|
+
),
|
|
600
|
+
),
|
|
601
|
+
lazy(
|
|
602
|
+
"council",
|
|
603
|
+
"Multi-agent deliberation: convene a temporary group around an objective, run N rounds of contribution, emit a transcript.",
|
|
604
|
+
async (program) => (await import("./commands/agents.ts")).registerCouncilCommands(program),
|
|
605
|
+
),
|
|
606
|
+
lazy(
|
|
607
|
+
"doctor",
|
|
608
|
+
"Verify the runtime + optional deps harnery commands expect. Exits 0 unless a required dep (Node, git) is missing.",
|
|
609
|
+
async (program) =>
|
|
610
|
+
(await import("./commands/doctor.ts")).registerDoctorCommand(program, emit),
|
|
611
|
+
{ hasOptions: true },
|
|
612
|
+
),
|
|
613
|
+
lazy(
|
|
614
|
+
"instructions",
|
|
615
|
+
"Inspect and version the repo-authored instruction bundle loaded by each adapter.",
|
|
616
|
+
async (program) =>
|
|
617
|
+
(await import("./commands/instructions.ts")).registerInstructionsCommand(program, emit),
|
|
618
|
+
),
|
|
619
|
+
lazy(
|
|
620
|
+
"init",
|
|
621
|
+
"Bootstrap harnery in this project: create .harnery/, wire the adapter hooks, and inject the agent-facing instructions block + skills (idempotent; safe to re-run). Use --dry-run to preview, --check to report drift without writing (exit 0 fresh / 2 drift / 1 error).",
|
|
622
|
+
async (program) =>
|
|
623
|
+
(await import("./commands/init.ts")).registerInitCommand(program, emit, binName),
|
|
624
|
+
{ hasOptions: true },
|
|
625
|
+
),
|
|
626
|
+
lazy(
|
|
627
|
+
"deinit",
|
|
628
|
+
"Reverse `harn init`: remove harnery's hook entries from the adapter settings file (keeps any others). Pass --purge-state to also delete the .harnery/ coord root (on a terminal it asks first). Idempotent; use --dry-run to preview.",
|
|
629
|
+
async (program) =>
|
|
630
|
+
(await import("./commands/deinit.ts")).registerDeinitCommand(program, emit, binName),
|
|
631
|
+
{ hasOptions: true },
|
|
632
|
+
),
|
|
633
|
+
lazy(
|
|
634
|
+
"backup",
|
|
635
|
+
"restic-backed snapshots of .harnery/ (multi-machine recovery insurance)",
|
|
636
|
+
async (program) =>
|
|
637
|
+
(await import("./commands/backup.ts")).registerBackupCommand(program, emit),
|
|
638
|
+
),
|
|
639
|
+
lazy(
|
|
640
|
+
"claude-desktop",
|
|
641
|
+
"Claude desktop-app session index: list and mirror sessions across accounts",
|
|
642
|
+
async (program) =>
|
|
643
|
+
(await import("./commands/claude-desktop.ts")).registerClaudeDesktopCommand(
|
|
644
|
+
program,
|
|
645
|
+
emit,
|
|
646
|
+
context,
|
|
647
|
+
),
|
|
648
|
+
),
|
|
649
|
+
lazy(
|
|
650
|
+
"sync",
|
|
651
|
+
"Cross-machine sync of curated .harnery/ subset (identities, archived journals, council manifests) via rclone. Google Drive is the expected remote; any rclone backend works.",
|
|
652
|
+
async (program) => (await import("./commands/sync.ts")).registerSyncCommand(program, emit),
|
|
653
|
+
),
|
|
654
|
+
{
|
|
655
|
+
commands: [
|
|
656
|
+
{
|
|
657
|
+
command: "run",
|
|
658
|
+
description:
|
|
659
|
+
"Execute one bounded, schema-gated multi-subagent script. Subagents spawn as headless adapter-CLI subprocesses, born coordination-registered.",
|
|
660
|
+
},
|
|
661
|
+
{ command: "approval", description: "Inspect and resolve durable run-policy approvals." },
|
|
662
|
+
],
|
|
663
|
+
load: async (program) =>
|
|
664
|
+
(await import("./commands/workflow.ts")).registerWorkflowCommand(program, emit),
|
|
665
|
+
},
|
|
666
|
+
lazy("work", "Track durable objectives across bounded workflow attempts.", async (program) =>
|
|
667
|
+
(await import("./commands/work.ts")).registerWorkCommand(program, emit),
|
|
668
|
+
),
|
|
669
|
+
lazy(
|
|
670
|
+
"governor",
|
|
671
|
+
"Run a bounded specialist team over a durable-work dependency graph.",
|
|
672
|
+
async (program) =>
|
|
673
|
+
(await import("./commands/governor.ts")).registerGovernorCommand(program, emit),
|
|
674
|
+
),
|
|
675
|
+
lazy("web", "Standalone read-only dashboard for harnery's coord state", async (program) =>
|
|
676
|
+
(await import("./commands/web.ts")).registerWebCommand(program, emit),
|
|
677
|
+
),
|
|
678
|
+
];
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
function commandName(signature: string): string {
|
|
682
|
+
return signature.trim().split(/\s/, 1)[0] ?? signature;
|
|
683
|
+
}
|
|
684
|
+
|
|
316
685
|
function readVersion(): string {
|
|
317
686
|
// Resolve package.json by walking up from this module. Works under Bun (this
|
|
318
687
|
// file runs from src/) and Node (from dist/): package.json sits at the
|