@cello-protocol/daemon 0.0.227 → 0.0.229
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/agent-admin-handlers.d.ts +56 -0
- package/dist/agent-admin-handlers.d.ts.map +1 -0
- package/dist/agent-admin-handlers.js +73 -0
- package/dist/agent-admin-handlers.js.map +1 -0
- package/dist/agent-handlers.d.ts +72 -0
- package/dist/agent-handlers.d.ts.map +1 -0
- package/dist/agent-handlers.js +604 -0
- package/dist/agent-handlers.js.map +1 -0
- package/dist/agent-id-migration.d.ts +70 -0
- package/dist/agent-id-migration.d.ts.map +1 -0
- package/dist/agent-id-migration.js +468 -0
- package/dist/agent-id-migration.js.map +1 -0
- package/dist/agent-loader.d.ts +37 -0
- package/dist/agent-loader.d.ts.map +1 -0
- package/dist/agent-loader.js +37 -0
- package/dist/agent-loader.js.map +1 -0
- package/dist/agent-selection-root.d.ts +29 -0
- package/dist/agent-selection-root.d.ts.map +1 -0
- package/dist/agent-selection-root.js +126 -0
- package/dist/agent-selection-root.js.map +1 -0
- package/dist/agent-selection.d.ts +73 -0
- package/dist/agent-selection.d.ts.map +1 -0
- package/dist/agent-selection.js +80 -0
- package/dist/agent-selection.js.map +1 -0
- package/dist/agent-settings-keys.d.ts +52 -0
- package/dist/agent-settings-keys.d.ts.map +1 -0
- package/dist/agent-settings-keys.js +114 -0
- package/dist/agent-settings-keys.js.map +1 -0
- package/dist/agent-state.d.ts +67 -0
- package/dist/agent-state.d.ts.map +1 -0
- package/dist/agent-state.js +66 -0
- package/dist/agent-state.js.map +1 -0
- package/dist/assignment-verify.d.ts +90 -0
- package/dist/assignment-verify.d.ts.map +1 -0
- package/dist/assignment-verify.js +301 -0
- package/dist/assignment-verify.js.map +1 -0
- package/dist/attendance-wiring.d.ts +23 -0
- package/dist/attendance-wiring.d.ts.map +1 -0
- package/dist/attendance-wiring.js +248 -0
- package/dist/attendance-wiring.js.map +1 -0
- package/dist/attestation-body.d.ts +47 -0
- package/dist/attestation-body.d.ts.map +1 -0
- package/dist/attestation-body.js +71 -0
- package/dist/attestation-body.js.map +1 -0
- package/dist/authorship-verification.d.ts +91 -0
- package/dist/authorship-verification.d.ts.map +1 -0
- package/dist/authorship-verification.js +532 -0
- package/dist/authorship-verification.js.map +1 -0
- package/dist/away-detection.d.ts +139 -0
- package/dist/away-detection.d.ts.map +1 -0
- package/dist/away-detection.js +186 -0
- package/dist/away-detection.js.map +1 -0
- package/dist/away-inbox-oneshot.d.ts +40 -0
- package/dist/away-inbox-oneshot.d.ts.map +1 -0
- package/dist/away-inbox-oneshot.js +311 -0
- package/dist/away-inbox-oneshot.js.map +1 -0
- package/dist/backup-restore-handlers.d.ts +10 -0
- package/dist/backup-restore-handlers.d.ts.map +1 -0
- package/dist/backup-restore-handlers.js +82 -0
- package/dist/backup-restore-handlers.js.map +1 -0
- package/dist/backup-restore.d.ts +102 -0
- package/dist/backup-restore.d.ts.map +1 -0
- package/dist/backup-restore.js +341 -0
- package/dist/backup-restore.js.map +1 -0
- package/dist/bin/cello-daemon.d.ts +13 -0
- package/dist/bin/cello-daemon.d.ts.map +1 -0
- package/dist/bin/cello-daemon.js.map +1 -0
- package/dist/boot-agents.d.ts +64 -0
- package/dist/boot-agents.d.ts.map +1 -0
- package/dist/boot-agents.js +241 -0
- package/dist/boot-agents.js.map +1 -0
- package/dist/boot-connection-state.d.ts +38 -0
- package/dist/boot-connection-state.d.ts.map +1 -0
- package/dist/boot-connection-state.js +95 -0
- package/dist/boot-connection-state.js.map +1 -0
- package/dist/boot-core.d.ts +36 -0
- package/dist/boot-core.d.ts.map +1 -0
- package/dist/boot-core.js +293 -0
- package/dist/boot-core.js.map +1 -0
- package/dist/boot-parked-content.d.ts +34 -0
- package/dist/boot-parked-content.d.ts.map +1 -0
- package/dist/boot-parked-content.js +528 -0
- package/dist/boot-parked-content.js.map +1 -0
- package/dist/boot-sweeps.d.ts +22 -0
- package/dist/boot-sweeps.d.ts.map +1 -0
- package/dist/boot-sweeps.js +51 -0
- package/dist/boot-sweeps.js.map +1 -0
- package/dist/bundled-consortium-manifest.d.ts +47 -0
- package/dist/bundled-consortium-manifest.d.ts.map +1 -0
- package/dist/bundled-consortium-manifest.js +116 -0
- package/dist/bundled-consortium-manifest.js.map +1 -0
- package/dist/cbor-blob-migration.d.ts +8 -0
- package/dist/cbor-blob-migration.d.ts.map +1 -0
- package/dist/cbor-blob-migration.js +116 -0
- package/dist/cbor-blob-migration.js.map +1 -0
- package/dist/challenge-verifier.d.ts +12 -0
- package/dist/challenge-verifier.d.ts.map +1 -0
- package/dist/challenge-verifier.js +11 -0
- package/dist/challenge-verifier.js.map +1 -0
- package/dist/channel-log-store.d.ts +80 -0
- package/dist/channel-log-store.d.ts.map +1 -0
- package/dist/channel-log-store.js +290 -0
- package/dist/channel-log-store.js.map +1 -0
- package/dist/close-commitment.d.ts +67 -0
- package/dist/close-commitment.d.ts.map +1 -0
- package/dist/close-commitment.js +78 -0
- package/dist/close-commitment.js.map +1 -0
- package/dist/close-session-handler.d.ts +94 -0
- package/dist/close-session-handler.d.ts.map +1 -0
- package/dist/close-session-handler.js +1418 -0
- package/dist/close-session-handler.js.map +1 -0
- package/dist/co-attendance.d.ts +29 -0
- package/dist/co-attendance.d.ts.map +1 -0
- package/dist/co-attendance.js +32 -0
- package/dist/co-attendance.js.map +1 -0
- package/dist/column-birth.d.ts +40 -0
- package/dist/column-birth.d.ts.map +1 -0
- package/dist/column-birth.js +61 -0
- package/dist/column-birth.js.map +1 -0
- package/dist/connect-or-start.d.ts +25 -0
- package/dist/connect-or-start.d.ts.map +1 -0
- package/dist/connect-or-start.js +175 -0
- package/dist/connect-or-start.js.map +1 -0
- package/dist/connection-agents.d.ts +16 -0
- package/dist/connection-agents.d.ts.map +1 -0
- package/dist/connection-agents.js +68 -0
- package/dist/connection-agents.js.map +1 -0
- package/dist/consent-migration.d.ts +49 -0
- package/dist/consent-migration.d.ts.map +1 -0
- package/dist/consent-migration.js +128 -0
- package/dist/consent-migration.js.map +1 -0
- package/dist/consortium-bootstrap.d.ts +138 -0
- package/dist/consortium-bootstrap.d.ts.map +1 -0
- package/dist/consortium-bootstrap.js +339 -0
- package/dist/consortium-bootstrap.js.map +1 -0
- package/dist/consortium-fingerprint.d.ts +115 -0
- package/dist/consortium-fingerprint.d.ts.map +1 -0
- package/dist/consortium-fingerprint.js +175 -0
- package/dist/consortium-fingerprint.js.map +1 -0
- package/dist/contact-handlers.d.ts +59 -0
- package/dist/contact-handlers.d.ts.map +1 -0
- package/dist/contact-handlers.js +343 -0
- package/dist/contact-handlers.js.map +1 -0
- package/dist/contact-pubkey-case.d.ts +65 -0
- package/dist/contact-pubkey-case.d.ts.map +1 -0
- package/dist/contact-pubkey-case.js +136 -0
- package/dist/contact-pubkey-case.js.map +1 -0
- package/dist/contacts-tier-migration.d.ts +90 -0
- package/dist/contacts-tier-migration.d.ts.map +1 -0
- package/dist/contacts-tier-migration.js +150 -0
- package/dist/contacts-tier-migration.js.map +1 -0
- package/dist/content-encryption-status.d.ts +111 -0
- package/dist/content-encryption-status.d.ts.map +1 -0
- package/dist/content-encryption-status.js +158 -0
- package/dist/content-encryption-status.js.map +1 -0
- package/dist/content-park-client.d.ts +90 -0
- package/dist/content-park-client.d.ts.map +1 -0
- package/dist/content-park-client.js +362 -0
- package/dist/content-park-client.js.map +1 -0
- package/dist/content-park.d.ts +52 -0
- package/dist/content-park.d.ts.map +1 -0
- package/dist/content-park.js +1309 -0
- package/dist/content-park.js.map +1 -0
- package/dist/cross-node-negotiation.d.ts +44 -0
- package/dist/cross-node-negotiation.d.ts.map +1 -0
- package/dist/cross-node-negotiation.js +34 -0
- package/dist/cross-node-negotiation.js.map +1 -0
- package/dist/daemon-handle.d.ts +57 -0
- package/dist/daemon-handle.d.ts.map +1 -0
- package/dist/daemon-handle.js +2 -0
- package/dist/daemon-handle.js.map +1 -0
- package/dist/daemon-status-report.d.ts +50 -0
- package/dist/daemon-status-report.d.ts.map +1 -0
- package/dist/daemon-status-report.js +81 -0
- package/dist/daemon-status-report.js.map +1 -0
- package/dist/daemon.d.ts +45 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/daemon.js +1177 -0
- package/dist/daemon.js.map +1 -0
- package/dist/db-identity-store.d.ts +159 -0
- package/dist/db-identity-store.d.ts.map +1 -0
- package/dist/db-identity-store.js +502 -0
- package/dist/db-identity-store.js.map +1 -0
- package/dist/delivery-open-registry.d.ts +92 -0
- package/dist/delivery-open-registry.d.ts.map +1 -0
- package/dist/delivery-open-registry.js +121 -0
- package/dist/delivery-open-registry.js.map +1 -0
- package/dist/delivery-session-suspects.d.ts +56 -0
- package/dist/delivery-session-suspects.d.ts.map +1 -0
- package/dist/delivery-session-suspects.js +94 -0
- package/dist/delivery-session-suspects.js.map +1 -0
- package/dist/directory-auth-posture.d.ts +87 -0
- package/dist/directory-auth-posture.d.ts.map +1 -0
- package/dist/directory-auth-posture.js +134 -0
- package/dist/directory-auth-posture.js.map +1 -0
- package/dist/directory-bootstrap.d.ts +310 -0
- package/dist/directory-bootstrap.d.ts.map +1 -0
- package/dist/directory-bootstrap.js +557 -0
- package/dist/directory-bootstrap.js.map +1 -0
- package/dist/directory-connect.d.ts +27 -0
- package/dist/directory-connect.d.ts.map +1 -0
- package/dist/directory-connect.js +106 -0
- package/dist/directory-connect.js.map +1 -0
- package/dist/disconnect-cleanup.d.ts +51 -0
- package/dist/disconnect-cleanup.d.ts.map +1 -0
- package/dist/disconnect-cleanup.js +72 -0
- package/dist/disconnect-cleanup.js.map +1 -0
- package/dist/document-amendment-store.d.ts +120 -0
- package/dist/document-amendment-store.d.ts.map +1 -0
- package/dist/document-amendment-store.js +266 -0
- package/dist/document-amendment-store.js.map +1 -0
- package/dist/document-delivery-transport.d.ts +168 -0
- package/dist/document-delivery-transport.d.ts.map +1 -0
- package/dist/document-delivery-transport.js +206 -0
- package/dist/document-delivery-transport.js.map +1 -0
- package/dist/document-engine.d.ts +134 -0
- package/dist/document-engine.d.ts.map +1 -0
- package/dist/document-engine.js +282 -0
- package/dist/document-engine.js.map +1 -0
- package/dist/document-flag.d.ts +58 -0
- package/dist/document-flag.d.ts.map +1 -0
- package/dist/document-flag.js +70 -0
- package/dist/document-flag.js.map +1 -0
- package/dist/document-frame-router.d.ts +245 -0
- package/dist/document-frame-router.d.ts.map +1 -0
- package/dist/document-frame-router.js +397 -0
- package/dist/document-frame-router.js.map +1 -0
- package/dist/document-gate-wiring.d.ts +61 -0
- package/dist/document-gate-wiring.d.ts.map +1 -0
- package/dist/document-gate-wiring.js +125 -0
- package/dist/document-gate-wiring.js.map +1 -0
- package/dist/document-gate.d.ts +149 -0
- package/dist/document-gate.d.ts.map +1 -0
- package/dist/document-gate.js +509 -0
- package/dist/document-gate.js.map +1 -0
- package/dist/document-handlers.d.ts +47 -0
- package/dist/document-handlers.d.ts.map +1 -0
- package/dist/document-handlers.js +2203 -0
- package/dist/document-handlers.js.map +1 -0
- package/dist/document-handshake.d.ts +176 -0
- package/dist/document-handshake.d.ts.map +1 -0
- package/dist/document-handshake.js +452 -0
- package/dist/document-handshake.js.map +1 -0
- package/dist/document-inbound.d.ts +162 -0
- package/dist/document-inbound.d.ts.map +1 -0
- package/dist/document-inbound.js +530 -0
- package/dist/document-inbound.js.map +1 -0
- package/dist/document-json.d.ts +120 -0
- package/dist/document-json.d.ts.map +1 -0
- package/dist/document-json.js +191 -0
- package/dist/document-json.js.map +1 -0
- package/dist/document-layer.d.ts +215 -0
- package/dist/document-layer.d.ts.map +1 -0
- package/dist/document-layer.js +1025 -0
- package/dist/document-layer.js.map +1 -0
- package/dist/document-lifecycle.d.ts +52 -0
- package/dist/document-lifecycle.d.ts.map +1 -0
- package/dist/document-lifecycle.js +134 -0
- package/dist/document-lifecycle.js.map +1 -0
- package/dist/document-live-docs.d.ts +58 -0
- package/dist/document-live-docs.d.ts.map +1 -0
- package/dist/document-live-docs.js +126 -0
- package/dist/document-live-docs.js.map +1 -0
- package/dist/document-notify.d.ts +228 -0
- package/dist/document-notify.d.ts.map +1 -0
- package/dist/document-notify.js +580 -0
- package/dist/document-notify.js.map +1 -0
- package/dist/document-profile.d.ts +61 -0
- package/dist/document-profile.d.ts.map +1 -0
- package/dist/document-profile.js +112 -0
- package/dist/document-profile.js.map +1 -0
- package/dist/document-publish.d.ts +87 -0
- package/dist/document-publish.d.ts.map +1 -0
- package/dist/document-publish.js +173 -0
- package/dist/document-publish.js.map +1 -0
- package/dist/document-reachability.d.ts +42 -0
- package/dist/document-reachability.d.ts.map +1 -0
- package/dist/document-reachability.js +80 -0
- package/dist/document-reachability.js.map +1 -0
- package/dist/document-reconcile-engine.d.ts +66 -0
- package/dist/document-reconcile-engine.d.ts.map +1 -0
- package/dist/document-reconcile-engine.js +225 -0
- package/dist/document-reconcile-engine.js.map +1 -0
- package/dist/document-reconcile-scheduler.d.ts +163 -0
- package/dist/document-reconcile-scheduler.d.ts.map +1 -0
- package/dist/document-reconcile-scheduler.js +303 -0
- package/dist/document-reconcile-scheduler.js.map +1 -0
- package/dist/document-rejection.d.ts +251 -0
- package/dist/document-rejection.d.ts.map +1 -0
- package/dist/document-rejection.js +435 -0
- package/dist/document-rejection.js.map +1 -0
- package/dist/document-screen.d.ts +114 -0
- package/dist/document-screen.d.ts.map +1 -0
- package/dist/document-screen.js +223 -0
- package/dist/document-screen.js.map +1 -0
- package/dist/document-store.d.ts +372 -0
- package/dist/document-store.d.ts.map +1 -0
- package/dist/document-store.js +931 -0
- package/dist/document-store.js.map +1 -0
- package/dist/document-surface.d.ts +32 -0
- package/dist/document-surface.d.ts.map +1 -0
- package/dist/document-surface.js +151 -0
- package/dist/document-surface.js.map +1 -0
- package/dist/document-types.d.ts +94 -0
- package/dist/document-types.d.ts.map +1 -0
- package/dist/document-types.js +90 -0
- package/dist/document-types.js.map +1 -0
- package/dist/document-watch.d.ts +69 -0
- package/dist/document-watch.d.ts.map +1 -0
- package/dist/document-watch.js +108 -0
- package/dist/document-watch.js.map +1 -0
- package/dist/document-wiring.d.ts +53 -0
- package/dist/document-wiring.d.ts.map +1 -0
- package/dist/document-wiring.js +323 -0
- package/dist/document-wiring.js.map +1 -0
- package/dist/document-write-guard.d.ts +66 -0
- package/dist/document-write-guard.d.ts.map +1 -0
- package/dist/document-write-guard.js +98 -0
- package/dist/document-write-guard.js.map +1 -0
- package/dist/document-write-path.d.ts +94 -0
- package/dist/document-write-path.d.ts.map +1 -0
- package/dist/document-write-path.js +530 -0
- package/dist/document-write-path.js.map +1 -0
- package/dist/error-message.d.ts +7 -0
- package/dist/error-message.d.ts.map +1 -0
- package/dist/error-message.js +19 -0
- package/dist/error-message.js.map +1 -0
- package/dist/file-manifest-provider.d.ts +37 -0
- package/dist/file-manifest-provider.d.ts.map +1 -0
- package/dist/file-manifest-provider.js +105 -0
- package/dist/file-manifest-provider.js.map +1 -0
- package/dist/frame-values.d.ts +3 -0
- package/dist/frame-values.d.ts.map +1 -0
- package/dist/frame-values.js +84 -0
- package/dist/frame-values.js.map +1 -0
- package/dist/frontier-mismatch.d.ts +73 -0
- package/dist/frontier-mismatch.d.ts.map +1 -0
- package/dist/frontier-mismatch.js +89 -0
- package/dist/frontier-mismatch.js.map +1 -0
- package/dist/gateway-config-handlers.d.ts +26 -0
- package/dist/gateway-config-handlers.d.ts.map +1 -0
- package/dist/gateway-config-handlers.js +454 -0
- package/dist/gateway-config-handlers.js.map +1 -0
- package/dist/held-content.d.ts +145 -0
- package/dist/held-content.d.ts.map +1 -0
- package/dist/held-content.js +389 -0
- package/dist/held-content.js.map +1 -0
- package/dist/http-manifest-poll.d.ts +67 -0
- package/dist/http-manifest-poll.d.ts.map +1 -0
- package/dist/http-manifest-poll.js +150 -0
- package/dist/http-manifest-poll.js.map +1 -0
- package/dist/identity-migration.d.ts +40 -0
- package/dist/identity-migration.d.ts.map +1 -0
- package/dist/identity-migration.js +461 -0
- package/dist/identity-migration.js.map +1 -0
- package/dist/inbound-refusals.d.ts +283 -0
- package/dist/inbound-refusals.d.ts.map +1 -0
- package/dist/inbound-refusals.js +919 -0
- package/dist/inbound-refusals.js.map +1 -0
- package/dist/inbound-seal-request.d.ts +32 -0
- package/dist/inbound-seal-request.d.ts.map +1 -0
- package/dist/inbound-seal-request.js +228 -0
- package/dist/inbound-seal-request.js.map +1 -0
- package/dist/inbound-sessions.d.ts +291 -0
- package/dist/inbound-sessions.d.ts.map +1 -0
- package/dist/inbound-sessions.js +1609 -0
- package/dist/inbound-sessions.js.map +1 -0
- package/dist/inclusion-proof-handlers.d.ts +43 -0
- package/dist/inclusion-proof-handlers.d.ts.map +1 -0
- package/dist/inclusion-proof-handlers.js +565 -0
- package/dist/inclusion-proof-handlers.js.map +1 -0
- package/dist/inclusion-proof.d.ts +151 -0
- package/dist/inclusion-proof.d.ts.map +1 -0
- package/dist/inclusion-proof.js +228 -0
- package/dist/inclusion-proof.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/initiate-session-handler.d.ts +55 -0
- package/dist/initiate-session-handler.d.ts.map +1 -0
- package/dist/initiate-session-handler.js +310 -0
- package/dist/initiate-session-handler.js.map +1 -0
- package/dist/ipc-client.d.ts +31 -0
- package/dist/ipc-client.d.ts.map +1 -0
- package/dist/ipc-client.js +113 -0
- package/dist/ipc-client.js.map +1 -0
- package/dist/ipc-server.d.ts +63 -0
- package/dist/ipc-server.d.ts.map +1 -0
- package/dist/ipc-server.js +429 -0
- package/dist/ipc-server.js.map +1 -0
- package/dist/ipc-surface.d.ts +44 -0
- package/dist/ipc-surface.d.ts.map +1 -0
- package/dist/ipc-surface.js +107 -0
- package/dist/ipc-surface.js.map +1 -0
- package/dist/line-lcs.d.ts +51 -0
- package/dist/line-lcs.d.ts.map +1 -0
- package/dist/line-lcs.js +71 -0
- package/dist/line-lcs.js.map +1 -0
- package/dist/lock-file.d.ts +39 -0
- package/dist/lock-file.d.ts.map +1 -0
- package/dist/lock-file.js +120 -0
- package/dist/lock-file.js.map +1 -0
- package/dist/log-collapse.d.ts +66 -0
- package/dist/log-collapse.d.ts.map +1 -0
- package/dist/log-collapse.js +244 -0
- package/dist/log-collapse.js.map +1 -0
- package/dist/log-rotate.d.ts +67 -0
- package/dist/log-rotate.d.ts.map +1 -0
- package/dist/log-rotate.js +134 -0
- package/dist/log-rotate.js.map +1 -0
- package/dist/manifest-deps.d.ts +25 -0
- package/dist/manifest-deps.d.ts.map +1 -0
- package/dist/manifest-deps.js +151 -0
- package/dist/manifest-deps.js.map +1 -0
- package/dist/manifest-poll-scheduler.d.ts +31 -0
- package/dist/manifest-poll-scheduler.d.ts.map +1 -0
- package/dist/manifest-poll-scheduler.js +59 -0
- package/dist/manifest-poll-scheduler.js.map +1 -0
- package/dist/manifest-validity.d.ts +153 -0
- package/dist/manifest-validity.d.ts.map +1 -0
- package/dist/manifest-validity.js +268 -0
- package/dist/manifest-validity.js.map +1 -0
- package/dist/manifest-version-store-db.d.ts +24 -0
- package/dist/manifest-version-store-db.d.ts.map +1 -0
- package/dist/manifest-version-store-db.js +58 -0
- package/dist/manifest-version-store-db.js.map +1 -0
- package/dist/manifest-version-store.d.ts +16 -0
- package/dist/manifest-version-store.d.ts.map +1 -0
- package/dist/manifest-version-store.js +15 -0
- package/dist/manifest-version-store.js.map +1 -0
- package/dist/network-directory-node.d.ts +136 -0
- package/dist/network-directory-node.d.ts.map +1 -0
- package/dist/network-directory-node.js +810 -0
- package/dist/network-directory-node.js.map +1 -0
- package/dist/nonce-dedup.d.ts +68 -0
- package/dist/nonce-dedup.d.ts.map +1 -0
- package/dist/nonce-dedup.js +205 -0
- package/dist/nonce-dedup.js.map +1 -0
- package/dist/notification-dispatcher.d.ts +92 -0
- package/dist/notification-dispatcher.d.ts.map +1 -0
- package/dist/notification-dispatcher.js +210 -0
- package/dist/notification-dispatcher.js.map +1 -0
- package/dist/notification-handlers.d.ts +53 -0
- package/dist/notification-handlers.d.ts.map +1 -0
- package/dist/notification-handlers.js +461 -0
- package/dist/notification-handlers.js.map +1 -0
- package/dist/onboarding-guidance.d.ts +79 -0
- package/dist/onboarding-guidance.d.ts.map +1 -0
- package/dist/onboarding-guidance.js +95 -0
- package/dist/onboarding-guidance.js.map +1 -0
- package/dist/operator-guidance.d.ts +25 -0
- package/dist/operator-guidance.d.ts.map +1 -0
- package/dist/operator-guidance.js +50 -0
- package/dist/operator-guidance.js.map +1 -0
- package/dist/orphan-triage.d.ts +130 -0
- package/dist/orphan-triage.d.ts.map +1 -0
- package/dist/orphan-triage.js +207 -0
- package/dist/orphan-triage.js.map +1 -0
- package/dist/outbound-sessions.d.ts +126 -0
- package/dist/outbound-sessions.d.ts.map +1 -0
- package/dist/outbound-sessions.js +1052 -0
- package/dist/outbound-sessions.js.map +1 -0
- package/dist/park-envelope.d.ts +329 -0
- package/dist/park-envelope.d.ts.map +1 -0
- package/dist/park-envelope.js +509 -0
- package/dist/park-envelope.js.map +1 -0
- package/dist/park-recovery.d.ts +273 -0
- package/dist/park-recovery.d.ts.map +1 -0
- package/dist/park-recovery.js +717 -0
- package/dist/park-recovery.js.map +1 -0
- package/dist/park-refusals.d.ts +147 -0
- package/dist/park-refusals.d.ts.map +1 -0
- package/dist/park-refusals.js +331 -0
- package/dist/park-refusals.js.map +1 -0
- package/dist/quarantine-framing.d.ts +92 -0
- package/dist/quarantine-framing.d.ts.map +1 -0
- package/dist/quarantine-framing.js +111 -0
- package/dist/quarantine-framing.js.map +1 -0
- package/dist/reconnect-drain.d.ts +22 -0
- package/dist/reconnect-drain.d.ts.map +1 -0
- package/dist/reconnect-drain.js +65 -0
- package/dist/reconnect-drain.js.map +1 -0
- package/dist/recovered-position.d.ts +14 -0
- package/dist/recovered-position.d.ts.map +1 -0
- package/dist/recovered-position.js +59 -0
- package/dist/recovered-position.js.map +1 -0
- package/dist/refusal-notices.d.ts +196 -0
- package/dist/refusal-notices.d.ts.map +1 -0
- package/dist/refusal-notices.js +516 -0
- package/dist/refusal-notices.js.map +1 -0
- package/dist/refusal-reasons.d.ts +245 -0
- package/dist/refusal-reasons.d.ts.map +1 -0
- package/dist/refusal-reasons.js +363 -0
- package/dist/refusal-reasons.js.map +1 -0
- package/dist/register-handler.d.ts +36 -0
- package/dist/register-handler.d.ts.map +1 -0
- package/dist/register-handler.js +285 -0
- package/dist/register-handler.js.map +1 -0
- package/dist/registration-context.d.ts +72 -0
- package/dist/registration-context.d.ts.map +1 -0
- package/dist/registration-context.js +126 -0
- package/dist/registration-context.js.map +1 -0
- package/dist/registration-manager.d.ts +94 -0
- package/dist/registration-manager.d.ts.map +1 -0
- package/dist/registration-manager.js +585 -0
- package/dist/registration-manager.js.map +1 -0
- package/dist/registration-persistence.d.ts +183 -0
- package/dist/registration-persistence.d.ts.map +1 -0
- package/dist/registration-persistence.js +263 -0
- package/dist/registration-persistence.js.map +1 -0
- package/dist/registry-poll.d.ts +52 -0
- package/dist/registry-poll.d.ts.map +1 -0
- package/dist/registry-poll.js +140 -0
- package/dist/registry-poll.js.map +1 -0
- package/dist/registry-version-store-db.d.ts +22 -0
- package/dist/registry-version-store-db.d.ts.map +1 -0
- package/dist/registry-version-store-db.js +50 -0
- package/dist/registry-version-store-db.js.map +1 -0
- package/dist/relay-endpoints.d.ts +18 -0
- package/dist/relay-endpoints.d.ts.map +1 -0
- package/dist/relay-endpoints.js +9 -0
- package/dist/relay-endpoints.js.map +1 -0
- package/dist/relay-only.d.ts +140 -0
- package/dist/relay-only.d.ts.map +1 -0
- package/dist/relay-only.js +193 -0
- package/dist/relay-only.js.map +1 -0
- package/dist/relay-receipt-store.d.ts +155 -0
- package/dist/relay-receipt-store.d.ts.map +1 -0
- package/dist/relay-receipt-store.js +284 -0
- package/dist/relay-receipt-store.js.map +1 -0
- package/dist/relay-reconnect.d.ts +32 -0
- package/dist/relay-reconnect.d.ts.map +1 -0
- package/dist/relay-reconnect.js +29 -0
- package/dist/relay-reconnect.js.map +1 -0
- package/dist/reply-lag.d.ts +11 -0
- package/dist/reply-lag.d.ts.map +1 -0
- package/dist/reply-lag.js +46 -0
- package/dist/reply-lag.js.map +1 -0
- package/dist/resolve-named-agent.d.ts +49 -0
- package/dist/resolve-named-agent.d.ts.map +1 -0
- package/dist/resolve-named-agent.js +77 -0
- package/dist/resolve-named-agent.js.map +1 -0
- package/dist/restart-seal-resolver.d.ts +110 -0
- package/dist/restart-seal-resolver.d.ts.map +1 -0
- package/dist/restart-seal-resolver.js +353 -0
- package/dist/restart-seal-resolver.js.map +1 -0
- package/dist/resume-last-seen.d.ts +15 -0
- package/dist/resume-last-seen.d.ts.map +1 -0
- package/dist/resume-last-seen.js +44 -0
- package/dist/resume-last-seen.js.map +1 -0
- package/dist/retry-queue.d.ts +203 -0
- package/dist/retry-queue.d.ts.map +1 -0
- package/dist/retry-queue.js +701 -0
- package/dist/retry-queue.js.map +1 -0
- package/dist/roster-freshness.d.ts +160 -0
- package/dist/roster-freshness.d.ts.map +1 -0
- package/dist/roster-freshness.js +250 -0
- package/dist/roster-freshness.js.map +1 -0
- package/dist/screening-status.d.ts +15 -0
- package/dist/screening-status.d.ts.map +1 -0
- package/dist/screening-status.js +65 -0
- package/dist/screening-status.js.map +1 -0
- package/dist/seal-carried-close.d.ts +37 -0
- package/dist/seal-carried-close.d.ts.map +1 -0
- package/dist/seal-carried-close.js +179 -0
- package/dist/seal-carried-close.js.map +1 -0
- package/dist/seal-certificate-pull.d.ts +79 -0
- package/dist/seal-certificate-pull.d.ts.map +1 -0
- package/dist/seal-certificate-pull.js +186 -0
- package/dist/seal-certificate-pull.js.map +1 -0
- package/dist/seal-certified-root-check.d.ts +37 -0
- package/dist/seal-certified-root-check.d.ts.map +1 -0
- package/dist/seal-certified-root-check.js +127 -0
- package/dist/seal-certified-root-check.js.map +1 -0
- package/dist/seal-coordinator.d.ts +118 -0
- package/dist/seal-coordinator.d.ts.map +1 -0
- package/dist/seal-coordinator.js +927 -0
- package/dist/seal-coordinator.js.map +1 -0
- package/dist/seal-escalation.d.ts +80 -0
- package/dist/seal-escalation.d.ts.map +1 -0
- package/dist/seal-escalation.js +283 -0
- package/dist/seal-escalation.js.map +1 -0
- package/dist/seal-evidence-root-check.d.ts +70 -0
- package/dist/seal-evidence-root-check.d.ts.map +1 -0
- package/dist/seal-evidence-root-check.js +199 -0
- package/dist/seal-evidence-root-check.js.map +1 -0
- package/dist/seal-failure-store.d.ts +139 -0
- package/dist/seal-failure-store.d.ts.map +1 -0
- package/dist/seal-failure-store.js +207 -0
- package/dist/seal-failure-store.js.map +1 -0
- package/dist/seal-flows.d.ts +107 -0
- package/dist/seal-flows.d.ts.map +1 -0
- package/dist/seal-flows.js +638 -0
- package/dist/seal-flows.js.map +1 -0
- package/dist/seal-frontier-verify.d.ts +103 -0
- package/dist/seal-frontier-verify.d.ts.map +1 -0
- package/dist/seal-frontier-verify.js +143 -0
- package/dist/seal-frontier-verify.js.map +1 -0
- package/dist/seal-leaf.d.ts +58 -0
- package/dist/seal-leaf.d.ts.map +1 -0
- package/dist/seal-leaf.js +112 -0
- package/dist/seal-leaf.js.map +1 -0
- package/dist/seal-legibility-tbs.d.ts +25 -0
- package/dist/seal-legibility-tbs.d.ts.map +1 -0
- package/dist/seal-legibility-tbs.js +77 -0
- package/dist/seal-legibility-tbs.js.map +1 -0
- package/dist/seal-local-terminus.d.ts +41 -0
- package/dist/seal-local-terminus.d.ts.map +1 -0
- package/dist/seal-local-terminus.js +170 -0
- package/dist/seal-local-terminus.js.map +1 -0
- package/dist/seal-receipt-upgrade.d.ts +30 -0
- package/dist/seal-receipt-upgrade.d.ts.map +1 -0
- package/dist/seal-receipt-upgrade.js +49 -0
- package/dist/seal-receipt-upgrade.js.map +1 -0
- package/dist/seal-relay-silence.d.ts +51 -0
- package/dist/seal-relay-silence.d.ts.map +1 -0
- package/dist/seal-relay-silence.js +76 -0
- package/dist/seal-relay-silence.js.map +1 -0
- package/dist/seal-settle.d.ts +38 -0
- package/dist/seal-settle.d.ts.map +1 -0
- package/dist/seal-settle.js +33 -0
- package/dist/seal-settle.js.map +1 -0
- package/dist/seal-upgrade.d.ts +107 -0
- package/dist/seal-upgrade.d.ts.map +1 -0
- package/dist/seal-upgrade.js +200 -0
- package/dist/seal-upgrade.js.map +1 -0
- package/dist/sealed-conversation.d.ts +36 -0
- package/dist/sealed-conversation.d.ts.map +1 -0
- package/dist/sealed-conversation.js +171 -0
- package/dist/sealed-conversation.js.map +1 -0
- package/dist/sealed-leaf-set.d.ts +92 -0
- package/dist/sealed-leaf-set.d.ts.map +1 -0
- package/dist/sealed-leaf-set.js +122 -0
- package/dist/sealed-leaf-set.js.map +1 -0
- package/dist/send-claims.d.ts +56 -0
- package/dist/send-claims.d.ts.map +1 -0
- package/dist/send-claims.js +50 -0
- package/dist/send-claims.js.map +1 -0
- package/dist/session-assignment-parser.d.ts +104 -0
- package/dist/session-assignment-parser.d.ts.map +1 -0
- package/dist/session-assignment-parser.js +345 -0
- package/dist/session-assignment-parser.js.map +1 -0
- package/dist/session-category.d.ts +19 -0
- package/dist/session-category.d.ts.map +1 -0
- package/dist/session-category.js +14 -0
- package/dist/session-category.js.map +1 -0
- package/dist/session-ceremony.d.ts +297 -0
- package/dist/session-ceremony.d.ts.map +1 -0
- package/dist/session-ceremony.js +964 -0
- package/dist/session-ceremony.js.map +1 -0
- package/dist/session-closed.d.ts +79 -0
- package/dist/session-closed.d.ts.map +1 -0
- package/dist/session-closed.js +189 -0
- package/dist/session-closed.js.map +1 -0
- package/dist/session-connection-gater.d.ts +148 -0
- package/dist/session-connection-gater.d.ts.map +1 -0
- package/dist/session-connection-gater.js +332 -0
- package/dist/session-connection-gater.js.map +1 -0
- package/dist/session-content-context.d.ts +162 -0
- package/dist/session-content-context.d.ts.map +1 -0
- package/dist/session-content-context.js +2 -0
- package/dist/session-content-context.js.map +1 -0
- package/dist/session-content-handlers.d.ts +82 -0
- package/dist/session-content-handlers.d.ts.map +1 -0
- package/dist/session-content-handlers.js +1382 -0
- package/dist/session-content-handlers.js.map +1 -0
- package/dist/session-content-ingest.d.ts +206 -0
- package/dist/session-content-ingest.d.ts.map +1 -0
- package/dist/session-content-ingest.js +2167 -0
- package/dist/session-content-ingest.js.map +1 -0
- package/dist/session-content-send.d.ts +191 -0
- package/dist/session-content-send.d.ts.map +1 -0
- package/dist/session-content-send.js +1360 -0
- package/dist/session-content-send.js.map +1 -0
- package/dist/session-delivery-acks.d.ts +169 -0
- package/dist/session-delivery-acks.d.ts.map +1 -0
- package/dist/session-delivery-acks.js +569 -0
- package/dist/session-delivery-acks.js.map +1 -0
- package/dist/session-ephemerals.d.ts +279 -0
- package/dist/session-ephemerals.d.ts.map +1 -0
- package/dist/session-ephemerals.js +591 -0
- package/dist/session-ephemerals.js.map +1 -0
- package/dist/session-leaf-records.d.ts +159 -0
- package/dist/session-leaf-records.d.ts.map +1 -0
- package/dist/session-leaf-records.js +408 -0
- package/dist/session-leaf-records.js.map +1 -0
- package/dist/session-lifecycle.d.ts +303 -0
- package/dist/session-lifecycle.d.ts.map +1 -0
- package/dist/session-lifecycle.js +1679 -0
- package/dist/session-lifecycle.js.map +1 -0
- package/dist/session-liveness.d.ts +135 -0
- package/dist/session-liveness.d.ts.map +1 -0
- package/dist/session-liveness.js +347 -0
- package/dist/session-liveness.js.map +1 -0
- package/dist/session-name.d.ts +35 -0
- package/dist/session-name.d.ts.map +1 -0
- package/dist/session-name.js +60 -0
- package/dist/session-name.js.map +1 -0
- package/dist/session-node-factory.d.ts +18 -0
- package/dist/session-node-factory.d.ts.map +1 -0
- package/dist/session-node-factory.js +182 -0
- package/dist/session-node-factory.js.map +1 -0
- package/dist/session-node-manager.d.ts +877 -0
- package/dist/session-node-manager.d.ts.map +1 -0
- package/dist/session-node-manager.js +2998 -0
- package/dist/session-node-manager.js.map +1 -0
- package/dist/session-node-types.d.ts +1057 -0
- package/dist/session-node-types.d.ts.map +1 -0
- package/dist/session-node-types.js +657 -0
- package/dist/session-node-types.js.map +1 -0
- package/dist/session-notify.d.ts +46 -0
- package/dist/session-notify.d.ts.map +1 -0
- package/dist/session-notify.js +116 -0
- package/dist/session-notify.js.map +1 -0
- package/dist/session-own-chain-store.d.ts +65 -0
- package/dist/session-own-chain-store.d.ts.map +1 -0
- package/dist/session-own-chain-store.js +75 -0
- package/dist/session-own-chain-store.js.map +1 -0
- package/dist/session-queries.d.ts +476 -0
- package/dist/session-queries.d.ts.map +1 -0
- package/dist/session-queries.js +1007 -0
- package/dist/session-queries.js.map +1 -0
- package/dist/session-read-handlers.d.ts +87 -0
- package/dist/session-read-handlers.d.ts.map +1 -0
- package/dist/session-read-handlers.js +689 -0
- package/dist/session-read-handlers.js.map +1 -0
- package/dist/session-records.d.ts +341 -0
- package/dist/session-records.d.ts.map +1 -0
- package/dist/session-records.js +858 -0
- package/dist/session-records.js.map +1 -0
- package/dist/session-relay-client.d.ts +659 -0
- package/dist/session-relay-client.d.ts.map +1 -0
- package/dist/session-relay-client.js +2876 -0
- package/dist/session-relay-client.js.map +1 -0
- package/dist/session-relay.d.ts +397 -0
- package/dist/session-relay.d.ts.map +1 -0
- package/dist/session-relay.js +1636 -0
- package/dist/session-relay.js.map +1 -0
- package/dist/session-salt-agreement.d.ts +331 -0
- package/dist/session-salt-agreement.d.ts.map +1 -0
- package/dist/session-salt-agreement.js +472 -0
- package/dist/session-salt-agreement.js.map +1 -0
- package/dist/session-salts.d.ts +432 -0
- package/dist/session-salts.d.ts.map +1 -0
- package/dist/session-salts.js +1540 -0
- package/dist/session-salts.js.map +1 -0
- package/dist/session-schema.d.ts +30 -0
- package/dist/session-schema.d.ts.map +1 -0
- package/dist/session-schema.js +877 -0
- package/dist/session-schema.js.map +1 -0
- package/dist/session-seal-leaf-store.d.ts +70 -0
- package/dist/session-seal-leaf-store.d.ts.map +1 -0
- package/dist/session-seal-leaf-store.js +105 -0
- package/dist/session-seal-leaf-store.js.map +1 -0
- package/dist/session-seal.d.ts +334 -0
- package/dist/session-seal.d.ts.map +1 -0
- package/dist/session-seal.js +1017 -0
- package/dist/session-seal.js.map +1 -0
- package/dist/session-terminal-refusal.d.ts +65 -0
- package/dist/session-terminal-refusal.d.ts.map +1 -0
- package/dist/session-terminal-refusal.js +87 -0
- package/dist/session-terminal-refusal.js.map +1 -0
- package/dist/session-tree.d.ts +110 -0
- package/dist/session-tree.d.ts.map +1 -0
- package/dist/session-tree.js +144 -0
- package/dist/session-tree.js.map +1 -0
- package/dist/session-views.d.ts +47 -0
- package/dist/session-views.d.ts.map +1 -0
- package/dist/session-views.js +278 -0
- package/dist/session-views.js.map +1 -0
- package/dist/signal-handlers.d.ts +63 -0
- package/dist/signal-handlers.d.ts.map +1 -0
- package/dist/signal-handlers.js +980 -0
- package/dist/signal-handlers.js.map +1 -0
- package/dist/signal-requirement-policy.d.ts +51 -0
- package/dist/signal-requirement-policy.d.ts.map +1 -0
- package/dist/signal-requirement-policy.js +89 -0
- package/dist/signal-requirement-policy.js.map +1 -0
- package/dist/signal-revocability.d.ts +49 -0
- package/dist/signal-revocability.d.ts.map +1 -0
- package/dist/signal-revocability.js +93 -0
- package/dist/signal-revocability.js.map +1 -0
- package/dist/signal-submission.d.ts +181 -0
- package/dist/signal-submission.d.ts.map +1 -0
- package/dist/signal-submission.js +368 -0
- package/dist/signal-submission.js.map +1 -0
- package/dist/signaling-connect.d.ts +118 -0
- package/dist/signaling-connect.d.ts.map +1 -0
- package/dist/signaling-connect.js +538 -0
- package/dist/signaling-connect.js.map +1 -0
- package/dist/signaling-wiring.d.ts +105 -0
- package/dist/signaling-wiring.d.ts.map +1 -0
- package/dist/signaling-wiring.js +393 -0
- package/dist/signaling-wiring.js.map +1 -0
- package/dist/singleton-lock.d.ts +85 -0
- package/dist/singleton-lock.d.ts.map +1 -0
- package/dist/singleton-lock.js +219 -0
- package/dist/singleton-lock.js.map +1 -0
- package/dist/sqlcipher-db.d.ts +139 -0
- package/dist/sqlcipher-db.d.ts.map +1 -0
- package/dist/sqlcipher-db.js +357 -0
- package/dist/sqlcipher-db.js.map +1 -0
- package/dist/standing-receivers.d.ts +319 -0
- package/dist/standing-receivers.d.ts.map +1 -0
- package/dist/standing-receivers.js +1295 -0
- package/dist/standing-receivers.js.map +1 -0
- package/dist/start-agent.d.ts +64 -0
- package/dist/start-agent.d.ts.map +1 -0
- package/dist/start-agent.js +136 -0
- package/dist/start-agent.js.map +1 -0
- package/dist/status-handler.d.ts +54 -0
- package/dist/status-handler.d.ts.map +1 -0
- package/dist/status-handler.js +61 -0
- package/dist/status-handler.js.map +1 -0
- package/dist/submission-retry.d.ts +208 -0
- package/dist/submission-retry.d.ts.map +1 -0
- package/dist/submission-retry.js +506 -0
- package/dist/submission-retry.js.map +1 -0
- package/dist/telegram-bot-client.d.ts +34 -0
- package/dist/telegram-bot-client.d.ts.map +1 -0
- package/dist/telegram-bot-client.js +36 -0
- package/dist/telegram-bot-client.js.map +1 -0
- package/dist/telegram-doorbell.d.ts +38 -0
- package/dist/telegram-doorbell.d.ts.map +1 -0
- package/dist/telegram-doorbell.js +140 -0
- package/dist/telegram-doorbell.js.map +1 -0
- package/dist/test-handlers.d.ts +62 -0
- package/dist/test-handlers.d.ts.map +1 -0
- package/dist/test-handlers.js +240 -0
- package/dist/test-handlers.js.map +1 -0
- package/dist/testing.d.ts +10 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +10 -0
- package/dist/testing.js.map +1 -0
- package/dist/transport-composition.d.ts +31 -0
- package/dist/transport-composition.d.ts.map +1 -0
- package/dist/transport-composition.js +55 -0
- package/dist/transport-composition.js.map +1 -0
- package/dist/transport-selector.d.ts +202 -0
- package/dist/transport-selector.d.ts.map +1 -0
- package/dist/transport-selector.js +196 -0
- package/dist/transport-selector.js.map +1 -0
- package/dist/trust-signal-pickup-listener.d.ts +43 -0
- package/dist/trust-signal-pickup-listener.d.ts.map +1 -0
- package/dist/trust-signal-pickup-listener.js +48 -0
- package/dist/trust-signal-pickup-listener.js.map +1 -0
- package/dist/trust-signal-store.d.ts +406 -0
- package/dist/trust-signal-store.d.ts.map +1 -0
- package/dist/trust-signal-store.js +939 -0
- package/dist/trust-signal-store.js.map +1 -0
- package/dist/trust-signal-sweep-tick.d.ts +60 -0
- package/dist/trust-signal-sweep-tick.d.ts.map +1 -0
- package/dist/trust-signal-sweep-tick.js +101 -0
- package/dist/trust-signal-sweep-tick.js.map +1 -0
- package/dist/trust-signal-sweep.d.ts +94 -0
- package/dist/trust-signal-sweep.d.ts.map +1 -0
- package/dist/trust-signal-sweep.js +147 -0
- package/dist/trust-signal-sweep.js.map +1 -0
- package/dist/type-registry.d.ts +42 -0
- package/dist/type-registry.d.ts.map +1 -0
- package/dist/type-registry.js +37 -0
- package/dist/type-registry.js.map +1 -0
- package/dist/types.d.ts +746 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +20 -0
- package/dist/types.js.map +1 -0
- package/dist/unresolved-nodes-report.d.ts +14 -0
- package/dist/unresolved-nodes-report.d.ts.map +1 -0
- package/dist/unresolved-nodes-report.js +96 -0
- package/dist/unresolved-nodes-report.js.map +1 -0
- package/dist/vocabulary.d.ts +150 -0
- package/dist/vocabulary.d.ts.map +1 -0
- package/dist/vocabulary.js +386 -0
- package/dist/vocabulary.js.map +1 -0
- package/dist/who-label.d.ts +28 -0
- package/dist/who-label.d.ts.map +1 -0
- package/dist/who-label.js +31 -0
- package/dist/who-label.js.map +1 -0
- package/dist/who-resolver.d.ts +15 -0
- package/dist/who-resolver.d.ts.map +1 -0
- package/dist/who-resolver.js +47 -0
- package/dist/who-resolver.js.map +1 -0
- package/dist/wire-content-hash.d.ts +93 -0
- package/dist/wire-content-hash.d.ts.map +1 -0
- package/dist/wire-content-hash.js +116 -0
- package/dist/wire-content-hash.js.map +1 -0
- package/dist/withheld-content.d.ts +13 -0
- package/dist/withheld-content.d.ts.map +1 -0
- package/dist/withheld-content.js +46 -0
- package/dist/withheld-content.js.map +1 -0
- package/dist/witness-alerts.d.ts +40 -0
- package/dist/witness-alerts.d.ts.map +1 -0
- package/dist/witness-alerts.js +102 -0
- package/dist/witness-alerts.js.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The line LCS, shared by the write path (DOD-DOC-WRITE-1) and the diff surfaces
|
|
3
|
+
* (DOD-DOC-NOTIFY-1).
|
|
4
|
+
*
|
|
5
|
+
* One implementation, deliberately. These two need to agree about what changed — the write path
|
|
6
|
+
* publishes hunks and the diff surfaces describe them to an operator — and two hand-rolled diffs
|
|
7
|
+
* that must agree are two things to keep in step, which is how they stop agreeing.
|
|
8
|
+
*
|
|
9
|
+
* ── WHY A REAL LCS AND NOT A PREFIX/SUFFIX TRIM ───────────────────────────────────────────────
|
|
10
|
+
*
|
|
11
|
+
* Measured twice, in two units, with the same result. A prefix/suffix trim is correct only when
|
|
12
|
+
* exactly one contiguous region changed; the moment a line is INSERTED or DELETED, everything after
|
|
13
|
+
* it shifts and a naive positional walk reports the whole remainder as rewritten:
|
|
14
|
+
*
|
|
15
|
+
* inserting one line at the top of a 3-line file -> +4 -3, one range covering the file
|
|
16
|
+
*
|
|
17
|
+
* In the write path (WRITE-1) that published text the file did not contain — four of six ordinary
|
|
18
|
+
* markdown edits. In the diff surfaces (NOTIFY-1) it made the overlap flag permanently true, which
|
|
19
|
+
* is worse than useless: the flag exists so an agent can tell whether the peer touched what it
|
|
20
|
+
* touched, and one that always says yes trains the agent to ignore it.
|
|
21
|
+
*
|
|
22
|
+
* A real LCS is also what emits SEPARATE runs for separated edits. One span from the first change
|
|
23
|
+
* to the last would delete and re-insert everything between them as new operations, resurrecting
|
|
24
|
+
* text a peer concurrently deleted — and under publish-on-intent, multi-edit publishes are the
|
|
25
|
+
* modal case.
|
|
26
|
+
*/
|
|
27
|
+
/** Above this many lines the table is not worth building — the caller falls back and says so. */
|
|
28
|
+
export declare const LCS_LINE_LIMIT = 4000;
|
|
29
|
+
/**
|
|
30
|
+
* A contiguous run of changed lines, as HALF-OPEN index ranges into each side.
|
|
31
|
+
*
|
|
32
|
+
* `aStart === aEnd` is a pure insertion; `bStart === bEnd` is a pure deletion. Half-open because
|
|
33
|
+
* the empty range then has an unambiguous spelling, which a closed range does not.
|
|
34
|
+
*/
|
|
35
|
+
export interface LineRun {
|
|
36
|
+
aStart: number;
|
|
37
|
+
aEnd: number;
|
|
38
|
+
bStart: number;
|
|
39
|
+
bEnd: number;
|
|
40
|
+
}
|
|
41
|
+
/** Lines carrying their own trailing newline; the last line carries none. */
|
|
42
|
+
export declare function toChunks(text: string): string[];
|
|
43
|
+
/**
|
|
44
|
+
* The runs of changed lines between two chunk arrays.
|
|
45
|
+
*
|
|
46
|
+
* Returns `null` when either side exceeds `LCS_LINE_LIMIT` — the quadratic table on a document
|
|
47
|
+
* that large is the wrong kind of thorough, and a caller that silently degraded instead of being
|
|
48
|
+
* told would report a whole-file rewrite as if it were a measurement.
|
|
49
|
+
*/
|
|
50
|
+
export declare function lineRuns(a: readonly string[], b: readonly string[]): LineRun[] | null;
|
|
51
|
+
//# sourceMappingURL=line-lcs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-lcs.d.ts","sourceRoot":"","sources":["../src/line-lcs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,iGAAiG;AACjG,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,6EAA6E;AAC7E,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAG/C;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,EAAE,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,EAAE,GAAG,IAAI,CA8BrF"}
|
package/dist/line-lcs.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The line LCS, shared by the write path (DOD-DOC-WRITE-1) and the diff surfaces
|
|
3
|
+
* (DOD-DOC-NOTIFY-1).
|
|
4
|
+
*
|
|
5
|
+
* One implementation, deliberately. These two need to agree about what changed — the write path
|
|
6
|
+
* publishes hunks and the diff surfaces describe them to an operator — and two hand-rolled diffs
|
|
7
|
+
* that must agree are two things to keep in step, which is how they stop agreeing.
|
|
8
|
+
*
|
|
9
|
+
* ── WHY A REAL LCS AND NOT A PREFIX/SUFFIX TRIM ───────────────────────────────────────────────
|
|
10
|
+
*
|
|
11
|
+
* Measured twice, in two units, with the same result. A prefix/suffix trim is correct only when
|
|
12
|
+
* exactly one contiguous region changed; the moment a line is INSERTED or DELETED, everything after
|
|
13
|
+
* it shifts and a naive positional walk reports the whole remainder as rewritten:
|
|
14
|
+
*
|
|
15
|
+
* inserting one line at the top of a 3-line file -> +4 -3, one range covering the file
|
|
16
|
+
*
|
|
17
|
+
* In the write path (WRITE-1) that published text the file did not contain — four of six ordinary
|
|
18
|
+
* markdown edits. In the diff surfaces (NOTIFY-1) it made the overlap flag permanently true, which
|
|
19
|
+
* is worse than useless: the flag exists so an agent can tell whether the peer touched what it
|
|
20
|
+
* touched, and one that always says yes trains the agent to ignore it.
|
|
21
|
+
*
|
|
22
|
+
* A real LCS is also what emits SEPARATE runs for separated edits. One span from the first change
|
|
23
|
+
* to the last would delete and re-insert everything between them as new operations, resurrecting
|
|
24
|
+
* text a peer concurrently deleted — and under publish-on-intent, multi-edit publishes are the
|
|
25
|
+
* modal case.
|
|
26
|
+
*/
|
|
27
|
+
/** Above this many lines the table is not worth building — the caller falls back and says so. */
|
|
28
|
+
export const LCS_LINE_LIMIT = 4000;
|
|
29
|
+
/** Lines carrying their own trailing newline; the last line carries none. */
|
|
30
|
+
export function toChunks(text) {
|
|
31
|
+
const lines = text.split("\n");
|
|
32
|
+
return lines.map((line, index) => (index < lines.length - 1 ? `${line}\n` : line));
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The runs of changed lines between two chunk arrays.
|
|
36
|
+
*
|
|
37
|
+
* Returns `null` when either side exceeds `LCS_LINE_LIMIT` — the quadratic table on a document
|
|
38
|
+
* that large is the wrong kind of thorough, and a caller that silently degraded instead of being
|
|
39
|
+
* told would report a whole-file rewrite as if it were a measurement.
|
|
40
|
+
*/
|
|
41
|
+
export function lineRuns(a, b) {
|
|
42
|
+
if (a.length > LCS_LINE_LIMIT || b.length > LCS_LINE_LIMIT)
|
|
43
|
+
return null;
|
|
44
|
+
const lcs = Array.from({ length: a.length + 1 }, () => new Array(b.length + 1).fill(0));
|
|
45
|
+
for (let i = a.length - 1; i >= 0; i--) {
|
|
46
|
+
for (let j = b.length - 1; j >= 0; j--) {
|
|
47
|
+
lcs[i][j] = a[i] === b[j] ? lcs[i + 1][j + 1] + 1 : Math.max(lcs[i + 1][j], lcs[i][j + 1]);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const runs = [];
|
|
51
|
+
let i = 0;
|
|
52
|
+
let j = 0;
|
|
53
|
+
while (i < a.length || j < b.length) {
|
|
54
|
+
if (i < a.length && j < b.length && a[i] === b[j]) {
|
|
55
|
+
i++;
|
|
56
|
+
j++;
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
const aStart = i;
|
|
60
|
+
const bStart = j;
|
|
61
|
+
while ((i < a.length || j < b.length) && !(i < a.length && j < b.length && a[i] === b[j])) {
|
|
62
|
+
if (j < b.length && (i === a.length || lcs[i][j + 1] >= lcs[i + 1][j]))
|
|
63
|
+
j++;
|
|
64
|
+
else
|
|
65
|
+
i++;
|
|
66
|
+
}
|
|
67
|
+
runs.push({ aStart, aEnd: i, bStart, bEnd: j });
|
|
68
|
+
}
|
|
69
|
+
return runs;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=line-lcs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-lcs.js","sourceRoot":"","sources":["../src/line-lcs.ts"],"names":[],"mappings":"AAA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CAAC;QACD,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lock file management for the CELLO daemon.
|
|
3
|
+
*
|
|
4
|
+
* Pseudocode:
|
|
5
|
+
* 1. acquireLock(path, content):
|
|
6
|
+
* - Write JSON content to path.tmp atomically
|
|
7
|
+
* - Rename path.tmp → path (atomic on POSIX)
|
|
8
|
+
* - Return true on success
|
|
9
|
+
*
|
|
10
|
+
* 2. readLock(path):
|
|
11
|
+
* - Read file, parse JSON
|
|
12
|
+
* - Validate shape: {pid: number, socketPath: string, version: string}
|
|
13
|
+
* - Return parsed content or null if missing/invalid
|
|
14
|
+
*
|
|
15
|
+
* 3. isProcessAlive(pid):
|
|
16
|
+
* - process.kill(pid, 0) — signal 0 checks existence without killing
|
|
17
|
+
* - Return true if no error thrown
|
|
18
|
+
*
|
|
19
|
+
* 4. removeLock(path):
|
|
20
|
+
* - Unlink the file, ignoring ENOENT
|
|
21
|
+
*/
|
|
22
|
+
import type { LockFileContent, Logger } from "./types.js";
|
|
23
|
+
export declare function readLock(lockPath: string): Promise<LockFileContent | null>;
|
|
24
|
+
export declare function acquireLock(lockPath: string, content: LockFileContent): Promise<void>;
|
|
25
|
+
export declare function removeLock(lockPath: string, logger: Logger): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* DOD-DAEMON-CLEANUP-1 (AC1) — remove the lock ONLY if it is still ours.
|
|
28
|
+
*
|
|
29
|
+
* An exiting daemon must not disarm a daemon it does not own. By the time we shut down, a DIFFERENT
|
|
30
|
+
* daemon may have written this lock; deleting it would leave that healthy daemon unreachable
|
|
31
|
+
* (`cello logout` reports "No daemon running") and the next `cello login` would spawn a third beside
|
|
32
|
+
* it. That is the cascade — the obvious recovery action, killing the orphan, propagates the bug.
|
|
33
|
+
*
|
|
34
|
+
* `removeLock` (unconditional) is still correct for the CLI's stale-lock cleanup, where the lock
|
|
35
|
+
* belongs to a process that is provably gone. It is NOT correct on the way out of a live daemon.
|
|
36
|
+
*/
|
|
37
|
+
export declare function removeLockIfOwned(lockPath: string, ownPid: number, logger: Logger): Promise<void>;
|
|
38
|
+
export declare function isProcessAlive(pid: number): boolean;
|
|
39
|
+
//# sourceMappingURL=lock-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lock-file.d.ts","sourceRoot":"","sources":["../src/lock-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAG1D,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAwBhF;AAED,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAU3F;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAWhF;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAwBf;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAOnD"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lock file management for the CELLO daemon.
|
|
3
|
+
*
|
|
4
|
+
* Pseudocode:
|
|
5
|
+
* 1. acquireLock(path, content):
|
|
6
|
+
* - Write JSON content to path.tmp atomically
|
|
7
|
+
* - Rename path.tmp → path (atomic on POSIX)
|
|
8
|
+
* - Return true on success
|
|
9
|
+
*
|
|
10
|
+
* 2. readLock(path):
|
|
11
|
+
* - Read file, parse JSON
|
|
12
|
+
* - Validate shape: {pid: number, socketPath: string, version: string}
|
|
13
|
+
* - Return parsed content or null if missing/invalid
|
|
14
|
+
*
|
|
15
|
+
* 3. isProcessAlive(pid):
|
|
16
|
+
* - process.kill(pid, 0) — signal 0 checks existence without killing
|
|
17
|
+
* - Return true if no error thrown
|
|
18
|
+
*
|
|
19
|
+
* 4. removeLock(path):
|
|
20
|
+
* - Unlink the file, ignoring ENOENT
|
|
21
|
+
*/
|
|
22
|
+
import { readFile, writeFile, rename, stat, unlink } from "node:fs/promises";
|
|
23
|
+
import { extractErrorMessage } from "./error-message.js";
|
|
24
|
+
export async function readLock(lockPath) {
|
|
25
|
+
let raw;
|
|
26
|
+
try {
|
|
27
|
+
raw = await readFile(lockPath, "utf-8");
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
if (err.code === "ENOENT") {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
throw err;
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
const parsed = JSON.parse(raw);
|
|
37
|
+
if (typeof parsed.pid !== "number" ||
|
|
38
|
+
typeof parsed.socketPath !== "string" ||
|
|
39
|
+
typeof parsed.version !== "string") {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
return { pid: parsed.pid, socketPath: parsed.socketPath, version: parsed.version };
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export async function acquireLock(lockPath, content) {
|
|
49
|
+
const tmpPath = lockPath + ".tmp";
|
|
50
|
+
const json = JSON.stringify(content, null, 2) + "\n";
|
|
51
|
+
await writeFile(tmpPath, json, { mode: 0o600 });
|
|
52
|
+
try {
|
|
53
|
+
await rename(tmpPath, lockPath);
|
|
54
|
+
}
|
|
55
|
+
catch (err) {
|
|
56
|
+
try {
|
|
57
|
+
await unlink(tmpPath);
|
|
58
|
+
}
|
|
59
|
+
catch { /* best-effort cleanup */ }
|
|
60
|
+
throw err;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export async function removeLock(lockPath, logger) {
|
|
64
|
+
try {
|
|
65
|
+
await unlink(lockPath);
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
if (err.code !== "ENOENT") {
|
|
69
|
+
logger.warn("daemon.lock.remove.failed", {
|
|
70
|
+
lockPath,
|
|
71
|
+
error: extractErrorMessage(err),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* DOD-DAEMON-CLEANUP-1 (AC1) — remove the lock ONLY if it is still ours.
|
|
78
|
+
*
|
|
79
|
+
* An exiting daemon must not disarm a daemon it does not own. By the time we shut down, a DIFFERENT
|
|
80
|
+
* daemon may have written this lock; deleting it would leave that healthy daemon unreachable
|
|
81
|
+
* (`cello logout` reports "No daemon running") and the next `cello login` would spawn a third beside
|
|
82
|
+
* it. That is the cascade — the obvious recovery action, killing the orphan, propagates the bug.
|
|
83
|
+
*
|
|
84
|
+
* `removeLock` (unconditional) is still correct for the CLI's stale-lock cleanup, where the lock
|
|
85
|
+
* belongs to a process that is provably gone. It is NOT correct on the way out of a live daemon.
|
|
86
|
+
*/
|
|
87
|
+
export async function removeLockIfOwned(lockPath, ownPid, logger) {
|
|
88
|
+
const lock = await readLock(lockPath);
|
|
89
|
+
if (lock === null) {
|
|
90
|
+
// readLock returns null for BOTH "absent" and "unparseable" — so this is the one place that
|
|
91
|
+
// cannot tell "nothing to do" from "something is wrong". Distinguish them: a lock file that
|
|
92
|
+
// exists but cannot be read (truncated by a full disk, a partial write) is left alone, because we
|
|
93
|
+
// cannot prove it is ours — but it is said out loud rather than passed over in silence.
|
|
94
|
+
try {
|
|
95
|
+
await stat(lockPath);
|
|
96
|
+
logger.warn("daemon.lock.unreadable", { ownPid, lockPath });
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
// Genuinely absent. Nothing to remove, nothing to report.
|
|
100
|
+
}
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (lock.pid !== ownPid) {
|
|
104
|
+
// SI: a daemon that declines to remove a lock says so. Silence here is what made the live
|
|
105
|
+
// incident so hard to see.
|
|
106
|
+
logger.info("daemon.lock.not_ours", { ownPid, lockPid: lock.pid, lockPath });
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
await removeLock(lockPath, logger);
|
|
110
|
+
}
|
|
111
|
+
export function isProcessAlive(pid) {
|
|
112
|
+
try {
|
|
113
|
+
process.kill(pid, 0);
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
catch {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=lock-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lock-file.js","sourceRoot":"","sources":["../src/lock-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,QAAgB;IAC7C,IAAI,GAAW,CAAC;IAChB,IAAI,CAAC;QACH,GAAG,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACtB,IAAK,GAA6B,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACrD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;IAED,IAAI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"./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* DOD-M15-LOGBOUND-1 part A — write a repeating log line ONCE, then count it.
|
|
4
|
+
*
|
|
5
|
+
* The file that produced this order was 180 MB and 469,065 lines. 168 MB of it — 95% — was a
|
|
6
|
+
* single `session.key.announce.failed` line repeated 413,590 times, byte-identical apart from its
|
|
7
|
+
* timestamp, from a retry that never gave up.
|
|
8
|
+
*
|
|
9
|
+
* **The disk was the smaller half.** That loop hid behind its own output for eleven hours. A file
|
|
10
|
+
* that is 95% one sentence is not a diagnostic surface; it is a haystack the daemon builds around
|
|
11
|
+
* its own needle, faster than anyone can read it.
|
|
12
|
+
*
|
|
13
|
+
* **This is the rule `045-REFUSALSTORM` applies to the operator's inbox, one layer down.** Same
|
|
14
|
+
* idea in two places, not two mechanisms.
|
|
15
|
+
*
|
|
16
|
+
* ⚠️ **This makes a storm cheap. It does not make a storm correct.** The loops themselves are
|
|
17
|
+
* fixed by `045-REFUSALSTORM` and `DOD-M15-KEYANNOUNCE-LOOP-1`; this unit must not be cited as
|
|
18
|
+
* covering either.
|
|
19
|
+
*
|
|
20
|
+
* ## The gate is a RATE, not a count — and the first build got this wrong
|
|
21
|
+
*
|
|
22
|
+
* The obvious design suppresses everything after the first occurrence and re-reports at the 10th,
|
|
23
|
+
* 100th, 1,000th. It was built that way, and review found two defects in it that matter more than
|
|
24
|
+
* the bytes it saved:
|
|
25
|
+
*
|
|
26
|
+
* 1. **A bounded retry that failed three times printed one line.** Three is not a power of ten, so
|
|
27
|
+
* attempts two and three were dropped and nothing anywhere ever said they happened. An operator
|
|
28
|
+
* whose standing receiver cannot bind then reads one `session.node.create.failed` followed by
|
|
29
|
+
* `session.standing_receiver.dead`, and cannot tell a retry that ran from a retry that never
|
|
30
|
+
* fired — which is the first thing they would go and check.
|
|
31
|
+
* 2. **A chronic failure went permanently silent.** A run never expired, so something failing once
|
|
32
|
+
* an hour reached its 10th occurrence on day one and was next written on day four. The daemon
|
|
33
|
+
* stopped reporting an ongoing failure precisely because it had been failing for a long time.
|
|
34
|
+
*
|
|
35
|
+
* So nothing is suppressed until a key is genuinely FLOODING: more than {@link STORM_BURST}
|
|
36
|
+
* occurrences inside {@link STORM_WINDOW_MS}. Below that rate every line is written exactly as it
|
|
37
|
+
* was before this unit existed. The measured storm ran at 4–17 lines/second and trips the gate on
|
|
38
|
+
* its 21st line; an ordinary two-to-nine repeat never trips it at all, and neither does a slow
|
|
39
|
+
* chronic failure — which is how both defects above stay fixed rather than traded against each
|
|
40
|
+
* other.
|
|
41
|
+
*/
|
|
42
|
+
/** Occurrences of one key inside one window that mean "this is a flood, not a repeat". */
|
|
43
|
+
export declare const STORM_BURST = 20;
|
|
44
|
+
/** The window the burst is measured over. Also the idle period that ENDS a storm. */
|
|
45
|
+
export declare const STORM_WINDOW_MS = 10000;
|
|
46
|
+
/**
|
|
47
|
+
* Bound on the table. Without one, the thing that removes an unbounded log would itself be an
|
|
48
|
+
* unbounded map — the same defect one layer further in.
|
|
49
|
+
*
|
|
50
|
+
* Eviction is least-recently-USED, and that is load-bearing rather than tidy. Plenty of events
|
|
51
|
+
* carry a value unique to the occurrence — a fresh root hash, a content hash, a peer id — so in
|
|
52
|
+
* ordinary operation the table is mostly keys that will never be seen again. Under
|
|
53
|
+
* insertion-order eviction the one key the table exists to hold, the one being hit thousands of
|
|
54
|
+
* times a second, is evicted on the same schedule as keys that are read once; the count resets and
|
|
55
|
+
* the single number that made the storm diagnosable is destroyed. Under LRU a never-repeating key
|
|
56
|
+
* is always the oldest and is always the first to go.
|
|
57
|
+
*/
|
|
58
|
+
export declare const LOG_COLLAPSE_MAX_KEYS = 2048;
|
|
59
|
+
/**
|
|
60
|
+
* Wrap a logger so a FLOODING line is written once and then counted.
|
|
61
|
+
*
|
|
62
|
+
* Wrapping the composition root covers every call site at once, which is what makes this a
|
|
63
|
+
* property of the daemon's logging rather than a discipline each call site has to remember.
|
|
64
|
+
*/
|
|
65
|
+
export declare function createCollapsingLogger(sink: Logger, now?: () => number): Logger;
|
|
66
|
+
//# sourceMappingURL=log-collapse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-collapse.d.ts","sourceRoot":"","sources":["../src/log-collapse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,0FAA0F;AAC1F,eAAO,MAAM,WAAW,KAAK,CAAC;AAE9B,qFAAqF;AACrF,eAAO,MAAM,eAAe,QAAS,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,OAAO,CAAC;AA0E1C;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,MAAiB,GAAG,MAAM,CAyIzF"}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DOD-M15-LOGBOUND-1 part A — write a repeating log line ONCE, then count it.
|
|
3
|
+
*
|
|
4
|
+
* The file that produced this order was 180 MB and 469,065 lines. 168 MB of it — 95% — was a
|
|
5
|
+
* single `session.key.announce.failed` line repeated 413,590 times, byte-identical apart from its
|
|
6
|
+
* timestamp, from a retry that never gave up.
|
|
7
|
+
*
|
|
8
|
+
* **The disk was the smaller half.** That loop hid behind its own output for eleven hours. A file
|
|
9
|
+
* that is 95% one sentence is not a diagnostic surface; it is a haystack the daemon builds around
|
|
10
|
+
* its own needle, faster than anyone can read it.
|
|
11
|
+
*
|
|
12
|
+
* **This is the rule `045-REFUSALSTORM` applies to the operator's inbox, one layer down.** Same
|
|
13
|
+
* idea in two places, not two mechanisms.
|
|
14
|
+
*
|
|
15
|
+
* ⚠️ **This makes a storm cheap. It does not make a storm correct.** The loops themselves are
|
|
16
|
+
* fixed by `045-REFUSALSTORM` and `DOD-M15-KEYANNOUNCE-LOOP-1`; this unit must not be cited as
|
|
17
|
+
* covering either.
|
|
18
|
+
*
|
|
19
|
+
* ## The gate is a RATE, not a count — and the first build got this wrong
|
|
20
|
+
*
|
|
21
|
+
* The obvious design suppresses everything after the first occurrence and re-reports at the 10th,
|
|
22
|
+
* 100th, 1,000th. It was built that way, and review found two defects in it that matter more than
|
|
23
|
+
* the bytes it saved:
|
|
24
|
+
*
|
|
25
|
+
* 1. **A bounded retry that failed three times printed one line.** Three is not a power of ten, so
|
|
26
|
+
* attempts two and three were dropped and nothing anywhere ever said they happened. An operator
|
|
27
|
+
* whose standing receiver cannot bind then reads one `session.node.create.failed` followed by
|
|
28
|
+
* `session.standing_receiver.dead`, and cannot tell a retry that ran from a retry that never
|
|
29
|
+
* fired — which is the first thing they would go and check.
|
|
30
|
+
* 2. **A chronic failure went permanently silent.** A run never expired, so something failing once
|
|
31
|
+
* an hour reached its 10th occurrence on day one and was next written on day four. The daemon
|
|
32
|
+
* stopped reporting an ongoing failure precisely because it had been failing for a long time.
|
|
33
|
+
*
|
|
34
|
+
* So nothing is suppressed until a key is genuinely FLOODING: more than {@link STORM_BURST}
|
|
35
|
+
* occurrences inside {@link STORM_WINDOW_MS}. Below that rate every line is written exactly as it
|
|
36
|
+
* was before this unit existed. The measured storm ran at 4–17 lines/second and trips the gate on
|
|
37
|
+
* its 21st line; an ordinary two-to-nine repeat never trips it at all, and neither does a slow
|
|
38
|
+
* chronic failure — which is how both defects above stay fixed rather than traded against each
|
|
39
|
+
* other.
|
|
40
|
+
*/
|
|
41
|
+
/** Occurrences of one key inside one window that mean "this is a flood, not a repeat". */
|
|
42
|
+
export const STORM_BURST = 20;
|
|
43
|
+
/** The window the burst is measured over. Also the idle period that ENDS a storm. */
|
|
44
|
+
export const STORM_WINDOW_MS = 10_000;
|
|
45
|
+
/**
|
|
46
|
+
* Bound on the table. Without one, the thing that removes an unbounded log would itself be an
|
|
47
|
+
* unbounded map — the same defect one layer further in.
|
|
48
|
+
*
|
|
49
|
+
* Eviction is least-recently-USED, and that is load-bearing rather than tidy. Plenty of events
|
|
50
|
+
* carry a value unique to the occurrence — a fresh root hash, a content hash, a peer id — so in
|
|
51
|
+
* ordinary operation the table is mostly keys that will never be seen again. Under
|
|
52
|
+
* insertion-order eviction the one key the table exists to hold, the one being hit thousands of
|
|
53
|
+
* times a second, is evicted on the same schedule as keys that are read once; the count resets and
|
|
54
|
+
* the single number that made the storm diagnosable is destroyed. Under LRU a never-repeating key
|
|
55
|
+
* is always the oldest and is always the first to go.
|
|
56
|
+
*/
|
|
57
|
+
export const LOG_COLLAPSE_MAX_KEYS = 2048;
|
|
58
|
+
/** Separator for key parts. A control character cannot appear in an event name or a field value. */
|
|
59
|
+
const SEP = String.fromCharCode(31);
|
|
60
|
+
/**
|
|
61
|
+
* The collapse key.
|
|
62
|
+
*
|
|
63
|
+
* ⚠️ **IT MUST NOT BE LOOSER THAN event + session + reason**, and it is exactly that. Keying on the
|
|
64
|
+
* event name alone would merge a hundred sessions failing once each into one line reading "x100" —
|
|
65
|
+
* strictly worse than the noise this removes, because a fan-out is the shape you most need to see
|
|
66
|
+
* and it would be reported as a repeat. The level is in the key too: the same event at `warn` and
|
|
67
|
+
* at `error` is two facts.
|
|
68
|
+
*
|
|
69
|
+
* **And it is deliberately NOT the whole payload**, which is the second thing the first build got
|
|
70
|
+
* wrong. Keying on every field looked tighter and therefore safer, and it is neither:
|
|
71
|
+
*
|
|
72
|
+
* - `session.key.announce.failed` — the very event this unit was written for — carries an `attempt`
|
|
73
|
+
* counter. Every attempt is a different payload, so a full-payload key collapses NOTHING on the
|
|
74
|
+
* one path that produced 168 MB. The historical storm only collapsed because the pre-fix bug
|
|
75
|
+
* pinned `attempt` at 1; the fix that made the retry chain correct is what would have defeated it.
|
|
76
|
+
* - A loop minting a fresh key per iteration also churns the whole table at the rate it runs,
|
|
77
|
+
* evicting every other run in it.
|
|
78
|
+
*
|
|
79
|
+
* The cost of the looser key is paid elsewhere rather than ignored: because suppression is gated on
|
|
80
|
+
* a RATE, a payload field that changes between occurrences is written in full at any ordinary rate,
|
|
81
|
+
* and is only folded once the key is genuinely flooding — at which point a count and a rate are
|
|
82
|
+
* more use than ten thousand individual values. Milestones republish the most recent payload, so
|
|
83
|
+
* the newest values stay on the record.
|
|
84
|
+
*
|
|
85
|
+
* Returns `null` when the key cannot be built from what the call site passed. **Such a line does
|
|
86
|
+
* not collapse at all** — losing the saving is correct where losing the distinction is not.
|
|
87
|
+
*/
|
|
88
|
+
function collapseKey(level, event, ctx) {
|
|
89
|
+
const sessionId = ctx["sessionId"];
|
|
90
|
+
const reason = ctx["reason"];
|
|
91
|
+
if (typeof sessionId !== "string" && typeof reason !== "string")
|
|
92
|
+
return null;
|
|
93
|
+
return [level, event, String(sessionId ?? ""), String(reason ?? "")].join(SEP);
|
|
94
|
+
}
|
|
95
|
+
/** First occurrence, then the 10th, 100th, 1,000th — a power of ten. */
|
|
96
|
+
function isMilestone(count) {
|
|
97
|
+
if (count === 1)
|
|
98
|
+
return true;
|
|
99
|
+
let n = count;
|
|
100
|
+
while (n % 10 === 0)
|
|
101
|
+
n /= 10;
|
|
102
|
+
return n === 1;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Wrap a logger so a FLOODING line is written once and then counted.
|
|
106
|
+
*
|
|
107
|
+
* Wrapping the composition root covers every call site at once, which is what makes this a
|
|
108
|
+
* property of the daemon's logging rather than a discipline each call site has to remember.
|
|
109
|
+
*/
|
|
110
|
+
export function createCollapsingLogger(sink, now = Date.now) {
|
|
111
|
+
const runs = new Map();
|
|
112
|
+
/**
|
|
113
|
+
* Report a fold that has ended: how many lines it swallowed, and over how long.
|
|
114
|
+
*
|
|
115
|
+
* ⚠️ **THE WINDOW IS MEASURED TO THE LAST OCCURRENCE, NOT TO NOW**, and getting that wrong made
|
|
116
|
+
* this line state the opposite of what happened. A flood of 479 lines over 25 seconds — 19 a
|
|
117
|
+
* second — was reported as `repeatWindowMs: 21623950`, six hours, because the idle gap that
|
|
118
|
+
* proved the flood was over had already been folded into the elapsed time. An operator dividing
|
|
119
|
+
* those two numbers reads 1.3 an hour: a trickle, when it was the storm.
|
|
120
|
+
*/
|
|
121
|
+
function closeRun(run) {
|
|
122
|
+
sink[run.level](run.event, {
|
|
123
|
+
...run.lastCtx,
|
|
124
|
+
repeatedCount: run.suppressedCount,
|
|
125
|
+
repeatWindowMs: Math.max(0, run.lastAtMs - run.suppressStartMs),
|
|
126
|
+
repeatEnded: true,
|
|
127
|
+
});
|
|
128
|
+
run.suppressing = false;
|
|
129
|
+
run.suppressedCount = 0;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* One amortised look at the oldest run per line written.
|
|
133
|
+
*
|
|
134
|
+
* Without it a fold that simply STOPS is never reported: the closing line is emitted by the
|
|
135
|
+
* key's own next occurrence, and a storm whose cause is fixed — or whose daemon is shut down —
|
|
136
|
+
* has no next occurrence. The measured 413,590-line storm would have ended on
|
|
137
|
+
* `repeatedCount: 100000`, understating itself fourfold, with nothing saying it had finished.
|
|
138
|
+
*/
|
|
139
|
+
function sweepOldest(at, currentKey) {
|
|
140
|
+
const oldest = runs.entries().next();
|
|
141
|
+
if (oldest.done)
|
|
142
|
+
return;
|
|
143
|
+
const [key, run] = oldest.value;
|
|
144
|
+
if (key === currentKey)
|
|
145
|
+
return;
|
|
146
|
+
if (at - run.lastAtMs < STORM_WINDOW_MS)
|
|
147
|
+
return;
|
|
148
|
+
if (run.suppressing)
|
|
149
|
+
closeRun(run);
|
|
150
|
+
runs.delete(key);
|
|
151
|
+
}
|
|
152
|
+
function emit(level, event, ctx) {
|
|
153
|
+
const key = collapseKey(level, event, ctx);
|
|
154
|
+
if (key === null) {
|
|
155
|
+
sink[level](event, ctx);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
const at = now();
|
|
159
|
+
sweepOldest(at, key);
|
|
160
|
+
const existing = runs.get(key);
|
|
161
|
+
if (existing === undefined) {
|
|
162
|
+
if (runs.size >= LOG_COLLAPSE_MAX_KEYS) {
|
|
163
|
+
const oldest = runs.entries().next();
|
|
164
|
+
if (!oldest.done) {
|
|
165
|
+
// Evicting a run mid-fold would take its total with it and restart the next occurrence
|
|
166
|
+
// from one. Over-reporting is the safe direction; losing the count is not.
|
|
167
|
+
if (oldest.value[1].suppressing)
|
|
168
|
+
closeRun(oldest.value[1]);
|
|
169
|
+
runs.delete(oldest.value[0]);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
runs.set(key, {
|
|
173
|
+
level, event, windowStartMs: at, lastAtMs: at, windowCount: 1,
|
|
174
|
+
suppressing: false, suppressStartMs: 0, suppressedCount: 0, lastCtx: ctx,
|
|
175
|
+
});
|
|
176
|
+
sink[level](event, ctx);
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
// Least-recently-USED: re-inserting moves this key to the young end of the eviction order.
|
|
180
|
+
runs.delete(key);
|
|
181
|
+
runs.set(key, existing);
|
|
182
|
+
/**
|
|
183
|
+
* A gap longer than a window means the flood has stopped — measured from the PREVIOUS
|
|
184
|
+
* occurrence, never from the window's own tally. Reading the tally was the first version of
|
|
185
|
+
* this and it could never end a storm: during one, the count carried over from the last
|
|
186
|
+
* window is high by definition, so the "has it died down" test was never true.
|
|
187
|
+
*/
|
|
188
|
+
const idle = at - existing.lastAtMs >= STORM_WINDOW_MS;
|
|
189
|
+
if (idle) {
|
|
190
|
+
if (existing.suppressing)
|
|
191
|
+
closeRun(existing);
|
|
192
|
+
existing.windowStartMs = at;
|
|
193
|
+
existing.windowCount = 0;
|
|
194
|
+
}
|
|
195
|
+
else if (at - existing.windowStartMs >= STORM_WINDOW_MS) {
|
|
196
|
+
/**
|
|
197
|
+
* ⚠️ A FULL WINDOW PASSED WITH TRAFFIC — so re-test the RATE, do not just roll the window.
|
|
198
|
+
* Without this, `suppressing` latches: the only exit is a ten-second silence, so a retry
|
|
199
|
+
* that starts fast and backs off to anything under one line per ten seconds stays folded
|
|
200
|
+
* forever. Measured on the built module: 30 lines in 3 seconds trips the gate, and the next
|
|
201
|
+
* 1,200 occurrences spread over three hours produce three lines. That is the chronic-failure
|
|
202
|
+
* silence this redesign was written to remove, re-entered through a different door.
|
|
203
|
+
*/
|
|
204
|
+
if (existing.suppressing && existing.windowCount <= STORM_BURST)
|
|
205
|
+
closeRun(existing);
|
|
206
|
+
existing.windowStartMs = at;
|
|
207
|
+
existing.windowCount = 0;
|
|
208
|
+
}
|
|
209
|
+
existing.lastAtMs = at;
|
|
210
|
+
existing.windowCount += 1;
|
|
211
|
+
if (existing.suppressing) {
|
|
212
|
+
existing.lastCtx = ctx;
|
|
213
|
+
existing.suppressedCount += 1;
|
|
214
|
+
// The 1st suppressed occurrence is not a milestone worth printing — the line that tripped
|
|
215
|
+
// the gate, immediately above it, already said the fold had started.
|
|
216
|
+
if (existing.suppressedCount === 1 || !isMilestone(existing.suppressedCount))
|
|
217
|
+
return;
|
|
218
|
+
sink[level](event, {
|
|
219
|
+
...ctx,
|
|
220
|
+
repeatedCount: existing.suppressedCount,
|
|
221
|
+
repeatWindowMs: Math.max(0, at - existing.suppressStartMs),
|
|
222
|
+
});
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
if (existing.windowCount > STORM_BURST) {
|
|
226
|
+
// The gate trips. This line is still written in full, and says that the ones behind it
|
|
227
|
+
// will not be — an operator should never have to infer that lines are being dropped.
|
|
228
|
+
existing.suppressing = true;
|
|
229
|
+
existing.suppressStartMs = at;
|
|
230
|
+
existing.suppressedCount = 0;
|
|
231
|
+
existing.lastCtx = ctx;
|
|
232
|
+
sink[level](event, { ...ctx, repeatsCollapsing: true, repeatRatePerWindow: existing.windowCount });
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
sink[level](event, ctx);
|
|
236
|
+
}
|
|
237
|
+
return {
|
|
238
|
+
debug: (event, ctx) => { emit("debug", event, ctx); },
|
|
239
|
+
info: (event, ctx) => { emit("info", event, ctx); },
|
|
240
|
+
warn: (event, ctx) => { emit("warn", event, ctx); },
|
|
241
|
+
error: (event, ctx) => { emit("error", event, ctx); },
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
//# sourceMappingURL=log-collapse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-collapse.js","sourceRoot":"","sources":["../src/log-collapse.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,0FAA0F;AAC1F,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AAE9B,qFAAqF;AACrF,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAE1C,oGAAoG;AACpG,MAAM,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AA4BpC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,SAAS,WAAW,CAAC,KAAa,EAAE,KAAa,EAAE,GAA4B;IAC7E,MAAM,SAAS,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC7B,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC7E,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACjF,CAAC;AAED,wEAAwE;AACxE,SAAS,WAAW,CAAC,KAAa;IAChC,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7B,IAAI,CAAC,GAAG,KAAK,CAAC;IACd,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC;QAAE,CAAC,IAAI,EAAE,CAAC;IAC7B,OAAO,CA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