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/dist/lib/http/client.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Fetch a URL with optional cookie-jar attach + persist.
|
|
3
3
|
*
|
|
4
|
-
* Returns the response body as
|
|
4
|
+
* Returns the response body as text by default (callers handle JSON parsing).
|
|
5
|
+
* Pass `responseType: "bytes"` when the caller must preserve the body exactly.
|
|
5
6
|
* Streams aren't supported; this is a CLI helper, not a streaming HTTP
|
|
6
7
|
* client. Use Bun's `fetch` directly for streaming workloads.
|
|
7
8
|
*/
|
|
@@ -21,13 +22,27 @@ export async function fetchWithJar(url, opts = {}) {
|
|
|
21
22
|
headers[k] = v;
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
|
-
|
|
25
|
+
// Byte mode is a download boundary, so keep the HTTP representation bytes
|
|
26
|
+
// aligned with the response headers. Bun otherwise decompresses the body
|
|
27
|
+
// while retaining Content-Encoding and the encoded Content-Length.
|
|
28
|
+
if (opts.responseType === "bytes" && !headers["Accept-Encoding"] && !headers["accept-encoding"]) {
|
|
29
|
+
headers["Accept-Encoding"] = "identity";
|
|
30
|
+
}
|
|
31
|
+
const fetchInit = {
|
|
25
32
|
method: opts.method ?? "GET",
|
|
26
33
|
body: opts.body,
|
|
27
34
|
headers,
|
|
28
35
|
redirect: opts.redirect ?? "follow",
|
|
29
36
|
signal: opts.signal,
|
|
30
|
-
}
|
|
37
|
+
};
|
|
38
|
+
if (opts.responseType === "bytes")
|
|
39
|
+
fetchInit.decompress = false;
|
|
40
|
+
const response = await fetch(url, fetchInit);
|
|
41
|
+
if (opts.responseType === "bytes" &&
|
|
42
|
+
typeof Bun === "undefined" &&
|
|
43
|
+
response.headers.has("content-encoding")) {
|
|
44
|
+
throw new Error("cannot preserve a content-encoded response under the Node fallback; install Bun or request identity encoding");
|
|
45
|
+
}
|
|
31
46
|
let cookiesSaved = 0;
|
|
32
47
|
if (opts.jar) {
|
|
33
48
|
const setCookieHeaders = collectSetCookie(response.headers);
|
|
@@ -46,12 +61,15 @@ export async function fetchWithJar(url, opts = {}) {
|
|
|
46
61
|
response.headers.forEach((value, key) => {
|
|
47
62
|
headerObj[key] = value;
|
|
48
63
|
});
|
|
64
|
+
const body = opts.responseType === "bytes"
|
|
65
|
+
? new Uint8Array(await response.arrayBuffer())
|
|
66
|
+
: await response.text();
|
|
49
67
|
return {
|
|
50
68
|
status: response.status,
|
|
51
69
|
statusText: response.statusText,
|
|
52
70
|
url: response.url,
|
|
53
71
|
headers: headerObj,
|
|
54
|
-
body:
|
|
72
|
+
body: body,
|
|
55
73
|
cookiesSaved,
|
|
56
74
|
};
|
|
57
75
|
}
|
package/dist/lib/http/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/http/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/http/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,cAAc,cAAc,CAAC"}
|
package/dist/lib/http/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { fetchWithJar } from "./client.js";
|
|
1
|
+
export { fetchWithJar, } from "./client.js";
|
|
2
2
|
export * from "./request.js";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Editor-indexer exclusions for the `.harnery/` coord root.
|
|
3
|
+
*
|
|
4
|
+
* `harn init` already writes `.harnery/.gitignore`, which keeps git-aware
|
|
5
|
+
* tools out of runtime state. Two high-traffic editor surfaces ignore
|
|
6
|
+
* gitignore, though: Cursor's codebase indexer (governed by a repo-root
|
|
7
|
+
* `.cursorindexingignore`) and the VS Code/Cursor file watcher (governed by
|
|
8
|
+
* `files.watcherExclude` in `.vscode/settings.json`). A busy coord root holds
|
|
9
|
+
* tens of thousands of ledger events plus working artifacts, so on
|
|
10
|
+
* session-heavy hosts the missing exclusions turn editor startup into an
|
|
11
|
+
* indexing storm over machine-local state no editor needs to see.
|
|
12
|
+
*
|
|
13
|
+
* `applyIndexerExclusions` is idempotent and non-destructive: it appends a
|
|
14
|
+
* managed entry to `.cursorindexingignore` (or creates the file) and merges a
|
|
15
|
+
* single key into `.vscode/settings.json` (or creates it). A settings file it
|
|
16
|
+
* cannot merge safely (comments, malformed JSON, or a non-object
|
|
17
|
+
* `files.watcherExclude`) is left byte-identical and reported as a manual
|
|
18
|
+
* step. `removeIndexerExclusions` reverses exactly what apply wrote: it never
|
|
19
|
+
* removes a `.harnery/` ignore entry the consumer added themselves (detected
|
|
20
|
+
* by the absence of the managed comment) and never edits a settings file it
|
|
21
|
+
* could not have written into.
|
|
22
|
+
*/
|
|
23
|
+
/** Ensure both editor exclusions exist. Returns init-style action lines. */
|
|
24
|
+
export declare function applyIndexerExclusions(projectRoot: string, dryRun: boolean): string[];
|
|
25
|
+
/** Reverse exactly what apply wrote. Returns action lines; silent when nothing is ours. */
|
|
26
|
+
export declare function removeIndexerExclusions(projectRoot: string, dryRun: boolean): string[];
|
|
27
|
+
//# sourceMappingURL=indexer-exclusions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indexer-exclusions.d.ts","sourceRoot":"","sources":["../../src/lib/indexer-exclusions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AA4IH,4EAA4E;AAC5E,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,CAErF;AAED,2FAA2F;AAC3F,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,CAKtF"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Editor-indexer exclusions for the `.harnery/` coord root.
|
|
3
|
+
*
|
|
4
|
+
* `harn init` already writes `.harnery/.gitignore`, which keeps git-aware
|
|
5
|
+
* tools out of runtime state. Two high-traffic editor surfaces ignore
|
|
6
|
+
* gitignore, though: Cursor's codebase indexer (governed by a repo-root
|
|
7
|
+
* `.cursorindexingignore`) and the VS Code/Cursor file watcher (governed by
|
|
8
|
+
* `files.watcherExclude` in `.vscode/settings.json`). A busy coord root holds
|
|
9
|
+
* tens of thousands of ledger events plus working artifacts, so on
|
|
10
|
+
* session-heavy hosts the missing exclusions turn editor startup into an
|
|
11
|
+
* indexing storm over machine-local state no editor needs to see.
|
|
12
|
+
*
|
|
13
|
+
* `applyIndexerExclusions` is idempotent and non-destructive: it appends a
|
|
14
|
+
* managed entry to `.cursorindexingignore` (or creates the file) and merges a
|
|
15
|
+
* single key into `.vscode/settings.json` (or creates it). A settings file it
|
|
16
|
+
* cannot merge safely (comments, malformed JSON, or a non-object
|
|
17
|
+
* `files.watcherExclude`) is left byte-identical and reported as a manual
|
|
18
|
+
* step. `removeIndexerExclusions` reverses exactly what apply wrote: it never
|
|
19
|
+
* removes a `.harnery/` ignore entry the consumer added themselves (detected
|
|
20
|
+
* by the absence of the managed comment) and never edits a settings file it
|
|
21
|
+
* could not have written into.
|
|
22
|
+
*/
|
|
23
|
+
import { existsSync, mkdirSync, readFileSync, rmdirSync, rmSync, writeFileSync } from "node:fs";
|
|
24
|
+
import { resolve } from "node:path";
|
|
25
|
+
const CURSOR_IGNORE = ".cursorindexingignore";
|
|
26
|
+
const MANAGED_COMMENT = "# .harnery/ is machine-local harnery runtime state (entry managed by init)";
|
|
27
|
+
const MANAGED_ENTRY = ".harnery/";
|
|
28
|
+
const VSCODE_DIR = ".vscode";
|
|
29
|
+
const VSCODE_SETTINGS = ".vscode/settings.json";
|
|
30
|
+
const WATCHER_KEY = "files.watcherExclude";
|
|
31
|
+
const WATCHER_GLOB = "**/.harnery/**";
|
|
32
|
+
/** True when a `.cursorindexingignore` line already excludes the coord root. */
|
|
33
|
+
function coversCoordRoot(line) {
|
|
34
|
+
const t = line.trim();
|
|
35
|
+
return (t === ".harnery" ||
|
|
36
|
+
t === ".harnery/" ||
|
|
37
|
+
t === "/.harnery" ||
|
|
38
|
+
t === "/.harnery/" ||
|
|
39
|
+
t === ".harnery/**" ||
|
|
40
|
+
t === "/.harnery/**");
|
|
41
|
+
}
|
|
42
|
+
function applyCursorIgnore(projectRoot, dryRun) {
|
|
43
|
+
const path = resolve(projectRoot, CURSOR_IGNORE);
|
|
44
|
+
if (existsSync(path)) {
|
|
45
|
+
const raw = readFileSync(path, "utf8");
|
|
46
|
+
if (raw.split("\n").some(coversCoordRoot)) {
|
|
47
|
+
return `· ${CURSOR_IGNORE} already excludes .harnery/`;
|
|
48
|
+
}
|
|
49
|
+
if (dryRun)
|
|
50
|
+
return `+ would append .harnery/ to ${CURSOR_IGNORE}`;
|
|
51
|
+
const sep = raw === "" || raw.endsWith("\n") ? "" : "\n";
|
|
52
|
+
writeFileSync(path, `${raw}${sep}${MANAGED_COMMENT}\n${MANAGED_ENTRY}\n`);
|
|
53
|
+
return `+ appended .harnery/ to ${CURSOR_IGNORE}`;
|
|
54
|
+
}
|
|
55
|
+
if (dryRun)
|
|
56
|
+
return `+ would create ${CURSOR_IGNORE} (excludes .harnery/ from Cursor indexing)`;
|
|
57
|
+
writeFileSync(path, `${MANAGED_COMMENT}\n${MANAGED_ENTRY}\n`);
|
|
58
|
+
return `+ created ${CURSOR_IGNORE} (excludes .harnery/ from Cursor indexing)`;
|
|
59
|
+
}
|
|
60
|
+
function applyVscodeWatcherExclude(projectRoot, dryRun) {
|
|
61
|
+
const path = resolve(projectRoot, VSCODE_SETTINGS);
|
|
62
|
+
if (!existsSync(path)) {
|
|
63
|
+
if (dryRun)
|
|
64
|
+
return `+ would create ${VSCODE_SETTINGS} (file watcher excludes .harnery/)`;
|
|
65
|
+
mkdirSync(resolve(projectRoot, VSCODE_DIR), { recursive: true });
|
|
66
|
+
const body = JSON.stringify({ [WATCHER_KEY]: { [WATCHER_GLOB]: true } }, null, 2);
|
|
67
|
+
writeFileSync(path, `${body}\n`);
|
|
68
|
+
return `+ created ${VSCODE_SETTINGS} (file watcher excludes .harnery/)`;
|
|
69
|
+
}
|
|
70
|
+
const raw = readFileSync(path, "utf8");
|
|
71
|
+
let parsed;
|
|
72
|
+
try {
|
|
73
|
+
parsed = JSON.parse(raw);
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
// JSONC (comments, trailing commas) or malformed. A rewrite would drop the
|
|
77
|
+
// consumer's comments, so leave the file alone and name the one-key merge.
|
|
78
|
+
return `! ${VSCODE_SETTINGS} is not plain JSON; add "${WATCHER_KEY}": {"${WATCHER_GLOB}": true} manually`;
|
|
79
|
+
}
|
|
80
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
81
|
+
return `! ${VSCODE_SETTINGS} is not a settings object; add "${WATCHER_KEY}": {"${WATCHER_GLOB}": true} manually`;
|
|
82
|
+
}
|
|
83
|
+
const settings = parsed;
|
|
84
|
+
const watcher = settings[WATCHER_KEY];
|
|
85
|
+
if (watcher !== undefined &&
|
|
86
|
+
(typeof watcher !== "object" || watcher === null || Array.isArray(watcher))) {
|
|
87
|
+
return `! ${VSCODE_SETTINGS} has a non-object "${WATCHER_KEY}"; add "${WATCHER_GLOB}": true manually`;
|
|
88
|
+
}
|
|
89
|
+
const map = watcher ?? {};
|
|
90
|
+
if (map[WATCHER_GLOB] === true) {
|
|
91
|
+
return `· ${VSCODE_SETTINGS} file watcher already excludes .harnery/`;
|
|
92
|
+
}
|
|
93
|
+
if (dryRun)
|
|
94
|
+
return `+ would add ${WATCHER_GLOB} to ${WATCHER_KEY} in ${VSCODE_SETTINGS}`;
|
|
95
|
+
map[WATCHER_GLOB] = true;
|
|
96
|
+
settings[WATCHER_KEY] = map;
|
|
97
|
+
writeFileSync(path, `${JSON.stringify(settings, null, 2)}\n`);
|
|
98
|
+
return `+ added ${WATCHER_GLOB} to ${WATCHER_KEY} in ${VSCODE_SETTINGS}`;
|
|
99
|
+
}
|
|
100
|
+
function removeCursorIgnore(projectRoot, dryRun) {
|
|
101
|
+
const path = resolve(projectRoot, CURSOR_IGNORE);
|
|
102
|
+
if (!existsSync(path))
|
|
103
|
+
return null;
|
|
104
|
+
const raw = readFileSync(path, "utf8");
|
|
105
|
+
const lines = raw.split("\n");
|
|
106
|
+
// Only the managed pair is ours. A bare `.harnery/` line without the managed
|
|
107
|
+
// comment is a consumer's own entry and stays.
|
|
108
|
+
if (!lines.some((line) => line.trim() === MANAGED_COMMENT))
|
|
109
|
+
return null;
|
|
110
|
+
if (dryRun)
|
|
111
|
+
return `+ would remove the managed .harnery/ entry from ${CURSOR_IGNORE}`;
|
|
112
|
+
const kept = lines.filter((line) => {
|
|
113
|
+
const t = line.trim();
|
|
114
|
+
return t !== MANAGED_COMMENT && t !== MANAGED_ENTRY;
|
|
115
|
+
});
|
|
116
|
+
if (kept.every((line) => line.trim() === "")) {
|
|
117
|
+
rmSync(path);
|
|
118
|
+
return `+ removed ${CURSOR_IGNORE} (was harnery-only)`;
|
|
119
|
+
}
|
|
120
|
+
let out = kept.join("\n");
|
|
121
|
+
if (!out.endsWith("\n"))
|
|
122
|
+
out += "\n";
|
|
123
|
+
writeFileSync(path, out);
|
|
124
|
+
return `+ removed the managed .harnery/ entry from ${CURSOR_IGNORE}`;
|
|
125
|
+
}
|
|
126
|
+
function removeVscodeWatcherExclude(projectRoot, dryRun) {
|
|
127
|
+
const path = resolve(projectRoot, VSCODE_SETTINGS);
|
|
128
|
+
if (!existsSync(path))
|
|
129
|
+
return null;
|
|
130
|
+
let parsed;
|
|
131
|
+
try {
|
|
132
|
+
parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
// Not plain JSON, so apply never wrote into it.
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed))
|
|
139
|
+
return null;
|
|
140
|
+
const settings = parsed;
|
|
141
|
+
const watcher = settings[WATCHER_KEY];
|
|
142
|
+
if (typeof watcher !== "object" || watcher === null || Array.isArray(watcher))
|
|
143
|
+
return null;
|
|
144
|
+
const map = watcher;
|
|
145
|
+
if (!(WATCHER_GLOB in map))
|
|
146
|
+
return null;
|
|
147
|
+
if (dryRun)
|
|
148
|
+
return `+ would remove ${WATCHER_GLOB} from ${VSCODE_SETTINGS}`;
|
|
149
|
+
delete map[WATCHER_GLOB];
|
|
150
|
+
if (Object.keys(map).length === 0)
|
|
151
|
+
delete settings[WATCHER_KEY];
|
|
152
|
+
if (Object.keys(settings).length === 0) {
|
|
153
|
+
rmSync(path);
|
|
154
|
+
try {
|
|
155
|
+
// Drop the .vscode/ directory too when the settings file was all it held.
|
|
156
|
+
rmdirSync(resolve(projectRoot, VSCODE_DIR));
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
// Non-empty or shared; leave it.
|
|
160
|
+
}
|
|
161
|
+
return `+ removed ${VSCODE_SETTINGS} (was harnery-only)`;
|
|
162
|
+
}
|
|
163
|
+
writeFileSync(path, `${JSON.stringify(settings, null, 2)}\n`);
|
|
164
|
+
return `+ removed ${WATCHER_GLOB} from ${VSCODE_SETTINGS}`;
|
|
165
|
+
}
|
|
166
|
+
/** Ensure both editor exclusions exist. Returns init-style action lines. */
|
|
167
|
+
export function applyIndexerExclusions(projectRoot, dryRun) {
|
|
168
|
+
return [applyCursorIgnore(projectRoot, dryRun), applyVscodeWatcherExclude(projectRoot, dryRun)];
|
|
169
|
+
}
|
|
170
|
+
/** Reverse exactly what apply wrote. Returns action lines; silent when nothing is ours. */
|
|
171
|
+
export function removeIndexerExclusions(projectRoot, dryRun) {
|
|
172
|
+
return [
|
|
173
|
+
removeCursorIgnore(projectRoot, dryRun),
|
|
174
|
+
removeVscodeWatcherExclude(projectRoot, dryRun),
|
|
175
|
+
].filter((line) => line !== null);
|
|
176
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/apply.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAsDH,sFAAsF;AACtF,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAYlE;
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/apply.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAsDH,sFAAsF;AACtF,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAYlE;AAmBD,UAAU,SAAS;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,WAAW,CA+GnF;AAED,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,WAAW,CAkFrF;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IACpC,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACzC,WAAW,CAkDb"}
|
|
@@ -70,6 +70,7 @@ function blockSkills(projectRoot, adapter) {
|
|
|
70
70
|
decide: supported && !exclude.has("harn-decide"),
|
|
71
71
|
council: supported && !exclude.has("harn-council"),
|
|
72
72
|
end: supported && !exclude.has("harn-end"),
|
|
73
|
+
team: supported && !exclude.has("harn-team"),
|
|
73
74
|
};
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
@@ -29,6 +29,8 @@ export interface BlockSkills {
|
|
|
29
29
|
council: boolean;
|
|
30
30
|
/** the `harn-end` skill file is present */
|
|
31
31
|
end: boolean;
|
|
32
|
+
/** the `harn-team` skill file is present */
|
|
33
|
+
team: boolean;
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
36
|
* The always-on orientation spliced into `AGENTS.md`. Target ≤ 80 rendered
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAClD,sEAAsE;AACtE,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AAEpD,2EAA2E;AAC3E,MAAM,WAAW,WAAW;IAC1B,8CAA8C;IAC9C,MAAM,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,2CAA2C;IAC3C,GAAG,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAClD,sEAAsE;AACtE,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AAEpD,2EAA2E;AAC3E,MAAM,WAAW,WAAW;IAC1B,8CAA8C;IAC9C,MAAM,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,2CAA2C;IAC3C,GAAG,EAAE,OAAO,CAAC;IACb,4CAA4C;IAC5C,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,WAAoE,GAC3E,MAAM,CA0GR;AAID,mFAAmF;AACnF,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CACrC;AAmVD,eAAO,MAAM,MAAM,EAAE,aAAa,EAiDjC,CAAC"}
|
|
@@ -35,12 +35,13 @@ export const HOST_ADDENDUM_REGION = "host-addendum";
|
|
|
35
35
|
* excludes one via `skills.exclude` gets a CLI pointer instead of a dangling
|
|
36
36
|
* reference to a skill it doesn't have.
|
|
37
37
|
*/
|
|
38
|
-
export function renderInstructionsBlock(binName, skills = { decide: true, council: true, end: true }) {
|
|
38
|
+
export function renderInstructionsBlock(binName, skills = { decide: true, council: true, end: true, team: true }) {
|
|
39
39
|
const b = binName;
|
|
40
40
|
const named = [
|
|
41
41
|
skills.decide && "`harn-decide`",
|
|
42
42
|
skills.council && "`harn-council`",
|
|
43
43
|
skills.end && "`harn-end`",
|
|
44
|
+
skills.team && "`harn-team`",
|
|
44
45
|
].filter(Boolean);
|
|
45
46
|
const deeper = named.length > 0
|
|
46
47
|
? `Procedures for the deeper flows live in the ${named.join(" and ")} skill${named.length > 1 ? "s" : ""}.`
|
|
@@ -54,6 +55,9 @@ export function renderInstructionsBlock(binName, skills = { decide: true, counci
|
|
|
54
55
|
const endPointer = skills.end
|
|
55
56
|
? "When the whole session is genuinely finished, use the `harn-end` skill as the final workflow."
|
|
56
57
|
: `When the whole session is genuinely finished, run \`${b} agents status --end-turn --end-session\` as the final tool action.`;
|
|
58
|
+
const teamPointer = skills.team
|
|
59
|
+
? "The `harn-team` skill owns the tier choice, the governor artifacts, and the drive loop."
|
|
60
|
+
: `See \`${b} governor --help\` for the tier choice and the drive loop.`;
|
|
57
61
|
// Render the journal categories from the canonical enum so this prose can
|
|
58
62
|
// never drift from what `journal add` actually accepts (the "note, plan…" list
|
|
59
63
|
// silently lagged the tool by two categories before this).
|
|
@@ -95,6 +99,7 @@ first when one pass will do, the second when the objective must outlive the
|
|
|
95
99
|
attempt, and the third when a human would otherwise have to babysit the loop. A
|
|
96
100
|
run that needs authorization parks durably instead of failing, so check
|
|
97
101
|
\`${b} approval list\` when one appears to be waiting rather than stuck.
|
|
102
|
+
${teamPointer}
|
|
98
103
|
|
|
99
104
|
**Durable role handoff.** When you are replacing a prior session in the same
|
|
100
105
|
named role, run \`${b} agents identity assume <name>\` before declaring your task.
|
|
@@ -103,9 +108,10 @@ live process still holds the name; never hand-edit Harnery's history, heartbeat,
|
|
|
103
108
|
or derived identity cache.
|
|
104
109
|
|
|
105
110
|
**Declare intent on shell commands.** Every command you run is captured to the
|
|
106
|
-
coordination ledger. Lead a shell command with a
|
|
107
|
-
the tool's description) so the recorded event
|
|
108
|
-
\`(no intent)
|
|
111
|
+
coordination ledger (\`.harnery/ledgers/v3/\`). Lead a shell command with a
|
|
112
|
+
\`# intent: <why>\` comment (or set the tool's description) so the recorded event
|
|
113
|
+
carries a reason instead of \`(no intent)\`; the [tool-intent
|
|
114
|
+
guide](https://harnery.com/guides/tool-intent/) owns the details.
|
|
109
115
|
|
|
110
116
|
**Journal.** \`${b} journal add <category> "<text>"\` (category = ${journalCats})
|
|
111
117
|
leaves breadcrumbs that survive context compaction;
|
|
@@ -119,6 +125,11 @@ returned path, then run \`${b} artifacts release <id>\` when active work is done
|
|
|
119
125
|
Do not create a repo-root temp directory; \`${b} artifacts clean\` previews
|
|
120
126
|
expired cleanup and requires \`--yes\` to delete anything.
|
|
121
127
|
|
|
128
|
+
**Local file links.** When the operator should open a local repo file, mint the
|
|
129
|
+
URL with \`${b} files url <repo-relative-path>\` instead of guessing it. HTML opens
|
|
130
|
+
as a real page with working scripts and relative assets; other files open in the
|
|
131
|
+
dashboard viewer. Use localhost links only when the operator shares this machine.
|
|
132
|
+
|
|
122
133
|
**Decision docket.** When you would otherwise stop to ask a human a decision you
|
|
123
134
|
can't resolve from the repo, file it instead. \`${b} decision file "<question>"\`
|
|
124
135
|
records it and lets you proceed on a stated default; \`${b} decision search "<terms>"\`
|
|
@@ -336,6 +347,130 @@ explicitly identifies it. Use the web control or \`${b} agents end --instance-id
|
|
|
336
347
|
<id>\` for that operator action; it records immediately for an idle session or
|
|
337
348
|
durably queues the end for its current turn.`;
|
|
338
349
|
}
|
|
350
|
+
function teamBody(b) {
|
|
351
|
+
return `Harnery gives you three ways to put more than one agent on a job. They differ
|
|
352
|
+
by how long the objective outlives a single execution, and picking the wrong one
|
|
353
|
+
is the usual reason a team spins. This skill owns that choice, the files a
|
|
354
|
+
governed team needs, and the drive loop.
|
|
355
|
+
|
|
356
|
+
## Step 0: do not build a second team
|
|
357
|
+
|
|
358
|
+
Run this before anything else, every time:
|
|
359
|
+
|
|
360
|
+
\`\`\`bash
|
|
361
|
+
${b} governor list
|
|
362
|
+
\`\`\`
|
|
363
|
+
|
|
364
|
+
If a goal already covers the objective, **you are done building** — drive the
|
|
365
|
+
existing one (Step 3). A second team pointed at the same tree fights the first:
|
|
366
|
+
both hold the same files and their frozen missions contradict each other. It is
|
|
367
|
+
the most expensive mistake available here, and it looks like progress while you
|
|
368
|
+
make it. Listings are tolerant: an unreadable record prints a warning row with
|
|
369
|
+
its id, which is evidence the goal *exists* — inspect it before creating a
|
|
370
|
+
replacement. Treat stale or suffixed experiment goals as shared runtime state;
|
|
371
|
+
archiving them is an operator call, not yours.
|
|
372
|
+
|
|
373
|
+
## Step 1: pick the tier
|
|
374
|
+
|
|
375
|
+
Match the tier to how long the objective must survive, not to how big it feels.
|
|
376
|
+
|
|
377
|
+
| Surface | Use when | Dies when |
|
|
378
|
+
|---|---|---|
|
|
379
|
+
| \`${b} run <script>\` | One bounded pass: deterministic JS stages fan out to headless subagents. | The pass ends. Nothing remembers it. |
|
|
380
|
+
| \`${b} work create <title> <workflow>\` | The objective must outlive the attempt: retries, failures, review rounds. | You accept or cancel it. |
|
|
381
|
+
| \`${b} governor create\` | A graph of interdependent work with distinct roles, where a human would otherwise babysit the loop. | You accept the root or it exhausts its bounds. |
|
|
382
|
+
|
|
383
|
+
When unsure, start with \`${b} run\`: it is the only tier you can throw away for
|
|
384
|
+
free, and iterating a script there before freezing it is how you avoid
|
|
385
|
+
invalidating a durable work item later. And check the sizing first: a single
|
|
386
|
+
agent often matches a team on a task that does not truly decompose — reliability
|
|
387
|
+
is multiplicative across steps, and the metric that decides is cost per
|
|
388
|
+
completed task, not agent count.
|
|
389
|
+
|
|
390
|
+
## Step 2: build the governor team
|
|
391
|
+
|
|
392
|
+
Four artifacts, kept in a managed workspace
|
|
393
|
+
(\`${b} artifacts create <slug> --purpose "<why>"\`), then frozen:
|
|
394
|
+
|
|
395
|
+
**team.json** maps specialist id to profile: \`instructions\` (the role's whole
|
|
396
|
+
charter) plus optional \`adapter\`, \`effort\`, \`maxAttempts\`. Two role rules
|
|
397
|
+
carry most of the value: **split producing evidence from judging it** (a
|
|
398
|
+
verifier that runs gates, a separate reviewer that accepts or refuses — no agent
|
|
399
|
+
grades its own homework), and **add a standing scope-auditor** that reports at
|
|
400
|
+
each milestone whether the finish line moved, since no one else is positioned to
|
|
401
|
+
notice a rising bar. Write each role's hard boundaries explicitly, in the
|
|
402
|
+
negative: name every act that is somebody else's. Write every brief as a
|
|
403
|
+
four-part contract — objective, output (the named artifact that proves it),
|
|
404
|
+
tools, boundaries — and pass references, not pasted content. \`timeoutMs\` and
|
|
405
|
+
\`maxTurns\` are workflow-script options, never specialist-profile keys; the
|
|
406
|
+
create command rejects unsupported keys with the offending key and the allowed
|
|
407
|
+
set.
|
|
408
|
+
|
|
409
|
+
**mission.json** carries \`objective\`, \`acceptance\` (criteria), and
|
|
410
|
+
\`max_milestones\`. Write acceptance so **refusing is a representable outcome**
|
|
411
|
+
("X exists, or the blocker is stated with its citation") — a criterion an agent
|
|
412
|
+
cannot satisfy by correctly refusing gets reissued forever. Every criterion
|
|
413
|
+
names the artifact that satisfies it (a path, a passing command, a review
|
|
414
|
+
record); a criterion satisfiable by prose will eventually be satisfied exactly
|
|
415
|
+
that way.
|
|
416
|
+
|
|
417
|
+
**replanning.json** freezes the planner policy: \`planner_specialist\`,
|
|
418
|
+
\`auto_apply\`, \`max_replans\`, \`max_work_items_per_plan\`,
|
|
419
|
+
\`max_total_work_items\`, a \`templates\` catalog, and \`review\` with
|
|
420
|
+
\`reviewer_specialists\` and \`max_revision_rounds\`. Keep \`auto_apply: false\`
|
|
421
|
+
and proof auto-acceptance off for anything that can touch public state.
|
|
422
|
+
|
|
423
|
+
**Workflow templates** are the plain-JS scripts the planner may choose from;
|
|
424
|
+
route product decisions to a decision-brief template, never an implement one.
|
|
425
|
+
Authoring traps (frozen script hashes, the five-minute \`timeoutMs\` default,
|
|
426
|
+
schema caps, child sandboxes) live in the
|
|
427
|
+
[workflow-authoring guide](https://harnery.com/guides/workflow-authoring/).
|
|
428
|
+
|
|
429
|
+
\`\`\`bash
|
|
430
|
+
${b} governor create --id <goal-id> --title "<title>" \\
|
|
431
|
+
--team <ws>/team.json --mission <ws>/mission.json \\
|
|
432
|
+
--replanning <ws>/replanning.json --max-parallel-work 2 --json
|
|
433
|
+
\`\`\`
|
|
434
|
+
|
|
435
|
+
## Step 3: drive it
|
|
436
|
+
|
|
437
|
+
\`${b} governor show <goal-id> --json\` — the \`projection\` object is the whole
|
|
438
|
+
dashboard: read \`state\`, \`reason\`, and \`next_action\`, then do exactly that
|
|
439
|
+
action. Useful fields: \`ready_work\` / \`retryable_work\` / \`attention_work\`,
|
|
440
|
+
\`decision_blocked_work\` (parked on a docket entry, not broken),
|
|
441
|
+
\`replans_used\` / \`replans_remaining\`, and the milestone counters.
|
|
442
|
+
|
|
443
|
+
\`\`\`bash
|
|
444
|
+
${b} governor tick <goal-id> # at most one scheduling cycle
|
|
445
|
+
${b} governor run <goal-id> # cycles until success, attention, or budget
|
|
446
|
+
${b} approval list # a run needing authorization parks, not fails
|
|
447
|
+
\`\`\`
|
|
448
|
+
|
|
449
|
+
Rules that prevent stranded work:
|
|
450
|
+
|
|
451
|
+
- **Never drive a governed item with \`${b} work retry\` or \`${b} work run\`.**
|
|
452
|
+
Only the governor supplies the frozen specialist map; a bare retry starts a
|
|
453
|
+
run with no team, dies at the first specialist stage, and still burns the
|
|
454
|
+
attempt. \`${b} work retry\` is for standalone work only.
|
|
455
|
+
- **A blocked item cannot be accepted.** When its objective was met out of band,
|
|
456
|
+
the door back is \`${b} work reopen\` plus a fresh governor cycle, not accept.
|
|
457
|
+
- **Read the spin signals before retrying.** Zero milestones with climbing
|
|
458
|
+
\`replans_used\` and repeated reviewer rejections means the mission prose or
|
|
459
|
+
acceptance criteria are wrong, not the agents. Replans are capped; diagnose
|
|
460
|
+
first.
|
|
461
|
+
- **A frozen mission cannot be edited** — deliberately. Pass corrections as
|
|
462
|
+
retry context on individual items, or create a new goal and cancel the old
|
|
463
|
+
one. Do not keep re-planning against prose you know is stale.
|
|
464
|
+
- **"ended without terminal evidence"** means the child died before writing its
|
|
465
|
+
proof, not that the work failed. Check whether the outcome landed before
|
|
466
|
+
redoing it.
|
|
467
|
+
|
|
468
|
+
## Reporting back
|
|
469
|
+
|
|
470
|
+
Tell the operator which tier you chose and why, the goal id, the roles, and the
|
|
471
|
+
single next action. If you declined to build a team because one already existed,
|
|
472
|
+
say that first; it is the most useful sentence in the reply.`;
|
|
473
|
+
}
|
|
339
474
|
export const SKILLS = [
|
|
340
475
|
{
|
|
341
476
|
id: "harn-decide",
|
|
@@ -367,4 +502,14 @@ export const SKILLS = [
|
|
|
367
502
|
body: endBody(binName),
|
|
368
503
|
}),
|
|
369
504
|
},
|
|
505
|
+
{
|
|
506
|
+
id: "harn-team",
|
|
507
|
+
relPath: "harn-team/SKILL.md",
|
|
508
|
+
render: (binName) => buildOwnedSkill({
|
|
509
|
+
name: "harn-team",
|
|
510
|
+
description: "Stand up and drive a multi-agent team on an objective: pick between a bounded run, durable work, and a governed role team; build the governor artifacts; drive off projection.next_action. Use when asked to put a team of agents on a job, orchestrate agents, or check on a goal already running. Refuses to build a second team when one already covers the objective.",
|
|
511
|
+
binName,
|
|
512
|
+
body: teamBody(binName),
|
|
513
|
+
}),
|
|
514
|
+
},
|
|
370
515
|
];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Mnemonic dashboard port: 4276 spells HARN on a phone keypad. */
|
|
2
|
+
export declare const DEFAULT_WEB_PORT = 4276;
|
|
3
|
+
/** Cookie-isolated host for navigable repo files. */
|
|
4
|
+
export declare const FILES_ORIGIN_HOST = "harnery-files.localhost";
|
|
5
|
+
/** Encode each repo-path segment while preserving slash-based URL resolution. */
|
|
6
|
+
export declare function encodedRepoPath(relPath: string): string;
|
|
7
|
+
export declare function localFilesOriginUrl(relPath: string, port?: number | string, protocol?: string): string;
|
|
8
|
+
export declare function localFileViewerUrl(relPath: string, port?: number | string): string;
|
|
9
|
+
//# sourceMappingURL=local-file-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-file-url.d.ts","sourceRoot":"","sources":["../../src/lib/local-file-url.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC,qDAAqD;AACrD,eAAO,MAAM,iBAAiB,4BAA4B,CAAC;AAE3D,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAOvD;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,MAAM,GAAG,MAAyB,EACxC,QAAQ,SAAU,GACjB,MAAM,CAGR;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,MAAM,GAAG,MAAyB,GACvC,MAAM,CAER"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Mnemonic dashboard port: 4276 spells HARN on a phone keypad. */
|
|
2
|
+
export const DEFAULT_WEB_PORT = 4276;
|
|
3
|
+
/** Cookie-isolated host for navigable repo files. */
|
|
4
|
+
export const FILES_ORIGIN_HOST = "harnery-files.localhost";
|
|
5
|
+
/** Encode each repo-path segment while preserving slash-based URL resolution. */
|
|
6
|
+
export function encodedRepoPath(relPath) {
|
|
7
|
+
return relPath
|
|
8
|
+
.replace(/^\/+/, "")
|
|
9
|
+
.split("/")
|
|
10
|
+
.filter(Boolean)
|
|
11
|
+
.map((segment) => encodeURIComponent(segment))
|
|
12
|
+
.join("/");
|
|
13
|
+
}
|
|
14
|
+
export function localFilesOriginUrl(relPath, port = DEFAULT_WEB_PORT, protocol = "http:") {
|
|
15
|
+
const portPart = String(port) === "" ? "" : `:${port}`;
|
|
16
|
+
return `${protocol}//${FILES_ORIGIN_HOST}${portPart}/${encodedRepoPath(relPath)}`;
|
|
17
|
+
}
|
|
18
|
+
export function localFileViewerUrl(relPath, port = DEFAULT_WEB_PORT) {
|
|
19
|
+
return `http://localhost:${port}/files?path=${encodeURIComponent(relPath)}`;
|
|
20
|
+
}
|