harnery 0.35.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commander.d.ts +30 -5
- package/dist/commander.d.ts.map +1 -1
- package/dist/commander.js +124 -96
- package/dist/commands/agents.d.ts +23 -3
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +379 -198
- package/dist/commands/backup.d.ts.map +1 -1
- package/dist/commands/backup.js +10 -10
- package/dist/commands/browse-session.d.ts.map +1 -1
- package/dist/commands/browse-session.js +12 -0
- package/dist/commands/browse.d.ts +1 -1
- package/dist/commands/browse.d.ts.map +1 -1
- package/dist/commands/browse.js +5 -4
- package/dist/commands/conversations.d.ts +10 -0
- package/dist/commands/conversations.d.ts.map +1 -0
- package/dist/commands/conversations.js +201 -0
- package/dist/commands/deinit.d.ts.map +1 -1
- package/dist/commands/deinit.js +5 -0
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +13 -2
- package/dist/commands/doctor.d.ts +5 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +51 -7
- package/dist/commands/fetch.js +6 -5
- package/dist/commands/files.d.ts +22 -0
- package/dist/commands/files.d.ts.map +1 -0
- package/dist/commands/files.js +113 -0
- package/dist/commands/governor.js +14 -12
- package/dist/commands/inbox.d.ts +5 -0
- package/dist/commands/inbox.d.ts.map +1 -0
- package/dist/commands/inbox.js +57 -0
- package/dist/commands/init.d.ts +4 -5
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +63 -13
- package/dist/commands/ledger-v3.d.ts.map +1 -1
- package/dist/commands/ledger-v3.js +347 -1
- package/dist/commands/logs.d.ts +4 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +169 -0
- package/dist/commands/messages.d.ts +5 -0
- package/dist/commands/messages.d.ts.map +1 -0
- package/dist/commands/messages.js +45 -0
- package/dist/commands/outline.d.ts +1 -1
- package/dist/commands/outline.d.ts.map +1 -1
- package/dist/commands/outline.js +2 -2
- package/dist/commands/read.d.ts +1 -1
- package/dist/commands/read.d.ts.map +1 -1
- package/dist/commands/read.js +2 -2
- package/dist/commands/semantic.d.ts.map +1 -1
- package/dist/commands/semantic.js +54 -2
- package/dist/commands/storage.d.ts +4 -0
- package/dist/commands/storage.d.ts.map +1 -0
- package/dist/commands/storage.js +238 -0
- package/dist/commands/tunnel.d.ts +5 -1
- package/dist/commands/tunnel.d.ts.map +1 -1
- package/dist/commands/tunnel.js +44 -31
- package/dist/commands/web.d.ts +3 -0
- package/dist/commands/web.d.ts.map +1 -1
- package/dist/commands/web.js +67 -7
- package/dist/commands/work.js +3 -3
- package/dist/commands/workflow.js +13 -13
- package/dist/core/adapters/profiles.d.ts +1 -1
- package/dist/core/agents/cli.js +209 -39
- package/dist/core/agents/live-authority-v3.d.ts +47 -1
- package/dist/core/agents/live-authority-v3.d.ts.map +1 -1
- package/dist/core/agents/live-authority-v3.js +244 -10
- package/dist/core/agents/live-lifecycle-v3.js +6 -1
- package/dist/core/agents/live-observation-v3.d.ts.map +1 -1
- package/dist/core/agents/live-observation-v3.js +6 -1
- package/dist/core/agents/render/prompt-context.d.ts +9 -3
- package/dist/core/agents/render/prompt-context.d.ts.map +1 -1
- package/dist/core/agents/render/prompt-context.js +24 -7
- package/dist/core/agents/rules/stop-hook.d.ts +2 -0
- package/dist/core/agents/rules/stop-hook.d.ts.map +1 -1
- package/dist/core/agents/rules/stop-hook.js +94 -13
- package/dist/core/agents/rules/verdict.d.ts +1 -0
- package/dist/core/agents/rules/verdict.d.ts.map +1 -1
- package/dist/core/agents/session-events.d.ts.map +1 -1
- package/dist/core/agents/session-events.js +4 -0
- package/dist/core/agents/session-finalization-state-v3.js +1 -1
- package/dist/core/agents/session-finalizer-v3.js +5 -1
- package/dist/core/agents/state/activity-log.d.ts +3 -0
- package/dist/core/agents/state/activity-log.d.ts.map +1 -1
- package/dist/core/agents/state/activity-log.js +6 -3
- package/dist/core/agents/state/heartbeat-writer.d.ts +6 -0
- package/dist/core/agents/state/heartbeat-writer.d.ts.map +1 -1
- package/dist/core/agents/state/heartbeat-writer.js +18 -0
- package/dist/core/agents/state/live-coordination-view.d.ts +5 -7
- package/dist/core/agents/state/live-coordination-view.d.ts.map +1 -1
- package/dist/core/agents/state/live-coordination-view.js +15 -90
- package/dist/core/agents/state/live-coordination-writer.d.ts +12 -0
- package/dist/core/agents/state/live-coordination-writer.d.ts.map +1 -0
- package/dist/core/agents/state/live-coordination-writer.js +92 -0
- package/dist/core/artifacts/index.d.ts +21 -0
- package/dist/core/artifacts/index.d.ts.map +1 -1
- package/dist/core/artifacts/index.js +46 -1
- package/dist/core/config.d.ts +62 -4
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +98 -4
- package/dist/core/conversations/archive.d.ts +49 -0
- package/dist/core/conversations/archive.d.ts.map +1 -0
- package/dist/core/conversations/archive.js +136 -0
- package/dist/core/conversations/catalog.d.ts +10 -0
- package/dist/core/conversations/catalog.d.ts.map +1 -0
- package/dist/core/conversations/catalog.js +72 -0
- package/dist/core/conversations/context-pack.d.ts +6 -0
- package/dist/core/conversations/context-pack.d.ts.map +1 -0
- package/dist/core/conversations/context-pack.js +60 -0
- package/dist/core/conversations/contract.d.ts +155 -0
- package/dist/core/conversations/contract.d.ts.map +1 -0
- package/dist/core/conversations/contract.js +1 -0
- package/dist/core/conversations/evaluation.d.ts +16 -0
- package/dist/core/conversations/evaluation.d.ts.map +1 -0
- package/dist/core/conversations/evaluation.js +9 -0
- package/dist/core/conversations/index.d.ts +10 -0
- package/dist/core/conversations/index.d.ts.map +1 -0
- package/dist/core/conversations/index.js +9 -0
- package/dist/core/conversations/lifecycle.d.ts +28 -0
- package/dist/core/conversations/lifecycle.d.ts.map +1 -0
- package/dist/core/conversations/lifecycle.js +29 -0
- package/dist/core/conversations/normalize.d.ts +14 -0
- package/dist/core/conversations/normalize.d.ts.map +1 -0
- package/dist/core/conversations/normalize.js +82 -0
- package/dist/core/conversations/query.d.ts +8 -0
- package/dist/core/conversations/query.d.ts.map +1 -0
- package/dist/core/conversations/query.js +280 -0
- package/dist/core/conversations/search-index.d.ts +9 -0
- package/dist/core/conversations/search-index.d.ts.map +1 -0
- package/dist/core/conversations/search-index.js +29 -0
- package/dist/core/events/legacy-storage/canary.d.ts +18 -0
- package/dist/core/events/legacy-storage/canary.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/canary.js +150 -0
- package/dist/core/events/legacy-storage/fence.d.ts +15 -0
- package/dist/core/events/legacy-storage/fence.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/fence.js +115 -0
- package/dist/core/events/legacy-storage/index.d.ts +6 -0
- package/dist/core/events/legacy-storage/index.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/index.js +5 -0
- package/dist/core/events/legacy-storage/inventory.d.ts +10 -0
- package/dist/core/events/legacy-storage/inventory.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/inventory.js +40 -0
- package/dist/core/events/legacy-storage/manifest.d.ts +23 -0
- package/dist/core/events/legacy-storage/manifest.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/manifest.js +108 -0
- package/dist/core/events/legacy-storage/reader.d.ts +15 -0
- package/dist/core/events/legacy-storage/reader.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/reader.js +154 -0
- package/dist/core/events/v3/authority-outbox.d.ts +7 -2
- package/dist/core/events/v3/authority-outbox.d.ts.map +1 -1
- package/dist/core/events/v3/authority-outbox.js +16 -3
- package/dist/core/events/v3/base-contract.d.ts +81 -41
- package/dist/core/events/v3/base-contract.d.ts.map +1 -1
- package/dist/core/events/v3/base-contract.js +17 -7
- package/dist/core/events/v3/bootstrap.d.ts +39 -0
- package/dist/core/events/v3/bootstrap.d.ts.map +1 -1
- package/dist/core/events/v3/bootstrap.js +167 -3
- package/dist/core/events/v3/capabilities.js +3 -3
- package/dist/core/events/v3/control-witness.d.ts +44 -0
- package/dist/core/events/v3/control-witness.d.ts.map +1 -0
- package/dist/core/events/v3/control-witness.js +233 -0
- package/dist/core/events/v3/control-writer.d.ts +4 -0
- package/dist/core/events/v3/control-writer.d.ts.map +1 -0
- package/dist/core/events/v3/control-writer.js +16 -0
- package/dist/core/events/v3/control.d.ts +8 -2
- package/dist/core/events/v3/control.d.ts.map +1 -1
- package/dist/core/events/v3/control.js +46 -18
- package/dist/core/events/v3/coordination-transaction-recovery.d.ts +42 -0
- package/dist/core/events/v3/coordination-transaction-recovery.d.ts.map +1 -0
- package/dist/core/events/v3/coordination-transaction-recovery.js +342 -0
- package/dist/core/events/v3/coordination-view.d.ts.map +1 -1
- package/dist/core/events/v3/coordination-view.js +16 -1
- package/dist/core/events/v3/generated.d.ts +1 -1
- package/dist/core/events/v3/generated.js +1 -1
- package/dist/core/events/v3/index.d.ts +4 -2
- package/dist/core/events/v3/index.d.ts.map +1 -1
- package/dist/core/events/v3/index.js +3 -1
- package/dist/core/events/v3/live-route-observer.d.ts +31 -0
- package/dist/core/events/v3/live-route-observer.d.ts.map +1 -0
- package/dist/core/events/v3/live-route-observer.js +58 -0
- package/dist/core/events/v3/live-routing.d.ts +13 -21
- package/dist/core/events/v3/live-routing.d.ts.map +1 -1
- package/dist/core/events/v3/live-routing.js +45 -41
- package/dist/core/events/v3/producers/coordination-recorder.d.ts +11 -1
- package/dist/core/events/v3/producers/coordination-recorder.d.ts.map +1 -1
- package/dist/core/events/v3/producers/coordination-recorder.js +76 -10
- package/dist/core/events/v3/producers/diagnostic-summaries.d.ts +129 -0
- package/dist/core/events/v3/producers/diagnostic-summaries.d.ts.map +1 -0
- package/dist/core/events/v3/producers/diagnostic-summaries.js +499 -0
- package/dist/core/events/v3/producers/hook-base.js +1 -1
- package/dist/core/events/v3/producers/intake.d.ts +7 -0
- package/dist/core/events/v3/producers/intake.d.ts.map +1 -1
- package/dist/core/events/v3/producers/intake.js +25 -2
- package/dist/core/events/v3/producers/producer-state-observer.d.ts +8 -0
- package/dist/core/events/v3/producers/producer-state-observer.d.ts.map +1 -0
- package/dist/core/events/v3/producers/producer-state-observer.js +45 -0
- package/dist/core/events/v3/producers/recorder.d.ts +55 -1
- package/dist/core/events/v3/producers/recorder.d.ts.map +1 -1
- package/dist/core/events/v3/producers/recorder.js +353 -24
- package/dist/core/events/v3/reader.d.ts +51 -0
- package/dist/core/events/v3/reader.d.ts.map +1 -1
- package/dist/core/events/v3/reader.js +181 -1
- package/dist/core/events/v3/rotation-config.d.ts +9 -0
- package/dist/core/events/v3/rotation-config.d.ts.map +1 -0
- package/dist/core/events/v3/rotation-config.js +91 -0
- package/dist/core/events/v3/runtime-build.d.ts +11 -0
- package/dist/core/events/v3/runtime-build.d.ts.map +1 -0
- package/dist/core/events/v3/runtime-build.js +39 -0
- package/dist/core/events/v3/runtime-identity.d.ts +5 -0
- package/dist/core/events/v3/runtime-identity.d.ts.map +1 -0
- package/dist/core/events/v3/runtime-identity.js +18 -0
- package/dist/core/events/v3/runtime-telemetry-capabilities.d.ts +6 -5
- package/dist/core/events/v3/runtime-telemetry-capabilities.d.ts.map +1 -1
- package/dist/core/events/v3/runtime-telemetry-capabilities.js +1 -1
- package/dist/core/events/v3/support-storage/classify.d.ts +46 -0
- package/dist/core/events/v3/support-storage/classify.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/classify.js +149 -0
- package/dist/core/events/v3/support-storage/eligibility.d.ts +29 -0
- package/dist/core/events/v3/support-storage/eligibility.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/eligibility.js +35 -0
- package/dist/core/events/v3/support-storage/index.d.ts +10 -0
- package/dist/core/events/v3/support-storage/index.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/index.js +9 -0
- package/dist/core/events/v3/support-storage/inventory.d.ts +30 -0
- package/dist/core/events/v3/support-storage/inventory.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/inventory.js +94 -0
- package/dist/core/events/v3/support-storage/logical-authority.d.ts +14 -0
- package/dist/core/events/v3/support-storage/logical-authority.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/logical-authority.js +104 -0
- package/dist/core/events/v3/support-storage/maintenance.d.ts +98 -0
- package/dist/core/events/v3/support-storage/maintenance.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/maintenance.js +352 -0
- package/dist/core/events/v3/support-storage/pack-contract.d.ts +59 -0
- package/dist/core/events/v3/support-storage/pack-contract.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/pack-contract.js +249 -0
- package/dist/core/events/v3/support-storage/pack-reader.d.ts +34 -0
- package/dist/core/events/v3/support-storage/pack-reader.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/pack-reader.js +258 -0
- package/dist/core/events/v3/support-storage/pack-writer.d.ts +30 -0
- package/dist/core/events/v3/support-storage/pack-writer.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/pack-writer.js +268 -0
- package/dist/core/events/v3/support-storage/recovery.d.ts +15 -0
- package/dist/core/events/v3/support-storage/recovery.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/recovery.js +22 -0
- package/dist/core/events/v3/turn-telemetry.d.ts +14 -8
- package/dist/core/events/v3/turn-telemetry.d.ts.map +1 -1
- package/dist/core/events/v3/turn-telemetry.js +32 -2
- package/dist/core/events/v3/writer.d.ts +13 -1
- package/dist/core/events/v3/writer.d.ts.map +1 -1
- package/dist/core/events/v3/writer.js +126 -12
- package/dist/core/governor/plan-read.d.ts.map +1 -1
- package/dist/core/governor/plan-read.js +5 -21
- package/dist/core/governor/planning.js +6 -8
- package/dist/core/governor/service-read.d.ts +12 -0
- package/dist/core/governor/service-read.d.ts.map +1 -1
- package/dist/core/governor/service-read.js +266 -2
- package/dist/core/governor/service.d.ts +1 -0
- package/dist/core/governor/service.d.ts.map +1 -1
- package/dist/core/governor/service.js +53 -18
- package/dist/core/guard/evidence-v3.d.ts.map +1 -1
- package/dist/core/guard/evidence-v3.js +2 -0
- package/dist/core/hooks/adapter/events.d.ts.map +1 -1
- package/dist/core/hooks/adapter/events.js +1 -0
- package/dist/core/hooks/adapter/output.d.ts +4 -2
- package/dist/core/hooks/adapter/output.d.ts.map +1 -1
- package/dist/core/hooks/adapter/output.js +13 -5
- package/dist/core/hooks/adapter/runtime-telemetry.d.ts +27 -4
- package/dist/core/hooks/adapter/runtime-telemetry.d.ts.map +1 -1
- package/dist/core/hooks/adapter/runtime-telemetry.js +307 -6
- package/dist/core/hooks/cli.js +212 -30
- package/dist/core/hooks/effects/image-capture.d.ts +1 -1
- package/dist/core/hooks/effects/image-capture.d.ts.map +1 -1
- package/dist/core/hooks/effects/image-capture.js +4 -2
- package/dist/core/hooks/remediation-cap.d.ts +8 -3
- package/dist/core/hooks/remediation-cap.d.ts.map +1 -1
- package/dist/core/hooks/remediation-cap.js +3 -11
- package/dist/core/hooks/resolve/coord-root.d.ts +22 -9
- package/dist/core/hooks/resolve/coord-root.d.ts.map +1 -1
- package/dist/core/hooks/resolve/coord-root.js +92 -11
- package/dist/core/hooks/resolve/owner.d.ts.map +1 -1
- package/dist/core/hooks/resolve/owner.js +5 -0
- package/dist/core/hooks/resolve/transcript.d.ts +8 -0
- package/dist/core/hooks/resolve/transcript.d.ts.map +1 -1
- package/dist/core/hooks/resolve/transcript.js +11 -0
- package/dist/core/inbox/contract.d.ts +64 -0
- package/dist/core/inbox/contract.d.ts.map +1 -0
- package/dist/core/inbox/contract.js +13 -0
- package/dist/core/inbox/index.d.ts +5 -0
- package/dist/core/inbox/index.d.ts.map +1 -0
- package/dist/core/inbox/index.js +4 -0
- package/dist/core/inbox/lifecycle.d.ts +22 -0
- package/dist/core/inbox/lifecycle.d.ts.map +1 -0
- package/dist/core/inbox/lifecycle.js +41 -0
- package/dist/core/inbox/service.d.ts +36 -0
- package/dist/core/inbox/service.d.ts.map +1 -0
- package/dist/core/inbox/service.js +210 -0
- package/dist/core/inbox/watcher.d.ts +7 -0
- package/dist/core/inbox/watcher.d.ts.map +1 -0
- package/dist/core/inbox/watcher.js +26 -0
- package/dist/core/presence/codec-digest.d.ts.map +1 -1
- package/dist/core/presence/codec-digest.js +14 -3
- package/dist/core/presence/relay-client.d.ts +1 -0
- package/dist/core/presence/relay-client.d.ts.map +1 -1
- package/dist/core/presence/relay-client.js +52 -8
- package/dist/core/semantic/adapters.d.ts +11 -8
- package/dist/core/semantic/adapters.d.ts.map +1 -1
- package/dist/core/semantic/adapters.js +169 -31
- package/dist/core/semantic/contract.d.ts +532 -48
- package/dist/core/semantic/contract.d.ts.map +1 -1
- package/dist/core/semantic/contract.js +104 -3
- package/dist/core/semantic/index.d.ts +7 -3
- package/dist/core/semantic/index.d.ts.map +1 -1
- package/dist/core/semantic/index.js +7 -3
- package/dist/core/semantic/once.d.ts +6 -1
- package/dist/core/semantic/once.d.ts.map +1 -1
- package/dist/core/semantic/once.js +80 -9
- package/dist/core/semantic/prompt.d.ts.map +1 -1
- package/dist/core/semantic/prompt.js +14 -1
- package/dist/core/semantic/review.d.ts +144 -0
- package/dist/core/semantic/review.d.ts.map +1 -0
- package/dist/core/semantic/review.js +544 -0
- package/dist/core/semantic/routes.d.ts +10 -0
- package/dist/core/semantic/routes.d.ts.map +1 -0
- package/dist/core/semantic/routes.js +21 -0
- package/dist/core/semantic/scheduler.d.ts +14 -3
- package/dist/core/semantic/scheduler.d.ts.map +1 -1
- package/dist/core/semantic/scheduler.js +30 -6
- package/dist/core/semantic/service-status.d.ts +20 -0
- package/dist/core/semantic/service-status.d.ts.map +1 -1
- package/dist/core/semantic/service-status.js +60 -4
- package/dist/core/semantic/service.d.ts +1 -0
- package/dist/core/semantic/service.d.ts.map +1 -1
- package/dist/core/semantic/service.js +104 -15
- package/dist/core/semantic/soak.d.ts +75 -0
- package/dist/core/semantic/soak.d.ts.map +1 -0
- package/dist/core/semantic/soak.js +476 -0
- package/dist/core/semantic/storage.d.ts +11 -1
- package/dist/core/semantic/storage.d.ts.map +1 -1
- package/dist/core/semantic/storage.js +4 -3
- package/dist/core/semantic/usage.d.ts +43 -0
- package/dist/core/semantic/usage.d.ts.map +1 -0
- package/dist/core/semantic/usage.js +193 -0
- package/dist/core/semantic/validate.d.ts +3 -1
- package/dist/core/semantic/validate.d.ts.map +1 -1
- package/dist/core/semantic/validate.js +34 -1
- package/dist/core/storage/buffer.d.ts +28 -0
- package/dist/core/storage/buffer.d.ts.map +1 -0
- package/dist/core/storage/buffer.js +101 -0
- package/dist/core/storage/builtins.d.ts +3 -0
- package/dist/core/storage/builtins.d.ts.map +1 -0
- package/dist/core/storage/builtins.js +683 -0
- package/dist/core/storage/catalog.d.ts +19 -0
- package/dist/core/storage/catalog.d.ts.map +1 -0
- package/dist/core/storage/catalog.js +365 -0
- package/dist/core/storage/config.d.ts +16 -0
- package/dist/core/storage/config.d.ts.map +1 -0
- package/dist/core/storage/config.js +311 -0
- package/dist/core/storage/contract.d.ts +275 -0
- package/dist/core/storage/contract.d.ts.map +1 -0
- package/dist/core/storage/contract.js +3 -0
- package/dist/core/storage/durable-history.d.ts +36 -0
- package/dist/core/storage/durable-history.d.ts.map +1 -0
- package/dist/core/storage/durable-history.js +606 -0
- package/dist/core/storage/health.d.ts +4 -0
- package/dist/core/storage/health.d.ts.map +1 -0
- package/dist/core/storage/health.js +65 -0
- package/dist/core/storage/index.d.ts +16 -0
- package/dist/core/storage/index.d.ts.map +1 -0
- package/dist/core/storage/index.js +15 -0
- package/dist/core/storage/inventory.d.ts +25 -0
- package/dist/core/storage/inventory.d.ts.map +1 -0
- package/dist/core/storage/inventory.js +666 -0
- package/dist/core/storage/jsonl.d.ts +52 -0
- package/dist/core/storage/jsonl.d.ts.map +1 -0
- package/dist/core/storage/jsonl.js +156 -0
- package/dist/core/storage/log-retention.d.ts +52 -0
- package/dist/core/storage/log-retention.d.ts.map +1 -0
- package/dist/core/storage/log-retention.js +419 -0
- package/dist/core/storage/logger.d.ts +82 -0
- package/dist/core/storage/logger.d.ts.map +1 -0
- package/dist/core/storage/logger.js +411 -0
- package/dist/core/storage/maintenance-providers.d.ts +26 -0
- package/dist/core/storage/maintenance-providers.d.ts.map +1 -0
- package/dist/core/storage/maintenance-providers.js +141 -0
- package/dist/core/storage/maintenance.d.ts +125 -0
- package/dist/core/storage/maintenance.d.ts.map +1 -0
- package/dist/core/storage/maintenance.js +609 -0
- package/dist/core/storage/metrics.d.ts +60 -0
- package/dist/core/storage/metrics.d.ts.map +1 -0
- package/dist/core/storage/metrics.js +134 -0
- package/dist/core/storage/policy.d.ts +7 -0
- package/dist/core/storage/policy.d.ts.map +1 -0
- package/dist/core/storage/policy.js +110 -0
- package/dist/core/storage/process-log.d.ts +38 -0
- package/dist/core/storage/process-log.d.ts.map +1 -0
- package/dist/core/storage/process-log.js +165 -0
- package/dist/core/storage/query.d.ts +34 -0
- package/dist/core/storage/query.d.ts.map +1 -0
- package/dist/core/storage/query.js +295 -0
- package/dist/core/storage/receipts.d.ts +23 -0
- package/dist/core/storage/receipts.d.ts.map +1 -0
- package/dist/core/storage/receipts.js +117 -0
- package/dist/core/storage/segments.d.ts +84 -0
- package/dist/core/storage/segments.d.ts.map +1 -0
- package/dist/core/storage/segments.js +542 -0
- package/dist/core/storage/sink-graph.d.ts +65 -0
- package/dist/core/storage/sink-graph.d.ts.map +1 -0
- package/dist/core/storage/sink-graph.js +213 -0
- package/dist/core/storage/storm-control.d.ts +23 -0
- package/dist/core/storage/storm-control.d.ts.map +1 -0
- package/dist/core/storage/storm-control.js +59 -0
- package/dist/core/work/state.d.ts.map +1 -1
- package/dist/core/work/state.js +10 -14
- package/dist/core/workflow/live-session-v3.d.ts.map +1 -1
- package/dist/core/workflow/live-session-v3.js +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/lazy-commands.d.ts +26 -0
- package/dist/lazy-commands.d.ts.map +1 -0
- package/dist/lazy-commands.js +210 -0
- package/dist/lib/docs-lint.d.ts +2 -0
- package/dist/lib/docs-lint.d.ts.map +1 -1
- package/dist/lib/docs-lint.js +45 -80
- package/dist/lib/docs-metadata-audit.d.ts +3 -0
- package/dist/lib/docs-metadata-audit.d.ts.map +1 -1
- package/dist/lib/docs-metadata-audit.js +13 -23
- package/dist/lib/docs-metadata-sync.d.ts +1 -0
- package/dist/lib/docs-metadata-sync.d.ts.map +1 -1
- package/dist/lib/docs-metadata-sync.js +28 -10
- package/dist/lib/docs-repository-view.d.ts +22 -0
- package/dist/lib/docs-repository-view.d.ts.map +1 -0
- package/dist/lib/docs-repository-view.js +185 -0
- package/dist/lib/http/client.d.ts +11 -5
- package/dist/lib/http/client.d.ts.map +1 -1
- package/dist/lib/http/client.js +22 -4
- package/dist/lib/http/index.d.ts +1 -1
- package/dist/lib/http/index.d.ts.map +1 -1
- package/dist/lib/http/index.js +1 -1
- package/dist/lib/indexer-exclusions.d.ts +27 -0
- package/dist/lib/indexer-exclusions.d.ts.map +1 -0
- package/dist/lib/indexer-exclusions.js +176 -0
- package/dist/lib/instructions/templates.d.ts.map +1 -1
- package/dist/lib/instructions/templates.js +5 -0
- package/dist/lib/local-file-url.d.ts +9 -0
- package/dist/lib/local-file-url.d.ts.map +1 -0
- package/dist/lib/local-file-url.js +20 -0
- package/dist/lib/web-performance.d.ts +118 -0
- package/dist/lib/web-performance.d.ts.map +1 -0
- package/dist/lib/web-performance.js +192 -0
- package/package.json +29 -2
- package/schemas/config.schema.json +58 -0
- package/schemas/event-v3.schema.json +324 -112
- package/src/commander.ts +462 -95
- package/src/commands/agents.ts +517 -190
- package/src/commands/backup.ts +18 -14
- package/src/commands/browse-session.ts +12 -0
- package/src/commands/browse.ts +6 -7
- package/src/commands/conversations.ts +279 -0
- package/src/commands/deinit.ts +6 -0
- package/src/commands/docs.ts +25 -6
- package/src/commands/doctor.ts +75 -9
- package/src/commands/fetch.ts +7 -6
- package/src/commands/files.ts +143 -0
- package/src/commands/governor.ts +13 -12
- package/src/commands/inbox.ts +61 -0
- package/src/commands/init.ts +78 -16
- package/src/commands/ledger-v3.ts +421 -1
- package/src/commands/logs.ts +224 -0
- package/src/commands/messages.ts +61 -0
- package/src/commands/outline.ts +6 -2
- package/src/commands/read.ts +6 -2
- package/src/commands/semantic.ts +66 -1
- package/src/commands/storage.ts +310 -0
- package/src/commands/tunnel.ts +66 -52
- package/src/commands/web.ts +77 -7
- package/src/commands/work.ts +3 -3
- package/src/commands/workflow.ts +13 -13
- package/src/core/agents/cli.ts +259 -53
- package/src/core/agents/live-authority-v3.ts +341 -10
- package/src/core/agents/live-lifecycle-v3.ts +6 -1
- package/src/core/agents/live-observation-v3.ts +6 -1
- package/src/core/agents/render/prompt-context.ts +27 -6
- package/src/core/agents/rules/stop-hook.ts +107 -16
- package/src/core/agents/rules/verdict.ts +1 -0
- package/src/core/agents/session-events.ts +4 -0
- package/src/core/agents/session-finalization-state-v3.ts +1 -1
- package/src/core/agents/session-finalizer-v3.ts +4 -1
- package/src/core/agents/state/activity-log.ts +7 -2
- package/src/core/agents/state/heartbeat-writer.ts +27 -0
- package/src/core/agents/state/live-coordination-view.ts +16 -105
- package/src/core/agents/state/live-coordination-writer.ts +141 -0
- package/src/core/artifacts/index.ts +64 -1
- package/src/core/config.ts +126 -5
- package/src/core/conversations/archive.ts +237 -0
- package/src/core/conversations/catalog.ts +79 -0
- package/src/core/conversations/context-pack.ts +72 -0
- package/src/core/conversations/contract.ts +178 -0
- package/src/core/conversations/evaluation.ts +30 -0
- package/src/core/conversations/index.ts +9 -0
- package/src/core/conversations/lifecycle.ts +63 -0
- package/src/core/conversations/normalize.ts +105 -0
- package/src/core/conversations/query.ts +318 -0
- package/src/core/conversations/search-index.ts +48 -0
- package/src/core/events/legacy-storage/canary.ts +177 -0
- package/src/core/events/legacy-storage/fence.ts +129 -0
- package/src/core/events/legacy-storage/index.ts +5 -0
- package/src/core/events/legacy-storage/inventory.ts +51 -0
- package/src/core/events/legacy-storage/manifest.ts +136 -0
- package/src/core/events/legacy-storage/reader.ts +178 -0
- package/src/core/events/v3/authority-outbox.ts +22 -1
- package/src/core/events/v3/base-contract.ts +17 -7
- package/src/core/events/v3/bootstrap.ts +195 -2
- package/src/core/events/v3/capabilities.ts +3 -3
- package/src/core/events/v3/control-witness.ts +339 -0
- package/src/core/events/v3/control-writer.ts +16 -0
- package/src/core/events/v3/control.ts +54 -18
- package/src/core/events/v3/coordination-transaction-recovery.ts +477 -0
- package/src/core/events/v3/coordination-view.ts +17 -1
- package/src/core/events/v3/generated.ts +1 -1
- package/src/core/events/v3/index.ts +5 -2
- package/src/core/events/v3/live-route-observer.ts +80 -0
- package/src/core/events/v3/live-routing.ts +64 -46
- package/src/core/events/v3/producers/coordination-recorder.ts +95 -10
- package/src/core/events/v3/producers/diagnostic-summaries.ts +593 -0
- package/src/core/events/v3/producers/hook-base.ts +1 -1
- package/src/core/events/v3/producers/intake.ts +30 -2
- package/src/core/events/v3/producers/producer-state-observer.ts +52 -0
- package/src/core/events/v3/producers/recorder.ts +571 -33
- package/src/core/events/v3/reader.ts +243 -2
- package/src/core/events/v3/rotation-config.ts +98 -0
- package/src/core/events/v3/runtime-build.ts +41 -0
- package/src/core/events/v3/runtime-identity.ts +16 -0
- package/src/core/events/v3/runtime-telemetry-capabilities.ts +14 -8
- package/src/core/events/v3/support-storage/classify.ts +209 -0
- package/src/core/events/v3/support-storage/eligibility.ts +58 -0
- package/src/core/events/v3/support-storage/index.ts +9 -0
- package/src/core/events/v3/support-storage/inventory.ts +135 -0
- package/src/core/events/v3/support-storage/logical-authority.ts +117 -0
- package/src/core/events/v3/support-storage/maintenance.ts +501 -0
- package/src/core/events/v3/support-storage/pack-contract.ts +337 -0
- package/src/core/events/v3/support-storage/pack-reader.ts +346 -0
- package/src/core/events/v3/support-storage/pack-writer.ts +352 -0
- package/src/core/events/v3/support-storage/recovery.ts +43 -0
- package/src/core/events/v3/turn-telemetry.ts +58 -7
- package/src/core/events/v3/writer.ts +168 -16
- package/src/core/governor/plan-read.ts +5 -18
- package/src/core/governor/planning.ts +5 -8
- package/src/core/governor/service-read.ts +320 -2
- package/src/core/governor/service.ts +49 -22
- package/src/core/guard/evidence-v3.ts +1 -0
- package/src/core/hooks/adapter/events.ts +1 -0
- package/src/core/hooks/adapter/output.ts +12 -5
- package/src/core/hooks/adapter/runtime-telemetry.ts +408 -13
- package/src/core/hooks/cli.ts +226 -32
- package/src/core/hooks/effects/image-capture.ts +4 -1
- package/src/core/hooks/remediation-cap.ts +12 -6
- package/src/core/hooks/resolve/coord-root.ts +91 -11
- package/src/core/hooks/resolve/owner.ts +4 -0
- package/src/core/hooks/resolve/transcript.ts +18 -0
- package/src/core/inbox/contract.ts +81 -0
- package/src/core/inbox/index.ts +4 -0
- package/src/core/inbox/lifecycle.ts +104 -0
- package/src/core/inbox/service.ts +305 -0
- package/src/core/inbox/watcher.ts +36 -0
- package/src/core/presence/codec-digest.ts +15 -9
- package/src/core/presence/relay-client.ts +55 -7
- package/src/core/semantic/adapters.ts +200 -41
- package/src/core/semantic/contract.ts +135 -3
- package/src/core/semantic/index.ts +76 -2
- package/src/core/semantic/once.ts +93 -7
- package/src/core/semantic/prompt.ts +13 -1
- package/src/core/semantic/review.ts +803 -0
- package/src/core/semantic/routes.ts +30 -0
- package/src/core/semantic/scheduler.ts +49 -5
- package/src/core/semantic/service-status.ts +99 -5
- package/src/core/semantic/service.ts +116 -15
- package/src/core/semantic/soak.ts +638 -0
- package/src/core/semantic/storage.ts +20 -6
- package/src/core/semantic/usage.ts +272 -0
- package/src/core/semantic/validate.ts +31 -0
- package/src/core/storage/buffer.ts +124 -0
- package/src/core/storage/builtins.ts +916 -0
- package/src/core/storage/catalog.ts +467 -0
- package/src/core/storage/config.ts +423 -0
- package/src/core/storage/contract.ts +342 -0
- package/src/core/storage/durable-history.ts +738 -0
- package/src/core/storage/health.ts +76 -0
- package/src/core/storage/index.ts +15 -0
- package/src/core/storage/inventory.ts +859 -0
- package/src/core/storage/jsonl.ts +213 -0
- package/src/core/storage/log-retention.ts +555 -0
- package/src/core/storage/logger.ts +546 -0
- package/src/core/storage/maintenance-providers.ts +200 -0
- package/src/core/storage/maintenance.ts +929 -0
- package/src/core/storage/metrics.ts +199 -0
- package/src/core/storage/policy.ts +141 -0
- package/src/core/storage/process-log.ts +203 -0
- package/src/core/storage/query.ts +360 -0
- package/src/core/storage/receipts.ts +162 -0
- package/src/core/storage/segments.ts +721 -0
- package/src/core/storage/sink-graph.ts +343 -0
- package/src/core/storage/storm-control.ts +91 -0
- package/src/core/work/state.ts +12 -21
- package/src/core/workflow/live-session-v3.ts +2 -4
- package/src/index.ts +2 -0
- package/src/lazy-commands.ts +294 -0
- package/src/lib/docs-lint.ts +58 -77
- package/src/lib/docs-metadata-audit.ts +26 -21
- package/src/lib/docs-metadata-sync.ts +32 -9
- package/src/lib/docs-repository-view.ts +220 -0
- package/src/lib/http/client.ts +44 -8
- package/src/lib/http/index.ts +6 -1
- package/src/lib/indexer-exclusions.ts +173 -0
- package/src/lib/instructions/templates.ts +5 -0
- package/src/lib/local-file-url.ts +31 -0
- package/src/lib/web-performance.ts +335 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backup.d.ts","sourceRoot":"","sources":["../../src/commands/backup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA4EnD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"backup.d.ts","sourceRoot":"","sources":["../../src/commands/backup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA4EnD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,CAiO/E"}
|
package/dist/commands/backup.js
CHANGED
|
@@ -86,8 +86,8 @@ export function registerBackupCommand(program, emit) {
|
|
|
86
86
|
backup
|
|
87
87
|
.command("init")
|
|
88
88
|
.description("Create the restic repository + password file (one-time).")
|
|
89
|
-
.option("--repo <path>",
|
|
90
|
-
.option("--password-file <path>",
|
|
89
|
+
.option("--repo <path>", "Repository path (default: configured backup.repo)")
|
|
90
|
+
.option("--password-file <path>", "Password file (default: configured backup.password_file; autogenerated)")
|
|
91
91
|
.action((opts) => {
|
|
92
92
|
if (!checkRestic(emit)) {
|
|
93
93
|
emit.setExitCode(1);
|
|
@@ -219,13 +219,12 @@ export function registerBackupCommand(program, emit) {
|
|
|
219
219
|
// -- prune --
|
|
220
220
|
// Prune-policy defaults come from backup.keep_* in config.jsonc (falling back
|
|
221
221
|
// to 7/4/6); an explicit --keep-* flag still overrides per invocation.
|
|
222
|
-
const prunePolicy = backupConfig();
|
|
223
222
|
backup
|
|
224
223
|
.command("prune")
|
|
225
|
-
.description(
|
|
226
|
-
.option("--keep-daily <n>", "Daily snapshots to keep
|
|
227
|
-
.option("--keep-weekly <n>", "Weekly snapshots to keep
|
|
228
|
-
.option("--keep-monthly <n>", "Monthly snapshots to keep
|
|
224
|
+
.description("Forget + prune snapshots (default policy comes from backup.keep_* config).")
|
|
225
|
+
.option("--keep-daily <n>", "Daily snapshots to keep (default: configured backup.keep_daily)")
|
|
226
|
+
.option("--keep-weekly <n>", "Weekly snapshots to keep (default: configured backup.keep_weekly)")
|
|
227
|
+
.option("--keep-monthly <n>", "Monthly snapshots to keep (default: configured backup.keep_monthly)")
|
|
229
228
|
.option("--dry-run", "Show what would be pruned without actually pruning")
|
|
230
229
|
.option("--repo <path>", "Repository path")
|
|
231
230
|
.option("--password-file <path>", "Password file")
|
|
@@ -234,14 +233,15 @@ export function registerBackupCommand(program, emit) {
|
|
|
234
233
|
emit.setExitCode(1);
|
|
235
234
|
return;
|
|
236
235
|
}
|
|
236
|
+
const prunePolicy = backupConfig();
|
|
237
237
|
const args = [
|
|
238
238
|
"forget",
|
|
239
239
|
"--keep-daily",
|
|
240
|
-
opts.keepDaily,
|
|
240
|
+
opts.keepDaily ?? String(prunePolicy.keepDaily),
|
|
241
241
|
"--keep-weekly",
|
|
242
|
-
opts.keepWeekly,
|
|
242
|
+
opts.keepWeekly ?? String(prunePolicy.keepWeekly),
|
|
243
243
|
"--keep-monthly",
|
|
244
|
-
opts.keepMonthly,
|
|
244
|
+
opts.keepMonthly ?? String(prunePolicy.keepMonthly),
|
|
245
245
|
];
|
|
246
246
|
if (!opts.dryRun)
|
|
247
247
|
args.push("--prune");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browse-session.d.ts","sourceRoot":"","sources":["../../src/commands/browse-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAOtE,UAAU,eAAe;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,WAAY,SAAQ,eAAe;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"browse-session.d.ts","sourceRoot":"","sources":["../../src/commands/browse-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAOtE,UAAU,eAAe;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,WAAY,SAAQ,eAAe;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,CAwHtF;AAYD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,GAAG,qBAAqB,CAAC;AAC9F,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,KAAK,GACd,qBAAqB,GAAG,SAAS,CAAC;AAoDrC,wBAAsB,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBpE"}
|
|
@@ -5,6 +5,7 @@ export function registerBrowseSessionCommand(program, emit) {
|
|
|
5
5
|
.description("Control an opted-in headed browse session through an owner-only descriptor");
|
|
6
6
|
session
|
|
7
7
|
.command("status")
|
|
8
|
+
.description("Report whether the opted-in browser session is reachable")
|
|
8
9
|
.requiredOption("--control-file <path>", "Owner-only session descriptor")
|
|
9
10
|
.action((opts) => runAction(emit, opts.controlFile, "status", {}));
|
|
10
11
|
addLocatorOptions(session
|
|
@@ -16,37 +17,45 @@ export function registerBrowseSessionCommand(program, emit) {
|
|
|
16
17
|
});
|
|
17
18
|
session
|
|
18
19
|
.command("screenshot")
|
|
20
|
+
.description("Capture the active tab to a new PNG file")
|
|
19
21
|
.requiredOption("--control-file <path>", "Owner-only session descriptor")
|
|
20
22
|
.requiredOption("--out <path>", "New PNG path in an existing directory")
|
|
21
23
|
.action((opts) => runAction(emit, opts.controlFile, "screenshot", { out: opts.out }));
|
|
22
24
|
session
|
|
23
25
|
.command("tabs")
|
|
26
|
+
.description("List open tabs with stable session-local indexes")
|
|
24
27
|
.requiredOption("--control-file <path>", "Owner-only session descriptor")
|
|
25
28
|
.action((opts) => runAction(emit, opts.controlFile, "tabs", {}));
|
|
26
29
|
session
|
|
27
30
|
.command("select-tab")
|
|
31
|
+
.description("Select an open tab by its stable session-local index")
|
|
28
32
|
.requiredOption("--control-file <path>", "Owner-only session descriptor")
|
|
29
33
|
.requiredOption("--index <n>", "Stable session-local tab index", parseIndex)
|
|
30
34
|
.action((opts) => runAction(emit, opts.controlFile, "select_tab", { index: opts.index }));
|
|
31
35
|
session
|
|
32
36
|
.command("open-tab <url>")
|
|
37
|
+
.description("Open a URL in a new tab and select it")
|
|
33
38
|
.requiredOption("--control-file <path>", "Owner-only session descriptor")
|
|
34
39
|
.action((url, opts) => runAction(emit, opts.controlFile, "open_tab", { url }));
|
|
35
40
|
session
|
|
36
41
|
.command("close-tab")
|
|
42
|
+
.description("Close an open tab by its stable session-local index")
|
|
37
43
|
.requiredOption("--control-file <path>", "Owner-only session descriptor")
|
|
38
44
|
.requiredOption("--index <n>", "Stable session-local tab index", parseIndex)
|
|
39
45
|
.action((opts) => runAction(emit, opts.controlFile, "close_tab", { index: opts.index }));
|
|
40
46
|
session
|
|
41
47
|
.command("goto <url>")
|
|
48
|
+
.description("Navigate the active tab to a URL")
|
|
42
49
|
.requiredOption("--control-file <path>", "Owner-only session descriptor")
|
|
43
50
|
.action((url, opts) => runAction(emit, opts.controlFile, "goto", { url }));
|
|
44
51
|
session
|
|
45
52
|
.command("reload")
|
|
53
|
+
.description("Reload the active tab")
|
|
46
54
|
.requiredOption("--control-file <path>", "Owner-only session descriptor")
|
|
47
55
|
.action((opts) => runAction(emit, opts.controlFile, "reload", {}));
|
|
48
56
|
addLocatorOptions(session
|
|
49
57
|
.command("click")
|
|
58
|
+
.description("Click one strict locator in the active tab")
|
|
50
59
|
.requiredOption("--control-file <path>", "Owner-only session descriptor")).action((opts) => runAction(emit, opts.controlFile, "click", { locator: parseLocatorOptions(opts, true) }));
|
|
51
60
|
addLocatorOptions(session
|
|
52
61
|
.command("fill")
|
|
@@ -60,13 +69,16 @@ export function registerBrowseSessionCommand(program, emit) {
|
|
|
60
69
|
});
|
|
61
70
|
session
|
|
62
71
|
.command("press <key>")
|
|
72
|
+
.description("Press a keyboard key in the active tab")
|
|
63
73
|
.requiredOption("--control-file <path>", "Owner-only session descriptor")
|
|
64
74
|
.action((key, opts) => runAction(emit, opts.controlFile, "press", { key }));
|
|
65
75
|
addLocatorOptions(session
|
|
66
76
|
.command("wait")
|
|
77
|
+
.description("Wait for one strict locator in the active tab")
|
|
67
78
|
.requiredOption("--control-file <path>", "Owner-only session descriptor")).action((opts) => runAction(emit, opts.controlFile, "wait", { locator: parseLocatorOptions(opts, true) }));
|
|
68
79
|
session
|
|
69
80
|
.command("close")
|
|
81
|
+
.description("Close the opted-in browser session")
|
|
70
82
|
.requiredOption("--control-file <path>", "Owner-only session descriptor")
|
|
71
83
|
.action((opts) => runAction(emit, opts.controlFile, "close", {}));
|
|
72
84
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Command } from "commander";
|
|
2
2
|
import type { EmitContext, HarneryProgramContext } from "../commander.js";
|
|
3
|
-
export declare function registerBrowseCommand(program: Command, emitParam: EmitContext, context?: HarneryProgramContext): void;
|
|
3
|
+
export declare function registerBrowseCommand(program: Command, emitParam: EmitContext, context?: HarneryProgramContext, binName?: string): void;
|
|
4
4
|
//# sourceMappingURL=browse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browse.d.ts","sourceRoot":"","sources":["../../src/commands/browse.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAgO1E,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,WAAW,EACtB,OAAO,CAAC,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"browse.d.ts","sourceRoot":"","sources":["../../src/commands/browse.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAgO1E,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,WAAW,EACtB,OAAO,CAAC,EAAE,qBAAqB,EAC/B,OAAO,SAAmB,GACzB,IAAI,CA+cN"}
|
package/dist/commands/browse.js
CHANGED
|
@@ -41,7 +41,7 @@ const VIEWPORT_PRESETS = {
|
|
|
41
41
|
// cookies/read: the many helper functions in this large file close over
|
|
42
42
|
// `emit` so action callbacks stay concise.
|
|
43
43
|
let emit;
|
|
44
|
-
export function registerBrowseCommand(program, emitParam, context) {
|
|
44
|
+
export function registerBrowseCommand(program, emitParam, context, binName = resolveBinName()) {
|
|
45
45
|
emit = emitParam;
|
|
46
46
|
program
|
|
47
47
|
.command("browse <url>")
|
|
@@ -50,7 +50,7 @@ export function registerBrowseCommand(program, emitParam, context) {
|
|
|
50
50
|
.option("--no-screenshot", "Skip the .png in the trio (DOM + JSON only)")
|
|
51
51
|
.option("--no-full-page", "Capture only the viewport, not the full scrollable page")
|
|
52
52
|
.option("--snapshot", "Print body innerText to stdout (skips file writes)")
|
|
53
|
-
.option("--html", `Print raw outer HTML to stdout (skips file writes; pair with \`${
|
|
53
|
+
.option("--html", `Print raw outer HTML to stdout (skips file writes; pair with \`${binName} read -\`)`)
|
|
54
54
|
.option("--json", "Print full JSON envelope to stdout (skips file writes)")
|
|
55
55
|
.option("--selector <css>", "Scope --html / --snapshot to one element")
|
|
56
56
|
.option("--click <selector>", "Click this selector after navigation")
|
|
@@ -440,8 +440,9 @@ async function runBrowse(url, opts, context) {
|
|
|
440
440
|
let critiqueTiles;
|
|
441
441
|
let critiqueFullPage;
|
|
442
442
|
if (opts.checkCritique !== undefined) {
|
|
443
|
+
const critiqueProvider = context?.critiqueProvider ?? (await context?.critiqueProviderLoader?.());
|
|
443
444
|
const rubric = opts.checkCritiqueRubric ?? DEFAULT_CRITIQUE_RUBRIC;
|
|
444
|
-
const captured = await captureCritiqueTiles(browser, opts,
|
|
445
|
+
const captured = await captureCritiqueTiles(browser, opts, critiqueProvider?.tileBudgetPx);
|
|
445
446
|
critiqueTiles = captured.tiles;
|
|
446
447
|
critiqueFullPage = captured.fullPage;
|
|
447
448
|
let tilesToReview = captured.tiles;
|
|
@@ -485,7 +486,7 @@ async function runBrowse(url, opts, context) {
|
|
|
485
486
|
url: navResult.url,
|
|
486
487
|
rubric,
|
|
487
488
|
tiles: tilesToReview,
|
|
488
|
-
provider:
|
|
489
|
+
provider: critiqueProvider,
|
|
489
490
|
});
|
|
490
491
|
}
|
|
491
492
|
// Persist the QA baseline AFTER critique so a passing run's verdicts ride
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { EmitContext } from "../commander.js";
|
|
3
|
+
import type { HarneryConversationCatalog } from "../core/conversations/catalog.js";
|
|
4
|
+
import type { HarneryConversationRecordV1 } from "../core/conversations/contract.js";
|
|
5
|
+
export interface RegisterConversationsOptions {
|
|
6
|
+
project_scope_id: string;
|
|
7
|
+
records?: () => readonly HarneryConversationRecordV1[];
|
|
8
|
+
}
|
|
9
|
+
export declare function registerConversationsCommand(program: Command, emit: EmitContext, catalog?: HarneryConversationCatalog, dependencies?: RegisterConversationsOptions): void;
|
|
10
|
+
//# sourceMappingURL=conversations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../src/commands/conversations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAEnF,OAAO,KAAK,EAEV,2BAA2B,EAE5B,MAAM,mCAAmC,CAAC;AAQ3C,MAAM,WAAW,4BAA4B;IAC3C,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,SAAS,2BAA2B,EAAE,CAAC;CACxD;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,WAAW,EACjB,OAAO,CAAC,EAAE,0BAA0B,EACpC,YAAY,CAAC,EAAE,4BAA4B,GAC1C,IAAI,CAkJN"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { buildConversationContextPack } from "../core/conversations/context-pack.js";
|
|
2
|
+
import { planConversationPurge, validatePurgeExecutionRequest, } from "../core/conversations/lifecycle.js";
|
|
3
|
+
import { queryConversationCatalog } from "../core/conversations/query.js";
|
|
4
|
+
export function registerConversationsCommand(program, emit, catalog, dependencies) {
|
|
5
|
+
const pendingPlans = new Map();
|
|
6
|
+
const conversations = program.command("conversations").description("Query conversation evidence");
|
|
7
|
+
conversations
|
|
8
|
+
.command("list")
|
|
9
|
+
.option("--provider <id>")
|
|
10
|
+
.option("--project <id>")
|
|
11
|
+
.option("--json")
|
|
12
|
+
.action(async (options) => {
|
|
13
|
+
await run(emit, async () => {
|
|
14
|
+
const configured = requireConversations(catalog, dependencies);
|
|
15
|
+
const project = exactProject(configured.dependencies.project_scope_id, options.project);
|
|
16
|
+
const providers = options.provider
|
|
17
|
+
? [configured.catalog.require(options.provider)]
|
|
18
|
+
: configured.catalog.list();
|
|
19
|
+
const rows = (await Promise.all(providers.map(async (provider) => provider.capabilities.can_list ? provider.list(project) : []))).flat();
|
|
20
|
+
if (options.json) {
|
|
21
|
+
emit.config({ format: "json" });
|
|
22
|
+
emit.data({ schema: "harnery.conversation-list/v1", project_scope_id: project, rows });
|
|
23
|
+
}
|
|
24
|
+
else
|
|
25
|
+
emit.rows(rows);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
addQueryOptions(conversations.command("query"))
|
|
29
|
+
.option("--json")
|
|
30
|
+
.action(async (options) => {
|
|
31
|
+
await run(emit, async () => {
|
|
32
|
+
const configured = requireConversations(catalog, dependencies);
|
|
33
|
+
const result = await queryConversationCatalog(configured.catalog, request(configured.dependencies, options));
|
|
34
|
+
if (options.json) {
|
|
35
|
+
emit.config({ format: "json" });
|
|
36
|
+
emit.data(result);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
emit.rows(result.hits.map(({ record, citation }) => ({
|
|
40
|
+
...citation,
|
|
41
|
+
content: record.content,
|
|
42
|
+
})));
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
addQueryOptions(conversations.command("context"))
|
|
47
|
+
.option("--max-tokens <count>", "Token ceiling", parsePositive, 2_000)
|
|
48
|
+
.option("--max-bytes <count>", "Byte ceiling", parsePositive, 16_000)
|
|
49
|
+
.option("--json")
|
|
50
|
+
.action(async (options) => {
|
|
51
|
+
await run(emit, async () => {
|
|
52
|
+
const configured = requireConversations(catalog, dependencies);
|
|
53
|
+
const result = await queryConversationCatalog(configured.catalog, request(configured.dependencies, options));
|
|
54
|
+
const pack = buildConversationContextPack(result, {
|
|
55
|
+
max_tokens: options.maxTokens,
|
|
56
|
+
max_bytes: options.maxBytes,
|
|
57
|
+
});
|
|
58
|
+
if (options.json)
|
|
59
|
+
emit.config({ format: "json" });
|
|
60
|
+
emit.data(pack);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
conversations
|
|
64
|
+
.command("archive")
|
|
65
|
+
.requiredOption("--mode <mode>", "off | source | archive")
|
|
66
|
+
.option("--authority <mode>", "shadow | cutover | rollback", "shadow")
|
|
67
|
+
.option("--yes", "Reserved for a future checked capture transaction")
|
|
68
|
+
.action((options) => {
|
|
69
|
+
const validMode = ["off", "source", "archive"].includes(options.mode);
|
|
70
|
+
const validAuthority = ["shadow", "cutover", "rollback"].includes(options.authority);
|
|
71
|
+
if (!validMode || !validAuthority) {
|
|
72
|
+
emit.error({ code: "conversation_archive_mode_invalid", message: "invalid archive mode" });
|
|
73
|
+
emit.setExitCode(1);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
emit.data({
|
|
77
|
+
schema: "harnery.conversation-archive-plan/v1",
|
|
78
|
+
access_mode: options.mode,
|
|
79
|
+
authority_mode: options.authority,
|
|
80
|
+
dry_run: true,
|
|
81
|
+
writes: false,
|
|
82
|
+
execution_enabled: false,
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
conversations
|
|
86
|
+
.command("purge")
|
|
87
|
+
.option("--conversation <id>")
|
|
88
|
+
.option("--before <time>")
|
|
89
|
+
.option("--transaction <id>")
|
|
90
|
+
.option("--yes")
|
|
91
|
+
.option("--json")
|
|
92
|
+
.action((options) => {
|
|
93
|
+
try {
|
|
94
|
+
const configured = requireConversations(catalog, dependencies);
|
|
95
|
+
if (options.transaction) {
|
|
96
|
+
const plan = pendingPlans.get(options.transaction);
|
|
97
|
+
if (!plan)
|
|
98
|
+
throw new Error(`unknown purge transaction: ${options.transaction}`);
|
|
99
|
+
const result = validatePurgeExecutionRequest(plan, options.transaction, options.yes ?? false);
|
|
100
|
+
if (options.json)
|
|
101
|
+
emit.config({ format: "json" });
|
|
102
|
+
emit.data({ schema: "harnery.conversation-purge-result/v1", ...result });
|
|
103
|
+
if (result.reason_code !== "execution_disabled")
|
|
104
|
+
emit.setExitCode(1);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const plan = planConversationPurge({
|
|
108
|
+
records: configured.dependencies.records?.() ?? [],
|
|
109
|
+
project_scope_id: configured.dependencies.project_scope_id,
|
|
110
|
+
...(options.conversation ? { conversation_id: options.conversation } : {}),
|
|
111
|
+
...(options.before ? { before: options.before } : {}),
|
|
112
|
+
});
|
|
113
|
+
pendingPlans.set(plan.transaction_id, plan);
|
|
114
|
+
if (options.json)
|
|
115
|
+
emit.config({ format: "json" });
|
|
116
|
+
emit.data(plan);
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
emit.error({
|
|
120
|
+
code: "conversation_purge_failed",
|
|
121
|
+
message: error instanceof Error ? error.message : String(error),
|
|
122
|
+
});
|
|
123
|
+
emit.setExitCode(1);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
function requireConversations(catalog, dependencies) {
|
|
128
|
+
if (!catalog || !dependencies)
|
|
129
|
+
throw new Error("conversation providers are not configured by this host");
|
|
130
|
+
return { catalog, dependencies };
|
|
131
|
+
}
|
|
132
|
+
function addQueryOptions(command) {
|
|
133
|
+
return command
|
|
134
|
+
.option("--text <literal>")
|
|
135
|
+
.option("--regex <pattern>")
|
|
136
|
+
.option("--role <role>")
|
|
137
|
+
.option("--since <time>")
|
|
138
|
+
.option("--until <time>")
|
|
139
|
+
.option("--project <id>")
|
|
140
|
+
.option("--provider <id>")
|
|
141
|
+
.option("--session <id>")
|
|
142
|
+
.option("--conversation <id>")
|
|
143
|
+
.option("--record <id>")
|
|
144
|
+
.option("--limit <count>", "Match ceiling", parsePositive, 20)
|
|
145
|
+
.option("--context-before <count>", "Earlier neighbors", parseNonnegative, 0)
|
|
146
|
+
.option("--context-after <count>", "Later neighbors", parseNonnegative, 0);
|
|
147
|
+
}
|
|
148
|
+
function request(dependencies, options) {
|
|
149
|
+
const role = options.role;
|
|
150
|
+
return {
|
|
151
|
+
project_scope_id: exactProject(dependencies.project_scope_id, options.project),
|
|
152
|
+
limit: options.limit,
|
|
153
|
+
context_before: options.contextBefore,
|
|
154
|
+
context_after: options.contextAfter,
|
|
155
|
+
budgets: {
|
|
156
|
+
max_source_records: 10_000,
|
|
157
|
+
max_decoded_bytes: 16 * 1_024 * 1_024,
|
|
158
|
+
max_matches: options.limit,
|
|
159
|
+
max_wall_ms: 5_000,
|
|
160
|
+
max_regex_chars: 256,
|
|
161
|
+
},
|
|
162
|
+
...(options.text ? { text: options.text } : {}),
|
|
163
|
+
...(options.regex ? { regex: options.regex } : {}),
|
|
164
|
+
...(role ? { role } : {}),
|
|
165
|
+
...(options.since ? { since: options.since } : {}),
|
|
166
|
+
...(options.until ? { until: options.until } : {}),
|
|
167
|
+
...(options.provider ? { provider_id: options.provider } : {}),
|
|
168
|
+
...(options.session ? { session_id: options.session } : {}),
|
|
169
|
+
...(options.conversation ? { conversation_id: options.conversation } : {}),
|
|
170
|
+
...(options.record ? { record_id: options.record } : {}),
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
function exactProject(expected, requested) {
|
|
174
|
+
if (requested && requested !== expected)
|
|
175
|
+
throw new Error("cross-project conversation access denied");
|
|
176
|
+
return expected;
|
|
177
|
+
}
|
|
178
|
+
function parsePositive(value) {
|
|
179
|
+
const parsed = Number(value);
|
|
180
|
+
if (!Number.isSafeInteger(parsed) || parsed <= 0)
|
|
181
|
+
throw new Error("expected a positive integer");
|
|
182
|
+
return parsed;
|
|
183
|
+
}
|
|
184
|
+
function parseNonnegative(value) {
|
|
185
|
+
const parsed = Number(value);
|
|
186
|
+
if (!Number.isSafeInteger(parsed) || parsed < 0)
|
|
187
|
+
throw new Error("expected a nonnegative integer");
|
|
188
|
+
return parsed;
|
|
189
|
+
}
|
|
190
|
+
async function run(emit, action) {
|
|
191
|
+
try {
|
|
192
|
+
await action();
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
emit.error({
|
|
196
|
+
code: "conversation_command_failed",
|
|
197
|
+
message: error instanceof Error ? error.message : String(error),
|
|
198
|
+
});
|
|
199
|
+
emit.setExitCode(1);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deinit.d.ts","sourceRoot":"","sources":["../../src/commands/deinit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"deinit.d.ts","sourceRoot":"","sources":["../../src/commands/deinit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAgBnD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAwHjG;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE;IACtC,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;CACtB,GAAG,OAAO,CAEV;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAM1C"}
|
package/dist/commands/deinit.js
CHANGED
|
@@ -31,6 +31,7 @@ import { relative, resolve } from "node:path";
|
|
|
31
31
|
import { createInterface } from "node:readline";
|
|
32
32
|
import { DEFAULT_BIN_NAME } from "../core/config.js";
|
|
33
33
|
import { ADAPTER_SPECS } from "../core/hooks/adapter/events.js";
|
|
34
|
+
import { removeIndexerExclusions } from "../lib/indexer-exclusions.js";
|
|
34
35
|
import { removeInstructions } from "../lib/instructions/apply.js";
|
|
35
36
|
import { removeGitHooks } from "../lib/instructions/git-hooks.js";
|
|
36
37
|
import { unwireHooks } from "./init.js";
|
|
@@ -115,6 +116,10 @@ export function registerDeinitCommand(program, emit, binName) {
|
|
|
115
116
|
`(${remaining} other hook(s) kept)`);
|
|
116
117
|
}
|
|
117
118
|
}
|
|
119
|
+
// ── 1a′. editor indexer exclusions ─────────────────────────────────────
|
|
120
|
+
// Reverse only what init wrote: the managed .cursorindexingignore entry
|
|
121
|
+
// and the files.watcherExclude key. Consumer-authored entries stay.
|
|
122
|
+
actions.push(...removeIndexerExclusions(projectRoot, dryRun));
|
|
118
123
|
// ── 1b. agent-facing instructions block + skills ───────────────────────
|
|
119
124
|
const removed = removeInstructions(projectRoot, { adapter, dryRun });
|
|
120
125
|
actions.push(...removed.actions, ...removed.warnings.map((w) => `! ${w}`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAmC1E,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,WAAW,EACtB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAmC1E,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,WAAW,EACtB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,IAAI,CA2ON"}
|
package/dist/commands/docs.js
CHANGED
|
@@ -70,10 +70,14 @@ export function registerDocsCommand(program, emitParam, context) {
|
|
|
70
70
|
.command("validate")
|
|
71
71
|
.description("Validate every managed Markdown file against harnery-doc/v2")
|
|
72
72
|
.option("--repo <name>", "Limit to one submodule or '.' for parent")
|
|
73
|
+
.option("--cached", "Read paths and contents from the Git index")
|
|
73
74
|
.action(async (opts) => {
|
|
74
75
|
try {
|
|
75
76
|
ensureContext(context);
|
|
76
|
-
const rows = await runDocsMetadataAudit(
|
|
77
|
+
const rows = await runDocsMetadataAudit({
|
|
78
|
+
repo: opts.repo,
|
|
79
|
+
source: opts.cached ? "index" : "worktree",
|
|
80
|
+
});
|
|
77
81
|
const errors = rows
|
|
78
82
|
.flatMap((row) => row.issues)
|
|
79
83
|
.filter((issue) => issue.severity === "error");
|
|
@@ -107,6 +111,7 @@ export function registerDocsCommand(program, emitParam, context) {
|
|
|
107
111
|
.argument("[files...]", "Explicit repository-relative Markdown files; defaults to staged files")
|
|
108
112
|
.option("--repo <name>", "Limit to one submodule or '.' for parent")
|
|
109
113
|
.option("--check", "Report timestamp drift without writing")
|
|
114
|
+
.option("--cached", "Read current contents from the Git index (requires --check)")
|
|
110
115
|
.option("--reviewed", "Record an explicit runbook review and move its due date")
|
|
111
116
|
.action(async (files, opts) => {
|
|
112
117
|
try {
|
|
@@ -163,6 +168,7 @@ export function registerDocsCommand(program, emitParam, context) {
|
|
|
163
168
|
.description("Verify every repo matches the documentation contract (directory layout + naming rules)")
|
|
164
169
|
.option("--fast", "Skip content-reading checks; filename/structure only (for pre-commit)")
|
|
165
170
|
.option("--repo <name>", "Limit to one submodule or '.' for parent")
|
|
171
|
+
.option("--cached", "Read paths and contents from the Git index")
|
|
166
172
|
.option("--format <type>", "Output format: human, json", "human")
|
|
167
173
|
.action(async (opts) => {
|
|
168
174
|
try {
|
|
@@ -254,13 +260,18 @@ async function handleDocs(opts) {
|
|
|
254
260
|
}
|
|
255
261
|
// --- `harn docs lint` ---
|
|
256
262
|
async function handleLint(opts) {
|
|
257
|
-
const violations = await runLint({
|
|
263
|
+
const violations = await runLint({
|
|
264
|
+
fast: opts.fast,
|
|
265
|
+
repo: opts.repo,
|
|
266
|
+
source: opts.cached ? "index" : "worktree",
|
|
267
|
+
});
|
|
258
268
|
const errors = violations.filter((v) => v.severity === "error");
|
|
259
269
|
const warnings = violations.filter((v) => v.severity === "warning");
|
|
260
270
|
const cold = await countColdHandoffs();
|
|
261
271
|
emit.data({
|
|
262
272
|
fast: !!opts.fast,
|
|
263
273
|
repo: opts.repo ?? null,
|
|
274
|
+
source: opts.cached ? "index" : "worktree",
|
|
264
275
|
error_count: errors.length,
|
|
265
276
|
warning_count: warnings.length,
|
|
266
277
|
cold_handoffs: cold,
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import type { Command } from "commander";
|
|
14
14
|
import type { EmitContext } from "../commander.js";
|
|
15
15
|
import { type CodexHookAuthorizationResult } from "../core/hooks/codex-authorization.js";
|
|
16
|
+
import { type CodexWslBridgeStatus } from "../core/hooks/codex-wsl-bridge.js";
|
|
16
17
|
type Severity = "ok" | "warn" | "fail";
|
|
17
18
|
export interface Check {
|
|
18
19
|
name: string;
|
|
@@ -22,6 +23,10 @@ export interface Check {
|
|
|
22
23
|
}
|
|
23
24
|
export declare function registerDoctorCommand(program: Command, emit: EmitContext): void;
|
|
24
25
|
export declare function runChecks(): Promise<Check[]>;
|
|
26
|
+
export declare function codexWslBridgeCheck(status: CodexWslBridgeStatus | null, recentMidFlightCount?: number): Check | null;
|
|
27
|
+
/** Count bounded, privacy-safe recovery diagnostics so a healthy environment
|
|
28
|
+
* now does not hide an intermittent Codex-to-WSL identity drop. */
|
|
29
|
+
export declare function countRecentCodexMidFlightOnboardings(coordRoot: string, nowMs?: number, windowMs?: number): number;
|
|
25
30
|
export declare function codexAuthorizationCheck(result: CodexHookAuthorizationResult): Check;
|
|
26
31
|
export {};
|
|
27
32
|
//# sourceMappingURL=doctor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AASnD,OAAO,EACL,KAAK,4BAA4B,EAElC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,mCAAmC,CAAC;AAW3C,KAAK,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvC,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAOD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,CAmD/E;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC,CA2BlD;AAgCD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,oBAAoB,GAAG,IAAI,EACnC,oBAAoB,SAAI,GACvB,KAAK,GAAG,IAAI,CAed;AAID;mEACmE;AACnE,wBAAgB,oCAAoC,CAClD,SAAS,EAAE,MAAM,EACjB,KAAK,SAAa,EAClB,QAAQ,SAAqC,GAC5C,MAAM,CA0CR;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,4BAA4B,GAAG,KAAK,CAoBnF"}
|
package/dist/commands/doctor.js
CHANGED
|
@@ -11,11 +11,12 @@
|
|
|
11
11
|
* Exits 0 unless a required dep is missing.
|
|
12
12
|
*/
|
|
13
13
|
import { spawnSync } from "node:child_process";
|
|
14
|
-
import { existsSync } from "node:fs";
|
|
14
|
+
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
15
15
|
import os from "node:os";
|
|
16
16
|
import path from "node:path";
|
|
17
17
|
import { BUILTIN_ADAPTER_IDS } from "../core/adapters/index.js";
|
|
18
18
|
import { resolveBinName, ripgrepAutoInstall } from "../core/config.js";
|
|
19
|
+
import { countSummarizedSinceV3, listDiagnosticSummariesV3, } from "../core/events/v3/producers/diagnostic-summaries.js";
|
|
19
20
|
import { ADAPTER_SPECS } from "../core/hooks/adapter/events.js";
|
|
20
21
|
import { loadAdapterWiring, summarizeAdapterWiring } from "../core/hooks/adapter/wiring.js";
|
|
21
22
|
import { probeCodexHookAuthorization, } from "../core/hooks/codex-authorization.js";
|
|
@@ -69,8 +70,10 @@ export function registerDoctorCommand(program, emit) {
|
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
72
|
export async function runChecks() {
|
|
73
|
+
const root = findCoordProjectRoot();
|
|
72
74
|
const codexWslStatus = inspectCodexWslBridge();
|
|
73
|
-
const
|
|
75
|
+
const recentCodexMidFlightCount = root ? countRecentCodexMidFlightOnboardings(root) : 0;
|
|
76
|
+
const codexWslBridge = codexWslBridgeCheck(codexWslStatus, recentCodexMidFlightCount);
|
|
74
77
|
// Probe the adapter CLIs before the hook check runs, not in output order:
|
|
75
78
|
// an unwired adapter only matters if its CLI is actually installed, and
|
|
76
79
|
// probing once here keeps that join to one spawn per CLI.
|
|
@@ -123,18 +126,59 @@ function checkGitHookRegions() {
|
|
|
123
126
|
};
|
|
124
127
|
}
|
|
125
128
|
}
|
|
126
|
-
function
|
|
127
|
-
if (!status)
|
|
129
|
+
export function codexWslBridgeCheck(status, recentMidFlightCount = 0) {
|
|
130
|
+
if (!status && recentMidFlightCount === 0)
|
|
128
131
|
return null;
|
|
132
|
+
const historical = recentMidFlightCount === 0
|
|
133
|
+
? null
|
|
134
|
+
: `${recentMidFlightCount} Codex mid-flight onboarding${recentMidFlightCount === 1 ? "" : "s"} recorded in the last 48h`;
|
|
129
135
|
return {
|
|
130
136
|
name: "codex:WSL bridge",
|
|
131
|
-
severity: status
|
|
132
|
-
detail: status
|
|
133
|
-
hint: status
|
|
137
|
+
severity: status?.ok && !historical ? "ok" : "warn",
|
|
138
|
+
detail: [status?.detail, historical].filter(Boolean).join("; "),
|
|
139
|
+
hint: status?.ok && !historical
|
|
134
140
|
? undefined
|
|
135
141
|
: "forward CODEX_THREAD_ID through WSLENV in the Codex shell environment policy, then start a fresh task",
|
|
136
142
|
};
|
|
137
143
|
}
|
|
144
|
+
const CODEX_MID_FLIGHT_HISTORY_WINDOW_MS = 48 * 60 * 60 * 1000;
|
|
145
|
+
/** Count bounded, privacy-safe recovery diagnostics so a healthy environment
|
|
146
|
+
* now does not hide an intermittent Codex-to-WSL identity drop. */
|
|
147
|
+
export function countRecentCodexMidFlightOnboardings(coordRoot, nowMs = Date.now(), windowMs = CODEX_MID_FLIGHT_HISTORY_WINDOW_MS) {
|
|
148
|
+
// Occurrences past the producer's loose-exemplar bound live in summary
|
|
149
|
+
// files instead of loose diagnostics; count them too so the mitigation
|
|
150
|
+
// cannot hide an active Codex identity drop from this warning.
|
|
151
|
+
let count = 0;
|
|
152
|
+
try {
|
|
153
|
+
const listing = listDiagnosticSummariesV3(coordRoot);
|
|
154
|
+
count += countSummarizedSinceV3(listing.summaries, nowMs - windowMs, (summary) => summary.category === "mid_flight_onboarding" && summary.metadata.adapter === "codex", nowMs);
|
|
155
|
+
}
|
|
156
|
+
catch {
|
|
157
|
+
// Summary reads are best-effort; loose diagnostics below still count.
|
|
158
|
+
}
|
|
159
|
+
const directory = path.join(coordRoot, ".harnery", "ledgers", "v3", "diagnostics");
|
|
160
|
+
if (!existsSync(directory))
|
|
161
|
+
return count;
|
|
162
|
+
for (const name of readdirSync(directory)) {
|
|
163
|
+
if (!name.startsWith("mid_flight_onboarding-") || !name.endsWith(".json"))
|
|
164
|
+
continue;
|
|
165
|
+
try {
|
|
166
|
+
const row = JSON.parse(readFileSync(path.join(directory, name), "utf8"));
|
|
167
|
+
const recordedAt = typeof row.recorded_at === "string" ? Date.parse(row.recorded_at) : NaN;
|
|
168
|
+
if (row.category === "mid_flight_onboarding" &&
|
|
169
|
+
row.adapter === "codex" &&
|
|
170
|
+
Number.isFinite(recordedAt) &&
|
|
171
|
+
recordedAt <= nowMs &&
|
|
172
|
+
nowMs - recordedAt <= windowMs) {
|
|
173
|
+
count += 1;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
catch {
|
|
177
|
+
// A malformed best-effort diagnostic cannot make doctor fail.
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return count;
|
|
181
|
+
}
|
|
138
182
|
export function codexAuthorizationCheck(result) {
|
|
139
183
|
const reviewHint = "terminal UI: run `/hooks`; Codex Desktop: open Settings > Hooks; after approval, start a fresh task";
|
|
140
184
|
if (result.status === "runnable") {
|
package/dist/commands/fetch.js
CHANGED
|
@@ -63,13 +63,14 @@ async function runFetch(url, opts, emit, context) {
|
|
|
63
63
|
redirect: opts.redirect,
|
|
64
64
|
signal: ac.signal,
|
|
65
65
|
extraHeaders: context?.extraHeaders,
|
|
66
|
+
responseType: "bytes",
|
|
66
67
|
});
|
|
67
68
|
}
|
|
68
69
|
finally {
|
|
69
70
|
clearTimeout(timer);
|
|
70
71
|
}
|
|
71
72
|
if (opts.json) {
|
|
72
|
-
emit.data(result);
|
|
73
|
+
emit.data({ ...result, body: new TextDecoder().decode(result.body) });
|
|
73
74
|
return;
|
|
74
75
|
}
|
|
75
76
|
if (opts.status) {
|
|
@@ -83,15 +84,15 @@ async function runFetch(url, opts, emit, context) {
|
|
|
83
84
|
if (opts.output) {
|
|
84
85
|
writeFileSync(opts.output, result.body);
|
|
85
86
|
emit.file(opts.output, {
|
|
86
|
-
bytes: result.body.
|
|
87
|
+
bytes: result.body.byteLength,
|
|
87
88
|
status: result.status,
|
|
88
89
|
status_text: result.statusText,
|
|
89
90
|
});
|
|
90
91
|
}
|
|
91
92
|
else {
|
|
92
|
-
//
|
|
93
|
-
//
|
|
94
|
-
emit.text(result.body);
|
|
93
|
+
// Text destinations decode at the presentation boundary. File output
|
|
94
|
+
// above keeps the response bytes intact regardless of MIME type.
|
|
95
|
+
emit.text(new TextDecoder().decode(result.body));
|
|
95
96
|
}
|
|
96
97
|
if (jar && result.cookiesSaved > 0) {
|
|
97
98
|
emit.log(`saved ${result.cookiesSaved} cookie${result.cookiesSaved === 1 ? "" : "s"} to ${jar.path}`, "info");
|