harnery 0.32.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/README.md +2 -0
- package/dist/commander.d.ts.map +1 -1
- package/dist/commander.js +7 -1
- 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 +1408 -565
- 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 +2 -2
- package/dist/commands/claude-desktop.d.ts.map +1 -1
- package/dist/commands/claude-desktop.js +2 -2
- 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.d.ts +4 -2
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +55 -7
- 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 +10 -2
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +233 -51
- package/dist/commands/instructions.d.ts +4 -0
- package/dist/commands/instructions.d.ts.map +1 -0
- package/dist/commands/instructions.js +100 -0
- 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 +15 -6
- 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 +27 -25
- package/dist/core/agents/cli.js +212 -235
- 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 -70
- 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 +5 -5
- package/dist/core/agents/index.d.ts.map +1 -1
- package/dist/core/agents/index.js +5 -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 +10 -4
- package/dist/core/agents/render/prompt-context.d.ts.map +1 -1
- package/dist/core/agents/render/prompt-context.js +61 -55
- 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 +15 -33
- 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 +29 -46
- package/dist/core/agents/state/heartbeat-writer.d.ts.map +1 -1
- package/dist/core/agents/state/heartbeat-writer.js +59 -199
- 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 +45 -0
- package/dist/core/agents/state/session-state.d.ts.map +1 -0
- package/dist/core/agents/state/session-state.js +90 -0
- 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 +13 -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 +64 -24
- 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 +345 -400
- package/dist/core/hooks/codex-authorization.d.ts +30 -0
- package/dist/core/hooks/codex-authorization.d.ts.map +1 -0
- package/dist/core/hooks/codex-authorization.js +199 -0
- 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 +8 -3
- package/dist/core/presence/blob.d.ts.map +1 -1
- package/dist/core/presence/blob.js +54 -41
- 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/index.js +15 -1
- 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/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 +33 -0
- package/dist/lib/instructions/bundle.d.ts.map +1 -0
- package/dist/lib/instructions/bundle.js +149 -0
- 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 +27 -6
- 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 +7 -1
- package/src/commands/adapter.ts +2 -2
- package/src/commands/agents.ts +1737 -570
- 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 +7 -5
- 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 +73 -8
- package/src/commands/events.ts +256 -0
- package/src/commands/governor.ts +18 -4
- package/src/commands/init.ts +264 -57
- package/src/commands/instructions.ts +129 -0
- package/src/commands/journal.ts +4 -13
- package/src/commands/ledger-v3.ts +111 -0
- package/src/commands/presence.ts +18 -11
- 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 +39 -28
- package/src/core/agents/cli.ts +242 -263
- package/src/core/agents/codex-archive-v3.ts +138 -0
- package/src/core/agents/coord-client.ts +75 -177
- package/src/core/agents/finalization.ts +120 -38
- package/src/core/agents/index.ts +5 -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 +89 -55
- package/src/core/agents/render/session-context.ts +23 -32
- 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 +98 -242
- package/src/core/agents/state/live-coordination-view.ts +290 -0
- package/src/core/agents/state/session-state.ts +143 -0
- 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 +15 -6
- package/src/core/hooks/adapter/output.ts +7 -2
- package/src/core/hooks/adapter/parse.ts +81 -36
- package/src/core/hooks/adapter/wiring.ts +119 -13
- package/src/core/hooks/cli.ts +398 -422
- package/src/core/hooks/codex-authorization.ts +253 -0
- 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 +63 -38
- package/src/core/presence/codec-digest.ts +215 -0
- package/src/core/presence/index.ts +18 -1
- 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/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 +199 -0
- 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 -65
- package/dist/core/agents/state/heartbeat-projector.d.ts.map +0 -1
- package/dist/core/agents/state/heartbeat-projector.js +0 -527
- 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 -312
- 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 -582
- 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 -538
- package/src/core/hooks/events/ulid.ts +0 -51
- package/src/lib/docs-frontmatter-migrate.ts +0 -427
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
9
|
-
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
10
|
-
import { join } from "node:path";
|
|
11
9
|
import { resolveMachineLabel } from "../../lib/machine.ts";
|
|
10
|
+
import { readLiveCoordinationRows } from "../agents/state/live-coordination-view.ts";
|
|
11
|
+
import type { AgentActivity, TaskState } from "../agents/state/session-state.ts";
|
|
12
|
+
import { buildPresenceCodecDigests, type PresenceCodecDigest } from "./codec-digest.ts";
|
|
12
13
|
|
|
13
14
|
/** Mirror of the local heartbeat freshness window (commands/agents.ts). */
|
|
14
15
|
const FRESHNESS_SECS = 600;
|
|
@@ -24,11 +25,14 @@ export interface PresenceAgent {
|
|
|
24
25
|
session_id?: string;
|
|
25
26
|
platform?: string;
|
|
26
27
|
task?: string;
|
|
27
|
-
|
|
28
|
+
activity: AgentActivity;
|
|
29
|
+
task_state: TaskState;
|
|
30
|
+
task_state_reason?: string;
|
|
28
31
|
files_touched?: string[];
|
|
29
|
-
last_tool?: string;
|
|
30
32
|
started_at?: string;
|
|
31
33
|
last_heartbeat?: string;
|
|
34
|
+
/** Strict content-free activity evidence for remote Codec panels. */
|
|
35
|
+
codec?: PresenceCodecDigest;
|
|
32
36
|
}
|
|
33
37
|
|
|
34
38
|
export interface PresenceBlob {
|
|
@@ -47,7 +51,7 @@ export interface BuiltBlob {
|
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
/**
|
|
50
|
-
* Build this machine's presence blob from
|
|
54
|
+
* Build this machine's presence blob from the authority-safe V3 projection.
|
|
51
55
|
* Includes live sessions + subagents; excludes kind=transient stubs (they are
|
|
52
56
|
* fold-artifacts of the local claim model, not sessions) and anything past the
|
|
53
57
|
* freshness window.
|
|
@@ -55,38 +59,32 @@ export interface BuiltBlob {
|
|
|
55
59
|
export function buildPresenceBlob(coordRoot: string, now: Date = new Date()): BuiltBlob {
|
|
56
60
|
const machine = resolveMachineLabel();
|
|
57
61
|
const agents: PresenceAgent[] = [];
|
|
58
|
-
const
|
|
62
|
+
const codecDigests = buildPresenceCodecDigests(coordRoot);
|
|
59
63
|
const cutoffMs = now.getTime() - FRESHNESS_SECS * 1000;
|
|
60
64
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
: undefined,
|
|
85
|
-
last_tool: strOr(hb.last_tool),
|
|
86
|
-
started_at: strOr(hb.started_at),
|
|
87
|
-
last_heartbeat: strOr(hb.last_heartbeat),
|
|
88
|
-
});
|
|
89
|
-
}
|
|
65
|
+
for (const row of readLiveCoordinationRows(coordRoot)) {
|
|
66
|
+
if (row.kind === "transient") continue;
|
|
67
|
+
const ts = Date.parse(row.last_heartbeat);
|
|
68
|
+
if (!Number.isFinite(ts) || ts < cutoffMs) continue;
|
|
69
|
+
agents.push({
|
|
70
|
+
instance_id: row.instance_id,
|
|
71
|
+
name: strOr(row.name),
|
|
72
|
+
kind: strOr(row.kind),
|
|
73
|
+
session_id: strOr(row.session_id),
|
|
74
|
+
platform: strOr(row.platform),
|
|
75
|
+
task: strOr(row.task),
|
|
76
|
+
activity: activityOrUnknown(row.activity),
|
|
77
|
+
task_state: taskStateOrActive(row.task_state),
|
|
78
|
+
task_state_reason: clamp(strOr(row.task_state_reason), 160),
|
|
79
|
+
files_touched: row.files_touched.slice(0, MAX_FILES_PER_AGENT),
|
|
80
|
+
started_at: strOr(row.started_at),
|
|
81
|
+
last_heartbeat: row.last_heartbeat,
|
|
82
|
+
codec:
|
|
83
|
+
codecDigests.get(row.instance_id) ??
|
|
84
|
+
codecDigests.get(
|
|
85
|
+
row.instance_id.startsWith("inst_") ? row.instance_id : `inst_${row.instance_id}`,
|
|
86
|
+
),
|
|
87
|
+
});
|
|
90
88
|
}
|
|
91
89
|
|
|
92
90
|
agents.sort((a, b) => a.instance_id.localeCompare(b.instance_id));
|
|
@@ -100,15 +98,18 @@ export function buildPresenceBlob(coordRoot: string, now: Date = new Date()): Bu
|
|
|
100
98
|
};
|
|
101
99
|
|
|
102
100
|
// Basis: the fields whose change should trigger a re-publish. Timestamps
|
|
103
|
-
//
|
|
104
|
-
//
|
|
101
|
+
// Observation timestamps are excluded as pure churn; task/lifecycle/files
|
|
102
|
+
// are the signals peers actually read.
|
|
105
103
|
const basis = capped.map((a) => ({
|
|
106
104
|
i: a.instance_id,
|
|
107
105
|
n: a.name ?? null,
|
|
108
106
|
k: a.kind ?? null,
|
|
109
107
|
t: a.task ?? null,
|
|
110
|
-
|
|
108
|
+
a: a.activity,
|
|
109
|
+
l: a.task_state,
|
|
110
|
+
r: a.task_state_reason ?? null,
|
|
111
111
|
f: [...(a.files_touched ?? [])].sort(),
|
|
112
|
+
c: codecBasis(a.codec),
|
|
112
113
|
}));
|
|
113
114
|
const basisHash = createHash("sha256").update(JSON.stringify(basis)).digest("hex").slice(0, 16);
|
|
114
115
|
|
|
@@ -119,7 +120,31 @@ function strOr(v: unknown): string | undefined {
|
|
|
119
120
|
return typeof v === "string" && v.length > 0 ? v : undefined;
|
|
120
121
|
}
|
|
121
122
|
|
|
123
|
+
function activityOrUnknown(v: unknown): AgentActivity {
|
|
124
|
+
return v === "working" || v === "needs_input" || v === "idle" ? v : "unknown";
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function taskStateOrActive(v: unknown): TaskState {
|
|
128
|
+
return v === "blocked" || v === "done" ? v : "active";
|
|
129
|
+
}
|
|
130
|
+
|
|
122
131
|
function clamp(v: string | undefined, max: number): string | undefined {
|
|
123
132
|
if (!v) return undefined;
|
|
124
133
|
return v.length > max ? v.slice(0, max) : v;
|
|
125
134
|
}
|
|
135
|
+
|
|
136
|
+
function codecBasis(codec: PresenceCodecDigest | undefined): unknown {
|
|
137
|
+
if (!codec) return null;
|
|
138
|
+
return {
|
|
139
|
+
o: codec.operation
|
|
140
|
+
? { category: codec.operation.category, label: codec.operation.label }
|
|
141
|
+
: null,
|
|
142
|
+
c: codec.context
|
|
143
|
+
? { used_percent: codec.context.used_percent, confidence: codec.context.confidence }
|
|
144
|
+
: null,
|
|
145
|
+
a: codec.recent_actions.map((action) => ({
|
|
146
|
+
category: action.category,
|
|
147
|
+
outcome: action.outcome,
|
|
148
|
+
})),
|
|
149
|
+
};
|
|
150
|
+
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import type { EventV3 } from "../events/v3/contract.ts";
|
|
2
|
+
import { readLedgerV3 } from "../events/v3/reader.ts";
|
|
3
|
+
|
|
4
|
+
export type PresenceCodecCategory =
|
|
5
|
+
| "research"
|
|
6
|
+
| "diagnostic"
|
|
7
|
+
| "build"
|
|
8
|
+
| "edit"
|
|
9
|
+
| "test"
|
|
10
|
+
| "coordinate"
|
|
11
|
+
| "other";
|
|
12
|
+
|
|
13
|
+
export interface PresenceCodecAction {
|
|
14
|
+
category: PresenceCodecCategory;
|
|
15
|
+
outcome: "ok" | "error" | "unknown";
|
|
16
|
+
event_id: string;
|
|
17
|
+
observed_at: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface PresenceCodecDigest {
|
|
21
|
+
schema_version: 1;
|
|
22
|
+
observed_at: string;
|
|
23
|
+
operation?: {
|
|
24
|
+
category: PresenceCodecCategory;
|
|
25
|
+
label: string;
|
|
26
|
+
event_id: string;
|
|
27
|
+
observed_at: string;
|
|
28
|
+
};
|
|
29
|
+
context?: {
|
|
30
|
+
used_percent: number;
|
|
31
|
+
confidence: "exact" | "reported" | "estimated";
|
|
32
|
+
event_id: string;
|
|
33
|
+
observed_at: string;
|
|
34
|
+
};
|
|
35
|
+
recent_actions: PresenceCodecAction[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface Slot {
|
|
39
|
+
observedAt?: string;
|
|
40
|
+
open: Map<string, NonNullable<PresenceCodecDigest["operation"]>>;
|
|
41
|
+
context?: PresenceCodecDigest["context"];
|
|
42
|
+
actions: PresenceCodecAction[];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const MAX_LEDGER_ROWS = 5_000;
|
|
46
|
+
const MAX_ACTIONS = 3;
|
|
47
|
+
|
|
48
|
+
/** Build a strict, content-free per-instance digest for encrypted presence. */
|
|
49
|
+
export function buildPresenceCodecDigests(coordRoot: string): Map<string, PresenceCodecDigest> {
|
|
50
|
+
const read = readLedgerV3(coordRoot);
|
|
51
|
+
if (!read.complete) return new Map();
|
|
52
|
+
return projectPresenceCodecDigests(read.events.slice(-MAX_LEDGER_ROWS).map((row) => row.event));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function projectPresenceCodecDigests(
|
|
56
|
+
events: readonly EventV3[],
|
|
57
|
+
): Map<string, PresenceCodecDigest> {
|
|
58
|
+
const slots = new Map<string, Slot>();
|
|
59
|
+
const get = (instanceId: string) => {
|
|
60
|
+
let slot = slots.get(instanceId);
|
|
61
|
+
if (!slot) {
|
|
62
|
+
slot = { open: new Map(), actions: [] };
|
|
63
|
+
slots.set(instanceId, slot);
|
|
64
|
+
}
|
|
65
|
+
return slot;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
for (const event of events) {
|
|
69
|
+
if (!("instance_id" in event.scope)) continue;
|
|
70
|
+
const slot = get(event.scope.instance_id);
|
|
71
|
+
slot.observedAt = event.time.observed_at;
|
|
72
|
+
const spanId = (event.links as { span_id?: string }).span_id;
|
|
73
|
+
switch (event.event_type) {
|
|
74
|
+
case "tool.requested":
|
|
75
|
+
if (spanId) {
|
|
76
|
+
slot.open.set(spanId, {
|
|
77
|
+
category: categorize(event.payload.tool.namespace, event.payload.tool.name),
|
|
78
|
+
label: operationLabel(event.payload.tool.namespace, event.payload.tool.name),
|
|
79
|
+
event_id: event.event_id,
|
|
80
|
+
observed_at: event.time.observed_at,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
break;
|
|
84
|
+
case "command.started":
|
|
85
|
+
if (spanId) {
|
|
86
|
+
slot.open.set(spanId, {
|
|
87
|
+
category: "diagnostic",
|
|
88
|
+
label: "Running a command",
|
|
89
|
+
event_id: event.event_id,
|
|
90
|
+
observed_at: event.time.observed_at,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
break;
|
|
94
|
+
case "wait.started":
|
|
95
|
+
slot.open.set(event.payload.wait_id, {
|
|
96
|
+
category: "coordinate",
|
|
97
|
+
label: "Waiting",
|
|
98
|
+
event_id: event.event_id,
|
|
99
|
+
observed_at: event.time.observed_at,
|
|
100
|
+
});
|
|
101
|
+
break;
|
|
102
|
+
case "tool.completed":
|
|
103
|
+
case "command.completed":
|
|
104
|
+
if (spanId) slot.open.delete(spanId);
|
|
105
|
+
pushAction(slot, {
|
|
106
|
+
category:
|
|
107
|
+
event.event_type === "tool.completed"
|
|
108
|
+
? categorize(event.payload.tool.namespace, event.payload.tool.name)
|
|
109
|
+
: "diagnostic",
|
|
110
|
+
outcome: outcome(event.payload.outcome),
|
|
111
|
+
event_id: event.event_id,
|
|
112
|
+
observed_at: event.time.observed_at,
|
|
113
|
+
});
|
|
114
|
+
break;
|
|
115
|
+
case "wait.ended":
|
|
116
|
+
slot.open.delete(event.payload.wait_id);
|
|
117
|
+
pushAction(slot, {
|
|
118
|
+
category: "coordinate",
|
|
119
|
+
outcome: outcome(event.payload.outcome),
|
|
120
|
+
event_id: event.event_id,
|
|
121
|
+
observed_at: event.time.observed_at,
|
|
122
|
+
});
|
|
123
|
+
break;
|
|
124
|
+
case "progress.observed":
|
|
125
|
+
pushAction(slot, {
|
|
126
|
+
category: progressCategory(event.payload.kind),
|
|
127
|
+
outcome: "ok",
|
|
128
|
+
event_id: event.event_id,
|
|
129
|
+
observed_at: event.time.observed_at,
|
|
130
|
+
});
|
|
131
|
+
break;
|
|
132
|
+
case "context.observed": {
|
|
133
|
+
const measurement = event.payload.measurement;
|
|
134
|
+
if (measurement.state === "observed" && measurement.value.limit_tokens > 0) {
|
|
135
|
+
slot.context = {
|
|
136
|
+
used_percent: Math.min(
|
|
137
|
+
100,
|
|
138
|
+
Math.max(
|
|
139
|
+
0,
|
|
140
|
+
Math.round((measurement.value.used_tokens / measurement.value.limit_tokens) * 100),
|
|
141
|
+
),
|
|
142
|
+
),
|
|
143
|
+
confidence: measurement.confidence === "exact" ? "exact" : "reported",
|
|
144
|
+
event_id: event.event_id,
|
|
145
|
+
observed_at: event.time.observed_at,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
case "turn.completed":
|
|
151
|
+
case "session.ended":
|
|
152
|
+
case "agent.completed":
|
|
153
|
+
slot.open.clear();
|
|
154
|
+
break;
|
|
155
|
+
default:
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const digests = new Map<string, PresenceCodecDigest>();
|
|
161
|
+
for (const [instanceId, slot] of slots) {
|
|
162
|
+
if (!slot.observedAt) continue;
|
|
163
|
+
const operation = [...slot.open.values()].at(-1);
|
|
164
|
+
digests.set(instanceId, {
|
|
165
|
+
schema_version: 1,
|
|
166
|
+
observed_at: slot.observedAt,
|
|
167
|
+
...(operation ? { operation } : {}),
|
|
168
|
+
...(slot.context ? { context: slot.context } : {}),
|
|
169
|
+
recent_actions: slot.actions,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
return digests;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function pushAction(slot: Slot, action: PresenceCodecAction): void {
|
|
176
|
+
slot.actions.push(action);
|
|
177
|
+
if (slot.actions.length > MAX_ACTIONS) slot.actions.shift();
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function outcome(value: string): PresenceCodecAction["outcome"] {
|
|
181
|
+
return value === "succeeded" ? "ok" : value === "failed" ? "error" : "unknown";
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function categorize(namespace: string, name: string): PresenceCodecCategory {
|
|
185
|
+
const key = `${namespace}/${name}`.toLowerCase();
|
|
186
|
+
if (/agent|message|plan|workflow|council|decide/.test(key)) return "coordinate";
|
|
187
|
+
if (/patch|edit|write|create/.test(key)) return "edit";
|
|
188
|
+
if (/test|playwright|vitest|jest/.test(key)) return "test";
|
|
189
|
+
if (/publish|deploy|image|document|spreadsheet|presentation/.test(key)) return "build";
|
|
190
|
+
if (/search|read|grep|glob|fetch|browser|view/.test(key)) return "research";
|
|
191
|
+
if (/exec|command|shell|bash|terminal/.test(key)) return "diagnostic";
|
|
192
|
+
return "other";
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function operationLabel(namespace: string, name: string): string {
|
|
196
|
+
const category = categorize(namespace, name);
|
|
197
|
+
return {
|
|
198
|
+
research: "Researching",
|
|
199
|
+
diagnostic: "Running a command",
|
|
200
|
+
build: "Building",
|
|
201
|
+
edit: "Editing files",
|
|
202
|
+
test: "Testing",
|
|
203
|
+
coordinate: "Coordinating",
|
|
204
|
+
other: "Working",
|
|
205
|
+
}[category];
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
function progressCategory(kind: string): PresenceCodecCategory {
|
|
209
|
+
if (kind === "write") return "edit";
|
|
210
|
+
if (kind === "test") return "test";
|
|
211
|
+
if (kind === "commit" || kind === "deploy" || kind === "publication") return "build";
|
|
212
|
+
if (kind === "review") return "coordinate";
|
|
213
|
+
if (kind === "artifact") return "build";
|
|
214
|
+
return "other";
|
|
215
|
+
}
|
|
@@ -263,7 +263,7 @@ export function readRemoteMachines(
|
|
|
263
263
|
machine,
|
|
264
264
|
published_at: blob.published_at,
|
|
265
265
|
age_secs: ageSecs,
|
|
266
|
-
agents: blob.agents,
|
|
266
|
+
agents: blob.agents.map(normalizePresenceAgent),
|
|
267
267
|
});
|
|
268
268
|
}
|
|
269
269
|
out.sort((a, b) => a.machine.localeCompare(b.machine));
|
|
@@ -272,3 +272,20 @@ export function readRemoteMachines(
|
|
|
272
272
|
return [];
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
|
+
|
|
276
|
+
function normalizePresenceAgent(agent: PresenceAgent): PresenceAgent {
|
|
277
|
+
const legacy = agent as Partial<PresenceAgent>;
|
|
278
|
+
return {
|
|
279
|
+
...agent,
|
|
280
|
+
activity:
|
|
281
|
+
legacy.activity === "working" ||
|
|
282
|
+
legacy.activity === "needs_input" ||
|
|
283
|
+
legacy.activity === "idle"
|
|
284
|
+
? legacy.activity
|
|
285
|
+
: "unknown",
|
|
286
|
+
task_state:
|
|
287
|
+
legacy.task_state === "blocked" || legacy.task_state === "done"
|
|
288
|
+
? legacy.task_state
|
|
289
|
+
: "active",
|
|
290
|
+
};
|
|
291
|
+
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - derives the room credentials from the repo identity (root-commit SHA +
|
|
10
10
|
* origin URL + optional committed `.harnery/presence-salt`)
|
|
11
11
|
* - holds the socket open with auto-reconnect + jittered backoff
|
|
12
|
-
* - watches
|
|
12
|
+
* - watches the active V3 ledger and publishes the encrypted presence blob on
|
|
13
13
|
* change (debounced), plus a 60s keepalive so peers' staleness math works
|
|
14
14
|
* - decrypts received peer frames and writes them to
|
|
15
15
|
* `.harnery/presence/remote/<machine>.json`, where `readRemoteMachines`
|
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
import { join } from "node:path";
|
|
37
37
|
import { resolveMachineLabel } from "../../lib/machine.ts";
|
|
38
38
|
import { presenceRelayUrl } from "../config.ts";
|
|
39
|
+
import { eventV3ActiveWatchPath } from "../events/v3/reader.ts";
|
|
39
40
|
import { buildPresenceBlob, type PresenceBlob } from "./blob.ts";
|
|
40
41
|
import { originUrl, rootCommitSha, sanitizeRefComponent } from "./git.ts";
|
|
41
42
|
import {
|
|
@@ -259,12 +260,11 @@ export async function runRelayDaemon(coordRoot: string): Promise<number> {
|
|
|
259
260
|
|
|
260
261
|
connect();
|
|
261
262
|
|
|
262
|
-
// Publish on
|
|
263
|
+
// Publish on canonical V3 ledger change (debounced).
|
|
263
264
|
let debounce: ReturnType<typeof setTimeout> | null = null;
|
|
264
|
-
const
|
|
265
|
-
mkdirSync(activeDir, { recursive: true });
|
|
265
|
+
const activeLedger = eventV3ActiveWatchPath(coordRoot);
|
|
266
266
|
try {
|
|
267
|
-
watch(
|
|
267
|
+
watch(activeLedger, () => {
|
|
268
268
|
if (debounce) clearTimeout(debounce);
|
|
269
269
|
debounce = setTimeout(() => void publishNow(), WATCH_DEBOUNCE_MS);
|
|
270
270
|
});
|
package/src/core/work/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ export {
|
|
|
6
6
|
cancelWorkItem,
|
|
7
7
|
createWorkItem,
|
|
8
8
|
listWorkItems,
|
|
9
|
+
listWorkItemsWithWarnings,
|
|
9
10
|
newWorkId,
|
|
10
11
|
openOperatorFindings,
|
|
11
12
|
readWorkItem,
|
|
@@ -19,6 +20,8 @@ export {
|
|
|
19
20
|
type WorkEvent,
|
|
20
21
|
type WorkEventType,
|
|
21
22
|
type WorkIntent,
|
|
23
|
+
type WorkListResult,
|
|
24
|
+
type WorkListWarning,
|
|
22
25
|
type WorkNextAction,
|
|
23
26
|
type WorkProjection,
|
|
24
27
|
type WorkRecord,
|
package/src/core/work/read.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export {
|
|
2
2
|
assertWorkId,
|
|
3
3
|
listWorkItems,
|
|
4
|
+
listWorkItemsWithWarnings,
|
|
4
5
|
readWorkItem,
|
|
5
6
|
WORK_EVENT_SCHEMA_VERSION,
|
|
6
7
|
WORK_INTENT_SCHEMA_VERSION,
|
|
@@ -9,6 +10,8 @@ export {
|
|
|
9
10
|
type WorkEvent,
|
|
10
11
|
type WorkEventType,
|
|
11
12
|
type WorkIntent,
|
|
13
|
+
type WorkListResult,
|
|
14
|
+
type WorkListWarning,
|
|
12
15
|
type WorkNextAction,
|
|
13
16
|
type WorkProjection,
|
|
14
17
|
type WorkRecord,
|
package/src/core/work/runner.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { resolve } from "node:path";
|
|
2
2
|
import { runWorkflow } from "../workflow/engine.ts";
|
|
3
3
|
import { readWorkflowProof } from "../workflow/proof.ts";
|
|
4
|
+
import { readWorkflowRunManifest } from "../workflow/run-state.ts";
|
|
4
5
|
import type {
|
|
5
6
|
EngineOpts,
|
|
6
7
|
RunReport,
|
|
@@ -80,10 +81,14 @@ export async function runWorkItem(input: RunWorkItemInput): Promise<RunReport> {
|
|
|
80
81
|
const attempt = record.projection.attempts_used + 1;
|
|
81
82
|
const trigger = input.retry ? "retry" : "initial";
|
|
82
83
|
let prior: WorkflowAttemptContext["prior"];
|
|
84
|
+
let specialists = input.engine.specialists;
|
|
83
85
|
if (trigger === "retry") {
|
|
84
86
|
if (!latest) {
|
|
85
87
|
throw new Error(`work item ${input.workId} has no prior attempt to retry`);
|
|
86
88
|
}
|
|
89
|
+
if (specialists === undefined && latest.proof_path) {
|
|
90
|
+
specialists = readWorkflowRunManifest(coordRoot, latest.run_id).execution.specialists;
|
|
91
|
+
}
|
|
87
92
|
prior = priorContext(coordRoot, latest);
|
|
88
93
|
}
|
|
89
94
|
const open = openOperatorFindings(coordRoot, input.workId);
|
|
@@ -110,6 +115,7 @@ export async function runWorkItem(input: RunWorkItemInput): Promise<RunReport> {
|
|
|
110
115
|
});
|
|
111
116
|
return await runWorkflow(record.intent.workflow.path, {
|
|
112
117
|
...input.engine,
|
|
118
|
+
specialists,
|
|
113
119
|
coordRoot,
|
|
114
120
|
runId,
|
|
115
121
|
workItemId: input.workId,
|
package/src/core/work/state.ts
CHANGED
|
@@ -181,6 +181,16 @@ export interface WorkRecord {
|
|
|
181
181
|
projection: WorkProjection;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
+
export interface WorkListWarning {
|
|
185
|
+
work_id: string;
|
|
186
|
+
reason: string;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface WorkListResult {
|
|
190
|
+
records: WorkRecord[];
|
|
191
|
+
warnings: WorkListWarning[];
|
|
192
|
+
}
|
|
193
|
+
|
|
184
194
|
export interface CreateWorkItemInput {
|
|
185
195
|
coordRoot: string;
|
|
186
196
|
title: string;
|
|
@@ -271,14 +281,28 @@ export function readWorkItem(coordRoot: string, workId: string): WorkRecord {
|
|
|
271
281
|
}
|
|
272
282
|
|
|
273
283
|
export function listWorkItems(coordRoot: string): WorkRecord[] {
|
|
284
|
+
return listWorkItemsWithWarnings(coordRoot).records;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export function listWorkItemsWithWarnings(coordRoot: string): WorkListResult {
|
|
274
288
|
const base = join(resolve(coordRoot), ".harnery", "work");
|
|
275
|
-
if (!existsSync(base)) return [];
|
|
289
|
+
if (!existsSync(base)) return { records: [], warnings: [] };
|
|
276
290
|
const records: WorkRecord[] = [];
|
|
291
|
+
const warnings: WorkListWarning[] = [];
|
|
277
292
|
for (const name of readdirSync(base)) {
|
|
278
293
|
if (!WORK_ID.test(name) || !existsSync(join(base, name, "intent.json"))) continue;
|
|
279
|
-
|
|
294
|
+
try {
|
|
295
|
+
records.push(readWorkItem(coordRoot, name));
|
|
296
|
+
} catch (error) {
|
|
297
|
+
warnings.push({
|
|
298
|
+
work_id: name,
|
|
299
|
+
reason: error instanceof Error ? error.message : String(error),
|
|
300
|
+
});
|
|
301
|
+
}
|
|
280
302
|
}
|
|
281
|
-
|
|
303
|
+
records.sort((a, b) => b.intent.created_at.localeCompare(a.intent.created_at));
|
|
304
|
+
warnings.sort((a, b) => a.work_id.localeCompare(b.work_id));
|
|
305
|
+
return { records, warnings };
|
|
282
306
|
}
|
|
283
307
|
|
|
284
308
|
export function reconcileWorkItem(coordRoot: string, workId: string, actor?: string): WorkRecord {
|
|
@@ -21,7 +21,6 @@ import { createHash, randomBytes } from "node:crypto";
|
|
|
21
21
|
import { existsSync, mkdirSync, readFileSync, statSync } from "node:fs";
|
|
22
22
|
import { isAbsolute, join, resolve } from "node:path";
|
|
23
23
|
import { pathToFileURL } from "node:url";
|
|
24
|
-
import { killHeartbeat, registerWorkflowChild } from "../agents/state/heartbeat-writer.ts";
|
|
25
24
|
import { snapshotRepo } from "../context/index.ts";
|
|
26
25
|
import type {
|
|
27
26
|
ExternalMutationRequest,
|
|
@@ -41,6 +40,7 @@ import { freezeWorkflowAttemptContext } from "./attempt-context.ts";
|
|
|
41
40
|
import { type BillingProbe, probeBilling } from "./billing.ts";
|
|
42
41
|
import { stableDigest } from "./durable-record.ts";
|
|
43
42
|
import { evidencePreflightError } from "./evidence-preflight.ts";
|
|
43
|
+
import { endWorkflowChildSessionV3, startWorkflowChildSessionV3 } from "./live-session-v3.ts";
|
|
44
44
|
import {
|
|
45
45
|
buildWorkflowProof,
|
|
46
46
|
createEvidenceRecord,
|
|
@@ -947,23 +947,18 @@ async function executeWorkflow(
|
|
|
947
947
|
});
|
|
948
948
|
log(`[${name}] ${currentStage || "(no stage)"} → ${id} [${adapter}] ${label}`);
|
|
949
949
|
|
|
950
|
-
//
|
|
951
|
-
//
|
|
952
|
-
//
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
model: agentOpts.model,
|
|
963
|
-
});
|
|
964
|
-
} catch {
|
|
965
|
-
/* visibility is not worth failing a spawn over */
|
|
966
|
-
}
|
|
950
|
+
// Headless children do not reliably fire adapter hooks. The engine owns
|
|
951
|
+
// their canonical V3 start so every dispatched child has an auditable
|
|
952
|
+
// generation before it begins work.
|
|
953
|
+
startWorkflowChildSessionV3({
|
|
954
|
+
coordRoot: opts.coordRoot,
|
|
955
|
+
instanceId: childInstanceId(runId, id),
|
|
956
|
+
runId,
|
|
957
|
+
agentId: id,
|
|
958
|
+
adapter,
|
|
959
|
+
label,
|
|
960
|
+
model: agentOpts.model,
|
|
961
|
+
});
|
|
967
962
|
|
|
968
963
|
let attemptPrompt = dispatchPrompt;
|
|
969
964
|
let last: SpawnResult | null = null;
|
|
@@ -1077,13 +1072,18 @@ async function executeWorkflow(
|
|
|
1077
1072
|
throw error;
|
|
1078
1073
|
} finally {
|
|
1079
1074
|
reservedCostUsd = Math.max(0, reservedCostUsd - reservedForDispatch);
|
|
1080
|
-
//
|
|
1081
|
-
// outlives its process reads as a live agent forever and blocks peers on
|
|
1082
|
-
// its stale claims. The transcript remains the durable record.
|
|
1075
|
+
// Record the canonical terminal before removing the disposable cache.
|
|
1083
1076
|
try {
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1077
|
+
endWorkflowChildSessionV3({
|
|
1078
|
+
coordRoot: opts.coordRoot,
|
|
1079
|
+
instanceId: childInstanceId(runId, id),
|
|
1080
|
+
runId,
|
|
1081
|
+
agentId: id,
|
|
1082
|
+
adapter,
|
|
1083
|
+
cleanExit: agentProof.status === "succeeded",
|
|
1084
|
+
});
|
|
1085
|
+
} catch (error) {
|
|
1086
|
+
log(`[${name}] V3 terminal recording failed: ${(error as Error).message}`);
|
|
1087
1087
|
}
|
|
1088
1088
|
release();
|
|
1089
1089
|
}
|