@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,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DOD-DOC-INBOUND-2 — routing an arriving session frame to the document layer.
|
|
3
|
+
*
|
|
4
|
+
* Document traffic and conversation traffic share the session content channel, so something has to
|
|
5
|
+
* decide which is which. That decision has consequences beyond dispatch, and they are the reason
|
|
6
|
+
* this is a unit rather than an `if` at the call site:
|
|
7
|
+
*
|
|
8
|
+
* - A document frame is NOT a transcript message. Recording one would put CRDT bytes into the
|
|
9
|
+
* operator's conversation history, where `cello_receive` would hand them to an agent as
|
|
10
|
+
* something a person said.
|
|
11
|
+
* - A document frame raises NO DOORBELL (§11.3 — doorbell-on-update is parked). A collaborator
|
|
12
|
+
* typing produces a stream of updates, and a doorbell per update would interrupt the operator's
|
|
13
|
+
* agent continuously for something with no deadline.
|
|
14
|
+
* - A document frame is still a LEAF. The seal covers it as a `0x04` doc-op leaf; that is what
|
|
15
|
+
* makes the exchange provable. Consuming a frame means "do not treat this as conversation", not
|
|
16
|
+
* "pretend it did not arrive".
|
|
17
|
+
*
|
|
18
|
+
* ── CLASSIFICATION IS BY DECODE, BEHIND A STRUCTURAL GUARD ────────────────────────────────────
|
|
19
|
+
*
|
|
20
|
+
* A frame is a document frame iff it DECODES as one. No content heuristic, no first-byte guess
|
|
21
|
+
* about what the bytes mean — the same reasoning that made the update envelope carry its encoding
|
|
22
|
+
* explicitly rather than let a decoder infer it. Anything that does not decode is conversation,
|
|
23
|
+
* which is the safe direction: a misrouted document frame lands in a transcript where it is
|
|
24
|
+
* visible, while a misrouted MESSAGE would vanish into the document layer and never reach the
|
|
25
|
+
* operator.
|
|
26
|
+
*
|
|
27
|
+
* A CONVERSATION MESSAGE CANNOT REACH A DECODER AT ALL, and the reason is structural rather than
|
|
28
|
+
* statistical. Both halves verified here, not assumed:
|
|
29
|
+
*
|
|
30
|
+
* - `couldBeDocumentFrame` requires byte 0 in `0xa0`–`0xb9`, and NONE of those can begin a valid
|
|
31
|
+
* UTF-8 sequence — they are all continuation bytes (checked against a fatal `TextDecoder`).
|
|
32
|
+
* - A legitimate message IS UTF-8, by construction rather than by convention: the send path
|
|
33
|
+
* encodes it with `new TextEncoder().encode(...)` (`session-content-handlers.ts`), and there is
|
|
34
|
+
* no binary-content path. Its first byte is therefore ASCII (`< 0x80`) or a LEAD byte
|
|
35
|
+
* (`0xc2`–`0xf4`) — never a continuation byte. Note it is NOT always `< 0x80`: a message
|
|
36
|
+
* beginning in French, Arabic or Chinese starts at `0xc2` or above and is still clear of the
|
|
37
|
+
* admitted range. Getting that wrong would invite someone to widen the range on a false premise.
|
|
38
|
+
*
|
|
39
|
+
* So no text an operator types, and no text an attacker persuades them to send, is ever classified
|
|
40
|
+
* as a document frame. (A hostile PEER can put raw non-UTF-8 bytes on the channel and have them
|
|
41
|
+
* classified as document traffic — but that only suppresses their own message.)
|
|
42
|
+
*
|
|
43
|
+
* ── THE HEADER GUARD IS A FAST PATH, NOT THE SECURITY BOUNDARY ────────────────────────────────
|
|
44
|
+
*
|
|
45
|
+
* Handing hostile bytes to a CBOR decoder is a denial of service — measured at seconds and
|
|
46
|
+
* gigabytes for a few bytes — and `classify` runs on EVERY inbound frame, so a peer could stall or
|
|
47
|
+
* OOM the daemon's whole content path and stop the operator's ordinary MESSAGES.
|
|
48
|
+
*
|
|
49
|
+
* `couldBeDocumentFrame` was written as the fix and IS NOT ONE. It inspects the header, and the cost
|
|
50
|
+
* lives in structures NESTED inside it: `a1 9f` — a one-pair map whose first key is an
|
|
51
|
+
* indefinite-length array — is three bytes, passes any header check, and cost 9.6 seconds and
|
|
52
|
+
* 1.1 GB. Prefixing the real frames' own `b9 000a` does the same. No header-shaped guard can be
|
|
53
|
+
* sound here.
|
|
54
|
+
*
|
|
55
|
+
* The decoder limit in `cbor.ts` cuts the per-byte amplification by ~43,000×, and it is still not
|
|
56
|
+
* the whole answer: cbor-x pre-allocates `new Array(declaredCount)` before reading any element, so
|
|
57
|
+
* NESTED arrays each under that cap still allocate — measured, 15 KB of them costs ~230 ms and
|
|
58
|
+
* ~2.3 GB. What makes the nesting depth finite is an INPUT LENGTH CAP, which is why one is applied
|
|
59
|
+
* here, at the peer-bytes boundary, before anything else looks at the frame.
|
|
60
|
+
*
|
|
61
|
+
* So the three layers, in the order they run and with what each is actually for:
|
|
62
|
+
* MAX_DOCUMENT_FRAME_BYTES — bounds the nesting depth. The one that closes the class.
|
|
63
|
+
* couldBeDocumentFrame — a cheap fast path; keeps every conversation message out of the
|
|
64
|
+
* decoder, and is what the UTF-8 argument above rests on.
|
|
65
|
+
* cbor.ts size limits — bounds a single container. Reduces amplification; not a boundary.
|
|
66
|
+
*
|
|
67
|
+
* The guard must never again be described as what makes hostile input safe. It was, and it was not.
|
|
68
|
+
*/
|
|
69
|
+
import type { DocumentInbound } from "./document-inbound.js";
|
|
70
|
+
import type { Logger } from "./types.js";
|
|
71
|
+
/**
|
|
72
|
+
* What the session layer should do with the frame.
|
|
73
|
+
*
|
|
74
|
+
* `consumed: false` means "this is not document traffic" — the caller records it as a transcript
|
|
75
|
+
* message and fires the doorbell exactly as before. Nothing about the conversation path changes.
|
|
76
|
+
*/
|
|
77
|
+
/** Every document frame kind that can arrive on the session channel. */
|
|
78
|
+
export type DocumentFrameKind = "update" | "proposal" | "rejection" | "proposal_ack" | "amendment" | "reconcile";
|
|
79
|
+
export type FrameRouting = {
|
|
80
|
+
consumed: false;
|
|
81
|
+
} | {
|
|
82
|
+
consumed: true;
|
|
83
|
+
kind: DocumentFrameKind;
|
|
84
|
+
ok: boolean;
|
|
85
|
+
reason?: string;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* What the session layer needs SYNCHRONOUSLY: is this document traffic, and therefore which leaf
|
|
89
|
+
* kind does the frame get.
|
|
90
|
+
*
|
|
91
|
+
* The handling itself is async — a gate refusal has to SIGN a `0x05` leaf, and signing goes through
|
|
92
|
+
* an async key provider — but `#appendVerifiedContent` decides the leaf kind inline and cannot wait.
|
|
93
|
+
* Splitting the two is what lets both be true without making the whole content path async.
|
|
94
|
+
*/
|
|
95
|
+
export type FrameClassification = {
|
|
96
|
+
consumed: false;
|
|
97
|
+
} | {
|
|
98
|
+
consumed: true;
|
|
99
|
+
kind: DocumentFrameKind;
|
|
100
|
+
};
|
|
101
|
+
export interface DocumentFrameRouterDeps {
|
|
102
|
+
inbound: DocumentInbound;
|
|
103
|
+
/**
|
|
104
|
+
* Record an arriving PROPOSAL. Without this a proposal frame is not document traffic as far as
|
|
105
|
+
* the router is concerned, so it falls through to the conversation path and lands in the
|
|
106
|
+
* operator's transcript as unreadable bytes — the exact failure the classification exists to
|
|
107
|
+
* prevent, arriving through the one frame kind nobody had wired.
|
|
108
|
+
*/
|
|
109
|
+
recordProposal(ownerAgentId: string, wire: Uint8Array, nowMs: number): void;
|
|
110
|
+
/** Record a rejection the PEER sent us — the receiving half of §3.2. */
|
|
111
|
+
recordRejection(ownerAgentId: string, wire: Uint8Array, nowMs: number): void;
|
|
112
|
+
/**
|
|
113
|
+
* Record the peer's ANSWER to a proposal we authored. Unclassified, this frame falls through to
|
|
114
|
+
* the conversation path and an operator's agent is handed a CBOR ack as something a person said.
|
|
115
|
+
*/
|
|
116
|
+
recordProposalAck(ownerAgentId: string, wire: Uint8Array, nowMs: number): void;
|
|
117
|
+
/**
|
|
118
|
+
* The peer has CLOSED or KILLED the document. Unclassified, this frame falls through to the
|
|
119
|
+
* conversation path and the operator keeps publishing into a document that will never answer,
|
|
120
|
+
* with nothing on their screen explaining why.
|
|
121
|
+
*/
|
|
122
|
+
/**
|
|
123
|
+
* M14B / DOD-MP-JOIN-1 — an admin's offer to a third party. Validated (the invitee REPLAYS the
|
|
124
|
+
* carried bytes) and recorded — pending or refused-with-reason, never dropped.
|
|
125
|
+
*/
|
|
126
|
+
/**
|
|
127
|
+
* An amendment reaching an EXISTING holder — validated against our own chain
|
|
128
|
+
* (validate-before-append) and appended, so our derived participant set does not silently
|
|
129
|
+
* diverge from the amender's (§7-1's hazard). Best-effort delivery at P1; the inbound epoch
|
|
130
|
+
* gate makes a missed one loud.
|
|
131
|
+
*/
|
|
132
|
+
recordAmendment(ownerAgentId: string, wire: Uint8Array, nowMs: number): void;
|
|
133
|
+
/**
|
|
134
|
+
* SYNC-P3 — answer (or absorb) a reconcile exchange. Needs the SESSION's authenticated sender:
|
|
135
|
+
* the frame is unsigned by design, and entitlement (R17/R18) is a question about who is
|
|
136
|
+
* ASKING, which only the transport identity can answer. Everything the frame carries is still
|
|
137
|
+
* individually signed and verified on apply.
|
|
138
|
+
*/
|
|
139
|
+
handleReconcile(ownerAgentId: string, wire: Uint8Array, senderAgentId: string, nowMs: number, correlationId: string): Promise<{
|
|
140
|
+
ok: boolean;
|
|
141
|
+
reason?: string;
|
|
142
|
+
}>;
|
|
143
|
+
/**
|
|
144
|
+
* Tell the sender what happened to their envelope — admitted or refused, both of which SETTLE it.
|
|
145
|
+
*
|
|
146
|
+
* REQUIRED, not optional. Without it the sender has no answer and redelivers until the document
|
|
147
|
+
* stalls; an optional callback would make that outcome a configuration rather than a bug.
|
|
148
|
+
*/
|
|
149
|
+
/**
|
|
150
|
+
* Re-project the document onto disk after admitting a peer's update.
|
|
151
|
+
*
|
|
152
|
+
* Required rather than optional: a file surface that only ever writes the local operator's edits
|
|
153
|
+
* out is worse than none, because the stale file reads as the document and gets published back
|
|
154
|
+
* over the peer's work. A daemon with no workspace configured implements this as a no-op.
|
|
155
|
+
*/
|
|
156
|
+
rewriteFile(ownerAgentId: string, inResponseTo: Uint8Array): Promise<void>;
|
|
157
|
+
/**
|
|
158
|
+
* Record that the peer changed this document and the agent has not read it yet — §16.5's passive
|
|
159
|
+
* notification.
|
|
160
|
+
*
|
|
161
|
+
* Wired 2026-08-08. The writer and the reader both existed and NEITHER had a production caller,
|
|
162
|
+
* so an admitted update wrote nothing and `cello_check_notifications` had no document section at
|
|
163
|
+
* all; `cello_doc_read` was clearing rows that could never exist. An agent learned a document had
|
|
164
|
+
* moved only by polling. That is the unit-with-no-caller shape this milestone was burned by, and
|
|
165
|
+
* it was carried onto DOC-TOOLS-1 as an explicit clause and left unwired.
|
|
166
|
+
*/
|
|
167
|
+
noticeInboundUpdate(ownerAgentId: string, inResponseTo: Uint8Array): void;
|
|
168
|
+
/** Put an already-signed frame on the wire to whoever authored `wire` — the rejection, today. */
|
|
169
|
+
sendFrameToPeer(ownerAgentId: string, inResponseTo: Uint8Array, bytes: Uint8Array): Promise<void>;
|
|
170
|
+
/**
|
|
171
|
+
* Map the daemon's AGENT NAME — the only identifier the session content path carries — to the
|
|
172
|
+
* stable owner key every document row is scoped by (M14-D5: our own K_local pubkey hex).
|
|
173
|
+
*
|
|
174
|
+
* REQUIRED, and required to be here rather than at the call site, because classification must
|
|
175
|
+
* stay synchronous and must not be done twice: `classify` runs up to four CBOR decodes and this
|
|
176
|
+
* is on every inbound frame.
|
|
177
|
+
*
|
|
178
|
+
* The two identifiers are NOT interchangeable and the store says so. Scoping inbound by name
|
|
179
|
+
* while the delivery sweep scopes by pubkey hex writes every received envelope where no query
|
|
180
|
+
* looks: `pendingDeliveries` returns empty, the sweep reports nothing attempted, and a fully
|
|
181
|
+
* synced document is invisible to both halves with no error on any path. Agent NAME is also
|
|
182
|
+
* mutable and reusable after retirement, so it may never be a join key.
|
|
183
|
+
*
|
|
184
|
+
* Returning null is a refusal, not a fallback — the frame is still consumed, because it IS a
|
|
185
|
+
* document frame and letting it fall through would put CRDT bytes in the operator's transcript.
|
|
186
|
+
*/
|
|
187
|
+
ownerKeyFor(agentName: string): string | null;
|
|
188
|
+
logger: Logger;
|
|
189
|
+
}
|
|
190
|
+
export declare class DocumentFrameRouter {
|
|
191
|
+
#private;
|
|
192
|
+
constructor(deps: DocumentFrameRouterDeps);
|
|
193
|
+
/**
|
|
194
|
+
* Classify and dispatch. Returns whether the document layer consumed the frame.
|
|
195
|
+
*
|
|
196
|
+
* NEVER THROWS. A throw here would escape into the session content path and take down message
|
|
197
|
+
* delivery for the whole session — conversation traffic failing because a document frame was
|
|
198
|
+
* malformed. A document frame that cannot be handled is consumed and reported; the session keeps
|
|
199
|
+
* running.
|
|
200
|
+
*/
|
|
201
|
+
/**
|
|
202
|
+
* The SYNCHRONOUS half: classify, and start the handling.
|
|
203
|
+
*
|
|
204
|
+
* Returns immediately with what the session layer needs to pick a leaf kind. The handling runs on
|
|
205
|
+
* a per-document queue — see `#handle` — so the caller never waits and frames for one document
|
|
206
|
+
* never overtake each other.
|
|
207
|
+
*/
|
|
208
|
+
routeSync(agentName: string, content: Uint8Array, nowMs: number, correlationId: string, senderAgentId?: string): FrameClassification;
|
|
209
|
+
/** Classify and handle, awaiting the outcome. The path a caller takes when it wants the verdict. */
|
|
210
|
+
route(ownerAgentId: string, content: Uint8Array, nowMs: number, correlationId: string, senderAgentId?: string): Promise<FrameRouting>;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* The largest field count a document frame can declare. The update envelope has 10 fields and the
|
|
214
|
+
* ack has 9; the bound is generous so a future field does not silently start routing frames to the
|
|
215
|
+
* transcript, and tight enough that a map header claiming millions of pairs never reaches a decoder.
|
|
216
|
+
*/
|
|
217
|
+
export declare const MAX_DOCUMENT_FRAME_FIELDS = 32;
|
|
218
|
+
/**
|
|
219
|
+
* The largest a document frame can legitimately be, and the bound that makes the decode's nesting
|
|
220
|
+
* depth finite.
|
|
221
|
+
*
|
|
222
|
+
* Sized off the payload it has to carry: the gate caps an update at 1 MiB, and everything else in
|
|
223
|
+
* the envelope — two hashes, an agent id, a state vector, a signature — is small. 2 MiB is
|
|
224
|
+
* comfortably above any real frame and far below the size at which nested-array pre-allocation
|
|
225
|
+
* becomes expensive.
|
|
226
|
+
*
|
|
227
|
+
* This is the layer that actually closes the pathological-input class. The decoder's per-container
|
|
228
|
+
* limit reduces amplification; only a bound on the INPUT can bound the depth.
|
|
229
|
+
*/
|
|
230
|
+
export declare const MAX_DOCUMENT_FRAME_BYTES: number;
|
|
231
|
+
/**
|
|
232
|
+
* DOD-DOC-SCREEN-CLASSIFY-1 — is this a document frame, and nothing else.
|
|
233
|
+
*
|
|
234
|
+
* The classify-only entry point the session ingest uses to decide whether the shared message
|
|
235
|
+
* screener's CONTENT steps apply. They are inert for a document frame — the frame is a signed CBOR
|
|
236
|
+
* envelope, so the sanitizer's rewrites are discarded by the funnel (see `#appendVerifiedContent`'s
|
|
237
|
+
* `originalContent` note) and the language/pattern checks judge a UTF-8 decode of binary. What
|
|
238
|
+
* actually screens document content is the gate + `screenText`, in-process, on the projected text.
|
|
239
|
+
*
|
|
240
|
+
* Reuses `classify` — a second copy of the discriminator rule is how the two callers drift. The
|
|
241
|
+
* header guard keeps the cost off conversation messages: no byte in `0xa0`–`0xb9` can begin valid
|
|
242
|
+
* UTF-8 text, so ordinary messages return false on the first byte.
|
|
243
|
+
*/
|
|
244
|
+
export declare function isDocumentFrame(content: Uint8Array): boolean;
|
|
245
|
+
//# sourceMappingURL=document-frame-router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-frame-router.d.ts","sourceRoot":"","sources":["../src/document-frame-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAWH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGzC;;;;;GAKG;AACH,wEAAwE;AACxE,MAAM,MAAM,iBAAiB,GACzB,QAAQ,GACR,UAAU,GACV,WAAW,GACX,cAAc,GACd,WAAW,GACX,WAAW,CAAC;AAEhB,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,EAAE,KAAK,CAAA;CAAE,GACnB;IAAE,QAAQ,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAC;IAAC,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9E;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAC3B;IAAE,QAAQ,EAAE,KAAK,CAAA;CAAE,GACnB;IAAE,QAAQ,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAA;CAAE,CAAC;AAEhD,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,eAAe,CAAC;IACzB;;;;;OAKG;IACH,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5E,wEAAwE;IACxE,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7E;;;OAGG;IACH,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/E;;;;OAIG;IACH;;;OAGG;IACH;;;;;OAKG;IACH,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7E;;;;;OAKG;IACH,eAAe,CACb,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,UAAU,EAChB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7C;;;;;OAKG;IACH;;;;;;OAMG;IACH,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E;;;;;;;;;OASG;IACH,mBAAmB,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1E,iGAAiG;IACjG,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClG;;;;;;;;;;;;;;;;OAgBG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC9C,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,mBAAmB;;gBAKlB,IAAI,EAAE,uBAAuB;IAIzC;;;;;;;OAOG;IACH;;;;;;OAMG;IACH,SAAS,CACP,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,UAAU,EACnB,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,aAAa,SAAK,GACjB,mBAAmB;IA8EtB,oGAAoG;IAC9F,KAAK,CACT,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,UAAU,EACnB,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,aAAa,SAAK,GACjB,OAAO,CAAC,YAAY,CAAC;CA2GzB;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB,QAAkB,CAAC;AAiHxD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAG5D"}
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DOD-DOC-INBOUND-2 — routing an arriving session frame to the document layer.
|
|
3
|
+
*
|
|
4
|
+
* Document traffic and conversation traffic share the session content channel, so something has to
|
|
5
|
+
* decide which is which. That decision has consequences beyond dispatch, and they are the reason
|
|
6
|
+
* this is a unit rather than an `if` at the call site:
|
|
7
|
+
*
|
|
8
|
+
* - A document frame is NOT a transcript message. Recording one would put CRDT bytes into the
|
|
9
|
+
* operator's conversation history, where `cello_receive` would hand them to an agent as
|
|
10
|
+
* something a person said.
|
|
11
|
+
* - A document frame raises NO DOORBELL (§11.3 — doorbell-on-update is parked). A collaborator
|
|
12
|
+
* typing produces a stream of updates, and a doorbell per update would interrupt the operator's
|
|
13
|
+
* agent continuously for something with no deadline.
|
|
14
|
+
* - A document frame is still a LEAF. The seal covers it as a `0x04` doc-op leaf; that is what
|
|
15
|
+
* makes the exchange provable. Consuming a frame means "do not treat this as conversation", not
|
|
16
|
+
* "pretend it did not arrive".
|
|
17
|
+
*
|
|
18
|
+
* ── CLASSIFICATION IS BY DECODE, BEHIND A STRUCTURAL GUARD ────────────────────────────────────
|
|
19
|
+
*
|
|
20
|
+
* A frame is a document frame iff it DECODES as one. No content heuristic, no first-byte guess
|
|
21
|
+
* about what the bytes mean — the same reasoning that made the update envelope carry its encoding
|
|
22
|
+
* explicitly rather than let a decoder infer it. Anything that does not decode is conversation,
|
|
23
|
+
* which is the safe direction: a misrouted document frame lands in a transcript where it is
|
|
24
|
+
* visible, while a misrouted MESSAGE would vanish into the document layer and never reach the
|
|
25
|
+
* operator.
|
|
26
|
+
*
|
|
27
|
+
* A CONVERSATION MESSAGE CANNOT REACH A DECODER AT ALL, and the reason is structural rather than
|
|
28
|
+
* statistical. Both halves verified here, not assumed:
|
|
29
|
+
*
|
|
30
|
+
* - `couldBeDocumentFrame` requires byte 0 in `0xa0`–`0xb9`, and NONE of those can begin a valid
|
|
31
|
+
* UTF-8 sequence — they are all continuation bytes (checked against a fatal `TextDecoder`).
|
|
32
|
+
* - A legitimate message IS UTF-8, by construction rather than by convention: the send path
|
|
33
|
+
* encodes it with `new TextEncoder().encode(...)` (`session-content-handlers.ts`), and there is
|
|
34
|
+
* no binary-content path. Its first byte is therefore ASCII (`< 0x80`) or a LEAD byte
|
|
35
|
+
* (`0xc2`–`0xf4`) — never a continuation byte. Note it is NOT always `< 0x80`: a message
|
|
36
|
+
* beginning in French, Arabic or Chinese starts at `0xc2` or above and is still clear of the
|
|
37
|
+
* admitted range. Getting that wrong would invite someone to widen the range on a false premise.
|
|
38
|
+
*
|
|
39
|
+
* So no text an operator types, and no text an attacker persuades them to send, is ever classified
|
|
40
|
+
* as a document frame. (A hostile PEER can put raw non-UTF-8 bytes on the channel and have them
|
|
41
|
+
* classified as document traffic — but that only suppresses their own message.)
|
|
42
|
+
*
|
|
43
|
+
* ── THE HEADER GUARD IS A FAST PATH, NOT THE SECURITY BOUNDARY ────────────────────────────────
|
|
44
|
+
*
|
|
45
|
+
* Handing hostile bytes to a CBOR decoder is a denial of service — measured at seconds and
|
|
46
|
+
* gigabytes for a few bytes — and `classify` runs on EVERY inbound frame, so a peer could stall or
|
|
47
|
+
* OOM the daemon's whole content path and stop the operator's ordinary MESSAGES.
|
|
48
|
+
*
|
|
49
|
+
* `couldBeDocumentFrame` was written as the fix and IS NOT ONE. It inspects the header, and the cost
|
|
50
|
+
* lives in structures NESTED inside it: `a1 9f` — a one-pair map whose first key is an
|
|
51
|
+
* indefinite-length array — is three bytes, passes any header check, and cost 9.6 seconds and
|
|
52
|
+
* 1.1 GB. Prefixing the real frames' own `b9 000a` does the same. No header-shaped guard can be
|
|
53
|
+
* sound here.
|
|
54
|
+
*
|
|
55
|
+
* The decoder limit in `cbor.ts` cuts the per-byte amplification by ~43,000×, and it is still not
|
|
56
|
+
* the whole answer: cbor-x pre-allocates `new Array(declaredCount)` before reading any element, so
|
|
57
|
+
* NESTED arrays each under that cap still allocate — measured, 15 KB of them costs ~230 ms and
|
|
58
|
+
* ~2.3 GB. What makes the nesting depth finite is an INPUT LENGTH CAP, which is why one is applied
|
|
59
|
+
* here, at the peer-bytes boundary, before anything else looks at the frame.
|
|
60
|
+
*
|
|
61
|
+
* So the three layers, in the order they run and with what each is actually for:
|
|
62
|
+
* MAX_DOCUMENT_FRAME_BYTES — bounds the nesting depth. The one that closes the class.
|
|
63
|
+
* couldBeDocumentFrame — a cheap fast path; keeps every conversation message out of the
|
|
64
|
+
* decoder, and is what the UTF-8 argument above rests on.
|
|
65
|
+
* cbor.ts size limits — bounds a single container. Reduces amplification; not a boundary.
|
|
66
|
+
*
|
|
67
|
+
* The guard must never again be described as what makes hostile input safe. It was, and it was not.
|
|
68
|
+
*/
|
|
69
|
+
import { decodeCbor, decodeDocumentReconcile, decodeDocumentUpdateEnvelope, decodeDocumentProposal, decodeDocumentRejection, decodeDocumentProposalAck, decodeDocumentAmendment, } from "@cello-protocol/protocol-types";
|
|
70
|
+
import { extractErrorMessage } from "./error-message.js";
|
|
71
|
+
export class DocumentFrameRouter {
|
|
72
|
+
#d;
|
|
73
|
+
/** One promise chain per owning agent — the serialization point. See `#enqueue`. */
|
|
74
|
+
#queues = new Map();
|
|
75
|
+
constructor(deps) {
|
|
76
|
+
this.#d = deps;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Classify and dispatch. Returns whether the document layer consumed the frame.
|
|
80
|
+
*
|
|
81
|
+
* NEVER THROWS. A throw here would escape into the session content path and take down message
|
|
82
|
+
* delivery for the whole session — conversation traffic failing because a document frame was
|
|
83
|
+
* malformed. A document frame that cannot be handled is consumed and reported; the session keeps
|
|
84
|
+
* running.
|
|
85
|
+
*/
|
|
86
|
+
/**
|
|
87
|
+
* The SYNCHRONOUS half: classify, and start the handling.
|
|
88
|
+
*
|
|
89
|
+
* Returns immediately with what the session layer needs to pick a leaf kind. The handling runs on
|
|
90
|
+
* a per-document queue — see `#handle` — so the caller never waits and frames for one document
|
|
91
|
+
* never overtake each other.
|
|
92
|
+
*/
|
|
93
|
+
routeSync(agentName, content, nowMs, correlationId, senderAgentId = "") {
|
|
94
|
+
const kind = classify(content);
|
|
95
|
+
if (kind === "unshaped")
|
|
96
|
+
return { consumed: false };
|
|
97
|
+
if (kind === "undecodable") {
|
|
98
|
+
// ANOMALY, worth a line. A frame that passed the header guard and then decoded as NOTHING is
|
|
99
|
+
// not an ordinary conversation message — the guard's whole argument is that operator text
|
|
100
|
+
// cannot begin with a CBOR map header (see the UTF-8 reasoning above). So this is either a
|
|
101
|
+
// peer running a frame type this build does not know, or our own encoder and decoder
|
|
102
|
+
// disagreeing, and both are invisible today: the frame silently becomes a transcript entry.
|
|
103
|
+
//
|
|
104
|
+
// This was the missing diagnostic when a live proposal reached its peer, passed the content
|
|
105
|
+
// hash cross-check byte for byte, and never reached the document layer — every log on the
|
|
106
|
+
// receiving side said "an ordinary message arrived", because that is what the fall-through
|
|
107
|
+
// makes it.
|
|
108
|
+
this.#d.logger.warn("document.frame.undecodable", {
|
|
109
|
+
bytes: content.length,
|
|
110
|
+
header: content[0],
|
|
111
|
+
correlationId,
|
|
112
|
+
});
|
|
113
|
+
return { consumed: false };
|
|
114
|
+
}
|
|
115
|
+
// Resolved AFTER classification and BEFORE handling: a frame that is not document traffic never
|
|
116
|
+
// pays for the lookup, and one that is never reaches the store under the wrong scope.
|
|
117
|
+
const ownerAgentId = this.#d.ownerKeyFor(agentName);
|
|
118
|
+
if (ownerAgentId === null) {
|
|
119
|
+
this.#d.logger.error("document.frame.owner_unresolved", { agentName, kind, correlationId });
|
|
120
|
+
// Consumed anyway. This IS a document frame; the only alternative is the conversation path,
|
|
121
|
+
// which would hand an operator's agent a CBOR envelope as something a person said.
|
|
122
|
+
return { consumed: true, kind };
|
|
123
|
+
}
|
|
124
|
+
void this.#enqueue(ownerAgentId, content, nowMs, correlationId, kind, senderAgentId);
|
|
125
|
+
return { consumed: true, kind };
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* SERIALIZED PER DOCUMENT-OWNER, because the chain check is order-dependent even though Yjs is
|
|
129
|
+
* not. An envelope's `doc_prev_hash` must find its predecessor already stored, so two frames
|
|
130
|
+
* handled concurrently can have the second refuse with `document_chain_broken` purely because the
|
|
131
|
+
* first has not finished writing — a self-inflicted fork that looks like a peer fault.
|
|
132
|
+
*
|
|
133
|
+
* Keyed by owner rather than by document: the document id is inside the frame, and reading it
|
|
134
|
+
* requires the decode this queue exists to schedule.
|
|
135
|
+
*/
|
|
136
|
+
#enqueue(ownerAgentId, content, nowMs, correlationId, kind, senderAgentId) {
|
|
137
|
+
const previous = this.#queues.get(ownerAgentId) ?? Promise.resolve();
|
|
138
|
+
const next = previous
|
|
139
|
+
.catch(() => {
|
|
140
|
+
// A previous frame's failure must not cancel this one's turn. It was already reported.
|
|
141
|
+
})
|
|
142
|
+
.then(async () => {
|
|
143
|
+
// `kind` is passed through rather than re-derived: `classify` does up to two full CBOR
|
|
144
|
+
// decodes, and this runs on every inbound frame.
|
|
145
|
+
const outcome = await this.#dispatch(ownerAgentId, content, nowMs, correlationId, kind, senderAgentId);
|
|
146
|
+
if (outcome.consumed && !outcome.ok) {
|
|
147
|
+
this.#d.logger.warn("document.frame.refused", {
|
|
148
|
+
kind: outcome.kind,
|
|
149
|
+
reason: outcome.reason,
|
|
150
|
+
correlationId,
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
this.#queues.set(ownerAgentId, next);
|
|
155
|
+
// Drop the entry once it is the tail, so the map does not grow one promise per agent forever.
|
|
156
|
+
void next.finally(() => {
|
|
157
|
+
if (this.#queues.get(ownerAgentId) === next)
|
|
158
|
+
this.#queues.delete(ownerAgentId);
|
|
159
|
+
});
|
|
160
|
+
return next;
|
|
161
|
+
}
|
|
162
|
+
/** Classify and handle, awaiting the outcome. The path a caller takes when it wants the verdict. */
|
|
163
|
+
async route(ownerAgentId, content, nowMs, correlationId, senderAgentId = "") {
|
|
164
|
+
const kind = classify(content);
|
|
165
|
+
// Both non-kinds mean "not ours" to this async entry point. `routeSync` is the path that
|
|
166
|
+
// distinguishes them, because it is the one that decides what the session does with the frame.
|
|
167
|
+
if (kind === "unshaped" || kind === "undecodable")
|
|
168
|
+
return { consumed: false };
|
|
169
|
+
return this.#dispatch(ownerAgentId, content, nowMs, correlationId, kind, senderAgentId);
|
|
170
|
+
}
|
|
171
|
+
async #dispatch(ownerAgentId, content, nowMs, correlationId, kind, senderAgentId) {
|
|
172
|
+
try {
|
|
173
|
+
if (kind === "update") {
|
|
174
|
+
const res = await this.#d.inbound.receive(ownerAgentId, content, nowMs, correlationId);
|
|
175
|
+
if (res.ok && res.admitted) {
|
|
176
|
+
// REWRITE THE FILE. The document has moved; the operator's editor has not been told.
|
|
177
|
+
// Without this the file surface is write-only — an operator publishes their edits and
|
|
178
|
+
// never sees the peer's, which is worse than no file surface at all, because the stale
|
|
179
|
+
// file then looks like the document and gets published back over their work.
|
|
180
|
+
//
|
|
181
|
+
// Not awaited, and not allowed to fail the admission: the content is already in the
|
|
182
|
+
// document, which is the source of truth. A failed rewrite is a stale projection, and
|
|
183
|
+
// `publish` refuses loudly on a stale baseline rather than diffing against it.
|
|
184
|
+
// NOTICED BEFORE the file rewrite, and synchronously: the notice is a row, not I/O, and
|
|
185
|
+
// an agent that reads the file before the notice lands would clear a count that had not
|
|
186
|
+
// been written. Never allowed to fail the admission — the content is already in the
|
|
187
|
+
// document, which is the source of truth.
|
|
188
|
+
try {
|
|
189
|
+
this.#d.noticeInboundUpdate(ownerAgentId, content);
|
|
190
|
+
}
|
|
191
|
+
catch (err) {
|
|
192
|
+
this.#d.logger.warn("document.notice.failed", {
|
|
193
|
+
correlationId,
|
|
194
|
+
reason: extractErrorMessage(err),
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
void this.#d.rewriteFile(ownerAgentId, content).catch((err) => {
|
|
198
|
+
this.#d.logger.warn("document.file.rewrite_threw", {
|
|
199
|
+
correlationId,
|
|
200
|
+
reason: extractErrorMessage(err),
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
if (res.ok) {
|
|
205
|
+
// THE SIGNED REFUSAL ITSELF, when there is one. This frame is what
|
|
206
|
+
// advances the SENDER's retry round, and their entire supersede-then-stall protocol is
|
|
207
|
+
// driven by receiving it. Without it their counter never leaves zero and a peer whose
|
|
208
|
+
// every update is refused republishes forever, with its own surface reporting `active`.
|
|
209
|
+
//
|
|
210
|
+
// Absent on a repeat refusal by design — re-sending would advance their round for a retry
|
|
211
|
+
// that never happened and stall the document early.
|
|
212
|
+
if (!res.admitted && res.rejectionWire) {
|
|
213
|
+
void this.#d
|
|
214
|
+
.sendFrameToPeer(ownerAgentId, content, res.rejectionWire)
|
|
215
|
+
.catch((err) => {
|
|
216
|
+
this.#d.logger.warn("document.rejection.send_threw", {
|
|
217
|
+
correlationId,
|
|
218
|
+
reason: extractErrorMessage(err),
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
// SYNC-P4 (D4): no ack frame answers content anymore. An admitted envelope shows up in
|
|
224
|
+
// this holder's position at the next exchange — that IS the confirmation. A signed
|
|
225
|
+
// rejection (above) still travels, because it carries a decision, not a receipt.
|
|
226
|
+
return { consumed: true, kind, ok: res.ok, reason: res.ok ? undefined : res.reason };
|
|
227
|
+
}
|
|
228
|
+
if (kind === "proposal") {
|
|
229
|
+
this.#d.recordProposal(ownerAgentId, content, nowMs);
|
|
230
|
+
return { consumed: true, kind, ok: true };
|
|
231
|
+
}
|
|
232
|
+
if (kind === "rejection") {
|
|
233
|
+
this.#d.recordRejection(ownerAgentId, content, nowMs);
|
|
234
|
+
return { consumed: true, kind, ok: true };
|
|
235
|
+
}
|
|
236
|
+
if (kind === "proposal_ack") {
|
|
237
|
+
this.#d.recordProposalAck(ownerAgentId, content, nowMs);
|
|
238
|
+
return { consumed: true, kind, ok: true };
|
|
239
|
+
}
|
|
240
|
+
if (kind === "amendment") {
|
|
241
|
+
this.#d.recordAmendment(ownerAgentId, content, nowMs);
|
|
242
|
+
return { consumed: true, kind, ok: true };
|
|
243
|
+
}
|
|
244
|
+
if (kind === "reconcile") {
|
|
245
|
+
const rec = await this.#d.handleReconcile(ownerAgentId, content, senderAgentId, nowMs, correlationId);
|
|
246
|
+
return { consumed: true, kind, ok: rec.ok, reason: rec.reason };
|
|
247
|
+
}
|
|
248
|
+
// Exhaustive over the kind union — reaching here is a programming fault the catch reports.
|
|
249
|
+
throw new Error(`document_frame_unrouted: ${kind}`);
|
|
250
|
+
}
|
|
251
|
+
catch (err) {
|
|
252
|
+
// Contained deliberately. The document layer refuses by returning a verdict, so reaching here
|
|
253
|
+
// is a programming fault — and the cost of letting it escape is that a peer could stop the
|
|
254
|
+
// operator's MESSAGES from being delivered by sending one bad document frame.
|
|
255
|
+
this.#d.logger.error("document.frame.handler_threw", {
|
|
256
|
+
kind,
|
|
257
|
+
correlationId,
|
|
258
|
+
reason: extractErrorMessage(err),
|
|
259
|
+
});
|
|
260
|
+
return { consumed: true, kind, ok: false, reason: "document_frame_handler_threw" };
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* The largest field count a document frame can declare. The update envelope has 10 fields and the
|
|
266
|
+
* ack has 9; the bound is generous so a future field does not silently start routing frames to the
|
|
267
|
+
* transcript, and tight enough that a map header claiming millions of pairs never reaches a decoder.
|
|
268
|
+
*/
|
|
269
|
+
export const MAX_DOCUMENT_FRAME_FIELDS = 32;
|
|
270
|
+
/**
|
|
271
|
+
* The largest a document frame can legitimately be, and the bound that makes the decode's nesting
|
|
272
|
+
* depth finite.
|
|
273
|
+
*
|
|
274
|
+
* Sized off the payload it has to carry: the gate caps an update at 1 MiB, and everything else in
|
|
275
|
+
* the envelope — two hashes, an agent id, a state vector, a signature — is small. 2 MiB is
|
|
276
|
+
* comfortably above any real frame and far below the size at which nested-array pre-allocation
|
|
277
|
+
* becomes expensive.
|
|
278
|
+
*
|
|
279
|
+
* This is the layer that actually closes the pathological-input class. The decoder's per-container
|
|
280
|
+
* limit reduces amplification; only a bound on the INPUT can bound the depth.
|
|
281
|
+
*/
|
|
282
|
+
export const MAX_DOCUMENT_FRAME_BYTES = 2 * 1024 * 1024;
|
|
283
|
+
/**
|
|
284
|
+
* Could these bytes be a document frame at all — cheaply, and without decoding?
|
|
285
|
+
*
|
|
286
|
+
* The decoders' own first requirement is "a definite-length CBOR map"; this is that requirement,
|
|
287
|
+
* checked on the header instead of after the damage. Note the real frames begin `b9 00 0a` — a
|
|
288
|
+
* NON-MINIMAL two-byte count, which `cbor.ts` documents as this encoder's deliberate behaviour — so
|
|
289
|
+
* the 1- and 2-byte count forms must be admitted. The 4- and 8-byte forms are refused outright: no
|
|
290
|
+
* document frame has four billion fields, and those are precisely the headers that let a few bytes
|
|
291
|
+
* ask for an enormous allocation.
|
|
292
|
+
*/
|
|
293
|
+
function couldBeDocumentFrame(b) {
|
|
294
|
+
const header = b[0];
|
|
295
|
+
if (header === undefined)
|
|
296
|
+
return false;
|
|
297
|
+
// 0xa0..0xb7 — map with the pair count inline (0..23).
|
|
298
|
+
if (header >= 0xa0 && header <= 0xb7)
|
|
299
|
+
return true;
|
|
300
|
+
// 0xb8 / 0xb9 — map with a 1- or 2-byte pair count, which is what this encoder emits.
|
|
301
|
+
if (header === 0xb8)
|
|
302
|
+
return b.length >= 2 && b[1] <= MAX_DOCUMENT_FRAME_FIELDS;
|
|
303
|
+
if (header === 0xb9) {
|
|
304
|
+
return b.length >= 3 && ((b[1] << 8) | b[2]) <= MAX_DOCUMENT_FRAME_FIELDS;
|
|
305
|
+
}
|
|
306
|
+
// Everything else — including 0xbf (indefinite-length map) and 0x9f (indefinite-length ARRAY,
|
|
307
|
+
// the header in both measured pathological inputs) — is not a document frame.
|
|
308
|
+
//
|
|
309
|
+
// The upper end of the admitted range must stay at or below 0xbf, or the UTF-8 argument in the
|
|
310
|
+
// header stops holding: 0x80-0xbf are exactly the continuation bytes, and 0xc0 upward CAN begin a
|
|
311
|
+
// valid sequence. A test pins that.
|
|
312
|
+
return false;
|
|
313
|
+
}
|
|
314
|
+
function classify(content) {
|
|
315
|
+
// LENGTH FIRST. See the header: this is what bounds the nesting depth, and it is checked before
|
|
316
|
+
// the frame is looked at in any other way.
|
|
317
|
+
if (content.length > MAX_DOCUMENT_FRAME_BYTES)
|
|
318
|
+
return "unshaped";
|
|
319
|
+
if (!couldBeDocumentFrame(content))
|
|
320
|
+
return "unshaped";
|
|
321
|
+
// DECODE ONCE AND READ THE DISCRIMINATOR, rather than trying every decoder in turn.
|
|
322
|
+
//
|
|
323
|
+
// Each decoder validates its own `type` before anything else, so trying them in sequence meant a
|
|
324
|
+
// frame paid for as many full CBOR decodes as there are frame types ahead of it — and hostile
|
|
325
|
+
// bytes that pass the header guard paid for ALL of them. That cost grows every time this protocol
|
|
326
|
+
// gains a frame, which it did three times this milestone: six decoders where there were four, and
|
|
327
|
+
// the measured pathological inputs went from comfortably inside the DoS budget to over it on a
|
|
328
|
+
// slower machine.
|
|
329
|
+
//
|
|
330
|
+
// The decode itself is already bounded — `cbor.ts` sets process-global size limits, which is the
|
|
331
|
+
// actual boundary; the header guard above is only a fast path. So one decode is safe, and one is
|
|
332
|
+
// all this needs: read `type`, then hand the bytes to exactly the decoder that claims them, which
|
|
333
|
+
// re-validates everything including the type. Two decodes worst case instead of six, and one for
|
|
334
|
+
// anything that is not a CBOR map at all.
|
|
335
|
+
let declared;
|
|
336
|
+
try {
|
|
337
|
+
const decoded = decodeCbor(content);
|
|
338
|
+
if (typeof decoded !== "object" || decoded === null || Array.isArray(decoded))
|
|
339
|
+
return "unshaped";
|
|
340
|
+
declared = decoded["type"];
|
|
341
|
+
}
|
|
342
|
+
catch {
|
|
343
|
+
// Not decodable as CBOR at all. Shaped like a map header and is not one.
|
|
344
|
+
return "unshaped";
|
|
345
|
+
}
|
|
346
|
+
if (typeof declared !== "string")
|
|
347
|
+
return "undecodable";
|
|
348
|
+
try {
|
|
349
|
+
switch (declared) {
|
|
350
|
+
case "document_update":
|
|
351
|
+
decodeDocumentUpdateEnvelope(content);
|
|
352
|
+
return "update";
|
|
353
|
+
case "document_proposal":
|
|
354
|
+
decodeDocumentProposal(content);
|
|
355
|
+
return "proposal";
|
|
356
|
+
case "document_rejection":
|
|
357
|
+
decodeDocumentRejection(content);
|
|
358
|
+
return "rejection";
|
|
359
|
+
case "document_proposal_ack":
|
|
360
|
+
decodeDocumentProposalAck(content);
|
|
361
|
+
return "proposal_ack";
|
|
362
|
+
case "document_amendment":
|
|
363
|
+
decodeDocumentAmendment(content);
|
|
364
|
+
return "amendment";
|
|
365
|
+
case "document_reconcile":
|
|
366
|
+
decodeDocumentReconcile(content);
|
|
367
|
+
return "reconcile";
|
|
368
|
+
default:
|
|
369
|
+
// A frame type this build does not know. Reported by the caller rather than silently
|
|
370
|
+
// treated as conversation — see `routeSync`.
|
|
371
|
+
return "undecodable";
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
catch {
|
|
375
|
+
// It NAMED a document frame type and failed that type's own validation. Not conversation:
|
|
376
|
+
// conversation does not carry `type: "document_update"`.
|
|
377
|
+
return "undecodable";
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* DOD-DOC-SCREEN-CLASSIFY-1 — is this a document frame, and nothing else.
|
|
382
|
+
*
|
|
383
|
+
* The classify-only entry point the session ingest uses to decide whether the shared message
|
|
384
|
+
* screener's CONTENT steps apply. They are inert for a document frame — the frame is a signed CBOR
|
|
385
|
+
* envelope, so the sanitizer's rewrites are discarded by the funnel (see `#appendVerifiedContent`'s
|
|
386
|
+
* `originalContent` note) and the language/pattern checks judge a UTF-8 decode of binary. What
|
|
387
|
+
* actually screens document content is the gate + `screenText`, in-process, on the projected text.
|
|
388
|
+
*
|
|
389
|
+
* Reuses `classify` — a second copy of the discriminator rule is how the two callers drift. The
|
|
390
|
+
* header guard keeps the cost off conversation messages: no byte in `0xa0`–`0xb9` can begin valid
|
|
391
|
+
* UTF-8 text, so ordinary messages return false on the first byte.
|
|
392
|
+
*/
|
|
393
|
+
export function isDocumentFrame(content) {
|
|
394
|
+
const kind = classify(content);
|
|
395
|
+
return kind !== "unshaped" && kind !== "undecodable";
|
|
396
|
+
}
|
|
397
|
+
//# sourceMappingURL=document-frame-router.js.map
|