harnery 0.33.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commander.d.ts.map +1 -1
- package/dist/commander.js +4 -0
- package/dist/commands/adapter.js +2 -2
- package/dist/commands/agents.d.ts +144 -1
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +1220 -588
- package/dist/commands/artifacts.d.ts.map +1 -1
- package/dist/commands/artifacts.js +7 -6
- package/dist/commands/backup.d.ts +1 -1
- package/dist/commands/backup.d.ts.map +1 -1
- package/dist/commands/backup.js +29 -16
- package/dist/commands/browse.d.ts.map +1 -1
- package/dist/commands/browse.js +234 -12
- package/dist/commands/checkpoint.d.ts.map +1 -1
- package/dist/commands/checkpoint.js +3 -2
- package/dist/commands/claude-desktop.d.ts +1 -1
- package/dist/commands/claude-desktop.d.ts.map +1 -1
- package/dist/commands/claude-desktop.js +3 -74
- package/dist/commands/context.js +1 -6
- package/dist/commands/decision.d.ts.map +1 -1
- package/dist/commands/decision.js +22 -38
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +91 -28
- package/dist/commands/doctor.js +10 -1
- package/dist/commands/events.d.ts +5 -0
- package/dist/commands/events.d.ts.map +1 -0
- package/dist/commands/events.js +189 -0
- package/dist/commands/governor.d.ts.map +1 -1
- package/dist/commands/governor.js +13 -4
- package/dist/commands/init.d.ts +9 -2
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +223 -51
- package/dist/commands/journal.d.ts.map +1 -1
- package/dist/commands/journal.js +4 -13
- package/dist/commands/ledger-v3.d.ts +5 -0
- package/dist/commands/ledger-v3.d.ts.map +1 -0
- package/dist/commands/ledger-v3.js +91 -0
- package/dist/commands/presence.d.ts.map +1 -1
- package/dist/commands/presence.js +11 -5
- package/dist/commands/sync.d.ts +1 -1
- package/dist/commands/sync.js +1 -1
- package/dist/commands/web.d.ts +6 -0
- package/dist/commands/web.d.ts.map +1 -1
- package/dist/commands/web.js +67 -7
- package/dist/commands/work.d.ts.map +1 -1
- package/dist/commands/work.js +22 -5
- package/dist/core/adapter.d.ts +5 -0
- package/dist/core/adapter.d.ts.map +1 -0
- package/dist/core/adapter.js +1 -0
- package/dist/core/adapters/attest.d.ts +5 -2
- package/dist/core/adapters/attest.d.ts.map +1 -1
- package/dist/core/adapters/attest.js +8 -3
- package/dist/core/adapters/profiles.d.ts +6 -6
- package/dist/core/adapters/profiles.d.ts.map +1 -1
- package/dist/core/adapters/profiles.js +4 -4
- package/dist/core/agents/canonical-emit.d.ts +17 -15
- package/dist/core/agents/canonical-emit.d.ts.map +1 -1
- package/dist/core/agents/canonical-emit.js +22 -22
- package/dist/core/agents/cli.js +207 -234
- package/dist/core/agents/codex-archive-v3.d.ts +14 -0
- package/dist/core/agents/codex-archive-v3.d.ts.map +1 -0
- package/dist/core/agents/codex-archive-v3.js +110 -0
- package/dist/core/agents/coord-client.d.ts +19 -81
- package/dist/core/agents/coord-client.d.ts.map +1 -1
- package/dist/core/agents/coord-client.js +65 -155
- package/dist/core/agents/finalization.d.ts +4 -1
- package/dist/core/agents/finalization.d.ts.map +1 -1
- package/dist/core/agents/finalization.js +89 -32
- package/dist/core/agents/index.d.ts +4 -5
- package/dist/core/agents/index.d.ts.map +1 -1
- package/dist/core/agents/index.js +4 -5
- package/dist/core/agents/live-authority-v3.d.ts +59 -0
- package/dist/core/agents/live-authority-v3.d.ts.map +1 -0
- package/dist/core/agents/live-authority-v3.js +233 -0
- package/dist/core/agents/live-lifecycle-v3.d.ts +20 -0
- package/dist/core/agents/live-lifecycle-v3.d.ts.map +1 -0
- package/dist/core/agents/live-lifecycle-v3.js +91 -0
- package/dist/core/agents/live-observation-v3.d.ts +25 -0
- package/dist/core/agents/live-observation-v3.d.ts.map +1 -0
- package/dist/core/agents/live-observation-v3.js +157 -0
- package/dist/core/agents/render/prompt-context.d.ts +4 -4
- package/dist/core/agents/render/prompt-context.d.ts.map +1 -1
- package/dist/core/agents/render/prompt-context.js +23 -58
- package/dist/core/agents/render/session-context.d.ts +1 -1
- package/dist/core/agents/render/session-context.d.ts.map +1 -1
- package/dist/core/agents/render/session-context.js +8 -32
- package/dist/core/agents/rules/claim-conflict.d.ts +3 -3
- package/dist/core/agents/rules/claim-conflict.d.ts.map +1 -1
- package/dist/core/agents/rules/claim-conflict.js +79 -127
- package/dist/core/agents/rules/commit-conflict.d.ts.map +1 -1
- package/dist/core/agents/rules/commit-conflict.js +3 -18
- package/dist/core/agents/rules/stop-hook.d.ts +9 -50
- package/dist/core/agents/rules/stop-hook.d.ts.map +1 -1
- package/dist/core/agents/rules/stop-hook.js +193 -236
- package/dist/core/agents/session-events.d.ts +5 -7
- package/dist/core/agents/session-events.d.ts.map +1 -1
- package/dist/core/agents/session-events.js +127 -95
- package/dist/core/agents/session-finalization-state-v3.d.ts +30 -0
- package/dist/core/agents/session-finalization-state-v3.d.ts.map +1 -0
- package/dist/core/agents/session-finalization-state-v3.js +40 -0
- package/dist/core/agents/session-finalizer-v3.d.ts +107 -0
- package/dist/core/agents/session-finalizer-v3.d.ts.map +1 -0
- package/dist/core/agents/session-finalizer-v3.js +734 -0
- package/dist/core/agents/session-name-display.d.ts +40 -0
- package/dist/core/agents/session-name-display.d.ts.map +1 -0
- package/dist/core/agents/session-name-display.js +119 -0
- package/dist/core/agents/state/activity-log.d.ts +3 -3
- package/dist/core/agents/state/activity-log.d.ts.map +1 -1
- package/dist/core/agents/state/activity-log.js +7 -16
- package/dist/core/agents/state/heartbeat-writer.d.ts +23 -55
- package/dist/core/agents/state/heartbeat-writer.d.ts.map +1 -1
- package/dist/core/agents/state/heartbeat-writer.js +56 -228
- package/dist/core/agents/state/live-coordination-view.d.ts +31 -0
- package/dist/core/agents/state/live-coordination-view.d.ts.map +1 -0
- package/dist/core/agents/state/live-coordination-view.js +209 -0
- package/dist/core/agents/state/session-state.d.ts +4 -3
- package/dist/core/agents/state/session-state.d.ts.map +1 -1
- package/dist/core/agents/state/session-state.js +18 -9
- package/dist/core/agents/state/stale-sweep.d.ts +1 -1
- package/dist/core/agents/state/stale-sweep.d.ts.map +1 -1
- package/dist/core/agents/state/stale-sweep.js +26 -15
- package/dist/core/artifacts/index.d.ts.map +1 -1
- package/dist/core/artifacts/index.js +5 -7
- package/dist/core/config.d.ts +33 -2
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +98 -2
- package/dist/core/context/index.d.ts +1 -4
- package/dist/core/context/index.d.ts.map +1 -1
- package/dist/core/context/index.js +9 -9
- package/dist/core/events/span-parent.d.ts +15 -0
- package/dist/core/events/span-parent.d.ts.map +1 -0
- package/dist/core/events/span-parent.js +34 -0
- package/dist/core/events/v3/advance.d.ts +14 -0
- package/dist/core/events/v3/advance.d.ts.map +1 -0
- package/dist/core/events/v3/advance.js +134 -0
- package/dist/core/events/v3/authority-outbox.d.ts +78 -0
- package/dist/core/events/v3/authority-outbox.d.ts.map +1 -0
- package/dist/core/events/v3/authority-outbox.js +399 -0
- package/dist/core/events/v3/base-builder.d.ts +20 -0
- package/dist/core/events/v3/base-builder.d.ts.map +1 -0
- package/dist/core/events/v3/base-builder.js +29 -0
- package/dist/core/events/v3/base-contract.d.ts +7576 -0
- package/dist/core/events/v3/base-contract.d.ts.map +1 -0
- package/dist/core/events/v3/base-contract.js +647 -0
- package/dist/core/events/v3/bootstrap.d.ts +34 -0
- package/dist/core/events/v3/bootstrap.d.ts.map +1 -0
- package/dist/core/events/v3/bootstrap.js +175 -0
- package/dist/core/events/v3/builder.d.ts +20 -0
- package/dist/core/events/v3/builder.d.ts.map +1 -0
- package/dist/core/events/v3/builder.js +28 -0
- package/dist/core/events/v3/canonical.d.ts +31 -0
- package/dist/core/events/v3/canonical.d.ts.map +1 -0
- package/dist/core/events/v3/canonical.js +100 -0
- package/dist/core/events/v3/capabilities.d.ts +31 -0
- package/dist/core/events/v3/capabilities.d.ts.map +1 -0
- package/dist/core/events/v3/capabilities.js +107 -0
- package/dist/core/events/v3/capability-drift.d.ts +22 -0
- package/dist/core/events/v3/capability-drift.d.ts.map +1 -0
- package/dist/core/events/v3/capability-drift.js +134 -0
- package/dist/core/events/v3/catalog.d.ts +38 -0
- package/dist/core/events/v3/catalog.d.ts.map +1 -0
- package/dist/core/events/v3/catalog.js +135 -0
- package/dist/core/events/v3/clock-order.d.ts +34 -0
- package/dist/core/events/v3/clock-order.d.ts.map +1 -0
- package/dist/core/events/v3/clock-order.js +35 -0
- package/dist/core/events/v3/contract.d.ts +171 -0
- package/dist/core/events/v3/contract.d.ts.map +1 -0
- package/dist/core/events/v3/contract.js +180 -0
- package/dist/core/events/v3/control.d.ts +111 -0
- package/dist/core/events/v3/control.d.ts.map +1 -0
- package/dist/core/events/v3/control.js +419 -0
- package/dist/core/events/v3/coordination-view.d.ts +69 -0
- package/dist/core/events/v3/coordination-view.d.ts.map +1 -0
- package/dist/core/events/v3/coordination-view.js +119 -0
- package/dist/core/events/v3/economics.d.ts +77 -0
- package/dist/core/events/v3/economics.d.ts.map +1 -0
- package/dist/core/events/v3/economics.js +274 -0
- package/dist/core/events/v3/finalization-view.d.ts +26 -0
- package/dist/core/events/v3/finalization-view.d.ts.map +1 -0
- package/dist/core/events/v3/finalization-view.js +37 -0
- package/dist/core/events/v3/fingerprint-keys.d.ts +25 -0
- package/dist/core/events/v3/fingerprint-keys.d.ts.map +1 -0
- package/dist/core/events/v3/fingerprint-keys.js +217 -0
- package/dist/core/events/v3/generated.d.ts +4 -0
- package/dist/core/events/v3/generated.d.ts.map +1 -0
- package/dist/core/events/v3/generated.js +47 -0
- package/dist/core/events/v3/ids.d.ts +9 -0
- package/dist/core/events/v3/ids.d.ts.map +1 -0
- package/dist/core/events/v3/ids.js +25 -0
- package/dist/core/events/v3/index.d.ts +35 -0
- package/dist/core/events/v3/index.d.ts.map +1 -0
- package/dist/core/events/v3/index.js +33 -0
- package/dist/core/events/v3/latency.d.ts +63 -0
- package/dist/core/events/v3/latency.d.ts.map +1 -0
- package/dist/core/events/v3/latency.js +412 -0
- package/dist/core/events/v3/live-feed.d.ts +45 -0
- package/dist/core/events/v3/live-feed.d.ts.map +1 -0
- package/dist/core/events/v3/live-feed.js +246 -0
- package/dist/core/events/v3/live-observation.d.ts +35 -0
- package/dist/core/events/v3/live-observation.d.ts.map +1 -0
- package/dist/core/events/v3/live-observation.js +1 -0
- package/dist/core/events/v3/live-routing.d.ts +57 -0
- package/dist/core/events/v3/live-routing.d.ts.map +1 -0
- package/dist/core/events/v3/live-routing.js +107 -0
- package/dist/core/events/v3/producers/command-recorder.d.ts +67 -0
- package/dist/core/events/v3/producers/command-recorder.d.ts.map +1 -0
- package/dist/core/events/v3/producers/command-recorder.js +477 -0
- package/dist/core/events/v3/producers/command.d.ts +50 -0
- package/dist/core/events/v3/producers/command.d.ts.map +1 -0
- package/dist/core/events/v3/producers/command.js +135 -0
- package/dist/core/events/v3/producers/coordination-recorder.d.ts +53 -0
- package/dist/core/events/v3/producers/coordination-recorder.d.ts.map +1 -0
- package/dist/core/events/v3/producers/coordination-recorder.js +376 -0
- package/dist/core/events/v3/producers/coordination.d.ts +90 -0
- package/dist/core/events/v3/producers/coordination.d.ts.map +1 -0
- package/dist/core/events/v3/producers/coordination.js +229 -0
- package/dist/core/events/v3/producers/hook-base.d.ts +54 -0
- package/dist/core/events/v3/producers/hook-base.d.ts.map +1 -0
- package/dist/core/events/v3/producers/hook-base.js +424 -0
- package/dist/core/events/v3/producers/hook.d.ts +29 -0
- package/dist/core/events/v3/producers/hook.d.ts.map +1 -0
- package/dist/core/events/v3/producers/hook.js +71 -0
- package/dist/core/events/v3/producers/intake.d.ts +65 -0
- package/dist/core/events/v3/producers/intake.d.ts.map +1 -0
- package/dist/core/events/v3/producers/intake.js +244 -0
- package/dist/core/events/v3/producers/recorder.d.ts +240 -0
- package/dist/core/events/v3/producers/recorder.d.ts.map +1 -0
- package/dist/core/events/v3/producers/recorder.js +2176 -0
- package/dist/core/events/v3/projection.d.ts +101 -0
- package/dist/core/events/v3/projection.d.ts.map +1 -0
- package/dist/core/events/v3/projection.js +479 -0
- package/dist/core/events/v3/reader.d.ts +75 -0
- package/dist/core/events/v3/reader.d.ts.map +1 -0
- package/dist/core/events/v3/reader.js +778 -0
- package/dist/core/events/v3/recovery-record.d.ts +47 -0
- package/dist/core/events/v3/recovery-record.d.ts.map +1 -0
- package/dist/core/events/v3/recovery-record.js +167 -0
- package/dist/core/events/v3/recovery.d.ts +22 -0
- package/dist/core/events/v3/recovery.d.ts.map +1 -0
- package/dist/core/events/v3/recovery.js +227 -0
- package/dist/core/events/v3/span-state.d.ts +52 -0
- package/dist/core/events/v3/span-state.d.ts.map +1 -0
- package/dist/core/events/v3/span-state.js +142 -0
- package/dist/core/events/v3/targets.d.ts +23 -0
- package/dist/core/events/v3/targets.d.ts.map +1 -0
- package/dist/core/events/v3/targets.js +134 -0
- package/dist/core/events/v3/turn-telemetry.d.ts +41 -0
- package/dist/core/events/v3/turn-telemetry.d.ts.map +1 -0
- package/dist/core/events/v3/turn-telemetry.js +168 -0
- package/dist/core/events/v3/validate.d.ts +9 -0
- package/dist/core/events/v3/validate.d.ts.map +1 -0
- package/dist/core/events/v3/validate.js +281 -0
- package/dist/core/events/v3/writer.d.ts +56 -0
- package/dist/core/events/v3/writer.d.ts.map +1 -0
- package/dist/core/events/v3/writer.js +335 -0
- package/dist/core/governor/index.d.ts +1 -1
- package/dist/core/governor/index.d.ts.map +1 -1
- package/dist/core/governor/index.js +1 -1
- package/dist/core/governor/plan-api.d.ts +2 -1
- package/dist/core/governor/plan-api.d.ts.map +1 -1
- package/dist/core/governor/plan-api.js +6 -3
- package/dist/core/governor/read.d.ts +1 -1
- package/dist/core/governor/read.d.ts.map +1 -1
- package/dist/core/governor/read.js +1 -1
- package/dist/core/governor/state.d.ts +9 -0
- package/dist/core/governor/state.d.ts.map +1 -1
- package/dist/core/governor/state.js +40 -3
- package/dist/core/guard/config.d.ts +5 -0
- package/dist/core/guard/config.d.ts.map +1 -0
- package/dist/core/guard/config.js +157 -0
- package/dist/core/guard/coordinator.d.ts +14 -0
- package/dist/core/guard/coordinator.d.ts.map +1 -0
- package/dist/core/guard/coordinator.js +173 -0
- package/dist/core/guard/evaluator.d.ts +4 -0
- package/dist/core/guard/evaluator.d.ts.map +1 -0
- package/dist/core/guard/evaluator.js +242 -0
- package/dist/core/guard/evidence-v3.d.ts +15 -0
- package/dist/core/guard/evidence-v3.d.ts.map +1 -0
- package/dist/core/guard/evidence-v3.js +171 -0
- package/dist/core/guard/index.d.ts +10 -0
- package/dist/core/guard/index.d.ts.map +1 -0
- package/dist/core/guard/index.js +6 -0
- package/dist/core/guard/live-source-v3.d.ts +40 -0
- package/dist/core/guard/live-source-v3.d.ts.map +1 -0
- package/dist/core/guard/live-source-v3.js +128 -0
- package/dist/core/guard/storage.d.ts +27 -0
- package/dist/core/guard/storage.d.ts.map +1 -0
- package/dist/core/guard/storage.js +140 -0
- package/dist/core/guard/types.d.ts +119 -0
- package/dist/core/guard/types.d.ts.map +1 -0
- package/dist/core/guard/types.js +1 -0
- package/dist/core/hooks/adapter/detect.d.ts +18 -1
- package/dist/core/hooks/adapter/detect.d.ts.map +1 -1
- package/dist/core/hooks/adapter/detect.js +29 -0
- package/dist/core/hooks/adapter/events.d.ts +7 -4
- package/dist/core/hooks/adapter/events.d.ts.map +1 -1
- package/dist/core/hooks/adapter/events.js +12 -4
- package/dist/core/hooks/adapter/output.d.ts +2 -2
- package/dist/core/hooks/adapter/output.d.ts.map +1 -1
- package/dist/core/hooks/adapter/parse.d.ts +7 -4
- package/dist/core/hooks/adapter/parse.d.ts.map +1 -1
- package/dist/core/hooks/adapter/parse.js +63 -25
- package/dist/core/hooks/adapter/wiring.d.ts +30 -4
- package/dist/core/hooks/adapter/wiring.d.ts.map +1 -1
- package/dist/core/hooks/adapter/wiring.js +89 -11
- package/dist/core/hooks/cli.d.ts +1 -1
- package/dist/core/hooks/cli.js +305 -444
- package/dist/core/hooks/effects/image-capture.d.ts +20 -34
- package/dist/core/hooks/effects/image-capture.d.ts.map +1 -1
- package/dist/core/hooks/effects/image-capture.js +212 -221
- package/dist/core/hooks/effects/index.d.ts +1 -9
- package/dist/core/hooks/effects/index.d.ts.map +1 -1
- package/dist/core/hooks/effects/index.js +1 -24
- package/dist/core/hooks/events/input-hash.d.ts +7 -0
- package/dist/core/hooks/events/input-hash.d.ts.map +1 -0
- package/dist/core/hooks/events/input-hash.js +43 -0
- package/dist/core/hooks/index.d.ts +4 -3
- package/dist/core/hooks/index.d.ts.map +1 -1
- package/dist/core/hooks/index.js +2 -3
- package/dist/core/hooks/resolve/coord-root.d.ts +1 -1
- package/dist/core/hooks/resolve/coord-root.js +1 -1
- package/dist/core/hooks/resolve/owner.d.ts +16 -15
- package/dist/core/hooks/resolve/owner.d.ts.map +1 -1
- package/dist/core/hooks/resolve/owner.js +51 -42
- package/dist/core/hooks/resolve/transcript.d.ts +33 -3
- package/dist/core/hooks/resolve/transcript.d.ts.map +1 -1
- package/dist/core/hooks/resolve/transcript.js +155 -14
- package/dist/core/hooks/session-name-presence.d.ts +9 -10
- package/dist/core/hooks/session-name-presence.d.ts.map +1 -1
- package/dist/core/hooks/session-name-presence.js +15 -15
- package/dist/core/hooks/unsafe-cross-shell.d.ts +1 -1
- package/dist/core/hooks/unsafe-cross-shell.d.ts.map +1 -1
- package/dist/core/journal/index.d.ts +2 -2
- package/dist/core/journal/index.d.ts.map +1 -1
- package/dist/core/journal/index.js +9 -22
- package/dist/core/presence/blob.d.ts +4 -3
- package/dist/core/presence/blob.d.ts.map +1 -1
- package/dist/core/presence/blob.js +45 -44
- package/dist/core/presence/codec-digest.d.ts +29 -0
- package/dist/core/presence/codec-digest.d.ts.map +1 -0
- package/dist/core/presence/codec-digest.js +170 -0
- package/dist/core/presence/relay-client.d.ts +1 -1
- package/dist/core/presence/relay-client.d.ts.map +1 -1
- package/dist/core/presence/relay-client.js +5 -5
- package/dist/core/work/index.d.ts +1 -1
- package/dist/core/work/index.d.ts.map +1 -1
- package/dist/core/work/index.js +1 -1
- package/dist/core/work/read.d.ts +1 -1
- package/dist/core/work/read.d.ts.map +1 -1
- package/dist/core/work/read.js +1 -1
- package/dist/core/work/runner.d.ts.map +1 -1
- package/dist/core/work/runner.js +6 -0
- package/dist/core/work/state.d.ts +9 -0
- package/dist/core/work/state.d.ts.map +1 -1
- package/dist/core/work/state.js +17 -3
- package/dist/core/workflow/engine.js +24 -25
- package/dist/core/workflow/live-session-v3.d.ts +19 -0
- package/dist/core/workflow/live-session-v3.d.ts.map +1 -0
- package/dist/core/workflow/live-session-v3.js +86 -0
- package/dist/core/workflow/scope-id.d.ts +3 -0
- package/dist/core/workflow/scope-id.d.ts.map +1 -0
- package/dist/core/workflow/scope-id.js +5 -0
- package/dist/core/workflow/workspaces/leases.d.ts +4 -0
- package/dist/core/workflow/workspaces/leases.d.ts.map +1 -1
- package/dist/core/workflow/workspaces/leases.js +53 -19
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/browser/client.d.ts +41 -0
- package/dist/lib/browser/client.d.ts.map +1 -1
- package/dist/lib/browser/client.js +203 -0
- package/dist/lib/browser/critique.d.ts +28 -2
- package/dist/lib/browser/critique.d.ts.map +1 -1
- package/dist/lib/browser/critique.js +74 -18
- package/dist/lib/browser/geometry.d.ts +1 -1
- package/dist/lib/browser/geometry.d.ts.map +1 -1
- package/dist/lib/browser/geometry.js +130 -6
- package/dist/lib/browser/index.d.ts +3 -0
- package/dist/lib/browser/index.d.ts.map +1 -1
- package/dist/lib/browser/index.js +3 -0
- package/dist/lib/browser/qa-plan.d.ts +174 -0
- package/dist/lib/browser/qa-plan.d.ts.map +1 -0
- package/dist/lib/browser/qa-plan.js +321 -0
- package/dist/lib/browser/qa-reuse.d.ts +99 -0
- package/dist/lib/browser/qa-reuse.d.ts.map +1 -0
- package/dist/lib/browser/qa-reuse.js +222 -0
- package/dist/lib/browser/qa-snapshot.d.ts +64 -0
- package/dist/lib/browser/qa-snapshot.d.ts.map +1 -0
- package/dist/lib/browser/qa-snapshot.js +171 -0
- package/dist/lib/browser/runts.d.ts.map +1 -1
- package/dist/lib/browser/runts.js +22 -1
- package/dist/lib/browser/tiling.d.ts +71 -0
- package/dist/lib/browser/tiling.d.ts.map +1 -0
- package/dist/lib/browser/tiling.js +118 -0
- package/dist/lib/claude-desktop.d.ts +0 -47
- package/dist/lib/claude-desktop.d.ts.map +1 -1
- package/dist/lib/claude-desktop.js +1 -169
- package/dist/lib/context/index.d.ts +0 -3
- package/dist/lib/context/index.d.ts.map +1 -1
- package/dist/lib/context/index.js +20 -42
- package/dist/lib/council/index.d.ts +2 -2
- package/dist/lib/council/index.d.ts.map +1 -1
- package/dist/lib/council/index.js +9 -20
- package/dist/lib/docs-frontmatter.d.ts +1 -6
- package/dist/lib/docs-frontmatter.d.ts.map +1 -1
- package/dist/lib/docs-frontmatter.js +12 -78
- package/dist/lib/docs-index.d.ts +9 -0
- package/dist/lib/docs-index.d.ts.map +1 -1
- package/dist/lib/docs-index.js +32 -3
- package/dist/lib/docs-lint.d.ts.map +1 -1
- package/dist/lib/docs-lint.js +14 -30
- package/dist/lib/docs-metadata-audit.d.ts +19 -0
- package/dist/lib/docs-metadata-audit.d.ts.map +1 -0
- package/dist/lib/docs-metadata-audit.js +132 -0
- package/dist/lib/docs-metadata-managed.d.ts +23 -0
- package/dist/lib/docs-metadata-managed.d.ts.map +1 -0
- package/dist/lib/docs-metadata-managed.js +78 -0
- package/dist/lib/docs-metadata-sync.d.ts +20 -0
- package/dist/lib/docs-metadata-sync.d.ts.map +1 -0
- package/dist/lib/docs-metadata-sync.js +222 -0
- package/dist/lib/docs-metadata-v2-schema.d.ts +273 -0
- package/dist/lib/docs-metadata-v2-schema.d.ts.map +1 -0
- package/dist/lib/docs-metadata-v2-schema.js +134 -0
- package/dist/lib/docs-metadata-v2.d.ts +21 -0
- package/dist/lib/docs-metadata-v2.d.ts.map +1 -0
- package/dist/lib/docs-metadata-v2.js +424 -0
- package/dist/lib/docs-new.d.ts +11 -0
- package/dist/lib/docs-new.d.ts.map +1 -0
- package/dist/lib/docs-new.js +52 -0
- package/dist/lib/docs-sweep.d.ts.map +1 -1
- package/dist/lib/docs-sweep.js +45 -29
- package/dist/lib/headless/index.d.ts +98 -0
- package/dist/lib/headless/index.d.ts.map +1 -0
- package/dist/lib/headless/index.js +211 -0
- package/dist/lib/identities/assume.d.ts +4 -4
- package/dist/lib/identities/assume.d.ts.map +1 -1
- package/dist/lib/identities/assume.js +52 -68
- package/dist/lib/instructions/apply.d.ts +5 -4
- package/dist/lib/instructions/apply.d.ts.map +1 -1
- package/dist/lib/instructions/apply.js +32 -20
- package/dist/lib/instructions/bundle.d.ts +1 -1
- package/dist/lib/instructions/bundle.d.ts.map +1 -1
- package/dist/lib/instructions/bundle.js +1 -1
- package/dist/lib/instructions/splice.d.ts +0 -1
- package/dist/lib/instructions/splice.d.ts.map +1 -1
- package/dist/lib/instructions/splice.js +22 -6
- package/dist/lib/instructions/templates.d.ts +7 -5
- package/dist/lib/instructions/templates.d.ts.map +1 -1
- package/dist/lib/instructions/templates.js +79 -9
- package/package.json +26 -5
- package/schemas/config.schema.json +120 -2
- package/schemas/docs-metadata-v2.schema.json +441 -0
- package/schemas/event-v3.schema.json +24472 -0
- package/src/commander.ts +4 -0
- package/src/commands/adapter.ts +2 -2
- package/src/commands/agents.ts +1512 -592
- package/src/commands/artifacts.ts +7 -6
- package/src/commands/backup.ts +29 -21
- package/src/commands/browse.ts +349 -8
- package/src/commands/checkpoint.ts +4 -3
- package/src/commands/claude-desktop.ts +2 -101
- package/src/commands/context.ts +1 -6
- package/src/commands/decision.ts +27 -44
- package/src/commands/docs.ts +100 -33
- package/src/commands/doctor.ts +14 -1
- package/src/commands/events.ts +256 -0
- package/src/commands/governor.ts +18 -4
- package/src/commands/init.ts +253 -57
- package/src/commands/instructions.ts +1 -1
- package/src/commands/journal.ts +4 -13
- package/src/commands/ledger-v3.ts +111 -0
- package/src/commands/presence.ts +11 -10
- package/src/commands/sync.ts +1 -1
- package/src/commands/web.ts +67 -8
- package/src/commands/work.ts +28 -5
- package/src/core/adapter.ts +5 -0
- package/src/core/adapters/attest.ts +8 -3
- package/src/core/adapters/profiles.ts +4 -6
- package/src/core/agents/canonical-emit.ts +34 -25
- package/src/core/agents/cli.ts +236 -262
- package/src/core/agents/codex-archive-v3.ts +138 -0
- package/src/core/agents/coord-client.ts +75 -188
- package/src/core/agents/finalization.ts +120 -38
- package/src/core/agents/index.ts +4 -5
- package/src/core/agents/live-authority-v3.ts +375 -0
- package/src/core/agents/live-lifecycle-v3.ts +140 -0
- package/src/core/agents/live-observation-v3.ts +216 -0
- package/src/core/agents/render/prompt-context.ts +29 -60
- package/src/core/agents/render/session-context.ts +10 -31
- package/src/core/agents/rules/claim-conflict.ts +85 -126
- package/src/core/agents/rules/commit-conflict.ts +3 -14
- package/src/core/agents/rules/stop-hook.ts +239 -293
- package/src/core/agents/session-events.ts +137 -104
- package/src/core/agents/session-finalization-state-v3.ts +90 -0
- package/src/core/agents/session-finalizer-v3.ts +953 -0
- package/src/core/agents/session-name-display.ts +149 -0
- package/src/core/agents/state/activity-log.ts +6 -14
- package/src/core/agents/state/heartbeat-writer.ts +82 -277
- package/src/core/agents/state/live-coordination-view.ts +290 -0
- package/src/core/agents/state/session-state.ts +24 -12
- package/src/core/agents/state/stale-sweep.ts +40 -17
- package/src/core/artifacts/index.ts +4 -5
- package/src/core/config.ts +148 -3
- package/src/core/context/index.ts +9 -17
- package/src/core/events/span-parent.ts +46 -0
- package/src/core/events/v3/advance.ts +168 -0
- package/src/core/events/v3/authority-outbox.ts +548 -0
- package/src/core/events/v3/base-builder.ts +60 -0
- package/src/core/events/v3/base-contract.ts +882 -0
- package/src/core/events/v3/bootstrap.ts +226 -0
- package/src/core/events/v3/builder.ts +59 -0
- package/src/core/events/v3/canonical.ts +153 -0
- package/src/core/events/v3/capabilities.ts +171 -0
- package/src/core/events/v3/capability-drift.ts +177 -0
- package/src/core/events/v3/catalog.ts +202 -0
- package/src/core/events/v3/clock-order.ts +41 -0
- package/src/core/events/v3/contract.ts +365 -0
- package/src/core/events/v3/control.ts +576 -0
- package/src/core/events/v3/coordination-view.ts +193 -0
- package/src/core/events/v3/economics.ts +384 -0
- package/src/core/events/v3/finalization-view.ts +67 -0
- package/src/core/events/v3/fingerprint-keys.ts +260 -0
- package/src/core/events/v3/generated.ts +48 -0
- package/src/core/events/v3/ids.ts +33 -0
- package/src/core/events/v3/index.ts +322 -0
- package/src/core/events/v3/latency.ts +551 -0
- package/src/core/events/v3/live-feed.ts +319 -0
- package/src/core/events/v3/live-observation.ts +39 -0
- package/src/core/events/v3/live-routing.ts +135 -0
- package/src/core/events/v3/producers/command-recorder.ts +631 -0
- package/src/core/events/v3/producers/command.ts +201 -0
- package/src/core/events/v3/producers/coordination-recorder.ts +538 -0
- package/src/core/events/v3/producers/coordination.ts +355 -0
- package/src/core/events/v3/producers/hook-base.ts +578 -0
- package/src/core/events/v3/producers/hook.ts +119 -0
- package/src/core/events/v3/producers/intake.ts +319 -0
- package/src/core/events/v3/producers/recorder.ts +2805 -0
- package/src/core/events/v3/projection.ts +653 -0
- package/src/core/events/v3/reader.ts +1127 -0
- package/src/core/events/v3/recovery-record.ts +244 -0
- package/src/core/events/v3/recovery.ts +271 -0
- package/src/core/events/v3/span-state.ts +187 -0
- package/src/core/events/v3/targets.ts +182 -0
- package/src/core/events/v3/turn-telemetry.ts +259 -0
- package/src/core/events/v3/validate.ts +361 -0
- package/src/core/events/v3/writer.ts +419 -0
- package/src/core/governor/index.ts +3 -0
- package/src/core/governor/plan-api.ts +10 -2
- package/src/core/governor/read.ts +3 -0
- package/src/core/governor/state.ts +52 -5
- package/src/core/guard/config.ts +206 -0
- package/src/core/guard/coordinator.ts +227 -0
- package/src/core/guard/evaluator.ts +343 -0
- package/src/core/guard/evidence-v3.ts +227 -0
- package/src/core/guard/index.ts +35 -0
- package/src/core/guard/live-source-v3.ts +204 -0
- package/src/core/guard/storage.ts +188 -0
- package/src/core/guard/types.ts +152 -0
- package/src/core/hooks/adapter/detect.ts +28 -1
- package/src/core/hooks/adapter/events.ts +14 -6
- package/src/core/hooks/adapter/output.ts +7 -2
- package/src/core/hooks/adapter/parse.ts +80 -38
- package/src/core/hooks/adapter/wiring.ts +119 -13
- package/src/core/hooks/cli.ts +351 -466
- package/src/core/hooks/effects/image-capture.ts +228 -238
- package/src/core/hooks/effects/index.ts +1 -36
- package/src/core/hooks/events/input-hash.ts +47 -0
- package/src/core/hooks/index.ts +4 -11
- package/src/core/hooks/resolve/coord-root.ts +1 -1
- package/src/core/hooks/resolve/owner.ts +52 -45
- package/src/core/hooks/resolve/transcript.ts +165 -14
- package/src/core/hooks/session-name-presence.ts +14 -15
- package/src/core/hooks/unsafe-cross-shell.ts +1 -1
- package/src/core/journal/index.ts +15 -22
- package/src/core/presence/blob.ts +48 -41
- package/src/core/presence/codec-digest.ts +215 -0
- package/src/core/presence/relay-client.ts +5 -5
- package/src/core/work/index.ts +3 -0
- package/src/core/work/read.ts +3 -0
- package/src/core/work/runner.ts +6 -0
- package/src/core/work/state.ts +27 -3
- package/src/core/workflow/engine.ts +24 -24
- package/src/core/workflow/live-session-v3.ts +126 -0
- package/src/core/workflow/scope-id.ts +6 -0
- package/src/core/workflow/workspaces/leases.ts +56 -19
- package/src/index.ts +1 -1
- package/src/lib/browser/client.ts +230 -0
- package/src/lib/browser/critique.ts +104 -27
- package/src/lib/browser/geometry.ts +143 -14
- package/src/lib/browser/index.ts +34 -0
- package/src/lib/browser/qa-plan.ts +501 -0
- package/src/lib/browser/qa-reuse.ts +306 -0
- package/src/lib/browser/qa-snapshot.ts +223 -0
- package/src/lib/browser/runts.ts +27 -2
- package/src/lib/browser/tiling.ts +164 -0
- package/src/lib/claude-desktop.ts +1 -232
- package/src/lib/context/index.ts +22 -46
- package/src/lib/council/index.ts +9 -21
- package/src/lib/docs-frontmatter.ts +8 -79
- package/src/lib/docs-index.ts +33 -3
- package/src/lib/docs-lint.ts +15 -29
- package/src/lib/docs-metadata-audit.ts +166 -0
- package/src/lib/docs-metadata-managed.ts +83 -0
- package/src/lib/docs-metadata-sync.ts +262 -0
- package/src/lib/docs-metadata-v2-schema.ts +138 -0
- package/src/lib/docs-metadata-v2.ts +646 -0
- package/src/lib/docs-new.ts +63 -0
- package/src/lib/docs-sweep.ts +42 -28
- package/src/lib/headless/index.ts +287 -0
- package/src/lib/identities/assume.ts +67 -86
- package/src/lib/instructions/apply.ts +33 -20
- package/src/lib/instructions/bundle.ts +2 -2
- package/src/lib/instructions/splice.ts +21 -7
- package/src/lib/instructions/templates.ts +85 -13
- package/dist/core/agents/cli-emit.d.ts +0 -27
- package/dist/core/agents/cli-emit.d.ts.map +0 -1
- package/dist/core/agents/cli-emit.js +0 -57
- package/dist/core/agents/codex-replay.d.ts +0 -29
- package/dist/core/agents/codex-replay.d.ts.map +0 -1
- package/dist/core/agents/codex-replay.js +0 -138
- package/dist/core/agents/events/consume.d.ts +0 -82
- package/dist/core/agents/events/consume.d.ts.map +0 -1
- package/dist/core/agents/events/consume.js +0 -195
- package/dist/core/agents/events/emit.d.ts +0 -42
- package/dist/core/agents/events/emit.d.ts.map +0 -1
- package/dist/core/agents/events/emit.js +0 -75
- package/dist/core/agents/events/ulid.d.ts +0 -11
- package/dist/core/agents/events/ulid.d.ts.map +0 -1
- package/dist/core/agents/events/ulid.js +0 -47
- package/dist/core/agents/state/heartbeat-projector.d.ts +0 -76
- package/dist/core/agents/state/heartbeat-projector.d.ts.map +0 -1
- package/dist/core/agents/state/heartbeat-projector.js +0 -581
- package/dist/core/hooks/events/emit.d.ts +0 -31
- package/dist/core/hooks/events/emit.d.ts.map +0 -1
- package/dist/core/hooks/events/emit.js +0 -93
- package/dist/core/hooks/events/rotate.d.ts +0 -43
- package/dist/core/hooks/events/rotate.d.ts.map +0 -1
- package/dist/core/hooks/events/rotate.js +0 -142
- package/dist/core/hooks/events/schema.d.ts +0 -341
- package/dist/core/hooks/events/schema.d.ts.map +0 -1
- package/dist/core/hooks/events/schema.js +0 -12
- package/dist/core/hooks/events/ulid.d.ts +0 -10
- package/dist/core/hooks/events/ulid.d.ts.map +0 -1
- package/dist/core/hooks/events/ulid.js +0 -47
- package/dist/lib/docs-frontmatter-migrate.d.ts +0 -33
- package/dist/lib/docs-frontmatter-migrate.d.ts.map +0 -1
- package/dist/lib/docs-frontmatter-migrate.js +0 -364
- package/src/core/agents/cli-emit.ts +0 -64
- package/src/core/agents/codex-replay.ts +0 -163
- package/src/core/agents/events/consume.ts +0 -254
- package/src/core/agents/events/emit.ts +0 -115
- package/src/core/agents/events/ulid.ts +0 -51
- package/src/core/agents/state/heartbeat-projector.ts +0 -645
- package/src/core/hooks/events/emit.ts +0 -125
- package/src/core/hooks/events/rotate.ts +0 -151
- package/src/core/hooks/events/schema.ts +0 -582
- package/src/core/hooks/events/ulid.ts +0 -51
- package/src/lib/docs-frontmatter-migrate.ts +0 -427
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
* so a fresh consumer gets a CLAUDE.md whose managed region imports
|
|
15
15
|
* `@AGENTS.md`. A CLAUDE.md that already imports AGENTS.md or already carries
|
|
16
16
|
* the block (a host that generates CLAUDE.md from AGENTS.md) is left alone.
|
|
17
|
-
* -
|
|
18
|
-
*
|
|
17
|
+
* - `<adapter-skill-dir>/<skill>/SKILL.md` — fully-owned files, honoring
|
|
18
|
+
* `skills.exclude` in `.harnery/config.jsonc`. Claude Code uses
|
|
19
|
+
* `.claude/skills/`; Cursor and Codex use `.agents/skills/`.
|
|
19
20
|
*/
|
|
20
21
|
import { existsSync, mkdirSync, readdirSync, readFileSync, rmdirSync, rmSync, writeFileSync, } from "node:fs";
|
|
21
22
|
import { dirname, join } from "node:path";
|
|
@@ -25,7 +26,14 @@ import { checkOwnedSkill, checkRegion, isOwnedFile, removeRegion, spliceRegion,
|
|
|
25
26
|
import { HOST_ADDENDUM_REGION, IMPORT_REGION, INSTRUCTIONS_REGION, renderInstructionsBlock, SKILLS, } from "./templates.js";
|
|
26
27
|
const AGENTS_FILE = "AGENTS.md";
|
|
27
28
|
const CLAUDE_FILE = "CLAUDE.md";
|
|
28
|
-
const
|
|
29
|
+
const ADAPTER_SKILLS_DIR = {
|
|
30
|
+
"claude-code": join(".claude", "skills"),
|
|
31
|
+
cursor: join(".agents", "skills"),
|
|
32
|
+
codex: join(".agents", "skills"),
|
|
33
|
+
};
|
|
34
|
+
function adapterSkillsDir(adapter) {
|
|
35
|
+
return ADAPTER_SKILLS_DIR[adapter] ?? null;
|
|
36
|
+
}
|
|
29
37
|
/** CLAUDE.md import-shim body: points Claude Code (which reads CLAUDE.md, not AGENTS.md) at AGENTS.md. */
|
|
30
38
|
function importBody() {
|
|
31
39
|
return "This project's agent instructions live in AGENTS.md.\n@AGENTS.md";
|
|
@@ -51,27 +59,29 @@ export function readSkillsExclude(projectRoot) {
|
|
|
51
59
|
}
|
|
52
60
|
/**
|
|
53
61
|
* Which shipped skills exist for this project, so the block references only the
|
|
54
|
-
* ones actually present
|
|
55
|
-
*
|
|
56
|
-
*
|
|
62
|
+
* ones actually present for every supported adapter, unless excluded. Kept in
|
|
63
|
+
* one place so `applyInstructions` and `checkInstructions` render byte-identical
|
|
64
|
+
* blocks.
|
|
57
65
|
*/
|
|
58
66
|
function blockSkills(projectRoot, adapter) {
|
|
59
|
-
const
|
|
67
|
+
const supported = adapterSkillsDir(adapter) !== null;
|
|
60
68
|
const exclude = readSkillsExclude(projectRoot);
|
|
61
69
|
return {
|
|
62
|
-
decide:
|
|
63
|
-
council:
|
|
70
|
+
decide: supported && !exclude.has("harn-decide"),
|
|
71
|
+
council: supported && !exclude.has("harn-council"),
|
|
72
|
+
end: supported && !exclude.has("harn-end"),
|
|
64
73
|
};
|
|
65
74
|
}
|
|
66
75
|
/**
|
|
67
76
|
* Inject / refresh the instructions block, the CLAUDE.md import shim (claude-code),
|
|
68
|
-
* and the shipped skills
|
|
77
|
+
* and the adapter-native shipped skills. Idempotent: a re-run on current content
|
|
69
78
|
* writes nothing. `dryRun` reports without touching the fs.
|
|
70
79
|
*/
|
|
71
80
|
export function applyInstructions(projectRoot, opts) {
|
|
72
81
|
const actions = [];
|
|
73
82
|
const warnings = [];
|
|
74
83
|
const claudeCode = opts.adapter === "claude-code";
|
|
84
|
+
const skillsDir = adapterSkillsDir(opts.adapter);
|
|
75
85
|
// dry-run narrates the future ("would create"); a real run narrates the past.
|
|
76
86
|
const verbed = (base, past) => (opts.dryRun ? `would ${base}` : past);
|
|
77
87
|
// Resolve the host addendum before touching a single file, so a bad path
|
|
@@ -146,15 +156,15 @@ export function applyInstructions(projectRoot, opts) {
|
|
|
146
156
|
}
|
|
147
157
|
}
|
|
148
158
|
}
|
|
149
|
-
// ── shipped skills
|
|
150
|
-
if (
|
|
159
|
+
// ── shipped skills ───────────────────────────────────────────────────────
|
|
160
|
+
if (skillsDir) {
|
|
151
161
|
const exclude = readSkillsExclude(projectRoot);
|
|
152
162
|
for (const skill of SKILLS) {
|
|
153
163
|
if (exclude.has(skill.id)) {
|
|
154
164
|
actions.push(`· skipped skill ${skill.id} (skills.exclude)`);
|
|
155
165
|
continue;
|
|
156
166
|
}
|
|
157
|
-
const skillPath = join(projectRoot,
|
|
167
|
+
const skillPath = join(projectRoot, skillsDir, skill.relPath);
|
|
158
168
|
const content = skill.render(opts.binName);
|
|
159
169
|
const before = existsSync(skillPath) ? readFileSync(skillPath, "utf8") : null;
|
|
160
170
|
if (before === content) {
|
|
@@ -181,6 +191,7 @@ export function removeInstructions(projectRoot, opts) {
|
|
|
181
191
|
const actions = [];
|
|
182
192
|
const warnings = [];
|
|
183
193
|
const claudeCode = opts.adapter === "claude-code";
|
|
194
|
+
const skillsDir = adapterSkillsDir(opts.adapter);
|
|
184
195
|
// ── AGENTS.md block + host addendum ─────────────────────────────────────
|
|
185
196
|
const agentsPath = join(projectRoot, AGENTS_FILE);
|
|
186
197
|
if (existsSync(agentsPath)) {
|
|
@@ -227,10 +238,10 @@ export function removeInstructions(projectRoot, opts) {
|
|
|
227
238
|
}
|
|
228
239
|
}
|
|
229
240
|
}
|
|
230
|
-
// ── shipped skills
|
|
231
|
-
if (
|
|
241
|
+
// ── shipped skills ───────────────────────────────────────────────────────
|
|
242
|
+
if (skillsDir) {
|
|
232
243
|
for (const skill of SKILLS) {
|
|
233
|
-
const skillPath = join(projectRoot,
|
|
244
|
+
const skillPath = join(projectRoot, skillsDir, skill.relPath);
|
|
234
245
|
if (!existsSync(skillPath))
|
|
235
246
|
continue;
|
|
236
247
|
if (!isOwnedFile(readFileSync(skillPath, "utf8"))) {
|
|
@@ -239,7 +250,7 @@ export function removeInstructions(projectRoot, opts) {
|
|
|
239
250
|
}
|
|
240
251
|
if (!opts.dryRun) {
|
|
241
252
|
rmSync(skillPath);
|
|
242
|
-
//
|
|
253
|
+
// Drop the now-empty harn-* dir, leaving the adapter skills root intact.
|
|
243
254
|
const dir = dirname(skillPath);
|
|
244
255
|
try {
|
|
245
256
|
if (readdirSync(dir).length === 0)
|
|
@@ -256,7 +267,7 @@ export function removeInstructions(projectRoot, opts) {
|
|
|
256
267
|
}
|
|
257
268
|
/**
|
|
258
269
|
* Read-only drift report for `init --check`: the AGENTS.md block and each
|
|
259
|
-
* shipped skill
|
|
270
|
+
* shipped skill for the selected adapter. Fresh → exit 0; stale / missing / hand-edit
|
|
260
271
|
* → drift (exit 2); an unreadable file → error (exit 1). Mirrors the wiki-theme
|
|
261
272
|
* `--check-only` contract the first host wires into pre-commit.
|
|
262
273
|
*/
|
|
@@ -282,12 +293,13 @@ export function checkInstructions(projectRoot, opts) {
|
|
|
282
293
|
else if (checkRegion(content, HOST_ADDENDUM_REGION, "") !== "missing") {
|
|
283
294
|
issues.push(`${AGENTS_FILE} host addendum: present but no longer configured (re-run init)`);
|
|
284
295
|
}
|
|
285
|
-
|
|
296
|
+
const skillsDir = adapterSkillsDir(opts.adapter);
|
|
297
|
+
if (skillsDir) {
|
|
286
298
|
const exclude = readSkillsExclude(projectRoot);
|
|
287
299
|
for (const skill of SKILLS) {
|
|
288
300
|
if (exclude.has(skill.id))
|
|
289
301
|
continue;
|
|
290
|
-
const skillPath = join(projectRoot,
|
|
302
|
+
const skillPath = join(projectRoot, skillsDir, skill.relPath);
|
|
291
303
|
const c = existsSync(skillPath) ? readFileSync(skillPath, "utf8") : "";
|
|
292
304
|
note(`skill ${skill.id}`, checkOwnedSkill(c, skillBody(skill.render, opts.binName)));
|
|
293
305
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Adapter } from "../../core/
|
|
1
|
+
import type { Adapter } from "../../core/adapter.js";
|
|
2
2
|
export type InstructionComponentRole = "always_loaded" | "just_in_time" | "runtime_config";
|
|
3
3
|
export interface InstructionBundleComponent {
|
|
4
4
|
path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/bundle.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/bundle.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,MAAM,wBAAwB,GAAG,eAAe,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAE3F,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,wBAAwB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,CAAC,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,0BAA0B,EAAE,CAAC;IACzC,iBAAiB,EAAE,0BAA0B,EAAE,CAAC;CACjD;AAED,UAAU,kBAAkB;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;CAClB;AAOD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,kBAAkB,GAAG,iBAAiB,CAyBrF"}
|
|
@@ -70,7 +70,7 @@ function adapterCandidates(root, adapter) {
|
|
|
70
70
|
}
|
|
71
71
|
else {
|
|
72
72
|
addFile(join(root, "AGENTS.md"), "always_loaded");
|
|
73
|
-
addTree(join(root, ".
|
|
73
|
+
addTree(join(root, ".agents", "skills"), "just_in_time");
|
|
74
74
|
addFile(join(root, ".codex", "hooks.json"), "runtime_config");
|
|
75
75
|
}
|
|
76
76
|
// Harnery's host configuration governs hook enforcement for all adapters.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"splice.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/splice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,iEAAiE;AACjE,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3C;
|
|
1
|
+
{"version":3,"file":"splice.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/splice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,iEAAiE;AACjE,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3C;AAwBD;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC;AAiB3C,kFAAkF;AAClF,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,YAAqB,GAAG,MAAM,CAI9F;AAED,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAE1D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,wDAAwD;IACxD,GAAG,EAAE,OAAO,CAAC;IACb,6EAA6E;IAC7E,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,KAAK,GAAE,YAAqB,GAC3B,YAAY,CAad;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,YAAqB,GAC3B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAOpC;AAED,yEAAyE;AACzE,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,KAAK,GAAE,YAAqB,GAC3B,aAAa,CAIf;AAMD,kFAAkF;AAClF,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,MAAM,CAaT;AAED,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,aAAa,CAKjF"}
|
|
@@ -28,6 +28,25 @@ export function shortHash(s) {
|
|
|
28
28
|
function escapeRe(s) {
|
|
29
29
|
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
30
30
|
}
|
|
31
|
+
function trimHorizontalWhitespaceBeforeNewlines(content) {
|
|
32
|
+
const chunks = [];
|
|
33
|
+
let segmentStart = 0;
|
|
34
|
+
for (let index = 0; index < content.length; index++) {
|
|
35
|
+
if (content.charCodeAt(index) !== 10)
|
|
36
|
+
continue;
|
|
37
|
+
let segmentEnd = index;
|
|
38
|
+
while (segmentEnd > segmentStart) {
|
|
39
|
+
const code = content.charCodeAt(segmentEnd - 1);
|
|
40
|
+
if (code !== 32 && code !== 9)
|
|
41
|
+
break;
|
|
42
|
+
segmentEnd--;
|
|
43
|
+
}
|
|
44
|
+
chunks.push(content.slice(segmentStart, segmentEnd), "\n");
|
|
45
|
+
segmentStart = index + 1;
|
|
46
|
+
}
|
|
47
|
+
chunks.push(content.slice(segmentStart));
|
|
48
|
+
return chunks.join("");
|
|
49
|
+
}
|
|
31
50
|
function markerPair(style) {
|
|
32
51
|
return style === "hash" ? { open: "#", close: "" } : { open: "<!--", close: "-->" };
|
|
33
52
|
}
|
|
@@ -62,7 +81,7 @@ export function spliceRegion(content, region, body, style = "html") {
|
|
|
62
81
|
const text = content.replace(re, () => fresh);
|
|
63
82
|
return { text, changed: text !== content, had: true, stale };
|
|
64
83
|
}
|
|
65
|
-
const trimmed = content.
|
|
84
|
+
const trimmed = content.trimEnd();
|
|
66
85
|
const text = trimmed ? `${trimmed}\n\n${fresh}\n` : `${fresh}\n`;
|
|
67
86
|
return { text, changed: true, had: false, stale: false };
|
|
68
87
|
}
|
|
@@ -76,9 +95,7 @@ export function removeRegion(content, region, style = "html") {
|
|
|
76
95
|
const re = regionRe(region, style);
|
|
77
96
|
if (!re.test(content))
|
|
78
97
|
return { text: content, removed: false };
|
|
79
|
-
const stripped = content
|
|
80
|
-
.replace(re, "")
|
|
81
|
-
.replace(/[ \t]+\n/g, "\n")
|
|
98
|
+
const stripped = trimHorizontalWhitespaceBeforeNewlines(content.replace(re, ""))
|
|
82
99
|
.replace(/\n{3,}/g, "\n\n")
|
|
83
100
|
.trim();
|
|
84
101
|
return { text: stripped ? `${stripped}\n` : "", removed: true };
|
|
@@ -106,8 +123,7 @@ export function buildOwnedSkill(opts) {
|
|
|
106
123
|
const fm = [
|
|
107
124
|
"---",
|
|
108
125
|
`name: ${opts.name}`,
|
|
109
|
-
`description: ${opts.description}`,
|
|
110
|
-
...(opts.argumentHint ? [`argument-hint: ${JSON.stringify(opts.argumentHint)}`] : []),
|
|
126
|
+
`description: ${JSON.stringify(opts.description)}`,
|
|
111
127
|
"---",
|
|
112
128
|
].join("\n");
|
|
113
129
|
const body = opts.body.trim();
|
|
@@ -23,22 +23,24 @@ export declare const IMPORT_REGION = "import";
|
|
|
23
23
|
export declare const HOST_ADDENDUM_REGION = "host-addendum";
|
|
24
24
|
/** Which shipped skills exist in the project the block is rendered for. */
|
|
25
25
|
export interface BlockSkills {
|
|
26
|
-
/** the `harn-decide` skill file is present
|
|
26
|
+
/** the `harn-decide` skill file is present */
|
|
27
27
|
decide: boolean;
|
|
28
28
|
/** the `harn-council` skill file is present */
|
|
29
29
|
council: boolean;
|
|
30
|
+
/** the `harn-end` skill file is present */
|
|
31
|
+
end: boolean;
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
34
|
* The always-on orientation spliced into `AGENTS.md`. Target ≤ 80 rendered
|
|
33
35
|
* lines: it costs every agent context on every turn, so it states that each
|
|
34
36
|
* surface *exists* and gives one line of *when* — the *how* lives in the skills
|
|
35
37
|
* and each command's `--help`. Skill names are fixed (`harn-decide`,
|
|
36
|
-
* `harn-council`) even for a renamed bin; only command strings
|
|
38
|
+
* `harn-council`, `harn-end`) even for a renamed bin; only command strings
|
|
39
|
+
* track `binName`.
|
|
37
40
|
*
|
|
38
41
|
* The block only points at a skill that actually exists here: a host that
|
|
39
|
-
* excludes one via `skills.exclude
|
|
40
|
-
*
|
|
41
|
-
* instead of a dangling reference to a skill it doesn't have.
|
|
42
|
+
* excludes one via `skills.exclude` gets a CLI pointer instead of a dangling
|
|
43
|
+
* reference to a skill it doesn't have.
|
|
42
44
|
*/
|
|
43
45
|
export declare function renderInstructionsBlock(binName: string, skills?: BlockSkills): string;
|
|
44
46
|
/** A shipped skill: its adapter-relative file path + a bin-name-aware renderer. */
|
|
@@ -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,
|
|
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;CACd;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,WAAwD,GAC/D,MAAM,CA+FR;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;AAsND,eAAO,MAAM,MAAM,EAAE,aAAa,EAqCjC,CAAC"}
|
|
@@ -28,16 +28,20 @@ export const HOST_ADDENDUM_REGION = "host-addendum";
|
|
|
28
28
|
* lines: it costs every agent context on every turn, so it states that each
|
|
29
29
|
* surface *exists* and gives one line of *when* — the *how* lives in the skills
|
|
30
30
|
* and each command's `--help`. Skill names are fixed (`harn-decide`,
|
|
31
|
-
* `harn-council`) even for a renamed bin; only command strings
|
|
31
|
+
* `harn-council`, `harn-end`) even for a renamed bin; only command strings
|
|
32
|
+
* track `binName`.
|
|
32
33
|
*
|
|
33
34
|
* The block only points at a skill that actually exists here: a host that
|
|
34
|
-
* excludes one via `skills.exclude
|
|
35
|
-
*
|
|
36
|
-
* instead of a dangling reference to a skill it doesn't have.
|
|
35
|
+
* excludes one via `skills.exclude` gets a CLI pointer instead of a dangling
|
|
36
|
+
* reference to a skill it doesn't have.
|
|
37
37
|
*/
|
|
38
|
-
export function renderInstructionsBlock(binName, skills = { decide: true, council: true }) {
|
|
38
|
+
export function renderInstructionsBlock(binName, skills = { decide: true, council: true, end: true }) {
|
|
39
39
|
const b = binName;
|
|
40
|
-
const named = [
|
|
40
|
+
const named = [
|
|
41
|
+
skills.decide && "`harn-decide`",
|
|
42
|
+
skills.council && "`harn-council`",
|
|
43
|
+
skills.end && "`harn-end`",
|
|
44
|
+
].filter(Boolean);
|
|
41
45
|
const deeper = named.length > 0
|
|
42
46
|
? `Procedures for the deeper flows live in the ${named.join(" and ")} skill${named.length > 1 ? "s" : ""}.`
|
|
43
47
|
: `See \`${b} decision --help\` and \`${b} agents council --help\` for the deeper procedures.`;
|
|
@@ -47,6 +51,9 @@ export function renderInstructionsBlock(binName, skills = { decide: true, counci
|
|
|
47
51
|
const councilPointer = skills.council
|
|
48
52
|
? "The `harn-council` skill has the steward and member flow."
|
|
49
53
|
: `See \`${b} agents council --help\` for the steward and member flow.`;
|
|
54
|
+
const endPointer = skills.end
|
|
55
|
+
? "When the whole session is genuinely finished, use the `harn-end` skill as the final workflow."
|
|
56
|
+
: `When the whole session is genuinely finished, run \`${b} agents status --end-turn --end-session\` as the final tool action.`;
|
|
50
57
|
// Render the journal categories from the canonical enum so this prose can
|
|
51
58
|
// never drift from what `journal add` actually accepts (the "note, plan…" list
|
|
52
59
|
// silently lagged the tool by two categories before this).
|
|
@@ -67,6 +74,14 @@ active peers and the files they've claimed; \`${b} agents set-task "<focus>"\`
|
|
|
67
74
|
declares your current focus so peers can see it. Check for peers before editing
|
|
68
75
|
widely-shared files.
|
|
69
76
|
|
|
77
|
+
**Task lifecycle.** Beside the activity peers already see, declare whether your
|
|
78
|
+
objective is still open: \`${b} agents lifecycle blocked --reason "<why>"\` when
|
|
79
|
+
it cannot proceed, \`${b} agents lifecycle done\` when it is complete, and
|
|
80
|
+
\`${b} agents lifecycle active\` to reopen. \`done\` requires a current task and
|
|
81
|
+
a passing Git finalization check (dirty or unpushed work refuses, and nothing is
|
|
82
|
+
written). Ordinary \`set-task\` calls never change lifecycle, and a transition
|
|
83
|
+
that re-mints the session title tells you the new name to copy. ${endPointer}
|
|
84
|
+
|
|
70
85
|
**Dispatching a team.** Everything else here coordinates the agents already
|
|
71
86
|
present. These three start new ones, and they differ by how long the objective
|
|
72
87
|
outlives a single execution. \`${b} run <script>\` is one bounded pass:
|
|
@@ -219,7 +234,7 @@ The web UI is the member + steward picker; don't create from the CLI (that skips
|
|
|
219
234
|
the steward choice). Emit the link with the objective URL-encoded:
|
|
220
235
|
|
|
221
236
|
\`\`\`
|
|
222
|
-
http://localhost:
|
|
237
|
+
http://localhost:4276/councils/new?objective=<encoded>
|
|
223
238
|
\`\`\`
|
|
224
239
|
|
|
225
240
|
If the dev server isn't up, start it with \`${b} web up\`.
|
|
@@ -274,6 +289,53 @@ that triggered the refusal (member list, contributors, prompt absence, route
|
|
|
274
289
|
mismatch), and offer the right next step. Don't propose a workaround that bypasses
|
|
275
290
|
the guard.`;
|
|
276
291
|
}
|
|
292
|
+
function endBody(b) {
|
|
293
|
+
return `Finalize only after the work is genuinely complete. This is the deliberate,
|
|
294
|
+
high-confidence escape hatch for adapters that do not provide a trustworthy
|
|
295
|
+
native session-end callback.
|
|
296
|
+
|
|
297
|
+
## Workflow
|
|
298
|
+
|
|
299
|
+
1. Finish all in-scope work, tests, documentation, commits, pushes, and
|
|
300
|
+
user-facing reporting first.
|
|
301
|
+
2. Confirm no tool call, open turn, delegated child, file claim, or uncommitted
|
|
302
|
+
session write remains. Do not fabricate completion or use this skill to hide
|
|
303
|
+
unfinished work.
|
|
304
|
+
3. Run the closing status and end request as the final tool action:
|
|
305
|
+
|
|
306
|
+
\`\`\`bash
|
|
307
|
+
${b} agents status --end-turn --end-session
|
|
308
|
+
\`\`\`
|
|
309
|
+
|
|
310
|
+
When automatic identity resolution is unavailable, pass the current native
|
|
311
|
+
adapter session ID with \`--session-id <id>\`. The command durably queues the
|
|
312
|
+
authoritative end while it is still running. The adapter's stop hook records
|
|
313
|
+
\`session.ended\` only after this command, its tool span, and the current turn
|
|
314
|
+
have closed.
|
|
315
|
+
4. Do not run another tool after a successful request. Reproduce the status
|
|
316
|
+
output, tell the operator the end is queued, and yield. The terminal event ID
|
|
317
|
+
becomes available after the response completes and can be verified from a
|
|
318
|
+
later session or the web UI.
|
|
319
|
+
|
|
320
|
+
## Refusals and recovery
|
|
321
|
+
|
|
322
|
+
- If the command reports delegated work, finish or explicitly cancel those
|
|
323
|
+
children, then try again.
|
|
324
|
+
- If Git finalization fails, complete the repository's required commit and push
|
|
325
|
+
workflow before retrying.
|
|
326
|
+
- If the V3 ledger is unavailable or unsafe, do not fall back to deleting a
|
|
327
|
+
projection or writing a synthetic ledger row. Report the failure.
|
|
328
|
+
- Starting a new turn or tool after the request cancels the pending end. Run the
|
|
329
|
+
workflow again when the session is actually finished.
|
|
330
|
+
- On a manual \`${b} agents end\` call, use \`--outcome failed\`, \`cancelled\`,
|
|
331
|
+
\`interrupted\`, or \`unknown\` only when that describes the completed session
|
|
332
|
+
honestly.
|
|
333
|
+
|
|
334
|
+
Never use this skill to end another operator's session unless the operator
|
|
335
|
+
explicitly identifies it. Use the web control or \`${b} agents end --instance-id
|
|
336
|
+
<id>\` for that operator action; it records immediately for an idle session or
|
|
337
|
+
durably queues the end for its current turn.`;
|
|
338
|
+
}
|
|
277
339
|
export const SKILLS = [
|
|
278
340
|
{
|
|
279
341
|
id: "harn-decide",
|
|
@@ -281,7 +343,6 @@ export const SKILLS = [
|
|
|
281
343
|
render: (binName) => buildOwnedSkill({
|
|
282
344
|
name: "harn-decide",
|
|
283
345
|
description: "File a decision into the docket instead of blocking on a human: search precedent, file it, and proceed on a reversible default; or pick up and resolve an open decision with cited evidence. Use whenever you're about to ask a human a decision-shaped question you could resolve yourself.",
|
|
284
|
-
argumentHint: "[<the decision / question you're facing> | resolve <id> | review]",
|
|
285
346
|
binName,
|
|
286
347
|
body: decideBody(binName),
|
|
287
348
|
}),
|
|
@@ -292,9 +353,18 @@ export const SKILLS = [
|
|
|
292
353
|
render: (binName) => buildOwnedSkill({
|
|
293
354
|
name: "harn-council",
|
|
294
355
|
description: "Interact with the multi-agent council system: list / create / show / prompts (steward) / contribute (member). Guards against misrouting: refuses to contribute when you aren't a member, have already contributed, or weren't routed a prompt.",
|
|
295
|
-
argumentHint: "[<id-or-fragment> | create <objective> | contribute <id> | prompts <id> | show <id>]",
|
|
296
356
|
binName,
|
|
297
357
|
body: councilBody(binName),
|
|
298
358
|
}),
|
|
299
359
|
},
|
|
360
|
+
{
|
|
361
|
+
id: "harn-end",
|
|
362
|
+
relPath: "harn-end/SKILL.md",
|
|
363
|
+
render: (binName) => buildOwnedSkill({
|
|
364
|
+
name: "harn-end",
|
|
365
|
+
description: "Safely finalize the current Harnery agent session with an authoritative V3 session-ended event. Use when the operator says /harn-end, asks to end or close the current session, or when all work is complete and the session should stop counting as live.",
|
|
366
|
+
binName,
|
|
367
|
+
body: endBody(binName),
|
|
368
|
+
}),
|
|
369
|
+
},
|
|
300
370
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "harnery",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "Multi-agent coordination for AI coding agents - Claude Code, Cursor, and Codex.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ryan Kelly",
|
|
@@ -92,6 +92,16 @@
|
|
|
92
92
|
"types": "./dist/core/governor/read.d.ts",
|
|
93
93
|
"import": "./dist/core/governor/read.js"
|
|
94
94
|
},
|
|
95
|
+
"./core/guard": {
|
|
96
|
+
"bun": "./src/core/guard/index.ts",
|
|
97
|
+
"types": "./dist/core/guard/index.d.ts",
|
|
98
|
+
"import": "./dist/core/guard/index.js"
|
|
99
|
+
},
|
|
100
|
+
"./core/events/v3": {
|
|
101
|
+
"bun": "./src/core/events/v3/index.ts",
|
|
102
|
+
"types": "./dist/core/events/v3/index.d.ts",
|
|
103
|
+
"import": "./dist/core/events/v3/index.js"
|
|
104
|
+
},
|
|
95
105
|
"./core/governor/plans": {
|
|
96
106
|
"bun": "./src/core/governor/plan-read.ts",
|
|
97
107
|
"types": "./dist/core/governor/plan-read.d.ts",
|
|
@@ -122,6 +132,11 @@
|
|
|
122
132
|
"types": "./dist/lib/format.d.ts",
|
|
123
133
|
"import": "./dist/lib/format.js"
|
|
124
134
|
},
|
|
135
|
+
"./lib/headless": {
|
|
136
|
+
"bun": "./src/lib/headless/index.ts",
|
|
137
|
+
"types": "./dist/lib/headless/index.d.ts",
|
|
138
|
+
"import": "./dist/lib/headless/index.js"
|
|
139
|
+
},
|
|
125
140
|
"./lib/http": {
|
|
126
141
|
"bun": "./src/lib/http/index.ts",
|
|
127
142
|
"types": "./dist/lib/http/index.d.ts",
|
|
@@ -175,9 +190,9 @@
|
|
|
175
190
|
},
|
|
176
191
|
"packageManager": "bun@1.3.3",
|
|
177
192
|
"scripts": {
|
|
178
|
-
"build": "tsc -p tsconfig.build.json && node scripts/rewrite-dts-extensions.mjs",
|
|
193
|
+
"build": "npm run clean && tsc -p tsconfig.build.json && node scripts/rewrite-dts-extensions.mjs",
|
|
179
194
|
"clean": "rm -rf dist",
|
|
180
|
-
"prepublishOnly": "npm run
|
|
195
|
+
"prepublishOnly": "npm run build",
|
|
181
196
|
"typecheck": "bun x tsc --noEmit",
|
|
182
197
|
"lint": "bun x @biomejs/biome check src",
|
|
183
198
|
"check:portability": "bun run scripts/check-portability.ts",
|
|
@@ -193,10 +208,15 @@
|
|
|
193
208
|
"docs:build": "bun run --cwd docs build",
|
|
194
209
|
"brand:showcase": "node scripts/build-brand-showcase.mjs",
|
|
195
210
|
"verify:contracts": "bun run scripts/sync-verified-contracts.ts",
|
|
196
|
-
"verify:contracts:check": "bun run scripts/sync-verified-contracts.ts --check"
|
|
211
|
+
"verify:contracts:check": "bun run scripts/sync-verified-contracts.ts --check",
|
|
212
|
+
"generate:event-v3": "bun run scripts/generate-event-v3-contract.ts",
|
|
213
|
+
"check:event-v3": "bun run scripts/generate-event-v3-contract.ts --check && bun run scripts/check-event-v3-reader-boundary.ts",
|
|
214
|
+
"generate:docs-metadata-v2": "bun run scripts/generate-docs-metadata-v2-schema.ts",
|
|
215
|
+
"check:docs-metadata-v2": "bun run scripts/generate-docs-metadata-v2-schema.ts --check"
|
|
197
216
|
},
|
|
198
217
|
"dependencies": {
|
|
199
218
|
"@mozilla/readability": "^0.6.0",
|
|
219
|
+
"@sinclair/typebox": "^0.34.52",
|
|
200
220
|
"axe-core": "^4.12.1",
|
|
201
221
|
"commander": "^14.0.3",
|
|
202
222
|
"gpt-tokenizer": "^3.4.0",
|
|
@@ -207,7 +227,8 @@
|
|
|
207
227
|
"playwright": "^1.59.1",
|
|
208
228
|
"pngjs": "^7.0.0",
|
|
209
229
|
"turndown": "^7.2.4",
|
|
210
|
-
"turndown-plugin-gfm": "^1.0.2"
|
|
230
|
+
"turndown-plugin-gfm": "^1.0.2",
|
|
231
|
+
"uuid": "^14.0.1"
|
|
211
232
|
},
|
|
212
233
|
"devDependencies": {
|
|
213
234
|
"@biomejs/biome": "^2.5.0",
|
|
@@ -64,6 +64,124 @@
|
|
|
64
64
|
"minimum": 30,
|
|
65
65
|
"default": 600,
|
|
66
66
|
"description": "How stale a peer heartbeat can get before the sweeper prunes it. Env override: HARNERY_AGENT_COORD_FRESHNESS."
|
|
67
|
+
},
|
|
68
|
+
"finalization": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"additionalProperties": false,
|
|
71
|
+
"description": "Grace periods for converging independent lifecycle observations on the canonical V3 session finalizer.",
|
|
72
|
+
"properties": {
|
|
73
|
+
"archive_grace_seconds": {
|
|
74
|
+
"type": "integer",
|
|
75
|
+
"minimum": 1,
|
|
76
|
+
"maximum": 86400,
|
|
77
|
+
"default": 600
|
|
78
|
+
},
|
|
79
|
+
"idle_observe_seconds": {
|
|
80
|
+
"type": "integer",
|
|
81
|
+
"minimum": 60,
|
|
82
|
+
"maximum": 2592000,
|
|
83
|
+
"default": 259200
|
|
84
|
+
},
|
|
85
|
+
"idle_finalize_seconds": {
|
|
86
|
+
"type": "integer",
|
|
87
|
+
"minimum": 60,
|
|
88
|
+
"maximum": 7776000,
|
|
89
|
+
"default": 604800
|
|
90
|
+
},
|
|
91
|
+
"cascade_grace_seconds": {
|
|
92
|
+
"type": "integer",
|
|
93
|
+
"minimum": 1,
|
|
94
|
+
"maximum": 86400,
|
|
95
|
+
"default": 3600
|
|
96
|
+
},
|
|
97
|
+
"reconcile_interval_seconds": {
|
|
98
|
+
"type": "integer",
|
|
99
|
+
"minimum": 1,
|
|
100
|
+
"maximum": 86400,
|
|
101
|
+
"default": 900
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"run_quality": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"additionalProperties": false,
|
|
108
|
+
"required": ["mode"],
|
|
109
|
+
"description": "Report-only run-quality observation. Invalid objects disable evaluation as one unit.",
|
|
110
|
+
"properties": {
|
|
111
|
+
"mode": { "type": "string", "enum": ["off", "shadow", "report"], "default": "off" },
|
|
112
|
+
"evaluation_interval_seconds": {
|
|
113
|
+
"type": "integer",
|
|
114
|
+
"minimum": 5,
|
|
115
|
+
"maximum": 3600,
|
|
116
|
+
"default": 30
|
|
117
|
+
},
|
|
118
|
+
"snapshot_ttl_seconds": {
|
|
119
|
+
"type": "integer",
|
|
120
|
+
"minimum": 10,
|
|
121
|
+
"maximum": 86400,
|
|
122
|
+
"default": 120
|
|
123
|
+
},
|
|
124
|
+
"max_tail_bytes": {
|
|
125
|
+
"type": "integer",
|
|
126
|
+
"minimum": 65536,
|
|
127
|
+
"maximum": 67108864,
|
|
128
|
+
"default": 2097152
|
|
129
|
+
},
|
|
130
|
+
"evaluation_timeout_seconds": {
|
|
131
|
+
"type": "integer",
|
|
132
|
+
"minimum": 1,
|
|
133
|
+
"maximum": 30,
|
|
134
|
+
"default": 30
|
|
135
|
+
},
|
|
136
|
+
"lock_stale_seconds": {
|
|
137
|
+
"type": "integer",
|
|
138
|
+
"minimum": 5,
|
|
139
|
+
"maximum": 3600,
|
|
140
|
+
"default": 60
|
|
141
|
+
},
|
|
142
|
+
"supervised_roots_per_sweep": {
|
|
143
|
+
"type": "integer",
|
|
144
|
+
"minimum": 1,
|
|
145
|
+
"maximum": 100,
|
|
146
|
+
"default": 8
|
|
147
|
+
},
|
|
148
|
+
"thresholds": {
|
|
149
|
+
"type": "object",
|
|
150
|
+
"additionalProperties": false,
|
|
151
|
+
"properties": {
|
|
152
|
+
"repeated_tool_calls": {
|
|
153
|
+
"type": "integer",
|
|
154
|
+
"minimum": 2,
|
|
155
|
+
"maximum": 10000,
|
|
156
|
+
"default": 8
|
|
157
|
+
},
|
|
158
|
+
"consecutive_failures": {
|
|
159
|
+
"type": "integer",
|
|
160
|
+
"minimum": 1,
|
|
161
|
+
"maximum": 10000,
|
|
162
|
+
"default": 5
|
|
163
|
+
},
|
|
164
|
+
"context_growth_per_minute": {
|
|
165
|
+
"type": "integer",
|
|
166
|
+
"minimum": 1,
|
|
167
|
+
"maximum": 10000000,
|
|
168
|
+
"default": 60000
|
|
169
|
+
},
|
|
170
|
+
"compaction_grace_seconds": {
|
|
171
|
+
"type": "integer",
|
|
172
|
+
"minimum": 0,
|
|
173
|
+
"maximum": 86400,
|
|
174
|
+
"default": 300
|
|
175
|
+
},
|
|
176
|
+
"no_progress_evaluations": {
|
|
177
|
+
"type": "integer",
|
|
178
|
+
"minimum": 1,
|
|
179
|
+
"maximum": 10000,
|
|
180
|
+
"default": 2
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
67
185
|
}
|
|
68
186
|
}
|
|
69
187
|
},
|
|
@@ -89,7 +207,7 @@
|
|
|
89
207
|
"type": "integer",
|
|
90
208
|
"minimum": 1024,
|
|
91
209
|
"maximum": 65535,
|
|
92
|
-
"default":
|
|
210
|
+
"default": 4276,
|
|
93
211
|
"description": "Port that `harn web up` binds to."
|
|
94
212
|
},
|
|
95
213
|
"bind": {
|
|
@@ -155,7 +273,7 @@
|
|
|
155
273
|
"type": "array",
|
|
156
274
|
"items": { "type": "string" },
|
|
157
275
|
"default": [],
|
|
158
|
-
"description": "Shipped
|
|
276
|
+
"description": "Shipped Harnery skills this repo suppresses. Installed skill IDs are harn-decide, harn-council, and harn-end."
|
|
159
277
|
}
|
|
160
278
|
}
|
|
161
279
|
},
|