harnery 0.34.1 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commander.d.ts +30 -5
- package/dist/commander.d.ts.map +1 -1
- package/dist/commander.js +124 -94
- package/dist/commands/agents.d.ts +37 -6
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +466 -371
- package/dist/commands/backup.d.ts.map +1 -1
- package/dist/commands/backup.js +10 -10
- package/dist/commands/browse-session.d.ts.map +1 -1
- package/dist/commands/browse-session.js +12 -0
- package/dist/commands/browse.d.ts +1 -1
- package/dist/commands/browse.d.ts.map +1 -1
- package/dist/commands/browse.js +31 -6
- package/dist/commands/conversations.d.ts +10 -0
- package/dist/commands/conversations.d.ts.map +1 -0
- package/dist/commands/conversations.js +201 -0
- package/dist/commands/decision.d.ts.map +1 -1
- package/dist/commands/decision.js +2 -2
- package/dist/commands/deinit.d.ts.map +1 -1
- package/dist/commands/deinit.js +5 -0
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +13 -2
- package/dist/commands/doctor.d.ts +5 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +51 -7
- package/dist/commands/events.d.ts.map +1 -1
- package/dist/commands/events.js +18 -1
- package/dist/commands/fetch.js +6 -5
- package/dist/commands/files.d.ts +22 -0
- package/dist/commands/files.d.ts.map +1 -0
- package/dist/commands/files.js +113 -0
- package/dist/commands/governor.js +14 -12
- package/dist/commands/inbox.d.ts +5 -0
- package/dist/commands/inbox.d.ts.map +1 -0
- package/dist/commands/inbox.js +57 -0
- package/dist/commands/init.d.ts +4 -5
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +63 -13
- package/dist/commands/ledger-v3.d.ts.map +1 -1
- package/dist/commands/ledger-v3.js +347 -1
- package/dist/commands/logs.d.ts +4 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +169 -0
- package/dist/commands/messages.d.ts +5 -0
- package/dist/commands/messages.d.ts.map +1 -0
- package/dist/commands/messages.js +45 -0
- package/dist/commands/outline.d.ts +1 -1
- package/dist/commands/outline.d.ts.map +1 -1
- package/dist/commands/outline.js +2 -2
- package/dist/commands/presence.d.ts.map +1 -1
- package/dist/commands/presence.js +2 -2
- package/dist/commands/read.d.ts +1 -1
- package/dist/commands/read.d.ts.map +1 -1
- package/dist/commands/read.js +2 -2
- package/dist/commands/semantic.d.ts +4 -0
- package/dist/commands/semantic.d.ts.map +1 -0
- package/dist/commands/semantic.js +199 -0
- package/dist/commands/storage.d.ts +4 -0
- package/dist/commands/storage.d.ts.map +1 -0
- package/dist/commands/storage.js +238 -0
- package/dist/commands/tunnel.d.ts +5 -1
- package/dist/commands/tunnel.d.ts.map +1 -1
- package/dist/commands/tunnel.js +44 -31
- package/dist/commands/web.d.ts +3 -0
- package/dist/commands/web.d.ts.map +1 -1
- package/dist/commands/web.js +84 -7
- package/dist/commands/work.js +3 -3
- package/dist/commands/workflow.js +13 -13
- package/dist/core/adapters/profiles.d.ts +1 -1
- package/dist/core/agents/canonical-emit.d.ts +3 -0
- package/dist/core/agents/canonical-emit.d.ts.map +1 -1
- package/dist/core/agents/canonical-emit.js +12 -0
- package/dist/core/agents/claim-path.d.ts +11 -0
- package/dist/core/agents/claim-path.d.ts.map +1 -0
- package/dist/core/agents/claim-path.js +22 -0
- package/dist/core/agents/cli.js +209 -39
- package/dist/core/agents/coord-client.d.ts +29 -3
- package/dist/core/agents/coord-client.d.ts.map +1 -1
- package/dist/core/agents/coord-client.js +88 -9
- package/dist/core/agents/live-authority-v3.d.ts +47 -1
- package/dist/core/agents/live-authority-v3.d.ts.map +1 -1
- package/dist/core/agents/live-authority-v3.js +245 -13
- package/dist/core/agents/live-lifecycle-v3.js +9 -4
- package/dist/core/agents/live-observation-v3.d.ts.map +1 -1
- package/dist/core/agents/live-observation-v3.js +8 -3
- package/dist/core/agents/render/prompt-context.d.ts +9 -3
- package/dist/core/agents/render/prompt-context.d.ts.map +1 -1
- package/dist/core/agents/render/prompt-context.js +36 -17
- package/dist/core/agents/rules/stop-hook.d.ts +2 -0
- package/dist/core/agents/rules/stop-hook.d.ts.map +1 -1
- package/dist/core/agents/rules/stop-hook.js +115 -22
- package/dist/core/agents/rules/verdict.d.ts +1 -0
- package/dist/core/agents/rules/verdict.d.ts.map +1 -1
- package/dist/core/agents/session-events.d.ts.map +1 -1
- package/dist/core/agents/session-events.js +4 -0
- package/dist/core/agents/session-finalization-state-v3.js +1 -1
- package/dist/core/agents/session-finalizer-v3.js +5 -1
- package/dist/core/agents/session-name-display.d.ts +1 -0
- package/dist/core/agents/session-name-display.d.ts.map +1 -1
- package/dist/core/agents/session-name-display.js +8 -1
- package/dist/core/agents/state/activity-log.d.ts +3 -0
- package/dist/core/agents/state/activity-log.d.ts.map +1 -1
- package/dist/core/agents/state/activity-log.js +6 -3
- package/dist/core/agents/state/heartbeat-reader.d.ts +46 -0
- package/dist/core/agents/state/heartbeat-reader.d.ts.map +1 -0
- package/dist/core/agents/state/heartbeat-reader.js +25 -0
- package/dist/core/agents/state/heartbeat-writer.d.ts +9 -48
- package/dist/core/agents/state/heartbeat-writer.d.ts.map +1 -1
- package/dist/core/agents/state/heartbeat-writer.js +34 -34
- package/dist/core/agents/state/live-coordination-view.d.ts +6 -8
- package/dist/core/agents/state/live-coordination-view.d.ts.map +1 -1
- package/dist/core/agents/state/live-coordination-view.js +16 -67
- package/dist/core/agents/state/live-coordination-writer.d.ts +12 -0
- package/dist/core/agents/state/live-coordination-writer.d.ts.map +1 -0
- package/dist/core/agents/state/live-coordination-writer.js +92 -0
- package/dist/core/agents/state/names.d.ts +9 -1
- package/dist/core/agents/state/names.d.ts.map +1 -1
- package/dist/core/agents/state/names.js +190 -182
- package/dist/core/agents/state/stale-sweep.d.ts.map +1 -1
- package/dist/core/agents/state/stale-sweep.js +23 -5
- package/dist/core/artifacts/constants.d.ts +5 -0
- package/dist/core/artifacts/constants.d.ts.map +1 -0
- package/dist/core/artifacts/constants.js +4 -0
- package/dist/core/artifacts/index.d.ts +24 -3
- package/dist/core/artifacts/index.d.ts.map +1 -1
- package/dist/core/artifacts/index.js +96 -8
- package/dist/core/config.d.ts +62 -4
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +98 -4
- package/dist/core/conversations/archive.d.ts +49 -0
- package/dist/core/conversations/archive.d.ts.map +1 -0
- package/dist/core/conversations/archive.js +136 -0
- package/dist/core/conversations/catalog.d.ts +10 -0
- package/dist/core/conversations/catalog.d.ts.map +1 -0
- package/dist/core/conversations/catalog.js +72 -0
- package/dist/core/conversations/context-pack.d.ts +6 -0
- package/dist/core/conversations/context-pack.d.ts.map +1 -0
- package/dist/core/conversations/context-pack.js +60 -0
- package/dist/core/conversations/contract.d.ts +155 -0
- package/dist/core/conversations/contract.d.ts.map +1 -0
- package/dist/core/conversations/contract.js +1 -0
- package/dist/core/conversations/evaluation.d.ts +16 -0
- package/dist/core/conversations/evaluation.d.ts.map +1 -0
- package/dist/core/conversations/evaluation.js +9 -0
- package/dist/core/conversations/index.d.ts +10 -0
- package/dist/core/conversations/index.d.ts.map +1 -0
- package/dist/core/conversations/index.js +9 -0
- package/dist/core/conversations/lifecycle.d.ts +28 -0
- package/dist/core/conversations/lifecycle.d.ts.map +1 -0
- package/dist/core/conversations/lifecycle.js +29 -0
- package/dist/core/conversations/normalize.d.ts +14 -0
- package/dist/core/conversations/normalize.d.ts.map +1 -0
- package/dist/core/conversations/normalize.js +82 -0
- package/dist/core/conversations/query.d.ts +8 -0
- package/dist/core/conversations/query.d.ts.map +1 -0
- package/dist/core/conversations/query.js +280 -0
- package/dist/core/conversations/search-index.d.ts +9 -0
- package/dist/core/conversations/search-index.d.ts.map +1 -0
- package/dist/core/conversations/search-index.js +29 -0
- package/dist/core/events/legacy-storage/canary.d.ts +18 -0
- package/dist/core/events/legacy-storage/canary.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/canary.js +150 -0
- package/dist/core/events/legacy-storage/fence.d.ts +15 -0
- package/dist/core/events/legacy-storage/fence.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/fence.js +115 -0
- package/dist/core/events/legacy-storage/index.d.ts +6 -0
- package/dist/core/events/legacy-storage/index.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/index.js +5 -0
- package/dist/core/events/legacy-storage/inventory.d.ts +10 -0
- package/dist/core/events/legacy-storage/inventory.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/inventory.js +40 -0
- package/dist/core/events/legacy-storage/manifest.d.ts +23 -0
- package/dist/core/events/legacy-storage/manifest.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/manifest.js +108 -0
- package/dist/core/events/legacy-storage/reader.d.ts +15 -0
- package/dist/core/events/legacy-storage/reader.d.ts.map +1 -0
- package/dist/core/events/legacy-storage/reader.js +154 -0
- package/dist/core/events/v3/authority-outbox.d.ts +7 -2
- package/dist/core/events/v3/authority-outbox.d.ts.map +1 -1
- package/dist/core/events/v3/authority-outbox.js +16 -3
- package/dist/core/events/v3/base-contract.d.ts +851 -16
- package/dist/core/events/v3/base-contract.d.ts.map +1 -1
- package/dist/core/events/v3/base-contract.js +50 -7
- package/dist/core/events/v3/bootstrap.d.ts +39 -0
- package/dist/core/events/v3/bootstrap.d.ts.map +1 -1
- package/dist/core/events/v3/bootstrap.js +167 -3
- package/dist/core/events/v3/capabilities.d.ts +11 -0
- package/dist/core/events/v3/capabilities.d.ts.map +1 -1
- package/dist/core/events/v3/capabilities.js +26 -3
- package/dist/core/events/v3/control-witness.d.ts +44 -0
- package/dist/core/events/v3/control-witness.d.ts.map +1 -0
- package/dist/core/events/v3/control-witness.js +233 -0
- package/dist/core/events/v3/control-writer.d.ts +4 -0
- package/dist/core/events/v3/control-writer.d.ts.map +1 -0
- package/dist/core/events/v3/control-writer.js +16 -0
- package/dist/core/events/v3/control.d.ts +8 -2
- package/dist/core/events/v3/control.d.ts.map +1 -1
- package/dist/core/events/v3/control.js +46 -18
- package/dist/core/events/v3/coordination-transaction-recovery.d.ts +42 -0
- package/dist/core/events/v3/coordination-transaction-recovery.d.ts.map +1 -0
- package/dist/core/events/v3/coordination-transaction-recovery.js +342 -0
- package/dist/core/events/v3/coordination-view.d.ts.map +1 -1
- package/dist/core/events/v3/coordination-view.js +16 -1
- package/dist/core/events/v3/generated.d.ts +1 -1
- package/dist/core/events/v3/generated.js +1 -1
- package/dist/core/events/v3/index.d.ts +8 -5
- package/dist/core/events/v3/index.d.ts.map +1 -1
- package/dist/core/events/v3/index.js +7 -4
- package/dist/core/events/v3/latency.d.ts +31 -1
- package/dist/core/events/v3/latency.d.ts.map +1 -1
- package/dist/core/events/v3/latency.js +127 -3
- package/dist/core/events/v3/live-route-observer.d.ts +31 -0
- package/dist/core/events/v3/live-route-observer.d.ts.map +1 -0
- package/dist/core/events/v3/live-route-observer.js +58 -0
- package/dist/core/events/v3/live-routing.d.ts +42 -20
- package/dist/core/events/v3/live-routing.d.ts.map +1 -1
- package/dist/core/events/v3/live-routing.js +153 -41
- package/dist/core/events/v3/producers/command-recorder.d.ts.map +1 -1
- package/dist/core/events/v3/producers/command-recorder.js +10 -1
- package/dist/core/events/v3/producers/coordination-recorder.d.ts +11 -1
- package/dist/core/events/v3/producers/coordination-recorder.d.ts.map +1 -1
- package/dist/core/events/v3/producers/coordination-recorder.js +90 -13
- package/dist/core/events/v3/producers/diagnostic-summaries.d.ts +129 -0
- package/dist/core/events/v3/producers/diagnostic-summaries.d.ts.map +1 -0
- package/dist/core/events/v3/producers/diagnostic-summaries.js +499 -0
- package/dist/core/events/v3/producers/hook-base.d.ts +17 -1
- package/dist/core/events/v3/producers/hook-base.d.ts.map +1 -1
- package/dist/core/events/v3/producers/hook-base.js +83 -2
- package/dist/core/events/v3/producers/intake.d.ts +13 -0
- package/dist/core/events/v3/producers/intake.d.ts.map +1 -1
- package/dist/core/events/v3/producers/intake.js +36 -2
- package/dist/core/events/v3/producers/producer-state-observer.d.ts +8 -0
- package/dist/core/events/v3/producers/producer-state-observer.d.ts.map +1 -0
- package/dist/core/events/v3/producers/producer-state-observer.js +45 -0
- package/dist/core/events/v3/producers/recorder.d.ts +117 -1
- package/dist/core/events/v3/producers/recorder.d.ts.map +1 -1
- package/dist/core/events/v3/producers/recorder.js +992 -27
- package/dist/core/events/v3/reader.d.ts +51 -0
- package/dist/core/events/v3/reader.d.ts.map +1 -1
- package/dist/core/events/v3/reader.js +181 -1
- package/dist/core/events/v3/rotation-config.d.ts +9 -0
- package/dist/core/events/v3/rotation-config.d.ts.map +1 -0
- package/dist/core/events/v3/rotation-config.js +91 -0
- package/dist/core/events/v3/runtime-build.d.ts +11 -0
- package/dist/core/events/v3/runtime-build.d.ts.map +1 -0
- package/dist/core/events/v3/runtime-build.js +39 -0
- package/dist/core/events/v3/runtime-identity.d.ts +5 -0
- package/dist/core/events/v3/runtime-identity.d.ts.map +1 -0
- package/dist/core/events/v3/runtime-identity.js +18 -0
- package/dist/core/events/v3/runtime-telemetry-capabilities.d.ts +52 -0
- package/dist/core/events/v3/runtime-telemetry-capabilities.d.ts.map +1 -0
- package/dist/core/events/v3/runtime-telemetry-capabilities.js +54 -0
- package/dist/core/events/v3/support-storage/classify.d.ts +46 -0
- package/dist/core/events/v3/support-storage/classify.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/classify.js +149 -0
- package/dist/core/events/v3/support-storage/eligibility.d.ts +29 -0
- package/dist/core/events/v3/support-storage/eligibility.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/eligibility.js +35 -0
- package/dist/core/events/v3/support-storage/index.d.ts +10 -0
- package/dist/core/events/v3/support-storage/index.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/index.js +9 -0
- package/dist/core/events/v3/support-storage/inventory.d.ts +30 -0
- package/dist/core/events/v3/support-storage/inventory.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/inventory.js +94 -0
- package/dist/core/events/v3/support-storage/logical-authority.d.ts +14 -0
- package/dist/core/events/v3/support-storage/logical-authority.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/logical-authority.js +104 -0
- package/dist/core/events/v3/support-storage/maintenance.d.ts +98 -0
- package/dist/core/events/v3/support-storage/maintenance.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/maintenance.js +352 -0
- package/dist/core/events/v3/support-storage/pack-contract.d.ts +59 -0
- package/dist/core/events/v3/support-storage/pack-contract.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/pack-contract.js +249 -0
- package/dist/core/events/v3/support-storage/pack-reader.d.ts +34 -0
- package/dist/core/events/v3/support-storage/pack-reader.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/pack-reader.js +258 -0
- package/dist/core/events/v3/support-storage/pack-writer.d.ts +30 -0
- package/dist/core/events/v3/support-storage/pack-writer.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/pack-writer.js +268 -0
- package/dist/core/events/v3/support-storage/recovery.d.ts +15 -0
- package/dist/core/events/v3/support-storage/recovery.d.ts.map +1 -0
- package/dist/core/events/v3/support-storage/recovery.js +22 -0
- package/dist/core/events/v3/turn-telemetry.d.ts +21 -6
- package/dist/core/events/v3/turn-telemetry.d.ts.map +1 -1
- package/dist/core/events/v3/turn-telemetry.js +32 -2
- package/dist/core/events/v3/writer.d.ts +13 -1
- package/dist/core/events/v3/writer.d.ts.map +1 -1
- package/dist/core/events/v3/writer.js +126 -12
- package/dist/core/governor/plan-read.d.ts.map +1 -1
- package/dist/core/governor/plan-read.js +5 -21
- package/dist/core/governor/planning.js +6 -8
- package/dist/core/governor/service-read.d.ts +12 -0
- package/dist/core/governor/service-read.d.ts.map +1 -1
- package/dist/core/governor/service-read.js +266 -2
- package/dist/core/governor/service.d.ts +1 -0
- package/dist/core/governor/service.d.ts.map +1 -1
- package/dist/core/governor/service.js +53 -18
- package/dist/core/guard/evidence-v3.d.ts.map +1 -1
- package/dist/core/guard/evidence-v3.js +2 -0
- package/dist/core/hooks/adapter/events.d.ts.map +1 -1
- package/dist/core/hooks/adapter/events.js +1 -0
- package/dist/core/hooks/adapter/output.d.ts +4 -2
- package/dist/core/hooks/adapter/output.d.ts.map +1 -1
- package/dist/core/hooks/adapter/output.js +13 -5
- package/dist/core/hooks/adapter/parse.d.ts +3 -0
- package/dist/core/hooks/adapter/parse.d.ts.map +1 -1
- package/dist/core/hooks/adapter/parse.js +14 -0
- package/dist/core/hooks/adapter/runtime-telemetry.d.ts +142 -0
- package/dist/core/hooks/adapter/runtime-telemetry.d.ts.map +1 -0
- package/dist/core/hooks/adapter/runtime-telemetry.js +869 -0
- package/dist/core/hooks/cli.js +318 -61
- package/dist/core/hooks/effects/image-capture.d.ts +1 -1
- package/dist/core/hooks/effects/image-capture.d.ts.map +1 -1
- package/dist/core/hooks/effects/image-capture.js +4 -2
- package/dist/core/hooks/remediation-cap.d.ts +39 -0
- package/dist/core/hooks/remediation-cap.d.ts.map +1 -0
- package/dist/core/hooks/remediation-cap.js +63 -0
- package/dist/core/hooks/resolve/coord-root.d.ts +22 -9
- package/dist/core/hooks/resolve/coord-root.d.ts.map +1 -1
- package/dist/core/hooks/resolve/coord-root.js +92 -11
- package/dist/core/hooks/resolve/owner.d.ts.map +1 -1
- package/dist/core/hooks/resolve/owner.js +5 -0
- package/dist/core/hooks/resolve/transcript.d.ts +33 -9
- package/dist/core/hooks/resolve/transcript.d.ts.map +1 -1
- package/dist/core/hooks/resolve/transcript.js +33 -10
- package/dist/core/inbox/contract.d.ts +64 -0
- package/dist/core/inbox/contract.d.ts.map +1 -0
- package/dist/core/inbox/contract.js +13 -0
- package/dist/core/inbox/index.d.ts +5 -0
- package/dist/core/inbox/index.d.ts.map +1 -0
- package/dist/core/inbox/index.js +4 -0
- package/dist/core/inbox/lifecycle.d.ts +22 -0
- package/dist/core/inbox/lifecycle.d.ts.map +1 -0
- package/dist/core/inbox/lifecycle.js +41 -0
- package/dist/core/inbox/service.d.ts +36 -0
- package/dist/core/inbox/service.d.ts.map +1 -0
- package/dist/core/inbox/service.js +210 -0
- package/dist/core/inbox/watcher.d.ts +7 -0
- package/dist/core/inbox/watcher.d.ts.map +1 -0
- package/dist/core/inbox/watcher.js +26 -0
- package/dist/core/presence/codec-digest.d.ts.map +1 -1
- package/dist/core/presence/codec-digest.js +14 -3
- package/dist/core/presence/relay-client.d.ts +1 -0
- package/dist/core/presence/relay-client.d.ts.map +1 -1
- package/dist/core/presence/relay-client.js +52 -8
- package/dist/core/semantic/adapters.d.ts +37 -0
- package/dist/core/semantic/adapters.d.ts.map +1 -0
- package/dist/core/semantic/adapters.js +360 -0
- package/dist/core/semantic/contract.d.ts +1072 -0
- package/dist/core/semantic/contract.d.ts.map +1 -0
- package/dist/core/semantic/contract.js +331 -0
- package/dist/core/semantic/evidence.d.ts +11 -0
- package/dist/core/semantic/evidence.d.ts.map +1 -0
- package/dist/core/semantic/evidence.js +262 -0
- package/dist/core/semantic/index.d.ts +14 -0
- package/dist/core/semantic/index.d.ts.map +1 -0
- package/dist/core/semantic/index.js +13 -0
- package/dist/core/semantic/once.d.ts +38 -0
- package/dist/core/semantic/once.d.ts.map +1 -0
- package/dist/core/semantic/once.js +364 -0
- package/dist/core/semantic/prompt.d.ts +12 -0
- package/dist/core/semantic/prompt.d.ts.map +1 -0
- package/dist/core/semantic/prompt.js +83 -0
- package/dist/core/semantic/review.d.ts +144 -0
- package/dist/core/semantic/review.d.ts.map +1 -0
- package/dist/core/semantic/review.js +544 -0
- package/dist/core/semantic/routes.d.ts +10 -0
- package/dist/core/semantic/routes.d.ts.map +1 -0
- package/dist/core/semantic/routes.js +21 -0
- package/dist/core/semantic/scheduler.d.ts +27 -0
- package/dist/core/semantic/scheduler.d.ts.map +1 -0
- package/dist/core/semantic/scheduler.js +91 -0
- package/dist/core/semantic/service-status.d.ts +51 -0
- package/dist/core/semantic/service-status.d.ts.map +1 -0
- package/dist/core/semantic/service-status.js +140 -0
- package/dist/core/semantic/service.d.ts +52 -0
- package/dist/core/semantic/service.d.ts.map +1 -0
- package/dist/core/semantic/service.js +559 -0
- package/dist/core/semantic/soak.d.ts +75 -0
- package/dist/core/semantic/soak.d.ts.map +1 -0
- package/dist/core/semantic/soak.js +476 -0
- package/dist/core/semantic/storage.d.ts +81 -0
- package/dist/core/semantic/storage.d.ts.map +1 -0
- package/dist/core/semantic/storage.js +180 -0
- package/dist/core/semantic/usage.d.ts +43 -0
- package/dist/core/semantic/usage.d.ts.map +1 -0
- package/dist/core/semantic/usage.js +193 -0
- package/dist/core/semantic/validate.d.ts +18 -0
- package/dist/core/semantic/validate.d.ts.map +1 -0
- package/dist/core/semantic/validate.js +207 -0
- package/dist/core/storage/buffer.d.ts +28 -0
- package/dist/core/storage/buffer.d.ts.map +1 -0
- package/dist/core/storage/buffer.js +101 -0
- package/dist/core/storage/builtins.d.ts +3 -0
- package/dist/core/storage/builtins.d.ts.map +1 -0
- package/dist/core/storage/builtins.js +683 -0
- package/dist/core/storage/catalog.d.ts +19 -0
- package/dist/core/storage/catalog.d.ts.map +1 -0
- package/dist/core/storage/catalog.js +365 -0
- package/dist/core/storage/config.d.ts +16 -0
- package/dist/core/storage/config.d.ts.map +1 -0
- package/dist/core/storage/config.js +311 -0
- package/dist/core/storage/contract.d.ts +275 -0
- package/dist/core/storage/contract.d.ts.map +1 -0
- package/dist/core/storage/contract.js +3 -0
- package/dist/core/storage/durable-history.d.ts +36 -0
- package/dist/core/storage/durable-history.d.ts.map +1 -0
- package/dist/core/storage/durable-history.js +606 -0
- package/dist/core/storage/health.d.ts +4 -0
- package/dist/core/storage/health.d.ts.map +1 -0
- package/dist/core/storage/health.js +65 -0
- package/dist/core/storage/index.d.ts +16 -0
- package/dist/core/storage/index.d.ts.map +1 -0
- package/dist/core/storage/index.js +15 -0
- package/dist/core/storage/inventory.d.ts +25 -0
- package/dist/core/storage/inventory.d.ts.map +1 -0
- package/dist/core/storage/inventory.js +666 -0
- package/dist/core/storage/jsonl.d.ts +52 -0
- package/dist/core/storage/jsonl.d.ts.map +1 -0
- package/dist/core/storage/jsonl.js +156 -0
- package/dist/core/storage/log-retention.d.ts +52 -0
- package/dist/core/storage/log-retention.d.ts.map +1 -0
- package/dist/core/storage/log-retention.js +419 -0
- package/dist/core/storage/logger.d.ts +82 -0
- package/dist/core/storage/logger.d.ts.map +1 -0
- package/dist/core/storage/logger.js +411 -0
- package/dist/core/storage/maintenance-providers.d.ts +26 -0
- package/dist/core/storage/maintenance-providers.d.ts.map +1 -0
- package/dist/core/storage/maintenance-providers.js +141 -0
- package/dist/core/storage/maintenance.d.ts +125 -0
- package/dist/core/storage/maintenance.d.ts.map +1 -0
- package/dist/core/storage/maintenance.js +609 -0
- package/dist/core/storage/metrics.d.ts +60 -0
- package/dist/core/storage/metrics.d.ts.map +1 -0
- package/dist/core/storage/metrics.js +134 -0
- package/dist/core/storage/policy.d.ts +7 -0
- package/dist/core/storage/policy.d.ts.map +1 -0
- package/dist/core/storage/policy.js +110 -0
- package/dist/core/storage/process-log.d.ts +38 -0
- package/dist/core/storage/process-log.d.ts.map +1 -0
- package/dist/core/storage/process-log.js +165 -0
- package/dist/core/storage/query.d.ts +34 -0
- package/dist/core/storage/query.d.ts.map +1 -0
- package/dist/core/storage/query.js +295 -0
- package/dist/core/storage/receipts.d.ts +23 -0
- package/dist/core/storage/receipts.d.ts.map +1 -0
- package/dist/core/storage/receipts.js +117 -0
- package/dist/core/storage/segments.d.ts +84 -0
- package/dist/core/storage/segments.d.ts.map +1 -0
- package/dist/core/storage/segments.js +542 -0
- package/dist/core/storage/sink-graph.d.ts +65 -0
- package/dist/core/storage/sink-graph.d.ts.map +1 -0
- package/dist/core/storage/sink-graph.js +213 -0
- package/dist/core/storage/storm-control.d.ts +23 -0
- package/dist/core/storage/storm-control.d.ts.map +1 -0
- package/dist/core/storage/storm-control.js +59 -0
- package/dist/core/work/state.d.ts.map +1 -1
- package/dist/core/work/state.js +10 -14
- package/dist/core/workflow/live-session-v3.d.ts.map +1 -1
- package/dist/core/workflow/live-session-v3.js +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/lazy-commands.d.ts +26 -0
- package/dist/lazy-commands.d.ts.map +1 -0
- package/dist/lazy-commands.js +210 -0
- package/dist/lib/browser/client.d.ts +11 -0
- package/dist/lib/browser/client.d.ts.map +1 -1
- package/dist/lib/browser/client.js +13 -0
- package/dist/lib/browser/index.d.ts +1 -0
- package/dist/lib/browser/index.d.ts.map +1 -1
- package/dist/lib/browser/standalone-html.d.ts +25 -0
- package/dist/lib/browser/standalone-html.d.ts.map +1 -0
- package/dist/lib/browser/standalone-html.js +284 -0
- package/dist/lib/docs-lint.d.ts +2 -0
- package/dist/lib/docs-lint.d.ts.map +1 -1
- package/dist/lib/docs-lint.js +45 -80
- package/dist/lib/docs-metadata-audit.d.ts +3 -0
- package/dist/lib/docs-metadata-audit.d.ts.map +1 -1
- package/dist/lib/docs-metadata-audit.js +13 -23
- package/dist/lib/docs-metadata-sync.d.ts +1 -0
- package/dist/lib/docs-metadata-sync.d.ts.map +1 -1
- package/dist/lib/docs-metadata-sync.js +28 -10
- package/dist/lib/docs-repository-view.d.ts +22 -0
- package/dist/lib/docs-repository-view.d.ts.map +1 -0
- package/dist/lib/docs-repository-view.js +185 -0
- package/dist/lib/http/client.d.ts +11 -5
- package/dist/lib/http/client.d.ts.map +1 -1
- package/dist/lib/http/client.js +22 -4
- package/dist/lib/http/index.d.ts +1 -1
- package/dist/lib/http/index.d.ts.map +1 -1
- package/dist/lib/http/index.js +1 -1
- package/dist/lib/indexer-exclusions.d.ts +27 -0
- package/dist/lib/indexer-exclusions.d.ts.map +1 -0
- package/dist/lib/indexer-exclusions.js +176 -0
- package/dist/lib/instructions/apply.d.ts.map +1 -1
- package/dist/lib/instructions/apply.js +1 -0
- package/dist/lib/instructions/templates.d.ts +2 -0
- package/dist/lib/instructions/templates.d.ts.map +1 -1
- package/dist/lib/instructions/templates.js +149 -4
- package/dist/lib/local-file-url.d.ts +9 -0
- package/dist/lib/local-file-url.d.ts.map +1 -0
- package/dist/lib/local-file-url.js +20 -0
- package/dist/lib/web-performance.d.ts +118 -0
- package/dist/lib/web-performance.d.ts.map +1 -0
- package/dist/lib/web-performance.js +192 -0
- package/package.json +34 -2
- package/schemas/config.schema.json +58 -0
- package/schemas/event-v3.schema.json +3073 -581
- package/src/commander.ts +462 -93
- package/src/commands/agents.ts +617 -355
- package/src/commands/backup.ts +18 -14
- package/src/commands/browse-session.ts +12 -0
- package/src/commands/browse.ts +31 -9
- package/src/commands/conversations.ts +279 -0
- package/src/commands/decision.ts +8 -2
- package/src/commands/deinit.ts +6 -0
- package/src/commands/docs.ts +25 -6
- package/src/commands/doctor.ts +75 -9
- package/src/commands/events.ts +21 -1
- package/src/commands/fetch.ts +7 -6
- package/src/commands/files.ts +143 -0
- package/src/commands/governor.ts +13 -12
- package/src/commands/inbox.ts +61 -0
- package/src/commands/init.ts +78 -16
- package/src/commands/ledger-v3.ts +421 -1
- package/src/commands/logs.ts +224 -0
- package/src/commands/messages.ts +61 -0
- package/src/commands/outline.ts +6 -2
- package/src/commands/presence.ts +7 -2
- package/src/commands/read.ts +6 -2
- package/src/commands/semantic.ts +244 -0
- package/src/commands/storage.ts +310 -0
- package/src/commands/tunnel.ts +66 -52
- package/src/commands/web.ts +92 -7
- package/src/commands/work.ts +3 -3
- package/src/commands/workflow.ts +13 -13
- package/src/core/agents/canonical-emit.ts +15 -0
- package/src/core/agents/claim-path.ts +23 -0
- package/src/core/agents/cli.ts +259 -53
- package/src/core/agents/coord-client.ts +92 -8
- package/src/core/agents/live-authority-v3.ts +342 -14
- package/src/core/agents/live-lifecycle-v3.ts +14 -4
- package/src/core/agents/live-observation-v3.ts +13 -3
- package/src/core/agents/render/prompt-context.ts +40 -16
- package/src/core/agents/rules/stop-hook.ts +129 -25
- package/src/core/agents/rules/verdict.ts +1 -0
- package/src/core/agents/session-events.ts +4 -0
- package/src/core/agents/session-finalization-state-v3.ts +1 -1
- package/src/core/agents/session-finalizer-v3.ts +4 -1
- package/src/core/agents/session-name-display.ts +9 -1
- package/src/core/agents/state/activity-log.ts +7 -2
- package/src/core/agents/state/heartbeat-reader.ts +69 -0
- package/src/core/agents/state/heartbeat-writer.ts +47 -84
- package/src/core/agents/state/live-coordination-view.ts +17 -81
- package/src/core/agents/state/live-coordination-writer.ts +141 -0
- package/src/core/agents/state/names.ts +190 -182
- package/src/core/agents/state/stale-sweep.ts +25 -5
- package/src/core/artifacts/constants.ts +4 -0
- package/src/core/artifacts/index.ts +113 -8
- package/src/core/config.ts +126 -5
- package/src/core/conversations/archive.ts +237 -0
- package/src/core/conversations/catalog.ts +79 -0
- package/src/core/conversations/context-pack.ts +72 -0
- package/src/core/conversations/contract.ts +178 -0
- package/src/core/conversations/evaluation.ts +30 -0
- package/src/core/conversations/index.ts +9 -0
- package/src/core/conversations/lifecycle.ts +63 -0
- package/src/core/conversations/normalize.ts +105 -0
- package/src/core/conversations/query.ts +318 -0
- package/src/core/conversations/search-index.ts +48 -0
- package/src/core/events/legacy-storage/canary.ts +177 -0
- package/src/core/events/legacy-storage/fence.ts +129 -0
- package/src/core/events/legacy-storage/index.ts +5 -0
- package/src/core/events/legacy-storage/inventory.ts +51 -0
- package/src/core/events/legacy-storage/manifest.ts +136 -0
- package/src/core/events/legacy-storage/reader.ts +178 -0
- package/src/core/events/v3/authority-outbox.ts +22 -1
- package/src/core/events/v3/base-contract.ts +56 -7
- package/src/core/events/v3/bootstrap.ts +195 -2
- package/src/core/events/v3/capabilities.ts +37 -3
- package/src/core/events/v3/control-witness.ts +339 -0
- package/src/core/events/v3/control-writer.ts +16 -0
- package/src/core/events/v3/control.ts +54 -18
- package/src/core/events/v3/coordination-transaction-recovery.ts +477 -0
- package/src/core/events/v3/coordination-view.ts +17 -1
- package/src/core/events/v3/generated.ts +1 -1
- package/src/core/events/v3/index.ts +26 -2
- package/src/core/events/v3/latency.ts +213 -2
- package/src/core/events/v3/live-route-observer.ts +80 -0
- package/src/core/events/v3/live-routing.ts +182 -45
- package/src/core/events/v3/producers/command-recorder.ts +10 -1
- package/src/core/events/v3/producers/coordination-recorder.ts +112 -15
- package/src/core/events/v3/producers/diagnostic-summaries.ts +593 -0
- package/src/core/events/v3/producers/hook-base.ts +116 -2
- package/src/core/events/v3/producers/intake.ts +48 -2
- package/src/core/events/v3/producers/producer-state-observer.ts +52 -0
- package/src/core/events/v3/producers/recorder.ts +1403 -30
- package/src/core/events/v3/reader.ts +243 -2
- package/src/core/events/v3/rotation-config.ts +98 -0
- package/src/core/events/v3/runtime-build.ts +41 -0
- package/src/core/events/v3/runtime-identity.ts +16 -0
- package/src/core/events/v3/runtime-telemetry-capabilities.ts +143 -0
- package/src/core/events/v3/support-storage/classify.ts +209 -0
- package/src/core/events/v3/support-storage/eligibility.ts +58 -0
- package/src/core/events/v3/support-storage/index.ts +9 -0
- package/src/core/events/v3/support-storage/inventory.ts +135 -0
- package/src/core/events/v3/support-storage/logical-authority.ts +117 -0
- package/src/core/events/v3/support-storage/maintenance.ts +501 -0
- package/src/core/events/v3/support-storage/pack-contract.ts +337 -0
- package/src/core/events/v3/support-storage/pack-reader.ts +346 -0
- package/src/core/events/v3/support-storage/pack-writer.ts +352 -0
- package/src/core/events/v3/support-storage/recovery.ts +43 -0
- package/src/core/events/v3/turn-telemetry.ts +66 -5
- package/src/core/events/v3/writer.ts +168 -16
- package/src/core/governor/plan-read.ts +5 -18
- package/src/core/governor/planning.ts +5 -8
- package/src/core/governor/service-read.ts +320 -2
- package/src/core/governor/service.ts +49 -22
- package/src/core/guard/evidence-v3.ts +1 -0
- package/src/core/hooks/adapter/events.ts +1 -0
- package/src/core/hooks/adapter/output.ts +12 -5
- package/src/core/hooks/adapter/parse.ts +16 -0
- package/src/core/hooks/adapter/runtime-telemetry.ts +1200 -0
- package/src/core/hooks/cli.ts +342 -64
- package/src/core/hooks/effects/image-capture.ts +4 -1
- package/src/core/hooks/remediation-cap.ts +83 -0
- package/src/core/hooks/resolve/coord-root.ts +91 -11
- package/src/core/hooks/resolve/owner.ts +4 -0
- package/src/core/hooks/resolve/transcript.ts +55 -11
- package/src/core/inbox/contract.ts +81 -0
- package/src/core/inbox/index.ts +4 -0
- package/src/core/inbox/lifecycle.ts +104 -0
- package/src/core/inbox/service.ts +305 -0
- package/src/core/inbox/watcher.ts +36 -0
- package/src/core/presence/codec-digest.ts +15 -9
- package/src/core/presence/relay-client.ts +55 -7
- package/src/core/semantic/adapters.ts +452 -0
- package/src/core/semantic/contract.ts +430 -0
- package/src/core/semantic/evidence.ts +336 -0
- package/src/core/semantic/index.ts +201 -0
- package/src/core/semantic/once.ts +496 -0
- package/src/core/semantic/prompt.ts +96 -0
- package/src/core/semantic/review.ts +803 -0
- package/src/core/semantic/routes.ts +30 -0
- package/src/core/semantic/scheduler.ts +151 -0
- package/src/core/semantic/service-status.ts +212 -0
- package/src/core/semantic/service.ts +681 -0
- package/src/core/semantic/soak.ts +638 -0
- package/src/core/semantic/storage.ts +300 -0
- package/src/core/semantic/usage.ts +272 -0
- package/src/core/semantic/validate.ts +243 -0
- package/src/core/storage/buffer.ts +124 -0
- package/src/core/storage/builtins.ts +916 -0
- package/src/core/storage/catalog.ts +467 -0
- package/src/core/storage/config.ts +423 -0
- package/src/core/storage/contract.ts +342 -0
- package/src/core/storage/durable-history.ts +738 -0
- package/src/core/storage/health.ts +76 -0
- package/src/core/storage/index.ts +15 -0
- package/src/core/storage/inventory.ts +859 -0
- package/src/core/storage/jsonl.ts +213 -0
- package/src/core/storage/log-retention.ts +555 -0
- package/src/core/storage/logger.ts +546 -0
- package/src/core/storage/maintenance-providers.ts +200 -0
- package/src/core/storage/maintenance.ts +929 -0
- package/src/core/storage/metrics.ts +199 -0
- package/src/core/storage/policy.ts +141 -0
- package/src/core/storage/process-log.ts +203 -0
- package/src/core/storage/query.ts +360 -0
- package/src/core/storage/receipts.ts +162 -0
- package/src/core/storage/segments.ts +721 -0
- package/src/core/storage/sink-graph.ts +343 -0
- package/src/core/storage/storm-control.ts +91 -0
- package/src/core/work/state.ts +12 -21
- package/src/core/workflow/live-session-v3.ts +2 -4
- package/src/index.ts +2 -0
- package/src/lazy-commands.ts +294 -0
- package/src/lib/browser/client.ts +21 -0
- package/src/lib/browser/index.ts +4 -0
- package/src/lib/browser/standalone-html.ts +312 -0
- package/src/lib/docs-lint.ts +58 -77
- package/src/lib/docs-metadata-audit.ts +26 -21
- package/src/lib/docs-metadata-sync.ts +32 -9
- package/src/lib/docs-repository-view.ts +220 -0
- package/src/lib/http/client.ts +44 -8
- package/src/lib/http/index.ts +6 -1
- package/src/lib/indexer-exclusions.ts +173 -0
- package/src/lib/instructions/apply.ts +1 -0
- package/src/lib/instructions/templates.ts +154 -4
- package/src/lib/local-file-url.ts +31 -0
- package/src/lib/web-performance.ts +335 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { createReadStream } from "node:fs";
|
|
3
|
+
import { lstat, readdir, realpath } from "node:fs/promises";
|
|
4
|
+
import { join, relative, resolve } from "node:path";
|
|
5
|
+
|
|
6
|
+
export interface LegacyV1SegmentInventoryEntry {
|
|
7
|
+
filename: string;
|
|
8
|
+
path: string;
|
|
9
|
+
bytes: number;
|
|
10
|
+
digest: `sha256:${string}`;
|
|
11
|
+
compressed: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const LEGACY_ACTIVE_NAME = ["events", "ndjson"].join(".");
|
|
15
|
+
|
|
16
|
+
/** Enumerate all root events*.ndjson* frozen-history candidates, including manual variants. */
|
|
17
|
+
export async function inventoryLegacyV1Segments(
|
|
18
|
+
coordRoot: string,
|
|
19
|
+
): Promise<LegacyV1SegmentInventoryEntry[]> {
|
|
20
|
+
const harnery = resolve(coordRoot, ".harnery");
|
|
21
|
+
const stat = await lstat(harnery);
|
|
22
|
+
if (!stat.isDirectory() || stat.isSymbolicLink())
|
|
23
|
+
throw new Error("legacy_v1_inventory_root_invalid");
|
|
24
|
+
const rootReal = await realpath(harnery);
|
|
25
|
+
const result: LegacyV1SegmentInventoryEntry[] = [];
|
|
26
|
+
for (const name of (await readdir(harnery)).sort()) {
|
|
27
|
+
if (!/^events.*\.ndjson(?:\.gz)?$/.test(name) || name === LEGACY_ACTIVE_NAME) continue;
|
|
28
|
+
const path = join(harnery, name);
|
|
29
|
+
const entryStat = await lstat(path);
|
|
30
|
+
if (!entryStat.isFile() || entryStat.isSymbolicLink()) {
|
|
31
|
+
throw new Error(`legacy_v1_inventory_segment_invalid:${name}`);
|
|
32
|
+
}
|
|
33
|
+
const pathReal = await realpath(path);
|
|
34
|
+
if (relative(rootReal, pathReal).startsWith(".."))
|
|
35
|
+
throw new Error("legacy_v1_inventory_escape");
|
|
36
|
+
result.push({
|
|
37
|
+
filename: name,
|
|
38
|
+
path,
|
|
39
|
+
bytes: entryStat.size,
|
|
40
|
+
digest: await hashFile(path),
|
|
41
|
+
compressed: name.endsWith(".gz"),
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async function hashFile(path: string): Promise<`sha256:${string}`> {
|
|
48
|
+
const hash = createHash("sha256");
|
|
49
|
+
for await (const current of createReadStream(path)) hash.update(current as Buffer);
|
|
50
|
+
return `sha256:${hash.digest("hex")}`;
|
|
51
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
export interface LegacyV1SegmentManifest {
|
|
2
|
+
format: "harnery-legacy-v1-segment";
|
|
3
|
+
format_version: 1;
|
|
4
|
+
segment_id: `v1s_${string}`;
|
|
5
|
+
source: {
|
|
6
|
+
filename: string;
|
|
7
|
+
bytes: number;
|
|
8
|
+
digest: `sha256:${string}`;
|
|
9
|
+
row_count: number;
|
|
10
|
+
minimum_recorded_at: string | null;
|
|
11
|
+
maximum_recorded_at: string | null;
|
|
12
|
+
};
|
|
13
|
+
payload: {
|
|
14
|
+
algorithm: "gzip";
|
|
15
|
+
path: string;
|
|
16
|
+
bytes: number;
|
|
17
|
+
digest: `sha256:${string}`;
|
|
18
|
+
};
|
|
19
|
+
minimum_harnery_version: string;
|
|
20
|
+
created_at: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function validateLegacyV1SegmentManifest(value: unknown): LegacyV1SegmentManifest {
|
|
24
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
25
|
+
throw new Error("legacy_v1_manifest_invalid");
|
|
26
|
+
}
|
|
27
|
+
const manifest = value as Record<string, unknown>;
|
|
28
|
+
exact(manifest, [
|
|
29
|
+
"format",
|
|
30
|
+
"format_version",
|
|
31
|
+
"segment_id",
|
|
32
|
+
"source",
|
|
33
|
+
"payload",
|
|
34
|
+
"minimum_harnery_version",
|
|
35
|
+
"created_at",
|
|
36
|
+
]);
|
|
37
|
+
if (manifest.format !== "harnery-legacy-v1-segment" || manifest.format_version !== 1) {
|
|
38
|
+
throw new Error("legacy_v1_manifest_version_unsupported");
|
|
39
|
+
}
|
|
40
|
+
const segmentId = text(manifest.segment_id);
|
|
41
|
+
if (!/^v1s_[0-9a-f]{32}$/.test(segmentId)) throw new Error("legacy_v1_segment_id_invalid");
|
|
42
|
+
const source = object(manifest.source);
|
|
43
|
+
exact(source, [
|
|
44
|
+
"filename",
|
|
45
|
+
"bytes",
|
|
46
|
+
"digest",
|
|
47
|
+
"row_count",
|
|
48
|
+
"minimum_recorded_at",
|
|
49
|
+
"maximum_recorded_at",
|
|
50
|
+
]);
|
|
51
|
+
const filename = text(source.filename);
|
|
52
|
+
if (!/^events.+\.ndjson$/.test(filename) || filename.includes("/") || filename.includes("\\")) {
|
|
53
|
+
throw new Error("legacy_v1_source_filename_invalid");
|
|
54
|
+
}
|
|
55
|
+
const minimum = nullableTimestamp(source.minimum_recorded_at);
|
|
56
|
+
const maximum = nullableTimestamp(source.maximum_recorded_at);
|
|
57
|
+
if ((minimum === null) !== (maximum === null) || (minimum && maximum && minimum > maximum)) {
|
|
58
|
+
throw new Error("legacy_v1_manifest_time_range_invalid");
|
|
59
|
+
}
|
|
60
|
+
const payload = object(manifest.payload);
|
|
61
|
+
exact(payload, ["algorithm", "path", "bytes", "digest"]);
|
|
62
|
+
if (payload.algorithm !== "gzip" || payload.path !== `${segmentId}.ndjson.gz`) {
|
|
63
|
+
throw new Error("legacy_v1_payload_contract_invalid");
|
|
64
|
+
}
|
|
65
|
+
const version = text(manifest.minimum_harnery_version);
|
|
66
|
+
if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(version)) {
|
|
67
|
+
throw new Error("legacy_v1_minimum_version_invalid");
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
format: "harnery-legacy-v1-segment",
|
|
71
|
+
format_version: 1,
|
|
72
|
+
segment_id: segmentId as `v1s_${string}`,
|
|
73
|
+
source: {
|
|
74
|
+
filename,
|
|
75
|
+
bytes: integer(source.bytes),
|
|
76
|
+
digest: digest(source.digest),
|
|
77
|
+
row_count: integer(source.row_count),
|
|
78
|
+
minimum_recorded_at: minimum,
|
|
79
|
+
maximum_recorded_at: maximum,
|
|
80
|
+
},
|
|
81
|
+
payload: {
|
|
82
|
+
algorithm: "gzip",
|
|
83
|
+
path: text(payload.path),
|
|
84
|
+
bytes: integer(payload.bytes),
|
|
85
|
+
digest: digest(payload.digest),
|
|
86
|
+
},
|
|
87
|
+
minimum_harnery_version: version,
|
|
88
|
+
created_at: timestamp(manifest.created_at),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function object(value: unknown): Record<string, unknown> {
|
|
93
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
94
|
+
throw new Error("legacy_v1_manifest_object_invalid");
|
|
95
|
+
}
|
|
96
|
+
return value as Record<string, unknown>;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function exact(value: Record<string, unknown>, keys: string[]): void {
|
|
100
|
+
if (Object.keys(value).sort().join("\0") !== [...keys].sort().join("\0")) {
|
|
101
|
+
throw new Error("legacy_v1_manifest_unknown_field");
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function text(value: unknown): string {
|
|
106
|
+
if (typeof value !== "string") throw new Error("legacy_v1_manifest_string_invalid");
|
|
107
|
+
return value;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function integer(value: unknown): number {
|
|
111
|
+
if (!Number.isSafeInteger(value) || (value as number) < 0) {
|
|
112
|
+
throw new Error("legacy_v1_manifest_integer_invalid");
|
|
113
|
+
}
|
|
114
|
+
return value as number;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function digest(value: unknown): `sha256:${string}` {
|
|
118
|
+
const result = text(value);
|
|
119
|
+
if (!/^sha256:[0-9a-f]{64}$/.test(result)) throw new Error("legacy_v1_manifest_digest_invalid");
|
|
120
|
+
return result as `sha256:${string}`;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function timestamp(value: unknown): string {
|
|
124
|
+
const result = text(value);
|
|
125
|
+
if (
|
|
126
|
+
!/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d{3}Z$/.test(result) ||
|
|
127
|
+
!Number.isFinite(Date.parse(result))
|
|
128
|
+
) {
|
|
129
|
+
throw new Error("legacy_v1_manifest_timestamp_invalid");
|
|
130
|
+
}
|
|
131
|
+
return result;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function nullableTimestamp(value: unknown): string | null {
|
|
135
|
+
return value === null ? null : timestamp(value);
|
|
136
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { constants, createReadStream } from "node:fs";
|
|
3
|
+
import { lstat, open, realpath } from "node:fs/promises";
|
|
4
|
+
import { dirname, isAbsolute, relative, resolve } from "node:path";
|
|
5
|
+
import { createGunzip } from "node:zlib";
|
|
6
|
+
import { type LegacyV1SegmentManifest, validateLegacyV1SegmentManifest } from "./manifest.ts";
|
|
7
|
+
|
|
8
|
+
export interface LegacyV1LogicalRow {
|
|
9
|
+
row_number: number;
|
|
10
|
+
bytes: Buffer;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface LegacyV1ReaderLimits {
|
|
14
|
+
max_manifest_bytes?: number;
|
|
15
|
+
max_payload_bytes?: number;
|
|
16
|
+
max_decompressed_bytes?: number;
|
|
17
|
+
max_row_bytes?: number;
|
|
18
|
+
max_rows?: number;
|
|
19
|
+
fault?: (boundary: "after_source_digest", path: string) => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const DEFAULTS: Required<Omit<LegacyV1ReaderLimits, "fault">> = {
|
|
23
|
+
max_manifest_bytes: 1024 * 1024,
|
|
24
|
+
max_payload_bytes: 8 * 1024 * 1024 * 1024,
|
|
25
|
+
max_decompressed_bytes: 16 * 1024 * 1024 * 1024,
|
|
26
|
+
max_row_bytes: 64 * 1024 * 1024,
|
|
27
|
+
max_rows: 20_000_000,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** Stream rows from one loose sealed segment or one manifest-bound gzip canary. */
|
|
31
|
+
export async function* streamLegacyV1Rows(
|
|
32
|
+
sourcePath: string,
|
|
33
|
+
limits: LegacyV1ReaderLimits = {},
|
|
34
|
+
): AsyncGenerator<LegacyV1LogicalRow> {
|
|
35
|
+
const bounded = { ...DEFAULTS, ...limits };
|
|
36
|
+
const source = resolve(sourcePath);
|
|
37
|
+
let input = source;
|
|
38
|
+
let expectedRows: number | undefined;
|
|
39
|
+
let expectedSourceBytes: number | undefined;
|
|
40
|
+
let expectedSourceDigest: `sha256:${string}` | undefined;
|
|
41
|
+
let expectedPayloadBytes: number | undefined;
|
|
42
|
+
let expectedPayloadDigest: `sha256:${string}` | undefined;
|
|
43
|
+
let containmentRoot: string | undefined;
|
|
44
|
+
if (source.endsWith(".manifest.json")) {
|
|
45
|
+
const manifestHandle = await openStableRegularFile(source, undefined, "manifest");
|
|
46
|
+
let manifest: LegacyV1SegmentManifest;
|
|
47
|
+
try {
|
|
48
|
+
const stat = await manifestHandle.stat();
|
|
49
|
+
if (stat.size > bounded.max_manifest_bytes) throw new Error("legacy_v1_manifest_too_large");
|
|
50
|
+
manifest = validateLegacyV1SegmentManifest(
|
|
51
|
+
JSON.parse(await manifestHandle.readFile("utf8")) as unknown,
|
|
52
|
+
);
|
|
53
|
+
} finally {
|
|
54
|
+
await manifestHandle.close();
|
|
55
|
+
}
|
|
56
|
+
const directory = await realpath(dirname(source));
|
|
57
|
+
containmentRoot = directory;
|
|
58
|
+
input = resolve(directory, manifest.payload.path);
|
|
59
|
+
expectedRows = manifest.source.row_count;
|
|
60
|
+
expectedSourceBytes = manifest.source.bytes;
|
|
61
|
+
expectedSourceDigest = manifest.source.digest;
|
|
62
|
+
expectedPayloadBytes = manifest.payload.bytes;
|
|
63
|
+
expectedPayloadDigest = manifest.payload.digest;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const compressed = source.endsWith(".manifest.json") || source.endsWith(".gz");
|
|
67
|
+
const kind = source.endsWith(".manifest.json") ? "payload" : "segment";
|
|
68
|
+
const inputHandle = await openStableRegularFile(input, containmentRoot, kind);
|
|
69
|
+
try {
|
|
70
|
+
const inputStat = await inputHandle.stat();
|
|
71
|
+
if (source.endsWith(".manifest.json")) {
|
|
72
|
+
if (inputStat.size !== expectedPayloadBytes)
|
|
73
|
+
throw new Error("legacy_v1_payload_length_mismatch");
|
|
74
|
+
if (inputStat.size > bounded.max_payload_bytes)
|
|
75
|
+
throw new Error("legacy_v1_payload_too_large");
|
|
76
|
+
if ((await hashHandle(input, inputHandle)) !== expectedPayloadDigest) {
|
|
77
|
+
throw new Error("legacy_v1_payload_digest_mismatch");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
limits.fault?.("after_source_digest", input);
|
|
81
|
+
const file = createReadStream(input, { fd: inputHandle.fd, autoClose: false, start: 0 });
|
|
82
|
+
const stream = compressed ? file.pipe(createGunzip()) : file;
|
|
83
|
+
let pending: Buffer<ArrayBufferLike> = Buffer.alloc(0);
|
|
84
|
+
let rows = 0;
|
|
85
|
+
let decompressed = 0;
|
|
86
|
+
const sourceHash = createHash("sha256");
|
|
87
|
+
for await (const current of stream) {
|
|
88
|
+
const chunk = current as Buffer;
|
|
89
|
+
decompressed += chunk.length;
|
|
90
|
+
sourceHash.update(chunk);
|
|
91
|
+
if (decompressed > bounded.max_decompressed_bytes) {
|
|
92
|
+
throw new Error("legacy_v1_decompression_bound_exceeded");
|
|
93
|
+
}
|
|
94
|
+
pending = pending.length === 0 ? chunk : Buffer.concat([pending, chunk]);
|
|
95
|
+
if (pending.length > bounded.max_row_bytes && !pending.includes(0x0a)) {
|
|
96
|
+
throw new Error("legacy_v1_row_bound_exceeded");
|
|
97
|
+
}
|
|
98
|
+
let newline = pending.indexOf(0x0a);
|
|
99
|
+
while (newline >= 0) {
|
|
100
|
+
const row = pending.subarray(0, newline);
|
|
101
|
+
pending = pending.subarray(newline + 1);
|
|
102
|
+
if (row.length === 0) throw new Error("legacy_v1_empty_row");
|
|
103
|
+
if (row.length > bounded.max_row_bytes) throw new Error("legacy_v1_row_bound_exceeded");
|
|
104
|
+
rows += 1;
|
|
105
|
+
if (rows > bounded.max_rows) throw new Error("legacy_v1_row_count_bound_exceeded");
|
|
106
|
+
yield { row_number: rows, bytes: Buffer.from(row) };
|
|
107
|
+
newline = pending.indexOf(0x0a);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if (pending.length !== 0) throw new Error("legacy_v1_segment_unterminated_or_truncated");
|
|
111
|
+
if (expectedRows !== undefined && rows !== expectedRows)
|
|
112
|
+
throw new Error("legacy_v1_row_count_mismatch");
|
|
113
|
+
if (expectedSourceBytes !== undefined && decompressed !== expectedSourceBytes) {
|
|
114
|
+
throw new Error("legacy_v1_source_length_mismatch");
|
|
115
|
+
}
|
|
116
|
+
const digest = `sha256:${sourceHash.digest("hex")}`;
|
|
117
|
+
if (expectedSourceDigest !== undefined && digest !== expectedSourceDigest) {
|
|
118
|
+
throw new Error("legacy_v1_source_digest_mismatch");
|
|
119
|
+
}
|
|
120
|
+
} finally {
|
|
121
|
+
await inputHandle.close();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
async function hashHandle(
|
|
126
|
+
path: string,
|
|
127
|
+
handle: Awaited<ReturnType<typeof open>>,
|
|
128
|
+
): Promise<`sha256:${string}`> {
|
|
129
|
+
const hash = createHash("sha256");
|
|
130
|
+
const stream = createReadStream(path, { fd: handle.fd, autoClose: false, start: 0 });
|
|
131
|
+
for await (const current of stream) hash.update(current as Buffer);
|
|
132
|
+
return `sha256:${hash.digest("hex")}`;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
async function openStableRegularFile(
|
|
136
|
+
path: string,
|
|
137
|
+
containmentRoot: string | undefined,
|
|
138
|
+
kind: "manifest" | "payload" | "segment",
|
|
139
|
+
) {
|
|
140
|
+
const before = await lstat(path);
|
|
141
|
+
if (!before.isFile() || before.isSymbolicLink()) throw new Error(`legacy_v1_${kind}_not_regular`);
|
|
142
|
+
const beforeReal = await realpath(path);
|
|
143
|
+
if (containmentRoot) assertContained(containmentRoot, beforeReal);
|
|
144
|
+
const handle = await open(path, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0));
|
|
145
|
+
try {
|
|
146
|
+
const opened = await handle.stat();
|
|
147
|
+
const after = await lstat(path);
|
|
148
|
+
const afterReal = await realpath(path);
|
|
149
|
+
if (
|
|
150
|
+
!opened.isFile() ||
|
|
151
|
+
!after.isFile() ||
|
|
152
|
+
after.isSymbolicLink() ||
|
|
153
|
+
opened.dev !== before.dev ||
|
|
154
|
+
opened.ino !== before.ino ||
|
|
155
|
+
opened.dev !== after.dev ||
|
|
156
|
+
opened.ino !== after.ino ||
|
|
157
|
+
beforeReal !== afterReal
|
|
158
|
+
)
|
|
159
|
+
throw new Error(`legacy_v1_${kind}_changed_during_open`);
|
|
160
|
+
if (containmentRoot) assertContained(containmentRoot, afterReal);
|
|
161
|
+
return handle;
|
|
162
|
+
} catch (error) {
|
|
163
|
+
await handle.close();
|
|
164
|
+
throw error;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function assertContained(root: string, candidate: string): void {
|
|
169
|
+
const path = relative(root, candidate);
|
|
170
|
+
if (
|
|
171
|
+
path === "" ||
|
|
172
|
+
(path !== ".." &&
|
|
173
|
+
!path.startsWith(`..${process.platform === "win32" ? "\\" : "/"}`) &&
|
|
174
|
+
!isAbsolute(path))
|
|
175
|
+
)
|
|
176
|
+
return;
|
|
177
|
+
throw new Error("legacy_v1_payload_escape");
|
|
178
|
+
}
|
|
@@ -14,9 +14,15 @@ import { join } from "node:path";
|
|
|
14
14
|
import { fsyncParentDirectory } from "../../workflow/durable-record.ts";
|
|
15
15
|
import { canonicalJsonV3, sha256V3 } from "./canonical.ts";
|
|
16
16
|
import type { EventV3 } from "./contract.ts";
|
|
17
|
+
import { liveGenesisIdV3 } from "./control.ts";
|
|
17
18
|
import { assertEventV3 } from "./validate.ts";
|
|
18
19
|
import { ensureEventV3Layout, eventV3Paths, writeEventV3 } from "./writer.ts";
|
|
19
20
|
|
|
21
|
+
export interface AuthorityEpochFenceV3 {
|
|
22
|
+
/** Genesis id of the epoch the transaction's event was produced for. */
|
|
23
|
+
expectedGenesisId?: `gex_${string}`;
|
|
24
|
+
}
|
|
25
|
+
|
|
20
26
|
const SHA256_PATTERN = /^sha256:[a-f0-9]{64}$/;
|
|
21
27
|
const INSTANCE_PATTERN = /^inst_[a-zA-Z0-9._-]{1,128}$/;
|
|
22
28
|
const TX_PATTERN = /^txn_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
|
|
@@ -146,9 +152,13 @@ export function buildAuthorityTransactionV3(
|
|
|
146
152
|
export function publishAuthorityTransactionV3(
|
|
147
153
|
coordRoot: string,
|
|
148
154
|
transaction: AuthorityTransactionV3,
|
|
155
|
+
fence: AuthorityEpochFenceV3 = {},
|
|
149
156
|
): AuthorityTransactionV3 {
|
|
150
157
|
validateTransaction(transaction);
|
|
151
158
|
const paths = ensureEventV3Layout(coordRoot);
|
|
159
|
+
if (fence.expectedGenesisId && liveGenesisIdV3(coordRoot) !== fence.expectedGenesisId) {
|
|
160
|
+
throw new Error("authority transaction epoch was replaced before publication");
|
|
161
|
+
}
|
|
152
162
|
const readyPath = authorityReadyPath(paths.authorityOutbox, transaction.transaction_id);
|
|
153
163
|
const serialized = `${canonicalJsonV3(transaction)}\n`;
|
|
154
164
|
if (existsSync(readyPath)) {
|
|
@@ -173,6 +183,7 @@ export function reconcileAuthorityTransactionV3(
|
|
|
173
183
|
coordRoot: string,
|
|
174
184
|
transactionId: string,
|
|
175
185
|
reconciler: AuthorityReconcilerV3,
|
|
186
|
+
fence: AuthorityEpochFenceV3 = {},
|
|
176
187
|
): AuthorityReceiptV3 {
|
|
177
188
|
assertTransactionId(transactionId);
|
|
178
189
|
const paths = ensureEventV3Layout(coordRoot);
|
|
@@ -191,7 +202,12 @@ export function reconcileAuthorityTransactionV3(
|
|
|
191
202
|
}
|
|
192
203
|
const event = JSON.parse(transaction.event_row) as unknown;
|
|
193
204
|
assertEventV3(event);
|
|
194
|
-
writeEventV3(coordRoot, event
|
|
205
|
+
const durability = writeEventV3(coordRoot, event, {
|
|
206
|
+
...(fence.expectedGenesisId ? { expectedGenesisId: fence.expectedGenesisId } : {}),
|
|
207
|
+
});
|
|
208
|
+
if (durability.state === "epoch_replaced") {
|
|
209
|
+
throw new Error("authority transaction epoch was replaced before its event committed");
|
|
210
|
+
}
|
|
195
211
|
const receipt: AuthorityReceiptV3 = {
|
|
196
212
|
format: "harnery-event-v3-authority-receipt",
|
|
197
213
|
format_version: 1,
|
|
@@ -222,6 +238,11 @@ export function listPendingAuthorityTransactionsV3(coordRoot: string): Authority
|
|
|
222
238
|
.map((name) => readAuthorityTransactionV3(join(outbox, name)));
|
|
223
239
|
}
|
|
224
240
|
|
|
241
|
+
export function authorityRecoveryIntentPathV3(coordRoot: string, transactionId: string): string {
|
|
242
|
+
assertTransactionId(transactionId);
|
|
243
|
+
return join(eventV3Paths(coordRoot).root, "authority-recoveries", `${transactionId}.ready.json`);
|
|
244
|
+
}
|
|
245
|
+
|
|
225
246
|
export function readAuthorityTransactionV3(path: string): AuthorityTransactionV3 {
|
|
226
247
|
const serialized = readFileSync(path, "utf8");
|
|
227
248
|
let parsed: unknown;
|
|
@@ -100,6 +100,26 @@ export function ObservationV3BaseSchema<T extends TSchema>(value: T) {
|
|
|
100
100
|
]);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
const RuntimeTelemetryCapabilityValueV3BaseSchema = StrictObject({
|
|
104
|
+
support: Type.Union([
|
|
105
|
+
Type.Literal("native"),
|
|
106
|
+
Type.Literal("derived"),
|
|
107
|
+
Type.Literal("conditional"),
|
|
108
|
+
]),
|
|
109
|
+
source: SafeToken,
|
|
110
|
+
completeness: Type.Union([
|
|
111
|
+
Type.Literal("exact"),
|
|
112
|
+
Type.Literal("inferred"),
|
|
113
|
+
Type.Literal("percentage_only"),
|
|
114
|
+
Type.Literal("lower_bound"),
|
|
115
|
+
Type.Literal("unknown"),
|
|
116
|
+
]),
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
const RuntimeTelemetryCapabilityObservationV3BaseSchema = ObservationV3BaseSchema(
|
|
120
|
+
RuntimeTelemetryCapabilityValueV3BaseSchema,
|
|
121
|
+
);
|
|
122
|
+
|
|
103
123
|
export const RuntimeAttestationV3BaseSchema = StrictObject({
|
|
104
124
|
attestation_id: AttestationId,
|
|
105
125
|
generation_id: GenerationId,
|
|
@@ -110,6 +130,27 @@ export const RuntimeAttestationV3BaseSchema = StrictObject({
|
|
|
110
130
|
StrictObject({ id: SafeToken, version: Type.Optional(SafeToken) }),
|
|
111
131
|
),
|
|
112
132
|
model: ObservationV3BaseSchema(StrictObject({ provider: SafeToken, id: SafeToken })),
|
|
133
|
+
/** Runtime tuning identity: the effort dial (and speed tier where the
|
|
134
|
+
* runtime reports one). `observed` with a missing `effort` never occurs —
|
|
135
|
+
* a runtime that proved the model has no dial attests `unsupported` with
|
|
136
|
+
* capability `effort_selection` instead. Values pass through verbatim
|
|
137
|
+
* (`low`…`max`, `standard`/`fast`); display labels are a renderer concern. */
|
|
138
|
+
tuning: ObservationV3BaseSchema(
|
|
139
|
+
StrictObject({
|
|
140
|
+
effort: Type.Optional(SafeToken),
|
|
141
|
+
speed: Type.Optional(SafeToken),
|
|
142
|
+
}),
|
|
143
|
+
),
|
|
144
|
+
/** Effective telemetry support proven for this runtime session. This is
|
|
145
|
+
* intentionally separate from the static capability profile digest: a
|
|
146
|
+
* missing or late local source changes evidence, not the gated profile. */
|
|
147
|
+
telemetry: StrictObject({
|
|
148
|
+
context_usage: RuntimeTelemetryCapabilityObservationV3BaseSchema,
|
|
149
|
+
wait_spans: RuntimeTelemetryCapabilityObservationV3BaseSchema,
|
|
150
|
+
wait_completeness: RuntimeTelemetryCapabilityObservationV3BaseSchema,
|
|
151
|
+
response_latency: RuntimeTelemetryCapabilityObservationV3BaseSchema,
|
|
152
|
+
inference_timing: RuntimeTelemetryCapabilityObservationV3BaseSchema,
|
|
153
|
+
}),
|
|
113
154
|
capability_profile: Type.String({ pattern: "^cap_[a-f0-9]{64}$" }),
|
|
114
155
|
declared_by_event_id: EventId,
|
|
115
156
|
});
|
|
@@ -391,13 +432,21 @@ const AuthorityReferenceSchema = StrictObject({
|
|
|
391
432
|
record_id: Type.Optional(SafeToken),
|
|
392
433
|
});
|
|
393
434
|
|
|
394
|
-
const MeasurementSchema =
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
435
|
+
const MeasurementSchema = Type.Union([
|
|
436
|
+
StrictObject({
|
|
437
|
+
used_tokens: Type.Integer({ minimum: 0 }),
|
|
438
|
+
limit_tokens: Type.Integer({ minimum: 1 }),
|
|
439
|
+
remaining_tokens: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
440
|
+
measured_at: Timestamp,
|
|
441
|
+
method: SafeToken,
|
|
442
|
+
}),
|
|
443
|
+
StrictObject({
|
|
444
|
+
used_percent: Type.Number({ minimum: 0, maximum: 100 }),
|
|
445
|
+
remaining_percent: Type.Optional(Type.Number({ minimum: 0, maximum: 100 })),
|
|
446
|
+
measured_at: Timestamp,
|
|
447
|
+
method: SafeToken,
|
|
448
|
+
}),
|
|
449
|
+
]);
|
|
401
450
|
|
|
402
451
|
const ArtifactReferenceSchema = StrictObject({
|
|
403
452
|
artifact_id: Type.String({ pattern: "^art_[a-zA-Z0-9._-]{1,128}$" }),
|