@cello-protocol/daemon 0.0.227 → 0.0.229

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (895) hide show
  1. package/dist/agent-admin-handlers.d.ts +56 -0
  2. package/dist/agent-admin-handlers.d.ts.map +1 -0
  3. package/dist/agent-admin-handlers.js +73 -0
  4. package/dist/agent-admin-handlers.js.map +1 -0
  5. package/dist/agent-handlers.d.ts +72 -0
  6. package/dist/agent-handlers.d.ts.map +1 -0
  7. package/dist/agent-handlers.js +604 -0
  8. package/dist/agent-handlers.js.map +1 -0
  9. package/dist/agent-id-migration.d.ts +70 -0
  10. package/dist/agent-id-migration.d.ts.map +1 -0
  11. package/dist/agent-id-migration.js +468 -0
  12. package/dist/agent-id-migration.js.map +1 -0
  13. package/dist/agent-loader.d.ts +37 -0
  14. package/dist/agent-loader.d.ts.map +1 -0
  15. package/dist/agent-loader.js +37 -0
  16. package/dist/agent-loader.js.map +1 -0
  17. package/dist/agent-selection-root.d.ts +29 -0
  18. package/dist/agent-selection-root.d.ts.map +1 -0
  19. package/dist/agent-selection-root.js +126 -0
  20. package/dist/agent-selection-root.js.map +1 -0
  21. package/dist/agent-selection.d.ts +73 -0
  22. package/dist/agent-selection.d.ts.map +1 -0
  23. package/dist/agent-selection.js +80 -0
  24. package/dist/agent-selection.js.map +1 -0
  25. package/dist/agent-settings-keys.d.ts +52 -0
  26. package/dist/agent-settings-keys.d.ts.map +1 -0
  27. package/dist/agent-settings-keys.js +114 -0
  28. package/dist/agent-settings-keys.js.map +1 -0
  29. package/dist/agent-state.d.ts +67 -0
  30. package/dist/agent-state.d.ts.map +1 -0
  31. package/dist/agent-state.js +66 -0
  32. package/dist/agent-state.js.map +1 -0
  33. package/dist/assignment-verify.d.ts +90 -0
  34. package/dist/assignment-verify.d.ts.map +1 -0
  35. package/dist/assignment-verify.js +301 -0
  36. package/dist/assignment-verify.js.map +1 -0
  37. package/dist/attendance-wiring.d.ts +23 -0
  38. package/dist/attendance-wiring.d.ts.map +1 -0
  39. package/dist/attendance-wiring.js +248 -0
  40. package/dist/attendance-wiring.js.map +1 -0
  41. package/dist/attestation-body.d.ts +47 -0
  42. package/dist/attestation-body.d.ts.map +1 -0
  43. package/dist/attestation-body.js +71 -0
  44. package/dist/attestation-body.js.map +1 -0
  45. package/dist/authorship-verification.d.ts +91 -0
  46. package/dist/authorship-verification.d.ts.map +1 -0
  47. package/dist/authorship-verification.js +532 -0
  48. package/dist/authorship-verification.js.map +1 -0
  49. package/dist/away-detection.d.ts +139 -0
  50. package/dist/away-detection.d.ts.map +1 -0
  51. package/dist/away-detection.js +186 -0
  52. package/dist/away-detection.js.map +1 -0
  53. package/dist/away-inbox-oneshot.d.ts +40 -0
  54. package/dist/away-inbox-oneshot.d.ts.map +1 -0
  55. package/dist/away-inbox-oneshot.js +311 -0
  56. package/dist/away-inbox-oneshot.js.map +1 -0
  57. package/dist/backup-restore-handlers.d.ts +10 -0
  58. package/dist/backup-restore-handlers.d.ts.map +1 -0
  59. package/dist/backup-restore-handlers.js +82 -0
  60. package/dist/backup-restore-handlers.js.map +1 -0
  61. package/dist/backup-restore.d.ts +102 -0
  62. package/dist/backup-restore.d.ts.map +1 -0
  63. package/dist/backup-restore.js +341 -0
  64. package/dist/backup-restore.js.map +1 -0
  65. package/dist/bin/cello-daemon.d.ts +13 -0
  66. package/dist/bin/cello-daemon.d.ts.map +1 -0
  67. package/dist/bin/cello-daemon.js.map +1 -0
  68. package/dist/boot-agents.d.ts +64 -0
  69. package/dist/boot-agents.d.ts.map +1 -0
  70. package/dist/boot-agents.js +241 -0
  71. package/dist/boot-agents.js.map +1 -0
  72. package/dist/boot-connection-state.d.ts +38 -0
  73. package/dist/boot-connection-state.d.ts.map +1 -0
  74. package/dist/boot-connection-state.js +95 -0
  75. package/dist/boot-connection-state.js.map +1 -0
  76. package/dist/boot-core.d.ts +36 -0
  77. package/dist/boot-core.d.ts.map +1 -0
  78. package/dist/boot-core.js +293 -0
  79. package/dist/boot-core.js.map +1 -0
  80. package/dist/boot-parked-content.d.ts +34 -0
  81. package/dist/boot-parked-content.d.ts.map +1 -0
  82. package/dist/boot-parked-content.js +528 -0
  83. package/dist/boot-parked-content.js.map +1 -0
  84. package/dist/boot-sweeps.d.ts +22 -0
  85. package/dist/boot-sweeps.d.ts.map +1 -0
  86. package/dist/boot-sweeps.js +51 -0
  87. package/dist/boot-sweeps.js.map +1 -0
  88. package/dist/bundled-consortium-manifest.d.ts +47 -0
  89. package/dist/bundled-consortium-manifest.d.ts.map +1 -0
  90. package/dist/bundled-consortium-manifest.js +116 -0
  91. package/dist/bundled-consortium-manifest.js.map +1 -0
  92. package/dist/cbor-blob-migration.d.ts +8 -0
  93. package/dist/cbor-blob-migration.d.ts.map +1 -0
  94. package/dist/cbor-blob-migration.js +116 -0
  95. package/dist/cbor-blob-migration.js.map +1 -0
  96. package/dist/challenge-verifier.d.ts +12 -0
  97. package/dist/challenge-verifier.d.ts.map +1 -0
  98. package/dist/challenge-verifier.js +11 -0
  99. package/dist/challenge-verifier.js.map +1 -0
  100. package/dist/channel-log-store.d.ts +80 -0
  101. package/dist/channel-log-store.d.ts.map +1 -0
  102. package/dist/channel-log-store.js +290 -0
  103. package/dist/channel-log-store.js.map +1 -0
  104. package/dist/close-commitment.d.ts +67 -0
  105. package/dist/close-commitment.d.ts.map +1 -0
  106. package/dist/close-commitment.js +78 -0
  107. package/dist/close-commitment.js.map +1 -0
  108. package/dist/close-session-handler.d.ts +94 -0
  109. package/dist/close-session-handler.d.ts.map +1 -0
  110. package/dist/close-session-handler.js +1418 -0
  111. package/dist/close-session-handler.js.map +1 -0
  112. package/dist/co-attendance.d.ts +29 -0
  113. package/dist/co-attendance.d.ts.map +1 -0
  114. package/dist/co-attendance.js +32 -0
  115. package/dist/co-attendance.js.map +1 -0
  116. package/dist/column-birth.d.ts +40 -0
  117. package/dist/column-birth.d.ts.map +1 -0
  118. package/dist/column-birth.js +61 -0
  119. package/dist/column-birth.js.map +1 -0
  120. package/dist/connect-or-start.d.ts +25 -0
  121. package/dist/connect-or-start.d.ts.map +1 -0
  122. package/dist/connect-or-start.js +175 -0
  123. package/dist/connect-or-start.js.map +1 -0
  124. package/dist/connection-agents.d.ts +16 -0
  125. package/dist/connection-agents.d.ts.map +1 -0
  126. package/dist/connection-agents.js +68 -0
  127. package/dist/connection-agents.js.map +1 -0
  128. package/dist/consent-migration.d.ts +49 -0
  129. package/dist/consent-migration.d.ts.map +1 -0
  130. package/dist/consent-migration.js +128 -0
  131. package/dist/consent-migration.js.map +1 -0
  132. package/dist/consortium-bootstrap.d.ts +138 -0
  133. package/dist/consortium-bootstrap.d.ts.map +1 -0
  134. package/dist/consortium-bootstrap.js +339 -0
  135. package/dist/consortium-bootstrap.js.map +1 -0
  136. package/dist/consortium-fingerprint.d.ts +115 -0
  137. package/dist/consortium-fingerprint.d.ts.map +1 -0
  138. package/dist/consortium-fingerprint.js +175 -0
  139. package/dist/consortium-fingerprint.js.map +1 -0
  140. package/dist/contact-handlers.d.ts +59 -0
  141. package/dist/contact-handlers.d.ts.map +1 -0
  142. package/dist/contact-handlers.js +343 -0
  143. package/dist/contact-handlers.js.map +1 -0
  144. package/dist/contact-pubkey-case.d.ts +65 -0
  145. package/dist/contact-pubkey-case.d.ts.map +1 -0
  146. package/dist/contact-pubkey-case.js +136 -0
  147. package/dist/contact-pubkey-case.js.map +1 -0
  148. package/dist/contacts-tier-migration.d.ts +90 -0
  149. package/dist/contacts-tier-migration.d.ts.map +1 -0
  150. package/dist/contacts-tier-migration.js +150 -0
  151. package/dist/contacts-tier-migration.js.map +1 -0
  152. package/dist/content-encryption-status.d.ts +111 -0
  153. package/dist/content-encryption-status.d.ts.map +1 -0
  154. package/dist/content-encryption-status.js +158 -0
  155. package/dist/content-encryption-status.js.map +1 -0
  156. package/dist/content-park-client.d.ts +90 -0
  157. package/dist/content-park-client.d.ts.map +1 -0
  158. package/dist/content-park-client.js +362 -0
  159. package/dist/content-park-client.js.map +1 -0
  160. package/dist/content-park.d.ts +52 -0
  161. package/dist/content-park.d.ts.map +1 -0
  162. package/dist/content-park.js +1309 -0
  163. package/dist/content-park.js.map +1 -0
  164. package/dist/cross-node-negotiation.d.ts +44 -0
  165. package/dist/cross-node-negotiation.d.ts.map +1 -0
  166. package/dist/cross-node-negotiation.js +34 -0
  167. package/dist/cross-node-negotiation.js.map +1 -0
  168. package/dist/daemon-handle.d.ts +57 -0
  169. package/dist/daemon-handle.d.ts.map +1 -0
  170. package/dist/daemon-handle.js +2 -0
  171. package/dist/daemon-handle.js.map +1 -0
  172. package/dist/daemon-status-report.d.ts +50 -0
  173. package/dist/daemon-status-report.d.ts.map +1 -0
  174. package/dist/daemon-status-report.js +81 -0
  175. package/dist/daemon-status-report.js.map +1 -0
  176. package/dist/daemon.d.ts +45 -0
  177. package/dist/daemon.d.ts.map +1 -0
  178. package/dist/daemon.js +1177 -0
  179. package/dist/daemon.js.map +1 -0
  180. package/dist/db-identity-store.d.ts +159 -0
  181. package/dist/db-identity-store.d.ts.map +1 -0
  182. package/dist/db-identity-store.js +502 -0
  183. package/dist/db-identity-store.js.map +1 -0
  184. package/dist/delivery-open-registry.d.ts +92 -0
  185. package/dist/delivery-open-registry.d.ts.map +1 -0
  186. package/dist/delivery-open-registry.js +121 -0
  187. package/dist/delivery-open-registry.js.map +1 -0
  188. package/dist/delivery-session-suspects.d.ts +56 -0
  189. package/dist/delivery-session-suspects.d.ts.map +1 -0
  190. package/dist/delivery-session-suspects.js +94 -0
  191. package/dist/delivery-session-suspects.js.map +1 -0
  192. package/dist/directory-auth-posture.d.ts +87 -0
  193. package/dist/directory-auth-posture.d.ts.map +1 -0
  194. package/dist/directory-auth-posture.js +134 -0
  195. package/dist/directory-auth-posture.js.map +1 -0
  196. package/dist/directory-bootstrap.d.ts +310 -0
  197. package/dist/directory-bootstrap.d.ts.map +1 -0
  198. package/dist/directory-bootstrap.js +557 -0
  199. package/dist/directory-bootstrap.js.map +1 -0
  200. package/dist/directory-connect.d.ts +27 -0
  201. package/dist/directory-connect.d.ts.map +1 -0
  202. package/dist/directory-connect.js +106 -0
  203. package/dist/directory-connect.js.map +1 -0
  204. package/dist/disconnect-cleanup.d.ts +51 -0
  205. package/dist/disconnect-cleanup.d.ts.map +1 -0
  206. package/dist/disconnect-cleanup.js +72 -0
  207. package/dist/disconnect-cleanup.js.map +1 -0
  208. package/dist/document-amendment-store.d.ts +120 -0
  209. package/dist/document-amendment-store.d.ts.map +1 -0
  210. package/dist/document-amendment-store.js +266 -0
  211. package/dist/document-amendment-store.js.map +1 -0
  212. package/dist/document-delivery-transport.d.ts +168 -0
  213. package/dist/document-delivery-transport.d.ts.map +1 -0
  214. package/dist/document-delivery-transport.js +206 -0
  215. package/dist/document-delivery-transport.js.map +1 -0
  216. package/dist/document-engine.d.ts +134 -0
  217. package/dist/document-engine.d.ts.map +1 -0
  218. package/dist/document-engine.js +282 -0
  219. package/dist/document-engine.js.map +1 -0
  220. package/dist/document-flag.d.ts +58 -0
  221. package/dist/document-flag.d.ts.map +1 -0
  222. package/dist/document-flag.js +70 -0
  223. package/dist/document-flag.js.map +1 -0
  224. package/dist/document-frame-router.d.ts +245 -0
  225. package/dist/document-frame-router.d.ts.map +1 -0
  226. package/dist/document-frame-router.js +397 -0
  227. package/dist/document-frame-router.js.map +1 -0
  228. package/dist/document-gate-wiring.d.ts +61 -0
  229. package/dist/document-gate-wiring.d.ts.map +1 -0
  230. package/dist/document-gate-wiring.js +125 -0
  231. package/dist/document-gate-wiring.js.map +1 -0
  232. package/dist/document-gate.d.ts +149 -0
  233. package/dist/document-gate.d.ts.map +1 -0
  234. package/dist/document-gate.js +509 -0
  235. package/dist/document-gate.js.map +1 -0
  236. package/dist/document-handlers.d.ts +47 -0
  237. package/dist/document-handlers.d.ts.map +1 -0
  238. package/dist/document-handlers.js +2203 -0
  239. package/dist/document-handlers.js.map +1 -0
  240. package/dist/document-handshake.d.ts +176 -0
  241. package/dist/document-handshake.d.ts.map +1 -0
  242. package/dist/document-handshake.js +452 -0
  243. package/dist/document-handshake.js.map +1 -0
  244. package/dist/document-inbound.d.ts +162 -0
  245. package/dist/document-inbound.d.ts.map +1 -0
  246. package/dist/document-inbound.js +530 -0
  247. package/dist/document-inbound.js.map +1 -0
  248. package/dist/document-json.d.ts +120 -0
  249. package/dist/document-json.d.ts.map +1 -0
  250. package/dist/document-json.js +191 -0
  251. package/dist/document-json.js.map +1 -0
  252. package/dist/document-layer.d.ts +215 -0
  253. package/dist/document-layer.d.ts.map +1 -0
  254. package/dist/document-layer.js +1025 -0
  255. package/dist/document-layer.js.map +1 -0
  256. package/dist/document-lifecycle.d.ts +52 -0
  257. package/dist/document-lifecycle.d.ts.map +1 -0
  258. package/dist/document-lifecycle.js +134 -0
  259. package/dist/document-lifecycle.js.map +1 -0
  260. package/dist/document-live-docs.d.ts +58 -0
  261. package/dist/document-live-docs.d.ts.map +1 -0
  262. package/dist/document-live-docs.js +126 -0
  263. package/dist/document-live-docs.js.map +1 -0
  264. package/dist/document-notify.d.ts +228 -0
  265. package/dist/document-notify.d.ts.map +1 -0
  266. package/dist/document-notify.js +580 -0
  267. package/dist/document-notify.js.map +1 -0
  268. package/dist/document-profile.d.ts +61 -0
  269. package/dist/document-profile.d.ts.map +1 -0
  270. package/dist/document-profile.js +112 -0
  271. package/dist/document-profile.js.map +1 -0
  272. package/dist/document-publish.d.ts +87 -0
  273. package/dist/document-publish.d.ts.map +1 -0
  274. package/dist/document-publish.js +173 -0
  275. package/dist/document-publish.js.map +1 -0
  276. package/dist/document-reachability.d.ts +42 -0
  277. package/dist/document-reachability.d.ts.map +1 -0
  278. package/dist/document-reachability.js +80 -0
  279. package/dist/document-reachability.js.map +1 -0
  280. package/dist/document-reconcile-engine.d.ts +66 -0
  281. package/dist/document-reconcile-engine.d.ts.map +1 -0
  282. package/dist/document-reconcile-engine.js +225 -0
  283. package/dist/document-reconcile-engine.js.map +1 -0
  284. package/dist/document-reconcile-scheduler.d.ts +163 -0
  285. package/dist/document-reconcile-scheduler.d.ts.map +1 -0
  286. package/dist/document-reconcile-scheduler.js +303 -0
  287. package/dist/document-reconcile-scheduler.js.map +1 -0
  288. package/dist/document-rejection.d.ts +251 -0
  289. package/dist/document-rejection.d.ts.map +1 -0
  290. package/dist/document-rejection.js +435 -0
  291. package/dist/document-rejection.js.map +1 -0
  292. package/dist/document-screen.d.ts +114 -0
  293. package/dist/document-screen.d.ts.map +1 -0
  294. package/dist/document-screen.js +223 -0
  295. package/dist/document-screen.js.map +1 -0
  296. package/dist/document-store.d.ts +372 -0
  297. package/dist/document-store.d.ts.map +1 -0
  298. package/dist/document-store.js +931 -0
  299. package/dist/document-store.js.map +1 -0
  300. package/dist/document-surface.d.ts +32 -0
  301. package/dist/document-surface.d.ts.map +1 -0
  302. package/dist/document-surface.js +151 -0
  303. package/dist/document-surface.js.map +1 -0
  304. package/dist/document-types.d.ts +94 -0
  305. package/dist/document-types.d.ts.map +1 -0
  306. package/dist/document-types.js +90 -0
  307. package/dist/document-types.js.map +1 -0
  308. package/dist/document-watch.d.ts +69 -0
  309. package/dist/document-watch.d.ts.map +1 -0
  310. package/dist/document-watch.js +108 -0
  311. package/dist/document-watch.js.map +1 -0
  312. package/dist/document-wiring.d.ts +53 -0
  313. package/dist/document-wiring.d.ts.map +1 -0
  314. package/dist/document-wiring.js +323 -0
  315. package/dist/document-wiring.js.map +1 -0
  316. package/dist/document-write-guard.d.ts +66 -0
  317. package/dist/document-write-guard.d.ts.map +1 -0
  318. package/dist/document-write-guard.js +98 -0
  319. package/dist/document-write-guard.js.map +1 -0
  320. package/dist/document-write-path.d.ts +94 -0
  321. package/dist/document-write-path.d.ts.map +1 -0
  322. package/dist/document-write-path.js +530 -0
  323. package/dist/document-write-path.js.map +1 -0
  324. package/dist/error-message.d.ts +7 -0
  325. package/dist/error-message.d.ts.map +1 -0
  326. package/dist/error-message.js +19 -0
  327. package/dist/error-message.js.map +1 -0
  328. package/dist/file-manifest-provider.d.ts +37 -0
  329. package/dist/file-manifest-provider.d.ts.map +1 -0
  330. package/dist/file-manifest-provider.js +105 -0
  331. package/dist/file-manifest-provider.js.map +1 -0
  332. package/dist/frame-values.d.ts +3 -0
  333. package/dist/frame-values.d.ts.map +1 -0
  334. package/dist/frame-values.js +84 -0
  335. package/dist/frame-values.js.map +1 -0
  336. package/dist/frontier-mismatch.d.ts +73 -0
  337. package/dist/frontier-mismatch.d.ts.map +1 -0
  338. package/dist/frontier-mismatch.js +89 -0
  339. package/dist/frontier-mismatch.js.map +1 -0
  340. package/dist/gateway-config-handlers.d.ts +26 -0
  341. package/dist/gateway-config-handlers.d.ts.map +1 -0
  342. package/dist/gateway-config-handlers.js +454 -0
  343. package/dist/gateway-config-handlers.js.map +1 -0
  344. package/dist/held-content.d.ts +145 -0
  345. package/dist/held-content.d.ts.map +1 -0
  346. package/dist/held-content.js +389 -0
  347. package/dist/held-content.js.map +1 -0
  348. package/dist/http-manifest-poll.d.ts +67 -0
  349. package/dist/http-manifest-poll.d.ts.map +1 -0
  350. package/dist/http-manifest-poll.js +150 -0
  351. package/dist/http-manifest-poll.js.map +1 -0
  352. package/dist/identity-migration.d.ts +40 -0
  353. package/dist/identity-migration.d.ts.map +1 -0
  354. package/dist/identity-migration.js +461 -0
  355. package/dist/identity-migration.js.map +1 -0
  356. package/dist/inbound-refusals.d.ts +283 -0
  357. package/dist/inbound-refusals.d.ts.map +1 -0
  358. package/dist/inbound-refusals.js +919 -0
  359. package/dist/inbound-refusals.js.map +1 -0
  360. package/dist/inbound-seal-request.d.ts +32 -0
  361. package/dist/inbound-seal-request.d.ts.map +1 -0
  362. package/dist/inbound-seal-request.js +228 -0
  363. package/dist/inbound-seal-request.js.map +1 -0
  364. package/dist/inbound-sessions.d.ts +291 -0
  365. package/dist/inbound-sessions.d.ts.map +1 -0
  366. package/dist/inbound-sessions.js +1609 -0
  367. package/dist/inbound-sessions.js.map +1 -0
  368. package/dist/inclusion-proof-handlers.d.ts +43 -0
  369. package/dist/inclusion-proof-handlers.d.ts.map +1 -0
  370. package/dist/inclusion-proof-handlers.js +565 -0
  371. package/dist/inclusion-proof-handlers.js.map +1 -0
  372. package/dist/inclusion-proof.d.ts +151 -0
  373. package/dist/inclusion-proof.d.ts.map +1 -0
  374. package/dist/inclusion-proof.js +228 -0
  375. package/dist/inclusion-proof.js.map +1 -0
  376. package/dist/index.d.ts +32 -0
  377. package/dist/index.d.ts.map +1 -0
  378. package/dist/index.js.map +1 -0
  379. package/dist/initiate-session-handler.d.ts +55 -0
  380. package/dist/initiate-session-handler.d.ts.map +1 -0
  381. package/dist/initiate-session-handler.js +310 -0
  382. package/dist/initiate-session-handler.js.map +1 -0
  383. package/dist/ipc-client.d.ts +31 -0
  384. package/dist/ipc-client.d.ts.map +1 -0
  385. package/dist/ipc-client.js +113 -0
  386. package/dist/ipc-client.js.map +1 -0
  387. package/dist/ipc-server.d.ts +63 -0
  388. package/dist/ipc-server.d.ts.map +1 -0
  389. package/dist/ipc-server.js +429 -0
  390. package/dist/ipc-server.js.map +1 -0
  391. package/dist/ipc-surface.d.ts +44 -0
  392. package/dist/ipc-surface.d.ts.map +1 -0
  393. package/dist/ipc-surface.js +107 -0
  394. package/dist/ipc-surface.js.map +1 -0
  395. package/dist/line-lcs.d.ts +51 -0
  396. package/dist/line-lcs.d.ts.map +1 -0
  397. package/dist/line-lcs.js +71 -0
  398. package/dist/line-lcs.js.map +1 -0
  399. package/dist/lock-file.d.ts +39 -0
  400. package/dist/lock-file.d.ts.map +1 -0
  401. package/dist/lock-file.js +120 -0
  402. package/dist/lock-file.js.map +1 -0
  403. package/dist/log-collapse.d.ts +66 -0
  404. package/dist/log-collapse.d.ts.map +1 -0
  405. package/dist/log-collapse.js +244 -0
  406. package/dist/log-collapse.js.map +1 -0
  407. package/dist/log-rotate.d.ts +67 -0
  408. package/dist/log-rotate.d.ts.map +1 -0
  409. package/dist/log-rotate.js +134 -0
  410. package/dist/log-rotate.js.map +1 -0
  411. package/dist/manifest-deps.d.ts +25 -0
  412. package/dist/manifest-deps.d.ts.map +1 -0
  413. package/dist/manifest-deps.js +151 -0
  414. package/dist/manifest-deps.js.map +1 -0
  415. package/dist/manifest-poll-scheduler.d.ts +31 -0
  416. package/dist/manifest-poll-scheduler.d.ts.map +1 -0
  417. package/dist/manifest-poll-scheduler.js +59 -0
  418. package/dist/manifest-poll-scheduler.js.map +1 -0
  419. package/dist/manifest-validity.d.ts +153 -0
  420. package/dist/manifest-validity.d.ts.map +1 -0
  421. package/dist/manifest-validity.js +268 -0
  422. package/dist/manifest-validity.js.map +1 -0
  423. package/dist/manifest-version-store-db.d.ts +24 -0
  424. package/dist/manifest-version-store-db.d.ts.map +1 -0
  425. package/dist/manifest-version-store-db.js +58 -0
  426. package/dist/manifest-version-store-db.js.map +1 -0
  427. package/dist/manifest-version-store.d.ts +16 -0
  428. package/dist/manifest-version-store.d.ts.map +1 -0
  429. package/dist/manifest-version-store.js +15 -0
  430. package/dist/manifest-version-store.js.map +1 -0
  431. package/dist/network-directory-node.d.ts +136 -0
  432. package/dist/network-directory-node.d.ts.map +1 -0
  433. package/dist/network-directory-node.js +810 -0
  434. package/dist/network-directory-node.js.map +1 -0
  435. package/dist/nonce-dedup.d.ts +68 -0
  436. package/dist/nonce-dedup.d.ts.map +1 -0
  437. package/dist/nonce-dedup.js +205 -0
  438. package/dist/nonce-dedup.js.map +1 -0
  439. package/dist/notification-dispatcher.d.ts +92 -0
  440. package/dist/notification-dispatcher.d.ts.map +1 -0
  441. package/dist/notification-dispatcher.js +210 -0
  442. package/dist/notification-dispatcher.js.map +1 -0
  443. package/dist/notification-handlers.d.ts +53 -0
  444. package/dist/notification-handlers.d.ts.map +1 -0
  445. package/dist/notification-handlers.js +461 -0
  446. package/dist/notification-handlers.js.map +1 -0
  447. package/dist/onboarding-guidance.d.ts +79 -0
  448. package/dist/onboarding-guidance.d.ts.map +1 -0
  449. package/dist/onboarding-guidance.js +95 -0
  450. package/dist/onboarding-guidance.js.map +1 -0
  451. package/dist/operator-guidance.d.ts +25 -0
  452. package/dist/operator-guidance.d.ts.map +1 -0
  453. package/dist/operator-guidance.js +50 -0
  454. package/dist/operator-guidance.js.map +1 -0
  455. package/dist/orphan-triage.d.ts +130 -0
  456. package/dist/orphan-triage.d.ts.map +1 -0
  457. package/dist/orphan-triage.js +207 -0
  458. package/dist/orphan-triage.js.map +1 -0
  459. package/dist/outbound-sessions.d.ts +126 -0
  460. package/dist/outbound-sessions.d.ts.map +1 -0
  461. package/dist/outbound-sessions.js +1052 -0
  462. package/dist/outbound-sessions.js.map +1 -0
  463. package/dist/park-envelope.d.ts +329 -0
  464. package/dist/park-envelope.d.ts.map +1 -0
  465. package/dist/park-envelope.js +509 -0
  466. package/dist/park-envelope.js.map +1 -0
  467. package/dist/park-recovery.d.ts +273 -0
  468. package/dist/park-recovery.d.ts.map +1 -0
  469. package/dist/park-recovery.js +717 -0
  470. package/dist/park-recovery.js.map +1 -0
  471. package/dist/park-refusals.d.ts +147 -0
  472. package/dist/park-refusals.d.ts.map +1 -0
  473. package/dist/park-refusals.js +331 -0
  474. package/dist/park-refusals.js.map +1 -0
  475. package/dist/quarantine-framing.d.ts +92 -0
  476. package/dist/quarantine-framing.d.ts.map +1 -0
  477. package/dist/quarantine-framing.js +111 -0
  478. package/dist/quarantine-framing.js.map +1 -0
  479. package/dist/reconnect-drain.d.ts +22 -0
  480. package/dist/reconnect-drain.d.ts.map +1 -0
  481. package/dist/reconnect-drain.js +65 -0
  482. package/dist/reconnect-drain.js.map +1 -0
  483. package/dist/recovered-position.d.ts +14 -0
  484. package/dist/recovered-position.d.ts.map +1 -0
  485. package/dist/recovered-position.js +59 -0
  486. package/dist/recovered-position.js.map +1 -0
  487. package/dist/refusal-notices.d.ts +196 -0
  488. package/dist/refusal-notices.d.ts.map +1 -0
  489. package/dist/refusal-notices.js +516 -0
  490. package/dist/refusal-notices.js.map +1 -0
  491. package/dist/refusal-reasons.d.ts +245 -0
  492. package/dist/refusal-reasons.d.ts.map +1 -0
  493. package/dist/refusal-reasons.js +363 -0
  494. package/dist/refusal-reasons.js.map +1 -0
  495. package/dist/register-handler.d.ts +36 -0
  496. package/dist/register-handler.d.ts.map +1 -0
  497. package/dist/register-handler.js +285 -0
  498. package/dist/register-handler.js.map +1 -0
  499. package/dist/registration-context.d.ts +72 -0
  500. package/dist/registration-context.d.ts.map +1 -0
  501. package/dist/registration-context.js +126 -0
  502. package/dist/registration-context.js.map +1 -0
  503. package/dist/registration-manager.d.ts +94 -0
  504. package/dist/registration-manager.d.ts.map +1 -0
  505. package/dist/registration-manager.js +585 -0
  506. package/dist/registration-manager.js.map +1 -0
  507. package/dist/registration-persistence.d.ts +183 -0
  508. package/dist/registration-persistence.d.ts.map +1 -0
  509. package/dist/registration-persistence.js +263 -0
  510. package/dist/registration-persistence.js.map +1 -0
  511. package/dist/registry-poll.d.ts +52 -0
  512. package/dist/registry-poll.d.ts.map +1 -0
  513. package/dist/registry-poll.js +140 -0
  514. package/dist/registry-poll.js.map +1 -0
  515. package/dist/registry-version-store-db.d.ts +22 -0
  516. package/dist/registry-version-store-db.d.ts.map +1 -0
  517. package/dist/registry-version-store-db.js +50 -0
  518. package/dist/registry-version-store-db.js.map +1 -0
  519. package/dist/relay-endpoints.d.ts +18 -0
  520. package/dist/relay-endpoints.d.ts.map +1 -0
  521. package/dist/relay-endpoints.js +9 -0
  522. package/dist/relay-endpoints.js.map +1 -0
  523. package/dist/relay-only.d.ts +140 -0
  524. package/dist/relay-only.d.ts.map +1 -0
  525. package/dist/relay-only.js +193 -0
  526. package/dist/relay-only.js.map +1 -0
  527. package/dist/relay-receipt-store.d.ts +155 -0
  528. package/dist/relay-receipt-store.d.ts.map +1 -0
  529. package/dist/relay-receipt-store.js +284 -0
  530. package/dist/relay-receipt-store.js.map +1 -0
  531. package/dist/relay-reconnect.d.ts +32 -0
  532. package/dist/relay-reconnect.d.ts.map +1 -0
  533. package/dist/relay-reconnect.js +29 -0
  534. package/dist/relay-reconnect.js.map +1 -0
  535. package/dist/reply-lag.d.ts +11 -0
  536. package/dist/reply-lag.d.ts.map +1 -0
  537. package/dist/reply-lag.js +46 -0
  538. package/dist/reply-lag.js.map +1 -0
  539. package/dist/resolve-named-agent.d.ts +49 -0
  540. package/dist/resolve-named-agent.d.ts.map +1 -0
  541. package/dist/resolve-named-agent.js +77 -0
  542. package/dist/resolve-named-agent.js.map +1 -0
  543. package/dist/restart-seal-resolver.d.ts +110 -0
  544. package/dist/restart-seal-resolver.d.ts.map +1 -0
  545. package/dist/restart-seal-resolver.js +353 -0
  546. package/dist/restart-seal-resolver.js.map +1 -0
  547. package/dist/resume-last-seen.d.ts +15 -0
  548. package/dist/resume-last-seen.d.ts.map +1 -0
  549. package/dist/resume-last-seen.js +44 -0
  550. package/dist/resume-last-seen.js.map +1 -0
  551. package/dist/retry-queue.d.ts +203 -0
  552. package/dist/retry-queue.d.ts.map +1 -0
  553. package/dist/retry-queue.js +701 -0
  554. package/dist/retry-queue.js.map +1 -0
  555. package/dist/roster-freshness.d.ts +160 -0
  556. package/dist/roster-freshness.d.ts.map +1 -0
  557. package/dist/roster-freshness.js +250 -0
  558. package/dist/roster-freshness.js.map +1 -0
  559. package/dist/screening-status.d.ts +15 -0
  560. package/dist/screening-status.d.ts.map +1 -0
  561. package/dist/screening-status.js +65 -0
  562. package/dist/screening-status.js.map +1 -0
  563. package/dist/seal-carried-close.d.ts +37 -0
  564. package/dist/seal-carried-close.d.ts.map +1 -0
  565. package/dist/seal-carried-close.js +179 -0
  566. package/dist/seal-carried-close.js.map +1 -0
  567. package/dist/seal-certificate-pull.d.ts +79 -0
  568. package/dist/seal-certificate-pull.d.ts.map +1 -0
  569. package/dist/seal-certificate-pull.js +186 -0
  570. package/dist/seal-certificate-pull.js.map +1 -0
  571. package/dist/seal-certified-root-check.d.ts +37 -0
  572. package/dist/seal-certified-root-check.d.ts.map +1 -0
  573. package/dist/seal-certified-root-check.js +127 -0
  574. package/dist/seal-certified-root-check.js.map +1 -0
  575. package/dist/seal-coordinator.d.ts +118 -0
  576. package/dist/seal-coordinator.d.ts.map +1 -0
  577. package/dist/seal-coordinator.js +927 -0
  578. package/dist/seal-coordinator.js.map +1 -0
  579. package/dist/seal-escalation.d.ts +80 -0
  580. package/dist/seal-escalation.d.ts.map +1 -0
  581. package/dist/seal-escalation.js +283 -0
  582. package/dist/seal-escalation.js.map +1 -0
  583. package/dist/seal-evidence-root-check.d.ts +70 -0
  584. package/dist/seal-evidence-root-check.d.ts.map +1 -0
  585. package/dist/seal-evidence-root-check.js +199 -0
  586. package/dist/seal-evidence-root-check.js.map +1 -0
  587. package/dist/seal-failure-store.d.ts +139 -0
  588. package/dist/seal-failure-store.d.ts.map +1 -0
  589. package/dist/seal-failure-store.js +207 -0
  590. package/dist/seal-failure-store.js.map +1 -0
  591. package/dist/seal-flows.d.ts +107 -0
  592. package/dist/seal-flows.d.ts.map +1 -0
  593. package/dist/seal-flows.js +638 -0
  594. package/dist/seal-flows.js.map +1 -0
  595. package/dist/seal-frontier-verify.d.ts +103 -0
  596. package/dist/seal-frontier-verify.d.ts.map +1 -0
  597. package/dist/seal-frontier-verify.js +143 -0
  598. package/dist/seal-frontier-verify.js.map +1 -0
  599. package/dist/seal-leaf.d.ts +58 -0
  600. package/dist/seal-leaf.d.ts.map +1 -0
  601. package/dist/seal-leaf.js +112 -0
  602. package/dist/seal-leaf.js.map +1 -0
  603. package/dist/seal-legibility-tbs.d.ts +25 -0
  604. package/dist/seal-legibility-tbs.d.ts.map +1 -0
  605. package/dist/seal-legibility-tbs.js +77 -0
  606. package/dist/seal-legibility-tbs.js.map +1 -0
  607. package/dist/seal-local-terminus.d.ts +41 -0
  608. package/dist/seal-local-terminus.d.ts.map +1 -0
  609. package/dist/seal-local-terminus.js +170 -0
  610. package/dist/seal-local-terminus.js.map +1 -0
  611. package/dist/seal-receipt-upgrade.d.ts +30 -0
  612. package/dist/seal-receipt-upgrade.d.ts.map +1 -0
  613. package/dist/seal-receipt-upgrade.js +49 -0
  614. package/dist/seal-receipt-upgrade.js.map +1 -0
  615. package/dist/seal-relay-silence.d.ts +51 -0
  616. package/dist/seal-relay-silence.d.ts.map +1 -0
  617. package/dist/seal-relay-silence.js +76 -0
  618. package/dist/seal-relay-silence.js.map +1 -0
  619. package/dist/seal-settle.d.ts +38 -0
  620. package/dist/seal-settle.d.ts.map +1 -0
  621. package/dist/seal-settle.js +33 -0
  622. package/dist/seal-settle.js.map +1 -0
  623. package/dist/seal-upgrade.d.ts +107 -0
  624. package/dist/seal-upgrade.d.ts.map +1 -0
  625. package/dist/seal-upgrade.js +200 -0
  626. package/dist/seal-upgrade.js.map +1 -0
  627. package/dist/sealed-conversation.d.ts +36 -0
  628. package/dist/sealed-conversation.d.ts.map +1 -0
  629. package/dist/sealed-conversation.js +171 -0
  630. package/dist/sealed-conversation.js.map +1 -0
  631. package/dist/sealed-leaf-set.d.ts +92 -0
  632. package/dist/sealed-leaf-set.d.ts.map +1 -0
  633. package/dist/sealed-leaf-set.js +122 -0
  634. package/dist/sealed-leaf-set.js.map +1 -0
  635. package/dist/send-claims.d.ts +56 -0
  636. package/dist/send-claims.d.ts.map +1 -0
  637. package/dist/send-claims.js +50 -0
  638. package/dist/send-claims.js.map +1 -0
  639. package/dist/session-assignment-parser.d.ts +104 -0
  640. package/dist/session-assignment-parser.d.ts.map +1 -0
  641. package/dist/session-assignment-parser.js +345 -0
  642. package/dist/session-assignment-parser.js.map +1 -0
  643. package/dist/session-category.d.ts +19 -0
  644. package/dist/session-category.d.ts.map +1 -0
  645. package/dist/session-category.js +14 -0
  646. package/dist/session-category.js.map +1 -0
  647. package/dist/session-ceremony.d.ts +297 -0
  648. package/dist/session-ceremony.d.ts.map +1 -0
  649. package/dist/session-ceremony.js +964 -0
  650. package/dist/session-ceremony.js.map +1 -0
  651. package/dist/session-closed.d.ts +79 -0
  652. package/dist/session-closed.d.ts.map +1 -0
  653. package/dist/session-closed.js +189 -0
  654. package/dist/session-closed.js.map +1 -0
  655. package/dist/session-connection-gater.d.ts +148 -0
  656. package/dist/session-connection-gater.d.ts.map +1 -0
  657. package/dist/session-connection-gater.js +332 -0
  658. package/dist/session-connection-gater.js.map +1 -0
  659. package/dist/session-content-context.d.ts +162 -0
  660. package/dist/session-content-context.d.ts.map +1 -0
  661. package/dist/session-content-context.js +2 -0
  662. package/dist/session-content-context.js.map +1 -0
  663. package/dist/session-content-handlers.d.ts +82 -0
  664. package/dist/session-content-handlers.d.ts.map +1 -0
  665. package/dist/session-content-handlers.js +1382 -0
  666. package/dist/session-content-handlers.js.map +1 -0
  667. package/dist/session-content-ingest.d.ts +206 -0
  668. package/dist/session-content-ingest.d.ts.map +1 -0
  669. package/dist/session-content-ingest.js +2167 -0
  670. package/dist/session-content-ingest.js.map +1 -0
  671. package/dist/session-content-send.d.ts +191 -0
  672. package/dist/session-content-send.d.ts.map +1 -0
  673. package/dist/session-content-send.js +1360 -0
  674. package/dist/session-content-send.js.map +1 -0
  675. package/dist/session-delivery-acks.d.ts +169 -0
  676. package/dist/session-delivery-acks.d.ts.map +1 -0
  677. package/dist/session-delivery-acks.js +569 -0
  678. package/dist/session-delivery-acks.js.map +1 -0
  679. package/dist/session-ephemerals.d.ts +279 -0
  680. package/dist/session-ephemerals.d.ts.map +1 -0
  681. package/dist/session-ephemerals.js +591 -0
  682. package/dist/session-ephemerals.js.map +1 -0
  683. package/dist/session-leaf-records.d.ts +159 -0
  684. package/dist/session-leaf-records.d.ts.map +1 -0
  685. package/dist/session-leaf-records.js +408 -0
  686. package/dist/session-leaf-records.js.map +1 -0
  687. package/dist/session-lifecycle.d.ts +303 -0
  688. package/dist/session-lifecycle.d.ts.map +1 -0
  689. package/dist/session-lifecycle.js +1679 -0
  690. package/dist/session-lifecycle.js.map +1 -0
  691. package/dist/session-liveness.d.ts +135 -0
  692. package/dist/session-liveness.d.ts.map +1 -0
  693. package/dist/session-liveness.js +347 -0
  694. package/dist/session-liveness.js.map +1 -0
  695. package/dist/session-name.d.ts +35 -0
  696. package/dist/session-name.d.ts.map +1 -0
  697. package/dist/session-name.js +60 -0
  698. package/dist/session-name.js.map +1 -0
  699. package/dist/session-node-factory.d.ts +18 -0
  700. package/dist/session-node-factory.d.ts.map +1 -0
  701. package/dist/session-node-factory.js +182 -0
  702. package/dist/session-node-factory.js.map +1 -0
  703. package/dist/session-node-manager.d.ts +877 -0
  704. package/dist/session-node-manager.d.ts.map +1 -0
  705. package/dist/session-node-manager.js +2998 -0
  706. package/dist/session-node-manager.js.map +1 -0
  707. package/dist/session-node-types.d.ts +1057 -0
  708. package/dist/session-node-types.d.ts.map +1 -0
  709. package/dist/session-node-types.js +657 -0
  710. package/dist/session-node-types.js.map +1 -0
  711. package/dist/session-notify.d.ts +46 -0
  712. package/dist/session-notify.d.ts.map +1 -0
  713. package/dist/session-notify.js +116 -0
  714. package/dist/session-notify.js.map +1 -0
  715. package/dist/session-own-chain-store.d.ts +65 -0
  716. package/dist/session-own-chain-store.d.ts.map +1 -0
  717. package/dist/session-own-chain-store.js +75 -0
  718. package/dist/session-own-chain-store.js.map +1 -0
  719. package/dist/session-queries.d.ts +476 -0
  720. package/dist/session-queries.d.ts.map +1 -0
  721. package/dist/session-queries.js +1007 -0
  722. package/dist/session-queries.js.map +1 -0
  723. package/dist/session-read-handlers.d.ts +87 -0
  724. package/dist/session-read-handlers.d.ts.map +1 -0
  725. package/dist/session-read-handlers.js +689 -0
  726. package/dist/session-read-handlers.js.map +1 -0
  727. package/dist/session-records.d.ts +341 -0
  728. package/dist/session-records.d.ts.map +1 -0
  729. package/dist/session-records.js +858 -0
  730. package/dist/session-records.js.map +1 -0
  731. package/dist/session-relay-client.d.ts +659 -0
  732. package/dist/session-relay-client.d.ts.map +1 -0
  733. package/dist/session-relay-client.js +2876 -0
  734. package/dist/session-relay-client.js.map +1 -0
  735. package/dist/session-relay.d.ts +397 -0
  736. package/dist/session-relay.d.ts.map +1 -0
  737. package/dist/session-relay.js +1636 -0
  738. package/dist/session-relay.js.map +1 -0
  739. package/dist/session-salt-agreement.d.ts +331 -0
  740. package/dist/session-salt-agreement.d.ts.map +1 -0
  741. package/dist/session-salt-agreement.js +472 -0
  742. package/dist/session-salt-agreement.js.map +1 -0
  743. package/dist/session-salts.d.ts +432 -0
  744. package/dist/session-salts.d.ts.map +1 -0
  745. package/dist/session-salts.js +1540 -0
  746. package/dist/session-salts.js.map +1 -0
  747. package/dist/session-schema.d.ts +30 -0
  748. package/dist/session-schema.d.ts.map +1 -0
  749. package/dist/session-schema.js +877 -0
  750. package/dist/session-schema.js.map +1 -0
  751. package/dist/session-seal-leaf-store.d.ts +70 -0
  752. package/dist/session-seal-leaf-store.d.ts.map +1 -0
  753. package/dist/session-seal-leaf-store.js +105 -0
  754. package/dist/session-seal-leaf-store.js.map +1 -0
  755. package/dist/session-seal.d.ts +334 -0
  756. package/dist/session-seal.d.ts.map +1 -0
  757. package/dist/session-seal.js +1017 -0
  758. package/dist/session-seal.js.map +1 -0
  759. package/dist/session-terminal-refusal.d.ts +65 -0
  760. package/dist/session-terminal-refusal.d.ts.map +1 -0
  761. package/dist/session-terminal-refusal.js +87 -0
  762. package/dist/session-terminal-refusal.js.map +1 -0
  763. package/dist/session-tree.d.ts +110 -0
  764. package/dist/session-tree.d.ts.map +1 -0
  765. package/dist/session-tree.js +144 -0
  766. package/dist/session-tree.js.map +1 -0
  767. package/dist/session-views.d.ts +47 -0
  768. package/dist/session-views.d.ts.map +1 -0
  769. package/dist/session-views.js +278 -0
  770. package/dist/session-views.js.map +1 -0
  771. package/dist/signal-handlers.d.ts +63 -0
  772. package/dist/signal-handlers.d.ts.map +1 -0
  773. package/dist/signal-handlers.js +980 -0
  774. package/dist/signal-handlers.js.map +1 -0
  775. package/dist/signal-requirement-policy.d.ts +51 -0
  776. package/dist/signal-requirement-policy.d.ts.map +1 -0
  777. package/dist/signal-requirement-policy.js +89 -0
  778. package/dist/signal-requirement-policy.js.map +1 -0
  779. package/dist/signal-revocability.d.ts +49 -0
  780. package/dist/signal-revocability.d.ts.map +1 -0
  781. package/dist/signal-revocability.js +93 -0
  782. package/dist/signal-revocability.js.map +1 -0
  783. package/dist/signal-submission.d.ts +181 -0
  784. package/dist/signal-submission.d.ts.map +1 -0
  785. package/dist/signal-submission.js +368 -0
  786. package/dist/signal-submission.js.map +1 -0
  787. package/dist/signaling-connect.d.ts +118 -0
  788. package/dist/signaling-connect.d.ts.map +1 -0
  789. package/dist/signaling-connect.js +538 -0
  790. package/dist/signaling-connect.js.map +1 -0
  791. package/dist/signaling-wiring.d.ts +105 -0
  792. package/dist/signaling-wiring.d.ts.map +1 -0
  793. package/dist/signaling-wiring.js +393 -0
  794. package/dist/signaling-wiring.js.map +1 -0
  795. package/dist/singleton-lock.d.ts +85 -0
  796. package/dist/singleton-lock.d.ts.map +1 -0
  797. package/dist/singleton-lock.js +219 -0
  798. package/dist/singleton-lock.js.map +1 -0
  799. package/dist/sqlcipher-db.d.ts +139 -0
  800. package/dist/sqlcipher-db.d.ts.map +1 -0
  801. package/dist/sqlcipher-db.js +357 -0
  802. package/dist/sqlcipher-db.js.map +1 -0
  803. package/dist/standing-receivers.d.ts +319 -0
  804. package/dist/standing-receivers.d.ts.map +1 -0
  805. package/dist/standing-receivers.js +1295 -0
  806. package/dist/standing-receivers.js.map +1 -0
  807. package/dist/start-agent.d.ts +64 -0
  808. package/dist/start-agent.d.ts.map +1 -0
  809. package/dist/start-agent.js +136 -0
  810. package/dist/start-agent.js.map +1 -0
  811. package/dist/status-handler.d.ts +54 -0
  812. package/dist/status-handler.d.ts.map +1 -0
  813. package/dist/status-handler.js +61 -0
  814. package/dist/status-handler.js.map +1 -0
  815. package/dist/submission-retry.d.ts +208 -0
  816. package/dist/submission-retry.d.ts.map +1 -0
  817. package/dist/submission-retry.js +506 -0
  818. package/dist/submission-retry.js.map +1 -0
  819. package/dist/telegram-bot-client.d.ts +34 -0
  820. package/dist/telegram-bot-client.d.ts.map +1 -0
  821. package/dist/telegram-bot-client.js +36 -0
  822. package/dist/telegram-bot-client.js.map +1 -0
  823. package/dist/telegram-doorbell.d.ts +38 -0
  824. package/dist/telegram-doorbell.d.ts.map +1 -0
  825. package/dist/telegram-doorbell.js +140 -0
  826. package/dist/telegram-doorbell.js.map +1 -0
  827. package/dist/test-handlers.d.ts +62 -0
  828. package/dist/test-handlers.d.ts.map +1 -0
  829. package/dist/test-handlers.js +240 -0
  830. package/dist/test-handlers.js.map +1 -0
  831. package/dist/testing.d.ts +10 -0
  832. package/dist/testing.d.ts.map +1 -0
  833. package/dist/testing.js +10 -0
  834. package/dist/testing.js.map +1 -0
  835. package/dist/transport-composition.d.ts +31 -0
  836. package/dist/transport-composition.d.ts.map +1 -0
  837. package/dist/transport-composition.js +55 -0
  838. package/dist/transport-composition.js.map +1 -0
  839. package/dist/transport-selector.d.ts +202 -0
  840. package/dist/transport-selector.d.ts.map +1 -0
  841. package/dist/transport-selector.js +196 -0
  842. package/dist/transport-selector.js.map +1 -0
  843. package/dist/trust-signal-pickup-listener.d.ts +43 -0
  844. package/dist/trust-signal-pickup-listener.d.ts.map +1 -0
  845. package/dist/trust-signal-pickup-listener.js +48 -0
  846. package/dist/trust-signal-pickup-listener.js.map +1 -0
  847. package/dist/trust-signal-store.d.ts +406 -0
  848. package/dist/trust-signal-store.d.ts.map +1 -0
  849. package/dist/trust-signal-store.js +939 -0
  850. package/dist/trust-signal-store.js.map +1 -0
  851. package/dist/trust-signal-sweep-tick.d.ts +60 -0
  852. package/dist/trust-signal-sweep-tick.d.ts.map +1 -0
  853. package/dist/trust-signal-sweep-tick.js +101 -0
  854. package/dist/trust-signal-sweep-tick.js.map +1 -0
  855. package/dist/trust-signal-sweep.d.ts +94 -0
  856. package/dist/trust-signal-sweep.d.ts.map +1 -0
  857. package/dist/trust-signal-sweep.js +147 -0
  858. package/dist/trust-signal-sweep.js.map +1 -0
  859. package/dist/type-registry.d.ts +42 -0
  860. package/dist/type-registry.d.ts.map +1 -0
  861. package/dist/type-registry.js +37 -0
  862. package/dist/type-registry.js.map +1 -0
  863. package/dist/types.d.ts +746 -0
  864. package/dist/types.d.ts.map +1 -0
  865. package/dist/types.js +20 -0
  866. package/dist/types.js.map +1 -0
  867. package/dist/unresolved-nodes-report.d.ts +14 -0
  868. package/dist/unresolved-nodes-report.d.ts.map +1 -0
  869. package/dist/unresolved-nodes-report.js +96 -0
  870. package/dist/unresolved-nodes-report.js.map +1 -0
  871. package/dist/vocabulary.d.ts +150 -0
  872. package/dist/vocabulary.d.ts.map +1 -0
  873. package/dist/vocabulary.js +386 -0
  874. package/dist/vocabulary.js.map +1 -0
  875. package/dist/who-label.d.ts +28 -0
  876. package/dist/who-label.d.ts.map +1 -0
  877. package/dist/who-label.js +31 -0
  878. package/dist/who-label.js.map +1 -0
  879. package/dist/who-resolver.d.ts +15 -0
  880. package/dist/who-resolver.d.ts.map +1 -0
  881. package/dist/who-resolver.js +47 -0
  882. package/dist/who-resolver.js.map +1 -0
  883. package/dist/wire-content-hash.d.ts +93 -0
  884. package/dist/wire-content-hash.d.ts.map +1 -0
  885. package/dist/wire-content-hash.js +116 -0
  886. package/dist/wire-content-hash.js.map +1 -0
  887. package/dist/withheld-content.d.ts +13 -0
  888. package/dist/withheld-content.d.ts.map +1 -0
  889. package/dist/withheld-content.js +46 -0
  890. package/dist/withheld-content.js.map +1 -0
  891. package/dist/witness-alerts.d.ts +40 -0
  892. package/dist/witness-alerts.d.ts.map +1 -0
  893. package/dist/witness-alerts.js +102 -0
  894. package/dist/witness-alerts.js.map +1 -0
  895. package/package.json +5 -5
@@ -0,0 +1,657 @@
1
+ /**
2
+ * CELLO Daemon — SessionNodeManager: the shapes and the constants
3
+ *
4
+ * Split out of `session-node-manager.ts` by 036-GODFILE. This module is DECLARATIONS ONLY — the
5
+ * interfaces the manager passes around, the bounds it enforces, the operator-facing reason tables,
6
+ * and seven small helpers. No session state and no module-level mutable state lives here, which is
7
+ * what makes it safe to import from anywhere.
8
+ *
9
+ * ⚠️ NOT ALL SEVEN ARE PURE, so do not treat them as constants: `capStaleBefore` reads
10
+ * `Date.now()`, and `heldRelayIdsOf` reads live libp2p node state. Both give a different answer at
11
+ * a different moment, which matters if you are tempted to hoist a call out of a loop.
12
+ *
13
+ * Everything is moved verbatim, comments included. The prose is the asset: much of it records why a
14
+ * bound has the value it has, or a defect that came back once already.
15
+ */
16
+ import { TIER, DEFAULT_TIER_BOUNDS } from "./contacts-tier-migration.js";
17
+ import { decodeStructure1 } from "@cello-protocol/protocol-types";
18
+ /**
19
+ * How long the auto-acknowledge path holds its broker visiting connection AFTER submitting the seal
20
+ * leaf. The directory pushes `seal_verified` back ~60ms later (measured on GCP), so releasing on
21
+ * submit closed the stream before the frame it was opened for. Generous against 60ms, and bounded so
22
+ * a stalled seal cannot leak the connection.
23
+ */
24
+ export const AUTOACK_BROKER_GRACE_MS = 30_000;
25
+ /** SEC-1 / review M4: cap on the refused-parked-entry memo (remote-fed → must be bounded). */
26
+ export const MAX_REFUSED_PARKED_ENTRIES = 512;
27
+ /**
28
+ * Per-session cap on remembered unreadable-algorithm frames (`DOD-M15-SEALWIRE-1` part B1).
29
+ *
30
+ * Fed by a REMOTE party — a peer on a newer build refuses every frame it sends — so it needs a
31
+ * bound for the same reason `MAX_REFUSED_PARKED_ENTRIES` does. Small on purpose: the entries exist
32
+ * only to reconcile a refusal with its park-route redelivery, which happens within seconds, and
33
+ * losing an old one costs a log line rather than correctness.
34
+ */
35
+ export const MAX_UNREADABLE_ALG_FRAMES = 64;
36
+ /**
37
+ * How many consumers' read positions a single refusal notice remembers.
38
+ *
39
+ * A consumer id is an IPC connection id, so every reconnect mints a new one and the read state would
40
+ * otherwise grow without bound in a durable table. Sixteen is far above the real number of windows
41
+ * attending one agent; past that the OLDEST reader is evicted, which costs at worst one repeated
42
+ * announcement to a window that has already gone.
43
+ */
44
+ export const MAX_REFUSAL_READERS = 16;
45
+ /**
46
+ * How many refusal notices one read returns, newest first.
47
+ *
48
+ * Review F3. The store is never emptied for an agent — a refusal records something that happened —
49
+ * and read state is per IPC connection, so a fresh window after a restart is entitled to every
50
+ * notice ever recorded. Uncapped, the answer to "why did this conversation go quiet?" was at the
51
+ * bottom of an archive. Capped and newest-first, the recent cause leads and the caller is TOLD the
52
+ * list was cut (`refusals_incomplete`), rather than the tail vanishing silently.
53
+ */
54
+ export const MAX_REFUSALS_PER_READ = 25;
55
+ /**
56
+ * How long the first send waits for an in-flight salt agreement before giving up on it —
57
+ * `DOD-M15-SEALWIRE-1` B2b-2 constraint 2.
58
+ *
59
+ * The agreement is ONE round trip on a stream that is already open, so a healthy exchange finishes
60
+ * in milliseconds; this bound is not sized for the normal case, it is sized for how long an operator
61
+ * should wait before their message goes out unsalted instead of not going out.
62
+ *
63
+ * Five seconds because both errors cost real things. Too short and a merely slow counterparty makes
64
+ * the session permanently unsalted for no reason — the decision is irreversible, so the bound should
65
+ * be generous relative to the round trip. Too long and the first message of every conversation with
66
+ * a peer on an older build visibly hangs, which is the failure a user actually notices and blames
67
+ * the product for. This is only ever paid by a session that HAS an agreement outstanding: a
68
+ * park-only session never starts one and never waits (constraint 5).
69
+ */
70
+ export const SALT_AGREEMENT_WAIT_MS = 5_000;
71
+ /**
72
+ * How many times this side re-attempts its session-key announce, and the base delay between them.
73
+ *
74
+ * Bounded on purpose (review F5): the announce rides `onPeerConnect`, so a connection that stays up
75
+ * after one failed attempt would never produce another — encryption off for the life of the session,
76
+ * with guidance pointing at a reconnect that never comes.
77
+ */
78
+ export const SESSION_KEY_ANNOUNCE_RETRIES = 4;
79
+ export const SESSION_KEY_ANNOUNCE_RETRY_MS = 250;
80
+ /**
81
+ * WHY a session is hashing unsalted — review Finding 1, and this exists because one sentence was
82
+ * carrying five different situations.
83
+ *
84
+ * `#saltForHashing` returns null for five distinct upstream conditions, and the single guidance
85
+ * string asserted one of them: *"expected when your counterparty runs a build that predates the salt
86
+ * agreement… start a new session once they upgrade."* An operator whose counterparty was merely
87
+ * OFFLINE when they sent their first message — the most common case by far, since a parked first
88
+ * message unsalts the session by design — read that and went and told a fully up-to-date
89
+ * counterparty to upgrade.
90
+ *
91
+ * That is the `directory_unreachable` shape this project keeps re-learning: the message names the
92
+ * exit point and points at the wrong machine. A closed set of reasons with its own guidance per
93
+ * reason is the fix, and a closed set is what stops a sixth condition quietly inheriting a fifth's
94
+ * explanation.
95
+ */
96
+ export const UNSALTED_REASONS = {
97
+ /** No agreement was ever started — the counterparty has not connected. The park-only case. */
98
+ NO_AGREEMENT_STARTED: "no_agreement_started",
99
+ /** We announced and they did not answer inside the bound. */
100
+ AGREEMENT_TIMED_OUT: "agreement_timed_out",
101
+ /**
102
+ * They answered, terminally: they have already hashed content and can never adopt.
103
+ *
104
+ * ⚠️ THIS IS ONE OF FOUR THINGS THE PEER CAN SAY, AND IT USED TO BE ALL OF THEM — 006-CRYPTO
105
+ * finding 2. The wire frame carries WHICH reason, and `SaltAgreementFrame.adoptionClosed` is a
106
+ * label rather than a boolean precisely so a caller cannot say `closed` without saying why. That
107
+ * distinction reached the log and was then dropped one call before the operator, who was told
108
+ * "they had already hashed messages" no matter which of the four it was.
109
+ */
110
+ PEER_CLOSED_ADOPTION: "peer_closed_adoption",
111
+ /**
112
+ * They answered terminally because their side could NOT READ its own frontier — local storage
113
+ * trouble on their machine, not a conversation that started early.
114
+ *
115
+ * Kept apart from `PEER_CLOSED_ADOPTION` because the remedies are opposites: a new session fixes
116
+ * the already-hashing case and does nothing at all for this one.
117
+ */
118
+ PEER_FRONTIER_UNREADABLE: "peer_frontier_unreadable",
119
+ /** They answered terminally because the two sides could not converge — 006-CRYPTO finding 1. */
120
+ PEER_EXCHANGE_STALLED: "peer_exchange_stalled",
121
+ /**
122
+ * They closed adoption naming a reason THIS build does not recognise.
123
+ *
124
+ * Deliberately non-asserting. The peer chooses this string, so the safe rendering states what we
125
+ * know — they declined, and the label is in the log line above — and asserts nothing about why.
126
+ * Guessing here is how an operator ends up asking a counterparty to change something that was
127
+ * never the problem.
128
+ */
129
+ PEER_CLOSED_UNSPECIFIED: "peer_closed_unspecified",
130
+ /** The session was torn down while the first send was still waiting. */
131
+ SESSION_TORN_DOWN: "session_torn_down",
132
+ /** This side already hashed, leafed, held or has in flight — adoption closed here. */
133
+ ADOPTION_CLOSED_LOCALLY: "adoption_closed_locally",
134
+ /** They answered in time and OUR OWN write failed. Nothing about their build is involved. */
135
+ OUR_PERSIST_FAILED: "our_persist_failed",
136
+ /**
137
+ * OUR announce never left this machine — review pass 2, F2. Reusing `AGREEMENT_TIMED_OUT` here
138
+ * told the operator *"your counterparty did not answer"* about a frame we never sent, which is the
139
+ * exact substitution this closed set was created to end, re-entering through the settle site the
140
+ * previous pass asked for.
141
+ */
142
+ ANNOUNCE_FAILED: "our_announce_failed",
143
+ /**
144
+ * They answered, we stored it, and reading it back FAILED — review pass 2, F4. Distinct from
145
+ * `OUR_PERSIST_FAILED` because the two point at different log lines, and the guidance names one.
146
+ */
147
+ OUR_READ_FAILED: "our_read_failed",
148
+ };
149
+ /**
150
+ * What the operator should DO about each. TOTAL by construction — a `Record` over the union, so a
151
+ * new reason cannot be added without something for the reader to act on. Same shape, and the same
152
+ * reason, as `refusal-reasons.ts`: that file exists because a free-form `reason: string` let a new
153
+ * code slip past every test in its own guard file.
154
+ */
155
+ export const UNSALTED_GUIDANCE = {
156
+ [UNSALTED_REASONS.NO_AGREEMENT_STARTED]: "Your counterparty was not connected when you sent this, so there was nobody to agree a salt with — most often they are simply offline and this message is going to their relay mailbox. Nothing is wrong with either build. The agreement only runs at session open, so this session stays unsalted even after they come online; a session started while you are both connected will be salted.",
157
+ [UNSALTED_REASONS.AGREEMENT_TIMED_OUT]: "Your counterparty was connected but did not answer the salt agreement in time. Almost always they are on a build that predates it, in which case this is expected and permanent for this session — start a new session once they upgrade. If you know they are on the same version, look for session.salt.persist.failed on this side and session.salt.announce.failed on either.",
158
+ [UNSALTED_REASONS.PEER_CLOSED_ADOPTION]: "Your counterparty declined the salt because their side of this session had already hashed messages — their conversation started before yours could agree one. Both builds are fine and both sides know. Start a new session if you want the protection.",
159
+ [UNSALTED_REASONS.PEER_FRONTIER_UNREADABLE]: "Your counterparty declined the salt because their machine could not read its own record of this conversation — their local storage is not answering. Nothing is wrong with your machine or with either build, and they did not do anything wrong. STARTING A NEW SESSION WILL NOT HELP: the next one will decline the same way until their storage is working. Ask them, out of band, to look for session.salt.adoption.refused on their side; it names the read that failed.",
160
+ [UNSALTED_REASONS.PEER_EXCHANGE_STALLED]: "Your counterparty holds a salt for this session and this side never managed to store one, so the two of you could not converge and both agreed to stop rather than trade messages about it forever. Nobody is at fault and no message was lost. Look for session.salt.persist.failed on this side — if it is there, a write to local storage failed and that is the whole cause. Start a new session; it will agree a salt normally.",
161
+ [UNSALTED_REASONS.PEER_CLOSED_UNSPECIFIED]: "Your counterparty declined the salt for a reason this build does not recognise — most likely they are on a newer build that names a case this one predates. Both sides agree there is no salt, so nothing is broken and no message was lost. The exact reason they gave is in the session.salt.adoption.closed line just above. Start a new session once you both know why.",
162
+ [UNSALTED_REASONS.SESSION_TORN_DOWN]: "This session was closed or reset while the message was still being prepared. This line is about the salt only; look for the close or freeze event just before it for what actually happened to the session.",
163
+ [UNSALTED_REASONS.ADOPTION_CLOSED_LOCALLY]: "This session had already hashed or sent messages before a salt could be agreed, so adopting one now would leave half the conversation verifiable by one rule and half by another. That is permanent for this session and both builds are fine. Start a new session if you want the protection.",
164
+ [UNSALTED_REASONS.OUR_PERSIST_FAILED]: "Your counterparty answered in time and THIS side failed to store the agreed salt — the fault is local, not theirs. Do not ask them to upgrade. Look for session.salt.persist.failed immediately above this line; it names the write that failed.",
165
+ [UNSALTED_REASONS.ANNOUNCE_FAILED]: "THIS side could not send the salt agreement to your counterparty — the frame never left this machine, so they were never asked and their build is not involved. Do not ask them to upgrade. Look for session.salt.announce.failed immediately above this line for the connection error; most often the direct link to them dropped between connecting and sending.",
166
+ [UNSALTED_REASONS.OUR_READ_FAILED]: "A salt was agreed for this session and THIS side could not read it back — the fault is local storage, not your counterparty. Do not ask them to upgrade. Look for session.salt.read.failed immediately above this line; a wrong-width or unreadable row is named there.",
167
+ };
168
+ /**
169
+ * DOD-M12B-ACK-1 — inbound `/cello/content/1.0.0` streams allowed per connection.
170
+ *
171
+ * libp2p's registrar default is 32, and it enforces the cap AFTER protocol negotiation has already
172
+ * answered, so exceeding it resets a stream the sender believes it just opened and the sender's
173
+ * next write fails with a message that names nothing. Content delivery is bursty by design (a
174
+ * document sweep opened 99 events in one second on a live daemon), and a slot stays occupied for
175
+ * the whole of ingest — which awaits SQLCipher and the security gateway. 32 is simply too close to
176
+ * normal traffic to be a safety limit.
177
+ *
178
+ * This is headroom, NOT the fix. The fix is that #handleContentStream now closes what it opens; a
179
+ * raised cap without that would only move the cliff. Kept finite on purpose: an unbounded cap would
180
+ * let a peer pin memory by opening streams it never uses, and the ceiling is what makes a future
181
+ * leak of this shape show up as a bounded failure instead of a heap.
182
+ */
183
+ export const CONTENT_MAX_INBOUND_STREAMS = 512;
184
+ /**
185
+ * DOD-M12B-ACK-1 — how long an inbound content stream may stay open after we have closed our end.
186
+ *
187
+ * Closing our write end retires the stream only once the PEER has closed its end too, so a peer
188
+ * that opens streams and never closes them still fills our inbound slots — a guard that runs only
189
+ * on the party it constrains is not a guard. After this window we reset it ourselves, which the
190
+ * muxer honours unilaterally.
191
+ *
192
+ * It cannot be zero: an immediate reset would land while a well-behaved sender is still inside its
193
+ * own `await stream.close()`, rejecting that close and turning every ordinary send into a park.
194
+ * The frame is already ingested long before this fires, so nothing waits on it.
195
+ */
196
+ export const CONTENT_STREAM_LINGER_MS = 30_000;
197
+ /**
198
+ * DOD-M12B-SHUTDOWN-1 — how long one teardown step may block the daemon's exit.
199
+ *
200
+ * Chosen against the surface that complains: `cello logout` gives up and reports the daemon still
201
+ * running after 5 s, so a step that can burn longer than that guarantees the message the operator
202
+ * saw. Two steps at 2 s each stay inside it.
203
+ */
204
+ export const SHUTDOWN_STEP_DEADLINE_MS = 2_000;
205
+ /**
206
+ * DOD-M12B-REDIAL-1 — the shortest gap between two re-dials of one session.
207
+ *
208
+ * Long enough that a burst of sends against a peer that is genuinely gone costs one dial rather
209
+ * than one per message; short enough that a peer coming back is picked up on the next thing the
210
+ * operator says. It is cleared on a successful dial, so it never delays a live counterparty.
211
+ */
212
+ export const REDIAL_COOLDOWN_MS = 15_000;
213
+ /**
214
+ * DOD-CAP-SELF-HEAL-1 — how long an interrupted session keeps consuming a cap slot.
215
+ *
216
+ * ATTRIBUTION ALONE DID NOT FIX THIS, and the reason is worth keeping. Recording who ended a
217
+ * session only works for sessions ended after the recording started: every row written before the
218
+ * column existed is unlabelled, and an unlabelled row counts. So the operator's actual backlog —
219
+ * five finished conversations that were blocking two of their own agents — was untouched by it.
220
+ * Attribution can never clear history, and history is what fills a cap.
221
+ *
222
+ * Age can. An interrupted session nobody has touched for hours is debris, not a live obligation,
223
+ * and that is true whether our restart or their disconnect produced it.
224
+ *
225
+ * D18 SURVIVES BECAUSE THE ATTACK IS A RATE. The disconnect-evasion peer has to drop and reopen
226
+ * faster than this window to gain anything, so everything it churns is recent and everything it
227
+ * churns still counts. What ages out is the thing that was never an attack: a conversation that
228
+ * finished. An attacker who waits out the window to gain one slot per window is not evading the
229
+ * bound, they are obeying a slower one — and the global anti-swarm cap still applies on top.
230
+ *
231
+ * Two hours: comfortably longer than any churn worth attacking with, comfortably shorter than
232
+ * "yesterday's conversation still blocks me".
233
+ */
234
+ /**
235
+ * DOD-M12B-RESERVATION-RETRY-1 — how many times to re-ask for a refused reservation before saying
236
+ * the agent is undialable and stopping. Bounded because a reservation is scarce and a fleet that
237
+ * retries forever is how a relay is exhausted. With the 5-minute base and doubling, five retries
238
+ * span about 2.5 hours.
239
+ */
240
+ export const SR_RESERVATION_MAX_RETRIES = 5;
241
+ /** The relay peer id inside a `/…/p2p/<relay>/p2p-circuit/…` address. */
242
+ export const CIRCUIT_RELAY_ID = /\/p2p\/([^/]+)\/p2p-circuit/;
243
+ /**
244
+ * 032-RELAYSPREAD — the relays a node ACTUALLY HOLDS a circuit with, read off the addresses it is
245
+ * announcing. One entry per relay, deduped.
246
+ *
247
+ * This is the single definition of "a reservation is held", and it is deliberately the strictest
248
+ * one available: an ANNOUNCED circuit address. `start()` resolving is not enough — a relay out of
249
+ * reservation slots completes the handshake, grants nothing, and leaves a node that looks started
250
+ * and is dialable by nobody. Nor is a candidate address enough: a candidate is a relay we asked.
251
+ */
252
+ export function heldRelayIdsOf(node) {
253
+ const ids = new Set();
254
+ for (const addr of node.listenAddresses()) {
255
+ if (!addr.includes("/p2p-circuit"))
256
+ continue;
257
+ const id = CIRCUIT_RELAY_ID.exec(addr)?.[1];
258
+ if (id !== undefined)
259
+ ids.add(id);
260
+ }
261
+ return [...ids];
262
+ }
263
+ /**
264
+ * DOD-M15-RELAYSLOTS-1 — how long an agent skips a relay that refused it for a relay-side fault.
265
+ *
266
+ * Ten minutes: long enough that the agent is not re-asking a relay that cannot serve it every time
267
+ * its receiver rebuilds, short enough that when someone fixes that relay the agent finds it again
268
+ * without needing its own restart. The fault is on somebody else's machine and nobody tells us when
269
+ * it is fixed, so this has to expire on its own.
270
+ */
271
+ export const RELAY_QUARANTINE_MS = 10 * 60 * 1000;
272
+ export const CAP_INTERRUPTED_TTL_MS = Number(process.env["CELLO_CAP_INTERRUPTED_TTL_MS"]) || 2 * 60 * 60 * 1000;
273
+ /**
274
+ * DOD-CAP-SELF-HEAL-1 — what counts against a per-sender acceptance bound.
275
+ *
276
+ * `active` always. `interrupted` ONLY when the counterparty caused it.
277
+ *
278
+ * D18 is why `interrupted` has to count at all: a peer can flip a session to `interrupted` for free
279
+ * by dropping its stream, then open a fresh one, indefinitely. Those are theirs and still count.
280
+ *
281
+ * What broke was charging them for OURS. A daemon restart flips every live session to
282
+ * `interrupted`, nothing resolves them, and the reaper correctly refuses to take any with received
283
+ * content — so the bound became all-time instead of concurrent. Measured 2026-08-17: two of one
284
+ * operator's own agents could not open a session, because one held five finished conversations with
285
+ * the other against a stranger cap of three.
286
+ *
287
+ * NULL counts as the counterparty's. The column is new, so every pre-existing row is unlabelled,
288
+ * and the safe default for an anti-abuse bound is to count rather than to excuse.
289
+ */
290
+ export const CAP_COUNTS = (alias = "") => {
291
+ const p = alias ? `${alias}.` : "";
292
+ return `(${p}status = 'active'
293
+ OR (${p}status = 'interrupted'
294
+ AND COALESCE(${p}interrupted_by, 'counterparty') != 'local'
295
+ AND ${p}updated_at >= ?))`;
296
+ };
297
+ export const CAP_COUNT_SQL = (where) => `SELECT COUNT(*) AS n FROM sessions WHERE ${where} AND ${CAP_COUNTS()}`;
298
+ /** The cutoff an interrupted session must be newer than to still count. */
299
+ export const capStaleBefore = () => Date.now() - CAP_INTERRUPTED_TTL_MS;
300
+ // Persistence bounds are TIER-GRADUATED via DEFAULT_TIER_BOUNDS (contacts-tier-migration). The two
301
+ // consts below DERIVE from the grid's UNKNOWN row rather than restating it — the grid is the single
302
+ // source (DOD-TIER-2 AC4), so these can never drift from it.
303
+ /** Anti-drip-feed: cumulative RECEIVED bytes per session at the UNKNOWN tier (= the grid's UNKNOWN
304
+ * byte cap). Higher tiers get more (DEFAULT_TIER_BOUNDS); no tier is unbounded (INV-TIER-BOUND). */
305
+ export const ABUSE_MAX_SESSION_RECEIVED_BYTES = DEFAULT_TIER_BOUNDS[TIER.UNKNOWN].maxBytesPerSession; // 25 MB
306
+ /** Anti-drip-feed via many sessions: active sessions an UNKNOWN counterparty may hold open at once
307
+ * (= the grid's UNKNOWN per-sender cap). */
308
+ export const ABUSE_MAX_SESSIONS_PER_UNKNOWN_SENDER = DEFAULT_TIER_BOUNDS[TIER.UNKNOWN].maxSessionsPerSender; // 3
309
+ /** Anti-swarm: total active sessions from ALL UNKNOWN-tier counterparties combined, per agent. A
310
+ * scalar across the whole unknown pool — not per-tier — so it stays a standalone const. */
311
+ export const ABUSE_MAX_UNKNOWN_SESSIONS_GLOBAL = 50;
312
+ /**
313
+ * DOD-M12B-REVIVAL-BOUND-1 — how long an interrupted session stays revivable before it is closed.
314
+ *
315
+ * 24 hours. The bound exists because of Andre's 2026-08-18 tenet — *"leave nothing open that is no
316
+ * longer needed"* — and its value is set by the case it must not break: a laptop closed for the
317
+ * night. A window shorter than a night's sleep would abandon exactly the sessions case A/B exist to
318
+ * rescue, which is why this is not zero and not an hour.
319
+ *
320
+ * It is deliberately a plain constant and not a setting. A per-operator knob here is a knob that
321
+ * turns the guarantee off, and the guarantee is the security property, not a preference.
322
+ */
323
+ export const REVIVAL_WINDOW_MS = 24 * 60 * 60 * 1000;
324
+ /**
325
+ * DOD-M12B-REVIVAL-BOUND-1 — how often the revival bound is applied.
326
+ *
327
+ * Hourly. The window is 24 hours, so the worst-case overshoot is ~4% of the bound, and the pass is
328
+ * one DB walk with no network in it. Boot-only was the first build and it is not a bound at all: a
329
+ * daemon left up for a week never applies it, and a long-lived daemon is the normal case.
330
+ */
331
+ export const REVIVAL_BOUND_SWEEP_MS = 60 * 60 * 1000;
332
+ /** DOD-M12B-SESSION-SEED-1: per-relay deadline when a revived node asks for a circuit reservation.
333
+ * Three seconds — a relay that has a slot answers well inside it, and one that does not never
334
+ * answers at all (measured: 10,002ms and still waiting). */
335
+ /**
336
+ * 055-ONDEMAND — how long a seal will wait to TELL a relay its slot is free.
337
+ *
338
+ * Short on purpose. Releasing is a courtesy that frees capacity; a seal is the thing the operator
339
+ * is waiting for. An undelivered release costs one slot until its reservation TTL, and that is a
340
+ * far better trade than a seal that waits on an unreachable relay's dial.
341
+ */
342
+ export const RELEASE_TELL_BUDGET_MS = 3_000;
343
+ /**
344
+ * 055-ONDEMAND — how long a slot taken to answer an OFFER may sit before the offer is called dead.
345
+ *
346
+ * ⚠️ **NOT the directory's 2-second accept clock.** The accept only starts the ceremony: the
347
+ * assignment still has to be FROST-signed by a threshold of directory nodes and delivered to both
348
+ * parties before either builds a session node. Releasing on 2 s would take the slot out from under
349
+ * a session that was about to begin, turning a rare abandoned offer into a common broken session.
350
+ * Sixty seconds is far past any healthy ceremony and far short of the relay's two-hour TTL.
351
+ */
352
+ export const OFFER_RESERVATION_GRACE_MS = 60_000;
353
+ export const REVIVE_RESERVATION_TIMEOUT_MS = 3_000;
354
+ /** How many relays a revival will ask before settling for a plain node. Two: the worst case is then
355
+ * ~6s to a usable session, against a measured "never" for the unbounded form. */
356
+ export const REVIVE_RESERVATION_CANDIDATES = 2;
357
+ /**
358
+ * DOD-M12B-LEAF-TRIGGERS-FETCH-1 — how long the DIRECT path gets before we go and fetch content the
359
+ * relay has already told us about.
360
+ *
361
+ * Two seconds. The witness leaf and the plaintext are separate deliveries, and on a healthy session
362
+ * the direct content normally lands within milliseconds of the leaf — so fetching the instant a leaf
363
+ * arrives would put a relay round trip on the hot path of every message in every session, which is a
364
+ * self-inflicted load problem. Waiting forever is what cost 102 seconds. Two seconds is far above
365
+ * the healthy direct latency and far below anything a person would notice.
366
+ */
367
+ export const LEAF_FETCH_GRACE_MS = 2_000;
368
+ /**
369
+ * DOD-M15-REFUSALTERMINAL-1 — the refusal reasons no retry can ever get past.
370
+ *
371
+ * MEASURED LIVE 2026-09-04: one message aimed at a conversation the counterparty had already
372
+ * closed, refused `session_committed` and re-fetched roughly twice a second for 62 hours across
373
+ * several daemon restarts — 232,056 refusal events on that one session and a 484 MB `daemon.log`.
374
+ *
375
+ * **WHY `session_committed` QUALIFIES.** A committed session carries a signature over its contents.
376
+ * Nothing can be appended to it by anyone — not the counterparty, not us — so there is no future
377
+ * state in which this content is accepted. That is the bar, and it is the whole bar.
378
+ *
379
+ * **⚠️ DO NOT ADD A REASON WITHOUT MEETING IT.** A reason wrongly called terminal silently drops a
380
+ * message that would have arrived on the next try, which is worse than the loop this set exists to
381
+ * end. The tempting ones and why each fails:
382
+ *
383
+ * - `content_hash_mismatch` — the fetch is BY CONTENT HASH, and a later fetch may retrieve a
384
+ * correct copy from a different relay. Retrying can succeed.
385
+ * - `sender_unresolved` — the sender may become resolvable when a profile arrives or a directory
386
+ * syncs. Retrying can succeed.
387
+ * - `session_orphaned` — `024-ORPHANTRIAGE` owns that path and decides its disposition.
388
+ * - `session_size_limit_exceeded` — the cap IS monotonic, but its bound is a setting, and an
389
+ * operator who raises it must be able to un-stick the conversation.
390
+ * - a transient screener block — transient is in its name.
391
+ */
392
+ /**
393
+ * ⚠️ NOT the same concept as `session-terminal-refusal.ts` (`DOD-MP-SESSION-RETIRE-1`), which is the
394
+ * RELAY terminally refusing one of OUR SENDS. This set is about INBOUND content this side will
395
+ * never accept. Two "terminal refusal" ideas live in this daemon and they point in opposite
396
+ * directions — review F9.
397
+ */
398
+ export const TERMINAL_REFUSAL_REASONS = new Set(["session_committed"]);
399
+ /**
400
+ * DOD-M15-REFUSALTERMINAL-1 review F3 — how long a FAILED read of the terminal-refusal rows is
401
+ * backed off for, per session.
402
+ *
403
+ * A minute: long enough that a database throwing on every witnessed leaf produces one ERROR rather
404
+ * than one per message (the exact log growth this unit exists to end), short enough that a disk
405
+ * which recovers is noticed within a message or two rather than at the next restart.
406
+ */
407
+ export const TERMINAL_REFUSAL_READ_RETRY_MS = 60_000;
408
+ /**
409
+ * DOD-M15-REFUSALTERMINAL-1 review F7 — how many terminally-refused content hashes are remembered
410
+ * per session.
411
+ *
412
+ * The counterparty chooses how many rows this table gets: one per distinct message aimed at a
413
+ * closed conversation, written even after the byte cap has stopped retaining evidence. 512 matches
414
+ * `MAX_REFUSED_PARKED_ENTRIES`, is far above any honest volume for a conversation that has ENDED,
415
+ * and bounds the table at (sessions × 512) small rows.
416
+ */
417
+ export const MAX_TERMINAL_REFUSALS_PER_SESSION = 512;
418
+ /**
419
+ * The `unusable` reason for a proof that is real and describes some OTHER message.
420
+ *
421
+ * ⚠️ NOT `"content_hash_mismatch"` — review §6. That string is already the refusal reason for the
422
+ * RECEIVER's own recompute failing (`ingestReceivedContent`), which is a tamper signal about the
423
+ * BODY. This one says the sender's signed claim is about different content. Two different failures
424
+ * sharing one name is a collision an operator grepping the log walks straight into.
425
+ */
426
+ export const AUTHORSHIP_CONTENT_HASH_MISMATCH = "authorship_hash_mismatch";
427
+ /**
428
+ * The `unusable` reason for a proof that is real, is by the right signer, describes this content —
429
+ * and was signed for a DIFFERENT conversation. A replay, not a forgery.
430
+ *
431
+ * Every one of those properties has been ESTABLISHED by the time this is returned; see the ordering
432
+ * note in `#verifyAuthorshipClaim`. An earlier version of this sentence was true of the intent and
433
+ * not of the code, because the check ran before the signature was verified.
434
+ */
435
+ export const AUTHORSHIP_SESSION_MISMATCH = "session_mismatch";
436
+ /**
437
+ * ─── 033-ACKEMIT: the three things that can be wrong with an ACKNOWLEDGEMENT ─────────────────────
438
+ *
439
+ * All three are `unusable` — the message is refused and the session lives. None of them is an
440
+ * identity fault: by the time any is returned the signature has verified, the signer IS this
441
+ * session's counterparty, and the claim is about this content in this conversation. What is wrong is
442
+ * what the claim says the sender had SEEN.
443
+ *
444
+ * They are three names and not one because the operator's next move differs for each, and because an
445
+ * investigator who cannot tell "your counterparty is on an older build" from "your counterparty
446
+ * acknowledged something you never sent" is looking at the wrong half of the problem.
447
+ *
448
+ * ⚠️ **NAME WHAT WAS OBSERVED, NEVER AN INFERRED CONCLUSION** (`DOD-M15-ERRSTRING-1`). Not one of
449
+ * these says "peer is malicious" — a mismatch is equally what a genuine software fault on the other
450
+ * side looks like, and an error that names a party the code did not check is this milestone's
451
+ * founding defect.
452
+ */
453
+ /**
454
+ * `DOD-M15-SELFCHAIN-1` — the sender's link to their OWN previous message names content this side
455
+ * did not receive from them as their last one.
456
+ *
457
+ * ⚠️ THIS IS THE ONE THAT MEANS THE ORDER OF THE CONVERSATION IS IN DISPUTE, and it is why it is
458
+ * named apart from the acknowledgement reasons above rather than folded in with them. Those say the
459
+ * sender is wrong about what WE said; this says they are wrong about what THEY said, which is the
460
+ * only thing they cannot be honestly mistaken about for long.
461
+ *
462
+ * ⚠️ AND IT STILL NAMES WHAT WAS OBSERVED, NEVER A CONCLUSION. The same signal is produced by a
463
+ * peer reordering a conversation and by a peer whose own chain record went out of step after a
464
+ * restart, and this side cannot tell them apart.
465
+ */
466
+ export const AUTHORSHIP_SELF_CHAIN_MISMATCH = "self_chain_mismatch";
467
+ /**
468
+ * DOD-M15-SELFCHAIN-GAP-1 — **HOW LONG A MISSING PREDECESSOR IS TREATED AS IN FLIGHT.**
469
+ *
470
+ * The frame is REFUSED throughout this window, exactly as before. What waits is the FREEZE, and
471
+ * that distinction is the whole design: nothing is accepted on evidence we cannot check, so the
472
+ * standing ruling ("defer until evidence exists, never accept because we have evidence") holds.
473
+ *
474
+ * ⚠️ DERIVED FROM THE PARK BACKSTOP, NOT CHOSEN — AND DERIVED IN CODE (review F4). A refused frame
475
+ * gets no acknowledgement, so the sender parks a copy and it is re-delivered, and the slowest
476
+ * re-delivery path is the periodic backstop sweep. A grace shorter than one sweep freezes a healthy
477
+ * session whose predecessor was going to arrive on the next one. This used to say "derived" beside
478
+ * a hardcoded 360_000 while the sweep was an injectable option — raise the sweep and the grace
479
+ * silently drops below it. The arithmetic is now the definition.
480
+ *
481
+ * The measured worst case that motivates it: `witnessed_leaf_unresolved` records a leaf landing in
482
+ * ONE second while its bytes took 102 (2026-08-18), and session `dab46e16` (2026-09-08) lost its
483
+ * receipt to exactly this — three of the counterparty's messages arrived before their own
484
+ * predecessors, were read as a disputed order, and froze the session while the predecessors were
485
+ * still in the mailbox.
486
+ */
487
+ export const PARKED_DRAIN_BACKSTOP_DEFAULT_MS = 300_000;
488
+ export const SELF_CHAIN_GAP_GRACE_MS = PARKED_DRAIN_BACKSTOP_DEFAULT_MS + 60_000;
489
+ /** The hash names content this side does not hold at the position the claim names. */
490
+ export const AUTHORSHIP_ACK_HASH_MISMATCH = "ack_hash_mismatch";
491
+ /** The hash names content this side has never held — not in the tree, and not held pending a gap. */
492
+ export const AUTHORSHIP_ACK_HASH_UNKNOWN = "ack_hash_unknown_content";
493
+ export const ACK_HASH_REASONS = new Set([
494
+ AUTHORSHIP_ACK_HASH_MISMATCH,
495
+ AUTHORSHIP_ACK_HASH_UNKNOWN,
496
+ ]);
497
+ /**
498
+ * ⚠️ **THE REFUSALS THAT SAY THIS ARE THE ONES WHERE THE REFUSAL DOES NOT HOLD — NOT ALL OF THEM.**
499
+ *
500
+ * It said "EVERY INBOUND REFUSAL SAYS THIS", and review F5 measured that: fifteen call sites file a
501
+ * refusal notice in this file and four carry this sentence — the three encryption causes and the
502
+ * authorship one. The rest MUST NOT. A screened-out message is deliberately never delivered by any
503
+ * route, and a transcript write failure lost content that was already accepted; promising either
504
+ * operator a second chance would be a lie in the opposite direction. Rewritten rather than deleted,
505
+ * because "EVERY" read as a rule and the next person to add a refusal would have applied it blindly.
506
+ *
507
+ * Where it DOES apply: refusing an inbound frame sends back no delivery acknowledgement, so a CELLO
508
+ * sender's TTF backstop parks a copy in the relay mailbox — sealed to this agent's LONG-TERM
509
+ * IDENTITY key, not the session key — and recovery opens that one whatever went wrong with the
510
+ * direct copy.
511
+ *
512
+ * ⚠️ AND ONLY WHEN THIS MACHINE CAN OPEN ONE. See `REFUSAL_NO_OTHER_ROUTE`; the choice is made by
513
+ * `#mailboxRouteAvailable`, never by a caller writing the sentence into a literal.
514
+ */
515
+ export const REFUSAL_MAY_STILL_ARRIVE = "IT MAY STILL REACH YOU BY THE OTHER ROUTE: a refusal sends back no acknowledgement, so a CELLO " +
516
+ "counterparty's agent parks a copy in the relay mailbox and this side opens that one with your " +
517
+ "long-term key instead of this session's. If it arrives, it arrives without whatever this check " +
518
+ "was unable to confirm — and if they are not running CELLO, there is no such copy and it will " +
519
+ "not arrive.";
520
+ /**
521
+ * ⚠️ **THE OTHER ROUTE DOES NOT EXIST ON THIS MACHINE, AND SAYING SO IS THE POINT** — review F2.
522
+ *
523
+ * Opening a mailbox copy needs `KeyProvider.openContentSeal`, which is OPTIONAL: a threshold or
524
+ * signing-only provider does not implement it, and an agent loaded without a provider has none at
525
+ * all. `content-park.ts` refuses both — `signing_key_unavailable`, `cannot_unseal`.
526
+ *
527
+ * That is the SAME condition `CONTENT_ENCRYPTION_REASONS.NO_LOCAL_IDENTITY` reports. So on the one
528
+ * refusal that names a missing local identity, the reassurance above was false: both routes are shut
529
+ * by one cause, permanently, for every message on every session of that agent — and the operator was
530
+ * told to wait for a delivery that cannot happen. That is the H1 defect exactly: a refusal
531
+ * announcing a better outcome than it delivers.
532
+ */
533
+ export const REFUSAL_NO_OTHER_ROUTE = "AND IT WILL NOT REACH YOU BY THE OTHER ROUTE EITHER: the relay mailbox copy is opened with this " +
534
+ "agent's long-term identity key, which is the very thing this machine is missing. One cause shuts " +
535
+ "both routes, and it will keep shutting them until the agent is loaded with its identity key. Do " +
536
+ "not wait for this message to turn up.";
537
+ /**
538
+ * Constant-shape byte equality for the two binding checks. Lifted rather than hand-rolled a second
539
+ * time — `seal-frontier-verify` has the same helper for the same comparison, and two copies of
540
+ * "are these the same bytes" is two things to keep true.
541
+ */
542
+ export function bytesEqual(a, b) {
543
+ if (a.length !== b.length)
544
+ return false;
545
+ for (let i = 0; i < a.length; i++)
546
+ if (a[i] !== b[i])
547
+ return false;
548
+ return true;
549
+ }
550
+ /**
551
+ * The relay's peer id out of a circuit listen address, or `null` if the address does not name one.
552
+ *
553
+ * Returns null rather than throwing or guessing: an unreadable address means we cannot tell which
554
+ * relay this candidate was for, and every caller has a real thing to do with that answer.
555
+ */
556
+ export function relayPeerIdOf(circuitAddr) {
557
+ return /\/p2p\/([^/]+)\/p2p-circuit/.exec(circuitAddr)?.[1] ?? null;
558
+ }
559
+ /**
560
+ * The Merkle leaf inputs for a seal carry: each leaf's `content_hash`, read out of the bytes its
561
+ * SENDER SIGNED (`structure1_cbor`), never out of an envelope field somebody else filled in.
562
+ *
563
+ * `null` when any leaf is unreadable — the caller must then answer "I cannot judge", never "we
564
+ * disagree". A decode failure is this daemon's limitation, not evidence against anyone.
565
+ *
566
+ * Canonical Structure 1 is `[version, content_hash, sender_pubkey, session_id, last_seen_seq,
567
+ * timestamp]`, plus `last_seen_hash` at index 6 on a v2 claim (020-ACKHASH). The content hash is at
568
+ * index 1 in both and is used AS the leaf hash (RFC 6962 §2.1 "hash" leaves are taken as-is), which
569
+ * is the domain the certified root lives in.
570
+ */
571
+ export function carryContentHashInputs(carry) {
572
+ const inputs = [];
573
+ for (const leaf of carry) {
574
+ const s1 = decodeStructure1(leaf.structure1Cbor);
575
+ if (!s1.ok)
576
+ return null;
577
+ inputs.push({ kind: "hash", data: s1.fields.contentHash });
578
+ }
579
+ return inputs;
580
+ }
581
+ /**
582
+ * How many of the counterparty's content hashes a session remembers for the self-link check.
583
+ *
584
+ * Bounded because a peer feeds it. 256 covers any realistic gap in our own copy of a conversation —
585
+ * a held message, one the inbound screen refused, one lost in flight — while keeping the memory a
586
+ * single session can cost fixed. Past the cap the check gets STRICTER, never looser.
587
+ */
588
+ export const SELF_CHAIN_MEMORY = 256;
589
+ /**
590
+ * The ONE definition of "unread" in this daemon: a RECEIVED transcript row whose sequence is
591
+ * beyond the agent's persisted read watermark. A constant, not a copy-pasted string, so the
592
+ * INBOX unread count and the DOD-CURSOR-DURABLE-1 read-before-write gate can never drift into
593
+ * disagreeing about what "unread" means — the gate deciding one thing while the inbox shows
594
+ * another is precisely the bug this shape prevents. Interpolated SQL only (no user input).
595
+ *
596
+ * ⚠️ IT LIVES HERE, NOT ON A CLASS, BECAUSE 036-GODFILE MOVED ITS READERS OUT. All three unread
597
+ * queries went to `session-records.ts`, so today there is exactly ONE importer. It is exported
598
+ * rather than left a `static #private` because a `#private` cannot cross a file boundary at all —
599
+ * so the moment a second reader appears in another module, the only way to give it the value would
600
+ * be to copy the string, which is precisely the drift the paragraph above forbids. Exported now so
601
+ * that nobody is ever tempted.
602
+ */
603
+ export const UNREAD_RECEIVED_WHERE = `
604
+ t.direction = 'received'
605
+ AND t.sequence > COALESCE(w.last_delivered_seq, -1)`;
606
+ export const REFUSED_SESSIONS_CAP = 200;
607
+ export const TERMINAL_STATUSES = `('sealed','abandoned','seal_interrupted_pending','interrupted')`;
608
+ /**
609
+ * A reservation ask that failed for a CLIENT-SIDE reason, named by the transport.
610
+ *
611
+ * ⚠️ **REVIEW HIGH-2 — WITHOUT THIS, A LIBP2P RENAME READS AS A CAPACITY OUTAGE.** When
612
+ * `listenOnCircuit` throws `transport_manager_unavailable`, the ask never reached the relay at all —
613
+ * but the generic decline below infers its reason from the connection state, finds the proof
614
+ * connection still open, and reports `relay_granted_no_reservation` on every relay in the pool. That
615
+ * string means *"relay CAPACITY, a trustless-cello problem"* in this daemon's own taxonomy, so an
616
+ * upstream API change would send an operator into the relay fleet while the real cause survived only
617
+ * as an `error` field on a warn line nothing surfaces.
618
+ *
619
+ * These faults are ours. They must be described in our vocabulary, not the relay's.
620
+ */
621
+ export const CLIENT_SIDE_ASK_FAULTS = new Set(["transport_manager_unavailable", "not_a_circuit_address"]);
622
+ export function clientSideAskFault(err) {
623
+ const reason = err?.reason;
624
+ return typeof reason === "string" && CLIENT_SIDE_ASK_FAULTS.has(reason) ? reason : undefined;
625
+ }
626
+ /**
627
+ * Whether this node holds a granted reservation — i.e. announces a circuit address.
628
+ *
629
+ * Review LOW-5: `p2p-circuit` is read as a SEGMENT, the same rule `listenOnCircuit` applies to its
630
+ * own input. A substring test also matches a host or peer id that happens to contain the text, and
631
+ * the file should not argue one rule and apply another two lines later.
632
+ */
633
+ export function holdsCircuit(node) {
634
+ return node.listenAddresses().some((a) => a.split("/").includes("p2p-circuit"));
635
+ }
636
+ /**
637
+ * Wait for an abandoned candidate's outstanding work to settle, then stop it — but never wait
638
+ * forever.
639
+ *
640
+ * ⚠️ **REVIEW MEDIUM-4 — `allSettled` ON A PROMISE THAT CANNOT SETTLE NEVER RUNS THE TEARDOWN.**
641
+ * The teardown is chained onto the candidate's own work because `libp2p.stop()` returns immediately
642
+ * unless the node is `started`, so stopping a node mid-flight stops nothing. But a relay that
643
+ * accepts the stream and never answers leaves `listen()` pending forever — that is exactly the case
644
+ * `msg-027`'s fixture models — and the chained stop would then never fire at all, leaving a live
645
+ * node on the receiver's seed while the walk builds more nodes on that same seed.
646
+ *
647
+ * So: settle OR expire. The grace is generous relative to the ask's own deadline, because the point
648
+ * is to bound the wait, not to race it — a node that finishes at the last moment must still be
649
+ * stopped by its own settlement rather than while it is starting.
650
+ */
651
+ export function stopWhenSettled(node, work, graceMs) {
652
+ const pending = work.filter((p) => p !== undefined);
653
+ const settled = Promise.allSettled(pending);
654
+ const bounded = new Promise((resolve) => { setTimeout(resolve, graceMs).unref?.(); });
655
+ void Promise.race([settled, bounded]).then(() => node.stop().catch(() => { }));
656
+ }
657
+ //# sourceMappingURL=session-node-types.js.map