@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,428 @@
1
+ // A2.0b deletion journal, revocation outbox and core-table transaction layer
2
+ // on the PostgreSQL profile. Shares the caller's PgSession — and therefore
3
+ // the host transaction — with the custody stores; never begins or commits.
4
+ import { decodeRevocationDelivery, sameRevocationTarget } from './custody-delivery-record.js';
5
+ import { decodeLegacyConnectorTombstone } from './custody-tombstone-record.js';
6
+ import { createHash } from 'node:crypto';
7
+ import { IdentityCustodyErrorV1 } from '../../identity-contracts/custody-errors.js';
8
+ import { IdentityEmailCreateCollision } from './custody-shared.js';
9
+ import { identityTable } from './schema.js';
10
+ export class PostgresCustodyJournal {
11
+ schema;
12
+ session;
13
+ constructor(schema, session) {
14
+ this.schema = schema;
15
+ this.session = session;
16
+ }
17
+ t = (table) => identityTable('postgres', this.schema, table);
18
+ cm = (table) => `"${this.schema}"."${table}"`;
19
+ one = async (decode, text, values) => {
20
+ const result = await this.session.execute({ text, values });
21
+ return result.rows.length > 0 ? decode(result.rows[0]) : null;
22
+ };
23
+ // -- Subject fences -------------------------------------------------------
24
+ async ensureLiveFence(userId, at) {
25
+ await this.session.execute({
26
+ text: `INSERT INTO ${this.t('identity_subject_fences')} ("user_id","revision","updated_at","retired_at") VALUES ($1,0,$2,NULL) ON CONFLICT ("user_id") DO NOTHING`,
27
+ values: [userId, at],
28
+ });
29
+ const fence = await this.one((row) => ({ retiredAt: row['retired_at'] ?? null }), `SELECT "retired_at" FROM ${this.t('identity_subject_fences')} WHERE "user_id" = $1`, [userId]);
30
+ if (fence?.retiredAt !== null && fence?.retiredAt !== undefined)
31
+ throw new IdentityCustodyErrorV1('identity_subject_retired');
32
+ }
33
+ async retireFence(userId, at) {
34
+ const result = await this.session.execute({
35
+ text: `UPDATE ${this.t('identity_subject_fences')} SET "retired_at" = $2, "revision" = "revision" + 1, "updated_at" = $2 WHERE "user_id" = $1 AND "retired_at" IS NULL`,
36
+ values: [userId, at],
37
+ });
38
+ if ((result.rowCount ?? 0) === 0)
39
+ throw new IdentityCustodyErrorV1('identity_subject_retired');
40
+ }
41
+ // -- Deletion operations --------------------------------------------------
42
+ static requestDigestV1(userId, actorId, handlerId, operationId) {
43
+ return createHash('sha256').update(JSON.stringify(['A2.0b', '2.0.0', userId, actorId, handlerId]), 'utf8').digest('hex');
44
+ }
45
+ async reserveOperation(op) {
46
+ try {
47
+ await this.session.execute({
48
+ text: `INSERT INTO ${this.t('identity_deletion_operations')} ("operation_id","user_id","actor_id","handler_id","request_digest","state","created_at","committed_at","committed_receipt_json") VALUES ($1,$2,$3,$4,$5,'queued',$6,NULL,NULL)`,
49
+ values: [op.operationId, op.userId, op.actorId, op.handlerId, op.requestDigest, op.createdAt],
50
+ });
51
+ return 'reserved';
52
+ }
53
+ catch (error) {
54
+ if (String(error.code ?? '') !== '23505')
55
+ throw error;
56
+ const existing = await this.findOperation(op.operationId);
57
+ if (!existing)
58
+ throw new IdentityCustodyErrorV1('identity_transaction_indeterminate');
59
+ if (existing.requestDigest !== op.requestDigest || existing.userId !== op.userId || existing.actorId !== op.actorId || existing.handlerId !== op.handlerId) {
60
+ throw new IdentityCustodyErrorV1('identity_operation_conflict');
61
+ }
62
+ return existing.state === 'committed' ? 'committed' : 'reserved';
63
+ }
64
+ }
65
+ findOperation = (operationId) => this.one((row) => ({
66
+ operationId: String(row['operation_id']),
67
+ userId: String(row['user_id']),
68
+ actorId: String(row['actor_id']),
69
+ handlerId: row['handler_id'],
70
+ requestDigest: String(row['request_digest']),
71
+ state: row['state'],
72
+ createdAt: String(row['created_at']),
73
+ committedAt: row['committed_at'] ?? null,
74
+ committedReceipt: row['committed_receipt_json'] ? JSON.parse(String(row['committed_receipt_json'])) : null,
75
+ }), `SELECT * FROM ${this.t('identity_deletion_operations')} WHERE "operation_id" = $1`, [operationId]);
76
+ async markOperationCommitted(operationId, receipt, at) {
77
+ const result = await this.session.execute({
78
+ text: `UPDATE ${this.t('identity_deletion_operations')} SET "state" = 'committed', "committed_at" = $2, "committed_receipt_json" = $3 WHERE "operation_id" = $1 AND "state" = 'queued'`,
79
+ values: [operationId, at, JSON.stringify(receipt)],
80
+ });
81
+ if ((result.rowCount ?? 0) === 0)
82
+ throw new IdentityCustodyErrorV1('identity_operation_conflict');
83
+ }
84
+ async appendAttempt(attempt) {
85
+ if (attempt.receipt.transaction !== 'rolled_back')
86
+ throw new IdentityCustodyErrorV1('identity_material_invalid');
87
+ await this.session.execute({
88
+ text: `INSERT INTO ${this.t('identity_deletion_attempts')} ("attempt_id","operation_id","at","receipt_json") VALUES ($1,$2,$3,$4)`,
89
+ values: [attempt.attemptId, attempt.operationId, attempt.at, JSON.stringify(attempt.receipt)],
90
+ });
91
+ }
92
+ latestReceipt = async (operationId) => {
93
+ const committed = await this.one((row) => row['committed_receipt_json'] ?? null, `SELECT "committed_receipt_json" FROM ${this.t('identity_deletion_operations')} WHERE "operation_id" = $1 AND "state" = 'committed'`, [operationId]);
94
+ if (committed)
95
+ return JSON.parse(committed);
96
+ const attempt = await this.one((row) => String(row['receipt_json']), `SELECT "receipt_json" FROM ${this.t('identity_deletion_attempts')} WHERE "operation_id" = $1 ORDER BY "at" DESC, "attempt_id" DESC LIMIT 1`, [operationId]);
97
+ return attempt ? JSON.parse(attempt) : null;
98
+ };
99
+ // -- Revocation outbox ----------------------------------------------------
100
+ async enqueueDelivery(delivery) {
101
+ await this.session.execute({
102
+ text: `INSERT INTO ${this.t('identity_revocation_outbox')} ("delivery_id","operation_id","step","subject_id","target_kind","target_ref","state","created_at","next_attempt_at","custody_ref","delivered_at","claim_owner","lease_until","claim_version","attempt_count") VALUES ($1,$2,$3,$4,$5,$6,'pending',$7,$8,$9,NULL,NULL,NULL,0,0) ON CONFLICT ("delivery_id") DO NOTHING`,
103
+ values: [delivery.deliveryId, delivery.operationId, delivery.step, delivery.subjectId, delivery.targetKind, delivery.targetRef, delivery.createdAt, delivery.nextAttemptAt, delivery.custodyRef],
104
+ });
105
+ const existing = await this.findDelivery(delivery.deliveryId);
106
+ if (!existing || !sameRevocationTarget(existing, delivery))
107
+ throw new IdentityCustodyErrorV1('identity_operation_conflict');
108
+ }
109
+ findDelivery = (deliveryId) => this.one(decodeRevocationDelivery, `SELECT * FROM ${this.t('identity_revocation_outbox')} WHERE "delivery_id" = $1`, [deliveryId]);
110
+ async claimPending(now, owner, leaseUntil, limit) {
111
+ if (!Number.isInteger(limit) || limit <= 0)
112
+ throw new IdentityCustodyErrorV1('identity_material_invalid');
113
+ if (!(leaseUntil > now))
114
+ throw new IdentityCustodyErrorV1('identity_material_invalid');
115
+ const rows = (await this.session.execute({
116
+ text: `UPDATE ${this.t('identity_revocation_outbox')} SET "claim_owner" = $2, "lease_until" = $3, "claim_version" = "claim_version" + 1, "attempt_count" = "attempt_count" + 1
117
+ WHERE "delivery_id" IN (SELECT "delivery_id" FROM ${this.t('identity_revocation_outbox')} WHERE "state" = 'pending' AND "next_attempt_at" <= $1 AND ("lease_until" IS NULL OR "lease_until" <= $1) ORDER BY "next_attempt_at", "created_at", "delivery_id" LIMIT $4 FOR UPDATE SKIP LOCKED)
118
+ RETURNING *`,
119
+ values: [now, owner, leaseUntil, limit],
120
+ })).rows;
121
+ return rows.map(decodeRevocationDelivery);
122
+ }
123
+ async acknowledgeDelivery(deliveryId, owner, version, at) {
124
+ const result = await this.session.execute({
125
+ text: `UPDATE ${this.t('identity_revocation_outbox')} SET "state" = 'delivered', "delivered_at" = $4, "claim_owner" = NULL, "lease_until" = NULL
126
+ WHERE "delivery_id" = $1 AND "state" = 'pending' AND "claim_owner" = $2 AND "claim_version" = $3 AND "lease_until" > $4`,
127
+ values: [deliveryId, owner, version, at],
128
+ });
129
+ if ((result.rowCount ?? 0) === 0 && (await this.findDelivery(deliveryId))?.state !== 'delivered')
130
+ throw new IdentityCustodyErrorV1('identity_delivery_claim_conflict');
131
+ }
132
+ async releaseClaim(deliveryId, owner, version, nextAttemptAt) {
133
+ const result = await this.session.execute({
134
+ text: `UPDATE ${this.t('identity_revocation_outbox')} SET "claim_owner" = NULL, "lease_until" = NULL, "next_attempt_at" = $4
135
+ WHERE "delivery_id" = $1 AND "state" = 'pending' AND "claim_owner" = $2 AND "claim_version" = $3`,
136
+ values: [deliveryId, owner, version, nextAttemptAt],
137
+ });
138
+ if ((result.rowCount ?? 0) === 0)
139
+ throw new IdentityCustodyErrorV1('identity_delivery_claim_conflict');
140
+ }
141
+ listPendingByOperation = async (operationId) => {
142
+ const rows = (await this.session.execute({
143
+ text: `SELECT * FROM ${this.t('identity_revocation_outbox')} WHERE "operation_id" = $1 ORDER BY "next_attempt_at", "created_at", "delivery_id"`,
144
+ values: [operationId],
145
+ })).rows;
146
+ return rows.map(decodeRevocationDelivery);
147
+ };
148
+ findLegacyConnectorTombstone = (sourceEventId) => this.one(decodeLegacyConnectorTombstone, `SELECT * FROM ${this.t('identity_legacy_connector_tombstones')} WHERE "source_event_id" = $1`, [sourceEventId]);
149
+ async insertLegacyConnectorTombstone(record) {
150
+ await this.session.execute({ text: `INSERT INTO ${this.t('identity_legacy_connector_tombstones')} ("source_event_id","connector_account_id","provider","subject_id","disposition","delivery_id","evidence_ref","imported_at") VALUES ($1,$2,$3,$4,$5,$6,$7,$8)`, values: [record.sourceEventId, record.connectorAccountId, record.provider, record.subjectId, record.disposition, record.deliveryId, record.evidenceRef, record.importedAt] });
151
+ }
152
+ // -- Import receipts ------------------------------------------------------
153
+ findImportReceipt = (migrationId) => this.one((row) => JSON.parse(String(row['receipt_json'])), `SELECT "receipt_json" FROM ${this.t('identity_import_receipts')} WHERE "migration_id" = $1`, [migrationId]);
154
+ async insertImportReceipt(migrationId, row, receipt) {
155
+ await this.session.execute({
156
+ text: `INSERT INTO ${this.t('identity_import_receipts')} ("migration_id","source_snapshot_ref","source_snapshot_digest","manifest_digest","contract_version","imported_at","receipt_json") VALUES ($1,$2,$3,$4,'1.1.0',$5,$6)`,
157
+ values: [migrationId, row.sourceSnapshotRef, row.sourceSnapshotDigest, row.manifestDigest, row.importedAt, JSON.stringify(receipt)],
158
+ });
159
+ }
160
+ // -- Core account rows (import + deletion) --------------------------------
161
+ async insertAccountCore(record) {
162
+ try {
163
+ await this.session.execute({
164
+ text: `INSERT INTO ${this.t('identity_user_accounts')} ("user_id","email","account_status","global_role","created_at","updated_at") VALUES ($1,$2,$3,$4,$5,$6)`,
165
+ values: [record.userId, record.email, record.accountStatus, record.globalRole, record.createdAt, record.updatedAt],
166
+ });
167
+ }
168
+ catch (error) {
169
+ if (String(error.code ?? '') === '23505') {
170
+ if (error.constraint === 'identity_user_accounts_email_key')
171
+ throw new IdentityEmailCreateCollision();
172
+ throw new IdentityCustodyErrorV1('identity_record_conflict');
173
+ }
174
+ throw error;
175
+ }
176
+ }
177
+ findAccountCore = (userId) => this.one((row) => ({
178
+ userId: String(row['user_id']),
179
+ email: String(row['email']),
180
+ accountStatus: row['account_status'],
181
+ globalRole: row['global_role'],
182
+ createdAt: String(row['created_at']),
183
+ updatedAt: String(row['updated_at']),
184
+ }), `SELECT * FROM ${this.t('identity_user_accounts')} WHERE "user_id" = $1`, [userId]);
185
+ async deleteAccountCore(userId) {
186
+ await this.session.execute({ text: `DELETE FROM ${this.t('identity_user_accounts')} WHERE "user_id" = $1`, values: [userId] });
187
+ }
188
+ // -- Tenancy / workspace rows (import + deletion) --------------------------
189
+ async insertTenantCore(tenant) {
190
+ await this.session.execute({
191
+ text: `INSERT INTO ${this.cm('cm_tenants')} ("tenant_id","slug","status","created_at") VALUES ($1,$2,$3,$4) ON CONFLICT ("tenant_id") DO NOTHING`,
192
+ values: [tenant.tenantId, tenant.slug, tenant.status, tenant.createdAt],
193
+ });
194
+ }
195
+ async insertMembershipCore(membership) {
196
+ await this.session.execute({
197
+ text: `INSERT INTO ${this.cm('cm_tenant_memberships')} ("user_id","tenant_id","status","tenant_role","decided_by","decided_at","updated_at") VALUES ($1,$2,$3,$4,$5,$6,$7) ON CONFLICT ("user_id","tenant_id") DO NOTHING`,
198
+ values: [membership.userId, membership.tenantId, membership.status, membership.tenantRole, membership.decidedBy ?? null, membership.decidedAt ?? null, membership.updatedAt],
199
+ });
200
+ }
201
+ async insertWorkspaceCore(workspace) {
202
+ await this.session.execute({
203
+ text: `INSERT INTO ${this.cm('cm_workspaces')} ("workspace_id","tenant_id","repo_identity","aliases","enrolled_at") VALUES ($1,$2,$3,$4,$5) ON CONFLICT ("workspace_id") DO NOTHING`,
204
+ values: [workspace.workspaceId, workspace.tenantId, workspace.repoIdentity, JSON.stringify(workspace.aliases), workspace.enrolledAt],
205
+ });
206
+ }
207
+ async insertWorkspaceMemberCore(member) {
208
+ await this.session.execute({
209
+ text: `INSERT INTO ${this.cm('cm_workspace_members')} ("workspace_id","user_id","role") VALUES ($1,$2,$3) ON CONFLICT ("workspace_id","user_id") DO NOTHING`,
210
+ values: [member.workspaceId, member.userId, member.role],
211
+ });
212
+ }
213
+ findTenantCore = (tenantId) => this.one((row) => ({ tenantId: String(row['tenant_id']), slug: String(row['slug']), status: String(row['status']), createdAt: String(row['created_at']) }), `SELECT * FROM ${this.cm('cm_tenants')} WHERE "tenant_id" = $1`, [tenantId]);
214
+ findWorkspaceCore = (workspaceId) => this.one((row) => ({
215
+ workspaceId: String(row['workspace_id']),
216
+ tenantId: String(row['tenant_id']),
217
+ repoIdentity: row['repo_identity'] ?? null,
218
+ aliases: JSON.parse(String(row['aliases'] ?? '[]')),
219
+ enrolledAt: String(row['enrolled_at']),
220
+ }), `SELECT * FROM ${this.cm('cm_workspaces')} WHERE "workspace_id" = $1`, [workspaceId]);
221
+ async setImportedSessionBase(sessionId, status, revokedAt) {
222
+ const result = await this.session.execute({
223
+ text: `UPDATE ${this.t('identity_login_sessions')} SET "status" = $2, "revoked_at" = $3 WHERE "session_id" = $1`,
224
+ values: [sessionId, status, revokedAt],
225
+ });
226
+ if ((result.rowCount ?? 0) === 0)
227
+ throw new IdentityCustodyErrorV1('identity_material_missing');
228
+ }
229
+ async insertConsentCore(consent) {
230
+ await this.session.execute({
231
+ text: `INSERT INTO ${this.cm('cm_oauth_consents')} ("consent_id","tenant_id","user_id","client_id","granted_at","revoked_at") VALUES ($1,$2,$3,$4,$5,$6) ON CONFLICT ("consent_id") DO NOTHING`,
232
+ values: [consent.consentId, consent.tenantId, consent.userId, consent.clientId, consent.grantedAt, consent.revokedAt ?? null],
233
+ });
234
+ }
235
+ findConsentCore = (consentId) => this.one((row) => ({
236
+ consentId: String(row['consent_id']),
237
+ tenantId: String(row['tenant_id']),
238
+ userId: String(row['user_id']),
239
+ clientId: String(row['client_id']),
240
+ grantedAt: String(row['granted_at']),
241
+ ...(row['revoked_at'] === null || row['revoked_at'] === undefined ? {} : { revokedAt: String(row['revoked_at']) }),
242
+ }), `SELECT * FROM ${this.cm('cm_oauth_consents')} WHERE "consent_id" = $1`, [consentId]);
243
+ listConsentsForUserCore = async (userId) => {
244
+ const rows = (await this.session.execute({
245
+ text: `SELECT * FROM ${this.cm('cm_oauth_consents')} WHERE "user_id" = $1 ORDER BY "granted_at", "consent_id"`,
246
+ values: [userId],
247
+ })).rows;
248
+ return rows.map((row) => ({
249
+ consentId: String(row['consent_id']),
250
+ tenantId: String(row['tenant_id']),
251
+ userId: String(row['user_id']),
252
+ clientId: String(row['client_id']),
253
+ grantedAt: String(row['granted_at']),
254
+ ...(row['revoked_at'] === null || row['revoked_at'] === undefined ? {} : { revokedAt: String(row['revoked_at']) }),
255
+ }));
256
+ };
257
+ // -- Subject cleanup (CM-owned, both handlers) ------------------------------
258
+ listMembershipsForUser = async (userId) => {
259
+ const rows = (await this.session.execute({ text: `SELECT "user_id","tenant_id","status","tenant_role","decided_by","decided_at","updated_at" FROM ${this.cm('cm_tenant_memberships')} WHERE "user_id" = $1`, values: [userId] })).rows;
260
+ return rows.map((row) => ({
261
+ userId: String(row['user_id']),
262
+ tenantId: String(row['tenant_id']),
263
+ status: String(row['status']),
264
+ tenantRole: String(row['tenant_role']),
265
+ ...(row['decided_by'] === null || row['decided_by'] === undefined ? {} : { decidedBy: String(row['decided_by']) }),
266
+ ...(row['decided_at'] === null || row['decided_at'] === undefined ? {} : { decidedAt: String(row['decided_at']) }),
267
+ updatedAt: String(row['updated_at']),
268
+ }));
269
+ };
270
+ listWorkspaceIdsForUser = async (userId) => {
271
+ const rows = (await this.session.execute({ text: `SELECT "workspace_id" FROM ${this.cm('cm_workspace_members')} WHERE "user_id" = $1`, values: [userId] })).rows;
272
+ return rows.map((row) => String(row['workspace_id']));
273
+ };
274
+ countAdminsInWorkspace = async (workspaceId) => {
275
+ const rows = (await this.session.execute({
276
+ text: `SELECT COUNT(*) AS "count" FROM ${this.cm('cm_workspace_members')} WHERE "workspace_id" = $1 AND "role" = 'admin'`,
277
+ values: [workspaceId],
278
+ })).rows;
279
+ return Number(rows[0]?.['count'] ?? 0);
280
+ };
281
+ roleInWorkspace = async (workspaceId, userId) => {
282
+ const row = await this.one((r) => String(r['role']), `SELECT "role" FROM ${this.cm('cm_workspace_members')} WHERE "workspace_id" = $1 AND "user_id" = $2`, [workspaceId, userId]);
283
+ return row;
284
+ };
285
+ async deleteMembershipsForUser(userId) {
286
+ const result = await this.session.execute({ text: `DELETE FROM ${this.cm('cm_tenant_memberships')} WHERE "user_id" = $1`, values: [userId] });
287
+ return result.rowCount ?? 0;
288
+ }
289
+ async deleteWorkspaceMembersForUser(userId) {
290
+ const result = await this.session.execute({ text: `DELETE FROM ${this.cm('cm_workspace_members')} WHERE "user_id" = $1`, values: [userId] });
291
+ return result.rowCount ?? 0;
292
+ }
293
+ async deleteWorkspaceMembersIn(workspaceIds) {
294
+ let total = 0;
295
+ for (const workspaceId of workspaceIds) {
296
+ const result = await this.session.execute({ text: `DELETE FROM ${this.cm('cm_workspace_members')} WHERE "workspace_id" = $1`, values: [workspaceId] });
297
+ total += result.rowCount ?? 0;
298
+ }
299
+ return total;
300
+ }
301
+ async deleteWorkspace(workspaceId) {
302
+ await this.session.execute({ text: `DELETE FROM ${this.cm('cm_workspaces')} WHERE "workspace_id" = $1`, values: [workspaceId] });
303
+ }
304
+ async deleteConsentsForUser(userId) {
305
+ const result = await this.session.execute({ text: `DELETE FROM ${this.cm('cm_oauth_consents')} WHERE "user_id" = $1`, values: [userId] });
306
+ return result.rowCount ?? 0;
307
+ }
308
+ async deleteConversationsForUser(userId) {
309
+ const result = await this.session.execute({ text: `DELETE FROM ${this.t('cm_identity_conversation_sessions')} WHERE "user_id" = $1`, values: [userId] });
310
+ return result.rowCount ?? 0;
311
+ }
312
+ async deleteProofsForUser(userId) {
313
+ const result = await this.session.execute({ text: `DELETE FROM ${this.t('identity_proofs')} WHERE "user_id" = $1`, values: [userId] });
314
+ return result.rowCount ?? 0;
315
+ }
316
+ async deleteDeviceCodesForUser(userId) {
317
+ const result = await this.session.execute({ text: `DELETE FROM ${this.t('identity_device_codes')} WHERE "approved_user_id" = $1`, values: [userId] });
318
+ return result.rowCount ?? 0;
319
+ }
320
+ async deleteSessionsForUser(userId) {
321
+ const ids = (await this.session.execute({ text: `SELECT "session_id" FROM ${this.t('identity_login_sessions')} WHERE "user_id" = $1`, values: [userId] })).rows;
322
+ let total = 0;
323
+ for (const row of ids) {
324
+ const sessionId = String(row['session_id']);
325
+ await this.session.execute({ text: `DELETE FROM ${this.t('identity_login_token_bindings')} WHERE "session_id" = $1`, values: [sessionId] });
326
+ const deleted = await this.session.execute({ text: `DELETE FROM ${this.t('identity_login_sessions')} WHERE "session_id" = $1`, values: [sessionId] });
327
+ total += deleted.rowCount ?? 0;
328
+ }
329
+ return total;
330
+ }
331
+ /** Deletes every custody row bound to the subject; returns per-table counts. */
332
+ async cleanupCustodyForUser(userId, email) {
333
+ const counts = {};
334
+ const remove = async (table, where, values) => {
335
+ const result = await this.session.execute({ text: `DELETE FROM ${this.t(table)} WHERE ${where}`, values });
336
+ counts[table] = (counts[table] ?? 0) + (result.rowCount ?? 0);
337
+ };
338
+ await remove('identity_webauthn_credentials', '"user_id" = $1', [userId]);
339
+ await remove('identity_email_registration_tickets', '"user_id" = $1', [userId]);
340
+ await remove('identity_email_registration_tickets', '"user_id" IS NULL AND "email" = $1', [email]);
341
+ await remove('identity_single_use_proofs', '"user_id" = $1', [userId]);
342
+ await remove('identity_single_use_proofs', '"user_id" IS NULL AND "email" = $1', [email]);
343
+ await remove('identity_social_links', '"user_id" = $1', [userId]);
344
+ await remove('identity_account_profiles', '"user_id" = $1', [userId]);
345
+ return counts;
346
+ }
347
+ async revokePendingInvitationsForEmail(email) {
348
+ const result = await this.session.execute({
349
+ text: `UPDATE ${this.t('identity_invitation_digests')} SET "status" = 'revoked', "revision" = "revision" + 1 WHERE "email" = $1 AND "status" = 'pending'`,
350
+ values: [email],
351
+ });
352
+ return result.rowCount ?? 0;
353
+ }
354
+ async detachInvitationConsumer(userId) {
355
+ const result = await this.session.execute({
356
+ text: `UPDATE ${this.t('identity_invitation_digests')} SET "consumed_by_user_id" = NULL WHERE "consumed_by_user_id" = $1`,
357
+ values: [userId],
358
+ });
359
+ return result.rowCount ?? 0;
360
+ }
361
+ async detachInvitationWorkspace(workspaceId) {
362
+ const pending = await this.session.execute({
363
+ text: `UPDATE ${this.t('identity_invitation_digests')} SET "status" = 'revoked', "revision" = "revision" + 1 WHERE "workspace_id" = $1 AND "status" = 'pending'`,
364
+ values: [workspaceId],
365
+ });
366
+ const detached = await this.session.execute({
367
+ text: `UPDATE ${this.t('identity_invitation_digests')} SET "workspace_id" = NULL WHERE "workspace_id" = $1`,
368
+ values: [workspaceId],
369
+ });
370
+ return (pending.rowCount ?? 0) + (detached.rowCount ?? 0);
371
+ }
372
+ /** Zero live identity/business references may remain after deletion. */
373
+ async assertNoLiveReferences(input) {
374
+ const orphans = {};
375
+ const count = async (name, text, values) => {
376
+ const rows = (await this.session.execute({ text, values })).rows;
377
+ const total = Number(rows[0]?.['count'] ?? 0);
378
+ if (total > 0)
379
+ orphans[name] = total;
380
+ };
381
+ await count('identity_proofs', `SELECT COUNT(*) AS "count" FROM ${this.t('identity_proofs')} WHERE "user_id" = $1`, [input.userId]);
382
+ await count('identity_webauthn_credentials', `SELECT COUNT(*) AS "count" FROM ${this.t('identity_webauthn_credentials')} WHERE "user_id" = $1`, [input.userId]);
383
+ await count('identity_single_use_proofs', `SELECT COUNT(*) AS "count" FROM ${this.t('identity_single_use_proofs')} WHERE "user_id" = $1`, [input.userId]);
384
+ await count('identity_unbound_proofs', `SELECT COUNT(*) AS "count" FROM ${this.t('identity_single_use_proofs')} WHERE "user_id" IS NULL AND "email" = $1`, [input.accountEmail]);
385
+ await count('identity_email_tickets', `SELECT COUNT(*) AS "count" FROM ${this.t('identity_email_registration_tickets')} WHERE "user_id" = $1 OR ("user_id" IS NULL AND "email" = $2)`, [input.userId, input.accountEmail]);
386
+ await count('identity_social_links', `SELECT COUNT(*) AS "count" FROM ${this.t('identity_social_links')} WHERE "user_id" = $1`, [input.userId]);
387
+ await count('identity_login_sessions', `SELECT COUNT(*) AS "count" FROM ${this.t('identity_login_sessions')} WHERE "user_id" = $1`, [input.userId]);
388
+ await count('identity_login_token_bindings', `SELECT COUNT(*) AS "count" FROM ${this.t('identity_login_token_bindings')} WHERE "session_id" IN (SELECT "session_id" FROM ${this.t('identity_login_sessions')} WHERE "user_id" = $1)`, [input.userId]);
389
+ await count('identity_account_profiles', `SELECT COUNT(*) AS "count" FROM ${this.t('identity_account_profiles')} WHERE "user_id" = $1`, [input.userId]);
390
+ await count('cm_tenant_memberships', `SELECT COUNT(*) AS "count" FROM ${this.cm('cm_tenant_memberships')} WHERE "user_id" = $1`, [input.userId]);
391
+ await count('cm_workspace_members', `SELECT COUNT(*) AS "count" FROM ${this.cm('cm_workspace_members')} WHERE "user_id" = $1`, [input.userId]);
392
+ await count('cm_oauth_consents', `SELECT COUNT(*) AS "count" FROM ${this.cm('cm_oauth_consents')} WHERE "user_id" = $1`, [input.userId]);
393
+ await count('cm_identity_conversation_sessions', `SELECT COUNT(*) AS "count" FROM ${this.t('cm_identity_conversation_sessions')} WHERE "user_id" = $1`, [input.userId]);
394
+ await count('identity_device_codes', `SELECT COUNT(*) AS "count" FROM ${this.t('identity_device_codes')} WHERE "approved_user_id" = $1`, [input.userId]);
395
+ for (const workspaceId of input.deletedWorkspaceIds) {
396
+ await count(`cm_workspace:${workspaceId}`, `SELECT COUNT(*) AS "count" FROM ${this.cm('cm_workspaces')} WHERE "workspace_id" = $1`, [workspaceId]);
397
+ await count(`cm_workspace_members:${workspaceId}`, `SELECT COUNT(*) AS "count" FROM ${this.cm('cm_workspace_members')} WHERE "workspace_id" = $1`, [workspaceId]);
398
+ }
399
+ const names = Object.keys(orphans);
400
+ if (names.length > 0)
401
+ throw new IdentityCustodyErrorV1('identity_orphan_detected');
402
+ }
403
+ static rollbackReceipt(input) {
404
+ const order = ['login_sessions', 'remote_reader_sessions', 'connector_grants', 'tenant_memberships', 'agent_plane', 'purpose_grants', 'catalogue', 'account'];
405
+ const failedIndex = order.indexOf(input.failedStep);
406
+ const steps = order.map((step, index) => {
407
+ if (step === input.failedStep)
408
+ return { step, outcome: 'queued', detailCode: 'required_local_step_failed' };
409
+ if (index < failedIndex && input.completedBeforeFailure.has(step)) {
410
+ return { step, outcome: 'rolled_back', detailCode: 'transaction_rolled_back' };
411
+ }
412
+ return { step, outcome: 'queued', detailCode: 'not_attempted_after_failure' };
413
+ });
414
+ return {
415
+ contractVersion: '2.0.0', operationId: input.operationId, deliveryIds: [],
416
+ userId: input.userId,
417
+ mode: 'delete',
418
+ transaction: 'rolled_back',
419
+ resultCode: 'identity_cascade_rolled_back',
420
+ complete: false,
421
+ steps,
422
+ business: null,
423
+ cleanup: null,
424
+ at: input.at,
425
+ };
426
+ }
427
+ }
428
+ //# sourceMappingURL=custody-journal-postgres.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custody-journal-postgres.js","sourceRoot":"","sources":["../../../src/storage/identity/custody-journal-postgres.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,2EAA2E;AAC3E,2EAA2E;AAE3E,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAWzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACpF,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EAAE,aAAa,EAA0B,MAAM,aAAa,CAAC;AAEpE,MAAM,OAAO,sBAAsB;IAEtB;IACA;IAFX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,CAAC,IAAI,EAAE,KAAK,EAAiC,EAAE;YACtG,IAAI,IAAI,KAAK,KAAK,CAAC,UAAU;gBAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,4BAA4B,EAAE,CAAC;YAC5G,IAAI,KAAK,GAAG,WAAW,IAAI,KAAK,CAAC,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;gBAClE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,yBAAyB,EAAE,CAAC;YACjF,CAAC;YACD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,6BAA6B,EAAE,CAAC;QAChF,CAAC,CAAC,CAAC;QACH,OAAO;YACL,eAAe,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,WAAW,EAAE,EAAE;YACzE,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,aAAa;YAC1B,UAAU,EAAE,8BAA8B;YAC1C,QAAQ,EAAE,KAAK;YACf,KAAK;YACL,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,IAAI;YACb,EAAE,EAAE,KAAK,CAAC,EAAE;SACb,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,121 @@
1
+ import type { IdentityDeletionAttemptV2, IdentityDeletionOperationV2, IdentityExternalRevocationV1, IdentityImportReceiptV1, IdentityLegacyConnectorTombstoneV1, PersonDeletionReceiptV2 } from '../../identity-contracts/custody.js';
2
+ import type { OAuthConsentRecord, RevocationStepKind, UserAccount, WorkspaceRecord } from '../../identity-contracts/types.js';
3
+ import type { SqliteConnection } from '../sqlite/connection.js';
4
+ export declare class SqliteCustodyJournal {
5
+ readonly connection: SqliteConnection;
6
+ constructor(connection: SqliteConnection);
7
+ private readonly one;
8
+ ensureLiveFence(userId: string, at: string): Promise<void>;
9
+ retireFence(userId: string, at: string): Promise<void>;
10
+ static requestDigestV1(userId: string, actorId: string, handlerId: string, operationId: string): string;
11
+ reserveOperation(op: IdentityDeletionOperationV2): Promise<'reserved' | 'committed'>;
12
+ findOperation: (operationId: string) => Promise<IdentityDeletionOperationV2 | null>;
13
+ markOperationCommitted(operationId: string, receipt: PersonDeletionReceiptV2, at: string): Promise<void>;
14
+ appendAttempt(attempt: IdentityDeletionAttemptV2): Promise<void>;
15
+ latestReceipt: (operationId: string) => Promise<PersonDeletionReceiptV2 | null>;
16
+ enqueueDelivery(delivery: IdentityExternalRevocationV1): Promise<void>;
17
+ findDelivery: (deliveryId: string) => Promise<IdentityExternalRevocationV1 | null>;
18
+ claimPending(now: string, owner: string, leaseUntil: string, limit: number): Promise<readonly (IdentityExternalRevocationV1 & {
19
+ readonly claimVersion: number;
20
+ })[]>;
21
+ acknowledgeDelivery(deliveryId: string, owner: string, version: number, at: string): Promise<void>;
22
+ releaseClaim(deliveryId: string, owner: string, version: number, nextAttemptAt: string): Promise<void>;
23
+ listPendingByOperation: (operationId: string) => Promise<readonly IdentityExternalRevocationV1[]>;
24
+ findLegacyConnectorTombstone: (sourceEventId: string) => Promise<IdentityLegacyConnectorTombstoneV1 | null>;
25
+ insertLegacyConnectorTombstone(record: IdentityLegacyConnectorTombstoneV1): Promise<void>;
26
+ findImportReceipt: (migrationId: string) => Promise<IdentityImportReceiptV1 | null>;
27
+ insertImportReceipt(migrationId: string, row: {
28
+ readonly sourceSnapshotRef: string;
29
+ readonly sourceSnapshotDigest: string;
30
+ readonly manifestDigest: string;
31
+ readonly importedAt: string;
32
+ }, receipt: IdentityImportReceiptV1): Promise<void>;
33
+ insertAccountCore(record: UserAccount): Promise<void>;
34
+ findAccountCore: (userId: string) => Promise<UserAccount | null>;
35
+ deleteAccountCore(userId: string): Promise<void>;
36
+ insertTenantCore(tenant: {
37
+ readonly tenantId: string;
38
+ readonly slug: string;
39
+ readonly status: string;
40
+ readonly createdAt: string;
41
+ }): Promise<void>;
42
+ insertMembershipCore(membership: {
43
+ readonly userId: string;
44
+ readonly tenantId: string;
45
+ readonly status: string;
46
+ readonly tenantRole: string;
47
+ readonly decidedBy?: string;
48
+ readonly decidedAt?: string;
49
+ readonly updatedAt: string;
50
+ }): Promise<void>;
51
+ insertWorkspaceCore(workspace: {
52
+ readonly workspaceId: string;
53
+ readonly tenantId: string;
54
+ readonly repoIdentity: string | null;
55
+ readonly aliases: readonly string[];
56
+ readonly enrolledAt: string;
57
+ }): Promise<void>;
58
+ insertWorkspaceMemberCore(member: {
59
+ readonly workspaceId: string;
60
+ readonly userId: string;
61
+ readonly role: string;
62
+ }): Promise<void>;
63
+ findTenantCore: (tenantId: string) => Promise<{
64
+ readonly tenantId: string;
65
+ readonly slug: string;
66
+ readonly status: string;
67
+ readonly createdAt: string;
68
+ } | null>;
69
+ findWorkspaceCore: (workspaceId: string) => Promise<WorkspaceRecord | null>;
70
+ setImportedSessionBase(sessionId: string, status: 'active' | 'expired' | 'revoked', revokedAt: string | null): Promise<void>;
71
+ insertConsentCore(consent: {
72
+ readonly consentId: string;
73
+ readonly tenantId: string;
74
+ readonly userId: string;
75
+ readonly clientId: string;
76
+ readonly grantedAt: string;
77
+ readonly revokedAt?: string;
78
+ }): Promise<void>;
79
+ findConsentCore: (consentId: string) => Promise<OAuthConsentRecord | null>;
80
+ listConsentsForUserCore: (userId: string) => Promise<readonly OAuthConsentRecord[]>;
81
+ listMembershipsForUser: (userId: string) => Promise<readonly {
82
+ readonly userId: string;
83
+ readonly tenantId: string;
84
+ readonly status: string;
85
+ readonly tenantRole: string;
86
+ readonly decidedBy?: string;
87
+ readonly decidedAt?: string;
88
+ readonly updatedAt: string;
89
+ }[]>;
90
+ listWorkspaceIdsForUser: (userId: string) => Promise<readonly string[]>;
91
+ countAdminsInWorkspace: (workspaceId: string) => Promise<number>;
92
+ roleInWorkspace: (workspaceId: string, userId: string) => Promise<string | null>;
93
+ deleteMembershipsForUser(userId: string): Promise<number>;
94
+ deleteWorkspaceMembersForUser(userId: string): Promise<number>;
95
+ deleteWorkspaceMembersIn(workspaceIds: readonly string[]): Promise<number>;
96
+ deleteWorkspace(workspaceId: string): Promise<void>;
97
+ deleteConsentsForUser(userId: string): Promise<number>;
98
+ deleteConversationsForUser(userId: string): Promise<number>;
99
+ deleteProofsForUser(userId: string): Promise<number>;
100
+ deleteDeviceCodesForUser(userId: string): Promise<number>;
101
+ deleteSessionsForUser(userId: string): Promise<number>;
102
+ /** Deletes every custody row bound to the subject; returns per-table counts. */
103
+ cleanupCustodyForUser(userId: string, email: string): Promise<Readonly<Record<string, number>>>;
104
+ revokePendingInvitationsForEmail(email: string): Promise<number>;
105
+ detachInvitationConsumer(userId: string): Promise<number>;
106
+ detachInvitationWorkspace(workspaceId: string): Promise<number>;
107
+ /** Zero live identity/business references may remain after deletion. */
108
+ assertNoLiveReferences(input: {
109
+ readonly userId: string;
110
+ readonly accountEmail: string;
111
+ readonly deletedWorkspaceIds: readonly string[];
112
+ }): Promise<void>;
113
+ static rollbackReceipt(input: {
114
+ readonly operationId: string;
115
+ readonly userId: string;
116
+ readonly failedStep: RevocationStepKind;
117
+ readonly completedBeforeFailure: ReadonlySet<RevocationStepKind>;
118
+ readonly at: string;
119
+ }): PersonDeletionReceiptV2;
120
+ }
121
+ //# sourceMappingURL=custody-journal-sqlite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custody-journal-sqlite.d.ts","sourceRoot":"","sources":["../../../src/storage/identity/custody-journal-sqlite.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAEV,yBAAyB,EACzB,2BAA2B,EAC3B,4BAA4B,EAC5B,uBAAuB,EACvB,kCAAkC,EAClC,uBAAuB,EACxB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAG9H,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CA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