@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
package/dist/session-schema.js
DELETED
|
@@ -1,877 +0,0 @@
|
|
|
1
|
-
import { addColumnIfMissing } from "./column-birth.js";
|
|
2
|
-
import { migrateSessionTablesToAgentId } from "./agent-id-migration.js";
|
|
3
|
-
import { migrateContactsAddTierMetadata } from "./contacts-tier-migration.js";
|
|
4
|
-
import { migrateCborBlobsToCanonical } from "./cbor-blob-migration.js";
|
|
5
|
-
import { foldContactPubkeyCase } from "./contact-pubkey-case.js";
|
|
6
|
-
import { ensureTrustSignalSchema } from "./trust-signal-store.js";
|
|
7
|
-
import { extractErrorMessage } from "./error-message.js";
|
|
8
|
-
/**
|
|
9
|
-
* Create every session-store table and apply every additive migration.
|
|
10
|
-
*
|
|
11
|
-
* `loadDivergedFromDb` is a CALLBACK rather than an import: the divergence memo is rehydrated part
|
|
12
|
-
* way through this sequence — after the agent-id migration that gives it rows to read — and the
|
|
13
|
-
* store that owns it lives elsewhere. Passing it keeps the ordering visible here, where the reason
|
|
14
|
-
* for it is, instead of leaving a second caller to remember it.
|
|
15
|
-
*/
|
|
16
|
-
export function ensureSessionSchema(db, logger, loadDivergedFromDb) {
|
|
17
|
-
db.exec(`
|
|
18
|
-
CREATE TABLE IF NOT EXISTS sessions (
|
|
19
|
-
session_id TEXT NOT NULL,
|
|
20
|
-
agent_id TEXT NOT NULL,
|
|
21
|
-
counterparty_pubkey TEXT NOT NULL,
|
|
22
|
-
status TEXT NOT NULL,
|
|
23
|
-
created_at INTEGER NOT NULL,
|
|
24
|
-
updated_at INTEGER NOT NULL,
|
|
25
|
-
-- DOD-LOOP-1: composite key so two of the operator's agents can hold both ends of the
|
|
26
|
-
-- SAME session_id on ONE daemon (the loopback case). A bare session_id PK would reject
|
|
27
|
-
-- the second end's row.
|
|
28
|
-
-- DOD-AGENT-ID-JOINKEY-1: keyed on the STABLE agent_id, never the mutable, reuse-freed
|
|
29
|
-
-- agent_name. The display name lives on the agents table and is joined in for reads.
|
|
30
|
-
PRIMARY KEY (agent_id, session_id)
|
|
31
|
-
)
|
|
32
|
-
`);
|
|
33
|
-
// M7-SESSION-001: idempotent schema extension — add message_count and interrupted_at
|
|
34
|
-
// columns if they do not exist. ALTER TABLE IF NOT EXISTS COLUMN is not supported by
|
|
35
|
-
// older SQLite; we use a try/catch per column as the idempotent approach.
|
|
36
|
-
for (const ddl of [
|
|
37
|
-
"ALTER TABLE sessions ADD COLUMN message_count INTEGER NOT NULL DEFAULT 0",
|
|
38
|
-
"ALTER TABLE sessions ADD COLUMN interrupted_at TEXT",
|
|
39
|
-
/**
|
|
40
|
-
* Decisions Carried #8 — THE SESSION SALT, persisted.
|
|
41
|
-
*
|
|
42
|
-
* Agreed once at session open from BOTH sides' random contributions, and unchanged for the
|
|
43
|
-
* life of the session. It is NOT a key: it decrypts nothing, and it is what lets this
|
|
44
|
-
* operator's own transcript stay verifiable — the content hash is recomputed from stored
|
|
45
|
-
* plaintext on the receive path and again for any later check, and salted it is underivable
|
|
46
|
-
* without this value.
|
|
47
|
-
*
|
|
48
|
-
* PERSISTED because the alternative is silent corruption. ⚠️ FUTURE TENSE, deliberately
|
|
49
|
-
* (review F10): NOTHING WRITES OR READS THIS COLUMN YET. `DOD-M15-SEALWIRE-1` will add the
|
|
50
|
-
* contribution exchange and the lookup — "does this session already have a salt? yes → use it,
|
|
51
|
-
* no → agree one" — and without the column that lookup would fail after a restart, mint a
|
|
52
|
-
* fresh salt, and split the transcript at the crash: every leaf before it unverifiable, with
|
|
53
|
-
* nothing saying so. The column lands now because it must exist before the code that needs it.
|
|
54
|
-
*
|
|
55
|
-
* NULL for every session opened before this column existed; those keep the unsalted hash.
|
|
56
|
-
*/
|
|
57
|
-
"ALTER TABLE sessions ADD COLUMN content_salt BLOB",
|
|
58
|
-
/**
|
|
59
|
-
* DOD-M15-FREEZE-STATUS-1 — carried here for the OTHER LANE (`CELLO_Support`), agreed in
|
|
60
|
-
* session `e3adcaa7…`. Two lanes must not both edit this file (§2e, one file two branches), so
|
|
61
|
-
* the columns land in one migration and every line of behaviour stays on their side. Nothing
|
|
62
|
-
* in this lane reads or writes them.
|
|
63
|
-
*
|
|
64
|
-
* `frozen_at` epoch-ms when `#freezeOnIdentityFailure` fired. NULL = never frozen.
|
|
65
|
-
* `frozen_reason` the `reason` already passed to that method. NULL iff `frozen_at` is NULL.
|
|
66
|
-
*
|
|
67
|
-
* ⚠️ THE WRITE MUST LAND BEFORE `destroySessionNode`, NOT AFTER — FRAME-1 review F1's
|
|
68
|
-
* ordering, and the reason the in-memory `#frozenSessions.add` already sits before the
|
|
69
|
-
* teardown. `destroySessionNode` writes `interrupted`, which is the REVIVABLE status, so a
|
|
70
|
-
* durable mark landing after it lets a read race the teardown and revive the session out from
|
|
71
|
-
* under the freeze — the disk reproducing the bug the memory mark was moved early to fix.
|
|
72
|
-
*
|
|
73
|
-
* Why it earns a slot rather than waiting: `#frozenSessions` is memory-only today, so a
|
|
74
|
-
* restart UN-FREEZES a session that was frozen because a party signed with a key that was not
|
|
75
|
-
* the counterparty's. The next read revives it and re-admits that peer, while the log still
|
|
76
|
-
* says the session will not be revived.
|
|
77
|
-
*/
|
|
78
|
-
"ALTER TABLE sessions ADD COLUMN frozen_at INTEGER",
|
|
79
|
-
"ALTER TABLE sessions ADD COLUMN frozen_reason TEXT",
|
|
80
|
-
// MSG-001-3b (MSG-2 startup-flush): persist the session's relay endpoint so the
|
|
81
|
-
// crash-backstop flush can deposit un-acked content after a restart, when the
|
|
82
|
-
// in-memory entry is gone. relay_addrs is a JSON array of multiaddr strings.
|
|
83
|
-
"ALTER TABLE sessions ADD COLUMN relay_peer_id TEXT",
|
|
84
|
-
"ALTER TABLE sessions ADD COLUMN relay_addrs TEXT",
|
|
85
|
-
// M7-SESSION-004 (AC-005): persist the seal certificate's legibility object with the
|
|
86
|
-
// sealed record so it survives a daemon restart and is readable on the cert-read surface
|
|
87
|
-
// (cello_get_sealed_receipt). JSON string with hex-encoded pubkeys; NULL until sealed.
|
|
88
|
-
// Inline idempotent migration (NOT Flyway — this is the client-side SQLite, AC-011).
|
|
89
|
-
/**
|
|
90
|
-
* 033-ACKEMIT — THE SESSION'S GENESIS PREV_ROOT, and it is persisted for ONE reason: a
|
|
91
|
-
* restart.
|
|
92
|
-
*
|
|
93
|
-
* It is a pure function of the two participant keys, the session id and the SESSION
|
|
94
|
-
* TIMESTAMP — and the timestamp arrives on the directory-signed relay assignment and lives
|
|
95
|
-
* nowhere else. A session restored from this table after a daemon restart re-registers with
|
|
96
|
-
* no assignment in hand, so without this column the daemon could not say what the first
|
|
97
|
-
* message of that session acknowledges, and every send on it would be refused rather than
|
|
98
|
-
* signed. Deriving is still preferred where the assignment IS in memory; this is what makes
|
|
99
|
-
* the derivation survive the process.
|
|
100
|
-
*
|
|
101
|
-
* NULL for every session opened before this column existed. Those sessions acknowledge
|
|
102
|
-
* nothing until the counterparty has sent something — they claim position 0 with no hash,
|
|
103
|
-
* which asserts nothing rather than asserting a position they cannot back — and from the
|
|
104
|
-
* first leaf they receive they acknowledge content like any other session.
|
|
105
|
-
*/
|
|
106
|
-
"ALTER TABLE sessions ADD COLUMN genesis_prev_root BLOB",
|
|
107
|
-
/**
|
|
108
|
-
* 069-ORDERPROOF — the ack-signing pubkey (hex) of the relay the DIRECTORY assigned to this
|
|
109
|
-
* session, from `relay_id` inside the FROST-signed assignment.
|
|
110
|
-
*
|
|
111
|
-
* It is here for the same reason `genesis_prev_root` is: a session restored after a restart
|
|
112
|
-
* re-registers with NO assignment in hand, and the seal path registers with none either. The
|
|
113
|
-
* anchor lives nowhere else, and without it every submit on a revived session — and every seal
|
|
114
|
-
* leaf — is refused for want of something to check the relay's attestation against.
|
|
115
|
-
*
|
|
116
|
-
* NULL for every session opened before this column existed, and for direct sessions, which have
|
|
117
|
-
* no relay. Those sessions simply hold no ordering attestations; they read and seal as before.
|
|
118
|
-
*/
|
|
119
|
-
"ALTER TABLE sessions ADD COLUMN relay_anchor_hex TEXT",
|
|
120
|
-
"ALTER TABLE sessions ADD COLUMN seal_legibility TEXT",
|
|
121
|
-
"ALTER TABLE sessions ADD COLUMN sealed_root_hex TEXT",
|
|
122
|
-
// M7 legibility-TBS-binding (responder verify): the counterparty's FROST primary (group)
|
|
123
|
-
// pubkey, taken from the FROST-signed SessionAssignment's signer_pubkey. The responder uses
|
|
124
|
-
// it to VERIFY the bilateral seal signature locally (the seal is signed by the initiator's
|
|
125
|
-
// primary), not just accept it. NULL when this party initiated (it uses its own primary).
|
|
126
|
-
"ALTER TABLE sessions ADD COLUMN counterparty_primary_pubkey TEXT",
|
|
127
|
-
// DOD-SESSION-NAME-1: the operator's own human-readable label for this session. LOCAL AND
|
|
128
|
-
// COSMETIC — it is never sent to the relay or directory, never in a wire frame, never in the
|
|
129
|
-
// transcript, never in the seal or a Merkle leaf, and the counterparty never sees it. It
|
|
130
|
-
// cannot influence protocol behaviour.
|
|
131
|
-
// NULL MEANS SOMETHING: a session closed through an agent usually carries a name, so an
|
|
132
|
-
// unnamed closed session is a hint it did not close cleanly. Never auto-generate a default —
|
|
133
|
-
// a fabricated name destroys that signal.
|
|
134
|
-
"ALTER TABLE sessions ADD COLUMN session_name TEXT",
|
|
135
|
-
// DOD-SEALED-INBOX-1: local-only housekeeping flag — epoch-ms timestamp set by cello_dismiss.
|
|
136
|
-
// Never propagated, never part of the seal ceremony or hash chain. A dismissed terminal
|
|
137
|
-
// session is excluded from cello_inbox's ended_unread section. Distinct from the read
|
|
138
|
-
// watermark: this records "operator acknowledged via dismiss", not "operator received via
|
|
139
|
-
// cello_receive". NULL = not yet dismissed.
|
|
140
|
-
"ALTER TABLE sessions ADD COLUMN read_at INTEGER",
|
|
141
|
-
// DOD-M12B-ABANDON-NOTIFY-1: epoch-ms when the counterparty told us they force-abandoned.
|
|
142
|
-
// Deliberately NOT a status — the session stays sealable, so the operator can still take a
|
|
143
|
-
// unilateral receipt. It stops this side calling them, nothing more.
|
|
144
|
-
"ALTER TABLE sessions ADD COLUMN counterparty_abandoned_at INTEGER",
|
|
145
|
-
// DOD-CAP-SELF-HEAL-1: WHO caused this session to be interrupted — 'counterparty' when their
|
|
146
|
-
// stream dropped, 'local' when OUR daemon stopped or started. Only theirs counts against the
|
|
147
|
-
// acceptance bound. Without this the bound is all-time rather than concurrent: every restart
|
|
148
|
-
// flips every live session to `interrupted`, nothing ever resolves them, and a pair of agents
|
|
149
|
-
// that has talked three times can never talk again. NULL means "not recorded" and is treated
|
|
150
|
-
// as the counterparty's, because the safe default for an anti-abuse bound is to count it.
|
|
151
|
-
"ALTER TABLE sessions ADD COLUMN interrupted_by TEXT",
|
|
152
|
-
// DOD-M12B-RESTART-SEAL-1: when automatic sealing exhausted this session, and why. Durable
|
|
153
|
-
// because the resolver's attempt budget is in memory — without it a machine that restarts
|
|
154
|
-
// several times a day re-runs the whole budget against a hopeless session on every boot.
|
|
155
|
-
"ALTER TABLE sessions ADD COLUMN restart_seal_gave_up_at INTEGER",
|
|
156
|
-
"ALTER TABLE sessions ADD COLUMN restart_seal_gave_up_reason TEXT",
|
|
157
|
-
// DOD-M15-DIVERGE-DURABLE-1: epoch-ms when this session's tree and the relay's counter
|
|
158
|
-
// provably parted, so it can never seal bilaterally. NULL = not diverged.
|
|
159
|
-
//
|
|
160
|
-
// DURABLE, and the reason is that the read site cannot tell "not diverged" from "forgotten":
|
|
161
|
-
// both are false and both read READY. `#diverged` was in memory, so a restart turned a
|
|
162
|
-
// session that provably cannot seal into one the gate was happy to close.
|
|
163
|
-
//
|
|
164
|
-
// NOT the trade `frontier-mismatch.ts` makes on purpose. A frontier mismatch is re-detected
|
|
165
|
-
// by the very next close, so losing it costs a recomputation. Divergence is re-detected only
|
|
166
|
-
// by the next send that gets an ack behind the frontier — which on a finished conversation
|
|
167
|
-
// never comes. Losing it costs a WRONG ANSWER.
|
|
168
|
-
"ALTER TABLE sessions ADD COLUMN diverged_at INTEGER",
|
|
169
|
-
]) {
|
|
170
|
-
try {
|
|
171
|
-
db.exec(ddl);
|
|
172
|
-
}
|
|
173
|
-
catch (err) {
|
|
174
|
-
// Only swallow the idempotent "duplicate column name" case (the column
|
|
175
|
-
// already exists from a prior init). Any other failure — disk full,
|
|
176
|
-
// SQLITE_LOCKED, corruption — must propagate, otherwise the daemon would
|
|
177
|
-
// run without these columns and later silently read undefined.
|
|
178
|
-
const msg = extractErrorMessage(err);
|
|
179
|
-
if (!msg.includes("duplicate column name"))
|
|
180
|
-
throw err;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
// M12-P18: sessions this agent REFUSED (abuse cap etc.). DURABLE and separate from the in-memory
|
|
184
|
-
// refusedSessionRequests inbox list, for one reason: content parked for a refused session arrives
|
|
185
|
-
// AFTER the refusal and often after a restart, and at drain time `counterparty_unknown` cannot
|
|
186
|
-
// tell "content for a session I declined" from "content I might still want". This table is that
|
|
187
|
-
// missing memory. Deleting parked content matched here judges NOTHING about the content — it acts
|
|
188
|
-
// on OUR OWN refusal, so it does not violate the SEC-1 rule that a forgery must not evict itself.
|
|
189
|
-
// Bounded by pruning on write (keep the most recent N per agent); a refused session id is never
|
|
190
|
-
// reused (directory-assigned, unique), so forgetting an old one only means its stale parked
|
|
191
|
-
// content is not proactively swept — the relay TTL backstop still applies.
|
|
192
|
-
db.exec(`
|
|
193
|
-
CREATE TABLE IF NOT EXISTS refused_sessions (
|
|
194
|
-
agent_id TEXT NOT NULL,
|
|
195
|
-
session_id TEXT NOT NULL,
|
|
196
|
-
reason TEXT NOT NULL,
|
|
197
|
-
refused_at INTEGER NOT NULL,
|
|
198
|
-
PRIMARY KEY (agent_id, session_id)
|
|
199
|
-
)
|
|
200
|
-
`);
|
|
201
|
-
// M12-P17: the POST-SEAL ANNEX — verified content that arrived for a session which had already
|
|
202
|
-
// ended. It cannot join the sealed chain (that would change `sealed_root` and invalidate the
|
|
203
|
-
// notarization), and it must not be thrown away: it is a real message, provably sent to this
|
|
204
|
-
// operator, that no one would otherwise ever read.
|
|
205
|
-
//
|
|
206
|
-
// A SEPARATE TABLE is the point, not an implementation detail. Inertness has to be structural:
|
|
207
|
-
// nothing here is joined by `getUnreadSummary`, `getEndedUnread`, any inbox count or any wake
|
|
208
|
-
// path, so this content CANNOT ring a doorbell or reach agent context no matter what a future
|
|
209
|
-
// caller does. If it lived in `transcript` behind a flag, the next reader would key on the row
|
|
210
|
-
// and not the flag — which is exactly how an agent came to obey an instruction out of a sealed
|
|
211
|
-
// conversation.
|
|
212
|
-
//
|
|
213
|
-
// Keyed on (agent_id, content_hash): `session_id` is recorded for display but is NOT part of the
|
|
214
|
-
// key, because the sibling case this design must also serve — content we cannot attribute to a
|
|
215
|
-
// session at all — has no session to key on.
|
|
216
|
-
db.exec(`
|
|
217
|
-
CREATE TABLE IF NOT EXISTS sealed_session_annex (
|
|
218
|
-
agent_id TEXT NOT NULL,
|
|
219
|
-
content_hash TEXT NOT NULL,
|
|
220
|
-
session_id TEXT NOT NULL,
|
|
221
|
-
sender_pubkey TEXT,
|
|
222
|
-
content BLOB NOT NULL,
|
|
223
|
-
arrived_at INTEGER NOT NULL,
|
|
224
|
-
PRIMARY KEY (agent_id, content_hash)
|
|
225
|
-
)
|
|
226
|
-
`);
|
|
227
|
-
// M7-SESSION-001 (H-1): side table holding the verified bilateral
|
|
228
|
-
// SEAL-INTERRUPTED commitment artifacts. A side table (CREATE TABLE IF NOT
|
|
229
|
-
// EXISTS) is inherently idempotent — no ALTER TABLE / duplicate-column
|
|
230
|
-
// handling required. We keep BOTH parties' signed leaves and the agreed
|
|
231
|
-
// Merkle root so the achieved commitment is never discarded.
|
|
232
|
-
db.exec(`
|
|
233
|
-
CREATE TABLE IF NOT EXISTS seal_interrupted_artifacts (
|
|
234
|
-
agent_id TEXT NOT NULL,
|
|
235
|
-
session_id TEXT NOT NULL,
|
|
236
|
-
role TEXT NOT NULL,
|
|
237
|
-
own_leaf TEXT NOT NULL,
|
|
238
|
-
counterparty_leaf TEXT NOT NULL,
|
|
239
|
-
merkle_root TEXT NOT NULL,
|
|
240
|
-
nonce TEXT NOT NULL,
|
|
241
|
-
created_at INTEGER NOT NULL,
|
|
242
|
-
-- DOD-LOOP-1: composite key (per-agent end of a loopback session).
|
|
243
|
-
PRIMARY KEY (agent_id, session_id)
|
|
244
|
-
)
|
|
245
|
-
`);
|
|
246
|
-
// DAEMON-004 (AC-007 / SI-001): the daemon-owned per-session Merkle tree,
|
|
247
|
-
// persisted as an ordered list of leaf hashes. The (session_id, leaf_index)
|
|
248
|
-
// primary key enforces append-order uniqueness; a fresh daemon reconstructs
|
|
249
|
-
// each tree from these rows so the transcript survives a restart. Querying
|
|
250
|
-
// by session_id ORDER BY leaf_index is the only read pattern.
|
|
251
|
-
db.exec(`
|
|
252
|
-
CREATE TABLE IF NOT EXISTS session_tree_leaves (
|
|
253
|
-
agent_id TEXT NOT NULL,
|
|
254
|
-
session_id TEXT NOT NULL,
|
|
255
|
-
leaf_index INTEGER NOT NULL,
|
|
256
|
-
leaf_kind TEXT NOT NULL,
|
|
257
|
-
leaf_hash_hex TEXT NOT NULL,
|
|
258
|
-
created_at INTEGER NOT NULL,
|
|
259
|
-
-- DOD-LOOP-1: composite key so each agent's end has its own append-ordered tree.
|
|
260
|
-
PRIMARY KEY (agent_id, session_id, leaf_index)
|
|
261
|
-
)
|
|
262
|
-
`);
|
|
263
|
-
// DOD-M15-INCLUSION-1: the leaf set the DIRECTORY certified — a different tree from the one
|
|
264
|
-
// above, and the distinction is the whole reason this table exists.
|
|
265
|
-
//
|
|
266
|
-
// `session_tree_leaves` holds this agent's CONTENT leaves. The certified root covers every leaf
|
|
267
|
-
// the relay ordered, CONTROL leaves included, and nothing appends a ctrl leaf to the local tree
|
|
268
|
-
// (`submitSealLeaf` computes its root without mutating it). So an audit path built from
|
|
269
|
-
// `session_tree_leaves` lands on a root no certificate names — it proves this machine agrees
|
|
270
|
-
// with itself, which is worth nothing to the third party a proof is FOR.
|
|
271
|
-
//
|
|
272
|
-
// Rows land only after the Merkle root over them reproduces the FROST-signed `sealed_root`
|
|
273
|
-
// (`certifiedLeafSetFrom`), so what is stored here is the consortium's leaf set and not the
|
|
274
|
-
// directory's word for it. Written once at seal time; read only by the inclusion-proof surface,
|
|
275
|
-
// ORDER BY leaf_index.
|
|
276
|
-
db.exec(`
|
|
277
|
-
CREATE TABLE IF NOT EXISTS session_certified_leaves (
|
|
278
|
-
agent_id TEXT NOT NULL,
|
|
279
|
-
session_id TEXT NOT NULL,
|
|
280
|
-
leaf_index INTEGER NOT NULL,
|
|
281
|
-
content_hash_hex TEXT NOT NULL,
|
|
282
|
-
recorded_at INTEGER NOT NULL,
|
|
283
|
-
-- DOD-LOOP-1: composite key so each agent's end of a loopback session keeps its own set.
|
|
284
|
-
PRIMARY KEY (agent_id, session_id, leaf_index)
|
|
285
|
-
)
|
|
286
|
-
`);
|
|
287
|
-
// WHY a session has no certified leaf set — fallback-finder finding 1, and the reason it is a
|
|
288
|
-
// TABLE rather than a log line.
|
|
289
|
-
//
|
|
290
|
-
// `getCertifiedLeafSet` returns null for four different situations: no seal frame ever carried
|
|
291
|
-
// the leaves, the directory shipped a set that does not reproduce the root it signed, a leaf was
|
|
292
|
-
// malformed, or the write failed. The worst of those — a directory contradicting its own FROST
|
|
293
|
-
// signature — is the strongest misbehaviour signal this client can produce, and it was going to
|
|
294
|
-
// one ERROR line while the operator was told the most benign of the four: "normal for the party
|
|
295
|
-
// that was absent at seal time." A detection whose only consumer is a log is not a control.
|
|
296
|
-
//
|
|
297
|
-
// One row per session, replaced on every attempt, so the state is the LAST thing that happened
|
|
298
|
-
// rather than a history. Read only by the inclusion-proof surface, to name the cause.
|
|
299
|
-
db.exec(`
|
|
300
|
-
CREATE TABLE IF NOT EXISTS session_certified_leaves_state (
|
|
301
|
-
agent_id TEXT NOT NULL,
|
|
302
|
-
session_id TEXT NOT NULL,
|
|
303
|
-
state TEXT NOT NULL,
|
|
304
|
-
detail TEXT,
|
|
305
|
-
recorded_at INTEGER NOT NULL,
|
|
306
|
-
PRIMARY KEY (agent_id, session_id)
|
|
307
|
-
)
|
|
308
|
-
`);
|
|
309
|
-
// DOD-M12B-STRAND-1 — content we RECEIVED and VERIFIED but cannot append yet.
|
|
310
|
-
//
|
|
311
|
-
// Held content used to live only in `#heldContent`, a Map that died with the session node. The
|
|
312
|
-
// teardown path said so itself: "the content is unrecoverable by the time we are here."
|
|
313
|
-
// Measured on one daemon in one morning: 367 held, 8 released, **24 destroyed**. Each
|
|
314
|
-
// destruction is permanent and one-sided — the sender was never acknowledged, so it believes
|
|
315
|
-
// the message is merely pending, while the only copy the receiver will ever see is gone and
|
|
316
|
-
// every later message in that session is stuck behind a gap nothing can fill.
|
|
317
|
-
//
|
|
318
|
-
// `canonical_seq` is the RELAY's position, not a local counter, and it is part of the key: that
|
|
319
|
-
// is what lets a frame come back after a restart and land at its OWN index rather than the next
|
|
320
|
-
// free slot. Appending it anywhere else would change the root the seal signs over.
|
|
321
|
-
//
|
|
322
|
-
// Keyed on agent_id, never agent_name — agent_name is a mutable display label (see the repo
|
|
323
|
-
// guide). `content_blob` is the SCREENED copy that gets delivered; `original_blob` is the peer's
|
|
324
|
-
// raw bytes, which the release path needs because classification reads byte 0 and the screened
|
|
325
|
-
// copy is no longer a CBOR map header for a document frame.
|
|
326
|
-
db.exec(`
|
|
327
|
-
CREATE TABLE IF NOT EXISTS held_content (
|
|
328
|
-
agent_id TEXT NOT NULL,
|
|
329
|
-
session_id TEXT NOT NULL,
|
|
330
|
-
canonical_seq INTEGER NOT NULL,
|
|
331
|
-
content_blob BLOB NOT NULL,
|
|
332
|
-
original_blob BLOB,
|
|
333
|
-
content_hash_hex TEXT NOT NULL,
|
|
334
|
-
screened_out INTEGER NOT NULL DEFAULT 0,
|
|
335
|
-
correlation_id TEXT,
|
|
336
|
-
held_at INTEGER NOT NULL,
|
|
337
|
-
-- DOD-M12B-INDEX-1: 'received' (default) or 'sent'. A held frame of OUR OWN must be
|
|
338
|
-
-- released down the sent path — appended and transcribed as sent — never down the received
|
|
339
|
-
-- path, which would put our words in the counterparty's mouth in the sealed record and hand
|
|
340
|
-
-- them back to our own agent through cello_receive as though they had just arrived.
|
|
341
|
-
origin TEXT NOT NULL DEFAULT 'received',
|
|
342
|
-
-- DOD-M12B-INDEX-1: 'msg' or 'doc'. A held document leaf must come back as a document leaf.
|
|
343
|
-
leaf_kind TEXT NOT NULL DEFAULT 'msg',
|
|
344
|
-
PRIMARY KEY (agent_id, session_id, canonical_seq)
|
|
345
|
-
)
|
|
346
|
-
`);
|
|
347
|
-
// DOD-M12B-INDEX-1: `CREATE TABLE IF NOT EXISTS` is a NO-OP against a table that already
|
|
348
|
-
// exists, so a database created between DOD-M12B-STRAND-1 and this change has `held_content`
|
|
349
|
-
// WITHOUT `origin`. On those every insert throws and every restore throws — holds go back to
|
|
350
|
-
// memory-only, silently at the surface, and that now includes our own sent messages, which
|
|
351
|
-
// nobody else holds a copy of. Loud in the log is not the same as visible.
|
|
352
|
-
try {
|
|
353
|
-
db.exec("ALTER TABLE held_content ADD COLUMN origin TEXT NOT NULL DEFAULT 'received'");
|
|
354
|
-
}
|
|
355
|
-
catch (err) {
|
|
356
|
-
const msg = extractErrorMessage(err);
|
|
357
|
-
if (!/duplicate column name/i.test(msg))
|
|
358
|
-
throw err;
|
|
359
|
-
}
|
|
360
|
-
// DOD-M12B-INDEX-1: and the LEAF KIND. `#releaseHeld` used to append every held frame as "msg",
|
|
361
|
-
// so a document leaf that had to wait for its position came back as a conversation message —
|
|
362
|
-
// the distinction survived the immediate append and was destroyed by the hold, unrecoverably
|
|
363
|
-
// after a restart.
|
|
364
|
-
try {
|
|
365
|
-
db.exec("ALTER TABLE held_content ADD COLUMN leaf_kind TEXT NOT NULL DEFAULT 'msg'");
|
|
366
|
-
}
|
|
367
|
-
catch (err) {
|
|
368
|
-
const msg = extractErrorMessage(err);
|
|
369
|
-
if (!/duplicate column name/i.test(msg))
|
|
370
|
-
throw err;
|
|
371
|
-
}
|
|
372
|
-
// DOD-LOG-1 (PERSIST-LOG-001) / PERSIST-002 (AC-010): the durable, ENCRYPTED-at-rest readable
|
|
373
|
-
// transcript. Each row is keyed by the canonical leaf `sequence`, so it JOINS to
|
|
374
|
-
// session_tree_leaves(leaf_index) — a stored message is provably behind a committed hash-chain
|
|
375
|
-
// leaf, not a loose dump. `blob` holds the readable plaintext bytes; encryption at rest is now
|
|
376
|
-
// provided by whole-DB SQLCipher, not a per-column cipher (relay/directory never see it — INV-3).
|
|
377
|
-
db.exec(`
|
|
378
|
-
CREATE TABLE IF NOT EXISTS transcript (
|
|
379
|
-
agent_id TEXT NOT NULL,
|
|
380
|
-
session_id TEXT NOT NULL,
|
|
381
|
-
sequence INTEGER NOT NULL,
|
|
382
|
-
direction TEXT NOT NULL, -- 'sent' | 'received'
|
|
383
|
-
blob BLOB NOT NULL, -- readable plaintext bytes (whole-DB SQLCipher-encrypted at rest)
|
|
384
|
-
created_at INTEGER NOT NULL,
|
|
385
|
-
-- ─── DOD-M15-SEALWIRE-1 bullet 5: the row proves AUTHORSHIP, or says it cannot ──────────
|
|
386
|
-
--
|
|
387
|
-
-- Before this, a row was (message, direction) and attribution came entirely from local
|
|
388
|
-
-- session state: "this arrived on the socket I believed was Bob's". That is fine while the
|
|
389
|
-
-- transcript is only ever read by its owner, and worthless the moment it is shown to anyone
|
|
390
|
-
-- else — which is the whole point of a notarized record.
|
|
391
|
-
--
|
|
392
|
-
-- sender_sig holds one of TWO things, and which one is told by direction:
|
|
393
|
-
-- RECEIVED row -> the sender's signature over their own Structure-1 bytes, carried on the
|
|
394
|
-
-- content frame BESIDE those bytes, stored ONLY after the receiver
|
|
395
|
-
-- verified it against the pubkey inside them (#verifyAuthorshipClaim).
|
|
396
|
-
-- Verified, never claimed.
|
|
397
|
-
-- ⚠️ THIS USED TO READ "the Structure-2 signature ... (#recordFrameOrdering)"
|
|
398
|
-
-- and it named a real place: until DOD-M15-AUTHORSHIP-ABSENT-1 the only
|
|
399
|
-
-- copy of that signature this side ever saw was the one the RELAY had
|
|
400
|
-
-- committed at Structure-2 index 3, so a message with no relay record had
|
|
401
|
-
-- no checkable author at all. Rewritten rather than deleted: an auditor
|
|
402
|
-
-- reading the old sentence goes looking for Structure-2 bytes that, on a
|
|
403
|
-
-- relay-degraded message, do not exist.
|
|
404
|
-
-- SENT row -> OUR OWN signature over the Structure-1 bytes we put on the wire, taken
|
|
405
|
-
-- from the submit result. Produced, not verified — there was no
|
|
406
|
-
-- counterparty in the act, so it must NEVER be labelled verified_signature.
|
|
407
|
-
--
|
|
408
|
-
-- ⚠️ self_authored COVERS TWO PROVENANCES, and sender_sig IS NOT NULL is the discriminator.
|
|
409
|
-
-- Named here because it is the same shape this column exists to prevent, one level up: a
|
|
410
|
-
-- provable sent row and an unprovable one share a label, so a reader keying on attribution
|
|
411
|
-
-- alone cannot tell them apart.
|
|
412
|
-
-- self_authored + sender_sig NOT NULL -> we wrote it and can prove we did
|
|
413
|
-
-- self_authored + sender_sig NULL -> we wrote it; no proof was stored for this row
|
|
414
|
-
--
|
|
415
|
-
-- ⚠️ THE NULL CASE USED TO READ "the relay never witnessed it", and DOD-M15-AUTHORSHIP-ABSENT-1
|
|
416
|
-
-- made that false. Every content frame now carries this side's signature over its own
|
|
417
|
-
-- Structure 1 whether or not a relay witnessed the leaf, so an unwitnessed send is provable
|
|
418
|
-
-- too. Rewritten rather than deleted: the old sentence is why a NULL here was read as
|
|
419
|
-
-- ordinary. It is not ordinary now — it means this machine could not sign at all, or the row
|
|
420
|
-
-- came by a path that carries no proof, and both are worth a second look.
|
|
421
|
-
--
|
|
422
|
-
-- attribution is NOT NULL ON PURPOSE, and it is the load-bearing column. There is a soft
|
|
423
|
-
-- path — session.content.ordering.decode_failed falls back to hash-dedup — that ingests a
|
|
424
|
-
-- message with no verified signature, so rows legitimately without one WILL exist. A
|
|
425
|
-
-- nullable signature column and nothing else would rebuild the defect this bullet exists to
|
|
426
|
-
-- fix: a table that IMPLIES every row carries authorship proof, where some carry none and
|
|
427
|
-
-- nothing distinguishes them. Forcing every writer to name which it is makes silent NULL
|
|
428
|
-
-- impossible rather than merely discouraged.
|
|
429
|
-
sender_pubkey TEXT, -- from INSIDE the sender's signed bytes; NULL unless verified
|
|
430
|
-
sender_sig BLOB, -- the VERIFIED sender signature over structure1_cbor (see above); NULL unless verified
|
|
431
|
-
attribution TEXT NOT NULL DEFAULT 'local_session_state', -- verified_signature | self_authored | local_session_state
|
|
432
|
-
PRIMARY KEY (agent_id, session_id, sequence, direction)
|
|
433
|
-
)
|
|
434
|
-
`);
|
|
435
|
-
/**
|
|
436
|
-
* DOD-M15-REFUSEDEVIDENCE-1 — the refusal reason on a QUARANTINED row.
|
|
437
|
-
*
|
|
438
|
-
* `direction` takes a third value, `'quarantined'`: a message that was received and REFUSED. It
|
|
439
|
-
* is stored the same way a delivered one is — plaintext blob, sender key, sender signature,
|
|
440
|
-
* attribution — because a hash with no original proves nothing, and the messages worth proving
|
|
441
|
-
* (an injection, a probe, a tampered frame) are exactly the refused ones.
|
|
442
|
-
*
|
|
443
|
-
* ⚠️ THE DIRECTION VALUE IS THE FLAG, AND THAT IS WHY IT IS NOT A BOOLEAN COLUMN. `direction` is
|
|
444
|
-
* in the primary key and every delivery and unread reader already filters it with an equality
|
|
445
|
-
* literal (`findNextReceivedAfter`, `#UNREAD_RECEIVED_WHERE`, `countReceivedMessages`). A row
|
|
446
|
-
* written `'quarantined'` therefore cannot be returned by `WHERE direction = 'received'` — it is
|
|
447
|
-
* excluded BY CONSTRUCTION, with no query edited and none left to remember. A boolean column
|
|
448
|
-
* alone would have been exclusion by EDIT, which rebuilds `DOD-UNREAD-1 D4a`'s phantom-session
|
|
449
|
-
* residue the first time a new query forgets the predicate.
|
|
450
|
-
*
|
|
451
|
-
* `attribution` needs no new value: the expression in `recordTranscriptMessage` is
|
|
452
|
-
* `direction === "sent" ? … : authorship ? "verified_signature" : "local_session_state"`, and
|
|
453
|
-
* `'quarantined'` is not `'sent'` — so a verified frame lands `verified_signature` and an
|
|
454
|
-
* unverified one `local_session_state`, which is the distinction the column exists for.
|
|
455
|
-
*/
|
|
456
|
-
// Through `addColumnIfMissing`, not a hand-rolled try/catch — review F7. A bare `ADD COLUMN`
|
|
457
|
-
// wrapped in a duplicate-name test had already been written twice in this codebase, which is
|
|
458
|
-
// why the helper exists; a third copy rethrows correctly but emits no `db.column_birth.failed`,
|
|
459
|
-
// so a failure on a fresh operator's database would name neither the table nor the column. That
|
|
460
|
-
// is exactly the case — the FIRST run on a new machine — the helper was extracted for.
|
|
461
|
-
addColumnIfMissing(db, logger, {
|
|
462
|
-
table: "transcript",
|
|
463
|
-
column: "quarantine_reason",
|
|
464
|
-
sql: "ALTER TABLE transcript ADD COLUMN quarantine_reason TEXT",
|
|
465
|
-
});
|
|
466
|
-
/**
|
|
467
|
-
* DOD-M15-DELIVERYACK-1 — the counterparty's SIGNATURE saying their machine received a message.
|
|
468
|
-
*
|
|
469
|
-
* One row per (agent, session, content hash), written only after the signature verified against
|
|
470
|
-
* the session's RECORDED counterparty key. `INSERT OR IGNORE` on that key is the idempotence: a
|
|
471
|
-
* replayed acknowledgement changes nothing, and the first one recorded stands.
|
|
472
|
-
*
|
|
473
|
-
* ⚠️ THIS IS NOT A CHAIN LEAF AND MUST NEVER BECOME ONE. Machine traffic does not enter the
|
|
474
|
-
* tamper-evident record — an acknowledgement in the tree would double the length of every
|
|
475
|
-
* conversation and make the daemon a participant in it. Nothing in the seal, the Merkle tree, the
|
|
476
|
-
* transcript or `last_seen_seq` reads this table; it is read by the receipt surface only.
|
|
477
|
-
*
|
|
478
|
-
* ⚠️ AND ITS ABSENCE MEANS NOTHING. A message with no row here was very possibly delivered and
|
|
479
|
-
* read: the acknowledgement may have been lost with the connection, the counterparty's daemon may
|
|
480
|
-
* have had no identity key to sign with, or their build may predate this. Any surface that reads
|
|
481
|
-
* a missing row as evasion — a score, a status, a counter that reads as fault — is a defect.
|
|
482
|
-
*
|
|
483
|
-
* Keyed on agent_id, never agent_name: agent_name is a mutable display label.
|
|
484
|
-
*/
|
|
485
|
-
db.exec(`
|
|
486
|
-
CREATE TABLE IF NOT EXISTS delivery_acks (
|
|
487
|
-
agent_id TEXT NOT NULL,
|
|
488
|
-
session_id TEXT NOT NULL,
|
|
489
|
-
content_hash_hex TEXT NOT NULL,
|
|
490
|
-
signer_pubkey TEXT NOT NULL,
|
|
491
|
-
signature BLOB NOT NULL,
|
|
492
|
-
recorded_at INTEGER NOT NULL,
|
|
493
|
-
PRIMARY KEY (agent_id, session_id, content_hash_hex)
|
|
494
|
-
)
|
|
495
|
-
`);
|
|
496
|
-
/**
|
|
497
|
-
* The acknowledgements THIS side signed for messages it received — the other half of the seal
|
|
498
|
-
* answer's `delivery_ack`. A separate table, not rows in `delivery_acks`: both sides can send
|
|
499
|
-
* identical bytes, and a shared key on the hash would let our own signature stand in for theirs.
|
|
500
|
-
*/
|
|
501
|
-
/**
|
|
502
|
-
* The last acknowledgement the live path made per session: the RELAY position and the content
|
|
503
|
-
* hash at it, exactly as signed into this side's claims. A resumed session starts from here, so a
|
|
504
|
-
* restart cannot reset it to 0 (every close refused as stale) or guess it from the local leaf
|
|
505
|
-
* index (which can drift one ahead of the relay). Forward-only.
|
|
506
|
-
*/
|
|
507
|
-
/**
|
|
508
|
-
* Where a MAILBOX-recovered message sits, as its sender's ordering record claims. Not seal
|
|
509
|
-
* evidence and never carried to a seal: that record is not relay-signed. The seal answer uses it
|
|
510
|
-
* only to place a message no relay acknowledgement reached, and the sealed root decides whether
|
|
511
|
-
* the claimed positions were right.
|
|
512
|
-
*/
|
|
513
|
-
db.exec(`
|
|
514
|
-
CREATE TABLE IF NOT EXISTS session_recovered_positions (
|
|
515
|
-
agent_id TEXT NOT NULL,
|
|
516
|
-
session_id TEXT NOT NULL,
|
|
517
|
-
relay_seq INTEGER NOT NULL,
|
|
518
|
-
hash_hex TEXT NOT NULL,
|
|
519
|
-
sender_hex TEXT NOT NULL,
|
|
520
|
-
PRIMARY KEY (agent_id, session_id, relay_seq)
|
|
521
|
-
)
|
|
522
|
-
`);
|
|
523
|
-
db.exec(`
|
|
524
|
-
CREATE TABLE IF NOT EXISTS session_last_ack (
|
|
525
|
-
agent_id TEXT NOT NULL,
|
|
526
|
-
session_id TEXT NOT NULL,
|
|
527
|
-
relay_seq INTEGER NOT NULL,
|
|
528
|
-
hash_hex TEXT NOT NULL,
|
|
529
|
-
PRIMARY KEY (agent_id, session_id)
|
|
530
|
-
)
|
|
531
|
-
`);
|
|
532
|
-
db.exec(`
|
|
533
|
-
CREATE TABLE IF NOT EXISTS delivery_acks_given (
|
|
534
|
-
agent_id TEXT NOT NULL,
|
|
535
|
-
session_id TEXT NOT NULL,
|
|
536
|
-
content_hash_hex TEXT NOT NULL,
|
|
537
|
-
signer_pubkey TEXT NOT NULL,
|
|
538
|
-
signature BLOB NOT NULL,
|
|
539
|
-
recorded_at INTEGER NOT NULL,
|
|
540
|
-
PRIMARY KEY (agent_id, session_id, content_hash_hex)
|
|
541
|
-
)
|
|
542
|
-
`);
|
|
543
|
-
// M8C-INBOX-1 (N2): per-agent, per-session read watermark. `last_delivered_seq` is the highest
|
|
544
|
-
// RECEIVED transcript sequence the operator has been shown via cello_receive (delivery marks
|
|
545
|
-
// read — no ack verb). Unread = received transcript rows with sequence > last_delivered_seq.
|
|
546
|
-
// Persisted so a missed doorbell (fire-and-forget push) is reconcilable via cello_check_notifications
|
|
547
|
-
// across daemon restarts, not just within one process (INV-PUSHPULL). Additive table.
|
|
548
|
-
db.exec(`
|
|
549
|
-
CREATE TABLE IF NOT EXISTS message_watermarks (
|
|
550
|
-
agent_id TEXT NOT NULL,
|
|
551
|
-
session_id TEXT NOT NULL,
|
|
552
|
-
last_delivered_seq INTEGER NOT NULL,
|
|
553
|
-
PRIMARY KEY (agent_id, session_id)
|
|
554
|
-
)
|
|
555
|
-
`);
|
|
556
|
-
// M8C-CONTACT-1: binary per-agent contact whitelist. This is an ACCESS-CONTROL LIST, not a
|
|
557
|
-
// setting — it belongs alongside message_watermarks/sessions as its own real subsystem, not
|
|
558
|
-
// behind the parked M9-CFG-001 config store. Identity PINS to the pubkey at add time (never
|
|
559
|
-
// re-resolved); known stays known until explicitly removed (no TTL/expiry on membership).
|
|
560
|
-
db.exec(`
|
|
561
|
-
CREATE TABLE IF NOT EXISTS contacts (
|
|
562
|
-
agent_id TEXT NOT NULL,
|
|
563
|
-
pubkey TEXT NOT NULL,
|
|
564
|
-
added_at INTEGER NOT NULL,
|
|
565
|
-
PRIMARY KEY (agent_id, pubkey)
|
|
566
|
-
)
|
|
567
|
-
`);
|
|
568
|
-
// MONIKER-3 AC1: the receiver's own pet name for a pubkey — the top tier of whoLabel.
|
|
569
|
-
// SQLite has no ADD COLUMN IF NOT EXISTS, so the ALTER is PRAGMA-guarded to stay
|
|
570
|
-
// idempotent; existing rows → NULL, no data loss.
|
|
571
|
-
// M10B / DOD-END-SURFACE-1 — per-counterparty presentation choice.
|
|
572
|
-
//
|
|
573
|
-
// `default_present` on the signal answers "show this by default"; this answers "show THIS signal
|
|
574
|
-
// to THIS person", which is the finer question an operator actually has: an endorsement that is
|
|
575
|
-
// right for a prospective client is not necessarily right for a competitor. Absent row = no
|
|
576
|
-
// opinion → the signal's own default applies, so this table only ever holds explicit choices.
|
|
577
|
-
//
|
|
578
|
-
// Keys on `agent_id`, never `agent_name` — the name is a mutable display label that is reusable
|
|
579
|
-
// after retirement, so keying on it would silently hand a NEW agent the retired one's
|
|
580
|
-
// disclosure choices. Same key as `contacts`, which this is an extension of.
|
|
581
|
-
db.exec(`
|
|
582
|
-
CREATE TABLE IF NOT EXISTS contact_signal_prefs (
|
|
583
|
-
agent_id TEXT NOT NULL,
|
|
584
|
-
contact_pubkey TEXT NOT NULL,
|
|
585
|
-
signal_hash TEXT NOT NULL,
|
|
586
|
-
present INTEGER NOT NULL,
|
|
587
|
-
set_at INTEGER NOT NULL,
|
|
588
|
-
PRIMARY KEY (agent_id, contact_pubkey, signal_hash)
|
|
589
|
-
)
|
|
590
|
-
`);
|
|
591
|
-
/**
|
|
592
|
-
* DOD-M15-SEALWIRE-1 bullet 5: authorship columns on an EXISTING transcript.
|
|
593
|
-
*
|
|
594
|
-
* BEFORE `migrateSessionTablesToAgentId` — the rebuild copies the intersection of old and new
|
|
595
|
-
* columns, so a column added after it would be dropped on the upgrade boot and re-added empty.
|
|
596
|
-
* These have their second entry in that migration's pinned DDL; `DOD-M15-MIGRATION-GUARD-1`
|
|
597
|
-
* fails the build if the two ever disagree.
|
|
598
|
-
*
|
|
599
|
-
* `addColumnIfMissing` rather than a bare try/catch: it swallows ONLY `duplicate column name`
|
|
600
|
-
* and rethrows anything else, so broken DDL cannot be mistaken for "already applied".
|
|
601
|
-
*/
|
|
602
|
-
// Written as three LITERAL statements rather than a loop over a column array. A loop needs its
|
|
603
|
-
// own parser in the guard (as retry_queue does); literals are read by the guard's generic one,
|
|
604
|
-
// so these are replayed automatically and cannot fall outside it.
|
|
605
|
-
addColumnIfMissing(db, logger, {
|
|
606
|
-
table: "transcript", column: "sender_pubkey",
|
|
607
|
-
sql: "ALTER TABLE transcript ADD COLUMN sender_pubkey TEXT",
|
|
608
|
-
});
|
|
609
|
-
addColumnIfMissing(db, logger, {
|
|
610
|
-
table: "transcript", column: "sender_sig",
|
|
611
|
-
sql: "ALTER TABLE transcript ADD COLUMN sender_sig BLOB",
|
|
612
|
-
});
|
|
613
|
-
addColumnIfMissing(db, logger, {
|
|
614
|
-
table: "transcript", column: "attribution",
|
|
615
|
-
sql: "ALTER TABLE transcript ADD COLUMN attribution TEXT NOT NULL DEFAULT 'local_session_state'",
|
|
616
|
-
});
|
|
617
|
-
const contactCols = db.prepare("PRAGMA table_info(contacts)").all();
|
|
618
|
-
if (!contactCols.some((c) => c.name === "moniker")) {
|
|
619
|
-
db.exec("ALTER TABLE contacts ADD COLUMN moniker TEXT");
|
|
620
|
-
}
|
|
621
|
-
// DOD-AGENT-ID-JOINKEY-1: finish REMOVE-001. Re-key the seven child tables from the mutable,
|
|
622
|
-
// reuse-freed `agent_name` to the stable `agent_id`, in ONE transaction. Runs AFTER every
|
|
623
|
-
// CREATE/ALTER above, so an existing table has its full historical column set before it is
|
|
624
|
-
// rebuilt, and BEFORE any read below touches it. A no-op once the tables carry `agent_id`.
|
|
625
|
-
//
|
|
626
|
-
// `retry_queue` (the seventh) is created later, by RetryQueue's constructor. On an existing
|
|
627
|
-
// database it already exists here and is re-keyed in the same transaction; on a fresh one it is
|
|
628
|
-
// absent, is skipped, and RetryQueue then creates it directly in the re-keyed shape.
|
|
629
|
-
migrateSessionTablesToAgentId(db, logger);
|
|
630
|
-
/**
|
|
631
|
-
* DOD-M15-DIVERGE-DURABLE-1: rehydrate the divergence set from `sessions.diverged_at`.
|
|
632
|
-
*
|
|
633
|
-
* AFTER `migrateSessionTablesToAgentId`, not with the column migrations that create the field.
|
|
634
|
-
* The query joins `sessions.agent_id` to `agents`, and on a database written before REMOVE-001
|
|
635
|
-
* that column does not exist until this migration adds it — placing the load earlier failed
|
|
636
|
-
* with `no such column: s.agent_id` on exactly those legacy databases, which are the ones a
|
|
637
|
-
* restart matters most for.
|
|
638
|
-
*/
|
|
639
|
-
loadDivergedFromDb();
|
|
640
|
-
// DOD-TIER-1 (address-book Step 1): give `contacts` its tier metadata (tier / provenance /
|
|
641
|
-
// last_offered_moniker / away_message). Pure ADD COLUMN, no rebuild — so it runs AFTER the
|
|
642
|
-
// agent-id re-key above (it never needs to appear in that migration's pinned DDL) and BEFORE any
|
|
643
|
-
// read below. Idempotent, no column DEFAULT, grandfathers existing contacts to WHITELISTED once.
|
|
644
|
-
migrateContactsAddTierMetadata(db, logger);
|
|
645
|
-
// §1.1: normalize frost_commitments / frost_verifying_shares to ONE CBOR encoding. Registration
|
|
646
|
-
// wrote them with the shared encoder; the refresh path wrote them with cbor-x's bare `encode`,
|
|
647
|
-
// so an agent's share blobs changed format the first time it ran `cello_refresh_shares` and both
|
|
648
|
-
// formats are on disk. Both producers now use encodeCbor; this rewrites what is already stored.
|
|
649
|
-
// Idempotent (a canonical blob re-encodes to itself and is skipped) and per-row fail-safe (an
|
|
650
|
-
// undecodable share is LEFT ALONE, never dropped — losing key material is worse than an old
|
|
651
|
-
// encoding cbor-x still reads).
|
|
652
|
-
migrateCborBlobsToCanonical(db, logger);
|
|
653
|
-
// M8C-TGDOOR-1: daemon-wide Telegram settings (bot token + allowlisted operator chat). A
|
|
654
|
-
// NEW dedicated table — NOT folded into the parked M9-CFG-001 config store, because a bot
|
|
655
|
-
// token has no sensible default (a required credential, unlike AWAY/TTL/CONTACT's real
|
|
656
|
-
// defaults) and can't legitimately wait for M9. Singleton row (id=1) — "token = daemon
|
|
657
|
-
// setting" (DoD), not per-agent.
|
|
658
|
-
db.exec(`
|
|
659
|
-
CREATE TABLE IF NOT EXISTS telegram_settings (
|
|
660
|
-
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
661
|
-
bot_token TEXT NOT NULL,
|
|
662
|
-
allowlisted_chat_id TEXT NOT NULL,
|
|
663
|
-
updated_at INTEGER NOT NULL
|
|
664
|
-
)
|
|
665
|
-
`);
|
|
666
|
-
// DOD-RENAME-1 (Option C): pending rename notices — one per (agent, contact). A notice is queued
|
|
667
|
-
// when a peer the operator has PERSONALLY NAMED offers a self-declared name that differs from the
|
|
668
|
-
// last one seen; it surfaces through cello_check_notifications (NOT a real-time push) and clears
|
|
669
|
-
// when the operator adopts a name (cello_contact_set_moniker) or removes the contact. Keyed on
|
|
670
|
-
// agent_id (the stable key); the offered name is charset-validated at the wire boundary but still
|
|
671
|
-
// operator-untrusted, so surfaces render it as a quoted CLAIM.
|
|
672
|
-
db.exec(`
|
|
673
|
-
CREATE TABLE IF NOT EXISTS contact_rename_notices (
|
|
674
|
-
agent_id TEXT NOT NULL,
|
|
675
|
-
pubkey TEXT NOT NULL,
|
|
676
|
-
offered_name TEXT NOT NULL,
|
|
677
|
-
noticed_at INTEGER NOT NULL,
|
|
678
|
-
PRIMARY KEY (agent_id, pubkey)
|
|
679
|
-
)
|
|
680
|
-
`);
|
|
681
|
-
/**
|
|
682
|
-
* A PUBLIC KEY IS BYTES; ITS HEX CASE IS NOT PART OF ITS IDENTITY.
|
|
683
|
-
*
|
|
684
|
-
* ⚠️ **PLACED HERE FOR TWO ORDERING REASONS, and getting either wrong is a crash at boot.** It
|
|
685
|
-
* touches all three contact-keyed tables, so it runs after the LAST of them exists
|
|
686
|
-
* (`contact_rename_notices`, directly above); and the merge it performs on a collision keeps the
|
|
687
|
-
* more restrictive TIER, which it cannot read until `migrateContactsAddTierMetadata` has added
|
|
688
|
-
* that column.
|
|
689
|
-
*
|
|
690
|
-
* Normalizing the accessors alone would be worse than the bug for anyone who already has a
|
|
691
|
-
* mixed-case row: the row becomes UNREACHABLE rather than merely wrong, taking its block, its
|
|
692
|
-
* away message and its pet name with it. Idempotent and silent on a clean database.
|
|
693
|
-
*/
|
|
694
|
-
foldContactPubkeyCase(db, logger);
|
|
695
|
-
// DOD-M15-NO-SILENT-REFUSAL-1: refusal notices — one per (agent, session, reason). Written every
|
|
696
|
-
// time an inbound message is refused; read by cello_receive and by the cello_inbox pull. Modelled
|
|
697
|
-
// on contact_rename_notices above and keyed the same way, on agent_id (the stable key) — the map
|
|
698
|
-
// this replaced was keyed on agent_name, a mutable display label, which was its second bug.
|
|
699
|
-
//
|
|
700
|
-
// DURABLE because the case this exists for is NOBODY ATTENDING. A notice held only in memory is
|
|
701
|
-
// lost to a restart and is only ever surfaced to whoever happens to call cello_receive on that
|
|
702
|
-
// exact session, which is a log line with extra steps.
|
|
703
|
-
//
|
|
704
|
-
// `content_refusal_reads` is the part rename notices do not need: they clear on operator action,
|
|
705
|
-
// these are read non-destructively PER CONSUMER. Two MCP windows attending one agent is ordinary,
|
|
706
|
-
// and under a single surfaced flag the first reader consumed the notice and the second was told
|
|
707
|
-
// nothing, permanently.
|
|
708
|
-
db.exec(`
|
|
709
|
-
CREATE TABLE IF NOT EXISTS content_refusal_notices (
|
|
710
|
-
agent_id TEXT NOT NULL,
|
|
711
|
-
session_id TEXT NOT NULL,
|
|
712
|
-
reason TEXT NOT NULL,
|
|
713
|
-
kind TEXT NOT NULL,
|
|
714
|
-
impact TEXT NOT NULL,
|
|
715
|
-
guidance TEXT NOT NULL,
|
|
716
|
-
count INTEGER NOT NULL,
|
|
717
|
-
first_at INTEGER NOT NULL,
|
|
718
|
-
last_at INTEGER NOT NULL,
|
|
719
|
-
PRIMARY KEY (agent_id, session_id, reason)
|
|
720
|
-
)
|
|
721
|
-
`);
|
|
722
|
-
/**
|
|
723
|
-
* DOD-M15-REFUSALTERMINAL-1 — the lifetime refusal count, which `content_refusal_notices` is
|
|
724
|
-
* NOT and never was.
|
|
725
|
-
*
|
|
726
|
-
* `cello_dismiss` DELETEs the notice row (`dismissContentRefusals`), so `notices.count` restarts
|
|
727
|
-
* at 1 after every dismissal. That is correct for the notice — the operator said "I know" and
|
|
728
|
-
* the next announcement should describe what happened since — and it is exactly why the number
|
|
729
|
-
* shown beside it cannot be described as a lifetime figure. Live on 2026-09-04 an inbox reported
|
|
730
|
-
* `times: 58` for a refusal that had fired tens of thousands of times.
|
|
731
|
-
*
|
|
732
|
-
* A separate table rather than a column, because the two have different lifetimes: this one is
|
|
733
|
-
* never deleted by anything an operator does. Same key, so the read is one LEFT JOIN.
|
|
734
|
-
*/
|
|
735
|
-
db.exec(`
|
|
736
|
-
CREATE TABLE IF NOT EXISTS content_refusal_totals (
|
|
737
|
-
agent_id TEXT NOT NULL,
|
|
738
|
-
session_id TEXT NOT NULL,
|
|
739
|
-
reason TEXT NOT NULL,
|
|
740
|
-
total INTEGER NOT NULL,
|
|
741
|
-
first_at INTEGER NOT NULL,
|
|
742
|
-
last_at INTEGER NOT NULL,
|
|
743
|
-
-- 1 when this row was SEEDED from an existing notice at upgrade rather than counted from
|
|
744
|
-
-- the first refusal. Its total is then a LOWER BOUND, not a figure, and the drain reports
|
|
745
|
-
-- it under a different field name so a reader cannot mistake one for the other.
|
|
746
|
-
seeded INTEGER NOT NULL DEFAULT 0,
|
|
747
|
-
PRIMARY KEY (agent_id, session_id, reason)
|
|
748
|
-
)
|
|
749
|
-
`);
|
|
750
|
-
/**
|
|
751
|
-
* ⚠️ **THE BACKFILL, and without it this unit ships the original lie with the new name on it.**
|
|
752
|
-
*
|
|
753
|
-
* Review finding 1. A new table is created EMPTY. Every daemon that already has refusal notices
|
|
754
|
-
* — including the one that produced this incident, whose notice sat at 58 — would report
|
|
755
|
-
* `times_since_dismissed: 59` beside a `times_total` of **1**, on the very field the guidance
|
|
756
|
-
* tells an operator to judge severity by. Smaller than the number it exists to dwarf.
|
|
757
|
-
*
|
|
758
|
-
* `count` is the best figure available at upgrade and it is a LOWER BOUND: dismissals before
|
|
759
|
-
* this build deleted history nothing can recover. So the row is marked `seeded` and reported as
|
|
760
|
-
* "at least", never as a total. A lower bound is a true statement; `total = 1` is not.
|
|
761
|
-
*
|
|
762
|
-
* `INSERT OR IGNORE` makes it idempotent and self-healing — it fills only rows that do not
|
|
763
|
-
* exist, so a real counted total is never overwritten by a seeded one, and running it at every
|
|
764
|
-
* boot costs one indexed scan of a table bounded by (sessions × reasons).
|
|
765
|
-
*/
|
|
766
|
-
/**
|
|
767
|
-
* ⚠️ **AND `CREATE TABLE IF NOT EXISTS` IS A NO-OP AGAINST A TABLE THAT ALREADY EXISTS** —
|
|
768
|
-
* review F1b, and it is the same hazard `DOD-M12B-INDEX-1` records for `held_content.origin`
|
|
769
|
-
* three hundred lines above.
|
|
770
|
-
*
|
|
771
|
-
* The table shipped one commit earlier WITHOUT `seeded`, and that build ran on a real daemon to
|
|
772
|
-
* take this unit's live measurement. On that machine the `CREATE` does nothing, the backfill
|
|
773
|
-
* below names a column that is not there, and the throw comes out of schema init — **the daemon
|
|
774
|
-
* does not open at all.** The one machine that most needs the backfill is the one it would have
|
|
775
|
-
* bricked.
|
|
776
|
-
*/
|
|
777
|
-
try {
|
|
778
|
-
db.exec("ALTER TABLE content_refusal_totals ADD COLUMN seeded INTEGER NOT NULL DEFAULT 0");
|
|
779
|
-
}
|
|
780
|
-
catch (err) {
|
|
781
|
-
const msg = extractErrorMessage(err);
|
|
782
|
-
if (!/duplicate column name/i.test(msg))
|
|
783
|
-
throw err;
|
|
784
|
-
}
|
|
785
|
-
db.exec(`
|
|
786
|
-
INSERT OR IGNORE INTO content_refusal_totals
|
|
787
|
-
(agent_id, session_id, reason, total, first_at, last_at, seeded)
|
|
788
|
-
SELECT agent_id, session_id, reason, count, first_at, last_at, 1
|
|
789
|
-
FROM content_refusal_notices
|
|
790
|
-
`);
|
|
791
|
-
/**
|
|
792
|
-
* ⚠️ **THE INVARIANT: a lifetime total can never be SMALLER than a since-dismissal count.**
|
|
793
|
-
* Caught on the live daemon, not by review — the inbox read
|
|
794
|
-
* `times_since_dismissed: 78, times_total: 12`.
|
|
795
|
-
*
|
|
796
|
-
* `INSERT OR IGNORE` above only fills rows that are ABSENT. A row that already exists but began
|
|
797
|
-
* counting AFTER the notice did — the totals table shipped one commit before `seeded`, so its
|
|
798
|
-
* rows default to 0 and claim to be exact — is left alone, and then presents a partial tally as
|
|
799
|
-
* a lifetime figure. Smaller than the number beside it, which is the tell.
|
|
800
|
-
*
|
|
801
|
-
* `count` resets on dismissal and `total` does not, so in healthy operation `total >= count`
|
|
802
|
-
* always. `count > total` therefore means one thing only: this row's total did not start at the
|
|
803
|
-
* beginning. Repaired to the best floor available and marked `seeded`, because that is what it
|
|
804
|
-
* is. Runs at every boot — it is also the repair for a totals write that failed while the
|
|
805
|
-
* notice's succeeded.
|
|
806
|
-
*/
|
|
807
|
-
db.exec(`
|
|
808
|
-
UPDATE content_refusal_totals
|
|
809
|
-
SET total = (SELECT n.count FROM content_refusal_notices n
|
|
810
|
-
WHERE n.agent_id = content_refusal_totals.agent_id
|
|
811
|
-
AND n.session_id = content_refusal_totals.session_id
|
|
812
|
-
AND n.reason = content_refusal_totals.reason),
|
|
813
|
-
seeded = 1
|
|
814
|
-
WHERE EXISTS (SELECT 1 FROM content_refusal_notices n
|
|
815
|
-
WHERE n.agent_id = content_refusal_totals.agent_id
|
|
816
|
-
AND n.session_id = content_refusal_totals.session_id
|
|
817
|
-
AND n.reason = content_refusal_totals.reason
|
|
818
|
-
AND n.count > content_refusal_totals.total)
|
|
819
|
-
`);
|
|
820
|
-
/**
|
|
821
|
-
* DOD-M15-REFUSALTERMINAL-1 — content this agent will never accept, so the daemon stops going
|
|
822
|
-
* to fetch it.
|
|
823
|
-
*
|
|
824
|
-
* **DURABLE BECAUSE THE DEFECT CROSSED RESTARTS.** The 62-hour loop spanned several `cello
|
|
825
|
-
* login` cycles; a marker held in a `Set` on the manager would have passed every test and
|
|
826
|
-
* shipped nothing.
|
|
827
|
-
*
|
|
828
|
-
* NOT the `'quarantined'` transcript row, which is the natural candidate and does not work: it
|
|
829
|
-
* is keyed on the BYTES, and the fetch scheduler is keyed on the content hash the sender
|
|
830
|
-
* committed to. On the two refusals where those provably differ (a tamper, an algorithm we
|
|
831
|
-
* cannot read) the row cannot answer the question this table is asked.
|
|
832
|
-
*
|
|
833
|
-
* Keyed on `agent_id` — the stable key. `agent_name` is a display label.
|
|
834
|
-
*/
|
|
835
|
-
db.exec(`
|
|
836
|
-
CREATE TABLE IF NOT EXISTS terminal_content_refusals (
|
|
837
|
-
agent_id TEXT NOT NULL,
|
|
838
|
-
session_id TEXT NOT NULL,
|
|
839
|
-
content_hash TEXT NOT NULL,
|
|
840
|
-
reason TEXT NOT NULL,
|
|
841
|
-
marked_at INTEGER NOT NULL,
|
|
842
|
-
PRIMARY KEY (agent_id, session_id, content_hash)
|
|
843
|
-
)
|
|
844
|
-
`);
|
|
845
|
-
db.exec(`
|
|
846
|
-
CREATE TABLE IF NOT EXISTS content_refusal_reads (
|
|
847
|
-
agent_id TEXT NOT NULL,
|
|
848
|
-
session_id TEXT NOT NULL,
|
|
849
|
-
reason TEXT NOT NULL,
|
|
850
|
-
consumer_id TEXT NOT NULL,
|
|
851
|
-
seen_count INTEGER NOT NULL,
|
|
852
|
-
seen_at INTEGER NOT NULL,
|
|
853
|
-
PRIMARY KEY (agent_id, session_id, reason, consumer_id)
|
|
854
|
-
)
|
|
855
|
-
`);
|
|
856
|
-
// DOD-SETTINGS-1: a daemon-side per-agent settings store for REACHABILITY POLICY (the tier bounds
|
|
857
|
-
// overrides and the per-tier/agent away messages). A generic key-value table on the stable
|
|
858
|
-
// agent_id, in the same SQLCipher DB. Deliberately NOT M9-CFG-001's gateway config store: this is
|
|
859
|
-
// daemon reachability policy, not gateway SCREENING config, and the M9 store is unwired + plaintext.
|
|
860
|
-
// reconcile with DOD-CONFIG-1 later; this is daemon reachability policy, not gateway config.
|
|
861
|
-
db.exec(`
|
|
862
|
-
CREATE TABLE IF NOT EXISTS agent_settings (
|
|
863
|
-
agent_id TEXT NOT NULL,
|
|
864
|
-
key TEXT NOT NULL,
|
|
865
|
-
value TEXT NOT NULL,
|
|
866
|
-
updated_at INTEGER NOT NULL,
|
|
867
|
-
PRIMARY KEY (agent_id, key)
|
|
868
|
-
)
|
|
869
|
-
`);
|
|
870
|
-
// M10 / DOD-STORE-CLIENT-1: the two trust-signal tables (wallet + received). Created HERE and
|
|
871
|
-
// deliberately last: `contact_trust_signals` carries a composite FK to `contacts(agent_id,
|
|
872
|
-
// pubkey)`, so its parent must exist and must already have been through the agent-id re-key
|
|
873
|
-
// above. SQLite resolves an FK's parent at DML time, not DDL time — so getting this order wrong
|
|
874
|
-
// would not fail here, it would fail on the first insert, which is a far worse place to find out.
|
|
875
|
-
ensureTrustSignalSchema(db, logger);
|
|
876
|
-
}
|
|
877
|
-
//# sourceMappingURL=session-schema.js.map
|