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,419 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { closeSync, existsSync, constants as fsConstants, lstatSync, openSync, readdirSync, readFileSync, realpathSync, unlinkSync, } from "node:fs";
|
|
3
|
+
import { basename, dirname, isAbsolute, join, relative } from "node:path";
|
|
4
|
+
import { HARNERY_STRUCTURED_LOG_PROVIDER_ID, } from "./contract.js";
|
|
5
|
+
import { familyLogDirectory, logManifestFingerprint, pruneSealedLogSegment, readSegmentManifest, withFamilyLease, } from "./segments.js";
|
|
6
|
+
export const STRUCTURED_LOG_RETENTION_SCOPE = "structured-log-retention";
|
|
7
|
+
/** Read-only, non-creating inspection for command and maintenance callers. */
|
|
8
|
+
export function inspectStructuredLogRetention(family, now = new Date()) {
|
|
9
|
+
const usage = {
|
|
10
|
+
managed_bytes: 0,
|
|
11
|
+
unmanaged_bytes: 0,
|
|
12
|
+
managed_files: 0,
|
|
13
|
+
unmanaged_files: 0,
|
|
14
|
+
};
|
|
15
|
+
const reasons = new Set();
|
|
16
|
+
const effective = family.effective_log_retention;
|
|
17
|
+
const policy = effective?.state === "valid"
|
|
18
|
+
? {
|
|
19
|
+
max_bytes: effective.max_bytes,
|
|
20
|
+
max_age_ms: effective.max_age_ms,
|
|
21
|
+
fingerprint: effective.effective_policy_fingerprint,
|
|
22
|
+
sources: {
|
|
23
|
+
max_bytes: effective.provenance.max_bytes.source,
|
|
24
|
+
max_age_ms: effective.provenance.max_age_days.source,
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
: null;
|
|
28
|
+
if (!structuredSegmentCapable(family)) {
|
|
29
|
+
return result(family.id, policy, usage, "unmanaged", "none", ["unsupported_log_family"]);
|
|
30
|
+
}
|
|
31
|
+
if (!policy) {
|
|
32
|
+
return result(family.id, null, usage, "blocked", "none", ["effective_policy_invalid"]);
|
|
33
|
+
}
|
|
34
|
+
const directory = familyLogDirectory(family);
|
|
35
|
+
if (!existsSync(directory)) {
|
|
36
|
+
return result(family.id, policy, usage, "active", "manual", ["root_dormant"]);
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
const root = lstatSync(directory);
|
|
40
|
+
if (!root.isDirectory() || root.isSymbolicLink()) {
|
|
41
|
+
return result(family.id, policy, usage, "blocked", "none", ["unsafe_family_root"]);
|
|
42
|
+
}
|
|
43
|
+
const manifest = readSegmentManifest(directory, family);
|
|
44
|
+
const knownRootFiles = new Set(["active.jsonl", "manifest.json", "metrics.json"]);
|
|
45
|
+
for (const name of knownRootFiles)
|
|
46
|
+
accountKnownFile(join(directory, name), usage, reasons);
|
|
47
|
+
const listed = new Set(manifest.segments.map(({ file }) => file));
|
|
48
|
+
const segments = [];
|
|
49
|
+
for (const segment of manifest.segments) {
|
|
50
|
+
const path = join(directory, ...segment.file.split("/"));
|
|
51
|
+
const observed = safeRegularFile(path);
|
|
52
|
+
if (!observed.safe) {
|
|
53
|
+
reasons.add(observed.reason ?? "missing_manifest_segment");
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
usage.managed_bytes += observed.bytes;
|
|
57
|
+
usage.managed_files += 1;
|
|
58
|
+
segments.push({
|
|
59
|
+
sequence: segment.sequence,
|
|
60
|
+
file: segment.file,
|
|
61
|
+
actual_bytes: observed.bytes,
|
|
62
|
+
content_sha256: segment.sha256,
|
|
63
|
+
sealed_at: segment.sealed_at,
|
|
64
|
+
age_expired: now.getTime() - Date.parse(segment.sealed_at) >= policy.max_age_ms,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
accountUnknownSegmentFiles(directory, listed, usage, reasons);
|
|
68
|
+
const snapshots = accountManifestSnapshots(directory, manifest.next_sequence, usage, reasons);
|
|
69
|
+
accountUnknownRootFiles(directory, knownRootFiles, usage);
|
|
70
|
+
accountLeaseFiles(directory, usage, reasons);
|
|
71
|
+
const blocker = [...reasons].some((reason) => [
|
|
72
|
+
"unsafe_family_root",
|
|
73
|
+
"unsafe_managed_path",
|
|
74
|
+
"hard_link_ambiguous",
|
|
75
|
+
"missing_manifest_segment",
|
|
76
|
+
"manifest_invalid",
|
|
77
|
+
"recovery_breadcrumb_present",
|
|
78
|
+
].includes(reason));
|
|
79
|
+
const ageExpired = segments.some(({ age_expired }) => age_expired);
|
|
80
|
+
const bytesOver = Math.max(0, usage.managed_bytes - policy.max_bytes);
|
|
81
|
+
if (usage.unmanaged_bytes > 0)
|
|
82
|
+
reasons.add("unmanaged_bytes_present");
|
|
83
|
+
if (bytesOver > 0)
|
|
84
|
+
reasons.add("managed_bytes_exceed_budget");
|
|
85
|
+
if (ageExpired)
|
|
86
|
+
reasons.add("age_expired");
|
|
87
|
+
return {
|
|
88
|
+
family_id: family.id,
|
|
89
|
+
effective_policy: policy,
|
|
90
|
+
usage: { ...usage, total_bytes: usage.managed_bytes + usage.unmanaged_bytes },
|
|
91
|
+
pressure: {
|
|
92
|
+
state: blocker ? "unknown" : bytesOver > 0 || ageExpired ? "over_budget" : "within_budget",
|
|
93
|
+
ratio: blocker ? null : usage.managed_bytes / policy.max_bytes,
|
|
94
|
+
bytes_over: blocker ? null : bytesOver,
|
|
95
|
+
reason_codes: [...reasons].sort(),
|
|
96
|
+
},
|
|
97
|
+
retention: {
|
|
98
|
+
state: blocker ? "blocked" : "active",
|
|
99
|
+
enforcement: blocker ? "none" : "manual",
|
|
100
|
+
reason_codes: [...reasons].sort(),
|
|
101
|
+
},
|
|
102
|
+
sealed_segments: segments,
|
|
103
|
+
obsolete_snapshots: snapshots.filter(({ recovery_breadcrumb }) => !recovery_breadcrumb),
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
catch {
|
|
107
|
+
return result(family.id, policy, usage, "blocked", "none", ["manifest_invalid"]);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
export function createStructuredLogRetentionProvider(family) {
|
|
111
|
+
if (!structuredSegmentCapable(family)) {
|
|
112
|
+
throw new Error(`family ${family.id} is not manifest-backed structured log storage`);
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
family_id: family.id,
|
|
116
|
+
destructive_scope: STRUCTURED_LOG_RETENTION_SCOPE,
|
|
117
|
+
plan: ({ budget, now }) => {
|
|
118
|
+
const inspection = inspectStructuredLogRetention(family, now);
|
|
119
|
+
if (inspection.retention.state !== "active" ||
|
|
120
|
+
!inspection.effective_policy ||
|
|
121
|
+
inspection.pressure.state === "unknown") {
|
|
122
|
+
return { actions: [] };
|
|
123
|
+
}
|
|
124
|
+
const actions = [];
|
|
125
|
+
let files = 0;
|
|
126
|
+
let bytes = 0;
|
|
127
|
+
const add = (action) => {
|
|
128
|
+
if (files + action.files > budget.max_files || bytes + action.bytes > budget.max_bytes) {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
actions.push(action);
|
|
132
|
+
files += action.files;
|
|
133
|
+
bytes += action.bytes;
|
|
134
|
+
return true;
|
|
135
|
+
};
|
|
136
|
+
for (const snapshot of inspection.obsolete_snapshots) {
|
|
137
|
+
const path = join(familyLogDirectory(family), ...snapshot.file.split("/"));
|
|
138
|
+
if (!add(retentionAction(family, inspection.effective_policy.fingerprint, {
|
|
139
|
+
action_id: `snapshot-${basename(snapshot.file, ".json")}`,
|
|
140
|
+
kind: "prune-log-manifest-snapshot",
|
|
141
|
+
target_ref: snapshot.file,
|
|
142
|
+
files: 1,
|
|
143
|
+
bytes: snapshot.actual_bytes,
|
|
144
|
+
expected_sha256: sha256File(path),
|
|
145
|
+
}))) {
|
|
146
|
+
return { actions };
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
let projected = inspection.usage.managed_bytes - actions.reduce((sum, x) => sum + x.bytes, 0);
|
|
150
|
+
let predictedManifest = readSegmentManifest(familyLogDirectory(family), family);
|
|
151
|
+
for (const segment of inspection.sealed_segments) {
|
|
152
|
+
if (!segment.age_expired && projected <= inspection.effective_policy.max_bytes)
|
|
153
|
+
break;
|
|
154
|
+
const path = join(familyLogDirectory(family), ...segment.file.split("/"));
|
|
155
|
+
const expectedManifestFingerprint = logManifestFingerprint(predictedManifest);
|
|
156
|
+
const nextManifest = {
|
|
157
|
+
...predictedManifest,
|
|
158
|
+
pruned_through_sequence: segment.sequence,
|
|
159
|
+
segments: predictedManifest.segments.slice(1),
|
|
160
|
+
};
|
|
161
|
+
const action = retentionAction(family, inspection.effective_policy.fingerprint, {
|
|
162
|
+
action_id: `segment-${String(segment.sequence).padStart(8, "0")}`,
|
|
163
|
+
kind: "prune-log-segment",
|
|
164
|
+
target_ref: segment.file,
|
|
165
|
+
files: 1,
|
|
166
|
+
bytes: segment.actual_bytes,
|
|
167
|
+
expected_sha256: sha256File(path),
|
|
168
|
+
metadata: {
|
|
169
|
+
sequence: segment.sequence,
|
|
170
|
+
content_sha256: segment.content_sha256,
|
|
171
|
+
expected_manifest_fingerprint: expectedManifestFingerprint,
|
|
172
|
+
result_manifest_fingerprint: logManifestFingerprint(nextManifest),
|
|
173
|
+
},
|
|
174
|
+
});
|
|
175
|
+
if (!add(action))
|
|
176
|
+
break;
|
|
177
|
+
predictedManifest = nextManifest;
|
|
178
|
+
projected -= segment.actual_bytes;
|
|
179
|
+
}
|
|
180
|
+
return { actions };
|
|
181
|
+
},
|
|
182
|
+
apply: async ({ action }) => {
|
|
183
|
+
const current = family.effective_log_retention;
|
|
184
|
+
if (current?.state !== "valid" ||
|
|
185
|
+
action.authorization_scope !== STRUCTURED_LOG_RETENTION_SCOPE ||
|
|
186
|
+
action.effective_policy_fingerprint !== current.effective_policy_fingerprint) {
|
|
187
|
+
return { outcome: "refused", detail: "effective log retention policy changed" };
|
|
188
|
+
}
|
|
189
|
+
if (action.kind === "prune-log-segment") {
|
|
190
|
+
const sequence = Number(action.metadata?.sequence);
|
|
191
|
+
const contentSha256 = String(action.metadata?.content_sha256 ?? "");
|
|
192
|
+
const expectedManifestFingerprint = String(action.metadata?.expected_manifest_fingerprint ?? "");
|
|
193
|
+
const resultManifestFingerprint = String(action.metadata?.result_manifest_fingerprint ?? "");
|
|
194
|
+
const outcome = await pruneSealedLogSegment({
|
|
195
|
+
directory: familyLogDirectory(family),
|
|
196
|
+
family,
|
|
197
|
+
sequence,
|
|
198
|
+
file: action.target_ref,
|
|
199
|
+
expected_bytes: action.bytes,
|
|
200
|
+
expected_file_sha256: action.expected_sha256 ?? "",
|
|
201
|
+
expected_content_sha256: contentSha256,
|
|
202
|
+
expected_manifest_fingerprint: expectedManifestFingerprint,
|
|
203
|
+
result_manifest_fingerprint: resultManifestFingerprint,
|
|
204
|
+
});
|
|
205
|
+
return { outcome };
|
|
206
|
+
}
|
|
207
|
+
if (action.kind === "prune-log-manifest-snapshot") {
|
|
208
|
+
return {
|
|
209
|
+
outcome: await pruneObsoleteSnapshot(family, action.target_ref, action.bytes, action.expected_sha256 ?? ""),
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
return { outcome: "refused", detail: "unsupported structured-log retention action" };
|
|
213
|
+
},
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
function structuredSegmentCapable(family) {
|
|
217
|
+
return (family.provider.provider_id === HARNERY_STRUCTURED_LOG_PROVIDER_ID &&
|
|
218
|
+
(family.storage_class === "operational-log" || family.storage_class === "debug-log") &&
|
|
219
|
+
family.format === "jsonl" &&
|
|
220
|
+
family.resolved_roots.some((root) => root.match === "provider-partition" && root.ownership !== "external"));
|
|
221
|
+
}
|
|
222
|
+
function retentionAction(family, fingerprint, action) {
|
|
223
|
+
return {
|
|
224
|
+
...action,
|
|
225
|
+
family_id: family.id,
|
|
226
|
+
destructive: true,
|
|
227
|
+
authorization_scope: STRUCTURED_LOG_RETENTION_SCOPE,
|
|
228
|
+
effective_policy_fingerprint: fingerprint,
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
async function pruneObsoleteSnapshot(family, relativePath, expectedBytes, expectedSha256) {
|
|
232
|
+
if (!/^manifests\/[0-9]{8}\.json$/.test(relativePath)) {
|
|
233
|
+
throw new Error("invalid log manifest snapshot target");
|
|
234
|
+
}
|
|
235
|
+
const directory = familyLogDirectory(family);
|
|
236
|
+
return withFamilyLease(directory, {
|
|
237
|
+
lease_timeout_ms: family.lease_policy?.acquisition_timeout_ms ?? 2_000,
|
|
238
|
+
lease_retry_ms: family.lease_policy?.retry_backoff_ms ?? 10,
|
|
239
|
+
lease_stale_ms: family.lease_policy?.stale_owner_ms ?? 30_000,
|
|
240
|
+
}, () => {
|
|
241
|
+
const manifest = readSegmentManifest(directory, family);
|
|
242
|
+
const sequence = Number(basename(relativePath, ".json"));
|
|
243
|
+
if (sequence >= manifest.next_sequence) {
|
|
244
|
+
throw new Error("log retention preserves an uncommitted recovery breadcrumb");
|
|
245
|
+
}
|
|
246
|
+
const path = join(directory, ...relativePath.split("/"));
|
|
247
|
+
if (!existsSync(path))
|
|
248
|
+
return "already_applied";
|
|
249
|
+
assertExactFile(path, expectedBytes, expectedSha256);
|
|
250
|
+
unlinkSync(path);
|
|
251
|
+
return "applied";
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
function result(familyId, policy, usage, state, enforcement, reasons) {
|
|
255
|
+
return {
|
|
256
|
+
family_id: familyId,
|
|
257
|
+
effective_policy: policy,
|
|
258
|
+
usage: { ...usage, total_bytes: usage.managed_bytes + usage.unmanaged_bytes },
|
|
259
|
+
pressure: {
|
|
260
|
+
state: state === "active" ? "within_budget" : "unknown",
|
|
261
|
+
ratio: state === "active" && policy ? 0 : null,
|
|
262
|
+
bytes_over: state === "active" && policy ? 0 : null,
|
|
263
|
+
reason_codes: [...new Set(reasons)].sort(),
|
|
264
|
+
},
|
|
265
|
+
retention: {
|
|
266
|
+
state,
|
|
267
|
+
enforcement,
|
|
268
|
+
reason_codes: [...new Set(reasons)].sort(),
|
|
269
|
+
},
|
|
270
|
+
sealed_segments: [],
|
|
271
|
+
obsolete_snapshots: [],
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
function accountKnownFile(path, usage, reasons) {
|
|
275
|
+
if (!existsSync(path))
|
|
276
|
+
return;
|
|
277
|
+
const observed = safeRegularFile(path);
|
|
278
|
+
if (!observed.safe) {
|
|
279
|
+
reasons.add(observed.reason ?? "unsafe_managed_path");
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
usage.managed_bytes += observed.bytes;
|
|
283
|
+
usage.managed_files += 1;
|
|
284
|
+
}
|
|
285
|
+
function accountUnknownSegmentFiles(directory, listed, usage, reasons) {
|
|
286
|
+
const root = join(directory, "segments");
|
|
287
|
+
if (!existsSync(root))
|
|
288
|
+
return;
|
|
289
|
+
const stat = lstatSync(root);
|
|
290
|
+
if (stat.isSymbolicLink() || !stat.isDirectory()) {
|
|
291
|
+
reasons.add("unsafe_managed_path");
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
for (const entry of readdirSync(root, { withFileTypes: true })) {
|
|
295
|
+
const relativePath = `segments/${entry.name}`;
|
|
296
|
+
if (listed.has(relativePath))
|
|
297
|
+
continue;
|
|
298
|
+
accountUnmanaged(join(root, entry.name), usage);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
function accountManifestSnapshots(directory, nextSequence, usage, reasons) {
|
|
302
|
+
const root = join(directory, "manifests");
|
|
303
|
+
if (!existsSync(root))
|
|
304
|
+
return [];
|
|
305
|
+
const rootStat = lstatSync(root);
|
|
306
|
+
if (rootStat.isSymbolicLink() || !rootStat.isDirectory()) {
|
|
307
|
+
reasons.add("unsafe_managed_path");
|
|
308
|
+
return [];
|
|
309
|
+
}
|
|
310
|
+
const entries = readdirSync(root, { withFileTypes: true });
|
|
311
|
+
for (const entry of entries) {
|
|
312
|
+
if (!entry.isFile() || !/^[0-9]{8}\.json$/.test(entry.name)) {
|
|
313
|
+
accountUnmanaged(join(root, entry.name), usage);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
const names = entries
|
|
317
|
+
.filter((entry) => entry.isFile() && /^[0-9]{8}\.json$/.test(entry.name))
|
|
318
|
+
.map((entry) => `manifests/${entry.name}`)
|
|
319
|
+
.sort();
|
|
320
|
+
return names.flatMap((relativePath) => {
|
|
321
|
+
const observed = safeRegularFile(join(directory, ...relativePath.split("/")));
|
|
322
|
+
if (!observed.safe) {
|
|
323
|
+
reasons.add(observed.reason ?? "unsafe_managed_path");
|
|
324
|
+
return [];
|
|
325
|
+
}
|
|
326
|
+
usage.managed_bytes += observed.bytes;
|
|
327
|
+
usage.managed_files += 1;
|
|
328
|
+
const recoveryBreadcrumb = Number(basename(relativePath, ".json")) >= nextSequence;
|
|
329
|
+
if (recoveryBreadcrumb)
|
|
330
|
+
reasons.add("recovery_breadcrumb_present");
|
|
331
|
+
return [
|
|
332
|
+
{
|
|
333
|
+
file: relativePath,
|
|
334
|
+
actual_bytes: observed.bytes,
|
|
335
|
+
recovery_breadcrumb: recoveryBreadcrumb,
|
|
336
|
+
},
|
|
337
|
+
];
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
function accountUnknownRootFiles(directory, known, usage) {
|
|
341
|
+
for (const entry of readdirSync(directory, { withFileTypes: true })) {
|
|
342
|
+
if (known.has(entry.name) || ["segments", "manifests", ".append-lease"].includes(entry.name)) {
|
|
343
|
+
continue;
|
|
344
|
+
}
|
|
345
|
+
accountUnmanaged(join(directory, entry.name), usage);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
function accountLeaseFiles(directory, usage, reasons) {
|
|
349
|
+
const lease = join(directory, ".append-lease");
|
|
350
|
+
if (!existsSync(lease))
|
|
351
|
+
return;
|
|
352
|
+
try {
|
|
353
|
+
const stat = lstatSync(lease);
|
|
354
|
+
if (!stat.isDirectory() || stat.isSymbolicLink()) {
|
|
355
|
+
reasons.add("unsafe_managed_path");
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
for (const entry of readdirSync(lease, { withFileTypes: true })) {
|
|
359
|
+
accountKnownFile(join(lease, entry.name), usage, reasons);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
catch {
|
|
363
|
+
// A writer may release the lease during this read-only observation.
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
function accountUnmanaged(path, usage) {
|
|
367
|
+
try {
|
|
368
|
+
const stat = lstatSync(path);
|
|
369
|
+
if (stat.isFile() && !stat.isSymbolicLink())
|
|
370
|
+
usage.unmanaged_bytes += stat.size;
|
|
371
|
+
usage.unmanaged_files += 1;
|
|
372
|
+
}
|
|
373
|
+
catch {
|
|
374
|
+
// Concurrent disappearance contributes no retained bytes.
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
function safeRegularFile(path) {
|
|
378
|
+
try {
|
|
379
|
+
const stat = lstatSync(path);
|
|
380
|
+
if (stat.isSymbolicLink() || !stat.isFile()) {
|
|
381
|
+
return { safe: false, bytes: 0, reason: "unsafe_managed_path" };
|
|
382
|
+
}
|
|
383
|
+
if (stat.nlink !== 1)
|
|
384
|
+
return { safe: false, bytes: 0, reason: "hard_link_ambiguous" };
|
|
385
|
+
return { safe: true, bytes: stat.size };
|
|
386
|
+
}
|
|
387
|
+
catch (error) {
|
|
388
|
+
return {
|
|
389
|
+
safe: false,
|
|
390
|
+
bytes: 0,
|
|
391
|
+
reason: error.code === "ENOENT"
|
|
392
|
+
? "missing_manifest_segment"
|
|
393
|
+
: "unsafe_managed_path",
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
function assertExactFile(path, expectedBytes, expectedSha256) {
|
|
398
|
+
const observed = safeRegularFile(path);
|
|
399
|
+
if (!observed.safe)
|
|
400
|
+
throw new Error(observed.reason ?? "unsafe log retention source");
|
|
401
|
+
if (observed.bytes !== expectedBytes)
|
|
402
|
+
throw new Error("log retention source size changed");
|
|
403
|
+
if (sha256File(path) !== expectedSha256)
|
|
404
|
+
throw new Error("log retention source digest changed");
|
|
405
|
+
}
|
|
406
|
+
function sha256File(path) {
|
|
407
|
+
const parent = realpathSync(dirname(path));
|
|
408
|
+
const fd = openSync(path, fsConstants.O_RDONLY | (fsConstants.O_NOFOLLOW ?? 0));
|
|
409
|
+
try {
|
|
410
|
+
const actual = realpathSync(path);
|
|
411
|
+
const rel = relative(parent, actual);
|
|
412
|
+
if (rel.startsWith("..") || isAbsolute(rel))
|
|
413
|
+
throw new Error("log retention path escaped");
|
|
414
|
+
return createHash("sha256").update(readFileSync(fd)).digest("hex");
|
|
415
|
+
}
|
|
416
|
+
finally {
|
|
417
|
+
closeSync(fd);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { type HarneryStorageCatalog } from "./catalog.js";
|
|
2
|
+
import type { HarneryLoggerBinding, HarneryLogLevel, HarneryRegisteredStorageFamily } from "./contract.js";
|
|
3
|
+
import { type HarneryLazyFields, type HarneryLogContext, type HarneryLogFields, type HarneryLogRecordV1 } from "./jsonl.js";
|
|
4
|
+
export interface HarneryLogger {
|
|
5
|
+
isEnabled(level: HarneryLogLevel): boolean;
|
|
6
|
+
child(context: HarneryLogContext): HarneryLogger;
|
|
7
|
+
trace(event: string, fields?: HarneryLazyFields, error?: unknown): void;
|
|
8
|
+
debug(event: string, fields?: HarneryLazyFields, error?: unknown): void;
|
|
9
|
+
info(event: string, fields?: HarneryLazyFields, error?: unknown): void;
|
|
10
|
+
warn(event: string, fields?: HarneryLazyFields, error?: unknown): void;
|
|
11
|
+
error(event: string, fields?: HarneryLazyFields, error?: unknown): void;
|
|
12
|
+
fatal(event: string, fields?: HarneryLazyFields, error?: unknown): void;
|
|
13
|
+
flush(options?: {
|
|
14
|
+
durability?: "memory" | "disk";
|
|
15
|
+
}): Promise<void>;
|
|
16
|
+
close(): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export interface HarneryLoggerRuntime {
|
|
19
|
+
logger(componentId: string, context?: HarneryLogContext): HarneryLogger;
|
|
20
|
+
flush(options?: {
|
|
21
|
+
durability?: "memory" | "disk";
|
|
22
|
+
}): Promise<void>;
|
|
23
|
+
close(): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
export interface HarneryLogLevelConfig {
|
|
26
|
+
default?: HarneryLogLevel;
|
|
27
|
+
families?: Readonly<Record<string, HarneryLogLevel>>;
|
|
28
|
+
components?: Readonly<Record<string, HarneryLogLevel>>;
|
|
29
|
+
}
|
|
30
|
+
export type HarneryLogEnvironment = Readonly<Record<string, string | undefined>>;
|
|
31
|
+
export declare class HarneryUnsupportedDurabilityError extends Error {
|
|
32
|
+
readonly familyId: string;
|
|
33
|
+
constructor(familyId: string);
|
|
34
|
+
}
|
|
35
|
+
export declare function createFileLoggerRuntime(options: {
|
|
36
|
+
catalog: HarneryStorageCatalog;
|
|
37
|
+
bindings?: readonly HarneryLoggerBinding[];
|
|
38
|
+
level_config?: HarneryLogLevelConfig;
|
|
39
|
+
env?: HarneryLogEnvironment;
|
|
40
|
+
strict_levels?: boolean;
|
|
41
|
+
}): HarneryLoggerRuntime;
|
|
42
|
+
export declare function createInMemoryLoggerRuntime(options: {
|
|
43
|
+
catalog: HarneryStorageCatalog;
|
|
44
|
+
bindings: readonly HarneryLoggerBinding[];
|
|
45
|
+
records?: HarneryLogRecordV1[];
|
|
46
|
+
level_config?: HarneryLogLevelConfig;
|
|
47
|
+
env?: HarneryLogEnvironment;
|
|
48
|
+
}): HarneryLoggerRuntime & {
|
|
49
|
+
records: HarneryLogRecordV1[];
|
|
50
|
+
};
|
|
51
|
+
export declare function createNullLoggerRuntime(): HarneryLoggerRuntime;
|
|
52
|
+
export declare function resolveLogLevel(options: {
|
|
53
|
+
component_id: string;
|
|
54
|
+
family: HarneryRegisteredStorageFamily;
|
|
55
|
+
config?: HarneryLogLevelConfig;
|
|
56
|
+
env?: HarneryLogEnvironment;
|
|
57
|
+
strict?: boolean;
|
|
58
|
+
}): HarneryLogLevel;
|
|
59
|
+
export declare function legacyLogFields(value: Record<string, unknown>): HarneryLogFields;
|
|
60
|
+
export interface HarneryBoundedObjectArray {
|
|
61
|
+
json: string;
|
|
62
|
+
included: number;
|
|
63
|
+
omitted: number;
|
|
64
|
+
truncated: boolean;
|
|
65
|
+
}
|
|
66
|
+
/** Encode an allow-listed array of scalar records without slicing a JSON token. */
|
|
67
|
+
export declare function encodeBoundedLogObjectArray(values: readonly unknown[], options: {
|
|
68
|
+
max_bytes: number;
|
|
69
|
+
allowed_fields: readonly string[];
|
|
70
|
+
}): HarneryBoundedObjectArray;
|
|
71
|
+
declare const PROCESS_LOGGER_BINDINGS: {
|
|
72
|
+
readonly "agent-hook": "agent-hook-debug-log";
|
|
73
|
+
readonly "agent-coord": "agent-coord-debug-log";
|
|
74
|
+
readonly "semantic-service": "semantic-service-log";
|
|
75
|
+
readonly "governor-service": "governor-service-log";
|
|
76
|
+
readonly "presence-relay": "presence-relay-log";
|
|
77
|
+
};
|
|
78
|
+
export type HarneryProcessLoggerComponent = keyof typeof PROCESS_LOGGER_BINDINGS;
|
|
79
|
+
export declare function processLogger(coordRoot: string, componentId: HarneryProcessLoggerComponent): HarneryLogger;
|
|
80
|
+
export declare function closeProcessLoggers(): Promise<void>;
|
|
81
|
+
export {};
|
|
82
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/core/storage/logger.ts"],"names":[],"mappings":"AAGA,OAAO,EAAwB,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EACf,8BAA8B,EAC/B,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EAMxB,MAAM,YAAY,CAAC;AAKpB,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC;IAC3C,KAAK,CAAC,OAAO,EAAE,iBAAiB,GAAG,aAAa,CAAC;IACjD,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACxE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACxE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACvE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACvE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACxE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACxE,KAAK,CAAC,OAAO,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,aAAa,CAAC;IACxE,KAAK,CAAC,OAAO,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;IACrD,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;CACxD;AAED,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;AAEjF,qBAAa,iCAAkC,SAAQ,KAAK;IAC9C,QAAQ,CAAC,QAAQ,EAAE,MAAM;gBAAhB,QAAQ,EAAE,MAAM;CAItC;AAgBD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE;IAC/C,OAAO,EAAE,qBAAqB,CAAC;IAC/B,QAAQ,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC3C,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC,GAAG,CAAC,EAAE,qBAAqB,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,GAAG,oBAAoB,CAQvB;AAED,wBAAgB,2BAA2B,CAAC,OAAO,EAAE;IACnD,OAAO,EAAE,qBAAqB,CAAC;IAC/B,QAAQ,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC1C,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC/B,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC,GAAG,CAAC,EAAE,qBAAqB,CAAC;CAC7B,GAAG,oBAAoB,GAAG;IAAE,OAAO,EAAE,kBAAkB,EAAE,CAAA;CAAE,CAa3D;AAED,wBAAgB,uBAAuB,IAAI,oBAAoB,CAc9D;AAyPD,wBAAgB,eAAe,CAAC,OAAO,EAAE;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,8BAA8B,CAAC;IACvC,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,GAAG,CAAC,EAAE,qBAAqB,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,eAAe,CAgBlB;AAgCD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,gBAAgB,CAwBhF;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,mFAAmF;AACnF,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,SAAS,OAAO,EAAE,EAC1B,OAAO,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAChE,yBAAyB,CA+C3B;AAID,QAAA,MAAM,uBAAuB;;;;;;CAMnB,CAAC;AAEX,MAAM,MAAM,6BAA6B,GAAG,MAAM,OAAO,uBAAuB,CAAC;AAEjF,wBAAgB,aAAa,CAC3B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,6BAA6B,GACzC,aAAa,CAaf;AACD,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAGzD"}
|