@cello-protocol/daemon 0.0.225 → 0.0.227
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/package.json +5 -5
- package/dist/agent-admin-handlers.d.ts +0 -56
- package/dist/agent-admin-handlers.d.ts.map +0 -1
- package/dist/agent-admin-handlers.js +0 -73
- package/dist/agent-admin-handlers.js.map +0 -1
- package/dist/agent-handlers.d.ts +0 -72
- package/dist/agent-handlers.d.ts.map +0 -1
- package/dist/agent-handlers.js +0 -604
- package/dist/agent-handlers.js.map +0 -1
- package/dist/agent-id-migration.d.ts +0 -70
- package/dist/agent-id-migration.d.ts.map +0 -1
- package/dist/agent-id-migration.js +0 -468
- package/dist/agent-id-migration.js.map +0 -1
- package/dist/agent-loader.d.ts +0 -37
- package/dist/agent-loader.d.ts.map +0 -1
- package/dist/agent-loader.js +0 -37
- package/dist/agent-loader.js.map +0 -1
- package/dist/agent-selection-root.d.ts +0 -29
- package/dist/agent-selection-root.d.ts.map +0 -1
- package/dist/agent-selection-root.js +0 -126
- package/dist/agent-selection-root.js.map +0 -1
- package/dist/agent-selection.d.ts +0 -73
- package/dist/agent-selection.d.ts.map +0 -1
- package/dist/agent-selection.js +0 -80
- package/dist/agent-selection.js.map +0 -1
- package/dist/agent-settings-keys.d.ts +0 -52
- package/dist/agent-settings-keys.d.ts.map +0 -1
- package/dist/agent-settings-keys.js +0 -114
- package/dist/agent-settings-keys.js.map +0 -1
- package/dist/agent-state.d.ts +0 -67
- package/dist/agent-state.d.ts.map +0 -1
- package/dist/agent-state.js +0 -66
- package/dist/agent-state.js.map +0 -1
- package/dist/assignment-verify.d.ts +0 -90
- package/dist/assignment-verify.d.ts.map +0 -1
- package/dist/assignment-verify.js +0 -301
- package/dist/assignment-verify.js.map +0 -1
- package/dist/attendance-wiring.d.ts +0 -23
- package/dist/attendance-wiring.d.ts.map +0 -1
- package/dist/attendance-wiring.js +0 -248
- package/dist/attendance-wiring.js.map +0 -1
- package/dist/attestation-body.d.ts +0 -47
- package/dist/attestation-body.d.ts.map +0 -1
- package/dist/attestation-body.js +0 -71
- package/dist/attestation-body.js.map +0 -1
- package/dist/authorship-verification.d.ts +0 -91
- package/dist/authorship-verification.d.ts.map +0 -1
- package/dist/authorship-verification.js +0 -532
- package/dist/authorship-verification.js.map +0 -1
- package/dist/away-detection.d.ts +0 -139
- package/dist/away-detection.d.ts.map +0 -1
- package/dist/away-detection.js +0 -186
- package/dist/away-detection.js.map +0 -1
- package/dist/away-inbox-oneshot.d.ts +0 -40
- package/dist/away-inbox-oneshot.d.ts.map +0 -1
- package/dist/away-inbox-oneshot.js +0 -311
- package/dist/away-inbox-oneshot.js.map +0 -1
- package/dist/backup-restore-handlers.d.ts +0 -10
- package/dist/backup-restore-handlers.d.ts.map +0 -1
- package/dist/backup-restore-handlers.js +0 -82
- package/dist/backup-restore-handlers.js.map +0 -1
- package/dist/backup-restore.d.ts +0 -102
- package/dist/backup-restore.d.ts.map +0 -1
- package/dist/backup-restore.js +0 -341
- package/dist/backup-restore.js.map +0 -1
- package/dist/bin/cello-daemon.d.ts +0 -13
- package/dist/bin/cello-daemon.d.ts.map +0 -1
- package/dist/bin/cello-daemon.js.map +0 -1
- package/dist/boot-agents.d.ts +0 -64
- package/dist/boot-agents.d.ts.map +0 -1
- package/dist/boot-agents.js +0 -241
- package/dist/boot-agents.js.map +0 -1
- package/dist/boot-connection-state.d.ts +0 -38
- package/dist/boot-connection-state.d.ts.map +0 -1
- package/dist/boot-connection-state.js +0 -95
- package/dist/boot-connection-state.js.map +0 -1
- package/dist/boot-core.d.ts +0 -36
- package/dist/boot-core.d.ts.map +0 -1
- package/dist/boot-core.js +0 -293
- package/dist/boot-core.js.map +0 -1
- package/dist/boot-parked-content.d.ts +0 -34
- package/dist/boot-parked-content.d.ts.map +0 -1
- package/dist/boot-parked-content.js +0 -528
- package/dist/boot-parked-content.js.map +0 -1
- package/dist/boot-sweeps.d.ts +0 -22
- package/dist/boot-sweeps.d.ts.map +0 -1
- package/dist/boot-sweeps.js +0 -51
- package/dist/boot-sweeps.js.map +0 -1
- package/dist/bundled-consortium-manifest.d.ts +0 -47
- package/dist/bundled-consortium-manifest.d.ts.map +0 -1
- package/dist/bundled-consortium-manifest.js +0 -116
- package/dist/bundled-consortium-manifest.js.map +0 -1
- package/dist/cbor-blob-migration.d.ts +0 -8
- package/dist/cbor-blob-migration.d.ts.map +0 -1
- package/dist/cbor-blob-migration.js +0 -116
- package/dist/cbor-blob-migration.js.map +0 -1
- package/dist/challenge-verifier.d.ts +0 -12
- package/dist/challenge-verifier.d.ts.map +0 -1
- package/dist/challenge-verifier.js +0 -11
- package/dist/challenge-verifier.js.map +0 -1
- package/dist/close-commitment.d.ts +0 -67
- package/dist/close-commitment.d.ts.map +0 -1
- package/dist/close-commitment.js +0 -78
- package/dist/close-commitment.js.map +0 -1
- package/dist/close-session-handler.d.ts +0 -94
- package/dist/close-session-handler.d.ts.map +0 -1
- package/dist/close-session-handler.js +0 -1418
- package/dist/close-session-handler.js.map +0 -1
- package/dist/co-attendance.d.ts +0 -29
- package/dist/co-attendance.d.ts.map +0 -1
- package/dist/co-attendance.js +0 -32
- package/dist/co-attendance.js.map +0 -1
- package/dist/column-birth.d.ts +0 -40
- package/dist/column-birth.d.ts.map +0 -1
- package/dist/column-birth.js +0 -61
- package/dist/column-birth.js.map +0 -1
- package/dist/connect-or-start.d.ts +0 -25
- package/dist/connect-or-start.d.ts.map +0 -1
- package/dist/connect-or-start.js +0 -175
- package/dist/connect-or-start.js.map +0 -1
- package/dist/connection-agents.d.ts +0 -16
- package/dist/connection-agents.d.ts.map +0 -1
- package/dist/connection-agents.js +0 -68
- package/dist/connection-agents.js.map +0 -1
- package/dist/consent-migration.d.ts +0 -49
- package/dist/consent-migration.d.ts.map +0 -1
- package/dist/consent-migration.js +0 -128
- package/dist/consent-migration.js.map +0 -1
- package/dist/consortium-bootstrap.d.ts +0 -138
- package/dist/consortium-bootstrap.d.ts.map +0 -1
- package/dist/consortium-bootstrap.js +0 -339
- package/dist/consortium-bootstrap.js.map +0 -1
- package/dist/consortium-fingerprint.d.ts +0 -115
- package/dist/consortium-fingerprint.d.ts.map +0 -1
- package/dist/consortium-fingerprint.js +0 -175
- package/dist/consortium-fingerprint.js.map +0 -1
- package/dist/contact-handlers.d.ts +0 -59
- package/dist/contact-handlers.d.ts.map +0 -1
- package/dist/contact-handlers.js +0 -343
- package/dist/contact-handlers.js.map +0 -1
- package/dist/contact-pubkey-case.d.ts +0 -65
- package/dist/contact-pubkey-case.d.ts.map +0 -1
- package/dist/contact-pubkey-case.js +0 -136
- package/dist/contact-pubkey-case.js.map +0 -1
- package/dist/contacts-tier-migration.d.ts +0 -90
- package/dist/contacts-tier-migration.d.ts.map +0 -1
- package/dist/contacts-tier-migration.js +0 -150
- package/dist/contacts-tier-migration.js.map +0 -1
- package/dist/content-encryption-status.d.ts +0 -111
- package/dist/content-encryption-status.d.ts.map +0 -1
- package/dist/content-encryption-status.js +0 -158
- package/dist/content-encryption-status.js.map +0 -1
- package/dist/content-park-client.d.ts +0 -90
- package/dist/content-park-client.d.ts.map +0 -1
- package/dist/content-park-client.js +0 -362
- package/dist/content-park-client.js.map +0 -1
- package/dist/content-park.d.ts +0 -52
- package/dist/content-park.d.ts.map +0 -1
- package/dist/content-park.js +0 -1309
- package/dist/content-park.js.map +0 -1
- package/dist/cross-node-negotiation.d.ts +0 -44
- package/dist/cross-node-negotiation.d.ts.map +0 -1
- package/dist/cross-node-negotiation.js +0 -34
- package/dist/cross-node-negotiation.js.map +0 -1
- package/dist/daemon-handle.d.ts +0 -57
- package/dist/daemon-handle.d.ts.map +0 -1
- package/dist/daemon-handle.js +0 -2
- package/dist/daemon-handle.js.map +0 -1
- package/dist/daemon-status-report.d.ts +0 -50
- package/dist/daemon-status-report.d.ts.map +0 -1
- package/dist/daemon-status-report.js +0 -81
- package/dist/daemon-status-report.js.map +0 -1
- package/dist/daemon.d.ts +0 -45
- package/dist/daemon.d.ts.map +0 -1
- package/dist/daemon.js +0 -1177
- package/dist/daemon.js.map +0 -1
- package/dist/db-identity-store.d.ts +0 -159
- package/dist/db-identity-store.d.ts.map +0 -1
- package/dist/db-identity-store.js +0 -502
- package/dist/db-identity-store.js.map +0 -1
- package/dist/delivery-open-registry.d.ts +0 -92
- package/dist/delivery-open-registry.d.ts.map +0 -1
- package/dist/delivery-open-registry.js +0 -121
- package/dist/delivery-open-registry.js.map +0 -1
- package/dist/delivery-session-suspects.d.ts +0 -56
- package/dist/delivery-session-suspects.d.ts.map +0 -1
- package/dist/delivery-session-suspects.js +0 -94
- package/dist/delivery-session-suspects.js.map +0 -1
- package/dist/directory-auth-posture.d.ts +0 -87
- package/dist/directory-auth-posture.d.ts.map +0 -1
- package/dist/directory-auth-posture.js +0 -134
- package/dist/directory-auth-posture.js.map +0 -1
- package/dist/directory-bootstrap.d.ts +0 -310
- package/dist/directory-bootstrap.d.ts.map +0 -1
- package/dist/directory-bootstrap.js +0 -557
- package/dist/directory-bootstrap.js.map +0 -1
- package/dist/directory-connect.d.ts +0 -27
- package/dist/directory-connect.d.ts.map +0 -1
- package/dist/directory-connect.js +0 -106
- package/dist/directory-connect.js.map +0 -1
- package/dist/disconnect-cleanup.d.ts +0 -51
- package/dist/disconnect-cleanup.d.ts.map +0 -1
- package/dist/disconnect-cleanup.js +0 -72
- package/dist/disconnect-cleanup.js.map +0 -1
- package/dist/document-amendment-store.d.ts +0 -120
- package/dist/document-amendment-store.d.ts.map +0 -1
- package/dist/document-amendment-store.js +0 -266
- package/dist/document-amendment-store.js.map +0 -1
- package/dist/document-delivery-transport.d.ts +0 -168
- package/dist/document-delivery-transport.d.ts.map +0 -1
- package/dist/document-delivery-transport.js +0 -206
- package/dist/document-delivery-transport.js.map +0 -1
- package/dist/document-engine.d.ts +0 -134
- package/dist/document-engine.d.ts.map +0 -1
- package/dist/document-engine.js +0 -282
- package/dist/document-engine.js.map +0 -1
- package/dist/document-flag.d.ts +0 -58
- package/dist/document-flag.d.ts.map +0 -1
- package/dist/document-flag.js +0 -70
- package/dist/document-flag.js.map +0 -1
- package/dist/document-frame-router.d.ts +0 -245
- package/dist/document-frame-router.d.ts.map +0 -1
- package/dist/document-frame-router.js +0 -397
- package/dist/document-frame-router.js.map +0 -1
- package/dist/document-gate-wiring.d.ts +0 -61
- package/dist/document-gate-wiring.d.ts.map +0 -1
- package/dist/document-gate-wiring.js +0 -125
- package/dist/document-gate-wiring.js.map +0 -1
- package/dist/document-gate.d.ts +0 -149
- package/dist/document-gate.d.ts.map +0 -1
- package/dist/document-gate.js +0 -509
- package/dist/document-gate.js.map +0 -1
- package/dist/document-handlers.d.ts +0 -47
- package/dist/document-handlers.d.ts.map +0 -1
- package/dist/document-handlers.js +0 -2203
- package/dist/document-handlers.js.map +0 -1
- package/dist/document-handshake.d.ts +0 -176
- package/dist/document-handshake.d.ts.map +0 -1
- package/dist/document-handshake.js +0 -452
- package/dist/document-handshake.js.map +0 -1
- package/dist/document-inbound.d.ts +0 -162
- package/dist/document-inbound.d.ts.map +0 -1
- package/dist/document-inbound.js +0 -530
- package/dist/document-inbound.js.map +0 -1
- package/dist/document-json.d.ts +0 -120
- package/dist/document-json.d.ts.map +0 -1
- package/dist/document-json.js +0 -191
- package/dist/document-json.js.map +0 -1
- package/dist/document-layer.d.ts +0 -215
- package/dist/document-layer.d.ts.map +0 -1
- package/dist/document-layer.js +0 -1025
- package/dist/document-layer.js.map +0 -1
- package/dist/document-lifecycle.d.ts +0 -52
- package/dist/document-lifecycle.d.ts.map +0 -1
- package/dist/document-lifecycle.js +0 -134
- package/dist/document-lifecycle.js.map +0 -1
- package/dist/document-live-docs.d.ts +0 -58
- package/dist/document-live-docs.d.ts.map +0 -1
- package/dist/document-live-docs.js +0 -126
- package/dist/document-live-docs.js.map +0 -1
- package/dist/document-notify.d.ts +0 -228
- package/dist/document-notify.d.ts.map +0 -1
- package/dist/document-notify.js +0 -580
- package/dist/document-notify.js.map +0 -1
- package/dist/document-profile.d.ts +0 -61
- package/dist/document-profile.d.ts.map +0 -1
- package/dist/document-profile.js +0 -112
- package/dist/document-profile.js.map +0 -1
- package/dist/document-publish.d.ts +0 -87
- package/dist/document-publish.d.ts.map +0 -1
- package/dist/document-publish.js +0 -173
- package/dist/document-publish.js.map +0 -1
- package/dist/document-reachability.d.ts +0 -42
- package/dist/document-reachability.d.ts.map +0 -1
- package/dist/document-reachability.js +0 -80
- package/dist/document-reachability.js.map +0 -1
- package/dist/document-reconcile-engine.d.ts +0 -66
- package/dist/document-reconcile-engine.d.ts.map +0 -1
- package/dist/document-reconcile-engine.js +0 -225
- package/dist/document-reconcile-engine.js.map +0 -1
- package/dist/document-reconcile-scheduler.d.ts +0 -163
- package/dist/document-reconcile-scheduler.d.ts.map +0 -1
- package/dist/document-reconcile-scheduler.js +0 -303
- package/dist/document-reconcile-scheduler.js.map +0 -1
- package/dist/document-rejection.d.ts +0 -251
- package/dist/document-rejection.d.ts.map +0 -1
- package/dist/document-rejection.js +0 -435
- package/dist/document-rejection.js.map +0 -1
- package/dist/document-screen.d.ts +0 -114
- package/dist/document-screen.d.ts.map +0 -1
- package/dist/document-screen.js +0 -223
- package/dist/document-screen.js.map +0 -1
- package/dist/document-store.d.ts +0 -372
- package/dist/document-store.d.ts.map +0 -1
- package/dist/document-store.js +0 -931
- package/dist/document-store.js.map +0 -1
- package/dist/document-surface.d.ts +0 -32
- package/dist/document-surface.d.ts.map +0 -1
- package/dist/document-surface.js +0 -151
- package/dist/document-surface.js.map +0 -1
- package/dist/document-types.d.ts +0 -94
- package/dist/document-types.d.ts.map +0 -1
- package/dist/document-types.js +0 -90
- package/dist/document-types.js.map +0 -1
- package/dist/document-watch.d.ts +0 -69
- package/dist/document-watch.d.ts.map +0 -1
- package/dist/document-watch.js +0 -108
- package/dist/document-watch.js.map +0 -1
- package/dist/document-wiring.d.ts +0 -53
- package/dist/document-wiring.d.ts.map +0 -1
- package/dist/document-wiring.js +0 -323
- package/dist/document-wiring.js.map +0 -1
- package/dist/document-write-guard.d.ts +0 -66
- package/dist/document-write-guard.d.ts.map +0 -1
- package/dist/document-write-guard.js +0 -98
- package/dist/document-write-guard.js.map +0 -1
- package/dist/document-write-path.d.ts +0 -94
- package/dist/document-write-path.d.ts.map +0 -1
- package/dist/document-write-path.js +0 -530
- package/dist/document-write-path.js.map +0 -1
- package/dist/error-message.d.ts +0 -7
- package/dist/error-message.d.ts.map +0 -1
- package/dist/error-message.js +0 -19
- package/dist/error-message.js.map +0 -1
- package/dist/file-manifest-provider.d.ts +0 -37
- package/dist/file-manifest-provider.d.ts.map +0 -1
- package/dist/file-manifest-provider.js +0 -105
- package/dist/file-manifest-provider.js.map +0 -1
- package/dist/frame-values.d.ts +0 -3
- package/dist/frame-values.d.ts.map +0 -1
- package/dist/frame-values.js +0 -84
- package/dist/frame-values.js.map +0 -1
- package/dist/frontier-mismatch.d.ts +0 -73
- package/dist/frontier-mismatch.d.ts.map +0 -1
- package/dist/frontier-mismatch.js +0 -89
- package/dist/frontier-mismatch.js.map +0 -1
- package/dist/gateway-config-handlers.d.ts +0 -26
- package/dist/gateway-config-handlers.d.ts.map +0 -1
- package/dist/gateway-config-handlers.js +0 -429
- package/dist/gateway-config-handlers.js.map +0 -1
- package/dist/held-content.d.ts +0 -145
- package/dist/held-content.d.ts.map +0 -1
- package/dist/held-content.js +0 -389
- package/dist/held-content.js.map +0 -1
- package/dist/http-manifest-poll.d.ts +0 -67
- package/dist/http-manifest-poll.d.ts.map +0 -1
- package/dist/http-manifest-poll.js +0 -150
- package/dist/http-manifest-poll.js.map +0 -1
- package/dist/identity-migration.d.ts +0 -40
- package/dist/identity-migration.d.ts.map +0 -1
- package/dist/identity-migration.js +0 -461
- package/dist/identity-migration.js.map +0 -1
- package/dist/inbound-refusals.d.ts +0 -283
- package/dist/inbound-refusals.d.ts.map +0 -1
- package/dist/inbound-refusals.js +0 -919
- package/dist/inbound-refusals.js.map +0 -1
- package/dist/inbound-seal-request.d.ts +0 -32
- package/dist/inbound-seal-request.d.ts.map +0 -1
- package/dist/inbound-seal-request.js +0 -228
- package/dist/inbound-seal-request.js.map +0 -1
- package/dist/inbound-sessions.d.ts +0 -291
- package/dist/inbound-sessions.d.ts.map +0 -1
- package/dist/inbound-sessions.js +0 -1609
- package/dist/inbound-sessions.js.map +0 -1
- package/dist/inclusion-proof-handlers.d.ts +0 -43
- package/dist/inclusion-proof-handlers.d.ts.map +0 -1
- package/dist/inclusion-proof-handlers.js +0 -565
- package/dist/inclusion-proof-handlers.js.map +0 -1
- package/dist/inclusion-proof.d.ts +0 -151
- package/dist/inclusion-proof.d.ts.map +0 -1
- package/dist/inclusion-proof.js +0 -228
- package/dist/inclusion-proof.js.map +0 -1
- package/dist/index.d.ts +0 -32
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/initiate-session-handler.d.ts +0 -55
- package/dist/initiate-session-handler.d.ts.map +0 -1
- package/dist/initiate-session-handler.js +0 -310
- package/dist/initiate-session-handler.js.map +0 -1
- package/dist/ipc-client.d.ts +0 -31
- package/dist/ipc-client.d.ts.map +0 -1
- package/dist/ipc-client.js +0 -113
- package/dist/ipc-client.js.map +0 -1
- package/dist/ipc-server.d.ts +0 -63
- package/dist/ipc-server.d.ts.map +0 -1
- package/dist/ipc-server.js +0 -429
- package/dist/ipc-server.js.map +0 -1
- package/dist/ipc-surface.d.ts +0 -44
- package/dist/ipc-surface.d.ts.map +0 -1
- package/dist/ipc-surface.js +0 -107
- package/dist/ipc-surface.js.map +0 -1
- package/dist/line-lcs.d.ts +0 -51
- package/dist/line-lcs.d.ts.map +0 -1
- package/dist/line-lcs.js +0 -71
- package/dist/line-lcs.js.map +0 -1
- package/dist/lock-file.d.ts +0 -39
- package/dist/lock-file.d.ts.map +0 -1
- package/dist/lock-file.js +0 -120
- package/dist/lock-file.js.map +0 -1
- package/dist/log-collapse.d.ts +0 -66
- package/dist/log-collapse.d.ts.map +0 -1
- package/dist/log-collapse.js +0 -244
- package/dist/log-collapse.js.map +0 -1
- package/dist/log-rotate.d.ts +0 -67
- package/dist/log-rotate.d.ts.map +0 -1
- package/dist/log-rotate.js +0 -134
- package/dist/log-rotate.js.map +0 -1
- package/dist/manifest-deps.d.ts +0 -25
- package/dist/manifest-deps.d.ts.map +0 -1
- package/dist/manifest-deps.js +0 -151
- package/dist/manifest-deps.js.map +0 -1
- package/dist/manifest-poll-scheduler.d.ts +0 -31
- package/dist/manifest-poll-scheduler.d.ts.map +0 -1
- package/dist/manifest-poll-scheduler.js +0 -59
- package/dist/manifest-poll-scheduler.js.map +0 -1
- package/dist/manifest-validity.d.ts +0 -153
- package/dist/manifest-validity.d.ts.map +0 -1
- package/dist/manifest-validity.js +0 -268
- package/dist/manifest-validity.js.map +0 -1
- package/dist/manifest-version-store-db.d.ts +0 -24
- package/dist/manifest-version-store-db.d.ts.map +0 -1
- package/dist/manifest-version-store-db.js +0 -58
- package/dist/manifest-version-store-db.js.map +0 -1
- package/dist/manifest-version-store.d.ts +0 -16
- package/dist/manifest-version-store.d.ts.map +0 -1
- package/dist/manifest-version-store.js +0 -15
- package/dist/manifest-version-store.js.map +0 -1
- package/dist/network-directory-node.d.ts +0 -136
- package/dist/network-directory-node.d.ts.map +0 -1
- package/dist/network-directory-node.js +0 -810
- package/dist/network-directory-node.js.map +0 -1
- package/dist/nonce-dedup.d.ts +0 -68
- package/dist/nonce-dedup.d.ts.map +0 -1
- package/dist/nonce-dedup.js +0 -205
- package/dist/nonce-dedup.js.map +0 -1
- package/dist/notification-dispatcher.d.ts +0 -92
- package/dist/notification-dispatcher.d.ts.map +0 -1
- package/dist/notification-dispatcher.js +0 -210
- package/dist/notification-dispatcher.js.map +0 -1
- package/dist/notification-handlers.d.ts +0 -53
- package/dist/notification-handlers.d.ts.map +0 -1
- package/dist/notification-handlers.js +0 -461
- package/dist/notification-handlers.js.map +0 -1
- package/dist/onboarding-guidance.d.ts +0 -79
- package/dist/onboarding-guidance.d.ts.map +0 -1
- package/dist/onboarding-guidance.js +0 -95
- package/dist/onboarding-guidance.js.map +0 -1
- package/dist/operator-guidance.d.ts +0 -25
- package/dist/operator-guidance.d.ts.map +0 -1
- package/dist/operator-guidance.js +0 -50
- package/dist/operator-guidance.js.map +0 -1
- package/dist/orphan-triage.d.ts +0 -130
- package/dist/orphan-triage.d.ts.map +0 -1
- package/dist/orphan-triage.js +0 -207
- package/dist/orphan-triage.js.map +0 -1
- package/dist/outbound-sessions.d.ts +0 -126
- package/dist/outbound-sessions.d.ts.map +0 -1
- package/dist/outbound-sessions.js +0 -1052
- package/dist/outbound-sessions.js.map +0 -1
- package/dist/park-envelope.d.ts +0 -329
- package/dist/park-envelope.d.ts.map +0 -1
- package/dist/park-envelope.js +0 -509
- package/dist/park-envelope.js.map +0 -1
- package/dist/park-recovery.d.ts +0 -273
- package/dist/park-recovery.d.ts.map +0 -1
- package/dist/park-recovery.js +0 -717
- package/dist/park-recovery.js.map +0 -1
- package/dist/park-refusals.d.ts +0 -147
- package/dist/park-refusals.d.ts.map +0 -1
- package/dist/park-refusals.js +0 -331
- package/dist/park-refusals.js.map +0 -1
- package/dist/quarantine-framing.d.ts +0 -92
- package/dist/quarantine-framing.d.ts.map +0 -1
- package/dist/quarantine-framing.js +0 -111
- package/dist/quarantine-framing.js.map +0 -1
- package/dist/reconnect-drain.d.ts +0 -22
- package/dist/reconnect-drain.d.ts.map +0 -1
- package/dist/reconnect-drain.js +0 -65
- package/dist/reconnect-drain.js.map +0 -1
- package/dist/recovered-position.d.ts +0 -14
- package/dist/recovered-position.d.ts.map +0 -1
- package/dist/recovered-position.js +0 -59
- package/dist/recovered-position.js.map +0 -1
- package/dist/refusal-notices.d.ts +0 -196
- package/dist/refusal-notices.d.ts.map +0 -1
- package/dist/refusal-notices.js +0 -516
- package/dist/refusal-notices.js.map +0 -1
- package/dist/refusal-reasons.d.ts +0 -245
- package/dist/refusal-reasons.d.ts.map +0 -1
- package/dist/refusal-reasons.js +0 -363
- package/dist/refusal-reasons.js.map +0 -1
- package/dist/register-handler.d.ts +0 -36
- package/dist/register-handler.d.ts.map +0 -1
- package/dist/register-handler.js +0 -285
- package/dist/register-handler.js.map +0 -1
- package/dist/registration-context.d.ts +0 -72
- package/dist/registration-context.d.ts.map +0 -1
- package/dist/registration-context.js +0 -126
- package/dist/registration-context.js.map +0 -1
- package/dist/registration-manager.d.ts +0 -94
- package/dist/registration-manager.d.ts.map +0 -1
- package/dist/registration-manager.js +0 -585
- package/dist/registration-manager.js.map +0 -1
- package/dist/registration-persistence.d.ts +0 -183
- package/dist/registration-persistence.d.ts.map +0 -1
- package/dist/registration-persistence.js +0 -263
- package/dist/registration-persistence.js.map +0 -1
- package/dist/registry-poll.d.ts +0 -52
- package/dist/registry-poll.d.ts.map +0 -1
- package/dist/registry-poll.js +0 -140
- package/dist/registry-poll.js.map +0 -1
- package/dist/registry-version-store-db.d.ts +0 -22
- package/dist/registry-version-store-db.d.ts.map +0 -1
- package/dist/registry-version-store-db.js +0 -50
- package/dist/registry-version-store-db.js.map +0 -1
- package/dist/relay-endpoints.d.ts +0 -18
- package/dist/relay-endpoints.d.ts.map +0 -1
- package/dist/relay-endpoints.js +0 -9
- package/dist/relay-endpoints.js.map +0 -1
- package/dist/relay-only.d.ts +0 -140
- package/dist/relay-only.d.ts.map +0 -1
- package/dist/relay-only.js +0 -193
- package/dist/relay-only.js.map +0 -1
- package/dist/relay-receipt-store.d.ts +0 -155
- package/dist/relay-receipt-store.d.ts.map +0 -1
- package/dist/relay-receipt-store.js +0 -284
- package/dist/relay-receipt-store.js.map +0 -1
- package/dist/relay-reconnect.d.ts +0 -32
- package/dist/relay-reconnect.d.ts.map +0 -1
- package/dist/relay-reconnect.js +0 -29
- package/dist/relay-reconnect.js.map +0 -1
- package/dist/reply-lag.d.ts +0 -11
- package/dist/reply-lag.d.ts.map +0 -1
- package/dist/reply-lag.js +0 -46
- package/dist/reply-lag.js.map +0 -1
- package/dist/resolve-named-agent.d.ts +0 -49
- package/dist/resolve-named-agent.d.ts.map +0 -1
- package/dist/resolve-named-agent.js +0 -77
- package/dist/resolve-named-agent.js.map +0 -1
- package/dist/restart-seal-resolver.d.ts +0 -110
- package/dist/restart-seal-resolver.d.ts.map +0 -1
- package/dist/restart-seal-resolver.js +0 -353
- package/dist/restart-seal-resolver.js.map +0 -1
- package/dist/resume-last-seen.d.ts +0 -15
- package/dist/resume-last-seen.d.ts.map +0 -1
- package/dist/resume-last-seen.js +0 -44
- package/dist/resume-last-seen.js.map +0 -1
- package/dist/retry-queue.d.ts +0 -203
- package/dist/retry-queue.d.ts.map +0 -1
- package/dist/retry-queue.js +0 -701
- package/dist/retry-queue.js.map +0 -1
- package/dist/roster-freshness.d.ts +0 -160
- package/dist/roster-freshness.d.ts.map +0 -1
- package/dist/roster-freshness.js +0 -250
- package/dist/roster-freshness.js.map +0 -1
- package/dist/screening-status.d.ts +0 -15
- package/dist/screening-status.d.ts.map +0 -1
- package/dist/screening-status.js +0 -65
- package/dist/screening-status.js.map +0 -1
- package/dist/seal-carried-close.d.ts +0 -37
- package/dist/seal-carried-close.d.ts.map +0 -1
- package/dist/seal-carried-close.js +0 -179
- package/dist/seal-carried-close.js.map +0 -1
- package/dist/seal-certificate-pull.d.ts +0 -79
- package/dist/seal-certificate-pull.d.ts.map +0 -1
- package/dist/seal-certificate-pull.js +0 -186
- package/dist/seal-certificate-pull.js.map +0 -1
- package/dist/seal-certified-root-check.d.ts +0 -37
- package/dist/seal-certified-root-check.d.ts.map +0 -1
- package/dist/seal-certified-root-check.js +0 -127
- package/dist/seal-certified-root-check.js.map +0 -1
- package/dist/seal-coordinator.d.ts +0 -118
- package/dist/seal-coordinator.d.ts.map +0 -1
- package/dist/seal-coordinator.js +0 -927
- package/dist/seal-coordinator.js.map +0 -1
- package/dist/seal-escalation.d.ts +0 -80
- package/dist/seal-escalation.d.ts.map +0 -1
- package/dist/seal-escalation.js +0 -283
- package/dist/seal-escalation.js.map +0 -1
- package/dist/seal-evidence-root-check.d.ts +0 -70
- package/dist/seal-evidence-root-check.d.ts.map +0 -1
- package/dist/seal-evidence-root-check.js +0 -199
- package/dist/seal-evidence-root-check.js.map +0 -1
- package/dist/seal-failure-store.d.ts +0 -129
- package/dist/seal-failure-store.d.ts.map +0 -1
- package/dist/seal-failure-store.js +0 -173
- package/dist/seal-failure-store.js.map +0 -1
- package/dist/seal-flows.d.ts +0 -107
- package/dist/seal-flows.d.ts.map +0 -1
- package/dist/seal-flows.js +0 -638
- package/dist/seal-flows.js.map +0 -1
- package/dist/seal-frontier-verify.d.ts +0 -103
- package/dist/seal-frontier-verify.d.ts.map +0 -1
- package/dist/seal-frontier-verify.js +0 -143
- package/dist/seal-frontier-verify.js.map +0 -1
- package/dist/seal-leaf.d.ts +0 -58
- package/dist/seal-leaf.d.ts.map +0 -1
- package/dist/seal-leaf.js +0 -112
- package/dist/seal-leaf.js.map +0 -1
- package/dist/seal-legibility-tbs.d.ts +0 -25
- package/dist/seal-legibility-tbs.d.ts.map +0 -1
- package/dist/seal-legibility-tbs.js +0 -77
- package/dist/seal-legibility-tbs.js.map +0 -1
- package/dist/seal-local-terminus.d.ts +0 -41
- package/dist/seal-local-terminus.d.ts.map +0 -1
- package/dist/seal-local-terminus.js +0 -170
- package/dist/seal-local-terminus.js.map +0 -1
- package/dist/seal-receipt-upgrade.d.ts +0 -30
- package/dist/seal-receipt-upgrade.d.ts.map +0 -1
- package/dist/seal-receipt-upgrade.js +0 -49
- package/dist/seal-receipt-upgrade.js.map +0 -1
- package/dist/seal-relay-silence.d.ts +0 -51
- package/dist/seal-relay-silence.d.ts.map +0 -1
- package/dist/seal-relay-silence.js +0 -76
- package/dist/seal-relay-silence.js.map +0 -1
- package/dist/seal-settle.d.ts +0 -38
- package/dist/seal-settle.d.ts.map +0 -1
- package/dist/seal-settle.js +0 -33
- package/dist/seal-settle.js.map +0 -1
- package/dist/seal-upgrade.d.ts +0 -107
- package/dist/seal-upgrade.d.ts.map +0 -1
- package/dist/seal-upgrade.js +0 -200
- package/dist/seal-upgrade.js.map +0 -1
- package/dist/sealed-conversation.d.ts +0 -36
- package/dist/sealed-conversation.d.ts.map +0 -1
- package/dist/sealed-conversation.js +0 -171
- package/dist/sealed-conversation.js.map +0 -1
- package/dist/sealed-leaf-set.d.ts +0 -92
- package/dist/sealed-leaf-set.d.ts.map +0 -1
- package/dist/sealed-leaf-set.js +0 -122
- package/dist/sealed-leaf-set.js.map +0 -1
- package/dist/send-claims.d.ts +0 -56
- package/dist/send-claims.d.ts.map +0 -1
- package/dist/send-claims.js +0 -50
- package/dist/send-claims.js.map +0 -1
- package/dist/session-assignment-parser.d.ts +0 -98
- package/dist/session-assignment-parser.d.ts.map +0 -1
- package/dist/session-assignment-parser.js +0 -325
- package/dist/session-assignment-parser.js.map +0 -1
- package/dist/session-category.d.ts +0 -19
- package/dist/session-category.d.ts.map +0 -1
- package/dist/session-category.js +0 -14
- package/dist/session-category.js.map +0 -1
- package/dist/session-ceremony.d.ts +0 -297
- package/dist/session-ceremony.d.ts.map +0 -1
- package/dist/session-ceremony.js +0 -964
- package/dist/session-ceremony.js.map +0 -1
- package/dist/session-closed.d.ts +0 -79
- package/dist/session-closed.d.ts.map +0 -1
- package/dist/session-closed.js +0 -189
- package/dist/session-closed.js.map +0 -1
- package/dist/session-connection-gater.d.ts +0 -148
- package/dist/session-connection-gater.d.ts.map +0 -1
- package/dist/session-connection-gater.js +0 -332
- package/dist/session-connection-gater.js.map +0 -1
- package/dist/session-content-context.d.ts +0 -162
- package/dist/session-content-context.d.ts.map +0 -1
- package/dist/session-content-context.js +0 -2
- package/dist/session-content-context.js.map +0 -1
- package/dist/session-content-handlers.d.ts +0 -82
- package/dist/session-content-handlers.d.ts.map +0 -1
- package/dist/session-content-handlers.js +0 -1382
- package/dist/session-content-handlers.js.map +0 -1
- package/dist/session-content-ingest.d.ts +0 -206
- package/dist/session-content-ingest.d.ts.map +0 -1
- package/dist/session-content-ingest.js +0 -2167
- package/dist/session-content-ingest.js.map +0 -1
- package/dist/session-content-send.d.ts +0 -191
- package/dist/session-content-send.d.ts.map +0 -1
- package/dist/session-content-send.js +0 -1360
- package/dist/session-content-send.js.map +0 -1
- package/dist/session-delivery-acks.d.ts +0 -169
- package/dist/session-delivery-acks.d.ts.map +0 -1
- package/dist/session-delivery-acks.js +0 -569
- package/dist/session-delivery-acks.js.map +0 -1
- package/dist/session-ephemerals.d.ts +0 -279
- package/dist/session-ephemerals.d.ts.map +0 -1
- package/dist/session-ephemerals.js +0 -591
- package/dist/session-ephemerals.js.map +0 -1
- package/dist/session-leaf-records.d.ts +0 -159
- package/dist/session-leaf-records.d.ts.map +0 -1
- package/dist/session-leaf-records.js +0 -408
- package/dist/session-leaf-records.js.map +0 -1
- package/dist/session-lifecycle.d.ts +0 -303
- package/dist/session-lifecycle.d.ts.map +0 -1
- package/dist/session-lifecycle.js +0 -1679
- package/dist/session-lifecycle.js.map +0 -1
- package/dist/session-liveness.d.ts +0 -135
- package/dist/session-liveness.d.ts.map +0 -1
- package/dist/session-liveness.js +0 -347
- package/dist/session-liveness.js.map +0 -1
- package/dist/session-name.d.ts +0 -35
- package/dist/session-name.d.ts.map +0 -1
- package/dist/session-name.js +0 -60
- package/dist/session-name.js.map +0 -1
- package/dist/session-node-factory.d.ts +0 -18
- package/dist/session-node-factory.d.ts.map +0 -1
- package/dist/session-node-factory.js +0 -182
- package/dist/session-node-factory.js.map +0 -1
- package/dist/session-node-manager.d.ts +0 -875
- package/dist/session-node-manager.d.ts.map +0 -1
- package/dist/session-node-manager.js +0 -2995
- package/dist/session-node-manager.js.map +0 -1
- package/dist/session-node-types.d.ts +0 -1057
- package/dist/session-node-types.d.ts.map +0 -1
- package/dist/session-node-types.js +0 -657
- package/dist/session-node-types.js.map +0 -1
- package/dist/session-notify.d.ts +0 -46
- package/dist/session-notify.d.ts.map +0 -1
- package/dist/session-notify.js +0 -116
- package/dist/session-notify.js.map +0 -1
- package/dist/session-own-chain-store.d.ts +0 -65
- package/dist/session-own-chain-store.d.ts.map +0 -1
- package/dist/session-own-chain-store.js +0 -75
- package/dist/session-own-chain-store.js.map +0 -1
- package/dist/session-queries.d.ts +0 -476
- package/dist/session-queries.d.ts.map +0 -1
- package/dist/session-queries.js +0 -1007
- package/dist/session-queries.js.map +0 -1
- package/dist/session-read-handlers.d.ts +0 -87
- package/dist/session-read-handlers.d.ts.map +0 -1
- package/dist/session-read-handlers.js +0 -682
- package/dist/session-read-handlers.js.map +0 -1
- package/dist/session-records.d.ts +0 -341
- package/dist/session-records.d.ts.map +0 -1
- package/dist/session-records.js +0 -858
- package/dist/session-records.js.map +0 -1
- package/dist/session-relay-client.d.ts +0 -659
- package/dist/session-relay-client.d.ts.map +0 -1
- package/dist/session-relay-client.js +0 -2876
- package/dist/session-relay-client.js.map +0 -1
- package/dist/session-relay.d.ts +0 -397
- package/dist/session-relay.d.ts.map +0 -1
- package/dist/session-relay.js +0 -1636
- package/dist/session-relay.js.map +0 -1
- package/dist/session-salt-agreement.d.ts +0 -331
- package/dist/session-salt-agreement.d.ts.map +0 -1
- package/dist/session-salt-agreement.js +0 -472
- package/dist/session-salt-agreement.js.map +0 -1
- package/dist/session-salts.d.ts +0 -432
- package/dist/session-salts.d.ts.map +0 -1
- package/dist/session-salts.js +0 -1540
- package/dist/session-salts.js.map +0 -1
- package/dist/session-schema.d.ts +0 -30
- package/dist/session-schema.d.ts.map +0 -1
- package/dist/session-schema.js +0 -877
- package/dist/session-schema.js.map +0 -1
- package/dist/session-seal-leaf-store.d.ts +0 -70
- package/dist/session-seal-leaf-store.d.ts.map +0 -1
- package/dist/session-seal-leaf-store.js +0 -105
- package/dist/session-seal-leaf-store.js.map +0 -1
- package/dist/session-seal.d.ts +0 -334
- package/dist/session-seal.d.ts.map +0 -1
- package/dist/session-seal.js +0 -1017
- package/dist/session-seal.js.map +0 -1
- package/dist/session-terminal-refusal.d.ts +0 -65
- package/dist/session-terminal-refusal.d.ts.map +0 -1
- package/dist/session-terminal-refusal.js +0 -87
- package/dist/session-terminal-refusal.js.map +0 -1
- package/dist/session-tree.d.ts +0 -110
- package/dist/session-tree.d.ts.map +0 -1
- package/dist/session-tree.js +0 -144
- package/dist/session-tree.js.map +0 -1
- package/dist/session-views.d.ts +0 -47
- package/dist/session-views.d.ts.map +0 -1
- package/dist/session-views.js +0 -278
- package/dist/session-views.js.map +0 -1
- package/dist/signal-handlers.d.ts +0 -63
- package/dist/signal-handlers.d.ts.map +0 -1
- package/dist/signal-handlers.js +0 -980
- package/dist/signal-handlers.js.map +0 -1
- package/dist/signal-requirement-policy.d.ts +0 -51
- package/dist/signal-requirement-policy.d.ts.map +0 -1
- package/dist/signal-requirement-policy.js +0 -89
- package/dist/signal-requirement-policy.js.map +0 -1
- package/dist/signal-revocability.d.ts +0 -49
- package/dist/signal-revocability.d.ts.map +0 -1
- package/dist/signal-revocability.js +0 -93
- package/dist/signal-revocability.js.map +0 -1
- package/dist/signal-submission.d.ts +0 -181
- package/dist/signal-submission.d.ts.map +0 -1
- package/dist/signal-submission.js +0 -368
- package/dist/signal-submission.js.map +0 -1
- package/dist/signaling-connect.d.ts +0 -118
- package/dist/signaling-connect.d.ts.map +0 -1
- package/dist/signaling-connect.js +0 -538
- package/dist/signaling-connect.js.map +0 -1
- package/dist/signaling-wiring.d.ts +0 -105
- package/dist/signaling-wiring.d.ts.map +0 -1
- package/dist/signaling-wiring.js +0 -393
- package/dist/signaling-wiring.js.map +0 -1
- package/dist/singleton-lock.d.ts +0 -85
- package/dist/singleton-lock.d.ts.map +0 -1
- package/dist/singleton-lock.js +0 -219
- package/dist/singleton-lock.js.map +0 -1
- package/dist/sqlcipher-db.d.ts +0 -139
- package/dist/sqlcipher-db.d.ts.map +0 -1
- package/dist/sqlcipher-db.js +0 -357
- package/dist/sqlcipher-db.js.map +0 -1
- package/dist/standing-receivers.d.ts +0 -319
- package/dist/standing-receivers.d.ts.map +0 -1
- package/dist/standing-receivers.js +0 -1295
- package/dist/standing-receivers.js.map +0 -1
- package/dist/start-agent.d.ts +0 -64
- package/dist/start-agent.d.ts.map +0 -1
- package/dist/start-agent.js +0 -136
- package/dist/start-agent.js.map +0 -1
- package/dist/status-handler.d.ts +0 -54
- package/dist/status-handler.d.ts.map +0 -1
- package/dist/status-handler.js +0 -61
- package/dist/status-handler.js.map +0 -1
- package/dist/submission-retry.d.ts +0 -208
- package/dist/submission-retry.d.ts.map +0 -1
- package/dist/submission-retry.js +0 -506
- package/dist/submission-retry.js.map +0 -1
- package/dist/telegram-bot-client.d.ts +0 -34
- package/dist/telegram-bot-client.d.ts.map +0 -1
- package/dist/telegram-bot-client.js +0 -36
- package/dist/telegram-bot-client.js.map +0 -1
- package/dist/telegram-doorbell.d.ts +0 -38
- package/dist/telegram-doorbell.d.ts.map +0 -1
- package/dist/telegram-doorbell.js +0 -140
- package/dist/telegram-doorbell.js.map +0 -1
- package/dist/test-handlers.d.ts +0 -62
- package/dist/test-handlers.d.ts.map +0 -1
- package/dist/test-handlers.js +0 -240
- package/dist/test-handlers.js.map +0 -1
- package/dist/testing.d.ts +0 -10
- package/dist/testing.d.ts.map +0 -1
- package/dist/testing.js +0 -10
- package/dist/testing.js.map +0 -1
- package/dist/transport-composition.d.ts +0 -31
- package/dist/transport-composition.d.ts.map +0 -1
- package/dist/transport-composition.js +0 -55
- package/dist/transport-composition.js.map +0 -1
- package/dist/transport-selector.d.ts +0 -202
- package/dist/transport-selector.d.ts.map +0 -1
- package/dist/transport-selector.js +0 -196
- package/dist/transport-selector.js.map +0 -1
- package/dist/trust-signal-pickup-listener.d.ts +0 -43
- package/dist/trust-signal-pickup-listener.d.ts.map +0 -1
- package/dist/trust-signal-pickup-listener.js +0 -48
- package/dist/trust-signal-pickup-listener.js.map +0 -1
- package/dist/trust-signal-store.d.ts +0 -406
- package/dist/trust-signal-store.d.ts.map +0 -1
- package/dist/trust-signal-store.js +0 -939
- package/dist/trust-signal-store.js.map +0 -1
- package/dist/trust-signal-sweep-tick.d.ts +0 -60
- package/dist/trust-signal-sweep-tick.d.ts.map +0 -1
- package/dist/trust-signal-sweep-tick.js +0 -101
- package/dist/trust-signal-sweep-tick.js.map +0 -1
- package/dist/trust-signal-sweep.d.ts +0 -94
- package/dist/trust-signal-sweep.d.ts.map +0 -1
- package/dist/trust-signal-sweep.js +0 -147
- package/dist/trust-signal-sweep.js.map +0 -1
- package/dist/type-registry.d.ts +0 -42
- package/dist/type-registry.d.ts.map +0 -1
- package/dist/type-registry.js +0 -37
- package/dist/type-registry.js.map +0 -1
- package/dist/types.d.ts +0 -746
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -20
- package/dist/types.js.map +0 -1
- package/dist/unresolved-nodes-report.d.ts +0 -14
- package/dist/unresolved-nodes-report.d.ts.map +0 -1
- package/dist/unresolved-nodes-report.js +0 -96
- package/dist/unresolved-nodes-report.js.map +0 -1
- package/dist/vocabulary.d.ts +0 -150
- package/dist/vocabulary.d.ts.map +0 -1
- package/dist/vocabulary.js +0 -386
- package/dist/vocabulary.js.map +0 -1
- package/dist/who-label.d.ts +0 -28
- package/dist/who-label.d.ts.map +0 -1
- package/dist/who-label.js +0 -31
- package/dist/who-label.js.map +0 -1
- package/dist/who-resolver.d.ts +0 -15
- package/dist/who-resolver.d.ts.map +0 -1
- package/dist/who-resolver.js +0 -47
- package/dist/who-resolver.js.map +0 -1
- package/dist/wire-content-hash.d.ts +0 -93
- package/dist/wire-content-hash.d.ts.map +0 -1
- package/dist/wire-content-hash.js +0 -116
- package/dist/wire-content-hash.js.map +0 -1
- package/dist/withheld-content.d.ts +0 -13
- package/dist/withheld-content.d.ts.map +0 -1
- package/dist/withheld-content.js +0 -46
- package/dist/withheld-content.js.map +0 -1
- package/dist/witness-alerts.d.ts +0 -40
- package/dist/witness-alerts.d.ts.map +0 -1
- package/dist/witness-alerts.js +0 -102
- package/dist/witness-alerts.js.map +0 -1
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DOD-DOC-WRITE-1 — the write path (§16.2).
|
|
3
|
-
*
|
|
4
|
-
* **The document is a real file.** The agent edits it with Read/Edit like any other file, and the
|
|
5
|
-
* human can open the same file; the daemon diffs it at publish and converts the diff into Yjs
|
|
6
|
-
* operations. No new editing surface exists — that is the design, not a shortcut.
|
|
7
|
-
*
|
|
8
|
-
* ── THE FOLD ORDER IS THE DESIGN ──────────────────────────────────────────────────────────────
|
|
9
|
-
*
|
|
10
|
-
* On admission (§16.2): fold the agent's UNPUBLISHED file edits into the `Y.Doc` as local
|
|
11
|
-
* operations FIRST, then merge the incoming update, then rewrite the file. Reversing the first
|
|
12
|
-
* two silently destroys the agent's unpublished work, and §4.1's overlap flag — which IS whether
|
|
13
|
-
* the merge touched what the fold just wrote — disappears with it.
|
|
14
|
-
*
|
|
15
|
-
* ── WHY THE PROJECTION IS PERSISTED ───────────────────────────────────────────────────────────
|
|
16
|
-
*
|
|
17
|
-
* §16.2 says publish diffs the file against "the last-known projection", and that baseline has to
|
|
18
|
-
* outlive the process. Diffing against the DOC's current text instead looks equivalent and is not:
|
|
19
|
-
* `admit` merges into the doc and rewrites the file as two separate steps, so a crash between them
|
|
20
|
-
* leaves a stale file beside an advanced doc. Diffing that against the doc reads the peer's
|
|
21
|
-
* admitted content as something the agent deleted, and publishes the deletion as deliberate
|
|
22
|
-
* intent. Measured, so the projection is written to disk beside the document and read back.
|
|
23
|
-
*/
|
|
24
|
-
import * as Y from "yjs";
|
|
25
|
-
import type { DocumentEngine } from "./document-engine.js";
|
|
26
|
-
import type { Logger } from "./types.js";
|
|
27
|
-
/**
|
|
28
|
-
* The type registry moved to `document-types.ts` — see that file for why.
|
|
29
|
-
*
|
|
30
|
-
* These re-exports keep the existing call sites working. `SUPPORTED_DOCUMENT_TYPES` and the
|
|
31
|
-
* extension rule used to be defined HERE, in parallel with a second list in `document-notify`, and
|
|
32
|
-
* the two drifted: `plaintext` was admitted and could not be diffed.
|
|
33
|
-
*/
|
|
34
|
-
export { extensionForDocumentType, isSupportedDocumentType } from "./document-types.js";
|
|
35
|
-
/** The types `propose`/`accept` will admit — derived from the registry, never a second list. */
|
|
36
|
-
export declare const SUPPORTED_DOCUMENT_TYPES: ReadonlySet<string>;
|
|
37
|
-
export type DocumentWriteFailure = "document_file_missing" | "document_file_unparseable" | "document_file_stale" | "document_file_changed_during_merge" | "document_projection_missing" | "document_file_unreadable" | "document_type_unsupported" | "document_id_invalid";
|
|
38
|
-
export declare class DocumentWriteError extends Error {
|
|
39
|
-
readonly reason: DocumentWriteFailure;
|
|
40
|
-
readonly detail: string;
|
|
41
|
-
constructor(reason: DocumentWriteFailure, detail: string);
|
|
42
|
-
}
|
|
43
|
-
export interface AdmitResult {
|
|
44
|
-
/**
|
|
45
|
-
* §4.1's overlap flag: the merge touched a region (or, for JSON, a key) holding UNPUBLISHED
|
|
46
|
-
* local edits. Not a conflict warning — Yjs resolved it — but a signal that the agent should
|
|
47
|
-
* re-read the merged projection before building on what it thought it had written.
|
|
48
|
-
*/
|
|
49
|
-
overlap: boolean;
|
|
50
|
-
}
|
|
51
|
-
export declare class DocumentWritePath {
|
|
52
|
-
#private;
|
|
53
|
-
readonly engine: DocumentEngine;
|
|
54
|
-
constructor(engine: DocumentEngine, workspaceRoot: string, logger: Logger);
|
|
55
|
-
/**
|
|
56
|
-
* The file a document lives at. Keyed on the FULL `agent_id`/`document_id` — truncating them
|
|
57
|
-
* would let two documents sharing a prefix collide onto one file and destroy each other, and
|
|
58
|
-
* both ids are validated because they become path components.
|
|
59
|
-
*/
|
|
60
|
-
filePath(agentId: string, documentId: string, documentType: string): string;
|
|
61
|
-
/** Write the document's projection to disk and record it as the diff baseline. */
|
|
62
|
-
materialize(agentId: string, documentId: string, documentType: string, doc: Y.Doc): Promise<string>;
|
|
63
|
-
/**
|
|
64
|
-
* Diff the file against the LAST-KNOWN PROJECTION and apply the difference as local operations.
|
|
65
|
-
* Returns the resulting update, or null when the file is unchanged.
|
|
66
|
-
*
|
|
67
|
-
* Null is a real answer: publish is an intent, so a publish with nothing to say must produce no
|
|
68
|
-
* envelope rather than an empty one that still costs a leaf and a round trip.
|
|
69
|
-
*/
|
|
70
|
-
publish(agentId: string, documentId: string, documentType: string, doc: Y.Doc): Promise<Uint8Array | null>;
|
|
71
|
-
/** Admit a peer's update: fold local edits, merge, rewrite, report overlap. */
|
|
72
|
-
admit(agentId: string, documentId: string, documentType: string, doc: Y.Doc, incoming: Uint8Array): Promise<AdmitResult>;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Line-level hunks between two texts, as character offsets into `before`.
|
|
76
|
-
*
|
|
77
|
-
* Lines are represented as CHUNKS — each line carries its own trailing newline, except the last,
|
|
78
|
-
* which does not. That representation is what makes newline handling fall out instead of being
|
|
79
|
-
* special-cased: appending a line to "a\nb" turns the chunk "b" into "b\n" + "c", so the LCS
|
|
80
|
-
* sees the last line as changed and the hunk replaces "b" with "b\nc". A hand-rolled
|
|
81
|
-
* prefix/suffix trim got this wrong for every edit that changed the line count — measured, four
|
|
82
|
-
* of six ordinary markdown edits published text that was not what the file said.
|
|
83
|
-
*
|
|
84
|
-
* A real LCS (not a prefix/suffix trim) is required because the whole point is to emit SEPARATE
|
|
85
|
-
* hunks for separated edits: one span from the first change to the last would delete and
|
|
86
|
-
* re-insert everything between them as new operations, resurrecting text a peer concurrently
|
|
87
|
-
* deleted. Under publish-on-intent, multi-edit publishes are the modal case.
|
|
88
|
-
*/
|
|
89
|
-
export declare function lineHunks(before: string, after: string): Array<{
|
|
90
|
-
from: number;
|
|
91
|
-
to: number;
|
|
92
|
-
insert: string;
|
|
93
|
-
}>;
|
|
94
|
-
//# sourceMappingURL=document-write-path.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document-write-path.d.ts","sourceRoot":"","sources":["../src/document-write-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAIH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAUzC;;;;;;GAMG;AACH,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAExF,gGAAgG;AAChG,eAAO,MAAM,wBAAwB,EAAE,WAAW,CAAC,MAAM,CAAoC,CAAC;AAe9F,MAAM,MAAM,oBAAoB,GAC5B,uBAAuB,GACvB,2BAA2B,GAC3B,qBAAqB,GACrB,oCAAoC,GACpC,6BAA6B,GAC7B,0BAA0B,GAC1B,2BAA2B,GAC3B,qBAAqB,CAAC;AAE1B,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBACZ,MAAM,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM;CAMzD;AAED,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,qBAAa,iBAAiB;;IAC5B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;gBAIpB,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAMzE;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;IAkE3E,kFAAkF;IAC5E,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;IAWzG;;;;;;OAMG;IACG,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IA2ChH,+EAA+E;IACzE,KAAK,CACT,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,CAAC,CAAC,GAAG,EACV,QAAQ,EAAE,UAAU,GACnB,OAAO,CAAC,WAAW,CAAC;CAsSxB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAyBrD"}
|
|
@@ -1,530 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DOD-DOC-WRITE-1 — the write path (§16.2).
|
|
3
|
-
*
|
|
4
|
-
* **The document is a real file.** The agent edits it with Read/Edit like any other file, and the
|
|
5
|
-
* human can open the same file; the daemon diffs it at publish and converts the diff into Yjs
|
|
6
|
-
* operations. No new editing surface exists — that is the design, not a shortcut.
|
|
7
|
-
*
|
|
8
|
-
* ── THE FOLD ORDER IS THE DESIGN ──────────────────────────────────────────────────────────────
|
|
9
|
-
*
|
|
10
|
-
* On admission (§16.2): fold the agent's UNPUBLISHED file edits into the `Y.Doc` as local
|
|
11
|
-
* operations FIRST, then merge the incoming update, then rewrite the file. Reversing the first
|
|
12
|
-
* two silently destroys the agent's unpublished work, and §4.1's overlap flag — which IS whether
|
|
13
|
-
* the merge touched what the fold just wrote — disappears with it.
|
|
14
|
-
*
|
|
15
|
-
* ── WHY THE PROJECTION IS PERSISTED ───────────────────────────────────────────────────────────
|
|
16
|
-
*
|
|
17
|
-
* §16.2 says publish diffs the file against "the last-known projection", and that baseline has to
|
|
18
|
-
* outlive the process. Diffing against the DOC's current text instead looks equivalent and is not:
|
|
19
|
-
* `admit` merges into the doc and rewrites the file as two separate steps, so a crash between them
|
|
20
|
-
* leaves a stale file beside an advanced doc. Diffing that against the doc reads the peer's
|
|
21
|
-
* admitted content as something the agent deleted, and publishes the deletion as deliberate
|
|
22
|
-
* intent. Measured, so the projection is written to disk beside the document and read back.
|
|
23
|
-
*/
|
|
24
|
-
import { mkdir, readFile, writeFile, rename, access, rm } from "node:fs/promises";
|
|
25
|
-
import { join } from "node:path";
|
|
26
|
-
import { lineRuns, toChunks } from "./line-lcs.js";
|
|
27
|
-
import { serializeJsonDocument, parseJsonDocument, applyJsonToMap } from "./document-json.js";
|
|
28
|
-
import { extensionForDocumentType, admittedDocumentTypes, rootForDocumentType, DOCUMENT_TYPES } from "./document-types.js";
|
|
29
|
-
/** Yjs roots a materialized document projects from. TEXT_ROOT must match DocumentEngine's. */
|
|
30
|
-
const TEXT_ROOT = "content";
|
|
31
|
-
const MAP_ROOT = "data";
|
|
32
|
-
/**
|
|
33
|
-
* The type registry moved to `document-types.ts` — see that file for why.
|
|
34
|
-
*
|
|
35
|
-
* These re-exports keep the existing call sites working. `SUPPORTED_DOCUMENT_TYPES` and the
|
|
36
|
-
* extension rule used to be defined HERE, in parallel with a second list in `document-notify`, and
|
|
37
|
-
* the two drifted: `plaintext` was admitted and could not be diffed.
|
|
38
|
-
*/
|
|
39
|
-
export { extensionForDocumentType, isSupportedDocumentType } from "./document-types.js";
|
|
40
|
-
/** The types `propose`/`accept` will admit — derived from the registry, never a second list. */
|
|
41
|
-
export const SUPPORTED_DOCUMENT_TYPES = new Set(admittedDocumentTypes());
|
|
42
|
-
/**
|
|
43
|
-
* The extension every type was materialized under before the registry existed.
|
|
44
|
-
*
|
|
45
|
-
* Documents created then are on operators' disks right now. The CONTENT of one is never at risk —
|
|
46
|
-
* it lives in the CRDT and would be rewritten at the new path. What is at risk is whatever the
|
|
47
|
-
* agent typed into the old file and has NOT published: those bytes exist nowhere else, and leaving
|
|
48
|
-
* them at a path nothing reads again loses work silently.
|
|
49
|
-
*/
|
|
50
|
-
const LEGACY_EXTENSION = "md";
|
|
51
|
-
/** Ids are hex identities, never names, and they become path components. */
|
|
52
|
-
const ID_PATTERN = /^[0-9a-f]{64}$/;
|
|
53
|
-
export class DocumentWriteError extends Error {
|
|
54
|
-
reason;
|
|
55
|
-
detail;
|
|
56
|
-
constructor(reason, detail) {
|
|
57
|
-
super(`${reason}: ${detail}`);
|
|
58
|
-
this.name = "DocumentWriteError";
|
|
59
|
-
this.reason = reason;
|
|
60
|
-
this.detail = detail;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
export class DocumentWritePath {
|
|
64
|
-
engine;
|
|
65
|
-
#root;
|
|
66
|
-
#logger;
|
|
67
|
-
constructor(engine, workspaceRoot, logger) {
|
|
68
|
-
this.engine = engine;
|
|
69
|
-
this.#root = workspaceRoot;
|
|
70
|
-
this.#logger = logger;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* The file a document lives at. Keyed on the FULL `agent_id`/`document_id` — truncating them
|
|
74
|
-
* would let two documents sharing a prefix collide onto one file and destroy each other, and
|
|
75
|
-
* both ids are validated because they become path components.
|
|
76
|
-
*/
|
|
77
|
-
filePath(agentId, documentId, documentType) {
|
|
78
|
-
this.#assertId(agentId, "agent_id");
|
|
79
|
-
this.#assertId(documentId, "document_id");
|
|
80
|
-
return join(this.#root, agentId, `${documentId}.${this.#extension(documentType)}`);
|
|
81
|
-
}
|
|
82
|
-
/** The extension, refusing a type this build has no path rule for rather than defaulting. */
|
|
83
|
-
#extension(documentType) {
|
|
84
|
-
const extension = extensionForDocumentType(documentType);
|
|
85
|
-
if (extension === undefined) {
|
|
86
|
-
throw new DocumentWriteError("document_type_unsupported", `no file extension is defined for document type '${documentType}'`);
|
|
87
|
-
}
|
|
88
|
-
return extension;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Move a document created under the old everything-is-`.md` rule onto its typed path.
|
|
92
|
-
*
|
|
93
|
-
* The file and its projection move TOGETHER. Moving only the file leaves publish with no recorded
|
|
94
|
-
* baseline (`document_file_missing`); moving only the projection leaves it diffing an absent file.
|
|
95
|
-
*
|
|
96
|
-
* A file already at the new path wins: both present means the new one is the live document and
|
|
97
|
-
* the old one is a leftover, so preferring the old file would replay stale content over current
|
|
98
|
-
* work — the reverse of the bug this fixes. The leftover is removed so a later run cannot find it.
|
|
99
|
-
*/
|
|
100
|
-
async #migrateLegacyPath(agentId, documentId, documentType) {
|
|
101
|
-
const extension = this.#extension(documentType);
|
|
102
|
-
if (extension === LEGACY_EXTENSION)
|
|
103
|
-
return;
|
|
104
|
-
const pairs = [
|
|
105
|
-
[
|
|
106
|
-
join(this.#root, agentId, `${documentId}.${LEGACY_EXTENSION}`),
|
|
107
|
-
join(this.#root, agentId, `${documentId}.${extension}`),
|
|
108
|
-
],
|
|
109
|
-
[
|
|
110
|
-
join(this.#root, ".cello", agentId, `${documentId}.${LEGACY_EXTENSION}.projection`),
|
|
111
|
-
this.#projectionPath(agentId, documentId, documentType),
|
|
112
|
-
],
|
|
113
|
-
];
|
|
114
|
-
let moved = false;
|
|
115
|
-
for (const [from, to] of pairs) {
|
|
116
|
-
try {
|
|
117
|
-
await access(from);
|
|
118
|
-
}
|
|
119
|
-
catch {
|
|
120
|
-
continue; // nothing there — the ordinary case for every document created since.
|
|
121
|
-
}
|
|
122
|
-
try {
|
|
123
|
-
await access(to);
|
|
124
|
-
await rm(from, { force: true }); // the new path is live; this is a leftover.
|
|
125
|
-
continue;
|
|
126
|
-
}
|
|
127
|
-
catch {
|
|
128
|
-
// no file at the new path — the legacy one IS the document.
|
|
129
|
-
}
|
|
130
|
-
await rename(from, to);
|
|
131
|
-
moved = true;
|
|
132
|
-
}
|
|
133
|
-
if (moved) {
|
|
134
|
-
this.#logger.info("document.file.migrated", { documentId, documentType, extension });
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
/** Write the document's projection to disk and record it as the diff baseline. */
|
|
138
|
-
async materialize(agentId, documentId, documentType, doc) {
|
|
139
|
-
this.#assertSupported(documentType);
|
|
140
|
-
await this.#migrateLegacyPath(agentId, documentId, documentType);
|
|
141
|
-
const path = this.filePath(agentId, documentId, documentType);
|
|
142
|
-
const content = this.#project(doc, documentType);
|
|
143
|
-
await this.#writeAtomic(agentId, path, content);
|
|
144
|
-
await this.#saveProjection(agentId, documentId, documentType, content);
|
|
145
|
-
this.#logger.info("document.file.materialized", { documentId, bytes: content.length });
|
|
146
|
-
return path;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Diff the file against the LAST-KNOWN PROJECTION and apply the difference as local operations.
|
|
150
|
-
* Returns the resulting update, or null when the file is unchanged.
|
|
151
|
-
*
|
|
152
|
-
* Null is a real answer: publish is an intent, so a publish with nothing to say must produce no
|
|
153
|
-
* envelope rather than an empty one that still costs a leaf and a round trip.
|
|
154
|
-
*/
|
|
155
|
-
async publish(agentId, documentId, documentType, doc) {
|
|
156
|
-
this.#assertSupported(documentType);
|
|
157
|
-
await this.#migrateLegacyPath(agentId, documentId, documentType);
|
|
158
|
-
const path = this.filePath(agentId, documentId, documentType);
|
|
159
|
-
const onDisk = await this.#readOrRefuse(path, documentId);
|
|
160
|
-
const projection = await this.#loadProjection(agentId, documentId, documentType);
|
|
161
|
-
if (projection === null) {
|
|
162
|
-
throw new DocumentWriteError("document_file_missing", `no recorded projection for document ${documentId} — materialize it before publishing`);
|
|
163
|
-
}
|
|
164
|
-
// A file that matches NEITHER the recorded projection nor the document's current state means
|
|
165
|
-
// a rewrite did not complete (admit merges into the doc and rewrites the file as two steps).
|
|
166
|
-
// Diffing it would read the peer's admitted content as an agent deletion and publish that
|
|
167
|
-
// deletion as deliberate intent. Refuse and re-materialize instead.
|
|
168
|
-
// THE BASELINE MUST MATCH THE DOCUMENT. Hunks are offsets into the projection, applied to the
|
|
169
|
-
// doc's text, so they are sound only while the two agree. An earlier version refused only when
|
|
170
|
-
// the file was ALSO untouched, which let through the one state that matters: the doc advanced
|
|
171
|
-
// past the projection AND the agent edited the file. That applies projection-offset hunks to a
|
|
172
|
-
// longer document and mutilates the peer's admitted content — measured. The condition is the
|
|
173
|
-
// invariant itself, not a symptom of it.
|
|
174
|
-
const current = this.#project(doc, documentType);
|
|
175
|
-
if (projection !== current) {
|
|
176
|
-
throw new DocumentWriteError("document_file_stale", `the recorded projection for ${documentId} no longer matches the document — a rewrite did ` +
|
|
177
|
-
`not complete, so re-materialize before publishing rather than diffing against a ` +
|
|
178
|
-
`baseline the document has moved past`);
|
|
179
|
-
}
|
|
180
|
-
const before = this.engine.encodeStateVector(doc);
|
|
181
|
-
const changed = this.#fold(doc, projection, onDisk, documentType) !== null;
|
|
182
|
-
if (!changed)
|
|
183
|
-
return null;
|
|
184
|
-
await this.#saveProjection(agentId, documentId, documentType, onDisk);
|
|
185
|
-
this.#logger.info("document.publish.diffed", { documentId, bytes: onDisk.length });
|
|
186
|
-
return this.engine.encodeState(doc, before);
|
|
187
|
-
}
|
|
188
|
-
/** Admit a peer's update: fold local edits, merge, rewrite, report overlap. */
|
|
189
|
-
async admit(agentId, documentId, documentType, doc, incoming) {
|
|
190
|
-
this.#assertSupported(documentType);
|
|
191
|
-
await this.#migrateLegacyPath(agentId, documentId, documentType);
|
|
192
|
-
const path = this.filePath(agentId, documentId, documentType);
|
|
193
|
-
// 1. FOLD unpublished local edits in as local operations.
|
|
194
|
-
let onDisk = null;
|
|
195
|
-
try {
|
|
196
|
-
onDisk = await readFile(path, "utf8");
|
|
197
|
-
}
|
|
198
|
-
catch (err) {
|
|
199
|
-
// ONLY a missing file means "nothing local to lose". Any other errno — EACCES, EIO, EMFILE —
|
|
200
|
-
// read as that would skip the fold and then overwrite the file with the merged projection,
|
|
201
|
-
// discarding the agent's unpublished work with no event at all.
|
|
202
|
-
if (err?.code !== "ENOENT") {
|
|
203
|
-
throw new DocumentWriteError("document_file_unreadable", `the file for ${documentId} could not be read (${err?.code ?? "unknown"}) — ` +
|
|
204
|
-
`refusing rather than treating it as absent and overwriting unpublished edits`);
|
|
205
|
-
}
|
|
206
|
-
onDisk = null;
|
|
207
|
-
}
|
|
208
|
-
// REFUSE a missing baseline rather than substituting "". Diffing "" against the file yields a
|
|
209
|
-
// whole-file hunk inserted at offset 0 of a document that already holds that content — the
|
|
210
|
-
// body duplicated into the CRDT and out to the peer, permanently.
|
|
211
|
-
const projection = await this.#loadProjection(agentId, documentId, documentType);
|
|
212
|
-
if (onDisk !== null && projection === null) {
|
|
213
|
-
throw new DocumentWriteError("document_projection_missing", `no recorded projection for document ${documentId} — re-materialize before admitting, ` +
|
|
214
|
-
`since without a baseline the file cannot be told apart from an empty document`);
|
|
215
|
-
}
|
|
216
|
-
let localText = null;
|
|
217
|
-
const localKeys = new Set();
|
|
218
|
-
if (onDisk !== null) {
|
|
219
|
-
const folded = this.#fold(doc, projection, onDisk, documentType);
|
|
220
|
-
if (folded && "from" in folded)
|
|
221
|
-
localText = folded;
|
|
222
|
-
else if (folded)
|
|
223
|
-
for (const k of folded.keys)
|
|
224
|
-
localKeys.add(k);
|
|
225
|
-
}
|
|
226
|
-
// 2. MERGE, observing what the incoming update touches — in BOTH coordinate spaces, because
|
|
227
|
-
// a JSON document's edits live in the map and a text observer sees none of them.
|
|
228
|
-
// Inserts and deletes are compared DIFFERENTLY, and the asymmetry is the point. A re-homed
|
|
229
|
-
// insert landing exactly on the local edit's boundary IS overlap — Yjs put it there because
|
|
230
|
-
// the local fold deleted the characters it was anchored to. A deletion landing on that
|
|
231
|
-
// boundary is NOT: it happened above the local edit and merely shifted it down, which is the
|
|
232
|
-
// ordinary case of a peer editing the paragraph above yours.
|
|
233
|
-
const inserted = [];
|
|
234
|
-
const deletedAt = [];
|
|
235
|
-
const mergedKeys = new Set();
|
|
236
|
-
const onText = (event) => {
|
|
237
|
-
let cursor = 0;
|
|
238
|
-
for (const delta of event.delta) {
|
|
239
|
-
if (delta.retain !== undefined)
|
|
240
|
-
cursor += delta.retain;
|
|
241
|
-
else if (typeof delta.insert === "string") {
|
|
242
|
-
inserted.push({ from: cursor, to: cursor + delta.insert.length });
|
|
243
|
-
// Shift any local region that sits at or after this insert into the SAME coordinate
|
|
244
|
-
// system. Without it the flag depends on how LONG the peer's insert was rather than
|
|
245
|
-
// where it landed — a disjoint edit reads as overlapping once the insert is big enough.
|
|
246
|
-
if (localText && localText.from >= cursor) {
|
|
247
|
-
localText = { from: localText.from + delta.insert.length, to: localText.to + delta.insert.length };
|
|
248
|
-
}
|
|
249
|
-
cursor += delta.insert.length;
|
|
250
|
-
}
|
|
251
|
-
else if (delta.delete !== undefined) {
|
|
252
|
-
// A POINT in post-delete coordinates. Recording the delete's OLD width made any local
|
|
253
|
-
// edit within N characters after it read as overlapping — the flag sensitive to how BIG
|
|
254
|
-
// the peer's delete was rather than where it landed.
|
|
255
|
-
deletedAt.push(cursor);
|
|
256
|
-
if (localText && localText.from >= cursor) {
|
|
257
|
-
const shift = Math.min(delta.delete, Math.max(0, localText.from - cursor));
|
|
258
|
-
localText = { from: localText.from - shift, to: localText.to - shift };
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
const onMap = (event) => {
|
|
264
|
-
for (const key of event.keysChanged)
|
|
265
|
-
mergedKeys.add(key);
|
|
266
|
-
};
|
|
267
|
-
const text = doc.getText(TEXT_ROOT);
|
|
268
|
-
const map = doc.getMap(MAP_ROOT);
|
|
269
|
-
text.observe(onText);
|
|
270
|
-
map.observe(onMap);
|
|
271
|
-
try {
|
|
272
|
-
this.engine.applyUpdateOrThrow(doc, incoming);
|
|
273
|
-
}
|
|
274
|
-
finally {
|
|
275
|
-
text.unobserve(onText);
|
|
276
|
-
map.unobserve(onMap);
|
|
277
|
-
}
|
|
278
|
-
// 3. REWRITE so the agent sees the merged projection — refusing if the file moved under us.
|
|
279
|
-
if (onDisk !== null) {
|
|
280
|
-
// Re-read the CONTENT rather than trusting mtime: second-granularity filesystems hide a save
|
|
281
|
-
// inside the merge window, and a stat that itself fails must not read as "unchanged" — this
|
|
282
|
-
// guard exists precisely to prevent a silent clobber.
|
|
283
|
-
let nowOnDisk;
|
|
284
|
-
try {
|
|
285
|
-
nowOnDisk = await readFile(path, "utf8");
|
|
286
|
-
}
|
|
287
|
-
catch (err) {
|
|
288
|
-
throw new DocumentWriteError("document_file_unreadable", `the file for ${documentId} became unreadable during the merge ` +
|
|
289
|
-
`(${err?.code ?? "unknown"}) — refusing rather than rewriting it`);
|
|
290
|
-
}
|
|
291
|
-
if (nowOnDisk !== onDisk) {
|
|
292
|
-
throw new DocumentWriteError("document_file_changed_during_merge", `the file for ${documentId} was written while the merge was in flight — its content was ` +
|
|
293
|
-
`not folded in, so rewriting would discard it`);
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
const merged = this.#project(doc, documentType);
|
|
297
|
-
await this.#writeAtomic(agentId, path, merged);
|
|
298
|
-
await this.#saveProjection(agentId, documentId, documentType, merged);
|
|
299
|
-
// 4. OVERLAP falls out of the fold, in whichever space the document lives in.
|
|
300
|
-
// Endpoints are INCLUSIVE: when the local fold deletes the characters an incoming insert
|
|
301
|
-
// was anchored to, Yjs re-homes that insert onto the boundary of the local edit — and
|
|
302
|
-
// which side depends on its random clientID tie-break, so exclusive comparison answers a
|
|
303
|
-
// definite question with a coin flip.
|
|
304
|
-
const region = localText;
|
|
305
|
-
const overlap = region
|
|
306
|
-
? inserted.some((t) => t.from <= region.to && region.from <= t.to) ||
|
|
307
|
-
// STRICTLY inside: a deletion at the region's own boundary is adjacency, not overlap.
|
|
308
|
-
deletedAt.some((at) => at > region.from && at < region.to)
|
|
309
|
-
: [...localKeys].some((k) => mergedKeys.has(k));
|
|
310
|
-
this.#logger.info("document.file.rewritten", { documentId, bytes: merged.length });
|
|
311
|
-
if (overlap)
|
|
312
|
-
this.#logger.info("document.file.overlap_detected", { documentId });
|
|
313
|
-
return { overlap };
|
|
314
|
-
}
|
|
315
|
-
// ─── internals ────────────────────────────────────────────────────────────
|
|
316
|
-
#project(doc, documentType) {
|
|
317
|
-
if (rootForDocumentType(documentType) === "map") {
|
|
318
|
-
// DETERMINISTIC, not `JSON.stringify` of the map: `Y.Map.toJSON()` is in INSERTION order, so
|
|
319
|
-
// two peers holding the same document would render different files, and this projection is
|
|
320
|
-
// what publish diffs the file against — a reorder would publish as a rewrite of every line.
|
|
321
|
-
return serializeJsonDocument(doc.getMap(MAP_ROOT).toJSON());
|
|
322
|
-
}
|
|
323
|
-
return this.engine.readTextRoot(doc);
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Apply the file's content to the document, diffing against the recorded projection.
|
|
327
|
-
* Returns the region (text) or key set (JSON) the local edit occupies, or null if unchanged.
|
|
328
|
-
*/
|
|
329
|
-
#fold(doc, projection, onDisk, documentType) {
|
|
330
|
-
if (rootForDocumentType(documentType) === "map") {
|
|
331
|
-
const keys = this.#foldJson(doc, onDisk);
|
|
332
|
-
return keys.length > 0 ? { keys } : null;
|
|
333
|
-
}
|
|
334
|
-
return this.#foldText(doc, projection, onDisk);
|
|
335
|
-
}
|
|
336
|
-
/**
|
|
337
|
-
* Text diff producing N hunks, not one span.
|
|
338
|
-
*
|
|
339
|
-
* A single prefix/suffix range is coarse in a way §16.2 does NOT licence: a publish batch with
|
|
340
|
-
* two separated edits would delete and re-insert everything between them as new operations,
|
|
341
|
-
* which resurrects text a peer concurrently deleted and re-homes their insertions into the
|
|
342
|
-
* middle of it. Measured. Publish-on-intent makes multi-hunk the NORMAL shape — an agent edits
|
|
343
|
-
* across a turn and publishes once — so the line-level hunks below are the granularity the
|
|
344
|
-
* design actually wants, and they collapse to the old behaviour for one contiguous edit.
|
|
345
|
-
*/
|
|
346
|
-
#foldText(doc, projection, onDisk) {
|
|
347
|
-
const text = doc.getText(TEXT_ROOT);
|
|
348
|
-
if (text.toString() === onDisk)
|
|
349
|
-
return null;
|
|
350
|
-
const hunks = lineHunks(projection, onDisk);
|
|
351
|
-
if (hunks.length === 0)
|
|
352
|
-
return null;
|
|
353
|
-
// Apply back to front so earlier offsets stay valid.
|
|
354
|
-
doc.transact(() => {
|
|
355
|
-
for (const hunk of [...hunks].reverse()) {
|
|
356
|
-
if (hunk.to > hunk.from)
|
|
357
|
-
text.delete(hunk.from, hunk.to - hunk.from);
|
|
358
|
-
if (hunk.insert.length > 0)
|
|
359
|
-
text.insert(hunk.from, hunk.insert);
|
|
360
|
-
}
|
|
361
|
-
});
|
|
362
|
-
// The span the local edits occupy AFTER folding — the coordinate system the merge's deltas
|
|
363
|
-
// will be reported in.
|
|
364
|
-
let shift = 0;
|
|
365
|
-
let low = Number.POSITIVE_INFINITY;
|
|
366
|
-
let high = 0;
|
|
367
|
-
for (const hunk of hunks) {
|
|
368
|
-
const from = hunk.from + shift;
|
|
369
|
-
const to = from + hunk.insert.length;
|
|
370
|
-
low = Math.min(low, from);
|
|
371
|
-
high = Math.max(high, to);
|
|
372
|
-
shift += hunk.insert.length - (hunk.to - hunk.from);
|
|
373
|
-
}
|
|
374
|
-
return { from: low, to: high };
|
|
375
|
-
}
|
|
376
|
-
/**
|
|
377
|
-
* Fold the FILE's JSON into the map root, per key and at every depth. It is a key DIFF — set what
|
|
378
|
-
* changed, delete what is gone — and it returns the keys written.
|
|
379
|
-
*
|
|
380
|
-
* Shares `applyJsonToMap` with `cello_doc_write`, so the file path and the tool path cannot
|
|
381
|
-
* disagree about what counts as a changed key — the same rule the text path already follows for
|
|
382
|
-
* `lineHunks`.
|
|
383
|
-
*/
|
|
384
|
-
#foldJson(doc, onDisk) {
|
|
385
|
-
const parsed = parseJsonDocument(onDisk);
|
|
386
|
-
if (!parsed.ok) {
|
|
387
|
-
throw new DocumentWriteError("document_file_unparseable", `the document's file is not valid JSON — ${parsed.detail}`);
|
|
388
|
-
}
|
|
389
|
-
return applyJsonToMap(doc.getMap(MAP_ROOT), parsed.value, doc);
|
|
390
|
-
}
|
|
391
|
-
/** tmp + rename, so an interrupted write cannot leave a truncated file a later diff reads as
|
|
392
|
-
* a deliberate mass deletion. */
|
|
393
|
-
async #writeAtomic(agentId, path, content) {
|
|
394
|
-
await mkdir(join(this.#root, agentId), { recursive: true });
|
|
395
|
-
const tmp = `${path}.tmp`;
|
|
396
|
-
await writeFile(tmp, content, "utf8");
|
|
397
|
-
await rename(tmp, path);
|
|
398
|
-
}
|
|
399
|
-
/**
|
|
400
|
-
* The baseline lives in a dot-directory, NOT beside the document. §16.2's premise is that the
|
|
401
|
-
* agent edits an ordinary file and no new surface exists — a sibling `<name>.md.projection` IS
|
|
402
|
-
* a new surface, one an agent may open, edit, or tidy away, and deleting it used to duplicate
|
|
403
|
-
* the document.
|
|
404
|
-
*/
|
|
405
|
-
#projectionPath(agentId, documentId, documentType) {
|
|
406
|
-
return join(this.#root, ".cello", agentId, `${documentId}.${this.#extension(documentType)}.projection`);
|
|
407
|
-
}
|
|
408
|
-
/** The projection is persisted so it survives a restart — see the header. */
|
|
409
|
-
async #saveProjection(agentId, documentId, documentType, content) {
|
|
410
|
-
const path = this.#projectionPath(agentId, documentId, documentType);
|
|
411
|
-
await mkdir(join(this.#root, ".cello", agentId), { recursive: true });
|
|
412
|
-
await writeFile(`${path}.tmp`, content, "utf8");
|
|
413
|
-
await rename(`${path}.tmp`, path);
|
|
414
|
-
}
|
|
415
|
-
async #loadProjection(agentId, documentId, documentType) {
|
|
416
|
-
try {
|
|
417
|
-
return await readFile(this.#projectionPath(agentId, documentId, documentType), "utf8");
|
|
418
|
-
}
|
|
419
|
-
catch {
|
|
420
|
-
return null;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
async #readOrRefuse(path, documentId) {
|
|
424
|
-
try {
|
|
425
|
-
return await readFile(path, "utf8");
|
|
426
|
-
}
|
|
427
|
-
catch {
|
|
428
|
-
throw new DocumentWriteError("document_file_missing", `no materialized file for document ${documentId} at ${path} — materialize it before publishing`);
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
/**
|
|
432
|
-
* A type this FILE can project and fold — knowing a root is exactly that capability.
|
|
433
|
-
*
|
|
434
|
-
* Deliberately wider than `isSupportedDocumentType`: `json` has a root here and is not admitted at
|
|
435
|
-
* the door, because the write path serves it while read/write/diff do not.
|
|
436
|
-
*/
|
|
437
|
-
#assertSupported(documentType) {
|
|
438
|
-
if (rootForDocumentType(documentType) === undefined) {
|
|
439
|
-
throw new DocumentWriteError("document_type_unsupported", `no diff strategy for '${documentType}' — known types are ${[...DOCUMENT_TYPES.keys()].sort().join(", ")}`);
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
#assertId(value, field) {
|
|
443
|
-
if (!ID_PATTERN.test(value)) {
|
|
444
|
-
throw new DocumentWriteError("document_id_invalid", `${field} must be 64 lowercase hex characters — it becomes a path component, and an ` +
|
|
445
|
-
`unvalidated one escapes the workspace`);
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
/**
|
|
450
|
-
* Line-level hunks between two texts, as character offsets into `before`.
|
|
451
|
-
*
|
|
452
|
-
* Lines are represented as CHUNKS — each line carries its own trailing newline, except the last,
|
|
453
|
-
* which does not. That representation is what makes newline handling fall out instead of being
|
|
454
|
-
* special-cased: appending a line to "a\nb" turns the chunk "b" into "b\n" + "c", so the LCS
|
|
455
|
-
* sees the last line as changed and the hunk replaces "b" with "b\nc". A hand-rolled
|
|
456
|
-
* prefix/suffix trim got this wrong for every edit that changed the line count — measured, four
|
|
457
|
-
* of six ordinary markdown edits published text that was not what the file said.
|
|
458
|
-
*
|
|
459
|
-
* A real LCS (not a prefix/suffix trim) is required because the whole point is to emit SEPARATE
|
|
460
|
-
* hunks for separated edits: one span from the first change to the last would delete and
|
|
461
|
-
* re-insert everything between them as new operations, resurrecting text a peer concurrently
|
|
462
|
-
* deleted. Under publish-on-intent, multi-edit publishes are the modal case.
|
|
463
|
-
*/
|
|
464
|
-
export function lineHunks(before, after) {
|
|
465
|
-
if (before === after)
|
|
466
|
-
return [];
|
|
467
|
-
const a = toChunks(before);
|
|
468
|
-
const b = toChunks(after);
|
|
469
|
-
const runs = lineRuns(a, b);
|
|
470
|
-
if (runs === null) {
|
|
471
|
-
// Above the LCS limit — one hunk, and the caller is not misled into thinking this is a
|
|
472
|
-
// measurement of what changed.
|
|
473
|
-
return [{ from: 0, to: before.length, insert: after }];
|
|
474
|
-
}
|
|
475
|
-
const offsets = [0];
|
|
476
|
-
for (const chunk of a)
|
|
477
|
-
offsets.push(offsets[offsets.length - 1] + chunk.length);
|
|
478
|
-
return runs
|
|
479
|
-
.map((r) => trimShared(before, {
|
|
480
|
-
from: offsets[r.aStart],
|
|
481
|
-
to: offsets[r.aEnd],
|
|
482
|
-
insert: b.slice(r.bStart, r.bEnd).join(""),
|
|
483
|
-
}))
|
|
484
|
-
.filter((h) => h.to > h.from || h.insert.length > 0);
|
|
485
|
-
}
|
|
486
|
-
/**
|
|
487
|
-
* Shrink a hunk to the span that genuinely differs, by dropping the text it SHARES with what it
|
|
488
|
-
* replaces at each end.
|
|
489
|
-
*
|
|
490
|
-
* WHY THIS EXISTS. `toChunks` gives every line a trailing newline except the last, so a text that
|
|
491
|
-
* does not end in one has a final chunk whose IDENTITY changes the moment anything is appended:
|
|
492
|
-
*
|
|
493
|
-
* "# Draft" → ["# Draft"]
|
|
494
|
-
* "# Draft\nline two\n" → ["# Draft\n", "line two\n"]
|
|
495
|
-
*
|
|
496
|
-
* The LCS therefore reports the last line as deleted and re-inserted. Nothing was deleted — but the
|
|
497
|
-
* receiver's `append_only` gate counts any delete range, so it refuses the update naming a deletion
|
|
498
|
-
* the sender never made, and THREE refusals stall the document permanently. An append-only
|
|
499
|
-
* document, whose entire premise is that appending is always safe, was destroyed by appending to it
|
|
500
|
-
* whenever the starting content lacked a trailing newline. Nothing told the operator that mattered.
|
|
501
|
-
*
|
|
502
|
-
* Trimming rather than special-casing "is this an append": the same false deletion appears for any
|
|
503
|
-
* edit that touches the last line of a file with no trailing newline. Minimal hunks are also better
|
|
504
|
-
* for the CRDT — a delete the peer did not need is one that can collide with their concurrent edit
|
|
505
|
-
* to that line.
|
|
506
|
-
*
|
|
507
|
-
* The two ends are trimmed independently and never allowed to overlap, so a hunk can shrink to a
|
|
508
|
-
* pure insert (`to === from`) or a pure delete (`insert === ""`), and never to something that
|
|
509
|
-
* reproduces the wrong text.
|
|
510
|
-
*/
|
|
511
|
-
function trimShared(before, hunk) {
|
|
512
|
-
const removed = before.slice(hunk.from, hunk.to);
|
|
513
|
-
const { insert } = hunk;
|
|
514
|
-
let prefix = 0;
|
|
515
|
-
const maxPrefix = Math.min(removed.length, insert.length);
|
|
516
|
-
while (prefix < maxPrefix && removed[prefix] === insert[prefix])
|
|
517
|
-
prefix++;
|
|
518
|
-
let suffix = 0;
|
|
519
|
-
const maxSuffix = Math.min(removed.length - prefix, insert.length - prefix);
|
|
520
|
-
while (suffix < maxSuffix &&
|
|
521
|
-
removed[removed.length - 1 - suffix] === insert[insert.length - 1 - suffix]) {
|
|
522
|
-
suffix++;
|
|
523
|
-
}
|
|
524
|
-
return {
|
|
525
|
-
from: hunk.from + prefix,
|
|
526
|
-
to: hunk.to - suffix,
|
|
527
|
-
insert: insert.slice(prefix, insert.length - suffix),
|
|
528
|
-
};
|
|
529
|
-
}
|
|
530
|
-
//# sourceMappingURL=document-write-path.js.map
|