harnery 0.36.0 → 0.38.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 +9 -0
- package/dist/commander.d.ts.map +1 -1
- package/dist/commander.js +10 -1
- package/dist/commands/admission.d.ts +21 -0
- package/dist/commands/admission.d.ts.map +1 -0
- package/dist/commands/admission.js +565 -0
- package/dist/commands/agents.d.ts +7 -0
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +148 -47
- package/dist/commands/artifacts.d.ts.map +1 -1
- package/dist/commands/artifacts.js +73 -2
- package/dist/commands/browse-ai.d.ts +2 -2
- package/dist/commands/browse-ai.d.ts.map +1 -1
- package/dist/commands/browse-ai.js +6 -4
- package/dist/commands/browse.d.ts.map +1 -1
- package/dist/commands/browse.js +360 -21
- package/dist/commands/diagnostics.d.ts +4 -0
- package/dist/commands/diagnostics.d.ts.map +1 -0
- package/dist/commands/diagnostics.js +229 -0
- package/dist/commands/fetch.js +1 -0
- package/dist/commands/files.d.ts +12 -0
- package/dist/commands/files.d.ts.map +1 -1
- package/dist/commands/files.js +54 -1
- package/dist/commands/governor.d.ts.map +1 -1
- package/dist/commands/governor.js +4 -0
- package/dist/commands/ledger-v3.d.ts.map +1 -1
- package/dist/commands/ledger-v3.js +71 -2
- package/dist/commands/qa-record.d.ts +144 -0
- package/dist/commands/qa-record.d.ts.map +1 -0
- package/dist/commands/qa-record.js +0 -0
- package/dist/commands/qa-run.d.ts +8 -0
- package/dist/commands/qa-run.d.ts.map +1 -0
- package/dist/commands/qa-run.js +396 -0
- package/dist/commands/qa-status.d.ts +71 -0
- package/dist/commands/qa-status.d.ts.map +1 -0
- package/dist/commands/qa-status.js +490 -0
- package/dist/commands/qa-verify.d.ts +40 -0
- package/dist/commands/qa-verify.d.ts.map +1 -0
- package/dist/commands/qa-verify.js +180 -0
- package/dist/commands/resources.d.ts +4 -0
- package/dist/commands/resources.d.ts.map +1 -0
- package/dist/commands/resources.js +29 -0
- package/dist/commands/review-pack.d.ts +4 -0
- package/dist/commands/review-pack.d.ts.map +1 -0
- package/dist/commands/review-pack.js +1001 -0
- package/dist/commands/supervisor.d.ts +4 -0
- package/dist/commands/supervisor.d.ts.map +1 -0
- package/dist/commands/supervisor.js +101 -0
- package/dist/commands/web.d.ts.map +1 -1
- package/dist/commands/web.js +17 -0
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +4 -0
- package/dist/core/agents/cli.js +7 -3
- package/dist/core/agents/health.d.ts +17 -0
- package/dist/core/agents/health.d.ts.map +1 -0
- package/dist/core/agents/health.js +109 -0
- package/dist/core/agents/mailbox.d.ts +92 -0
- package/dist/core/agents/mailbox.d.ts.map +1 -0
- package/dist/core/agents/mailbox.js +325 -0
- package/dist/core/agents/qa-signal.d.ts +111 -0
- package/dist/core/agents/qa-signal.d.ts.map +1 -0
- package/dist/core/agents/qa-signal.js +231 -0
- package/dist/core/agents/reconcile-coordination-v3.d.ts +44 -0
- package/dist/core/agents/reconcile-coordination-v3.d.ts.map +1 -0
- package/dist/core/agents/reconcile-coordination-v3.js +58 -0
- package/dist/core/agents/render/prompt-context.d.ts +5 -0
- package/dist/core/agents/render/prompt-context.d.ts.map +1 -1
- package/dist/core/agents/render/prompt-context.js +34 -13
- package/dist/core/agents/render/session-context.d.ts +8 -0
- package/dist/core/agents/render/session-context.d.ts.map +1 -1
- package/dist/core/agents/render/session-context.js +34 -3
- package/dist/core/agents/rules/commit-conflict.d.ts.map +1 -1
- package/dist/core/agents/rules/commit-conflict.js +50 -1
- package/dist/core/agents/rules/stop-hook.d.ts.map +1 -1
- package/dist/core/agents/rules/stop-hook.js +6 -10
- package/dist/core/agents/session-finalizer-v3.js +4 -1
- package/dist/core/agents/session-name-display.d.ts +20 -5
- package/dist/core/agents/session-name-display.d.ts.map +1 -1
- package/dist/core/agents/session-name-display.js +67 -7
- package/dist/core/agents/state/heartbeat-reader.d.ts +7 -0
- package/dist/core/agents/state/heartbeat-reader.d.ts.map +1 -1
- package/dist/core/agents/state/heartbeat-writer.d.ts +11 -0
- package/dist/core/agents/state/heartbeat-writer.d.ts.map +1 -1
- package/dist/core/agents/state/heartbeat-writer.js +17 -0
- package/dist/core/agents/state/live-coordination-view.d.ts.map +1 -1
- package/dist/core/agents/state/live-coordination-view.js +1 -0
- package/dist/core/agents/state/live-coordination-writer.js +5 -0
- package/dist/core/artifacts/constants.d.ts +1 -1
- package/dist/core/artifacts/constants.js +1 -1
- package/dist/core/artifacts/index.d.ts +82 -6
- package/dist/core/artifacts/index.d.ts.map +1 -1
- package/dist/core/artifacts/index.js +410 -15
- package/dist/core/config.d.ts +20 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +59 -0
- package/dist/core/diagnostics/advice.d.ts +9 -0
- package/dist/core/diagnostics/advice.d.ts.map +1 -0
- package/dist/core/diagnostics/advice.js +112 -0
- package/dist/core/diagnostics/bundle.d.ts +51 -0
- package/dist/core/diagnostics/bundle.d.ts.map +1 -0
- package/dist/core/diagnostics/bundle.js +968 -0
- package/dist/core/diagnostics/comparison.d.ts +5 -0
- package/dist/core/diagnostics/comparison.d.ts.map +1 -0
- package/dist/core/diagnostics/comparison.js +444 -0
- package/dist/core/diagnostics/contract.d.ts +245 -0
- package/dist/core/diagnostics/contract.d.ts.map +1 -0
- package/dist/core/diagnostics/contract.js +18 -0
- package/dist/core/diagnostics/identity.d.ts +3 -0
- package/dist/core/diagnostics/identity.d.ts.map +1 -0
- package/dist/core/diagnostics/identity.js +10 -0
- package/dist/core/diagnostics/index.d.ts +8 -0
- package/dist/core/diagnostics/index.d.ts.map +1 -0
- package/dist/core/diagnostics/index.js +7 -0
- package/dist/core/diagnostics/replay.d.ts +8 -0
- package/dist/core/diagnostics/replay.d.ts.map +1 -0
- package/dist/core/diagnostics/replay.js +213 -0
- package/dist/core/diagnostics/sanitize.d.ts +9 -0
- package/dist/core/diagnostics/sanitize.d.ts.map +1 -0
- package/dist/core/diagnostics/sanitize.js +84 -0
- package/dist/core/events/legacy-storage/compression.d.ts +13 -0
- package/dist/core/events/legacy-storage/compression.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/compression.js +107 -0
- package/dist/core/events/legacy-storage/index.d.ts +1 -0
- package/dist/core/events/legacy-storage/index.d.ts.map +1 -1
- package/dist/core/events/legacy-storage/index.js +1 -0
- package/dist/core/events/v3/archive-retention.d.ts +33 -0
- package/dist/core/events/v3/archive-retention.d.ts.map +1 -0
- package/dist/core/events/v3/archive-retention.js +195 -0
- package/dist/core/events/v3/bootstrap.d.ts.map +1 -1
- package/dist/core/events/v3/bootstrap.js +10 -0
- package/dist/core/events/v3/capabilities.d.ts +1 -1
- package/dist/core/events/v3/capabilities.d.ts.map +1 -1
- package/dist/core/events/v3/capabilities.js +1 -0
- package/dist/core/events/v3/coordination-view.d.ts +3 -0
- package/dist/core/events/v3/coordination-view.d.ts.map +1 -1
- package/dist/core/events/v3/coordination-view.js +69 -8
- package/dist/core/events/v3/index.d.ts +1 -0
- package/dist/core/events/v3/index.d.ts.map +1 -1
- package/dist/core/events/v3/index.js +1 -0
- package/dist/core/events/v3/live-routing.d.ts.map +1 -1
- package/dist/core/events/v3/live-routing.js +1 -0
- package/dist/core/events/v3/producers/hook-base.d.ts +1 -1
- package/dist/core/events/v3/producers/hook-base.d.ts.map +1 -1
- package/dist/core/events/v3/producers/hook-base.js +13 -2
- package/dist/core/events/v3/producers/intake.d.ts.map +1 -1
- package/dist/core/events/v3/producers/intake.js +10 -2
- package/dist/core/events/v3/producers/recorder.d.ts +39 -0
- package/dist/core/events/v3/producers/recorder.d.ts.map +1 -1
- package/dist/core/events/v3/producers/recorder.js +350 -17
- package/dist/core/hooks/adapter/output.d.ts +8 -0
- package/dist/core/hooks/adapter/output.d.ts.map +1 -1
- package/dist/core/hooks/adapter/output.js +11 -1
- package/dist/core/hooks/cli.js +303 -219
- package/dist/core/hooks/health.d.ts +59 -0
- package/dist/core/hooks/health.d.ts.map +1 -0
- package/dist/core/hooks/health.js +84 -0
- package/dist/core/hooks/resolve/transcript.d.ts.map +1 -1
- package/dist/core/hooks/resolve/transcript.js +10 -3
- package/dist/core/hooks/session-name-presence.d.ts.map +1 -1
- package/dist/core/hooks/session-name-presence.js +4 -1
- package/dist/core/qa-artifacts.d.ts +20 -0
- package/dist/core/qa-artifacts.d.ts.map +1 -0
- package/dist/core/qa-artifacts.js +110 -0
- package/dist/core/resources/contract.d.ts +96 -0
- package/dist/core/resources/contract.d.ts.map +1 -0
- package/dist/core/resources/contract.js +2 -0
- package/dist/core/resources/index.d.ts +6 -0
- package/dist/core/resources/index.d.ts.map +1 -0
- package/dist/core/resources/index.js +5 -0
- package/dist/core/resources/sampler.d.ts +34 -0
- package/dist/core/resources/sampler.d.ts.map +1 -0
- package/dist/core/resources/sampler.js +458 -0
- package/dist/core/resources/service-status.d.ts +3 -0
- package/dist/core/resources/service-status.d.ts.map +1 -0
- package/dist/core/resources/service-status.js +48 -0
- package/dist/core/resources/service.d.ts +26 -0
- package/dist/core/resources/service.d.ts.map +1 -0
- package/dist/core/resources/service.js +292 -0
- package/dist/core/resources/storage.d.ts +13 -0
- package/dist/core/resources/storage.d.ts.map +1 -0
- package/dist/core/resources/storage.js +30 -0
- package/dist/core/storage/atomic-json.d.ts +3 -0
- package/dist/core/storage/atomic-json.d.ts.map +1 -0
- package/dist/core/storage/atomic-json.js +15 -0
- package/dist/core/storage/builtins.d.ts.map +1 -1
- package/dist/core/storage/builtins.js +45 -6
- package/dist/core/storage/logger.d.ts +2 -0
- package/dist/core/storage/logger.d.ts.map +1 -1
- package/dist/core/storage/logger.js +2 -0
- package/dist/core/storage/query.d.ts +14 -0
- package/dist/core/storage/query.d.ts.map +1 -1
- package/dist/core/storage/query.js +51 -0
- package/dist/core/supervisor/activity.d.ts +4 -0
- package/dist/core/supervisor/activity.d.ts.map +1 -0
- package/dist/core/supervisor/activity.js +141 -0
- package/dist/core/supervisor/contract.d.ts +268 -0
- package/dist/core/supervisor/contract.d.ts.map +1 -0
- package/dist/core/supervisor/contract.js +35 -0
- package/dist/core/supervisor/explanations.d.ts +4 -0
- package/dist/core/supervisor/explanations.d.ts.map +1 -0
- package/dist/core/supervisor/explanations.js +71 -0
- package/dist/core/supervisor/findings.d.ts +20 -0
- package/dist/core/supervisor/findings.d.ts.map +1 -0
- package/dist/core/supervisor/findings.js +399 -0
- package/dist/core/supervisor/history.d.ts +9 -0
- package/dist/core/supervisor/history.d.ts.map +1 -0
- package/dist/core/supervisor/history.js +46 -0
- package/dist/core/supervisor/hook-health-alerts.d.ts +14 -0
- package/dist/core/supervisor/hook-health-alerts.d.ts.map +1 -0
- package/dist/core/supervisor/hook-health-alerts.js +70 -0
- package/dist/core/supervisor/hook-health-storage.d.ts +5 -0
- package/dist/core/supervisor/hook-health-storage.d.ts.map +1 -0
- package/dist/core/supervisor/hook-health-storage.js +24 -0
- package/dist/core/supervisor/hook-health.d.ts +72 -0
- package/dist/core/supervisor/hook-health.d.ts.map +1 -0
- package/dist/core/supervisor/hook-health.js +203 -0
- package/dist/core/supervisor/hooks.d.ts +10 -0
- package/dist/core/supervisor/hooks.d.ts.map +1 -0
- package/dist/core/supervisor/hooks.js +28 -0
- package/dist/core/supervisor/index.d.ts +15 -0
- package/dist/core/supervisor/index.d.ts.map +1 -0
- package/dist/core/supervisor/index.js +14 -0
- package/dist/core/supervisor/log-feed.d.ts +9 -0
- package/dist/core/supervisor/log-feed.d.ts.map +1 -0
- package/dist/core/supervisor/log-feed.js +103 -0
- package/dist/core/supervisor/service.d.ts +29 -0
- package/dist/core/supervisor/service.d.ts.map +1 -0
- package/dist/core/supervisor/service.js +450 -0
- package/dist/core/supervisor/services.d.ts +11 -0
- package/dist/core/supervisor/services.d.ts.map +1 -0
- package/dist/core/supervisor/services.js +155 -0
- package/dist/core/supervisor/status.d.ts +3 -0
- package/dist/core/supervisor/status.d.ts.map +1 -0
- package/dist/core/supervisor/status.js +48 -0
- package/dist/core/supervisor/storage.d.ts +30 -0
- package/dist/core/supervisor/storage.d.ts.map +1 -0
- package/dist/core/supervisor/storage.js +73 -0
- package/dist/core/supervisor/timeline.d.ts +3 -0
- package/dist/core/supervisor/timeline.d.ts.map +1 -0
- package/dist/core/supervisor/timeline.js +87 -0
- package/dist/core/workflow/admission.d.ts +23 -0
- package/dist/core/workflow/admission.d.ts.map +1 -0
- package/dist/core/workflow/admission.js +136 -0
- package/dist/core/workflow/engine.d.ts.map +1 -1
- package/dist/core/workflow/engine.js +77 -2
- package/dist/core/workflow/index.d.ts +3 -2
- package/dist/core/workflow/index.d.ts.map +1 -1
- package/dist/core/workflow/index.js +2 -1
- package/dist/core/workflow/proof.d.ts +2 -1
- package/dist/core/workflow/proof.d.ts.map +1 -1
- package/dist/core/workflow/proof.js +39 -1
- package/dist/core/workflow/run-state.d.ts +3 -2
- package/dist/core/workflow/run-state.d.ts.map +1 -1
- package/dist/core/workflow/run-state.js +8 -1
- package/dist/core/workflow/types.d.ts +33 -1
- package/dist/core/workflow/types.d.ts.map +1 -1
- package/dist/core/workflow/types.js +2 -1
- package/dist/lib/admission.d.ts +71 -0
- package/dist/lib/admission.d.ts.map +1 -0
- package/dist/lib/admission.js +264 -0
- package/dist/lib/agent-browser/client.d.ts +1 -1
- package/dist/lib/agent-browser/client.d.ts.map +1 -1
- package/dist/lib/agent-browser/client.js +1 -5
- package/dist/lib/browser/capture-fidelity.d.ts +39 -0
- package/dist/lib/browser/capture-fidelity.d.ts.map +1 -0
- package/dist/lib/browser/capture-fidelity.js +84 -0
- package/dist/lib/browser/client.d.ts +46 -1
- package/dist/lib/browser/client.d.ts.map +1 -1
- package/dist/lib/browser/client.js +168 -9
- package/dist/lib/browser/critique.d.ts +38 -1
- package/dist/lib/browser/critique.d.ts.map +1 -1
- package/dist/lib/browser/critique.js +34 -6
- package/dist/lib/browser/index.d.ts +5 -1
- package/dist/lib/browser/index.d.ts.map +1 -1
- package/dist/lib/browser/index.js +4 -0
- package/dist/lib/browser/page-review-judge.d.ts +64 -0
- package/dist/lib/browser/page-review-judge.d.ts.map +1 -0
- package/dist/lib/browser/page-review-judge.js +270 -0
- package/dist/lib/browser/page-review-pack.d.ts +613 -0
- package/dist/lib/browser/page-review-pack.d.ts.map +1 -0
- package/dist/lib/browser/page-review-pack.js +1751 -0
- package/dist/lib/browser/qa-run-contracts.d.ts +377 -0
- package/dist/lib/browser/qa-run-contracts.d.ts.map +1 -0
- package/dist/lib/browser/qa-run-contracts.js +361 -0
- package/dist/lib/browser/qa-run.d.ts +141 -0
- package/dist/lib/browser/qa-run.d.ts.map +1 -0
- package/dist/lib/browser/qa-run.js +1283 -0
- package/dist/lib/browser/request-diagnostics.d.ts +13 -0
- package/dist/lib/browser/request-diagnostics.d.ts.map +1 -0
- package/dist/lib/browser/request-diagnostics.js +18 -0
- package/dist/lib/browser/tiling.d.ts +19 -0
- package/dist/lib/browser/tiling.d.ts.map +1 -1
- package/dist/lib/browser/tiling.js +28 -0
- package/dist/lib/cookies/client.d.ts +9 -0
- package/dist/lib/cookies/client.d.ts.map +1 -1
- package/dist/lib/cookies/client.js +197 -44
- package/dist/lib/cookies/extra.d.ts +18 -0
- package/dist/lib/cookies/extra.d.ts.map +1 -0
- package/dist/lib/cookies/extra.js +14 -0
- package/dist/lib/cookies/index.d.ts +2 -1
- package/dist/lib/cookies/index.d.ts.map +1 -1
- package/dist/lib/cookies/index.js +2 -1
- package/dist/lib/coord-root-id.d.ts +9 -0
- package/dist/lib/coord-root-id.d.ts.map +1 -0
- package/dist/lib/coord-root-id.js +17 -0
- package/dist/lib/durable-job.d.ts +124 -0
- package/dist/lib/durable-job.d.ts.map +1 -0
- package/dist/lib/durable-job.js +296 -0
- package/dist/lib/http/client.d.ts +7 -1
- package/dist/lib/http/client.d.ts.map +1 -1
- package/dist/lib/http/client.js +2 -0
- package/dist/lib/instructions/apply.d.ts +3 -1
- package/dist/lib/instructions/apply.d.ts.map +1 -1
- package/dist/lib/instructions/apply.js +74 -3
- package/dist/lib/instructions/templates.d.ts.map +1 -1
- package/dist/lib/instructions/templates.js +11 -2
- package/package.json +19 -2
- package/src/commander.ts +75 -1
- package/src/commands/admission.ts +699 -0
- package/src/commands/agents.ts +189 -50
- package/src/commands/artifacts.ts +132 -18
- package/src/commands/browse-ai.ts +10 -5
- package/src/commands/browse.ts +496 -20
- package/src/commands/diagnostics.ts +271 -0
- package/src/commands/fetch.ts +1 -0
- package/src/commands/files.ts +102 -2
- package/src/commands/governor.ts +8 -0
- package/src/commands/ledger-v3.ts +82 -0
- package/src/commands/qa-record.ts +682 -0
- package/src/commands/qa-run.ts +503 -0
- package/src/commands/qa-status.ts +608 -0
- package/src/commands/qa-verify.ts +238 -0
- package/src/commands/resources.ts +38 -0
- package/src/commands/review-pack.ts +1281 -0
- package/src/commands/supervisor.ts +141 -0
- package/src/commands/web.ts +19 -0
- package/src/commands/workflow.ts +8 -0
- package/src/core/agents/cli.ts +7 -3
- package/src/core/agents/health.ts +142 -0
- package/src/core/agents/mailbox.ts +373 -0
- package/src/core/agents/qa-signal.ts +261 -0
- package/src/core/agents/reconcile-coordination-v3.ts +77 -0
- package/src/core/agents/render/prompt-context.ts +42 -12
- package/src/core/agents/render/session-context.ts +37 -3
- package/src/core/agents/rules/commit-conflict.ts +58 -1
- package/src/core/agents/rules/stop-hook.ts +6 -12
- package/src/core/agents/session-finalizer-v3.ts +4 -1
- package/src/core/agents/session-name-display.ts +78 -7
- package/src/core/agents/state/heartbeat-reader.ts +7 -0
- package/src/core/agents/state/heartbeat-writer.ts +23 -0
- package/src/core/agents/state/live-coordination-view.ts +1 -0
- package/src/core/agents/state/live-coordination-writer.ts +5 -0
- package/src/core/artifacts/constants.ts +1 -1
- package/src/core/artifacts/index.ts +565 -30
- package/src/core/config.ts +134 -2
- package/src/core/diagnostics/advice.ts +147 -0
- package/src/core/diagnostics/bundle.ts +1250 -0
- package/src/core/diagnostics/comparison.ts +565 -0
- package/src/core/diagnostics/contract.ts +311 -0
- package/src/core/diagnostics/identity.ts +11 -0
- package/src/core/diagnostics/index.ts +7 -0
- package/src/core/diagnostics/replay.ts +314 -0
- package/src/core/diagnostics/sanitize.ts +97 -0
- package/src/core/events/legacy-storage/compression.ts +130 -0
- package/src/core/events/legacy-storage/index.ts +1 -0
- package/src/core/events/v3/archive-retention.ts +251 -0
- package/src/core/events/v3/bootstrap.ts +10 -0
- package/src/core/events/v3/capabilities.ts +2 -0
- package/src/core/events/v3/coordination-view.ts +100 -11
- package/src/core/events/v3/index.ts +9 -0
- package/src/core/events/v3/live-routing.ts +1 -0
- package/src/core/events/v3/producers/hook-base.ts +14 -2
- package/src/core/events/v3/producers/intake.ts +10 -2
- package/src/core/events/v3/producers/recorder.ts +420 -17
- package/src/core/hooks/adapter/output.ts +12 -1
- package/src/core/hooks/cli.ts +332 -247
- package/src/core/hooks/health.ts +146 -0
- package/src/core/hooks/resolve/transcript.ts +10 -3
- package/src/core/hooks/session-name-presence.ts +6 -1
- package/src/core/qa-artifacts.ts +126 -0
- package/src/core/resources/contract.ts +105 -0
- package/src/core/resources/index.ts +5 -0
- package/src/core/resources/sampler.ts +590 -0
- package/src/core/resources/service-status.ts +62 -0
- package/src/core/resources/service.ts +337 -0
- package/src/core/resources/storage.ts +44 -0
- package/src/core/storage/atomic-json.ts +15 -0
- package/src/core/storage/builtins.ts +62 -6
- package/src/core/storage/logger.ts +2 -0
- package/src/core/storage/query.ts +58 -0
- package/src/core/supervisor/activity.ts +193 -0
- package/src/core/supervisor/contract.ts +312 -0
- package/src/core/supervisor/explanations.ts +104 -0
- package/src/core/supervisor/findings.ts +788 -0
- package/src/core/supervisor/history.ts +61 -0
- package/src/core/supervisor/hook-health-alerts.ts +108 -0
- package/src/core/supervisor/hook-health-storage.ts +25 -0
- package/src/core/supervisor/hook-health.ts +301 -0
- package/src/core/supervisor/hooks.ts +35 -0
- package/src/core/supervisor/index.ts +14 -0
- package/src/core/supervisor/log-feed.ts +131 -0
- package/src/core/supervisor/service.ts +511 -0
- package/src/core/supervisor/services.ts +203 -0
- package/src/core/supervisor/status.ts +59 -0
- package/src/core/supervisor/storage.ts +126 -0
- package/src/core/supervisor/timeline.ts +133 -0
- package/src/core/workflow/admission.ts +215 -0
- package/src/core/workflow/engine.ts +93 -1
- package/src/core/workflow/index.ts +10 -0
- package/src/core/workflow/proof.ts +54 -1
- package/src/core/workflow/run-state.ts +13 -1
- package/src/core/workflow/types.ts +39 -1
- package/src/lib/admission.ts +347 -0
- package/src/lib/agent-browser/client.ts +2 -10
- package/src/lib/browser/capture-fidelity.ts +98 -0
- package/src/lib/browser/client.ts +212 -10
- package/src/lib/browser/critique.ts +62 -7
- package/src/lib/browser/index.ts +65 -0
- package/src/lib/browser/page-review-judge.ts +360 -0
- package/src/lib/browser/page-review-pack.ts +2384 -0
- package/src/lib/browser/qa-run-contracts.ts +743 -0
- package/src/lib/browser/qa-run.ts +1462 -0
- package/src/lib/browser/request-diagnostics.ts +27 -0
- package/src/lib/browser/tiling.ts +32 -0
- package/src/lib/cookies/client.ts +228 -42
- package/src/lib/cookies/extra.ts +28 -0
- package/src/lib/cookies/index.ts +2 -0
- package/src/lib/coord-root-id.ts +23 -0
- package/src/lib/durable-job.ts +407 -0
- package/src/lib/http/client.ts +13 -1
- package/src/lib/instructions/apply.ts +81 -2
- package/src/lib/instructions/templates.ts +11 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"durable-job.d.ts","sourceRoot":"","sources":["../../src/lib/durable-job.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
// Durable job records: a small on-disk representation of "a job that outlives
|
|
2
|
+
// the client that launched it". A supervisor process owns the record; a client
|
|
3
|
+
// only reads it. A bridge drop, a closed terminal, or a killed client
|
|
4
|
+
// therefore interrupts the *view* of the job, never the job itself.
|
|
5
|
+
//
|
|
6
|
+
// Layout, under a caller-supplied base directory:
|
|
7
|
+
//
|
|
8
|
+
// <base>/jobs/<job_id>/job.json immutable description (argv, cwd, resource)
|
|
9
|
+
// <base>/jobs/<job_id>/status.json mutable state, rewritten atomically
|
|
10
|
+
// <base>/jobs/<job_id>/job.log merged child stdout + stderr
|
|
11
|
+
//
|
|
12
|
+
// Classification is fail-closed, mirroring qa-status: liveness is proven by the
|
|
13
|
+
// PID, never assumed from the status document. A non-terminal state whose PID
|
|
14
|
+
// is dead classifies as "dead", never as "running".
|
|
15
|
+
//
|
|
16
|
+
// Toolkit tier: this module must not import src/core (layering check).
|
|
17
|
+
import { randomUUID } from "node:crypto";
|
|
18
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, renameSync, writeFileSync, } from "node:fs";
|
|
19
|
+
import { join, resolve } from "node:path";
|
|
20
|
+
export const DURABLE_JOB_SCHEMA_VERSION = 1;
|
|
21
|
+
/** How often the supervisor rewrites status.json while a job runs. */
|
|
22
|
+
export const DURABLE_JOB_HEARTBEAT_MS = 15_000;
|
|
23
|
+
/** A running job whose heartbeat is older than this earns a staleness warning,
|
|
24
|
+
* but stays "running" while its PID is alive. */
|
|
25
|
+
export const DURABLE_JOB_HEARTBEAT_STALE_MS = 120_000;
|
|
26
|
+
export const DURABLE_JOB_DOCUMENT_FILENAME = "job.json";
|
|
27
|
+
export const DURABLE_JOB_STATUS_FILENAME = "status.json";
|
|
28
|
+
export const DURABLE_JOB_LOG_FILENAME = "job.log";
|
|
29
|
+
const JOBS_DIRNAME = "jobs";
|
|
30
|
+
const WRITTEN_STATES = new Set(["launching", "queued", "running", "completed"]);
|
|
31
|
+
function isRecord(value) {
|
|
32
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
33
|
+
}
|
|
34
|
+
/** Default PID liveness probe. EPERM counts as alive; only ESRCH is dead. */
|
|
35
|
+
function defaultPidAlive(pid) {
|
|
36
|
+
try {
|
|
37
|
+
process.kill(pid, 0);
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
return err.code !== "ESRCH";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/** Directory holding every job record under a base directory. */
|
|
45
|
+
export function jobsRoot(base) {
|
|
46
|
+
return join(resolve(base), JOBS_DIRNAME);
|
|
47
|
+
}
|
|
48
|
+
/** Directory of one job record. Does not create it. */
|
|
49
|
+
export function jobDirFor(base, jobId) {
|
|
50
|
+
return join(jobsRoot(base), jobId);
|
|
51
|
+
}
|
|
52
|
+
/** Create (idempotently) the directory for one job and return its path. */
|
|
53
|
+
export function createJobDir(base, jobId) {
|
|
54
|
+
const dir = jobDirFor(base, jobId);
|
|
55
|
+
mkdirSync(dir, { recursive: true });
|
|
56
|
+
return dir;
|
|
57
|
+
}
|
|
58
|
+
export function jobLogPath(jobDir) {
|
|
59
|
+
return join(resolve(jobDir), DURABLE_JOB_LOG_FILENAME);
|
|
60
|
+
}
|
|
61
|
+
function writeAtomic(path, body) {
|
|
62
|
+
const tmp = `${path}.${randomUUID().slice(0, 8)}.tmp`;
|
|
63
|
+
writeFileSync(tmp, body);
|
|
64
|
+
renameSync(tmp, path);
|
|
65
|
+
}
|
|
66
|
+
/** Write the immutable job description. */
|
|
67
|
+
export function writeJobDocument(jobDir, document) {
|
|
68
|
+
writeAtomic(join(resolve(jobDir), DURABLE_JOB_DOCUMENT_FILENAME), `${JSON.stringify(document, null, 2)}\n`);
|
|
69
|
+
}
|
|
70
|
+
/** Replace the status document atomically, so a reader never sees a torn file. */
|
|
71
|
+
export function writeJobStatus(jobDir, status) {
|
|
72
|
+
writeAtomic(join(resolve(jobDir), DURABLE_JOB_STATUS_FILENAME), `${JSON.stringify(status, null, 2)}\n`);
|
|
73
|
+
}
|
|
74
|
+
function readJson(path) {
|
|
75
|
+
return JSON.parse(readFileSync(path, "utf8"));
|
|
76
|
+
}
|
|
77
|
+
/** Read the job description, or null when it is missing or unusable. */
|
|
78
|
+
export function readJobDocument(jobDir) {
|
|
79
|
+
const path = join(resolve(jobDir), DURABLE_JOB_DOCUMENT_FILENAME);
|
|
80
|
+
let parsed;
|
|
81
|
+
try {
|
|
82
|
+
parsed = readJson(path);
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
if (!isRecord(parsed))
|
|
88
|
+
return null;
|
|
89
|
+
if (typeof parsed.job_id !== "string")
|
|
90
|
+
return null;
|
|
91
|
+
return {
|
|
92
|
+
schema_version: typeof parsed.schema_version === "number"
|
|
93
|
+
? parsed.schema_version
|
|
94
|
+
: DURABLE_JOB_SCHEMA_VERSION,
|
|
95
|
+
job_id: parsed.job_id,
|
|
96
|
+
resource: typeof parsed.resource === "string" ? parsed.resource : "",
|
|
97
|
+
capacity: typeof parsed.capacity === "number" ? parsed.capacity : 1,
|
|
98
|
+
label: typeof parsed.label === "string" ? parsed.label : "",
|
|
99
|
+
argv: Array.isArray(parsed.argv)
|
|
100
|
+
? parsed.argv.filter((a) => typeof a === "string")
|
|
101
|
+
: [],
|
|
102
|
+
cwd: typeof parsed.cwd === "string" ? parsed.cwd : "",
|
|
103
|
+
created_at: typeof parsed.created_at === "string" ? parsed.created_at : "",
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/** Read the status document, or null when it is missing or unusable. */
|
|
107
|
+
export function readJobStatus(jobDir) {
|
|
108
|
+
const path = join(resolve(jobDir), DURABLE_JOB_STATUS_FILENAME);
|
|
109
|
+
let parsed;
|
|
110
|
+
try {
|
|
111
|
+
parsed = readJson(path);
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
if (!isRecord(parsed))
|
|
117
|
+
return null;
|
|
118
|
+
if (typeof parsed.job_id !== "string")
|
|
119
|
+
return null;
|
|
120
|
+
if (typeof parsed.state !== "string" || !WRITTEN_STATES.has(parsed.state))
|
|
121
|
+
return null;
|
|
122
|
+
const queue = parsed.queue;
|
|
123
|
+
return {
|
|
124
|
+
schema_version: typeof parsed.schema_version === "number"
|
|
125
|
+
? parsed.schema_version
|
|
126
|
+
: DURABLE_JOB_SCHEMA_VERSION,
|
|
127
|
+
job_id: parsed.job_id,
|
|
128
|
+
pid: typeof parsed.pid === "number" ? parsed.pid : 0,
|
|
129
|
+
state: parsed.state,
|
|
130
|
+
started_at: typeof parsed.started_at === "string" ? parsed.started_at : "",
|
|
131
|
+
updated_at: typeof parsed.updated_at === "string" ? parsed.updated_at : "",
|
|
132
|
+
...(isRecord(queue) &&
|
|
133
|
+
typeof queue.resource === "string" &&
|
|
134
|
+
typeof queue.waiting_since === "string"
|
|
135
|
+
? { queue: { resource: queue.resource, waiting_since: queue.waiting_since } }
|
|
136
|
+
: {}),
|
|
137
|
+
...(typeof parsed.exit_code === "number" || parsed.exit_code === null
|
|
138
|
+
? { exit_code: parsed.exit_code }
|
|
139
|
+
: {}),
|
|
140
|
+
...(typeof parsed.signal === "string" || parsed.signal === null
|
|
141
|
+
? { signal: parsed.signal }
|
|
142
|
+
: {}),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Classify one job directory, fail-closed. "completed" is terminal and carries
|
|
147
|
+
* the wrapped command's exit code. Any other written state is trusted only
|
|
148
|
+
* while the supervisor PID is alive; otherwise the job is "dead" — the record
|
|
149
|
+
* outlived the process that owned it.
|
|
150
|
+
*/
|
|
151
|
+
export function classifyJob(jobDir, deps = {}) {
|
|
152
|
+
const isAlive = deps.pidAlive ?? defaultPidAlive;
|
|
153
|
+
const nowMs = deps.now ? deps.now() : Date.now();
|
|
154
|
+
const abs = resolve(jobDir);
|
|
155
|
+
if (!existsSync(abs))
|
|
156
|
+
return { ok: false, error: `no such job directory: ${abs}` };
|
|
157
|
+
const statusPath = join(abs, DURABLE_JOB_STATUS_FILENAME);
|
|
158
|
+
if (!existsSync(statusPath)) {
|
|
159
|
+
return {
|
|
160
|
+
ok: false,
|
|
161
|
+
error: `${abs} carries no ${DURABLE_JOB_STATUS_FILENAME}: not a job directory`,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
const status = readJobStatus(abs);
|
|
165
|
+
if (!status) {
|
|
166
|
+
return { ok: false, error: `${statusPath} is not a readable job status document` };
|
|
167
|
+
}
|
|
168
|
+
const document = readJobDocument(abs);
|
|
169
|
+
let heartbeatAgeMs = null;
|
|
170
|
+
const updatedMs = Date.parse(status.updated_at);
|
|
171
|
+
if (!Number.isNaN(updatedMs))
|
|
172
|
+
heartbeatAgeMs = Math.max(0, nowMs - updatedMs);
|
|
173
|
+
const base = {
|
|
174
|
+
job_id: status.job_id,
|
|
175
|
+
pid: status.pid > 0 ? status.pid : null,
|
|
176
|
+
resource: document?.resource ?? null,
|
|
177
|
+
label: document?.label ?? null,
|
|
178
|
+
argv: document?.argv ?? null,
|
|
179
|
+
created_at: document?.created_at ?? null,
|
|
180
|
+
started_at: status.started_at || null,
|
|
181
|
+
updated_at: status.updated_at || null,
|
|
182
|
+
heartbeat_age_ms: heartbeatAgeMs,
|
|
183
|
+
job_dir: abs,
|
|
184
|
+
log_path: jobLogPath(abs),
|
|
185
|
+
};
|
|
186
|
+
if (status.state === "completed") {
|
|
187
|
+
return {
|
|
188
|
+
ok: true,
|
|
189
|
+
report: {
|
|
190
|
+
...base,
|
|
191
|
+
state: "completed",
|
|
192
|
+
terminal: true,
|
|
193
|
+
exit_code: status.exit_code ?? null,
|
|
194
|
+
signal: status.signal ?? null,
|
|
195
|
+
warnings: [],
|
|
196
|
+
},
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
if (!(status.pid > 0 && isAlive(status.pid))) {
|
|
200
|
+
return {
|
|
201
|
+
ok: true,
|
|
202
|
+
report: {
|
|
203
|
+
...base,
|
|
204
|
+
state: "dead",
|
|
205
|
+
terminal: false,
|
|
206
|
+
exit_code: null,
|
|
207
|
+
signal: null,
|
|
208
|
+
...(status.queue ? { queue: status.queue } : {}),
|
|
209
|
+
warnings: [],
|
|
210
|
+
},
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
const warnings = [];
|
|
214
|
+
if (status.state === "running" &&
|
|
215
|
+
heartbeatAgeMs !== null &&
|
|
216
|
+
heartbeatAgeMs > DURABLE_JOB_HEARTBEAT_STALE_MS) {
|
|
217
|
+
warnings.push(`heartbeat stale: last update ${Math.round(heartbeatAgeMs / 1000)}s ago ` +
|
|
218
|
+
`(threshold ${DURABLE_JOB_HEARTBEAT_STALE_MS / 1000}s), but pid ${status.pid} is alive`);
|
|
219
|
+
}
|
|
220
|
+
return {
|
|
221
|
+
ok: true,
|
|
222
|
+
report: {
|
|
223
|
+
...base,
|
|
224
|
+
state: status.state,
|
|
225
|
+
terminal: false,
|
|
226
|
+
exit_code: null,
|
|
227
|
+
signal: null,
|
|
228
|
+
...(status.queue ? { queue: status.queue } : {}),
|
|
229
|
+
warnings,
|
|
230
|
+
},
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Every job record under a base directory, newest first. Ordering keys on the
|
|
235
|
+
* description's created_at, falling back to the status document's started_at,
|
|
236
|
+
* then to the directory name, so a record missing its description still lists.
|
|
237
|
+
*/
|
|
238
|
+
export function listJobs(base, deps = {}) {
|
|
239
|
+
const root = jobsRoot(base);
|
|
240
|
+
let names;
|
|
241
|
+
try {
|
|
242
|
+
names = readdirSync(root, { withFileTypes: true })
|
|
243
|
+
.filter((entry) => entry.isDirectory())
|
|
244
|
+
.map((entry) => entry.name);
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
247
|
+
return [];
|
|
248
|
+
}
|
|
249
|
+
const entries = [];
|
|
250
|
+
for (const name of names) {
|
|
251
|
+
const dir = join(root, name);
|
|
252
|
+
const document = readJobDocument(dir);
|
|
253
|
+
const classified = classifyJob(dir, deps);
|
|
254
|
+
const createdAt = document?.created_at || (classified.ok ? classified.report.started_at : null) || null;
|
|
255
|
+
const parsed = createdAt !== null ? Date.parse(createdAt) : Number.NaN;
|
|
256
|
+
entries.push({
|
|
257
|
+
entry: {
|
|
258
|
+
job_id: document?.job_id ?? name,
|
|
259
|
+
job_dir: dir,
|
|
260
|
+
created_at: createdAt,
|
|
261
|
+
document,
|
|
262
|
+
report: classified.ok ? classified.report : null,
|
|
263
|
+
...(classified.ok ? {} : { error: classified.error }),
|
|
264
|
+
},
|
|
265
|
+
sortKey: Number.isNaN(parsed) ? 0 : parsed,
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
entries.sort((a, b) => {
|
|
269
|
+
if (b.sortKey !== a.sortKey)
|
|
270
|
+
return b.sortKey - a.sortKey;
|
|
271
|
+
return b.entry.job_id.localeCompare(a.entry.job_id);
|
|
272
|
+
});
|
|
273
|
+
return entries.map((item) => item.entry);
|
|
274
|
+
}
|
|
275
|
+
/** Describe a job's outcome as a process exit code: the wrapped command's own
|
|
276
|
+
* code, 1 when it died on a signal, 4 when the record is dead. */
|
|
277
|
+
export function jobExitCode(report) {
|
|
278
|
+
if (report.state === "dead")
|
|
279
|
+
return 4;
|
|
280
|
+
if (!report.terminal)
|
|
281
|
+
return 5;
|
|
282
|
+
if (report.signal !== null)
|
|
283
|
+
return 1;
|
|
284
|
+
return report.exit_code ?? 1;
|
|
285
|
+
}
|
|
286
|
+
/** Format a duration the way the status commands do. */
|
|
287
|
+
export function formatJobAge(ms) {
|
|
288
|
+
const totalSeconds = Math.max(0, Math.round(ms / 1000));
|
|
289
|
+
if (totalSeconds < 60)
|
|
290
|
+
return `${totalSeconds}s`;
|
|
291
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
292
|
+
if (minutes < 60)
|
|
293
|
+
return `${minutes}m ${totalSeconds % 60}s`;
|
|
294
|
+
const hours = Math.floor(minutes / 60);
|
|
295
|
+
return `${hours}h ${minutes % 60}m`;
|
|
296
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type CookieJar, type ExtraCookies } from "../cookies/index.js";
|
|
2
2
|
/**
|
|
3
3
|
* Simple cookie-aware HTTP client.
|
|
4
4
|
*
|
|
@@ -36,6 +36,12 @@ export interface FetchOptions<TResponseType extends FetchResponseType = "text">
|
|
|
36
36
|
* only land when the key isn't already set.
|
|
37
37
|
*/
|
|
38
38
|
extraHeaders?: (url: string) => Record<string, string>;
|
|
39
|
+
/**
|
|
40
|
+
* Optional callback that returns extra cookies to persist into `jar`
|
|
41
|
+
* before the Cookie header is built. Ignored when no jar is passed
|
|
42
|
+
* (`--no-cookies`). Must stay synchronous.
|
|
43
|
+
*/
|
|
44
|
+
extraCookies?: ExtraCookies;
|
|
39
45
|
/** Response body representation. Default `text`; use `bytes` for lossless file output. */
|
|
40
46
|
responseType?: TResponseType;
|
|
41
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/lib/http/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/lib/http/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;GASG;AAEH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEjD,MAAM,WAAW,YAAY,CAAC,aAAa,SAAS,iBAAiB,GAAG,MAAM;IAC5E,gCAAgC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACvB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;;;;OAKG;IACH,GAAG,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,8CAA8C;IAC9C,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvD;;;;OAIG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,0FAA0F;IAC1F,YAAY,CAAC,EAAE,aAAa,CAAC;CAC9B;AAED,KAAK,SAAS,CAAC,aAAa,SAAS,iBAAiB,IAAI,aAAa,SAAS,OAAO,GACnF,UAAU,GACV,MAAM,CAAC;AAEX,MAAM,WAAW,WAAW,CAAC,KAAK,GAAG,MAAM;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE,KAAK,CAAC;IACZ,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,aAAa,SAAS,iBAAiB,GAAG,MAAM,EACjF,GAAG,EAAE,MAAM,EACX,IAAI,GAAE,YAAY,CAAC,aAAa,CAAM,GACrC,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,CA+EhD"}
|
package/dist/lib/http/client.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { applyExtraCookies, } from "../cookies/index.js";
|
|
1
2
|
/**
|
|
2
3
|
* Fetch a URL with optional cookie-jar attach + persist.
|
|
3
4
|
*
|
|
@@ -9,6 +10,7 @@
|
|
|
9
10
|
export async function fetchWithJar(url, opts = {}) {
|
|
10
11
|
const headers = { ...(opts.headers ?? {}) };
|
|
11
12
|
if (opts.jar) {
|
|
13
|
+
applyExtraCookies(url, opts.jar, opts.extraCookies);
|
|
12
14
|
const cookieHeader = opts.jar.header(url);
|
|
13
15
|
if (cookieHeader && !headers.Cookie && !headers.cookie) {
|
|
14
16
|
headers.Cookie = cookieHeader;
|
|
@@ -7,13 +7,15 @@
|
|
|
7
7
|
* writes, and deletes so init/deinit stay thin and this stays integration-
|
|
8
8
|
* testable against a temp dir.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* Three files, one dir:
|
|
11
11
|
* - `AGENTS.md` — the always-on orientation block (a managed region; the
|
|
12
12
|
* consumer owns the rest of the file).
|
|
13
13
|
* - `CLAUDE.md` — claude-code only; Claude Code reads CLAUDE.md, not AGENTS.md,
|
|
14
14
|
* so a fresh consumer gets a CLAUDE.md whose managed region imports
|
|
15
15
|
* `@AGENTS.md`. A CLAUDE.md that already imports AGENTS.md or already carries
|
|
16
16
|
* the block (a host that generates CLAUDE.md from AGENTS.md) is left alone.
|
|
17
|
+
* - `.cursor/rules/harnery-turn-ritual.mdc` — cursor only; an Always Apply
|
|
18
|
+
* rule that makes the Stop-enforced status footer visible in reply text.
|
|
17
19
|
* - `<adapter-skill-dir>/<skill>/SKILL.md` — fully-owned files, honoring
|
|
18
20
|
* `skills.exclude` in `.harnery/config.jsonc`. Claude Code uses
|
|
19
21
|
* `.claude/skills/`; Cursor and Codex use `.agents/skills/`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/apply.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/apply.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAyFH,sFAAsF;AACtF,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAYlE;AAmBD,UAAU,SAAS;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,WAAW,CAoInF;AAED,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,WAAW,CA8FrF;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IACpC,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACzC,WAAW,CA2Db"}
|
|
@@ -7,25 +7,28 @@
|
|
|
7
7
|
* writes, and deletes so init/deinit stay thin and this stays integration-
|
|
8
8
|
* testable against a temp dir.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* Three files, one dir:
|
|
11
11
|
* - `AGENTS.md` — the always-on orientation block (a managed region; the
|
|
12
12
|
* consumer owns the rest of the file).
|
|
13
13
|
* - `CLAUDE.md` — claude-code only; Claude Code reads CLAUDE.md, not AGENTS.md,
|
|
14
14
|
* so a fresh consumer gets a CLAUDE.md whose managed region imports
|
|
15
15
|
* `@AGENTS.md`. A CLAUDE.md that already imports AGENTS.md or already carries
|
|
16
16
|
* the block (a host that generates CLAUDE.md from AGENTS.md) is left alone.
|
|
17
|
+
* - `.cursor/rules/harnery-turn-ritual.mdc` — cursor only; an Always Apply
|
|
18
|
+
* rule that makes the Stop-enforced status footer visible in reply text.
|
|
17
19
|
* - `<adapter-skill-dir>/<skill>/SKILL.md` — fully-owned files, honoring
|
|
18
20
|
* `skills.exclude` in `.harnery/config.jsonc`. Claude Code uses
|
|
19
21
|
* `.claude/skills/`; Cursor and Codex use `.agents/skills/`.
|
|
20
22
|
*/
|
|
21
23
|
import { existsSync, mkdirSync, readdirSync, readFileSync, rmdirSync, rmSync, writeFileSync, } from "node:fs";
|
|
22
24
|
import { dirname, join } from "node:path";
|
|
23
|
-
import { stripJsonComments } from "../../core/config.js";
|
|
25
|
+
import { endOfTurnStatusCommand, stripJsonComments } from "../../core/config.js";
|
|
24
26
|
import { readHostAddendum } from "./host-addendum.js";
|
|
25
|
-
import { checkOwnedSkill, checkRegion, isOwnedFile, removeRegion, spliceRegion, } from "./splice.js";
|
|
27
|
+
import { checkOwnedSkill, checkRegion, isOwnedFile, removeRegion, shortHash, spliceRegion, } from "./splice.js";
|
|
26
28
|
import { HOST_ADDENDUM_REGION, IMPORT_REGION, INSTRUCTIONS_REGION, renderInstructionsBlock, SKILLS, } from "./templates.js";
|
|
27
29
|
const AGENTS_FILE = "AGENTS.md";
|
|
28
30
|
const CLAUDE_FILE = "CLAUDE.md";
|
|
31
|
+
const CURSOR_RULE_FILE = join(".cursor", "rules", "harnery-turn-ritual.mdc");
|
|
29
32
|
const ADAPTER_SKILLS_DIR = {
|
|
30
33
|
"claude-code": join(".claude", "skills"),
|
|
31
34
|
cursor: join(".agents", "skills"),
|
|
@@ -43,6 +46,36 @@ function skillBody(render, binName) {
|
|
|
43
46
|
const content = render(binName);
|
|
44
47
|
return content.slice(content.indexOf("-->") + 3).trim();
|
|
45
48
|
}
|
|
49
|
+
function cursorRuleBody(projectRoot, binName) {
|
|
50
|
+
const statusCommand = endOfTurnStatusCommand(projectRoot);
|
|
51
|
+
return [
|
|
52
|
+
"# Harnery turn ritual",
|
|
53
|
+
"",
|
|
54
|
+
"On every turn that uses tools:",
|
|
55
|
+
"",
|
|
56
|
+
`1. Run \`${binName} agents set-task "<short focus>"\` during the turn, even when the focus is unchanged.`,
|
|
57
|
+
`2. Make \`${statusCommand}\` your final tool call.`,
|
|
58
|
+
"3. Append that command's stdout verbatim in a fenced code block at the bottom of the same substantive reply.",
|
|
59
|
+
"",
|
|
60
|
+
"Cursor Stop enforces all three signals. A missing signal produces one follow-up that names every repair needed.",
|
|
61
|
+
].join("\n");
|
|
62
|
+
}
|
|
63
|
+
function cursorRuleContent(projectRoot, binName) {
|
|
64
|
+
const body = cursorRuleBody(projectRoot, binName);
|
|
65
|
+
const marker = `<!-- harnery:generated cursor-turn-ritual v=${shortHash(body)}; machine-owned; ` +
|
|
66
|
+
`regenerated by \`${binName} init\`, removed by \`${binName} deinit\`. ` +
|
|
67
|
+
"Edit the harnery template, not this file. -->";
|
|
68
|
+
return [
|
|
69
|
+
"---",
|
|
70
|
+
"description: Harnery end-of-turn coordination ritual",
|
|
71
|
+
"alwaysApply: true",
|
|
72
|
+
"---",
|
|
73
|
+
marker,
|
|
74
|
+
"",
|
|
75
|
+
body,
|
|
76
|
+
"",
|
|
77
|
+
].join("\n");
|
|
78
|
+
}
|
|
46
79
|
/** Read `skills.exclude` from `.harnery/config.jsonc` (absent/unparseable → none). */
|
|
47
80
|
export function readSkillsExclude(projectRoot) {
|
|
48
81
|
const p = join(projectRoot, ".harnery", "config.jsonc");
|
|
@@ -157,6 +190,26 @@ export function applyInstructions(projectRoot, opts) {
|
|
|
157
190
|
}
|
|
158
191
|
}
|
|
159
192
|
}
|
|
193
|
+
// ── Cursor Always Apply rule ────────────────────────────────────────────
|
|
194
|
+
if (opts.adapter === "cursor") {
|
|
195
|
+
const rulePath = join(projectRoot, CURSOR_RULE_FILE);
|
|
196
|
+
const content = cursorRuleContent(projectRoot, opts.binName);
|
|
197
|
+
const before = existsSync(rulePath) ? readFileSync(rulePath, "utf8") : null;
|
|
198
|
+
if (before === content) {
|
|
199
|
+
actions.push(`· ${CURSOR_RULE_FILE} already current`);
|
|
200
|
+
}
|
|
201
|
+
else if (before !== null && !isOwnedFile(before)) {
|
|
202
|
+
warnings.push(`left ${CURSOR_RULE_FILE} (hand-edited; no harnery ownership marker)`);
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
if (!opts.dryRun) {
|
|
206
|
+
mkdirSync(dirname(rulePath), { recursive: true });
|
|
207
|
+
writeFileSync(rulePath, content);
|
|
208
|
+
}
|
|
209
|
+
const fresh = before === null;
|
|
210
|
+
actions.push(`${fresh ? "+" : "~"} ${verbed(fresh ? "write" : "update", fresh ? "wrote" : "updated")} ${CURSOR_RULE_FILE}`);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
160
213
|
// ── shipped skills ───────────────────────────────────────────────────────
|
|
161
214
|
if (skillsDir) {
|
|
162
215
|
const exclude = readSkillsExclude(projectRoot);
|
|
@@ -239,6 +292,19 @@ export function removeInstructions(projectRoot, opts) {
|
|
|
239
292
|
}
|
|
240
293
|
}
|
|
241
294
|
}
|
|
295
|
+
if (opts.adapter === "cursor") {
|
|
296
|
+
const rulePath = join(projectRoot, CURSOR_RULE_FILE);
|
|
297
|
+
if (existsSync(rulePath)) {
|
|
298
|
+
if (!isOwnedFile(readFileSync(rulePath, "utf8"))) {
|
|
299
|
+
warnings.push(`left ${CURSOR_RULE_FILE} (hand-edited; no harnery ownership marker)`);
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
if (!opts.dryRun)
|
|
303
|
+
rmSync(rulePath);
|
|
304
|
+
actions.push(`+ ${opts.dryRun ? "would delete" : "deleted"} ${CURSOR_RULE_FILE}`);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
242
308
|
// ── shipped skills ───────────────────────────────────────────────────────
|
|
243
309
|
if (skillsDir) {
|
|
244
310
|
for (const skill of SKILLS) {
|
|
@@ -305,6 +371,11 @@ export function checkInstructions(projectRoot, opts) {
|
|
|
305
371
|
note(`skill ${skill.id}`, checkOwnedSkill(c, skillBody(skill.render, opts.binName)));
|
|
306
372
|
}
|
|
307
373
|
}
|
|
374
|
+
if (opts.adapter === "cursor") {
|
|
375
|
+
const rulePath = join(projectRoot, CURSOR_RULE_FILE);
|
|
376
|
+
const content = existsSync(rulePath) ? readFileSync(rulePath, "utf8") : "";
|
|
377
|
+
note(`${CURSOR_RULE_FILE} rule`, checkOwnedSkill(content, cursorRuleBody(projectRoot, opts.binName)));
|
|
378
|
+
}
|
|
308
379
|
}
|
|
309
380
|
catch (err) {
|
|
310
381
|
errored = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAClD,sEAAsE;AACtE,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AAEpD,2EAA2E;AAC3E,MAAM,WAAW,WAAW;IAC1B,8CAA8C;IAC9C,MAAM,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,2CAA2C;IAC3C,GAAG,EAAE,OAAO,CAAC;IACb,4CAA4C;IAC5C,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,WAAoE,GAC3E,MAAM,
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAClD,sEAAsE;AACtE,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AAEpD,2EAA2E;AAC3E,MAAM,WAAW,WAAW;IAC1B,8CAA8C;IAC9C,MAAM,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,2CAA2C;IAC3C,GAAG,EAAE,OAAO,CAAC;IACb,4CAA4C;IAC5C,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,WAAoE,GAC3E,MAAM,CAgHR;AAID,mFAAmF;AACnF,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CACrC;AAsVD,eAAO,MAAM,MAAM,EAAE,aAAa,EAiDjC,CAAC"}
|
|
@@ -113,6 +113,12 @@ coordination ledger (\`.harnery/ledgers/v3/\`). Lead a shell command with a
|
|
|
113
113
|
carries a reason instead of \`(no intent)\`; the [tool-intent
|
|
114
114
|
guide](https://harnery.com/guides/tool-intent/) owns the details.
|
|
115
115
|
|
|
116
|
+
**Messaging another agent.** \`${b} agents ping <name> "<message>"\` reaches an
|
|
117
|
+
agent by name whether or not they are running: a live agent sees it on their next
|
|
118
|
+
prompt, and a dormant name holds it until a session of that name next starts.
|
|
119
|
+
Send it as your first and only step. Do not check who is live first, and do not
|
|
120
|
+
hunt for somewhere else to leave it. Only a never-used name is refused.
|
|
121
|
+
|
|
116
122
|
**Journal.** \`${b} journal add <category> "<text>"\` (category = ${journalCats})
|
|
117
123
|
leaves breadcrumbs that survive context compaction;
|
|
118
124
|
\`${b} journal read\` reads yours, \`${b} journal read --name <peer>\` reads a peer's.
|
|
@@ -242,10 +248,13 @@ auto-route into contribute.
|
|
|
242
248
|
## Create (\`create <objective>\`)
|
|
243
249
|
|
|
244
250
|
The web UI is the member + steward picker; don't create from the CLI (that skips
|
|
245
|
-
the steward choice).
|
|
251
|
+
the steward choice). Read the dashboard base URL from the active Harnery web
|
|
252
|
+
status or start output, which resolves the project's configured \`web.port\`.
|
|
253
|
+
Append the URL-encoded objective to this path; never assume a port or reuse a
|
|
254
|
+
dashboard URL from another project:
|
|
246
255
|
|
|
247
256
|
\`\`\`
|
|
248
|
-
|
|
257
|
+
<configured-dashboard-base-url>/councils/new?objective=<encoded>
|
|
249
258
|
\`\`\`
|
|
250
259
|
|
|
251
260
|
If the dev server isn't up, start it with \`${b} web up\`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "harnery",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "Multi-agent coordination for AI coding agents - Claude Code, Cursor, and Codex.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ryan Kelly",
|
|
@@ -132,6 +132,16 @@
|
|
|
132
132
|
"types": "./dist/core/semantic/index.d.ts",
|
|
133
133
|
"import": "./dist/core/semantic/index.js"
|
|
134
134
|
},
|
|
135
|
+
"./core/supervisor": {
|
|
136
|
+
"bun": "./src/core/supervisor/index.ts",
|
|
137
|
+
"types": "./dist/core/supervisor/index.d.ts",
|
|
138
|
+
"import": "./dist/core/supervisor/index.js"
|
|
139
|
+
},
|
|
140
|
+
"./core/diagnostics": {
|
|
141
|
+
"bun": "./src/core/diagnostics/index.ts",
|
|
142
|
+
"types": "./dist/core/diagnostics/index.d.ts",
|
|
143
|
+
"import": "./dist/core/diagnostics/index.js"
|
|
144
|
+
},
|
|
135
145
|
"./core/governor/plans": {
|
|
136
146
|
"bun": "./src/core/governor/plan-read.ts",
|
|
137
147
|
"types": "./dist/core/governor/plan-read.d.ts",
|
|
@@ -142,6 +152,11 @@
|
|
|
142
152
|
"types": "./dist/core/policy/index.d.ts",
|
|
143
153
|
"import": "./dist/core/policy/index.js"
|
|
144
154
|
},
|
|
155
|
+
"./lib/admission": {
|
|
156
|
+
"bun": "./src/lib/admission.ts",
|
|
157
|
+
"types": "./dist/lib/admission.d.ts",
|
|
158
|
+
"import": "./dist/lib/admission.js"
|
|
159
|
+
},
|
|
145
160
|
"./lib/agent-browser": {
|
|
146
161
|
"bun": "./src/lib/agent-browser/index.ts",
|
|
147
162
|
"types": "./dist/lib/agent-browser/index.d.ts",
|
|
@@ -220,7 +235,7 @@
|
|
|
220
235
|
"access": "public",
|
|
221
236
|
"provenance": true
|
|
222
237
|
},
|
|
223
|
-
"packageManager": "bun@1.
|
|
238
|
+
"packageManager": "bun@1.4.0",
|
|
224
239
|
"scripts": {
|
|
225
240
|
"build": "npm run clean && tsc -p tsconfig.build.json && node scripts/rewrite-dts-extensions.mjs",
|
|
226
241
|
"clean": "rm -rf dist",
|
|
@@ -230,9 +245,11 @@
|
|
|
230
245
|
"check:portability": "bun run scripts/check-portability.ts",
|
|
231
246
|
"check:public-surface": "bun run scripts/check-public-surface.ts",
|
|
232
247
|
"check:layering": "bun run scripts/check-layering.ts",
|
|
248
|
+
"probe:supervisor-budget": "bun run scripts/probe-supervisor-budget.ts",
|
|
233
249
|
"lint:fix": "bun x @biomejs/biome check --write src",
|
|
234
250
|
"format": "bun x @biomejs/biome format --write src",
|
|
235
251
|
"test": "bun run scripts/test.mjs",
|
|
252
|
+
"test:list": "bun run scripts/test.mjs --list",
|
|
236
253
|
"test:web": "cd web && bun install && bun test",
|
|
237
254
|
"test:integration": "bash tests/integration/run.sh",
|
|
238
255
|
"smoke": "node scripts/smoke-test.mjs",
|