@sentropic/cluster-mesh 0.24.0 → 0.26.0

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 (610) hide show
  1. package/README.md +5 -0
  2. package/dist/comments/storage-schema.d.ts +1 -1
  3. package/dist/comments/transport-contracts.d.ts +1 -1
  4. package/dist/compile/contract/diagnostics.d.ts +9 -0
  5. package/dist/compile/contract/diagnostics.d.ts.map +1 -0
  6. package/dist/compile/contract/diagnostics.js +82 -0
  7. package/dist/compile/contract/diagnostics.js.map +1 -0
  8. package/dist/compile/contract/encoding.d.ts +12 -0
  9. package/dist/compile/contract/encoding.d.ts.map +1 -0
  10. package/dist/compile/contract/encoding.js +95 -0
  11. package/dist/compile/contract/encoding.js.map +1 -0
  12. package/dist/compile/contract/index.d.ts +9 -0
  13. package/dist/compile/contract/index.d.ts.map +1 -0
  14. package/dist/compile/contract/index.js +9 -0
  15. package/dist/compile/contract/index.js.map +1 -0
  16. package/dist/compile/contract/json.d.ts +3 -0
  17. package/dist/compile/contract/json.d.ts.map +1 -0
  18. package/dist/compile/contract/json.js +75 -0
  19. package/dist/compile/contract/json.js.map +1 -0
  20. package/dist/compile/contract/output.d.ts +5 -0
  21. package/dist/compile/contract/output.d.ts.map +1 -0
  22. package/dist/compile/contract/output.js +57 -0
  23. package/dist/compile/contract/output.js.map +1 -0
  24. package/dist/compile/contract/recipe.d.ts +5 -0
  25. package/dist/compile/contract/recipe.d.ts.map +1 -0
  26. package/dist/compile/contract/recipe.js +86 -0
  27. package/dist/compile/contract/recipe.js.map +1 -0
  28. package/dist/compile/contract/schema.d.ts +26 -0
  29. package/dist/compile/contract/schema.d.ts.map +1 -0
  30. package/dist/compile/contract/schema.js +92 -0
  31. package/dist/compile/contract/schema.js.map +1 -0
  32. package/dist/compile/contract/types.d.ts +166 -0
  33. package/dist/compile/contract/types.d.ts.map +1 -0
  34. package/dist/compile/contract/types.js +21 -0
  35. package/dist/compile/contract/types.js.map +1 -0
  36. package/dist/compile/contract/vectors.d.ts +38 -0
  37. package/dist/compile/contract/vectors.d.ts.map +1 -0
  38. package/dist/compile/contract/vectors.js +29 -0
  39. package/dist/compile/contract/vectors.js.map +1 -0
  40. package/dist/engram-memory/wire-adaptation.d.ts +1 -1
  41. package/dist/engram-memory/wire-adaptation.d.ts.map +1 -1
  42. package/dist/engram-memory/wire-adaptation.js +24 -8
  43. package/dist/engram-memory/wire-adaptation.js.map +1 -1
  44. package/dist/forge/contracts.d.ts +60 -0
  45. package/dist/forge/contracts.d.ts.map +1 -0
  46. package/dist/forge/contracts.js +19 -0
  47. package/dist/forge/contracts.js.map +1 -0
  48. package/dist/forge/custody.d.ts +7 -0
  49. package/dist/forge/custody.d.ts.map +1 -0
  50. package/dist/forge/custody.js +76 -0
  51. package/dist/forge/custody.js.map +1 -0
  52. package/dist/forge/enrollment.d.ts +151 -0
  53. package/dist/forge/enrollment.d.ts.map +1 -0
  54. package/dist/forge/enrollment.js +98 -0
  55. package/dist/forge/enrollment.js.map +1 -0
  56. package/dist/forge/github-api.d.ts +6 -0
  57. package/dist/forge/github-api.d.ts.map +1 -0
  58. package/dist/forge/github-api.js +131 -0
  59. package/dist/forge/github-api.js.map +1 -0
  60. package/dist/forge/hono.d.ts +14 -0
  61. package/dist/forge/hono.d.ts.map +1 -0
  62. package/dist/forge/hono.js +141 -0
  63. package/dist/forge/hono.js.map +1 -0
  64. package/dist/forge/lifecycle.d.ts +108 -0
  65. package/dist/forge/lifecycle.d.ts.map +1 -0
  66. package/dist/forge/lifecycle.js +160 -0
  67. package/dist/forge/lifecycle.js.map +1 -0
  68. package/dist/forge/records.d.ts +70 -0
  69. package/dist/forge/records.d.ts.map +1 -0
  70. package/dist/forge/records.js +2 -0
  71. package/dist/forge/records.js.map +1 -0
  72. package/dist/forge/rotation.d.ts +46 -0
  73. package/dist/forge/rotation.d.ts.map +1 -0
  74. package/dist/forge/rotation.js +62 -0
  75. package/dist/forge/rotation.js.map +1 -0
  76. package/dist/identity/auth-abort.d.ts +9 -0
  77. package/dist/identity/auth-abort.d.ts.map +1 -0
  78. package/dist/identity/auth-abort.js +59 -0
  79. package/dist/identity/auth-abort.js.map +1 -0
  80. package/dist/identity/auth-binding.d.ts +3 -0
  81. package/dist/identity/auth-binding.d.ts.map +1 -0
  82. package/dist/identity/auth-binding.js +87 -0
  83. package/dist/identity/auth-binding.js.map +1 -0
  84. package/dist/identity/auth-boundary.d.ts +11 -0
  85. package/dist/identity/auth-boundary.d.ts.map +1 -0
  86. package/dist/identity/auth-boundary.js +73 -0
  87. package/dist/identity/auth-boundary.js.map +1 -0
  88. package/dist/identity/auth-completion.d.ts +9 -0
  89. package/dist/identity/auth-completion.d.ts.map +1 -0
  90. package/dist/identity/auth-completion.js +24 -0
  91. package/dist/identity/auth-completion.js.map +1 -0
  92. package/dist/identity/auth-credentials.d.ts +5 -0
  93. package/dist/identity/auth-credentials.d.ts.map +1 -0
  94. package/dist/identity/auth-credentials.js +82 -0
  95. package/dist/identity/auth-credentials.js.map +1 -0
  96. package/dist/identity/auth-email.d.ts +8 -0
  97. package/dist/identity/auth-email.d.ts.map +1 -0
  98. package/dist/identity/auth-email.js +104 -0
  99. package/dist/identity/auth-email.js.map +1 -0
  100. package/dist/identity/auth-hono.d.ts +5 -0
  101. package/dist/identity/auth-hono.d.ts.map +1 -0
  102. package/dist/identity/auth-hono.js +10 -0
  103. package/dist/identity/auth-hono.js.map +1 -0
  104. package/dist/identity/auth-proofs.d.ts +11 -0
  105. package/dist/identity/auth-proofs.d.ts.map +1 -0
  106. package/dist/identity/auth-proofs.js +107 -0
  107. package/dist/identity/auth-proofs.js.map +1 -0
  108. package/dist/identity/auth-service-tenant.d.ts +4 -0
  109. package/dist/identity/auth-service-tenant.d.ts.map +1 -0
  110. package/dist/identity/auth-service-tenant.js +54 -0
  111. package/dist/identity/auth-service-tenant.js.map +1 -0
  112. package/dist/identity/auth-sessions.d.ts +8 -0
  113. package/dist/identity/auth-sessions.d.ts.map +1 -0
  114. package/dist/identity/auth-sessions.js +141 -0
  115. package/dist/identity/auth-sessions.js.map +1 -0
  116. package/dist/identity/auth-social.d.ts +4 -0
  117. package/dist/identity/auth-social.d.ts.map +1 -0
  118. package/dist/identity/auth-social.js +82 -0
  119. package/dist/identity/auth-social.js.map +1 -0
  120. package/dist/identity/auth-users.d.ts +9 -0
  121. package/dist/identity/auth-users.d.ts.map +1 -0
  122. package/dist/identity/auth-users.js +116 -0
  123. package/dist/identity/auth-users.js.map +1 -0
  124. package/dist/identity/auth-webauthn.d.ts +22 -0
  125. package/dist/identity/auth-webauthn.d.ts.map +1 -0
  126. package/dist/identity/auth-webauthn.js +108 -0
  127. package/dist/identity/auth-webauthn.js.map +1 -0
  128. package/dist/identity/cascade.d.ts +12 -0
  129. package/dist/identity/cascade.d.ts.map +1 -0
  130. package/dist/identity/cascade.js +19 -0
  131. package/dist/identity/cascade.js.map +1 -0
  132. package/dist/identity/connector-custody.d.ts +85 -0
  133. package/dist/identity/connector-custody.d.ts.map +1 -0
  134. package/dist/identity/connector-custody.js +288 -0
  135. package/dist/identity/connector-custody.js.map +1 -0
  136. package/dist/identity/conversation.d.ts +50 -0
  137. package/dist/identity/conversation.d.ts.map +1 -0
  138. package/dist/identity/conversation.js +102 -0
  139. package/dist/identity/conversation.js.map +1 -0
  140. package/dist/identity/custody-crypto.d.ts +37 -0
  141. package/dist/identity/custody-crypto.d.ts.map +1 -0
  142. package/dist/identity/custody-crypto.js +173 -0
  143. package/dist/identity/custody-crypto.js.map +1 -0
  144. package/dist/identity/decision.d.ts +28 -0
  145. package/dist/identity/decision.d.ts.map +1 -0
  146. package/dist/identity/decision.js +97 -0
  147. package/dist/identity/decision.js.map +1 -0
  148. package/dist/identity/index.d.ts +9 -0
  149. package/dist/identity/index.d.ts.map +1 -0
  150. package/dist/identity/index.js +13 -0
  151. package/dist/identity/index.js.map +1 -0
  152. package/dist/identity/ledger.d.ts +120 -0
  153. package/dist/identity/ledger.d.ts.map +1 -0
  154. package/dist/identity/ledger.js +226 -0
  155. package/dist/identity/ledger.js.map +1 -0
  156. package/dist/identity/postgres.d.ts +13 -0
  157. package/dist/identity/postgres.d.ts.map +1 -0
  158. package/dist/identity/postgres.js +207 -0
  159. package/dist/identity/postgres.js.map +1 -0
  160. package/dist/identity/sqlite.d.ts +14 -0
  161. package/dist/identity/sqlite.d.ts.map +1 -0
  162. package/dist/identity/sqlite.js +193 -0
  163. package/dist/identity/sqlite.js.map +1 -0
  164. package/dist/identity-contracts/access.d.ts +54 -0
  165. package/dist/identity-contracts/access.d.ts.map +1 -0
  166. package/dist/identity-contracts/access.js +168 -0
  167. package/dist/identity-contracts/access.js.map +1 -0
  168. package/dist/identity-contracts/accounts.d.ts +44 -0
  169. package/dist/identity-contracts/accounts.d.ts.map +1 -0
  170. package/dist/identity-contracts/accounts.js +150 -0
  171. package/dist/identity-contracts/accounts.js.map +1 -0
  172. package/dist/identity-contracts/boundary-resolution.d.ts +31 -0
  173. package/dist/identity-contracts/boundary-resolution.d.ts.map +1 -0
  174. package/dist/identity-contracts/boundary-resolution.js +56 -0
  175. package/dist/identity-contracts/boundary-resolution.js.map +1 -0
  176. package/dist/identity-contracts/composition-descriptors.d.ts +17 -0
  177. package/dist/identity-contracts/composition-descriptors.d.ts.map +1 -0
  178. package/dist/identity-contracts/composition-descriptors.js +77 -0
  179. package/dist/identity-contracts/composition-descriptors.js.map +1 -0
  180. package/dist/identity-contracts/custody-auth.d.ts +122 -0
  181. package/dist/identity-contracts/custody-auth.d.ts.map +1 -0
  182. package/dist/identity-contracts/custody-auth.js +2 -0
  183. package/dist/identity-contracts/custody-auth.js.map +1 -0
  184. package/dist/identity-contracts/custody-descriptors.d.ts +18 -0
  185. package/dist/identity-contracts/custody-descriptors.d.ts.map +1 -0
  186. package/dist/identity-contracts/custody-descriptors.js +83 -0
  187. package/dist/identity-contracts/custody-descriptors.js.map +1 -0
  188. package/dist/identity-contracts/custody-errors.d.ts +21 -0
  189. package/dist/identity-contracts/custody-errors.d.ts.map +1 -0
  190. package/dist/identity-contracts/custody-errors.js +80 -0
  191. package/dist/identity-contracts/custody-errors.js.map +1 -0
  192. package/dist/identity-contracts/custody-operations.d.ts +79 -0
  193. package/dist/identity-contracts/custody-operations.d.ts.map +1 -0
  194. package/dist/identity-contracts/custody-operations.js +2 -0
  195. package/dist/identity-contracts/custody-operations.js.map +1 -0
  196. package/dist/identity-contracts/custody.d.ts +587 -0
  197. package/dist/identity-contracts/custody.d.ts.map +1 -0
  198. package/dist/identity-contracts/custody.js +7 -0
  199. package/dist/identity-contracts/custody.js.map +1 -0
  200. package/dist/identity-contracts/descriptors.d.ts +12 -0
  201. package/dist/identity-contracts/descriptors.d.ts.map +1 -0
  202. package/dist/identity-contracts/descriptors.js +57 -0
  203. package/dist/identity-contracts/descriptors.js.map +1 -0
  204. package/dist/identity-contracts/doubles.d.ts +124 -0
  205. package/dist/identity-contracts/doubles.d.ts.map +1 -0
  206. package/dist/identity-contracts/doubles.js +360 -0
  207. package/dist/identity-contracts/doubles.js.map +1 -0
  208. package/dist/identity-contracts/enforcement.d.ts +27 -0
  209. package/dist/identity-contracts/enforcement.d.ts.map +1 -0
  210. package/dist/identity-contracts/enforcement.js +155 -0
  211. package/dist/identity-contracts/enforcement.js.map +1 -0
  212. package/dist/identity-contracts/errors.d.ts +71 -0
  213. package/dist/identity-contracts/errors.d.ts.map +1 -0
  214. package/dist/identity-contracts/errors.js +129 -0
  215. package/dist/identity-contracts/errors.js.map +1 -0
  216. package/dist/identity-contracts/index.d.ts +22 -0
  217. package/dist/identity-contracts/index.d.ts.map +1 -0
  218. package/dist/identity-contracts/index.js +23 -0
  219. package/dist/identity-contracts/index.js.map +1 -0
  220. package/dist/identity-contracts/oauth-reads.d.ts +42 -0
  221. package/dist/identity-contracts/oauth-reads.d.ts.map +1 -0
  222. package/dist/identity-contracts/oauth-reads.js +38 -0
  223. package/dist/identity-contracts/oauth-reads.js.map +1 -0
  224. package/dist/identity-contracts/ports.d.ts +116 -0
  225. package/dist/identity-contracts/ports.d.ts.map +1 -0
  226. package/dist/identity-contracts/ports.js +7 -0
  227. package/dist/identity-contracts/ports.js.map +1 -0
  228. package/dist/identity-contracts/replica-sync.d.ts +89 -0
  229. package/dist/identity-contracts/replica-sync.d.ts.map +1 -0
  230. package/dist/identity-contracts/replica-sync.js +7 -0
  231. package/dist/identity-contracts/replica-sync.js.map +1 -0
  232. package/dist/identity-contracts/resolution.d.ts +56 -0
  233. package/dist/identity-contracts/resolution.d.ts.map +1 -0
  234. package/dist/identity-contracts/resolution.js +87 -0
  235. package/dist/identity-contracts/resolution.js.map +1 -0
  236. package/dist/identity-contracts/service-tenancy.d.ts +43 -0
  237. package/dist/identity-contracts/service-tenancy.d.ts.map +1 -0
  238. package/dist/identity-contracts/service-tenancy.js +75 -0
  239. package/dist/identity-contracts/service-tenancy.js.map +1 -0
  240. package/dist/identity-contracts/tenancy.d.ts +52 -0
  241. package/dist/identity-contracts/tenancy.d.ts.map +1 -0
  242. package/dist/identity-contracts/tenancy.js +171 -0
  243. package/dist/identity-contracts/tenancy.js.map +1 -0
  244. package/dist/identity-contracts/types.d.ts +253 -0
  245. package/dist/identity-contracts/types.d.ts.map +1 -0
  246. package/dist/identity-contracts/types.js +7 -0
  247. package/dist/identity-contracts/types.js.map +1 -0
  248. package/dist/identity-contracts/workspace-deletion.d.ts +56 -0
  249. package/dist/identity-contracts/workspace-deletion.d.ts.map +1 -0
  250. package/dist/identity-contracts/workspace-deletion.js +7 -0
  251. package/dist/identity-contracts/workspace-deletion.js.map +1 -0
  252. package/dist/identity-contracts/workspaces.d.ts +37 -0
  253. package/dist/identity-contracts/workspaces.d.ts.map +1 -0
  254. package/dist/identity-contracts/workspaces.js +118 -0
  255. package/dist/identity-contracts/workspaces.js.map +1 -0
  256. package/dist/identity-stores/index.d.ts +4 -0
  257. package/dist/identity-stores/index.d.ts.map +1 -0
  258. package/dist/identity-stores/index.js +7 -0
  259. package/dist/identity-stores/index.js.map +1 -0
  260. package/dist/identity-stores/tenancy-postgres.d.ts +23 -0
  261. package/dist/identity-stores/tenancy-postgres.d.ts.map +1 -0
  262. package/dist/identity-stores/tenancy-postgres.js +294 -0
  263. package/dist/identity-stores/tenancy-postgres.js.map +1 -0
  264. package/dist/identity-stores/tenancy-schema.d.ts +11 -0
  265. package/dist/identity-stores/tenancy-schema.d.ts.map +1 -0
  266. package/dist/identity-stores/tenancy-schema.js +74 -0
  267. package/dist/identity-stores/tenancy-schema.js.map +1 -0
  268. package/dist/identity-stores/tenancy-sqlite.d.ts +24 -0
  269. package/dist/identity-stores/tenancy-sqlite.d.ts.map +1 -0
  270. package/dist/identity-stores/tenancy-sqlite.js +288 -0
  271. package/dist/identity-stores/tenancy-sqlite.js.map +1 -0
  272. package/dist/index.d.ts +15 -0
  273. package/dist/index.d.ts.map +1 -1
  274. package/dist/index.js +14 -0
  275. package/dist/index.js.map +1 -1
  276. package/dist/integrations/mcp/memory-compose.d.ts +11 -0
  277. package/dist/integrations/mcp/memory-compose.d.ts.map +1 -0
  278. package/dist/integrations/mcp/memory-compose.js +79 -0
  279. package/dist/integrations/mcp/memory-compose.js.map +1 -0
  280. package/dist/integrations/mcp/memory-definition.d.ts +28 -0
  281. package/dist/integrations/mcp/memory-definition.d.ts.map +1 -0
  282. package/dist/integrations/mcp/memory-definition.js +2 -0
  283. package/dist/integrations/mcp/memory-definition.js.map +1 -0
  284. package/dist/integrations/mcp/memory-manifest.d.ts +4 -0
  285. package/dist/integrations/mcp/memory-manifest.d.ts.map +1 -0
  286. package/dist/integrations/mcp/memory-manifest.js +9 -0
  287. package/dist/integrations/mcp/memory-manifest.js.map +1 -0
  288. package/dist/integrations/mcp/memory-transport.d.ts +21 -0
  289. package/dist/integrations/mcp/memory-transport.d.ts.map +1 -0
  290. package/dist/integrations/mcp/memory-transport.js +47 -0
  291. package/dist/integrations/mcp/memory-transport.js.map +1 -0
  292. package/dist/integrations/mcp/memory.d.ts +19 -0
  293. package/dist/integrations/mcp/memory.d.ts.map +1 -0
  294. package/dist/integrations/mcp/memory.js +40 -0
  295. package/dist/integrations/mcp/memory.js.map +1 -0
  296. package/dist/loaders/mcp/index.d.ts +1 -0
  297. package/dist/loaders/mcp/index.d.ts.map +1 -1
  298. package/dist/loaders/mcp/index.js +1 -0
  299. package/dist/loaders/mcp/index.js.map +1 -1
  300. package/dist/loaders/mcp/memory.d.ts +6 -0
  301. package/dist/loaders/mcp/memory.d.ts.map +1 -0
  302. package/dist/loaders/mcp/memory.js +9 -0
  303. package/dist/loaders/mcp/memory.js.map +1 -0
  304. package/dist/loaders/notifications/index.d.ts +5 -0
  305. package/dist/loaders/notifications/index.d.ts.map +1 -0
  306. package/dist/loaders/notifications/index.js +6 -0
  307. package/dist/loaders/notifications/index.js.map +1 -0
  308. package/dist/mcp/stateful-preflight.d.ts +1 -1
  309. package/dist/messaging/email-port.d.ts +49 -0
  310. package/dist/messaging/email-port.d.ts.map +1 -0
  311. package/dist/messaging/email-port.js +92 -0
  312. package/dist/messaging/email-port.js.map +1 -0
  313. package/dist/messaging/index.d.ts +1 -0
  314. package/dist/messaging/index.d.ts.map +1 -1
  315. package/dist/messaging/index.js +1 -0
  316. package/dist/messaging/index.js.map +1 -1
  317. package/dist/modules/catalog.d.ts +7 -4
  318. package/dist/modules/catalog.d.ts.map +1 -1
  319. package/dist/modules/catalog.js +24 -5
  320. package/dist/modules/catalog.js.map +1 -1
  321. package/dist/modules/contracts.d.ts +1 -1
  322. package/dist/modules/contracts.d.ts.map +1 -1
  323. package/dist/modules/contracts.js +3 -0
  324. package/dist/modules/contracts.js.map +1 -1
  325. package/dist/notifications/incident-policy.d.ts +6 -0
  326. package/dist/notifications/incident-policy.d.ts.map +1 -0
  327. package/dist/notifications/incident-policy.js +119 -0
  328. package/dist/notifications/incident-policy.js.map +1 -0
  329. package/dist/notifications/incident-schedule.d.ts +14 -0
  330. package/dist/notifications/incident-schedule.d.ts.map +1 -0
  331. package/dist/notifications/incident-schedule.js +36 -0
  332. package/dist/notifications/incident-schedule.js.map +1 -0
  333. package/dist/notifications/incident-state.d.ts +72 -0
  334. package/dist/notifications/incident-state.d.ts.map +1 -0
  335. package/dist/notifications/incident-state.js +72 -0
  336. package/dist/notifications/incident-state.js.map +1 -0
  337. package/dist/notifications/index.d.ts +9 -0
  338. package/dist/notifications/index.d.ts.map +1 -0
  339. package/dist/notifications/index.js +9 -0
  340. package/dist/notifications/index.js.map +1 -0
  341. package/dist/notifications/ops-job-failure-contract.d.ts +19 -0
  342. package/dist/notifications/ops-job-failure-contract.d.ts.map +1 -0
  343. package/dist/notifications/ops-job-failure-contract.js +183 -0
  344. package/dist/notifications/ops-job-failure-contract.js.map +1 -0
  345. package/dist/notifications/ops-job-failure-types.d.ts +81 -0
  346. package/dist/notifications/ops-job-failure-types.d.ts.map +1 -0
  347. package/dist/notifications/ops-job-failure-types.js +73 -0
  348. package/dist/notifications/ops-job-failure-types.js.map +1 -0
  349. package/dist/notifications/recipients-http.d.ts +66 -0
  350. package/dist/notifications/recipients-http.d.ts.map +1 -0
  351. package/dist/notifications/recipients-http.js +148 -0
  352. package/dist/notifications/recipients-http.js.map +1 -0
  353. package/dist/notifications/recipients.d.ts +50 -0
  354. package/dist/notifications/recipients.d.ts.map +1 -0
  355. package/dist/notifications/recipients.js +59 -0
  356. package/dist/notifications/recipients.js.map +1 -0
  357. package/dist/prompts/registry.d.ts +55 -0
  358. package/dist/prompts/registry.d.ts.map +1 -0
  359. package/dist/prompts/registry.js +76 -0
  360. package/dist/prompts/registry.js.map +1 -0
  361. package/dist/runtime/heavy-phase-queue.d.ts +101 -0
  362. package/dist/runtime/heavy-phase-queue.d.ts.map +1 -0
  363. package/dist/runtime/heavy-phase-queue.js +129 -0
  364. package/dist/runtime/heavy-phase-queue.js.map +1 -0
  365. package/dist/sessions/content-policy.d.ts +55 -0
  366. package/dist/sessions/content-policy.d.ts.map +1 -0
  367. package/dist/sessions/content-policy.js +133 -0
  368. package/dist/sessions/content-policy.js.map +1 -0
  369. package/dist/sessions/registry-admin.d.ts +19 -0
  370. package/dist/sessions/registry-admin.d.ts.map +1 -0
  371. package/dist/sessions/registry-admin.js +42 -0
  372. package/dist/sessions/registry-admin.js.map +1 -0
  373. package/dist/sessions/registry-freshness.d.ts +8 -0
  374. package/dist/sessions/registry-freshness.d.ts.map +1 -0
  375. package/dist/sessions/registry-freshness.js +108 -0
  376. package/dist/sessions/registry-freshness.js.map +1 -0
  377. package/dist/sessions/registry-ingest.d.ts +5 -0
  378. package/dist/sessions/registry-ingest.d.ts.map +1 -0
  379. package/dist/sessions/registry-ingest.js +113 -0
  380. package/dist/sessions/registry-ingest.js.map +1 -0
  381. package/dist/sessions/registry-publish.d.ts +18 -0
  382. package/dist/sessions/registry-publish.d.ts.map +1 -0
  383. package/dist/sessions/registry-publish.js +134 -0
  384. package/dist/sessions/registry-publish.js.map +1 -0
  385. package/dist/sessions/registry-store.d.ts +51 -0
  386. package/dist/sessions/registry-store.d.ts.map +1 -0
  387. package/dist/sessions/registry-store.js +134 -0
  388. package/dist/sessions/registry-store.js.map +1 -0
  389. package/dist/sessions/registry-types.d.ts +180 -0
  390. package/dist/sessions/registry-types.d.ts.map +1 -0
  391. package/dist/sessions/registry-types.js +32 -0
  392. package/dist/sessions/registry-types.js.map +1 -0
  393. package/dist/sessions/registry.d.ts +45 -0
  394. package/dist/sessions/registry.d.ts.map +1 -0
  395. package/dist/sessions/registry.js +74 -0
  396. package/dist/sessions/registry.js.map +1 -0
  397. package/dist/sessions/relay-bind.d.ts +38 -0
  398. package/dist/sessions/relay-bind.d.ts.map +1 -0
  399. package/dist/sessions/relay-bind.js +74 -0
  400. package/dist/sessions/relay-bind.js.map +1 -0
  401. package/dist/sessions/relay-brand.d.ts +2 -0
  402. package/dist/sessions/relay-brand.d.ts.map +1 -0
  403. package/dist/sessions/relay-brand.js +7 -0
  404. package/dist/sessions/relay-brand.js.map +1 -0
  405. package/dist/sessions/relay-capsule.d.ts +50 -0
  406. package/dist/sessions/relay-capsule.d.ts.map +1 -0
  407. package/dist/sessions/relay-capsule.js +72 -0
  408. package/dist/sessions/relay-capsule.js.map +1 -0
  409. package/dist/sessions/relay-chain-failure.d.ts +25 -0
  410. package/dist/sessions/relay-chain-failure.d.ts.map +1 -0
  411. package/dist/sessions/relay-chain-failure.js +23 -0
  412. package/dist/sessions/relay-chain-failure.js.map +1 -0
  413. package/dist/sessions/relay-chain.d.ts +74 -0
  414. package/dist/sessions/relay-chain.d.ts.map +1 -0
  415. package/dist/sessions/relay-chain.js +71 -0
  416. package/dist/sessions/relay-chain.js.map +1 -0
  417. package/dist/sessions/relay-composition.d.ts +8 -0
  418. package/dist/sessions/relay-composition.d.ts.map +1 -0
  419. package/dist/sessions/relay-composition.js +65 -0
  420. package/dist/sessions/relay-composition.js.map +1 -0
  421. package/dist/sessions/relay-credit.d.ts +40 -0
  422. package/dist/sessions/relay-credit.d.ts.map +1 -0
  423. package/dist/sessions/relay-credit.js +68 -0
  424. package/dist/sessions/relay-credit.js.map +1 -0
  425. package/dist/sessions/relay-engine.d.ts +19 -0
  426. package/dist/sessions/relay-engine.d.ts.map +1 -0
  427. package/dist/sessions/relay-engine.js +34 -0
  428. package/dist/sessions/relay-engine.js.map +1 -0
  429. package/dist/sessions/relay-frames.d.ts +28 -0
  430. package/dist/sessions/relay-frames.d.ts.map +1 -0
  431. package/dist/sessions/relay-frames.js +72 -0
  432. package/dist/sessions/relay-frames.js.map +1 -0
  433. package/dist/sessions/relay-lane-client.d.ts +7 -0
  434. package/dist/sessions/relay-lane-client.d.ts.map +1 -0
  435. package/dist/sessions/relay-lane-client.js +137 -0
  436. package/dist/sessions/relay-lane-client.js.map +1 -0
  437. package/dist/sessions/relay-lane-lease.d.ts +20 -0
  438. package/dist/sessions/relay-lane-lease.d.ts.map +1 -0
  439. package/dist/sessions/relay-lane-lease.js +74 -0
  440. package/dist/sessions/relay-lane-lease.js.map +1 -0
  441. package/dist/sessions/relay-lane-record.d.ts +28 -0
  442. package/dist/sessions/relay-lane-record.d.ts.map +1 -0
  443. package/dist/sessions/relay-lane-record.js +28 -0
  444. package/dist/sessions/relay-lane-record.js.map +1 -0
  445. package/dist/sessions/relay-lane-stream.d.ts +13 -0
  446. package/dist/sessions/relay-lane-stream.d.ts.map +1 -0
  447. package/dist/sessions/relay-lane-stream.js +148 -0
  448. package/dist/sessions/relay-lane-stream.js.map +1 -0
  449. package/dist/sessions/relay-routes.d.ts +368 -0
  450. package/dist/sessions/relay-routes.d.ts.map +1 -0
  451. package/dist/sessions/relay-routes.js +46 -0
  452. package/dist/sessions/relay-routes.js.map +1 -0
  453. package/dist/sessions/relay-skeleton.d.ts +4 -0
  454. package/dist/sessions/relay-skeleton.d.ts.map +1 -0
  455. package/dist/sessions/relay-skeleton.js +85 -0
  456. package/dist/sessions/relay-skeleton.js.map +1 -0
  457. package/dist/sessions/relay-types.d.ts +107 -0
  458. package/dist/sessions/relay-types.d.ts.map +1 -0
  459. package/dist/sessions/relay-types.js +2 -0
  460. package/dist/sessions/relay-types.js.map +1 -0
  461. package/dist/sessions/relay-validate.d.ts +8 -0
  462. package/dist/sessions/relay-validate.d.ts.map +1 -0
  463. package/dist/sessions/relay-validate.js +169 -0
  464. package/dist/sessions/relay-validate.js.map +1 -0
  465. package/dist/sessions/relay-wire.d.ts +8 -0
  466. package/dist/sessions/relay-wire.d.ts.map +1 -0
  467. package/dist/sessions/relay-wire.js +37 -0
  468. package/dist/sessions/relay-wire.js.map +1 -0
  469. package/dist/sessions/relay-wiring.d.ts +26 -0
  470. package/dist/sessions/relay-wiring.d.ts.map +1 -0
  471. package/dist/sessions/relay-wiring.js +13 -0
  472. package/dist/sessions/relay-wiring.js.map +1 -0
  473. package/dist/sessions/relay.d.ts +11 -0
  474. package/dist/sessions/relay.d.ts.map +1 -0
  475. package/dist/sessions/relay.js +71 -0
  476. package/dist/sessions/relay.js.map +1 -0
  477. package/dist/storage/descriptor.d.ts +1 -1
  478. package/dist/storage/errors.d.ts +1 -1
  479. package/dist/storage/identity/atomic-deletion.d.ts +4 -0
  480. package/dist/storage/identity/atomic-deletion.d.ts.map +1 -0
  481. package/dist/storage/identity/atomic-deletion.js +235 -0
  482. package/dist/storage/identity/atomic-deletion.js.map +1 -0
  483. package/dist/storage/identity/custody-composition.d.ts +9 -0
  484. package/dist/storage/identity/custody-composition.d.ts.map +1 -0
  485. package/dist/storage/identity/custody-composition.js +31 -0
  486. package/dist/storage/identity/custody-composition.js.map +1 -0
  487. package/dist/storage/identity/custody-delivery-record.d.ts +4 -0
  488. package/dist/storage/identity/custody-delivery-record.d.ts.map +1 -0
  489. package/dist/storage/identity/custody-delivery-record.js +11 -0
  490. package/dist/storage/identity/custody-delivery-record.js.map +1 -0
  491. package/dist/storage/identity/custody-host.d.ts +16 -0
  492. package/dist/storage/identity/custody-host.d.ts.map +1 -0
  493. package/dist/storage/identity/custody-host.js +5 -0
  494. package/dist/storage/identity/custody-host.js.map +1 -0
  495. package/dist/storage/identity/custody-import-deliveries.d.ts +6 -0
  496. package/dist/storage/identity/custody-import-deliveries.d.ts.map +1 -0
  497. package/dist/storage/identity/custody-import-deliveries.js +46 -0
  498. package/dist/storage/identity/custody-import-deliveries.js.map +1 -0
  499. package/dist/storage/identity/custody-import.d.ts +4 -0
  500. package/dist/storage/identity/custody-import.d.ts.map +1 -0
  501. package/dist/storage/identity/custody-import.js +364 -0
  502. package/dist/storage/identity/custody-import.js.map +1 -0
  503. package/dist/storage/identity/custody-journal-postgres.d.ts +125 -0
  504. package/dist/storage/identity/custody-journal-postgres.d.ts.map +1 -0
  505. package/dist/storage/identity/custody-journal-postgres.js +428 -0
  506. package/dist/storage/identity/custody-journal-postgres.js.map +1 -0
  507. package/dist/storage/identity/custody-journal-sqlite.d.ts +121 -0
  508. package/dist/storage/identity/custody-journal-sqlite.d.ts.map +1 -0
  509. package/dist/storage/identity/custody-journal-sqlite.js +345 -0
  510. package/dist/storage/identity/custody-journal-sqlite.js.map +1 -0
  511. package/dist/storage/identity/custody-lifecycle.d.ts +4 -0
  512. package/dist/storage/identity/custody-lifecycle.d.ts.map +1 -0
  513. package/dist/storage/identity/custody-lifecycle.js +42 -0
  514. package/dist/storage/identity/custody-lifecycle.js.map +1 -0
  515. package/dist/storage/identity/custody-postgres.d.ts +96 -0
  516. package/dist/storage/identity/custody-postgres.d.ts.map +1 -0
  517. package/dist/storage/identity/custody-postgres.js +726 -0
  518. package/dist/storage/identity/custody-postgres.js.map +1 -0
  519. package/dist/storage/identity/custody-records.d.ts +17 -0
  520. package/dist/storage/identity/custody-records.d.ts.map +1 -0
  521. package/dist/storage/identity/custody-records.js +260 -0
  522. package/dist/storage/identity/custody-records.js.map +1 -0
  523. package/dist/storage/identity/custody-shared.d.ts +28 -0
  524. package/dist/storage/identity/custody-shared.d.ts.map +1 -0
  525. package/dist/storage/identity/custody-shared.js +24 -0
  526. package/dist/storage/identity/custody-shared.js.map +1 -0
  527. package/dist/storage/identity/custody-sqlite.d.ts +93 -0
  528. package/dist/storage/identity/custody-sqlite.d.ts.map +1 -0
  529. package/dist/storage/identity/custody-sqlite.js +568 -0
  530. package/dist/storage/identity/custody-sqlite.js.map +1 -0
  531. package/dist/storage/identity/custody-tombstone-record.d.ts +3 -0
  532. package/dist/storage/identity/custody-tombstone-record.d.ts.map +1 -0
  533. package/dist/storage/identity/custody-tombstone-record.js +8 -0
  534. package/dist/storage/identity/custody-tombstone-record.js.map +1 -0
  535. package/dist/storage/identity/custody-transaction-guards.d.ts +16 -0
  536. package/dist/storage/identity/custody-transaction-guards.d.ts.map +1 -0
  537. package/dist/storage/identity/custody-transaction-guards.js +64 -0
  538. package/dist/storage/identity/custody-transaction-guards.js.map +1 -0
  539. package/dist/storage/identity/custody-transaction-ports.d.ts +9 -0
  540. package/dist/storage/identity/custody-transaction-ports.d.ts.map +1 -0
  541. package/dist/storage/identity/custody-transaction-ports.js +106 -0
  542. package/dist/storage/identity/custody-transaction-ports.js.map +1 -0
  543. package/dist/storage/identity/deletion-planes.d.ts +10 -0
  544. package/dist/storage/identity/deletion-planes.d.ts.map +1 -0
  545. package/dist/storage/identity/deletion-planes.js +54 -0
  546. package/dist/storage/identity/deletion-planes.js.map +1 -0
  547. package/dist/storage/identity/index.d.ts +18 -0
  548. package/dist/storage/identity/index.d.ts.map +1 -0
  549. package/dist/storage/identity/index.js +22 -0
  550. package/dist/storage/identity/index.js.map +1 -0
  551. package/dist/storage/identity/postgres.d.ts +16 -0
  552. package/dist/storage/identity/postgres.d.ts.map +1 -0
  553. package/dist/storage/identity/postgres.js +345 -0
  554. package/dist/storage/identity/postgres.js.map +1 -0
  555. package/dist/storage/identity/records.d.ts +12 -0
  556. package/dist/storage/identity/records.d.ts.map +1 -0
  557. package/dist/storage/identity/records.js +84 -0
  558. package/dist/storage/identity/records.js.map +1 -0
  559. package/dist/storage/identity/replica-sync.d.ts +4 -0
  560. package/dist/storage/identity/replica-sync.d.ts.map +1 -0
  561. package/dist/storage/identity/replica-sync.js +402 -0
  562. package/dist/storage/identity/replica-sync.js.map +1 -0
  563. package/dist/storage/identity/schema.d.ts +13 -0
  564. package/dist/storage/identity/schema.d.ts.map +1 -0
  565. package/dist/storage/identity/schema.js +418 -0
  566. package/dist/storage/identity/schema.js.map +1 -0
  567. package/dist/storage/identity/sqlite-schema.d.ts +4 -0
  568. package/dist/storage/identity/sqlite-schema.d.ts.map +1 -0
  569. package/dist/storage/identity/sqlite-schema.js +17 -0
  570. package/dist/storage/identity/sqlite-schema.js.map +1 -0
  571. package/dist/storage/identity/sqlite.d.ts +25 -0
  572. package/dist/storage/identity/sqlite.d.ts.map +1 -0
  573. package/dist/storage/identity/sqlite.js +233 -0
  574. package/dist/storage/identity/sqlite.js.map +1 -0
  575. package/dist/storage/identity/stores.d.ts +10 -0
  576. package/dist/storage/identity/stores.d.ts.map +1 -0
  577. package/dist/storage/identity/stores.js +5 -0
  578. package/dist/storage/identity/stores.js.map +1 -0
  579. package/dist/storage/identity/wiring.d.ts +20 -0
  580. package/dist/storage/identity/wiring.d.ts.map +1 -0
  581. package/dist/storage/identity/wiring.js +26 -0
  582. package/dist/storage/identity/wiring.js.map +1 -0
  583. package/dist/storage/identity/workspace-deletion.d.ts +3 -0
  584. package/dist/storage/identity/workspace-deletion.d.ts.map +1 -0
  585. package/dist/storage/identity/workspace-deletion.js +100 -0
  586. package/dist/storage/identity/workspace-deletion.js.map +1 -0
  587. package/dist/storage/postgres/journal.d.ts +1 -1
  588. package/dist/storage/postgres/profiles.d.ts +2 -2
  589. package/dist/storage/postgres/scope.d.ts +1 -1
  590. package/dist/storage/root-facade.d.ts +1 -1
  591. package/dist/storage/root-journal.d.ts +1 -1
  592. package/dist/storage/root-profiles.d.ts +1 -1
  593. package/docs/memory-mcp-candidate.md +46 -0
  594. package/docs/memory-mcp.md +98 -0
  595. package/examples/memory-mcp-stdio.mjs +42 -0
  596. package/package.json +66 -5
  597. package/ui/AdminUsersScreen.svelte +197 -0
  598. package/ui/AdminUsersScreen.svelte.d.ts +4 -0
  599. package/ui/LoginScreen.svelte +15 -0
  600. package/ui/LoginScreen.svelte.d.ts +4 -0
  601. package/ui/MembershipDecisionsScreen.svelte +76 -0
  602. package/ui/MembershipDecisionsScreen.svelte.d.ts +4 -0
  603. package/ui/RegistrationScreen.svelte +15 -0
  604. package/ui/RegistrationScreen.svelte.d.ts +4 -0
  605. package/ui/WorkspaceMembersScreen.svelte +86 -0
  606. package/ui/WorkspaceMembersScreen.svelte.d.ts +4 -0
  607. package/ui/auth-flow.ts +44 -0
  608. package/ui/management-ports.ts +36 -0
  609. package/ui/management-transport.ts +29 -0
  610. package/contracts/engram-memory-neutral-contract-v1.d.ts +0 -367
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relay-capsule.js","sourceRoot":"","sources":["../../src/sessions/relay-capsule.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,2EAA2E;AAC3E,2EAA2E;AAC3E,gFAAgF;AAChF,sEAAsE;AACtE,qEAAqE;AACrE,wEAAwE;AACxE,OAAO,EACL,oBAAoB,EACpB,oBAAoB,E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AAC;AAEX,iEAAiE;AACjE,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,UAAU,EAAE,KAAK;IACjB,qBAAqB,EAAE,KAAK;IAC5B,oBAAoB,EAAE,CAAC;IACvB,iBAAiB,EAAE,IAAI;CACf,CAAC;AAEX,sEAAsE;AACtE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,gBAAgB;IACtB,gBAAgB,EAAE,wBAAwB;IAC1C,uBAAuB,EAAE,wBAAwB;IACjD,cAAc,EAAE,qBAAqB;IACrC,oBAAoB,EAAE,4BAA4B;IAClD,cAAc,EAAE,sBAAsB;IACtC,cAAc,EAAE,sBAAsB;IACtC,cAAc,EAAE,sBAAsB;IACtC,YAAY,EAAE,oBAAoB;IAClC,YAAY,EAAE,oBAAoB;CAC1B,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { RelayErrorCode } from './registry-types.js';
2
+ import type { RelayRecord } from './relay-chain.js';
3
+ export type ChainFailureDecision = RelayErrorCode | 'paired-close-floor-preserved-model' | 'failure-propagation-refused';
4
+ export interface PairFailureInput {
5
+ readonly before: {
6
+ readonly consumedGeneration: number;
7
+ readonly unrelatedCircuit: string;
8
+ readonly upstream: RelayRecord;
9
+ readonly downstream: RelayRecord;
10
+ };
11
+ readonly after: {
12
+ readonly upstream: string;
13
+ readonly downstream: string;
14
+ readonly upstreamClose: RelayRecord;
15
+ readonly downstreamClose: RelayRecord;
16
+ readonly volatileBytes: number;
17
+ readonly tlsResumable: boolean;
18
+ readonly endpointSuccess: boolean;
19
+ readonly consumedGeneration: number;
20
+ readonly unrelatedCircuit: string;
21
+ };
22
+ readonly cause: string;
23
+ }
24
+ export declare function chainPairFailure(input: PairFailureInput): ChainFailureDecision;
25
+ //# sourceMappingURL=relay-chain-failure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relay-chain-failure.d.ts","sourceRoot":"","sources":["../../src/sessions/relay-chain-failure.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG,oCAAoC,GAAG,6BAA6B,CAAC;AAEzH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;QAAC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAA;KAAE,CAAC;IAC9J,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC;QACpC,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC;QACtC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;QAC/B,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;QAC/B,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;QAClC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;QACpC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;KACnC,CAAC;IACF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAID,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,gBAAgB,GAAG,oBAAoB,CAW9E"}
@@ -0,0 +1,23 @@
1
+ // pairFailure: on failure both legs close with a Close on their own tunnel/generation;
2
+ // no volatile bytes, TLS resumption, false success, floor rollback, unrelated closes.
3
+ export function chainPairFailure(input) {
4
+ const { before, after } = input;
5
+ if (after.upstream !== 'closed' || after.downstream !== 'closed')
6
+ return 'failure-propagation-refused';
7
+ if (after.upstreamClose.tunnelId !== before.upstream.tunnelId || after.upstreamClose.linkGeneration !== before.upstream.linkGeneration)
8
+ return 'failure-propagation-refused';
9
+ if (after.downstreamClose.tunnelId !== before.downstream.tunnelId || after.downstreamClose.linkGeneration !== before.downstream.linkGeneration)
10
+ return 'failure-propagation-refused';
11
+ if (after.volatileBytes !== 0)
12
+ return 'failure-propagation-refused';
13
+ if (after.tlsResumable)
14
+ return 'failure-propagation-refused';
15
+ if (after.endpointSuccess)
16
+ return 'failure-propagation-refused';
17
+ if (after.consumedGeneration !== before.consumedGeneration)
18
+ return 'failure-propagation-refused';
19
+ if (after.unrelatedCircuit !== before.unrelatedCircuit)
20
+ return 'failure-propagation-refused';
21
+ return 'paired-close-floor-preserved-model';
22
+ }
23
+ //# sourceMappingURL=relay-chain-failure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relay-chain-failure.js","sourceRoot":"","sources":["../../src/sessions/relay-chain-failure.ts"],"names":[],"mappings":"AAsBA,uFAAuF;AACvF,sFAAsF;AACtF,MAAM,UAAU,gBAAgB,CAAC,KAAuB;IACtD,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAChC,IAAI,KAAK,CAAC,QAAQ,KAAK,QAAQ,IAAI,KAAK,CAAC,UAAU,KAAK,QAAQ;QAAE,OAAO,6BAA6B,CAAC;IACvG,IAAI,KAAK,CAAC,aAAa,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC,QAAQ,IAAI,KAAK,CAAC,aAAa,CAAC,cAAc,KAAK,MAAM,CAAC,QAAQ,CAAC,cAAc;QAAE,OAAO,6BAA6B,CAAC;IAC7K,IAAI,KAAK,CAAC,eAAe,CAAC,QAAQ,KAAK,MAAM,CAAC,UAAU,CAAC,QAAQ,IAAI,KAAK,CAAC,eAAe,CAAC,cAAc,KAAK,MAAM,CAAC,UAAU,CAAC,cAAc;QAAE,OAAO,6BAA6B,CAAC;IACrL,IAAI,KAAK,CAAC,aAAa,KAAK,CAAC;QAAE,OAAO,6BAA6B,CAAC;IACpE,IAAI,KAAK,CAAC,YAAY;QAAE,OAAO,6BAA6B,CAAC;IAC7D,IAAI,KAAK,CAAC,eAAe;QAAE,OAAO,6BAA6B,CAAC;IAChE,IAAI,KAAK,CAAC,kBAAkB,KAAK,MAAM,CAAC,kBAAkB;QAAE,OAAO,6BAA6B,CAAC;IACjG,IAAI,KAAK,CAAC,gBAAgB,KAAK,MAAM,CAAC,gBAAgB;QAAE,OAAO,6BAA6B,CAAC;IAC7F,OAAO,oCAAoC,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,74 @@
1
+ import type { RelayErrorCode } from './registry-types.js';
2
+ export type ChainDecision = 'allow' | RelayErrorCode | 'paired-opened-model' | 'paired-awaiting-downstream' | 'paired-close-floor-preserved-model' | 'failure-propagation-refused';
3
+ export interface PathCheckInput {
4
+ readonly path: readonly string[];
5
+ readonly hopIndex: number;
6
+ readonly visited: readonly string[];
7
+ readonly sender: string;
8
+ readonly receiver: string;
9
+ readonly approved: boolean;
10
+ readonly distributed: boolean;
11
+ readonly revocationCaughtUp: boolean;
12
+ readonly reservationConsumed: boolean;
13
+ readonly competingPair: boolean;
14
+ }
15
+ export declare const RELAY_MAX_LINKS = 3;
16
+ export declare function chainPathCheck(input: PathCheckInput): ChainDecision;
17
+ export interface FrameCheckInput {
18
+ readonly frame: {
19
+ readonly kind?: string;
20
+ } & Record<string, unknown>;
21
+ readonly state: {
22
+ readonly opened?: boolean;
23
+ } & Record<string, unknown>;
24
+ }
25
+ export declare function chainFrameCheck(input: FrameCheckInput): ChainDecision;
26
+ export interface RelayRecord extends Record<string, unknown> {
27
+ readonly format?: string;
28
+ readonly kind?: string;
29
+ readonly tunnelId?: string;
30
+ readonly linkGeneration?: number;
31
+ readonly hopIndex?: number;
32
+ readonly visitedInstanceIds?: readonly string[];
33
+ readonly adjacentGrantRef?: unknown;
34
+ readonly peerProofRef?: unknown;
35
+ }
36
+ interface PreparedRecord {
37
+ readonly path: readonly string[];
38
+ readonly circuitId: string;
39
+ readonly lane: string;
40
+ readonly upstream: {
41
+ readonly tunnelId: string;
42
+ readonly linkGeneration: number;
43
+ readonly grantRef: unknown;
44
+ readonly peerProofRef: unknown;
45
+ };
46
+ readonly downstream: {
47
+ readonly tunnelId: string;
48
+ readonly linkGeneration: number;
49
+ readonly grantRef: unknown;
50
+ readonly peerProofRef: unknown;
51
+ };
52
+ readonly descriptorDigest: string;
53
+ readonly preparationId: string;
54
+ readonly routeId: string;
55
+ readonly routeRevision: number;
56
+ readonly routeGeneration: number;
57
+ readonly sessionRef: unknown;
58
+ readonly endpointAdmissionRefs: unknown;
59
+ }
60
+ export interface OpenPairInput {
61
+ readonly preparedCoordinatesVerified: boolean;
62
+ readonly reservationUnused: boolean;
63
+ readonly competingPair: boolean;
64
+ readonly incoming: RelayRecord;
65
+ readonly outgoing: RelayRecord;
66
+ readonly prepared: PreparedRecord;
67
+ readonly downstreamReady: boolean;
68
+ readonly upstreamReady: boolean;
69
+ readonly downstreamOpened: RelayRecord | null;
70
+ readonly upstreamOpened: RelayRecord | null;
71
+ }
72
+ export declare function chainOpenPair(input: OpenPairInput): ChainDecision;
73
+ export {};
74
+ //# sourceMappingURL=relay-chain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relay-chain.d.ts","sourceRoot":"","sources":["../../src/sessions/relay-chain.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,cAAc,GAAG,qBAAqB,GAAG,4BAA4B,GAAG,oCAAoC,GAAG,6BAA6B,CAAC;AAEnL,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,M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AQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,gBAAgB,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9C,QAAQ,CAAC,cAAc,EAAE,WAAW,GAAG,IAAI,CAAC;CAC7C;AAQD,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,aAAa,CA4BjE"}
@@ -0,0 +1,71 @@
1
+ // Max links per circuit (B→L→A is 2; a 4th link is refused).
2
+ export const RELAY_MAX_LINKS = 3;
3
+ // pathCheck: visited must be the exact path prefix through hopIndex; sender/receiver
4
+ // the adjacent nodes; no repeated instance (loop); ≤ RELAY_MAX_LINKS links; approved
5
+ // and fully distributed (else scope); consumed reservation / competing pair = stale.
6
+ export function chainPathCheck(input) {
7
+ const { path, hopIndex, visited, sender, receiver } = input;
8
+ if (visited.length !== hopIndex + 1 || !visited.every((v, i) => v === path[i]))
9
+ return 'relay_route_conflict';
10
+ if (sender !== path[hopIndex] || receiver !== path[hopIndex + 1])
11
+ return 'relay_route_conflict';
12
+ if (new Set(path).size !== path.length || visited.includes(receiver))
13
+ return 'relay_loop';
14
+ if (path.length - 1 > RELAY_MAX_LINKS)
15
+ return 'relay_hop_limit';
16
+ if (!input.approved || !input.distributed)
17
+ return 'relay_scope_refused';
18
+ if (input.reservationConsumed || input.competingPair)
19
+ return 'relay_stale_generation';
20
+ return 'allow';
21
+ }
22
+ // frameCheck: no Data (or Credit) before Opened on the link.
23
+ export function chainFrameCheck(input) {
24
+ if ((input.frame.kind === 'data' || input.frame.kind === 'credit') && input.state.opened === false) {
25
+ return 'relay_protocol_refused';
26
+ }
27
+ return 'allow';
28
+ }
29
+ const eq = (a, b) => JSON.stringify(a) === JSON.stringify(b);
30
+ // openPair: only tunnelId, linkGeneration, hopIndex, visitedInstanceIds,
31
+ // adjacentGrantRef and peerProofRef change on the downstream leg. A foreign
32
+ // adjacent grant is a scope refusal; other mismatches are route conflicts; an
33
+ // upstream Opened before the downstream leg is ready is a protocol violation.
34
+ export function chainOpenPair(input) {
35
+ if (input.competingPair || !input.reservationUnused)
36
+ return 'relay_stale_generation';
37
+ const { incoming, outgoing, prepared } = input;
38
+ const shared = ['descriptorDigest', 'preparationId', 'routeId', 'routeRevision', 'routeGeneration', 'sessionRef', 'circuitId', 'lane', 'endpointAdmissionRefs'];
39
+ for (const key of shared) {
40
+ if (!eq(incoming[key], prepared[key]))
41
+ return 'relay_route_conflict';
42
+ }
43
+ if (!eq(incoming.adjacentGrantRef, prepared.upstream.grantRef) || !eq(incoming.peerProofRef, prepared.upstream.peerProofRef)) {
44
+ return 'relay_scope_refused';
45
+ }
46
+ if (!eq(outgoing.adjacentGrantRef, prepared.downstream.grantRef))
47
+ return 'relay_scope_refused';
48
+ const expected = {
49
+ ...incoming,
50
+ tunnelId: prepared.downstream.tunnelId,
51
+ linkGeneration: prepared.downstream.linkGeneration,
52
+ hopIndex: (incoming.hopIndex ?? 0) + 1,
53
+ visitedInstanceIds: [...(incoming.visitedInstanceIds ?? []), prepared.path[(incoming.hopIndex ?? 0) + 1]],
54
+ adjacentGrantRef: prepared.downstream.grantRef,
55
+ peerProofRef: prepared.downstream.peerProofRef,
56
+ };
57
+ for (const key of Object.keys(expected)) {
58
+ if (!eq(outgoing[key], expected[key]))
59
+ return 'relay_route_conflict';
60
+ }
61
+ if (input.upstreamOpened && input.upstreamReady && !input.downstreamReady)
62
+ return 'relay_protocol_refused';
63
+ if (input.upstreamOpened && input.upstreamOpened.tunnelId !== incoming.tunnelId)
64
+ return 'relay_route_conflict';
65
+ if (input.downstreamOpened && input.downstreamOpened.tunnelId !== outgoing.tunnelId)
66
+ return 'relay_route_conflict';
67
+ if (input.upstreamReady && input.downstreamReady && input.upstreamOpened && input.downstreamOpened)
68
+ return 'paired-opened-model';
69
+ return 'paired-awaiting-downstream';
70
+ }
71
+ //# sourceMappingURL=relay-chain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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BAAqB,CAAC;IACjI,OAAO,4BAA4B,CAAC;AACtC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { SessionRelayHostCompositionV1 } from './relay-types.js';
2
+ /** Keys trusted host composition may supply (exhaustive, exact-key checked). */
3
+ export declare const SESSION_RELAY_HOST_COMPOSITION_KEYS: readonly string[];
4
+ /** What stays inside mesh — never a host argument (see relay-wiring, internal). */
5
+ export declare const SESSION_RELAY_MESH_INTERNAL: readonly string[];
6
+ export declare function validateHostComposition(composition: unknown): string | null;
7
+ export declare function hostSuppliedComposition(composition: SessionRelayHostCompositionV1): SessionRelayHostCompositionV1;
8
+ //# sourceMappingURL=relay-composition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relay-composition.d.ts","sourceRoot":"","sources":["../../src/sessions/relay-composition.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AAEtE,gFAAgF;AAChF,eAAO,MAAM,mCAAmC,EAAE,SAAS,MAAM,EAIhE,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,2BAA2B,EAAE,SAAS,MAAM,EAaxD,CAAC;AAKF,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CA2B3E;AAKD,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,6BAA6B,GAAG,6BAA6B,CAMjH"}
@@ -0,0 +1,65 @@
1
+ /** Keys trusted host composition may supply (exhaustive, exact-key checked). */
2
+ export const SESSION_RELAY_HOST_COMPOSITION_KEYS = [
3
+ 'processBindingRef',
4
+ 'sourceCredentials',
5
+ 'now',
6
+ ];
7
+ /** What stays inside mesh — never a host argument (see relay-wiring, internal). */
8
+ export const SESSION_RELAY_MESH_INTERNAL = [
9
+ 'endpointRegistry',
10
+ 'installationSigner',
11
+ 'workloadSigner',
12
+ 'grantResolver',
13
+ 'tlsPins',
14
+ 'spkiPins',
15
+ 'socketFactory',
16
+ 'http2Factory',
17
+ 'url',
18
+ 'wirePrefix',
19
+ 'adjacentGrantRef',
20
+ 'endpointAdmissionRefs',
21
+ ];
22
+ // validateHostComposition returns a defect string or null. Shape defects are
23
+ // reported to the port, which converts them to TypeError (invalid JS API use),
24
+ // never to a typed relay refusal.
25
+ export function validateHostComposition(composition) {
26
+ if (typeof composition !== 'object' || composition === null || Array.isArray(composition)) {
27
+ return 'composition must be a single named object';
28
+ }
29
+ const keys = Object.keys(composition);
30
+ for (const key of keys) {
31
+ if (!SESSION_RELAY_HOST_COMPOSITION_KEYS.includes(key)) {
32
+ return `unlisted composition key: ${key}`;
33
+ }
34
+ }
35
+ for (const key of SESSION_RELAY_HOST_COMPOSITION_KEYS) {
36
+ if (!keys.includes(key))
37
+ return `missing composition key: ${key}`;
38
+ }
39
+ const c = composition;
40
+ const pbr = c.processBindingRef;
41
+ if (typeof pbr !== 'object' || pbr === null
42
+ || typeof pbr.id !== 'string'
43
+ || typeof pbr.revision !== 'number'
44
+ || typeof pbr.digest !== 'string') {
45
+ return 'processBindingRef must be { id: string, revision: number, digest: string }';
46
+ }
47
+ const sc = c.sourceCredentials;
48
+ if (typeof sc !== 'object' || sc === null || typeof sc.resolve !== 'function') {
49
+ return 'sourceCredentials must be an immutable provider with resolve()';
50
+ }
51
+ if (typeof c.now !== 'function')
52
+ return 'now must be a function';
53
+ return null;
54
+ }
55
+ // splitComposition: the host-supplied half of a connect call. The mesh-internal
56
+ // half is only ever obtained from the registered wiring seam (relay-wiring),
57
+ // never from the caller.
58
+ export function hostSuppliedComposition(composition) {
59
+ return {
60
+ processBindingRef: composition.processBindingRef,
61
+ sourceCredentials: composition.sourceCredentials,
62
+ now: composition.now,
63
+ };
64
+ }
65
+ //# sourceMappingURL=relay-composition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relay-composition.js","sourceRoot":"","sources":["../../src/sessions/relay-composition.ts"],"names":[],"mappings":"AAQA,gFAAgF;AAChF,MAAM,CAAC,MAAM,mCAAmC,GAA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4E,CAAC;IACtF,CAAC;IACD,MAAM,EAAE,GAAG,CAAC,CAAC,iBAAiB,CAAC;IAC/B,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,KAAK,IAAI,IAAI,OAAQ,EAA8B,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;QAC3G,OAAO,gEAAgE,CAAC;IAC1E,CAAC;IACD,IAAI,OAAO,CAAC,CAAC,GAAG,KAAK,UAAU;QAAE,OAAO,wBAAwB,CAAC;IACjE,OAAO,IAAI,CAAC;AACd,CAAC;AAED,gFAAgF;AAChF,6EAA6E;AAC7E,yBAAyB;AACzB,MAAM,UAAU,uBAAuB,CAAC,WAA0C;IAChF,OAAO;QACL,iBAAiB,EAAE,WAAW,CAAC,iBAAiB;QAChD,iBAAiB,EAAE,WAAW,CAAC,iBAAiB;QAChD,GAAG,EAAE,WAAW,CAAC,GAAG;KACrB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,40 @@
1
+ import type { RelayErrorCode } from './registry-types.js';
2
+ export type FrameDecision = 'allow' | RelayErrorCode | 'duplicate-no-grant';
3
+ export type TransferDecision = 'independent-credit-and-transfer-model' | 'premature-uncharge' | 'frame-map-required' | 'reservation-accounting-refused' | RelayErrorCode;
4
+ export declare const RELAY_LINK_MAX_FRAMES = 8;
5
+ export declare const RELAY_LINK_MAX_PAYLOAD_BYTES = 131072;
6
+ export interface CreditFrame {
7
+ readonly circuitId: string;
8
+ readonly tunnelId: string;
9
+ readonly lane: string;
10
+ readonly direction: string;
11
+ readonly linkGeneration: number;
12
+ readonly creditRevision: number;
13
+ readonly receivedThroughFrame: number;
14
+ readonly receivedThroughOffset: number;
15
+ readonly sendLimitFrame: number;
16
+ readonly sendLimitOffset: number;
17
+ }
18
+ export interface CreditState extends CreditFrame {
19
+ readonly lastCredit: CreditFrame | null;
20
+ readonly frameEnds: readonly (readonly [number, number])[];
21
+ readonly opened: boolean;
22
+ }
23
+ export declare function chainCreditCheck(credit: CreditFrame, state: CreditState): FrameDecision;
24
+ export interface CreditTransferInput {
25
+ readonly upstream: CreditFrame;
26
+ readonly downstream: CreditFrame;
27
+ readonly queueBefore: number;
28
+ readonly reservedBefore: number;
29
+ readonly queueAfter: number;
30
+ readonly reservedAfter: number;
31
+ readonly totalBefore: number;
32
+ readonly totalAfter: number;
33
+ readonly upstreamNewCapacity: number;
34
+ readonly downstreamReceiptValidated: boolean;
35
+ readonly reservedAfterReceipt: number;
36
+ readonly copiedDownstreamCredit: boolean;
37
+ readonly downstreamReceipt?: CreditFrame;
38
+ }
39
+ export declare function chainCreditTransfer(input: CreditTransferInput): TransferDecision;
40
+ //# sourceMappingURL=relay-credit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relay-credit.d.ts","sourceRoot":"","sources":["../../src/sessions/relay-credit.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,cAAc,GAAG,oBAAoB,CAAC;AAC5E,MAAM,MAAM,gBAAgB,GAAG,uCAAuC,GAAG,oBAAoB,GAAG,oBAAoB,GAAG,gCAAgC,GAAG,cAAc,CAAC;AAEzK,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,eAAO,MAAM,4BAA4B,SAAS,CAAC;AAEnD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,cAAc,E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ic —
4
+ // foreign tuple, credit before Opened, old revision, same-revision conflict,
5
+ // non-boundary ack and a regressed ceiling are frame conflicts; a duplicate of
6
+ // the current credit grants nothing; a window beyond 8 frames / 131072 bytes of
7
+ // outstanding payload is backpressure.
8
+ export function chainCreditCheck(credit, state) {
9
+ const tuple = ['circuitId', 'tunnelId', 'lane', 'direction', 'linkGeneration'];
10
+ for (const key of tuple)
11
+ if (credit[key] !== state[key])
12
+ return 'relay_frame_conflict';
13
+ if (state.opened === false)
14
+ return 'relay_protocol_refused';
15
+ if (credit.creditRevision < state.creditRevision)
16
+ return 'relay_frame_conflict';
17
+ if (credit.creditRevision === state.creditRevision) {
18
+ const same = credit.receivedThroughFrame === state.receivedThroughFrame
19
+ && credit.receivedThroughOffset === state.receivedThroughOffset
20
+ && credit.sendLimitFrame === state.sendLimitFrame
21
+ && credit.sendLimitOffset === state.sendLimitOffset;
22
+ return same ? 'duplicate-no-grant' : 'relay_frame_conflict';
23
+ }
24
+ if (credit.creditRevision > state.creditRevision + 1)
25
+ return 'relay_frame_conflict';
26
+ if (!state.frameEnds.some(([f, o]) => f === credit.receivedThroughFrame && o === credit.receivedThroughOffset))
27
+ return 'relay_frame_conflict';
28
+ if (credit.sendLimitFrame < state.sendLimitFrame || credit.sendLimitOffset < state.sendLimitOffset)
29
+ return 'relay_frame_conflict';
30
+ if (credit.sendLimitFrame - credit.receivedThroughFrame > RELAY_LINK_MAX_FRAMES)
31
+ return 'relay_backpressure';
32
+ if (credit.sendLimitOffset - credit.receivedThroughOffset > RELAY_LINK_MAX_PAYLOAD_BYTES)
33
+ return 'relay_backpressure';
34
+ return 'allow';
35
+ }
36
+ // creditTransfer: each link keeps an independent credit ledger — charges
37
+ // transfer once (queue → reserved, total constant), never copied downstream.
38
+ // A reservation may be released only by a validated receipt on the downstream
39
+ // leg that is current (its own generation, next revision) and advancing.
40
+ export function chainCreditTransfer(input) {
41
+ if (input.copiedDownstreamCredit)
42
+ return 'relay_frame_conflict';
43
+ if (!(input.upstream.receivedThroughOffset > input.downstream.receivedThroughOffset))
44
+ return 'frame-map-required';
45
+ if (input.upstreamNewCapacity > 0 && input.reservedAfter !== input.reservedBefore)
46
+ return 'reservation-accounting-refused';
47
+ if (input.totalBefore !== input.totalAfter)
48
+ return 'relay_frame_conflict';
49
+ if (input.queueAfter + input.reservedAfter !== input.queueBefore + input.reservedBefore)
50
+ return 'relay_frame_conflict';
51
+ if (input.reservedAfterReceipt < input.reservedAfter) {
52
+ const r = input.downstreamReceipt;
53
+ const d = input.downstream;
54
+ if (!input.downstreamReceiptValidated || !r)
55
+ return 'premature-uncharge';
56
+ if (r.tunnelId !== d.tunnelId || r.lane !== d.lane || r.direction !== d.direction)
57
+ return 'premature-uncharge';
58
+ if (r.linkGeneration !== d.linkGeneration)
59
+ return 'premature-uncharge';
60
+ if (r.creditRevision !== d.creditRevision + 1)
61
+ return 'premature-uncharge';
62
+ if (!(r.receivedThroughFrame > d.receivedThroughFrame
63
+ || (r.receivedThroughFrame === d.receivedThroughFrame && r.receivedThroughOffset > d.receivedThroughOffset)))
64
+ return 'premature-uncharge';
65
+ }
66
+ return 'independent-credit-and-transfer-model';
67
+ }
68
+ //# sourceMappingURL=relay-credit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relay-credit.js","sourceRoot":"","sources":["../../src/sessions/relay-credit.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AACvC,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAqBnD,gFAAgF;AAChF,6EAA6E;AAC7E,+EAA+E;AAC/E,gFAAgF;AAChF,uCAAuC;AACvC,MAAM,UAAU,gBAAgB,CAAC,MAAmB,EAAE,KAAkB;IACtE,MAAM,KAAK,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,CAAU,CAAC;IACxF,KAAK,MAAM,GAAG,IAAI,KAAK;QAAE,IAAI,MAAM,CA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G,CAAC;YAAE,OAAO,oBAAoB,CAAC;QAC3E,IAAI,CAAC,CAAC,CAAC,CAAC,oBAAoB,GAAG,CAAC,CAAC,oBAAoB;eAChD,CAAC,CAAC,CAAC,oBAAoB,KAAK,CAAC,CAAC,oBAAoB,IAAI,CAAC,CAAC,qBAAqB,GAAG,CAAC,CAAC,qBAAqB,CAAC,CAAC;YAAE,OAAO,oBAAoB,CAAC;IAC9I,CAAC;IACD,OAAO,uCAAuC,CAAC;AACjD,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { RelayError } from './registry-types.js';
2
+ import type { BindGuardInput, SocketConstructionInput } from './relay-bind.js';
3
+ import type { OpenPairInput, PathCheckInput } from './relay-chain.js';
4
+ import type { TranslationInput } from './relay-frames.js';
5
+ export interface EstablishmentVectors {
6
+ readonly pathCheck: PathCheckInput;
7
+ readonly openPair: OpenPairInput;
8
+ readonly bindGuard: BindGuardInput;
9
+ readonly socketConstruction: SocketConstructionInput;
10
+ readonly frames?: TranslationInput;
11
+ }
12
+ export type EstablishmentResult = {
13
+ readonly status: 'established';
14
+ } | {
15
+ readonly status: 'refused';
16
+ readonly error: RelayError;
17
+ };
18
+ export declare function runEstablishment(vectors: EstablishmentVectors): EstablishmentResult;
19
+ //# sourceMappingURL=relay-engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relay-engine.d.ts","sourceRoot":"","sources":["../../src/sessions/relay-engine.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE/E,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;IACnC,QAAQ,CAAC,kBAAkB,EAAE,uBAAuB,CAAC;IACrD,QAAQ,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC;CACpC;AAED,MAAM,MAAM,mBAAmB,GAC3B;IAAE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAA;CAAE,GAClC;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CAAC;AAI/D,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,CAkBnF"}
@@ -0,0 +1,34 @@
1
+ // Establishment-sequence engine core (L-4): validates the full
2
+ // prepare → upgrade/Open/Opened → Bind/Bound chain through the frozen
3
+ // CHAIN-ESTABLISH-2 / CHAIN-FRAME-TRANSLATION / CHAIN-BIND evaluators. The live
4
+ // wire engine (relay-2/3) drives this with real link adapters; the test fakes
5
+ // drive it with scripted records. With DEP-FED a source-gap no production wiring
6
+ // is registered, so this never runs outside tests — live routes stay DISABLED.
7
+ import { relayError } from './registry-types.js';
8
+ import { chainBindGuard, chainSocketConstruction } from './relay-bind.js';
9
+ import { chainOpenPair, chainPathCheck } from './relay-chain.js';
10
+ import { chainTranslateFrames } from './relay-frames.js';
11
+ // runEstablishment: every stage must pass its frozen vector family; the first
12
+ // failure wins and maps to its typed relay error (fail-closed, no local fill).
13
+ export function runEstablishment(vectors) {
14
+ const path = chainPathCheck(vectors.pathCheck);
15
+ if (path !== 'allow')
16
+ return { status: 'refused', error: relayError(path) };
17
+ const pair = chainOpenPair(vectors.openPair);
18
+ if (pair !== 'paired-opened-model' && pair !== 'paired-awaiting-downstream') {
19
+ return { status: 'refused', error: relayError(pair) };
20
+ }
21
+ if (vectors.frames) {
22
+ const frames = chainTranslateFrames(vectors.frames);
23
+ if (frames.decision !== 'allow')
24
+ return { status: 'refused', error: relayError(frames.decision) };
25
+ }
26
+ if (chainBindGuard(vectors.bindGuard) !== 'allow-model') {
27
+ return { status: 'refused', error: relayError('relay_protocol_refused') };
28
+ }
29
+ if (chainSocketConstruction(vectors.socketConstruction) !== 'allow-model') {
30
+ return { status: 'refused', error: relayError('relay_protocol_refused') };
31
+ }
32
+ return { status: 'established' };
33
+ }
34
+ //# sourceMappingURL=relay-engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relay-engine.js","sourceRoot":"","sources":["../../src/sessions/relay-engine.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,sEAAsE;AACtE,gFAAgF;AAChF,8EAA8E;AAC9E,iFAAiF;AACjF,+EAA+E;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAezD,8EAA8E;AAC9E,+EAA+E;AAC/E,MAAM,UAAU,gBAAgB,CAAC,OAA6B;IAC5D,MAAM,IAAI,GAAG,cAAc,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/C,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,IAA0B,CAAC,EAAE,CAAC;IAClG,MAAM,IAAI,GAAG,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7C,IAAI,IAAI,KAAK,qBAAqB,IAAI,IAAI,KAAK,4BAA4B,EAAE,CAAC;QAC5E,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,IAA0B,CAAC,EAAE,CAAC;IAC9E,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,MAAM,MAAM,GAAG,oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO;YAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IACpG,CAAC;IACD,IAAI,cAAc,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,aAAa,EAAE,CAAC;QACxD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,wBAAwB,CAAC,EAAE,CAAC;IAC5E,CAAC;IACD,IAAI,uBAAuB,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,aAAa,EAAE,CAAC;QAC1E,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,wBAAwB,CAAC,EAAE,CAAC;IAC5E,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;AACnC,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { RelayErrorCode } from './registry-types.js';
2
+ export interface DataFrame {
3
+ readonly kind: 'data';
4
+ readonly circuitId: string;
5
+ readonly tunnelId: string;
6
+ readonly lane: string;
7
+ readonly direction: string;
8
+ readonly linkGeneration: number;
9
+ readonly frameSequence: number;
10
+ readonly byteOffset: number;
11
+ readonly byteLength: number;
12
+ readonly ciphertext: string;
13
+ }
14
+ export interface TranslationInput {
15
+ readonly incoming: readonly DataFrame[];
16
+ readonly outgoing: readonly DataFrame[];
17
+ }
18
+ export interface TranslationResult {
19
+ readonly decision: 'allow' | RelayErrorCode;
20
+ readonly byteLength: number;
21
+ readonly sha256: string;
22
+ readonly incomingFrames: number;
23
+ readonly outgoingFrames: number;
24
+ }
25
+ export declare const RELAY_DATA_MAX_ENCODED = 24576;
26
+ export declare const RELAY_DATA_MAX_DECODED = 16384;
27
+ export declare function chainTranslateFrames(input: TranslationInput): Tran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}
@@ -0,0 +1,72 @@
1
+ // CHAIN-FRAME-TRANSLATION frame re-framing evaluator (RC2.contract r3,
2
+ // vectors/state-transitions.json family CHAIN-FRAME-TRANSLATION, evaluator
3
+ // translation). Pure functions; no I/O.
4
+ import { createHash } from 'node:crypto';
5
+ export const RELAY_DATA_MAX_ENCODED = 24576;
6
+ export const RELAY_DATA_MAX_DECODED = 16384;
7
+ const b64 = (s) => new Uint8Array(Buffer.from(s, 'base64'));
8
+ function concatCiphertext(frames) {
9
+ let expectedOffset = 0;
10
+ let expectedSequence = 1;
11
+ const parts = [];
12
+ for (const f of frames) {
13
+ if (f.byteOffset !== expectedOffset || f.frameSequence !== expectedSequence)
14
+ return null;
15
+ const bytes = b64(f.ciphertext);
16
+ if (bytes.length !== f.byteLength)
17
+ return null;
18
+ parts.push(bytes);
19
+ expectedOffset += f.byteLength;
20
+ expectedSequence += 1;
21
+ }
22
+ const total = parts.reduce((n, p) => n + p.length, 0);
23
+ const out = new Uint8Array(total);
24
+ let o = 0;
25
+ for (const p of parts) {
26
+ out.set(p, o);
27
+ o += p.length;
28
+ }
29
+ return out;
30
+ }
31
+ // translation: the next link re-frames the identical byte stream — new tunnelId
32
+ // and linkGeneration, counters restart at 1/0, ciphertext preserved byte-for-
33
+ // byte. Any mutation, gap or overlap is a frame conflict.
34
+ export function chainTranslateFrames(input) {
35
+ const { incoming, outgoing } = input;
36
+ if (incoming.length === 0 || outgoing.length === 0) {
37
+ return { decision: 'relay_frame_conflict', byteLength: 0, sha256: '', incomingFrames: incoming.length, outgoingFrames: outgoing.length };
38
+ }
39
+ const inBytes = concatCiphertext(incoming);
40
+ const outBytes = concatCiphertext(outgoing);
41
+ if (!inBytes || !outBytes) {
42
+ return { decision: 'relay_frame_conflict', byteLength: 0, sha256: '', incomingFrames: incoming.length, outgoingFrames: outgoing.length };
43
+ }
44
+ const head = incoming[0];
45
+ for (const f of incoming) {
46
+ if (f.tunnelId !== head.tunnelId || f.linkGeneration !== head.linkGeneration) {
47
+ return { decision: 'relay_frame_conflict', byteLength: 0, sha256: '', incomingFrames: incoming.length, outgoingFrames: outgoing.length };
48
+ }
49
+ }
50
+ for (const f of [...incoming, ...outgoing]) {
51
+ if (f.circuitId !== head.circuitId || f.lane !== head.lane || f.direction !== head.direction) {
52
+ return { decision: 'relay_frame_conflict', byteLength: 0, sha256: '', incomingFrames: incoming.length, outgoingFrames: outgoing.length };
53
+ }
54
+ }
55
+ const outHead = outgoing[0];
56
+ for (const f of outgoing) {
57
+ if (f.tunnelId !== outHead.tunnelId || f.linkGeneration !== outHead.linkGeneration) {
58
+ return { decision: 'relay_frame_conflict', byteLength: 0, sha256: '', incomingFrames: incoming.length, outgoingFrames: outgoing.length };
59
+ }
60
+ }
61
+ if (inBytes.length !== outBytes.length) {
62
+ return { decision: 'relay_frame_conflict', byteLength: inBytes.length, sha256: '', incomingFrames: incoming.length, outgoingFrames: outgoing.length };
63
+ }
64
+ for (let i = 0; i < inBytes.length; i += 1) {
65
+ if (inBytes[i] !== outBytes[i]) {
66
+ return { decision: 'relay_frame_conflict', byteLength: inBytes.length, sha256: '', incomingFrames: incoming.length, outgoingFrames: outgoing.length };
67
+ }
68
+ }
69
+ const sha256 = createHash('sha256').update(inBytes).digest('hex');
70
+ return { decision: 'allow', byteLength: inBytes.length, sha256, incomingFrames: incoming.length, outgoingFrames: outgoing.length };
71
+ }
72
+ //# sourceMappingURL=relay-frames.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relay-frames.js","sourceRoot":"","sources":["../../src/sessions/relay-frames.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,2EAA2E;AAC3E,wCAAwC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA6BzC,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC;AAC5C,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC;AAE5C,MAAM,GAAG,GAAG,CAAC,CAAS,EAAc,EAAE,CAAC,IAAI,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AAM,EAAE,MAAM,EAAE,EAAE,EAAE,cAAc,EAAE,QAAQ,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;QACxJ,CAAC;IACH,CAAC;IACD,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAClE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;AACrI,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { LaneClientEngineDepsV1 } from './relay-lane-lease.js';
2
+ import type { SessionRelayLaneCallV1 } from './relay-lane-record.js';
3
+ import type { SessionRelayLaneClientV1 } from './relay-types.js';
4
+ export type { LaneClientEngineDepsV1, SessionRelayLaneCallV1 };
5
+ export type { LaneStreamSourceV1, SessionRelayLaneTransportV1 } from './relay-lane-record.js';
6
+ export declare function createLaneClientEngine(deps: LaneClientEngineDepsV1): SessionRelayLaneClientV1;
7
+ //# sourceMappingURL=relay-lane-client.d.ts.map