@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.
Files changed (891) hide show
  1. package/package.json +5 -5
  2. package/dist/agent-admin-handlers.d.ts +0 -56
  3. package/dist/agent-admin-handlers.d.ts.map +0 -1
  4. package/dist/agent-admin-handlers.js +0 -73
  5. package/dist/agent-admin-handlers.js.map +0 -1
  6. package/dist/agent-handlers.d.ts +0 -72
  7. package/dist/agent-handlers.d.ts.map +0 -1
  8. package/dist/agent-handlers.js +0 -604
  9. package/dist/agent-handlers.js.map +0 -1
  10. package/dist/agent-id-migration.d.ts +0 -70
  11. package/dist/agent-id-migration.d.ts.map +0 -1
  12. package/dist/agent-id-migration.js +0 -468
  13. package/dist/agent-id-migration.js.map +0 -1
  14. package/dist/agent-loader.d.ts +0 -37
  15. package/dist/agent-loader.d.ts.map +0 -1
  16. package/dist/agent-loader.js +0 -37
  17. package/dist/agent-loader.js.map +0 -1
  18. package/dist/agent-selection-root.d.ts +0 -29
  19. package/dist/agent-selection-root.d.ts.map +0 -1
  20. package/dist/agent-selection-root.js +0 -126
  21. package/dist/agent-selection-root.js.map +0 -1
  22. package/dist/agent-selection.d.ts +0 -73
  23. package/dist/agent-selection.d.ts.map +0 -1
  24. package/dist/agent-selection.js +0 -80
  25. package/dist/agent-selection.js.map +0 -1
  26. package/dist/agent-settings-keys.d.ts +0 -52
  27. package/dist/agent-settings-keys.d.ts.map +0 -1
  28. package/dist/agent-settings-keys.js +0 -114
  29. package/dist/agent-settings-keys.js.map +0 -1
  30. package/dist/agent-state.d.ts +0 -67
  31. package/dist/agent-state.d.ts.map +0 -1
  32. package/dist/agent-state.js +0 -66
  33. package/dist/agent-state.js.map +0 -1
  34. package/dist/assignment-verify.d.ts +0 -90
  35. package/dist/assignment-verify.d.ts.map +0 -1
  36. package/dist/assignment-verify.js +0 -301
  37. package/dist/assignment-verify.js.map +0 -1
  38. package/dist/attendance-wiring.d.ts +0 -23
  39. package/dist/attendance-wiring.d.ts.map +0 -1
  40. package/dist/attendance-wiring.js +0 -248
  41. package/dist/attendance-wiring.js.map +0 -1
  42. package/dist/attestation-body.d.ts +0 -47
  43. package/dist/attestation-body.d.ts.map +0 -1
  44. package/dist/attestation-body.js +0 -71
  45. package/dist/attestation-body.js.map +0 -1
  46. package/dist/authorship-verification.d.ts +0 -91
  47. package/dist/authorship-verification.d.ts.map +0 -1
  48. package/dist/authorship-verification.js +0 -532
  49. package/dist/authorship-verification.js.map +0 -1
  50. package/dist/away-detection.d.ts +0 -139
  51. package/dist/away-detection.d.ts.map +0 -1
  52. package/dist/away-detection.js +0 -186
  53. package/dist/away-detection.js.map +0 -1
  54. package/dist/away-inbox-oneshot.d.ts +0 -40
  55. package/dist/away-inbox-oneshot.d.ts.map +0 -1
  56. package/dist/away-inbox-oneshot.js +0 -311
  57. package/dist/away-inbox-oneshot.js.map +0 -1
  58. package/dist/backup-restore-handlers.d.ts +0 -10
  59. package/dist/backup-restore-handlers.d.ts.map +0 -1
  60. package/dist/backup-restore-handlers.js +0 -82
  61. package/dist/backup-restore-handlers.js.map +0 -1
  62. package/dist/backup-restore.d.ts +0 -102
  63. package/dist/backup-restore.d.ts.map +0 -1
  64. package/dist/backup-restore.js +0 -341
  65. package/dist/backup-restore.js.map +0 -1
  66. package/dist/bin/cello-daemon.d.ts +0 -13
  67. package/dist/bin/cello-daemon.d.ts.map +0 -1
  68. package/dist/bin/cello-daemon.js.map +0 -1
  69. package/dist/boot-agents.d.ts +0 -64
  70. package/dist/boot-agents.d.ts.map +0 -1
  71. package/dist/boot-agents.js +0 -241
  72. package/dist/boot-agents.js.map +0 -1
  73. package/dist/boot-connection-state.d.ts +0 -38
  74. package/dist/boot-connection-state.d.ts.map +0 -1
  75. package/dist/boot-connection-state.js +0 -95
  76. package/dist/boot-connection-state.js.map +0 -1
  77. package/dist/boot-core.d.ts +0 -36
  78. package/dist/boot-core.d.ts.map +0 -1
  79. package/dist/boot-core.js +0 -293
  80. package/dist/boot-core.js.map +0 -1
  81. package/dist/boot-parked-content.d.ts +0 -34
  82. package/dist/boot-parked-content.d.ts.map +0 -1
  83. package/dist/boot-parked-content.js +0 -528
  84. package/dist/boot-parked-content.js.map +0 -1
  85. package/dist/boot-sweeps.d.ts +0 -22
  86. package/dist/boot-sweeps.d.ts.map +0 -1
  87. package/dist/boot-sweeps.js +0 -51
  88. package/dist/boot-sweeps.js.map +0 -1
  89. package/dist/bundled-consortium-manifest.d.ts +0 -47
  90. package/dist/bundled-consortium-manifest.d.ts.map +0 -1
  91. package/dist/bundled-consortium-manifest.js +0 -116
  92. package/dist/bundled-consortium-manifest.js.map +0 -1
  93. package/dist/cbor-blob-migration.d.ts +0 -8
  94. package/dist/cbor-blob-migration.d.ts.map +0 -1
  95. package/dist/cbor-blob-migration.js +0 -116
  96. package/dist/cbor-blob-migration.js.map +0 -1
  97. package/dist/challenge-verifier.d.ts +0 -12
  98. package/dist/challenge-verifier.d.ts.map +0 -1
  99. package/dist/challenge-verifier.js +0 -11
  100. package/dist/challenge-verifier.js.map +0 -1
  101. package/dist/close-commitment.d.ts +0 -67
  102. package/dist/close-commitment.d.ts.map +0 -1
  103. package/dist/close-commitment.js +0 -78
  104. package/dist/close-commitment.js.map +0 -1
  105. package/dist/close-session-handler.d.ts +0 -94
  106. package/dist/close-session-handler.d.ts.map +0 -1
  107. package/dist/close-session-handler.js +0 -1418
  108. package/dist/close-session-handler.js.map +0 -1
  109. package/dist/co-attendance.d.ts +0 -29
  110. package/dist/co-attendance.d.ts.map +0 -1
  111. package/dist/co-attendance.js +0 -32
  112. package/dist/co-attendance.js.map +0 -1
  113. package/dist/column-birth.d.ts +0 -40
  114. package/dist/column-birth.d.ts.map +0 -1
  115. package/dist/column-birth.js +0 -61
  116. package/dist/column-birth.js.map +0 -1
  117. package/dist/connect-or-start.d.ts +0 -25
  118. package/dist/connect-or-start.d.ts.map +0 -1
  119. package/dist/connect-or-start.js +0 -175
  120. package/dist/connect-or-start.js.map +0 -1
  121. package/dist/connection-agents.d.ts +0 -16
  122. package/dist/connection-agents.d.ts.map +0 -1
  123. package/dist/connection-agents.js +0 -68
  124. package/dist/connection-agents.js.map +0 -1
  125. package/dist/consent-migration.d.ts +0 -49
  126. package/dist/consent-migration.d.ts.map +0 -1
  127. package/dist/consent-migration.js +0 -128
  128. package/dist/consent-migration.js.map +0 -1
  129. package/dist/consortium-bootstrap.d.ts +0 -138
  130. package/dist/consortium-bootstrap.d.ts.map +0 -1
  131. package/dist/consortium-bootstrap.js +0 -339
  132. package/dist/consortium-bootstrap.js.map +0 -1
  133. package/dist/consortium-fingerprint.d.ts +0 -115
  134. package/dist/consortium-fingerprint.d.ts.map +0 -1
  135. package/dist/consortium-fingerprint.js +0 -175
  136. package/dist/consortium-fingerprint.js.map +0 -1
  137. package/dist/contact-handlers.d.ts +0 -59
  138. package/dist/contact-handlers.d.ts.map +0 -1
  139. package/dist/contact-handlers.js +0 -343
  140. package/dist/contact-handlers.js.map +0 -1
  141. package/dist/contact-pubkey-case.d.ts +0 -65
  142. package/dist/contact-pubkey-case.d.ts.map +0 -1
  143. package/dist/contact-pubkey-case.js +0 -136
  144. package/dist/contact-pubkey-case.js.map +0 -1
  145. package/dist/contacts-tier-migration.d.ts +0 -90
  146. package/dist/contacts-tier-migration.d.ts.map +0 -1
  147. package/dist/contacts-tier-migration.js +0 -150
  148. package/dist/contacts-tier-migration.js.map +0 -1
  149. package/dist/content-encryption-status.d.ts +0 -111
  150. package/dist/content-encryption-status.d.ts.map +0 -1
  151. package/dist/content-encryption-status.js +0 -158
  152. package/dist/content-encryption-status.js.map +0 -1
  153. package/dist/content-park-client.d.ts +0 -90
  154. package/dist/content-park-client.d.ts.map +0 -1
  155. package/dist/content-park-client.js +0 -362
  156. package/dist/content-park-client.js.map +0 -1
  157. package/dist/content-park.d.ts +0 -52
  158. package/dist/content-park.d.ts.map +0 -1
  159. package/dist/content-park.js +0 -1309
  160. package/dist/content-park.js.map +0 -1
  161. package/dist/cross-node-negotiation.d.ts +0 -44
  162. package/dist/cross-node-negotiation.d.ts.map +0 -1
  163. package/dist/cross-node-negotiation.js +0 -34
  164. package/dist/cross-node-negotiation.js.map +0 -1
  165. package/dist/daemon-handle.d.ts +0 -57
  166. package/dist/daemon-handle.d.ts.map +0 -1
  167. package/dist/daemon-handle.js +0 -2
  168. package/dist/daemon-handle.js.map +0 -1
  169. package/dist/daemon-status-report.d.ts +0 -50
  170. package/dist/daemon-status-report.d.ts.map +0 -1
  171. package/dist/daemon-status-report.js +0 -81
  172. package/dist/daemon-status-report.js.map +0 -1
  173. package/dist/daemon.d.ts +0 -45
  174. package/dist/daemon.d.ts.map +0 -1
  175. package/dist/daemon.js +0 -1177
  176. package/dist/daemon.js.map +0 -1
  177. package/dist/db-identity-store.d.ts +0 -159
  178. package/dist/db-identity-store.d.ts.map +0 -1
  179. package/dist/db-identity-store.js +0 -502
  180. package/dist/db-identity-store.js.map +0 -1
  181. package/dist/delivery-open-registry.d.ts +0 -92
  182. package/dist/delivery-open-registry.d.ts.map +0 -1
  183. package/dist/delivery-open-registry.js +0 -121
  184. package/dist/delivery-open-registry.js.map +0 -1
  185. package/dist/delivery-session-suspects.d.ts +0 -56
  186. package/dist/delivery-session-suspects.d.ts.map +0 -1
  187. package/dist/delivery-session-suspects.js +0 -94
  188. package/dist/delivery-session-suspects.js.map +0 -1
  189. package/dist/directory-auth-posture.d.ts +0 -87
  190. package/dist/directory-auth-posture.d.ts.map +0 -1
  191. package/dist/directory-auth-posture.js +0 -134
  192. package/dist/directory-auth-posture.js.map +0 -1
  193. package/dist/directory-bootstrap.d.ts +0 -310
  194. package/dist/directory-bootstrap.d.ts.map +0 -1
  195. package/dist/directory-bootstrap.js +0 -557
  196. package/dist/directory-bootstrap.js.map +0 -1
  197. package/dist/directory-connect.d.ts +0 -27
  198. package/dist/directory-connect.d.ts.map +0 -1
  199. package/dist/directory-connect.js +0 -106
  200. package/dist/directory-connect.js.map +0 -1
  201. package/dist/disconnect-cleanup.d.ts +0 -51
  202. package/dist/disconnect-cleanup.d.ts.map +0 -1
  203. package/dist/disconnect-cleanup.js +0 -72
  204. package/dist/disconnect-cleanup.js.map +0 -1
  205. package/dist/document-amendment-store.d.ts +0 -120
  206. package/dist/document-amendment-store.d.ts.map +0 -1
  207. package/dist/document-amendment-store.js +0 -266
  208. package/dist/document-amendment-store.js.map +0 -1
  209. package/dist/document-delivery-transport.d.ts +0 -168
  210. package/dist/document-delivery-transport.d.ts.map +0 -1
  211. package/dist/document-delivery-transport.js +0 -206
  212. package/dist/document-delivery-transport.js.map +0 -1
  213. package/dist/document-engine.d.ts +0 -134
  214. package/dist/document-engine.d.ts.map +0 -1
  215. package/dist/document-engine.js +0 -282
  216. package/dist/document-engine.js.map +0 -1
  217. package/dist/document-flag.d.ts +0 -58
  218. package/dist/document-flag.d.ts.map +0 -1
  219. package/dist/document-flag.js +0 -70
  220. package/dist/document-flag.js.map +0 -1
  221. package/dist/document-frame-router.d.ts +0 -245
  222. package/dist/document-frame-router.d.ts.map +0 -1
  223. package/dist/document-frame-router.js +0 -397
  224. package/dist/document-frame-router.js.map +0 -1
  225. package/dist/document-gate-wiring.d.ts +0 -61
  226. package/dist/document-gate-wiring.d.ts.map +0 -1
  227. package/dist/document-gate-wiring.js +0 -125
  228. package/dist/document-gate-wiring.js.map +0 -1
  229. package/dist/document-gate.d.ts +0 -149
  230. package/dist/document-gate.d.ts.map +0 -1
  231. package/dist/document-gate.js +0 -509
  232. package/dist/document-gate.js.map +0 -1
  233. package/dist/document-handlers.d.ts +0 -47
  234. package/dist/document-handlers.d.ts.map +0 -1
  235. package/dist/document-handlers.js +0 -2203
  236. package/dist/document-handlers.js.map +0 -1
  237. package/dist/document-handshake.d.ts +0 -176
  238. package/dist/document-handshake.d.ts.map +0 -1
  239. package/dist/document-handshake.js +0 -452
  240. package/dist/document-handshake.js.map +0 -1
  241. package/dist/document-inbound.d.ts +0 -162
  242. package/dist/document-inbound.d.ts.map +0 -1
  243. package/dist/document-inbound.js +0 -530
  244. package/dist/document-inbound.js.map +0 -1
  245. package/dist/document-json.d.ts +0 -120
  246. package/dist/document-json.d.ts.map +0 -1
  247. package/dist/document-json.js +0 -191
  248. package/dist/document-json.js.map +0 -1
  249. package/dist/document-layer.d.ts +0 -215
  250. package/dist/document-layer.d.ts.map +0 -1
  251. package/dist/document-layer.js +0 -1025
  252. package/dist/document-layer.js.map +0 -1
  253. package/dist/document-lifecycle.d.ts +0 -52
  254. package/dist/document-lifecycle.d.ts.map +0 -1
  255. package/dist/document-lifecycle.js +0 -134
  256. package/dist/document-lifecycle.js.map +0 -1
  257. package/dist/document-live-docs.d.ts +0 -58
  258. package/dist/document-live-docs.d.ts.map +0 -1
  259. package/dist/document-live-docs.js +0 -126
  260. package/dist/document-live-docs.js.map +0 -1
  261. package/dist/document-notify.d.ts +0 -228
  262. package/dist/document-notify.d.ts.map +0 -1
  263. package/dist/document-notify.js +0 -580
  264. package/dist/document-notify.js.map +0 -1
  265. package/dist/document-profile.d.ts +0 -61
  266. package/dist/document-profile.d.ts.map +0 -1
  267. package/dist/document-profile.js +0 -112
  268. package/dist/document-profile.js.map +0 -1
  269. package/dist/document-publish.d.ts +0 -87
  270. package/dist/document-publish.d.ts.map +0 -1
  271. package/dist/document-publish.js +0 -173
  272. package/dist/document-publish.js.map +0 -1
  273. package/dist/document-reachability.d.ts +0 -42
  274. package/dist/document-reachability.d.ts.map +0 -1
  275. package/dist/document-reachability.js +0 -80
  276. package/dist/document-reachability.js.map +0 -1
  277. package/dist/document-reconcile-engine.d.ts +0 -66
  278. package/dist/document-reconcile-engine.d.ts.map +0 -1
  279. package/dist/document-reconcile-engine.js +0 -225
  280. package/dist/document-reconcile-engine.js.map +0 -1
  281. package/dist/document-reconcile-scheduler.d.ts +0 -163
  282. package/dist/document-reconcile-scheduler.d.ts.map +0 -1
  283. package/dist/document-reconcile-scheduler.js +0 -303
  284. package/dist/document-reconcile-scheduler.js.map +0 -1
  285. package/dist/document-rejection.d.ts +0 -251
  286. package/dist/document-rejection.d.ts.map +0 -1
  287. package/dist/document-rejection.js +0 -435
  288. package/dist/document-rejection.js.map +0 -1
  289. package/dist/document-screen.d.ts +0 -114
  290. package/dist/document-screen.d.ts.map +0 -1
  291. package/dist/document-screen.js +0 -223
  292. package/dist/document-screen.js.map +0 -1
  293. package/dist/document-store.d.ts +0 -372
  294. package/dist/document-store.d.ts.map +0 -1
  295. package/dist/document-store.js +0 -931
  296. package/dist/document-store.js.map +0 -1
  297. package/dist/document-surface.d.ts +0 -32
  298. package/dist/document-surface.d.ts.map +0 -1
  299. package/dist/document-surface.js +0 -151
  300. package/dist/document-surface.js.map +0 -1
  301. package/dist/document-types.d.ts +0 -94
  302. package/dist/document-types.d.ts.map +0 -1
  303. package/dist/document-types.js +0 -90
  304. package/dist/document-types.js.map +0 -1
  305. package/dist/document-watch.d.ts +0 -69
  306. package/dist/document-watch.d.ts.map +0 -1
  307. package/dist/document-watch.js +0 -108
  308. package/dist/document-watch.js.map +0 -1
  309. package/dist/document-wiring.d.ts +0 -53
  310. package/dist/document-wiring.d.ts.map +0 -1
  311. package/dist/document-wiring.js +0 -323
  312. package/dist/document-wiring.js.map +0 -1
  313. package/dist/document-write-guard.d.ts +0 -66
  314. package/dist/document-write-guard.d.ts.map +0 -1
  315. package/dist/document-write-guard.js +0 -98
  316. package/dist/document-write-guard.js.map +0 -1
  317. package/dist/document-write-path.d.ts +0 -94
  318. package/dist/document-write-path.d.ts.map +0 -1
  319. package/dist/document-write-path.js +0 -530
  320. package/dist/document-write-path.js.map +0 -1
  321. package/dist/error-message.d.ts +0 -7
  322. package/dist/error-message.d.ts.map +0 -1
  323. package/dist/error-message.js +0 -19
  324. package/dist/error-message.js.map +0 -1
  325. package/dist/file-manifest-provider.d.ts +0 -37
  326. package/dist/file-manifest-provider.d.ts.map +0 -1
  327. package/dist/file-manifest-provider.js +0 -105
  328. package/dist/file-manifest-provider.js.map +0 -1
  329. package/dist/frame-values.d.ts +0 -3
  330. package/dist/frame-values.d.ts.map +0 -1
  331. package/dist/frame-values.js +0 -84
  332. package/dist/frame-values.js.map +0 -1
  333. package/dist/frontier-mismatch.d.ts +0 -73
  334. package/dist/frontier-mismatch.d.ts.map +0 -1
  335. package/dist/frontier-mismatch.js +0 -89
  336. package/dist/frontier-mismatch.js.map +0 -1
  337. package/dist/gateway-config-handlers.d.ts +0 -26
  338. package/dist/gateway-config-handlers.d.ts.map +0 -1
  339. package/dist/gateway-config-handlers.js +0 -429
  340. package/dist/gateway-config-handlers.js.map +0 -1
  341. package/dist/held-content.d.ts +0 -145
  342. package/dist/held-content.d.ts.map +0 -1
  343. package/dist/held-content.js +0 -389
  344. package/dist/held-content.js.map +0 -1
  345. package/dist/http-manifest-poll.d.ts +0 -67
  346. package/dist/http-manifest-poll.d.ts.map +0 -1
  347. package/dist/http-manifest-poll.js +0 -150
  348. package/dist/http-manifest-poll.js.map +0 -1
  349. package/dist/identity-migration.d.ts +0 -40
  350. package/dist/identity-migration.d.ts.map +0 -1
  351. package/dist/identity-migration.js +0 -461
  352. package/dist/identity-migration.js.map +0 -1
  353. package/dist/inbound-refusals.d.ts +0 -283
  354. package/dist/inbound-refusals.d.ts.map +0 -1
  355. package/dist/inbound-refusals.js +0 -919
  356. package/dist/inbound-refusals.js.map +0 -1
  357. package/dist/inbound-seal-request.d.ts +0 -32
  358. package/dist/inbound-seal-request.d.ts.map +0 -1
  359. package/dist/inbound-seal-request.js +0 -228
  360. package/dist/inbound-seal-request.js.map +0 -1
  361. package/dist/inbound-sessions.d.ts +0 -291
  362. package/dist/inbound-sessions.d.ts.map +0 -1
  363. package/dist/inbound-sessions.js +0 -1609
  364. package/dist/inbound-sessions.js.map +0 -1
  365. package/dist/inclusion-proof-handlers.d.ts +0 -43
  366. package/dist/inclusion-proof-handlers.d.ts.map +0 -1
  367. package/dist/inclusion-proof-handlers.js +0 -565
  368. package/dist/inclusion-proof-handlers.js.map +0 -1
  369. package/dist/inclusion-proof.d.ts +0 -151
  370. package/dist/inclusion-proof.d.ts.map +0 -1
  371. package/dist/inclusion-proof.js +0 -228
  372. package/dist/inclusion-proof.js.map +0 -1
  373. package/dist/index.d.ts +0 -32
  374. package/dist/index.d.ts.map +0 -1
  375. package/dist/index.js.map +0 -1
  376. package/dist/initiate-session-handler.d.ts +0 -55
  377. package/dist/initiate-session-handler.d.ts.map +0 -1
  378. package/dist/initiate-session-handler.js +0 -310
  379. package/dist/initiate-session-handler.js.map +0 -1
  380. package/dist/ipc-client.d.ts +0 -31
  381. package/dist/ipc-client.d.ts.map +0 -1
  382. package/dist/ipc-client.js +0 -113
  383. package/dist/ipc-client.js.map +0 -1
  384. package/dist/ipc-server.d.ts +0 -63
  385. package/dist/ipc-server.d.ts.map +0 -1
  386. package/dist/ipc-server.js +0 -429
  387. package/dist/ipc-server.js.map +0 -1
  388. package/dist/ipc-surface.d.ts +0 -44
  389. package/dist/ipc-surface.d.ts.map +0 -1
  390. package/dist/ipc-surface.js +0 -107
  391. package/dist/ipc-surface.js.map +0 -1
  392. package/dist/line-lcs.d.ts +0 -51
  393. package/dist/line-lcs.d.ts.map +0 -1
  394. package/dist/line-lcs.js +0 -71
  395. package/dist/line-lcs.js.map +0 -1
  396. package/dist/lock-file.d.ts +0 -39
  397. package/dist/lock-file.d.ts.map +0 -1
  398. package/dist/lock-file.js +0 -120
  399. package/dist/lock-file.js.map +0 -1
  400. package/dist/log-collapse.d.ts +0 -66
  401. package/dist/log-collapse.d.ts.map +0 -1
  402. package/dist/log-collapse.js +0 -244
  403. package/dist/log-collapse.js.map +0 -1
  404. package/dist/log-rotate.d.ts +0 -67
  405. package/dist/log-rotate.d.ts.map +0 -1
  406. package/dist/log-rotate.js +0 -134
  407. package/dist/log-rotate.js.map +0 -1
  408. package/dist/manifest-deps.d.ts +0 -25
  409. package/dist/manifest-deps.d.ts.map +0 -1
  410. package/dist/manifest-deps.js +0 -151
  411. package/dist/manifest-deps.js.map +0 -1
  412. package/dist/manifest-poll-scheduler.d.ts +0 -31
  413. package/dist/manifest-poll-scheduler.d.ts.map +0 -1
  414. package/dist/manifest-poll-scheduler.js +0 -59
  415. package/dist/manifest-poll-scheduler.js.map +0 -1
  416. package/dist/manifest-validity.d.ts +0 -153
  417. package/dist/manifest-validity.d.ts.map +0 -1
  418. package/dist/manifest-validity.js +0 -268
  419. package/dist/manifest-validity.js.map +0 -1
  420. package/dist/manifest-version-store-db.d.ts +0 -24
  421. package/dist/manifest-version-store-db.d.ts.map +0 -1
  422. package/dist/manifest-version-store-db.js +0 -58
  423. package/dist/manifest-version-store-db.js.map +0 -1
  424. package/dist/manifest-version-store.d.ts +0 -16
  425. package/dist/manifest-version-store.d.ts.map +0 -1
  426. package/dist/manifest-version-store.js +0 -15
  427. package/dist/manifest-version-store.js.map +0 -1
  428. package/dist/network-directory-node.d.ts +0 -136
  429. package/dist/network-directory-node.d.ts.map +0 -1
  430. package/dist/network-directory-node.js +0 -810
  431. package/dist/network-directory-node.js.map +0 -1
  432. package/dist/nonce-dedup.d.ts +0 -68
  433. package/dist/nonce-dedup.d.ts.map +0 -1
  434. package/dist/nonce-dedup.js +0 -205
  435. package/dist/nonce-dedup.js.map +0 -1
  436. package/dist/notification-dispatcher.d.ts +0 -92
  437. package/dist/notification-dispatcher.d.ts.map +0 -1
  438. package/dist/notification-dispatcher.js +0 -210
  439. package/dist/notification-dispatcher.js.map +0 -1
  440. package/dist/notification-handlers.d.ts +0 -53
  441. package/dist/notification-handlers.d.ts.map +0 -1
  442. package/dist/notification-handlers.js +0 -461
  443. package/dist/notification-handlers.js.map +0 -1
  444. package/dist/onboarding-guidance.d.ts +0 -79
  445. package/dist/onboarding-guidance.d.ts.map +0 -1
  446. package/dist/onboarding-guidance.js +0 -95
  447. package/dist/onboarding-guidance.js.map +0 -1
  448. package/dist/operator-guidance.d.ts +0 -25
  449. package/dist/operator-guidance.d.ts.map +0 -1
  450. package/dist/operator-guidance.js +0 -50
  451. package/dist/operator-guidance.js.map +0 -1
  452. package/dist/orphan-triage.d.ts +0 -130
  453. package/dist/orphan-triage.d.ts.map +0 -1
  454. package/dist/orphan-triage.js +0 -207
  455. package/dist/orphan-triage.js.map +0 -1
  456. package/dist/outbound-sessions.d.ts +0 -126
  457. package/dist/outbound-sessions.d.ts.map +0 -1
  458. package/dist/outbound-sessions.js +0 -1052
  459. package/dist/outbound-sessions.js.map +0 -1
  460. package/dist/park-envelope.d.ts +0 -329
  461. package/dist/park-envelope.d.ts.map +0 -1
  462. package/dist/park-envelope.js +0 -509
  463. package/dist/park-envelope.js.map +0 -1
  464. package/dist/park-recovery.d.ts +0 -273
  465. package/dist/park-recovery.d.ts.map +0 -1
  466. package/dist/park-recovery.js +0 -717
  467. package/dist/park-recovery.js.map +0 -1
  468. package/dist/park-refusals.d.ts +0 -147
  469. package/dist/park-refusals.d.ts.map +0 -1
  470. package/dist/park-refusals.js +0 -331
  471. package/dist/park-refusals.js.map +0 -1
  472. package/dist/quarantine-framing.d.ts +0 -92
  473. package/dist/quarantine-framing.d.ts.map +0 -1
  474. package/dist/quarantine-framing.js +0 -111
  475. package/dist/quarantine-framing.js.map +0 -1
  476. package/dist/reconnect-drain.d.ts +0 -22
  477. package/dist/reconnect-drain.d.ts.map +0 -1
  478. package/dist/reconnect-drain.js +0 -65
  479. package/dist/reconnect-drain.js.map +0 -1
  480. package/dist/recovered-position.d.ts +0 -14
  481. package/dist/recovered-position.d.ts.map +0 -1
  482. package/dist/recovered-position.js +0 -59
  483. package/dist/recovered-position.js.map +0 -1
  484. package/dist/refusal-notices.d.ts +0 -196
  485. package/dist/refusal-notices.d.ts.map +0 -1
  486. package/dist/refusal-notices.js +0 -516
  487. package/dist/refusal-notices.js.map +0 -1
  488. package/dist/refusal-reasons.d.ts +0 -245
  489. package/dist/refusal-reasons.d.ts.map +0 -1
  490. package/dist/refusal-reasons.js +0 -363
  491. package/dist/refusal-reasons.js.map +0 -1
  492. package/dist/register-handler.d.ts +0 -36
  493. package/dist/register-handler.d.ts.map +0 -1
  494. package/dist/register-handler.js +0 -285
  495. package/dist/register-handler.js.map +0 -1
  496. package/dist/registration-context.d.ts +0 -72
  497. package/dist/registration-context.d.ts.map +0 -1
  498. package/dist/registration-context.js +0 -126
  499. package/dist/registration-context.js.map +0 -1
  500. package/dist/registration-manager.d.ts +0 -94
  501. package/dist/registration-manager.d.ts.map +0 -1
  502. package/dist/registration-manager.js +0 -585
  503. package/dist/registration-manager.js.map +0 -1
  504. package/dist/registration-persistence.d.ts +0 -183
  505. package/dist/registration-persistence.d.ts.map +0 -1
  506. package/dist/registration-persistence.js +0 -263
  507. package/dist/registration-persistence.js.map +0 -1
  508. package/dist/registry-poll.d.ts +0 -52
  509. package/dist/registry-poll.d.ts.map +0 -1
  510. package/dist/registry-poll.js +0 -140
  511. package/dist/registry-poll.js.map +0 -1
  512. package/dist/registry-version-store-db.d.ts +0 -22
  513. package/dist/registry-version-store-db.d.ts.map +0 -1
  514. package/dist/registry-version-store-db.js +0 -50
  515. package/dist/registry-version-store-db.js.map +0 -1
  516. package/dist/relay-endpoints.d.ts +0 -18
  517. package/dist/relay-endpoints.d.ts.map +0 -1
  518. package/dist/relay-endpoints.js +0 -9
  519. package/dist/relay-endpoints.js.map +0 -1
  520. package/dist/relay-only.d.ts +0 -140
  521. package/dist/relay-only.d.ts.map +0 -1
  522. package/dist/relay-only.js +0 -193
  523. package/dist/relay-only.js.map +0 -1
  524. package/dist/relay-receipt-store.d.ts +0 -155
  525. package/dist/relay-receipt-store.d.ts.map +0 -1
  526. package/dist/relay-receipt-store.js +0 -284
  527. package/dist/relay-receipt-store.js.map +0 -1
  528. package/dist/relay-reconnect.d.ts +0 -32
  529. package/dist/relay-reconnect.d.ts.map +0 -1
  530. package/dist/relay-reconnect.js +0 -29
  531. package/dist/relay-reconnect.js.map +0 -1
  532. package/dist/reply-lag.d.ts +0 -11
  533. package/dist/reply-lag.d.ts.map +0 -1
  534. package/dist/reply-lag.js +0 -46
  535. package/dist/reply-lag.js.map +0 -1
  536. package/dist/resolve-named-agent.d.ts +0 -49
  537. package/dist/resolve-named-agent.d.ts.map +0 -1
  538. package/dist/resolve-named-agent.js +0 -77
  539. package/dist/resolve-named-agent.js.map +0 -1
  540. package/dist/restart-seal-resolver.d.ts +0 -110
  541. package/dist/restart-seal-resolver.d.ts.map +0 -1
  542. package/dist/restart-seal-resolver.js +0 -353
  543. package/dist/restart-seal-resolver.js.map +0 -1
  544. package/dist/resume-last-seen.d.ts +0 -15
  545. package/dist/resume-last-seen.d.ts.map +0 -1
  546. package/dist/resume-last-seen.js +0 -44
  547. package/dist/resume-last-seen.js.map +0 -1
  548. package/dist/retry-queue.d.ts +0 -203
  549. package/dist/retry-queue.d.ts.map +0 -1
  550. package/dist/retry-queue.js +0 -701
  551. package/dist/retry-queue.js.map +0 -1
  552. package/dist/roster-freshness.d.ts +0 -160
  553. package/dist/roster-freshness.d.ts.map +0 -1
  554. package/dist/roster-freshness.js +0 -250
  555. package/dist/roster-freshness.js.map +0 -1
  556. package/dist/screening-status.d.ts +0 -15
  557. package/dist/screening-status.d.ts.map +0 -1
  558. package/dist/screening-status.js +0 -65
  559. package/dist/screening-status.js.map +0 -1
  560. package/dist/seal-carried-close.d.ts +0 -37
  561. package/dist/seal-carried-close.d.ts.map +0 -1
  562. package/dist/seal-carried-close.js +0 -179
  563. package/dist/seal-carried-close.js.map +0 -1
  564. package/dist/seal-certificate-pull.d.ts +0 -79
  565. package/dist/seal-certificate-pull.d.ts.map +0 -1
  566. package/dist/seal-certificate-pull.js +0 -186
  567. package/dist/seal-certificate-pull.js.map +0 -1
  568. package/dist/seal-certified-root-check.d.ts +0 -37
  569. package/dist/seal-certified-root-check.d.ts.map +0 -1
  570. package/dist/seal-certified-root-check.js +0 -127
  571. package/dist/seal-certified-root-check.js.map +0 -1
  572. package/dist/seal-coordinator.d.ts +0 -118
  573. package/dist/seal-coordinator.d.ts.map +0 -1
  574. package/dist/seal-coordinator.js +0 -927
  575. package/dist/seal-coordinator.js.map +0 -1
  576. package/dist/seal-escalation.d.ts +0 -80
  577. package/dist/seal-escalation.d.ts.map +0 -1
  578. package/dist/seal-escalation.js +0 -283
  579. package/dist/seal-escalation.js.map +0 -1
  580. package/dist/seal-evidence-root-check.d.ts +0 -70
  581. package/dist/seal-evidence-root-check.d.ts.map +0 -1
  582. package/dist/seal-evidence-root-check.js +0 -199
  583. package/dist/seal-evidence-root-check.js.map +0 -1
  584. package/dist/seal-failure-store.d.ts +0 -129
  585. package/dist/seal-failure-store.d.ts.map +0 -1
  586. package/dist/seal-failure-store.js +0 -173
  587. package/dist/seal-failure-store.js.map +0 -1
  588. package/dist/seal-flows.d.ts +0 -107
  589. package/dist/seal-flows.d.ts.map +0 -1
  590. package/dist/seal-flows.js +0 -638
  591. package/dist/seal-flows.js.map +0 -1
  592. package/dist/seal-frontier-verify.d.ts +0 -103
  593. package/dist/seal-frontier-verify.d.ts.map +0 -1
  594. package/dist/seal-frontier-verify.js +0 -143
  595. package/dist/seal-frontier-verify.js.map +0 -1
  596. package/dist/seal-leaf.d.ts +0 -58
  597. package/dist/seal-leaf.d.ts.map +0 -1
  598. package/dist/seal-leaf.js +0 -112
  599. package/dist/seal-leaf.js.map +0 -1
  600. package/dist/seal-legibility-tbs.d.ts +0 -25
  601. package/dist/seal-legibility-tbs.d.ts.map +0 -1
  602. package/dist/seal-legibility-tbs.js +0 -77
  603. package/dist/seal-legibility-tbs.js.map +0 -1
  604. package/dist/seal-local-terminus.d.ts +0 -41
  605. package/dist/seal-local-terminus.d.ts.map +0 -1
  606. package/dist/seal-local-terminus.js +0 -170
  607. package/dist/seal-local-terminus.js.map +0 -1
  608. package/dist/seal-receipt-upgrade.d.ts +0 -30
  609. package/dist/seal-receipt-upgrade.d.ts.map +0 -1
  610. package/dist/seal-receipt-upgrade.js +0 -49
  611. package/dist/seal-receipt-upgrade.js.map +0 -1
  612. package/dist/seal-relay-silence.d.ts +0 -51
  613. package/dist/seal-relay-silence.d.ts.map +0 -1
  614. package/dist/seal-relay-silence.js +0 -76
  615. package/dist/seal-relay-silence.js.map +0 -1
  616. package/dist/seal-settle.d.ts +0 -38
  617. package/dist/seal-settle.d.ts.map +0 -1
  618. package/dist/seal-settle.js +0 -33
  619. package/dist/seal-settle.js.map +0 -1
  620. package/dist/seal-upgrade.d.ts +0 -107
  621. package/dist/seal-upgrade.d.ts.map +0 -1
  622. package/dist/seal-upgrade.js +0 -200
  623. package/dist/seal-upgrade.js.map +0 -1
  624. package/dist/sealed-conversation.d.ts +0 -36
  625. package/dist/sealed-conversation.d.ts.map +0 -1
  626. package/dist/sealed-conversation.js +0 -171
  627. package/dist/sealed-conversation.js.map +0 -1
  628. package/dist/sealed-leaf-set.d.ts +0 -92
  629. package/dist/sealed-leaf-set.d.ts.map +0 -1
  630. package/dist/sealed-leaf-set.js +0 -122
  631. package/dist/sealed-leaf-set.js.map +0 -1
  632. package/dist/send-claims.d.ts +0 -56
  633. package/dist/send-claims.d.ts.map +0 -1
  634. package/dist/send-claims.js +0 -50
  635. package/dist/send-claims.js.map +0 -1
  636. package/dist/session-assignment-parser.d.ts +0 -98
  637. package/dist/session-assignment-parser.d.ts.map +0 -1
  638. package/dist/session-assignment-parser.js +0 -325
  639. package/dist/session-assignment-parser.js.map +0 -1
  640. package/dist/session-category.d.ts +0 -19
  641. package/dist/session-category.d.ts.map +0 -1
  642. package/dist/session-category.js +0 -14
  643. package/dist/session-category.js.map +0 -1
  644. package/dist/session-ceremony.d.ts +0 -297
  645. package/dist/session-ceremony.d.ts.map +0 -1
  646. package/dist/session-ceremony.js +0 -964
  647. package/dist/session-ceremony.js.map +0 -1
  648. package/dist/session-closed.d.ts +0 -79
  649. package/dist/session-closed.d.ts.map +0 -1
  650. package/dist/session-closed.js +0 -189
  651. package/dist/session-closed.js.map +0 -1
  652. package/dist/session-connection-gater.d.ts +0 -148
  653. package/dist/session-connection-gater.d.ts.map +0 -1
  654. package/dist/session-connection-gater.js +0 -332
  655. package/dist/session-connection-gater.js.map +0 -1
  656. package/dist/session-content-context.d.ts +0 -162
  657. package/dist/session-content-context.d.ts.map +0 -1
  658. package/dist/session-content-context.js +0 -2
  659. package/dist/session-content-context.js.map +0 -1
  660. package/dist/session-content-handlers.d.ts +0 -82
  661. package/dist/session-content-handlers.d.ts.map +0 -1
  662. package/dist/session-content-handlers.js +0 -1382
  663. package/dist/session-content-handlers.js.map +0 -1
  664. package/dist/session-content-ingest.d.ts +0 -206
  665. package/dist/session-content-ingest.d.ts.map +0 -1
  666. package/dist/session-content-ingest.js +0 -2167
  667. package/dist/session-content-ingest.js.map +0 -1
  668. package/dist/session-content-send.d.ts +0 -191
  669. package/dist/session-content-send.d.ts.map +0 -1
  670. package/dist/session-content-send.js +0 -1360
  671. package/dist/session-content-send.js.map +0 -1
  672. package/dist/session-delivery-acks.d.ts +0 -169
  673. package/dist/session-delivery-acks.d.ts.map +0 -1
  674. package/dist/session-delivery-acks.js +0 -569
  675. package/dist/session-delivery-acks.js.map +0 -1
  676. package/dist/session-ephemerals.d.ts +0 -279
  677. package/dist/session-ephemerals.d.ts.map +0 -1
  678. package/dist/session-ephemerals.js +0 -591
  679. package/dist/session-ephemerals.js.map +0 -1
  680. package/dist/session-leaf-records.d.ts +0 -159
  681. package/dist/session-leaf-records.d.ts.map +0 -1
  682. package/dist/session-leaf-records.js +0 -408
  683. package/dist/session-leaf-records.js.map +0 -1
  684. package/dist/session-lifecycle.d.ts +0 -303
  685. package/dist/session-lifecycle.d.ts.map +0 -1
  686. package/dist/session-lifecycle.js +0 -1679
  687. package/dist/session-lifecycle.js.map +0 -1
  688. package/dist/session-liveness.d.ts +0 -135
  689. package/dist/session-liveness.d.ts.map +0 -1
  690. package/dist/session-liveness.js +0 -347
  691. package/dist/session-liveness.js.map +0 -1
  692. package/dist/session-name.d.ts +0 -35
  693. package/dist/session-name.d.ts.map +0 -1
  694. package/dist/session-name.js +0 -60
  695. package/dist/session-name.js.map +0 -1
  696. package/dist/session-node-factory.d.ts +0 -18
  697. package/dist/session-node-factory.d.ts.map +0 -1
  698. package/dist/session-node-factory.js +0 -182
  699. package/dist/session-node-factory.js.map +0 -1
  700. package/dist/session-node-manager.d.ts +0 -875
  701. package/dist/session-node-manager.d.ts.map +0 -1
  702. package/dist/session-node-manager.js +0 -2995
  703. package/dist/session-node-manager.js.map +0 -1
  704. package/dist/session-node-types.d.ts +0 -1057
  705. package/dist/session-node-types.d.ts.map +0 -1
  706. package/dist/session-node-types.js +0 -657
  707. package/dist/session-node-types.js.map +0 -1
  708. package/dist/session-notify.d.ts +0 -46
  709. package/dist/session-notify.d.ts.map +0 -1
  710. package/dist/session-notify.js +0 -116
  711. package/dist/session-notify.js.map +0 -1
  712. package/dist/session-own-chain-store.d.ts +0 -65
  713. package/dist/session-own-chain-store.d.ts.map +0 -1
  714. package/dist/session-own-chain-store.js +0 -75
  715. package/dist/session-own-chain-store.js.map +0 -1
  716. package/dist/session-queries.d.ts +0 -476
  717. package/dist/session-queries.d.ts.map +0 -1
  718. package/dist/session-queries.js +0 -1007
  719. package/dist/session-queries.js.map +0 -1
  720. package/dist/session-read-handlers.d.ts +0 -87
  721. package/dist/session-read-handlers.d.ts.map +0 -1
  722. package/dist/session-read-handlers.js +0 -682
  723. package/dist/session-read-handlers.js.map +0 -1
  724. package/dist/session-records.d.ts +0 -341
  725. package/dist/session-records.d.ts.map +0 -1
  726. package/dist/session-records.js +0 -858
  727. package/dist/session-records.js.map +0 -1
  728. package/dist/session-relay-client.d.ts +0 -659
  729. package/dist/session-relay-client.d.ts.map +0 -1
  730. package/dist/session-relay-client.js +0 -2876
  731. package/dist/session-relay-client.js.map +0 -1
  732. package/dist/session-relay.d.ts +0 -397
  733. package/dist/session-relay.d.ts.map +0 -1
  734. package/dist/session-relay.js +0 -1636
  735. package/dist/session-relay.js.map +0 -1
  736. package/dist/session-salt-agreement.d.ts +0 -331
  737. package/dist/session-salt-agreement.d.ts.map +0 -1
  738. package/dist/session-salt-agreement.js +0 -472
  739. package/dist/session-salt-agreement.js.map +0 -1
  740. package/dist/session-salts.d.ts +0 -432
  741. package/dist/session-salts.d.ts.map +0 -1
  742. package/dist/session-salts.js +0 -1540
  743. package/dist/session-salts.js.map +0 -1
  744. package/dist/session-schema.d.ts +0 -30
  745. package/dist/session-schema.d.ts.map +0 -1
  746. package/dist/session-schema.js +0 -877
  747. package/dist/session-schema.js.map +0 -1
  748. package/dist/session-seal-leaf-store.d.ts +0 -70
  749. package/dist/session-seal-leaf-store.d.ts.map +0 -1
  750. package/dist/session-seal-leaf-store.js +0 -105
  751. package/dist/session-seal-leaf-store.js.map +0 -1
  752. package/dist/session-seal.d.ts +0 -334
  753. package/dist/session-seal.d.ts.map +0 -1
  754. package/dist/session-seal.js +0 -1017
  755. package/dist/session-seal.js.map +0 -1
  756. package/dist/session-terminal-refusal.d.ts +0 -65
  757. package/dist/session-terminal-refusal.d.ts.map +0 -1
  758. package/dist/session-terminal-refusal.js +0 -87
  759. package/dist/session-terminal-refusal.js.map +0 -1
  760. package/dist/session-tree.d.ts +0 -110
  761. package/dist/session-tree.d.ts.map +0 -1
  762. package/dist/session-tree.js +0 -144
  763. package/dist/session-tree.js.map +0 -1
  764. package/dist/session-views.d.ts +0 -47
  765. package/dist/session-views.d.ts.map +0 -1
  766. package/dist/session-views.js +0 -278
  767. package/dist/session-views.js.map +0 -1
  768. package/dist/signal-handlers.d.ts +0 -63
  769. package/dist/signal-handlers.d.ts.map +0 -1
  770. package/dist/signal-handlers.js +0 -980
  771. package/dist/signal-handlers.js.map +0 -1
  772. package/dist/signal-requirement-policy.d.ts +0 -51
  773. package/dist/signal-requirement-policy.d.ts.map +0 -1
  774. package/dist/signal-requirement-policy.js +0 -89
  775. package/dist/signal-requirement-policy.js.map +0 -1
  776. package/dist/signal-revocability.d.ts +0 -49
  777. package/dist/signal-revocability.d.ts.map +0 -1
  778. package/dist/signal-revocability.js +0 -93
  779. package/dist/signal-revocability.js.map +0 -1
  780. package/dist/signal-submission.d.ts +0 -181
  781. package/dist/signal-submission.d.ts.map +0 -1
  782. package/dist/signal-submission.js +0 -368
  783. package/dist/signal-submission.js.map +0 -1
  784. package/dist/signaling-connect.d.ts +0 -118
  785. package/dist/signaling-connect.d.ts.map +0 -1
  786. package/dist/signaling-connect.js +0 -538
  787. package/dist/signaling-connect.js.map +0 -1
  788. package/dist/signaling-wiring.d.ts +0 -105
  789. package/dist/signaling-wiring.d.ts.map +0 -1
  790. package/dist/signaling-wiring.js +0 -393
  791. package/dist/signaling-wiring.js.map +0 -1
  792. package/dist/singleton-lock.d.ts +0 -85
  793. package/dist/singleton-lock.d.ts.map +0 -1
  794. package/dist/singleton-lock.js +0 -219
  795. package/dist/singleton-lock.js.map +0 -1
  796. package/dist/sqlcipher-db.d.ts +0 -139
  797. package/dist/sqlcipher-db.d.ts.map +0 -1
  798. package/dist/sqlcipher-db.js +0 -357
  799. package/dist/sqlcipher-db.js.map +0 -1
  800. package/dist/standing-receivers.d.ts +0 -319
  801. package/dist/standing-receivers.d.ts.map +0 -1
  802. package/dist/standing-receivers.js +0 -1295
  803. package/dist/standing-receivers.js.map +0 -1
  804. package/dist/start-agent.d.ts +0 -64
  805. package/dist/start-agent.d.ts.map +0 -1
  806. package/dist/start-agent.js +0 -136
  807. package/dist/start-agent.js.map +0 -1
  808. package/dist/status-handler.d.ts +0 -54
  809. package/dist/status-handler.d.ts.map +0 -1
  810. package/dist/status-handler.js +0 -61
  811. package/dist/status-handler.js.map +0 -1
  812. package/dist/submission-retry.d.ts +0 -208
  813. package/dist/submission-retry.d.ts.map +0 -1
  814. package/dist/submission-retry.js +0 -506
  815. package/dist/submission-retry.js.map +0 -1
  816. package/dist/telegram-bot-client.d.ts +0 -34
  817. package/dist/telegram-bot-client.d.ts.map +0 -1
  818. package/dist/telegram-bot-client.js +0 -36
  819. package/dist/telegram-bot-client.js.map +0 -1
  820. package/dist/telegram-doorbell.d.ts +0 -38
  821. package/dist/telegram-doorbell.d.ts.map +0 -1
  822. package/dist/telegram-doorbell.js +0 -140
  823. package/dist/telegram-doorbell.js.map +0 -1
  824. package/dist/test-handlers.d.ts +0 -62
  825. package/dist/test-handlers.d.ts.map +0 -1
  826. package/dist/test-handlers.js +0 -240
  827. package/dist/test-handlers.js.map +0 -1
  828. package/dist/testing.d.ts +0 -10
  829. package/dist/testing.d.ts.map +0 -1
  830. package/dist/testing.js +0 -10
  831. package/dist/testing.js.map +0 -1
  832. package/dist/transport-composition.d.ts +0 -31
  833. package/dist/transport-composition.d.ts.map +0 -1
  834. package/dist/transport-composition.js +0 -55
  835. package/dist/transport-composition.js.map +0 -1
  836. package/dist/transport-selector.d.ts +0 -202
  837. package/dist/transport-selector.d.ts.map +0 -1
  838. package/dist/transport-selector.js +0 -196
  839. package/dist/transport-selector.js.map +0 -1
  840. package/dist/trust-signal-pickup-listener.d.ts +0 -43
  841. package/dist/trust-signal-pickup-listener.d.ts.map +0 -1
  842. package/dist/trust-signal-pickup-listener.js +0 -48
  843. package/dist/trust-signal-pickup-listener.js.map +0 -1
  844. package/dist/trust-signal-store.d.ts +0 -406
  845. package/dist/trust-signal-store.d.ts.map +0 -1
  846. package/dist/trust-signal-store.js +0 -939
  847. package/dist/trust-signal-store.js.map +0 -1
  848. package/dist/trust-signal-sweep-tick.d.ts +0 -60
  849. package/dist/trust-signal-sweep-tick.d.ts.map +0 -1
  850. package/dist/trust-signal-sweep-tick.js +0 -101
  851. package/dist/trust-signal-sweep-tick.js.map +0 -1
  852. package/dist/trust-signal-sweep.d.ts +0 -94
  853. package/dist/trust-signal-sweep.d.ts.map +0 -1
  854. package/dist/trust-signal-sweep.js +0 -147
  855. package/dist/trust-signal-sweep.js.map +0 -1
  856. package/dist/type-registry.d.ts +0 -42
  857. package/dist/type-registry.d.ts.map +0 -1
  858. package/dist/type-registry.js +0 -37
  859. package/dist/type-registry.js.map +0 -1
  860. package/dist/types.d.ts +0 -746
  861. package/dist/types.d.ts.map +0 -1
  862. package/dist/types.js +0 -20
  863. package/dist/types.js.map +0 -1
  864. package/dist/unresolved-nodes-report.d.ts +0 -14
  865. package/dist/unresolved-nodes-report.d.ts.map +0 -1
  866. package/dist/unresolved-nodes-report.js +0 -96
  867. package/dist/unresolved-nodes-report.js.map +0 -1
  868. package/dist/vocabulary.d.ts +0 -150
  869. package/dist/vocabulary.d.ts.map +0 -1
  870. package/dist/vocabulary.js +0 -386
  871. package/dist/vocabulary.js.map +0 -1
  872. package/dist/who-label.d.ts +0 -28
  873. package/dist/who-label.d.ts.map +0 -1
  874. package/dist/who-label.js +0 -31
  875. package/dist/who-label.js.map +0 -1
  876. package/dist/who-resolver.d.ts +0 -15
  877. package/dist/who-resolver.d.ts.map +0 -1
  878. package/dist/who-resolver.js +0 -47
  879. package/dist/who-resolver.js.map +0 -1
  880. package/dist/wire-content-hash.d.ts +0 -93
  881. package/dist/wire-content-hash.d.ts.map +0 -1
  882. package/dist/wire-content-hash.js +0 -116
  883. package/dist/wire-content-hash.js.map +0 -1
  884. package/dist/withheld-content.d.ts +0 -13
  885. package/dist/withheld-content.d.ts.map +0 -1
  886. package/dist/withheld-content.js +0 -46
  887. package/dist/withheld-content.js.map +0 -1
  888. package/dist/witness-alerts.d.ts +0 -40
  889. package/dist/witness-alerts.d.ts.map +0 -1
  890. package/dist/witness-alerts.js +0 -102
  891. package/dist/witness-alerts.js.map +0 -1
@@ -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