@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,580 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DOD-DOC-NOTIFY-1 — passive notification and the two read calls (§16.5, §4.1).
|
|
3
|
+
*
|
|
4
|
+
* ── WHY NO DOORBELL ───────────────────────────────────────────────────────────────────────────
|
|
5
|
+
*
|
|
6
|
+
* A document update raises NO doorbell (§11.3 — doorbell-on-update is parked). The notice sits in
|
|
7
|
+
* the inbox aggregation and the agent finds it the next time it looks. That is the whole design:
|
|
8
|
+
* a collaborator typing produces a stream of updates, and a doorbell per update would interrupt
|
|
9
|
+
* the operator's agent continuously for something that has no deadline. The one-line summary the
|
|
10
|
+
* agent eventually reads carries the same information at none of the cost.
|
|
11
|
+
*
|
|
12
|
+
* Following the `contact_rename_notices` precedent: there is no inbox store — the inbox is computed
|
|
13
|
+
* per call — so a derived section needs its own table and its own getter.
|
|
14
|
+
*
|
|
15
|
+
* The notice carries `document_id` and a PENDING COUNT, and nothing else. Not a preview, not the
|
|
16
|
+
* first line, not the author's words. Content reaches the agent only through the two read calls
|
|
17
|
+
* below, which are screened; a notification that carried content would be an unscreened path into
|
|
18
|
+
* the agent's context, which is the whole prompt-injection surface §3.1 exists to close.
|
|
19
|
+
*
|
|
20
|
+
* ── THE TWO READ CALLS (§4.1) ─────────────────────────────────────────────────────────────────
|
|
21
|
+
*
|
|
22
|
+
* `diffStats` is STRUCTURAL ONLY — counts, ranges, and the overlap flag. It exists so an agent can
|
|
23
|
+
* decide whether to read without reading, which is exactly what a cautious agent should be able to
|
|
24
|
+
* do. `diff` is the git-like diff itself and is an ordinary screened read.
|
|
25
|
+
*
|
|
26
|
+
* ── SUPPORTED TYPES FOR `diff`, DECIDED IN-UNIT ───────────────────────────────────────────────
|
|
27
|
+
*
|
|
28
|
+
* Markdown, plain text, and JSON. Markdown and plain text share one line-diff implementation (a
|
|
29
|
+
* markdown file IS lines); JSON gets a key-path diff because a line diff over re-serialized JSON
|
|
30
|
+
* reports the whole document as changed whenever a formatter touches it. Anything else returns a
|
|
31
|
+
* REFUSAL naming the type rather than a line diff over bytes that are not lines — a diff that is
|
|
32
|
+
* wrong is worse than no diff, because the agent cannot tell.
|
|
33
|
+
*/
|
|
34
|
+
import { lineRuns, toChunks } from "./line-lcs.js";
|
|
35
|
+
import { diffableDocumentTypes, rootForDocumentType } from "./document-types.js";
|
|
36
|
+
const CREATE_NOTICES_SQL = `
|
|
37
|
+
CREATE TABLE IF NOT EXISTS document_notices (
|
|
38
|
+
agent_id TEXT NOT NULL,
|
|
39
|
+
document_id TEXT NOT NULL,
|
|
40
|
+
-- The count, not the content. See the header.
|
|
41
|
+
pending INTEGER NOT NULL,
|
|
42
|
+
noticed_at INTEGER NOT NULL,
|
|
43
|
+
PRIMARY KEY (agent_id, document_id)
|
|
44
|
+
);
|
|
45
|
+
`;
|
|
46
|
+
/**
|
|
47
|
+
* WHAT THE OPERATOR LAST SAW, so `diff` can answer "what changed since I looked".
|
|
48
|
+
*
|
|
49
|
+
* The text itself, not a state vector. A state vector says which OPERATIONS this side has seen,
|
|
50
|
+
* which is a fact about the CRDT — and the question an agent is asking before it builds on a shared
|
|
51
|
+
* document is a fact about the TEXT: what words are different from the ones I read. Reconstructing
|
|
52
|
+
* the old text from a vector means replaying the log to a point, which is both expensive and a
|
|
53
|
+
* second answer to a question this column answers directly.
|
|
54
|
+
*
|
|
55
|
+
* Written by READ, never by write or by an arriving update. It marks what a human or an agent
|
|
56
|
+
* actually looked at; moving it on an inbound update would erase the very change the diff exists to
|
|
57
|
+
* show, silently, at the moment it arrived.
|
|
58
|
+
*/
|
|
59
|
+
/**
|
|
60
|
+
* DOD-DOC-WATCH-1 — the paths an agent asked to be nudged about, per document.
|
|
61
|
+
*
|
|
62
|
+
* `paths` is a JSON array rather than a row per path: the list is small, always read and written
|
|
63
|
+
* whole, and one row per (agent, document) means the ring-once bookkeeping has somewhere obvious to
|
|
64
|
+
* live. `nudged_at` NULL means a nudge is owed; a read clears it back to NULL.
|
|
65
|
+
*/
|
|
66
|
+
const CREATE_WATCHES_SQL = `
|
|
67
|
+
CREATE TABLE IF NOT EXISTS document_watches (
|
|
68
|
+
agent_id TEXT NOT NULL,
|
|
69
|
+
document_id TEXT NOT NULL,
|
|
70
|
+
paths TEXT NOT NULL,
|
|
71
|
+
nudged_at INTEGER,
|
|
72
|
+
PRIMARY KEY (agent_id, document_id)
|
|
73
|
+
);
|
|
74
|
+
`;
|
|
75
|
+
const CREATE_READ_MARKS_SQL = `
|
|
76
|
+
CREATE TABLE IF NOT EXISTS document_read_marks (
|
|
77
|
+
agent_id TEXT NOT NULL,
|
|
78
|
+
document_id TEXT NOT NULL,
|
|
79
|
+
seen_text TEXT NOT NULL,
|
|
80
|
+
seen_at INTEGER NOT NULL,
|
|
81
|
+
-- The last text WE wrote since that read, or NULL if we have not written since. See the
|
|
82
|
+
-- myEditedLines comment below for why it exists: it is what makes the overlap flag a computed
|
|
83
|
+
-- answer rather than a hardcoded null.
|
|
84
|
+
--
|
|
85
|
+
-- No backticks in this string. It is a JS template literal, so one would terminate it — which
|
|
86
|
+
-- is exactly how this shipped broken for a minute.
|
|
87
|
+
my_text TEXT,
|
|
88
|
+
PRIMARY KEY (agent_id, document_id)
|
|
89
|
+
);
|
|
90
|
+
`;
|
|
91
|
+
/** Born on an existing table. See `PEER_DECISION_COLUMNS` in document-handshake.ts for the pattern. */
|
|
92
|
+
const READ_MARK_COLUMNS = ["ALTER TABLE document_read_marks ADD COLUMN my_text TEXT"];
|
|
93
|
+
/**
|
|
94
|
+
* The types `cello_doc_diff` renders — DERIVED from the one registry, never listed here.
|
|
95
|
+
*
|
|
96
|
+
* This was a hardcoded `["markdown", "text", "json"]` sitting in parallel with the write path's
|
|
97
|
+
* admitted set, and the two had drifted: `plaintext` was admitted and could not be diffed, so the
|
|
98
|
+
* verb that says what changed was dead on a type the product offered.
|
|
99
|
+
*/
|
|
100
|
+
export const DIFFABLE_DOCUMENT_TYPES = diffableDocumentTypes();
|
|
101
|
+
export class DocumentNotifications {
|
|
102
|
+
#store;
|
|
103
|
+
#logger;
|
|
104
|
+
constructor(store, logger) {
|
|
105
|
+
this.#store = store;
|
|
106
|
+
this.#logger = logger;
|
|
107
|
+
this.#store.rawDb.exec(CREATE_NOTICES_SQL);
|
|
108
|
+
this.#store.rawDb.exec(CREATE_READ_MARKS_SQL);
|
|
109
|
+
this.#store.rawDb.exec(CREATE_WATCHES_SQL);
|
|
110
|
+
for (const sql of READ_MARK_COLUMNS) {
|
|
111
|
+
// Birth-gated so a daemon that already holds read marks gains the column instead of losing
|
|
112
|
+
// them. A failure here is either "already present" — the ordinary case — or a locked
|
|
113
|
+
// database, and the latter surfaces loudly on the very next SELECT rather than degrading.
|
|
114
|
+
const has = this.#store.rawDb.prepare("PRAGMA table_info(document_read_marks)").all().some((c) => c.name === "my_text");
|
|
115
|
+
if (!has)
|
|
116
|
+
this.#store.rawDb.exec(sql);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Record what this agent last SAW, so a later diff has a "before".
|
|
121
|
+
*
|
|
122
|
+
* REPLACES. A read mark is a bookmark, not a history — keeping every read would make the table
|
|
123
|
+
* grow with attention rather than with content, and no caller wants the second-most-recent read.
|
|
124
|
+
*/
|
|
125
|
+
markRead(agentId, documentId, text, nowMs) {
|
|
126
|
+
this.#store.rawDb
|
|
127
|
+
.prepare(`INSERT INTO document_read_marks (agent_id, document_id, seen_text, seen_at, my_text)
|
|
128
|
+
VALUES (?, ?, ?, ?, NULL)
|
|
129
|
+
ON CONFLICT (agent_id, document_id) DO UPDATE SET
|
|
130
|
+
seen_text = excluded.seen_text, seen_at = excluded.seen_at,
|
|
131
|
+
-- CLEARED. A read establishes a new baseline, so edits made before it are no longer
|
|
132
|
+
-- "mine since I looked" — carrying them forward would report an overlap against work
|
|
133
|
+
-- the operator has already seen merged.
|
|
134
|
+
my_text = NULL`)
|
|
135
|
+
.run(agentId, documentId, text, nowMs);
|
|
136
|
+
// RE-ARM THE NUDGE. A read is what spends the previous one — see `nudgeOwed`. Without this a
|
|
137
|
+
// document nudges exactly once in its life and then goes quiet forever, which is worse than not
|
|
138
|
+
// nudging at all because the operator would trust the silence.
|
|
139
|
+
this.#store.rawDb
|
|
140
|
+
.prepare("UPDATE document_watches SET nudged_at = NULL WHERE agent_id = ? AND document_id = ?")
|
|
141
|
+
.run(agentId, documentId);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Record the text WE just wrote, against the current read mark.
|
|
145
|
+
*
|
|
146
|
+
* No-ops when there is no read mark: without a baseline there is nothing to measure our edit
|
|
147
|
+
* against, and inventing one would make the first diff after a write report the whole document as
|
|
148
|
+
* a conflict.
|
|
149
|
+
*/
|
|
150
|
+
/**
|
|
151
|
+
* Every text this agent demonstrably held for this document — what it last READ and what it last
|
|
152
|
+
* WROTE, in no particular order, with nulls dropped.
|
|
153
|
+
*
|
|
154
|
+
* Used by the stale-write guard to answer "could this author have seen the thing their write
|
|
155
|
+
* removes?". Both sources are needed: a read establishes a baseline, and a write is text the
|
|
156
|
+
* author obviously saw because they composed it.
|
|
157
|
+
*/
|
|
158
|
+
knownTexts(agentId, documentId) {
|
|
159
|
+
const row = this.#store.rawDb
|
|
160
|
+
.prepare("SELECT seen_text, my_text FROM document_read_marks WHERE agent_id = ? AND document_id = ?")
|
|
161
|
+
.get(agentId, documentId);
|
|
162
|
+
return [row?.seen_text ?? null, row?.my_text ?? null].filter((t) => t !== null);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* The paths this agent has asked to be nudged about, for one document. Empty means none — never
|
|
166
|
+
* "all"; see `matchWatchedPaths`.
|
|
167
|
+
*/
|
|
168
|
+
watches(agentId, documentId) {
|
|
169
|
+
const row = this.#store.rawDb
|
|
170
|
+
.prepare("SELECT paths FROM document_watches WHERE agent_id = ? AND document_id = ?")
|
|
171
|
+
.get(agentId, documentId);
|
|
172
|
+
if (row?.paths === undefined)
|
|
173
|
+
return [];
|
|
174
|
+
try {
|
|
175
|
+
const parsed = JSON.parse(row.paths);
|
|
176
|
+
return Array.isArray(parsed) ? parsed : [];
|
|
177
|
+
}
|
|
178
|
+
catch {
|
|
179
|
+
return [];
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/** Replace the watch list. An empty list REMOVES the row, so "watching nothing" holds no state. */
|
|
183
|
+
setWatches(agentId, documentId, paths) {
|
|
184
|
+
if (paths.length === 0) {
|
|
185
|
+
this.#store.rawDb
|
|
186
|
+
.prepare("DELETE FROM document_watches WHERE agent_id = ? AND document_id = ?")
|
|
187
|
+
.run(agentId, documentId);
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
this.#store.rawDb
|
|
191
|
+
.prepare(`INSERT INTO document_watches (agent_id, document_id, paths, nudged_at)
|
|
192
|
+
VALUES (?, ?, ?, NULL)
|
|
193
|
+
ON CONFLICT (agent_id, document_id) DO UPDATE SET paths = excluded.paths, nudged_at = NULL`)
|
|
194
|
+
.run(agentId, documentId, JSON.stringify([...paths]));
|
|
195
|
+
}
|
|
196
|
+
/** Every document this agent is watching, for the surface that lists them. */
|
|
197
|
+
allWatches(agentId) {
|
|
198
|
+
const rows = this.#store.rawDb
|
|
199
|
+
.prepare("SELECT document_id, paths FROM document_watches WHERE agent_id = ? ORDER BY document_id")
|
|
200
|
+
.all(agentId);
|
|
201
|
+
return rows.map((r) => {
|
|
202
|
+
let paths = [];
|
|
203
|
+
try {
|
|
204
|
+
const parsed = JSON.parse(r.paths);
|
|
205
|
+
if (Array.isArray(parsed))
|
|
206
|
+
paths = parsed;
|
|
207
|
+
}
|
|
208
|
+
catch {
|
|
209
|
+
paths = [];
|
|
210
|
+
}
|
|
211
|
+
return { documentId: r.document_id, paths };
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Whether a nudge is owed — true only if one has not already fired since this agent last READ.
|
|
216
|
+
*
|
|
217
|
+
* RINGS ONCE. A peer editing for ten minutes must produce one nudge, not forty; the Telegram
|
|
218
|
+
* doorbell coalesces for the identical reason. Reading the document is what re-arms it, because
|
|
219
|
+
* reading is what makes the earlier nudge spent.
|
|
220
|
+
*/
|
|
221
|
+
nudgeOwed(agentId, documentId) {
|
|
222
|
+
const row = this.#store.rawDb
|
|
223
|
+
.prepare("SELECT nudged_at FROM document_watches WHERE agent_id = ? AND document_id = ?")
|
|
224
|
+
.get(agentId, documentId);
|
|
225
|
+
return row !== undefined && (row.nudged_at ?? null) === null;
|
|
226
|
+
}
|
|
227
|
+
/** Record that a nudge fired, so it does not fire again until the next read. */
|
|
228
|
+
markNudged(agentId, documentId, nowMs) {
|
|
229
|
+
this.#store.rawDb
|
|
230
|
+
.prepare("UPDATE document_watches SET nudged_at = ? WHERE agent_id = ? AND document_id = ?")
|
|
231
|
+
.run(nowMs, agentId, documentId);
|
|
232
|
+
}
|
|
233
|
+
markWritten(agentId, documentId, text) {
|
|
234
|
+
this.#store.rawDb
|
|
235
|
+
.prepare("UPDATE document_read_marks SET my_text = ? WHERE agent_id = ? AND document_id = ?")
|
|
236
|
+
.run(text, agentId, documentId);
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* The lines WE edited since the last read, 1-based, in the baseline's coordinate space — or null
|
|
240
|
+
* when we have not written since, which is "not computed" and must stay distinguishable from "no
|
|
241
|
+
* conflict". `diffStats` requires the distinction for exactly that reason.
|
|
242
|
+
*/
|
|
243
|
+
/**
|
|
244
|
+
* WHY THIS EXISTS, stated where the reader will need it:
|
|
245
|
+
*
|
|
246
|
+
* At diff time the two texts in hand are the baseline and the current document, and no amount of
|
|
247
|
+
* comparing them says which of the changes were the PEER's. So `overlap` was hardcoded `null`
|
|
248
|
+
* while three shipped instruction sheets told agents to branch on it — and `null` is falsy in
|
|
249
|
+
* JSON, so every one of them got the reassuring answer on every call. That is the precise trap
|
|
250
|
+
* `diffStats` made its `myEdits` parameter required to prevent, defeated by the one caller.
|
|
251
|
+
*
|
|
252
|
+
* Diffing the baseline against what WE last wrote gives our own edited lines in the baseline's
|
|
253
|
+
* coordinate space, which is the space the diff reports its ranges in. Exact, not inferred.
|
|
254
|
+
*/
|
|
255
|
+
myEditedLines(agentId, documentId) {
|
|
256
|
+
const row = this.#store.rawDb
|
|
257
|
+
.prepare("SELECT seen_text, my_text FROM document_read_marks WHERE agent_id = ? AND document_id = ?")
|
|
258
|
+
.get(agentId, documentId);
|
|
259
|
+
if (!row || row.my_text === null)
|
|
260
|
+
return null;
|
|
261
|
+
const lines = [];
|
|
262
|
+
const runs = lineRuns(toChunks(row.seen_text), toChunks(row.my_text));
|
|
263
|
+
if (runs === null) {
|
|
264
|
+
// Above the LCS limit. Said as "not computed" rather than degraded into a whole-file range,
|
|
265
|
+
// which would report every diff as an overlap and train the agent to ignore the field.
|
|
266
|
+
return null;
|
|
267
|
+
}
|
|
268
|
+
for (const hunk of runs) {
|
|
269
|
+
// The hunk's BEFORE range, which is what the diff reports its own ranges in. A pure insertion
|
|
270
|
+
// has an empty before-range and is attributed to the line it precedes, matching `diffStats`.
|
|
271
|
+
const start = hunk.aStart + 1;
|
|
272
|
+
const end = hunk.aEnd === hunk.aStart ? hunk.aStart + 1 : hunk.aEnd;
|
|
273
|
+
for (let n = start; n <= end; n++)
|
|
274
|
+
lines.push(n);
|
|
275
|
+
}
|
|
276
|
+
return lines;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* The text this agent last saw, or null if it has never read this document.
|
|
280
|
+
*
|
|
281
|
+
* NULL IS NOT THE EMPTY STRING, and callers must not conflate them. Never-read means the whole
|
|
282
|
+
* document is new to this agent; last-saw-empty means they read it when it was empty and
|
|
283
|
+
* everything since is a change they can be shown against that. Returning "" for both would render
|
|
284
|
+
* a first read of a long document as an enormous diff the agent then treats as "what just
|
|
285
|
+
* changed".
|
|
286
|
+
*/
|
|
287
|
+
lastSeen(agentId, documentId) {
|
|
288
|
+
const row = this.#store.rawDb
|
|
289
|
+
.prepare("SELECT seen_text FROM document_read_marks WHERE agent_id = ? AND document_id = ?")
|
|
290
|
+
.get(agentId, documentId);
|
|
291
|
+
return row === undefined ? null : row.seen_text;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* How many of the PEER's updates have arrived since this agent last read the document.
|
|
295
|
+
*
|
|
296
|
+
* Derived from the envelope log against the read mark's timestamp, never a counter. A counter is
|
|
297
|
+
* a second tally of a fact the log already holds, and the two disagree the first time a write is
|
|
298
|
+
* missed or an envelope is redelivered — which happens routinely, since redelivery is how an
|
|
299
|
+
* offline peer is caught up.
|
|
300
|
+
*
|
|
301
|
+
* No read mark means the agent has never read it, so everything the peer has sent is unread.
|
|
302
|
+
*/
|
|
303
|
+
unreadFromPeer(agentId, documentId) {
|
|
304
|
+
const mark = this.#store.rawDb
|
|
305
|
+
.prepare("SELECT seen_at FROM document_read_marks WHERE agent_id = ? AND document_id = ?")
|
|
306
|
+
.get(agentId, documentId);
|
|
307
|
+
const since = mark?.seen_at ?? 0;
|
|
308
|
+
const row = this.#store.rawDb
|
|
309
|
+
.prepare(`SELECT COUNT(*) AS n FROM document_envelopes
|
|
310
|
+
WHERE owner_agent_id = ? AND document_id = ? AND sender_agent_id != ?
|
|
311
|
+
AND kind = 'update' AND created_at > ?`)
|
|
312
|
+
.get(agentId, documentId, agentId, since);
|
|
313
|
+
return row?.n ?? 0;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Note that a document has unread updates. Passive — this never pushes anything.
|
|
317
|
+
*
|
|
318
|
+
* The count is REPLACED rather than incremented, and is passed in by the caller from the log,
|
|
319
|
+
* so the notice cannot drift from the document. An incremented counter is a second tally of a
|
|
320
|
+
* fact the log already holds, and the two disagree the first time a notice write is missed.
|
|
321
|
+
*/
|
|
322
|
+
notice(agentId, documentId, pending, nowMs) {
|
|
323
|
+
if (pending <= 0) {
|
|
324
|
+
// Nothing pending is not a notice with zero in it — it is the absence of a notice. A row
|
|
325
|
+
// saying "0 unread" is an inbox entry the agent must read to discover it has nothing to read.
|
|
326
|
+
//
|
|
327
|
+
// Deleted DIRECTLY rather than through `clear()`: that method's event means "the agent
|
|
328
|
+
// fetched", and firing it because a count fell to zero reports a fetch that never happened.
|
|
329
|
+
this.#store.rawDb
|
|
330
|
+
.prepare("DELETE FROM document_notices WHERE agent_id = ? AND document_id = ?")
|
|
331
|
+
.run(agentId, documentId);
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
this.#store.rawDb
|
|
335
|
+
.prepare(`INSERT INTO document_notices (agent_id, document_id, pending, noticed_at)
|
|
336
|
+
VALUES (?, ?, ?, ?)
|
|
337
|
+
ON CONFLICT (agent_id, document_id)
|
|
338
|
+
DO UPDATE SET pending = excluded.pending, noticed_at = excluded.noticed_at`)
|
|
339
|
+
.run(agentId, documentId, pending, nowMs);
|
|
340
|
+
}
|
|
341
|
+
/** The derived inbox section. Read-only — fetching is what clears, and that is explicit. */
|
|
342
|
+
pending(agentId) {
|
|
343
|
+
const rows = this.#store.rawDb
|
|
344
|
+
.prepare(`SELECT document_id, pending, noticed_at FROM document_notices
|
|
345
|
+
WHERE agent_id = ? ORDER BY noticed_at ASC, document_id ASC`)
|
|
346
|
+
.all(agentId);
|
|
347
|
+
return rows.map((r) => ({
|
|
348
|
+
documentId: r["document_id"],
|
|
349
|
+
pending: r["pending"],
|
|
350
|
+
noticedAtMs: r["noticed_at"],
|
|
351
|
+
}));
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Cleared by the agent's EXPLICIT fetch, never by the aggregation that displays it.
|
|
355
|
+
*
|
|
356
|
+
* Reading the inbox and clearing the notice are different acts: an inbox render that cleared
|
|
357
|
+
* would drop the notice for an agent that merely glanced at a summary, and the update would then
|
|
358
|
+
* be unread and unannounced — invisible in both directions.
|
|
359
|
+
*/
|
|
360
|
+
clear(agentId, documentId) {
|
|
361
|
+
const info = this.#store.rawDb
|
|
362
|
+
.prepare("DELETE FROM document_notices WHERE agent_id = ? AND document_id = ?")
|
|
363
|
+
.run(agentId, documentId);
|
|
364
|
+
const cleared = Number(info.changes) > 0;
|
|
365
|
+
// agentId included: this daemon attends several agents, and an event that names only the
|
|
366
|
+
// document cannot be attributed to one of them.
|
|
367
|
+
if (cleared)
|
|
368
|
+
this.#logger.info("document.notice.cleared", { agentId, documentId });
|
|
369
|
+
return cleared;
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Structural counts and ranges — NO content. Lets an agent decide whether to read.
|
|
373
|
+
*
|
|
374
|
+
* `before` and `after` are the materialized text of the document at the two points; the caller
|
|
375
|
+
* holds the engine and therefore the materialization.
|
|
376
|
+
*
|
|
377
|
+
* Uses the SHARED line LCS, not a positional walk. The first version compared line i to line i,
|
|
378
|
+
* which is correct only while the line count is unchanged: inserting one line at the top of a
|
|
379
|
+
* three-line file reported `+4 -3` with a single range covering the whole document. The counts
|
|
380
|
+
* being wrong is the smaller half — `overlap` is derived from those ranges, so it became
|
|
381
|
+
* permanently true, and a flag that always says yes trains the agent to ignore it. Same defect
|
|
382
|
+
* class WRITE-1 measured, which is why there is now one LCS rather than two.
|
|
383
|
+
*/
|
|
384
|
+
diffStats(documentId, before, after,
|
|
385
|
+
/**
|
|
386
|
+
* The operator's own edited line numbers. REQUIRED — pass `null` to say "not computed".
|
|
387
|
+
* Defaulting to `[]` made a caller that simply forgot receive `overlap: false`, the reassuring
|
|
388
|
+
* answer, indistinguishable from "checked, and there is no conflict". This is the one
|
|
389
|
+
* judgement field in an otherwise structural result.
|
|
390
|
+
*/
|
|
391
|
+
myEdits, documentType) {
|
|
392
|
+
const a = toChunks(before);
|
|
393
|
+
const b = toChunks(after);
|
|
394
|
+
const runs = lineRuns(a, b);
|
|
395
|
+
if (runs === null) {
|
|
396
|
+
// Above the LCS limit. Said plainly rather than degraded silently into a whole-file range
|
|
397
|
+
// that would read as a measurement.
|
|
398
|
+
return {
|
|
399
|
+
documentId,
|
|
400
|
+
linesAdded: b.length,
|
|
401
|
+
linesRemoved: a.length,
|
|
402
|
+
ranges: [{ start: 1, end: Math.max(a.length, b.length) }],
|
|
403
|
+
keyPaths: [],
|
|
404
|
+
keyPathsComputed: false,
|
|
405
|
+
overlap: myEdits === null ? null : myEdits.length > 0,
|
|
406
|
+
truncated: true,
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
// G3: for a JSON document the DoD asks for KEY ranges, not line ranges. Produced here rather
|
|
410
|
+
// than left as a permanently-empty array, which reads as "no key paths changed" instead of
|
|
411
|
+
// "not computed" — the same absent-is-not-fine trap as the overlap default above.
|
|
412
|
+
let keyPaths = [];
|
|
413
|
+
let keyPathsComputed = false;
|
|
414
|
+
// Dispatched on the ROOT, not the type name — a second map-root type must not fall through to
|
|
415
|
+
// the line path just because it is not called "json".
|
|
416
|
+
if (documentType !== undefined && rootForDocumentType(documentType) === "map") {
|
|
417
|
+
const paths = changedKeyPaths(before, after);
|
|
418
|
+
if (paths !== null) {
|
|
419
|
+
keyPaths = paths;
|
|
420
|
+
keyPathsComputed = true;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
let added = 0;
|
|
424
|
+
let removed = 0;
|
|
425
|
+
const ranges = [];
|
|
426
|
+
for (const r of runs) {
|
|
427
|
+
added += r.bEnd - r.bStart;
|
|
428
|
+
removed += r.aEnd - r.aStart;
|
|
429
|
+
// 1-based inclusive, over the BEFORE text — which is the text the operator's own edit line
|
|
430
|
+
// numbers refer to, and therefore the only coordinate space in which the overlap comparison
|
|
431
|
+
// means anything. A pure insertion has an empty before-range, so it is reported at the line
|
|
432
|
+
// it precedes rather than as a zero-width range nobody can act on.
|
|
433
|
+
ranges.push({ start: r.aStart + 1, end: r.aEnd === r.aStart ? r.aStart + 1 : r.aEnd });
|
|
434
|
+
}
|
|
435
|
+
const touched = new Set();
|
|
436
|
+
for (const r of ranges)
|
|
437
|
+
for (let n = r.start; n <= r.end; n++)
|
|
438
|
+
touched.add(n);
|
|
439
|
+
return {
|
|
440
|
+
documentId,
|
|
441
|
+
linesAdded: added,
|
|
442
|
+
linesRemoved: removed,
|
|
443
|
+
ranges,
|
|
444
|
+
keyPaths,
|
|
445
|
+
keyPathsComputed,
|
|
446
|
+
overlap: myEdits === null ? null : myEdits.some((line) => touched.has(line)),
|
|
447
|
+
truncated: false,
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* The git-like diff. An ordinary screened read — the caller screens it; this renders it.
|
|
452
|
+
*
|
|
453
|
+
* An unsupported type is REFUSED by name rather than line-diffed anyway. A diff that is silently
|
|
454
|
+
* wrong is worse than no diff, because the agent has no way to tell and will act on it.
|
|
455
|
+
*/
|
|
456
|
+
diff(documentType, before, after, documentId) {
|
|
457
|
+
if (!DIFFABLE_DOCUMENT_TYPES.includes(documentType)) {
|
|
458
|
+
return {
|
|
459
|
+
ok: false,
|
|
460
|
+
reason: "document_type_not_diffable",
|
|
461
|
+
detail: `this build renders diffs for ${DIFFABLE_DOCUMENT_TYPES.join(", ")} and this document is ` +
|
|
462
|
+
`"${documentType}" — read the document instead of a diff that would be guesswork`,
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
void documentId;
|
|
466
|
+
if (rootForDocumentType(documentType) === "map") {
|
|
467
|
+
// A key-path diff, not a line diff. Re-serialized JSON changes shape whenever a formatter
|
|
468
|
+
// touches it, so a line diff reports the entire document as rewritten for a change of one
|
|
469
|
+
// value — which is the false "everything changed" alarm that makes an agent stop reading
|
|
470
|
+
// diffs at all.
|
|
471
|
+
const parsedPaths = changedKeyPaths(before, after);
|
|
472
|
+
if (parsedPaths === null) {
|
|
473
|
+
return {
|
|
474
|
+
ok: true,
|
|
475
|
+
documentType: "json",
|
|
476
|
+
diff: `! this document does not parse as JSON; showing a line diff instead\n${lineDiff(before, after)}`,
|
|
477
|
+
fallback: "unparseable_json_line_diff",
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
return { ok: true, documentType: "json", diff: jsonDiff(before, after) };
|
|
481
|
+
}
|
|
482
|
+
return { ok: true, documentType: documentType, diff: lineDiff(before, after) };
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
function lineDiff(before, after) {
|
|
486
|
+
// The SHARED LCS, same as diffStats. This renderer kept the positional walk after diffStats moved
|
|
487
|
+
// off it, which is the worse half to leave behind: inserting one line into a ten-line file
|
|
488
|
+
// rendered eighteen +/- lines, reporting the entire remainder as rewritten. That is the false
|
|
489
|
+
// "everything changed" alarm that makes an agent stop reading diffs at all — the exact reasoning
|
|
490
|
+
// that gave JSON a key-path diff, applied to markdown at last.
|
|
491
|
+
const a = toChunks(before);
|
|
492
|
+
const b = toChunks(after);
|
|
493
|
+
const runs = lineRuns(a, b);
|
|
494
|
+
if (runs === null)
|
|
495
|
+
return "! this document is too large to diff line-by-line";
|
|
496
|
+
const out = [];
|
|
497
|
+
let ai = 0;
|
|
498
|
+
for (const r of runs) {
|
|
499
|
+
for (; ai < r.aStart; ai++)
|
|
500
|
+
out.push(` ${strip(a[ai])}`);
|
|
501
|
+
for (let i = r.aStart; i < r.aEnd; i++)
|
|
502
|
+
out.push(`- ${strip(a[i])}`);
|
|
503
|
+
for (let j = r.bStart; j < r.bEnd; j++)
|
|
504
|
+
out.push(`+ ${strip(b[j])}`);
|
|
505
|
+
ai = r.aEnd;
|
|
506
|
+
}
|
|
507
|
+
for (; ai < a.length; ai++)
|
|
508
|
+
out.push(` ${strip(a[ai])}`);
|
|
509
|
+
return out.join("\n");
|
|
510
|
+
}
|
|
511
|
+
/** Chunks carry their own trailing newline; the rendered diff supplies its own line breaks. */
|
|
512
|
+
function strip(chunk) {
|
|
513
|
+
return chunk.endsWith("\n") ? chunk.slice(0, -1) : chunk;
|
|
514
|
+
}
|
|
515
|
+
function flatten(value, prefix = "") {
|
|
516
|
+
const out = new Map();
|
|
517
|
+
if (value === null || typeof value !== "object") {
|
|
518
|
+
out.set(prefix || "$", JSON.stringify(value));
|
|
519
|
+
return out;
|
|
520
|
+
}
|
|
521
|
+
for (const [k, v] of Object.entries(value)) {
|
|
522
|
+
// The separator is ESCAPED in the key. Unescaped, {"a.b": 1} and {"a": {"b": 1}} flatten to the
|
|
523
|
+
// same path, so a document using dotted keys reports no change where there was one — silently,
|
|
524
|
+
// which is the exact behaviour this unit refuses everywhere else.
|
|
525
|
+
const path = prefix ? `${prefix}.${k.replace(/\\/g, "\\\\").replace(/\./g, "\\.")}` : k.replace(/\\/g, "\\\\").replace(/\./g, "\\.");
|
|
526
|
+
for (const [p, s] of flatten(v, path))
|
|
527
|
+
out.set(p, s);
|
|
528
|
+
}
|
|
529
|
+
return out;
|
|
530
|
+
}
|
|
531
|
+
/** The changed key paths, or null when either side does not parse. */
|
|
532
|
+
/**
|
|
533
|
+
* Exported so the WATCH matcher (`DOD-DOC-WATCH-1`) computes paths the same way `cello_doc_diff`
|
|
534
|
+
* renders them. Two implementations would let an agent be nudged about a path the diff never shows,
|
|
535
|
+
* or shown a path no watch can name — and either makes the feature untrustworthy.
|
|
536
|
+
*/
|
|
537
|
+
export function changedKeyPaths(before, after) {
|
|
538
|
+
let a;
|
|
539
|
+
let b;
|
|
540
|
+
try {
|
|
541
|
+
a = flatten(JSON.parse(before));
|
|
542
|
+
b = flatten(JSON.parse(after));
|
|
543
|
+
}
|
|
544
|
+
catch {
|
|
545
|
+
return null;
|
|
546
|
+
}
|
|
547
|
+
const paths = new Set();
|
|
548
|
+
for (const [path, value] of a)
|
|
549
|
+
if (!b.has(path) || b.get(path) !== value)
|
|
550
|
+
paths.add(path);
|
|
551
|
+
for (const [path] of b)
|
|
552
|
+
if (!a.has(path))
|
|
553
|
+
paths.add(path);
|
|
554
|
+
return [...paths].sort();
|
|
555
|
+
}
|
|
556
|
+
function jsonDiff(before, after) {
|
|
557
|
+
let a;
|
|
558
|
+
let b;
|
|
559
|
+
try {
|
|
560
|
+
a = flatten(JSON.parse(before));
|
|
561
|
+
b = flatten(JSON.parse(after));
|
|
562
|
+
}
|
|
563
|
+
catch {
|
|
564
|
+
// Deliberately explicit: unparseable JSON gets a stated fallback, not a silent line diff
|
|
565
|
+
// pretending to be a key diff. The caller sees which it got.
|
|
566
|
+
return `! this document does not parse as JSON; showing a line diff instead\n${lineDiff(before, after)}`;
|
|
567
|
+
}
|
|
568
|
+
const out = [];
|
|
569
|
+
for (const [path, value] of a) {
|
|
570
|
+
if (!b.has(path))
|
|
571
|
+
out.push(`- ${path}: ${value}`);
|
|
572
|
+
else if (b.get(path) !== value)
|
|
573
|
+
out.push(`~ ${path}: ${value} -> ${b.get(path)}`);
|
|
574
|
+
}
|
|
575
|
+
for (const [path, value] of b)
|
|
576
|
+
if (!a.has(path))
|
|
577
|
+
out.push(`+ ${path}: ${value}`);
|
|
578
|
+
return out.join("\n");
|
|
579
|
+
}
|
|
580
|
+
//# sourceMappingURL=document-notify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-notify.js","sourceRoot":"","sources":["../src/document-notify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAIjF,MAAM,kBAAkB,GAAG;;;;;;;;;CAS1B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH;;;;;;GAMG;AACH,MAAM,kBAAkB,GAAG;;;;;;;;CAQ1B,CAAC;AAEF,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;CAe7B,CAAC;AAEF,uGAAuG;AACvG,MAAM,iBAAiB,GAAG,CAAC,yDAAyD,CAAC,CAAC;AAEtF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAsB,qBAAqB,EAAE,CAAC;AA0ClF,MAAM,OAAO,qBAAqB;IACvB,MAAM,CAAgB;IACtB,OAAO,CAAS;IAEzB,YAAY,KAAoB,EAAE,MAAc;QAC9C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,CAAC,KAAK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
|
+
* DOD-DOC-PROFILE-1 — the content profile: an ALLOWLIST, agreed at the handshake.
|
|
3
|
+
*
|
|
4
|
+
* ── WHY AN ALLOWLIST WHEN A DENYLIST ALREADY EXISTS ───────────────────────────────────────────
|
|
5
|
+
*
|
|
6
|
+
* `document-screen.ts` is the denylist: it argues about characters, one at a time, in an open-ended
|
|
7
|
+
* space, and every argument happens mid-document with whoever is working ambushed by it. A profile
|
|
8
|
+
* inverts that. Only this character space is permitted, so violations are unambiguous — and the
|
|
9
|
+
* decision moves to CONSENT, which is the real win. "Do I want a Devanagari document with this
|
|
10
|
+
* person" is a question an operator can answer once, with a human already engaged, about the whole
|
|
11
|
+
* document. "What is U+200D doing at offset 412" is not a question anyone can answer.
|
|
12
|
+
*
|
|
13
|
+
* ── THE THREE CONSTRAINTS ─────────────────────────────────────────────────────────────────────
|
|
14
|
+
*
|
|
15
|
+
* NAMED AND CLOSED. A free-form profile is a negotiation again, and named profiles are what let
|
|
16
|
+
* an operator hold a standing policy — "never auto-accept `unicode-text` from an unendorsed
|
|
17
|
+
* contact". A sixth name is a protocol decision, not a caller's choice.
|
|
18
|
+
*
|
|
19
|
+
* CODEPOINT SETS, NOT ADJECTIVES. A profile enforced by a heuristic is a promise we do not keep,
|
|
20
|
+
* and "looks like markdown" is a heuristic. Every profile below is a predicate over code points.
|
|
21
|
+
*
|
|
22
|
+
* ENFORCED IN BOTH PLACES, for different reasons (§16.7-14). At authoring, so a stray character
|
|
23
|
+
* is caught where it was written and never becomes a rejection round — that is ERGONOMICS. At
|
|
24
|
+
* receipt, because the sender's enforcement is unverifiable — that is SECURITY. The second is not
|
|
25
|
+
* redundant with the first: a sender's client can be patched, or simply compromised while the
|
|
26
|
+
* sender themselves is a good actor.
|
|
27
|
+
*
|
|
28
|
+
* ── NARROWING ONLY ────────────────────────────────────────────────────────────────────────────
|
|
29
|
+
*
|
|
30
|
+
* Every profile, including the widest, still refuses what `document-screen.ts` refuses. A profile
|
|
31
|
+
* may only narrow the space, never widen it — otherwise choosing `unicode-text` would be a way to
|
|
32
|
+
* opt OUT of screening, and a peer could ask for that at consent time in the same breath as asking
|
|
33
|
+
* for Japanese.
|
|
34
|
+
*/
|
|
35
|
+
/** A violation, in the same machine-readable shape every refusal on this path uses. */
|
|
36
|
+
export interface ProfileViolation {
|
|
37
|
+
profile: string;
|
|
38
|
+
codepoints: string[];
|
|
39
|
+
count: number;
|
|
40
|
+
offsets: number[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The closed set. Each value answers one question: may this code point appear?
|
|
44
|
+
*
|
|
45
|
+
* `ascii-markdown` and `ascii-text` are the same space today — markdown's syntax is printable ASCII.
|
|
46
|
+
* They are kept distinct because the NAME is what an operator consents to and what a future diff
|
|
47
|
+
* renderer keys on, and collapsing them would make "this is a markdown document" unstateable.
|
|
48
|
+
*/
|
|
49
|
+
export declare const CONTENT_PROFILES: Record<string, (cp: number) => boolean>;
|
|
50
|
+
export declare function isKnownProfile(name: string | undefined): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Check text against a profile. Null admits.
|
|
53
|
+
*
|
|
54
|
+
* AN UNKNOWN OR ABSENT PROFILE ENFORCES NOTHING, and this is the one fail-open on the document
|
|
55
|
+
* path. A document agreed before profiles existed carries none, and refusing all of its updates
|
|
56
|
+
* would break a working document to enforce a rule its two parties never agreed to. The screening
|
|
57
|
+
* denylist still applies to it — that is the floor, and it is why failing open here is bounded
|
|
58
|
+
* rather than a hole.
|
|
59
|
+
*/
|
|
60
|
+
export declare function profileViolation(profile: string | undefined, text: string): ProfileViolation | null;
|
|
61
|
+
//# sourceMappingURL=document-profile.d.ts.map
|