@abloatai/transaction 0.37.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 (723) hide show
  1. package/CONVENTIONS.md +83 -0
  2. package/README.md +48 -0
  3. package/dist/ablo.d.ts +90 -0
  4. package/dist/ablo.d.ts.map +1 -0
  5. package/dist/ablo.js +34 -0
  6. package/dist/ablo.js.map +1 -0
  7. package/dist/ai-sdk/coordinatedTool.d.ts +123 -0
  8. package/dist/ai-sdk/coordinatedTool.d.ts.map +1 -0
  9. package/dist/ai-sdk/coordinatedTool.js +135 -0
  10. package/dist/ai-sdk/coordinatedTool.js.map +1 -0
  11. package/dist/ai-sdk/index.d.ts +2 -0
  12. package/dist/ai-sdk/index.d.ts.map +1 -0
  13. package/dist/ai-sdk/index.js +2 -0
  14. package/dist/ai-sdk/index.js.map +1 -0
  15. package/dist/auth/apiKey.d.ts +154 -0
  16. package/dist/auth/apiKey.d.ts.map +1 -0
  17. package/dist/auth/apiKey.js +408 -0
  18. package/dist/auth/apiKey.js.map +1 -0
  19. package/dist/auth/bootstrapScope.d.ts +16 -0
  20. package/dist/auth/bootstrapScope.d.ts.map +1 -0
  21. package/dist/auth/bootstrapScope.js +2 -0
  22. package/dist/auth/bootstrapScope.js.map +1 -0
  23. package/dist/auth/browserCredentialSafety.d.ts +7 -0
  24. package/dist/auth/browserCredentialSafety.d.ts.map +1 -0
  25. package/dist/auth/browserCredentialSafety.js +29 -0
  26. package/dist/auth/browserCredentialSafety.js.map +1 -0
  27. package/dist/auth/capability.d.ts +241 -0
  28. package/dist/auth/capability.d.ts.map +1 -0
  29. package/dist/auth/capability.js +253 -0
  30. package/dist/auth/capability.js.map +1 -0
  31. package/dist/auth/capabilityLifecycle.d.ts +47 -0
  32. package/dist/auth/capabilityLifecycle.d.ts.map +1 -0
  33. package/dist/auth/capabilityLifecycle.js +108 -0
  34. package/dist/auth/capabilityLifecycle.js.map +1 -0
  35. package/dist/auth/credentialEndpoint.d.ts +10 -0
  36. package/dist/auth/credentialEndpoint.d.ts.map +1 -0
  37. package/dist/auth/credentialEndpoint.js +58 -0
  38. package/dist/auth/credentialEndpoint.js.map +1 -0
  39. package/dist/auth/credentialEndpointProtocol.d.ts +24 -0
  40. package/dist/auth/credentialEndpointProtocol.d.ts.map +1 -0
  41. package/dist/auth/credentialEndpointProtocol.js +34 -0
  42. package/dist/auth/credentialEndpointProtocol.js.map +1 -0
  43. package/dist/auth/credentialKind.d.ts +4 -0
  44. package/dist/auth/credentialKind.d.ts.map +1 -0
  45. package/dist/auth/credentialKind.js +15 -0
  46. package/dist/auth/credentialKind.js.map +1 -0
  47. package/dist/auth/credentialPolicy.d.ts +141 -0
  48. package/dist/auth/credentialPolicy.d.ts.map +1 -0
  49. package/dist/auth/credentialPolicy.js +113 -0
  50. package/dist/auth/credentialPolicy.js.map +1 -0
  51. package/dist/auth/credentialResult.d.ts +7 -0
  52. package/dist/auth/credentialResult.d.ts.map +1 -0
  53. package/dist/auth/credentialResult.js +9 -0
  54. package/dist/auth/credentialResult.js.map +1 -0
  55. package/dist/auth/credentialSource.d.ts +31 -0
  56. package/dist/auth/credentialSource.d.ts.map +1 -0
  57. package/dist/auth/credentialSource.js +56 -0
  58. package/dist/auth/credentialSource.js.map +1 -0
  59. package/dist/auth/hostedEndpoints.d.ts +22 -0
  60. package/dist/auth/hostedEndpoints.d.ts.map +1 -0
  61. package/dist/auth/hostedEndpoints.js +22 -0
  62. package/dist/auth/hostedEndpoints.js.map +1 -0
  63. package/dist/auth/identity.d.ts +62 -0
  64. package/dist/auth/identity.d.ts.map +1 -0
  65. package/dist/auth/identity.js +224 -0
  66. package/dist/auth/identity.js.map +1 -0
  67. package/dist/auth/index.d.ts +189 -0
  68. package/dist/auth/index.d.ts.map +1 -0
  69. package/dist/auth/index.js +312 -0
  70. package/dist/auth/index.js.map +1 -0
  71. package/dist/auth/schemas.d.ts +41 -0
  72. package/dist/auth/schemas.d.ts.map +1 -0
  73. package/dist/auth/schemas.js +69 -0
  74. package/dist/auth/schemas.js.map +1 -0
  75. package/dist/auth/sessionMint.d.ts +29 -0
  76. package/dist/auth/sessionMint.d.ts.map +1 -0
  77. package/dist/auth/sessionMint.js +92 -0
  78. package/dist/auth/sessionMint.js.map +1 -0
  79. package/dist/auth/token.d.ts +4 -0
  80. package/dist/auth/token.d.ts.map +1 -0
  81. package/dist/auth/token.js +4 -0
  82. package/dist/auth/token.js.map +1 -0
  83. package/dist/batching/index.d.ts +56 -0
  84. package/dist/batching/index.d.ts.map +1 -0
  85. package/dist/batching/index.js +148 -0
  86. package/dist/batching/index.js.map +1 -0
  87. package/dist/coordination/awaitClaimGrant.d.ts +57 -0
  88. package/dist/coordination/awaitClaimGrant.d.ts.map +1 -0
  89. package/dist/coordination/awaitClaimGrant.js +138 -0
  90. package/dist/coordination/awaitClaimGrant.js.map +1 -0
  91. package/dist/coordination/claimHeartbeatLoop.d.ts +85 -0
  92. package/dist/coordination/claimHeartbeatLoop.d.ts.map +1 -0
  93. package/dist/coordination/claimHeartbeatLoop.js +109 -0
  94. package/dist/coordination/claimHeartbeatLoop.js.map +1 -0
  95. package/dist/coordination/claimMeta.d.ts +50 -0
  96. package/dist/coordination/claimMeta.d.ts.map +1 -0
  97. package/dist/coordination/claimMeta.js +53 -0
  98. package/dist/coordination/claimMeta.js.map +1 -0
  99. package/dist/coordination/events.d.ts +75 -0
  100. package/dist/coordination/events.d.ts.map +1 -0
  101. package/dist/coordination/events.js +8 -0
  102. package/dist/coordination/events.js.map +1 -0
  103. package/dist/coordination/index.d.ts +20 -0
  104. package/dist/coordination/index.d.ts.map +1 -0
  105. package/dist/coordination/index.js +46 -0
  106. package/dist/coordination/index.js.map +1 -0
  107. package/dist/coordination/locator.d.ts +106 -0
  108. package/dist/coordination/locator.d.ts.map +1 -0
  109. package/dist/coordination/locator.js +110 -0
  110. package/dist/coordination/locator.js.map +1 -0
  111. package/dist/coordination/schema.d.ts +1332 -0
  112. package/dist/coordination/schema.d.ts.map +1 -0
  113. package/dist/coordination/schema.js +1137 -0
  114. package/dist/coordination/schema.js.map +1 -0
  115. package/dist/coordination/targetConflict.d.ts +3 -0
  116. package/dist/coordination/targetConflict.d.ts.map +1 -0
  117. package/dist/coordination/targetConflict.js +74 -0
  118. package/dist/coordination/targetConflict.js.map +1 -0
  119. package/dist/coordination/trace.d.ts +79 -0
  120. package/dist/coordination/trace.d.ts.map +1 -0
  121. package/dist/coordination/trace.js +139 -0
  122. package/dist/coordination/trace.js.map +1 -0
  123. package/dist/docs/catalog.d.ts +73 -0
  124. package/dist/docs/catalog.d.ts.map +1 -0
  125. package/dist/docs/catalog.js +231 -0
  126. package/dist/docs/catalog.js.map +1 -0
  127. package/dist/docs/index.d.ts +11 -0
  128. package/dist/docs/index.d.ts.map +1 -0
  129. package/dist/docs/index.js +11 -0
  130. package/dist/docs/index.js.map +1 -0
  131. package/dist/durableWrites.d.ts +63 -0
  132. package/dist/durableWrites.d.ts.map +1 -0
  133. package/dist/durableWrites.js +72 -0
  134. package/dist/durableWrites.js.map +1 -0
  135. package/dist/environment.d.ts +106 -0
  136. package/dist/environment.d.ts.map +1 -0
  137. package/dist/environment.js +109 -0
  138. package/dist/environment.js.map +1 -0
  139. package/dist/errorCodes.d.ts +411 -0
  140. package/dist/errorCodes.d.ts.map +1 -0
  141. package/dist/errorCodes.js +500 -0
  142. package/dist/errorCodes.js.map +1 -0
  143. package/dist/errors.d.ts +429 -0
  144. package/dist/errors.d.ts.map +1 -0
  145. package/dist/errors.js +687 -0
  146. package/dist/errors.js.map +1 -0
  147. package/dist/footprint.d.ts +112 -0
  148. package/dist/footprint.d.ts.map +1 -0
  149. package/dist/footprint.js +0 -0
  150. package/dist/footprint.js.map +1 -0
  151. package/dist/headlessClient.d.ts +10 -0
  152. package/dist/headlessClient.d.ts.map +1 -0
  153. package/dist/headlessClient.js +114 -0
  154. package/dist/headlessClient.js.map +1 -0
  155. package/dist/index.d.ts +21 -0
  156. package/dist/index.d.ts.map +1 -0
  157. package/dist/index.js +21 -0
  158. package/dist/index.js.map +1 -0
  159. package/dist/keys/index.d.ts +88 -0
  160. package/dist/keys/index.d.ts.map +1 -0
  161. package/dist/keys/index.js +208 -0
  162. package/dist/keys/index.js.map +1 -0
  163. package/dist/log/syncDeltaRow.d.ts +159 -0
  164. package/dist/log/syncDeltaRow.d.ts.map +1 -0
  165. package/dist/log/syncDeltaRow.js +96 -0
  166. package/dist/log/syncDeltaRow.js.map +1 -0
  167. package/dist/logger.d.ts +17 -0
  168. package/dist/logger.d.ts.map +1 -0
  169. package/dist/logger.js +8 -0
  170. package/dist/logger.js.map +1 -0
  171. package/dist/observability.d.ts +54 -0
  172. package/dist/observability.d.ts.map +1 -0
  173. package/dist/observability.js +20 -0
  174. package/dist/observability.js.map +1 -0
  175. package/dist/policy/types.d.ts +218 -0
  176. package/dist/policy/types.d.ts.map +1 -0
  177. package/dist/policy/types.js +127 -0
  178. package/dist/policy/types.js.map +1 -0
  179. package/dist/resources/functionalUpdate.d.ts +80 -0
  180. package/dist/resources/functionalUpdate.d.ts.map +1 -0
  181. package/dist/resources/functionalUpdate.js +88 -0
  182. package/dist/resources/functionalUpdate.js.map +1 -0
  183. package/dist/resources/httpResources.d.ts +449 -0
  184. package/dist/resources/httpResources.d.ts.map +1 -0
  185. package/dist/resources/httpResources.js +8 -0
  186. package/dist/resources/httpResources.js.map +1 -0
  187. package/dist/resources/modelOperations.d.ts +380 -0
  188. package/dist/resources/modelOperations.d.ts.map +1 -0
  189. package/dist/resources/modelOperations.js +13 -0
  190. package/dist/resources/modelOperations.js.map +1 -0
  191. package/dist/resources/mutationOptions.d.ts +67 -0
  192. package/dist/resources/mutationOptions.d.ts.map +1 -0
  193. package/dist/resources/mutationOptions.js +10 -0
  194. package/dist/resources/mutationOptions.js.map +1 -0
  195. package/dist/resources/where.d.ts +102 -0
  196. package/dist/resources/where.d.ts.map +1 -0
  197. package/dist/resources/where.js +116 -0
  198. package/dist/resources/where.js.map +1 -0
  199. package/dist/resources/writeOptionsSchema.d.ts +48 -0
  200. package/dist/resources/writeOptionsSchema.d.ts.map +1 -0
  201. package/dist/resources/writeOptionsSchema.js +74 -0
  202. package/dist/resources/writeOptionsSchema.js.map +1 -0
  203. package/dist/schema/coordination.d.ts +113 -0
  204. package/dist/schema/coordination.d.ts.map +1 -0
  205. package/dist/schema/coordination.js +134 -0
  206. package/dist/schema/coordination.js.map +1 -0
  207. package/dist/schema/ddl.d.ts +98 -0
  208. package/dist/schema/ddl.d.ts.map +1 -0
  209. package/dist/schema/ddl.js +492 -0
  210. package/dist/schema/ddl.js.map +1 -0
  211. package/dist/schema/ddlLock.d.ts +36 -0
  212. package/dist/schema/ddlLock.d.ts.map +1 -0
  213. package/dist/schema/ddlLock.js +47 -0
  214. package/dist/schema/ddlLock.js.map +1 -0
  215. package/dist/schema/diff.d.ts +226 -0
  216. package/dist/schema/diff.d.ts.map +1 -0
  217. package/dist/schema/diff.js +290 -0
  218. package/dist/schema/diff.js.map +1 -0
  219. package/dist/schema/field.d.ts +121 -0
  220. package/dist/schema/field.d.ts.map +1 -0
  221. package/dist/schema/field.js +266 -0
  222. package/dist/schema/field.js.map +1 -0
  223. package/dist/schema/fieldRef.d.ts +58 -0
  224. package/dist/schema/fieldRef.d.ts.map +1 -0
  225. package/dist/schema/fieldRef.js +26 -0
  226. package/dist/schema/fieldRef.js.map +1 -0
  227. package/dist/schema/generate.d.ts +20 -0
  228. package/dist/schema/generate.d.ts.map +1 -0
  229. package/dist/schema/generate.js +87 -0
  230. package/dist/schema/generate.js.map +1 -0
  231. package/dist/schema/index.d.ts +43 -0
  232. package/dist/schema/index.d.ts.map +1 -0
  233. package/dist/schema/index.js +81 -0
  234. package/dist/schema/index.js.map +1 -0
  235. package/dist/schema/loadStrategy.d.ts +46 -0
  236. package/dist/schema/loadStrategy.d.ts.map +1 -0
  237. package/dist/schema/loadStrategy.js +47 -0
  238. package/dist/schema/loadStrategy.js.map +1 -0
  239. package/dist/schema/model.d.ts +380 -0
  240. package/dist/schema/model.d.ts.map +1 -0
  241. package/dist/schema/model.js +124 -0
  242. package/dist/schema/model.js.map +1 -0
  243. package/dist/schema/openapi.d.ts +59 -0
  244. package/dist/schema/openapi.d.ts.map +1 -0
  245. package/dist/schema/openapi.js +508 -0
  246. package/dist/schema/openapi.js.map +1 -0
  247. package/dist/schema/queries.d.ts +202 -0
  248. package/dist/schema/queries.d.ts.map +1 -0
  249. package/dist/schema/queries.js +144 -0
  250. package/dist/schema/queries.js.map +1 -0
  251. package/dist/schema/relation.d.ts +205 -0
  252. package/dist/schema/relation.d.ts.map +1 -0
  253. package/dist/schema/relation.js +105 -0
  254. package/dist/schema/relation.js.map +1 -0
  255. package/dist/schema/residency.d.ts +30 -0
  256. package/dist/schema/residency.d.ts.map +1 -0
  257. package/dist/schema/residency.js +26 -0
  258. package/dist/schema/residency.js.map +1 -0
  259. package/dist/schema/roles.d.ts +250 -0
  260. package/dist/schema/roles.d.ts.map +1 -0
  261. package/dist/schema/roles.js +231 -0
  262. package/dist/schema/roles.js.map +1 -0
  263. package/dist/schema/schema.d.ts +352 -0
  264. package/dist/schema/schema.d.ts.map +1 -0
  265. package/dist/schema/schema.js +326 -0
  266. package/dist/schema/schema.js.map +1 -0
  267. package/dist/schema/select.d.ts +41 -0
  268. package/dist/schema/select.d.ts.map +1 -0
  269. package/dist/schema/select.js +91 -0
  270. package/dist/schema/select.js.map +1 -0
  271. package/dist/schema/serialize.d.ts +116 -0
  272. package/dist/schema/serialize.d.ts.map +1 -0
  273. package/dist/schema/serialize.js +278 -0
  274. package/dist/schema/serialize.js.map +1 -0
  275. package/dist/schema/sugar.d.ts +110 -0
  276. package/dist/schema/sugar.d.ts.map +1 -0
  277. package/dist/schema/sugar.js +84 -0
  278. package/dist/schema/sugar.js.map +1 -0
  279. package/dist/schema/tenancy.d.ts +140 -0
  280. package/dist/schema/tenancy.d.ts.map +1 -0
  281. package/dist/schema/tenancy.js +191 -0
  282. package/dist/schema/tenancy.js.map +1 -0
  283. package/dist/server/adapter.d.ts +174 -0
  284. package/dist/server/adapter.d.ts.map +1 -0
  285. package/dist/server/adapter.js +19 -0
  286. package/dist/server/adapter.js.map +1 -0
  287. package/dist/server/commit.d.ts +108 -0
  288. package/dist/server/commit.d.ts.map +1 -0
  289. package/dist/server/commit.js +2 -0
  290. package/dist/server/commit.js.map +1 -0
  291. package/dist/server/index.d.ts +15 -0
  292. package/dist/server/index.d.ts.map +1 -0
  293. package/dist/server/index.js +3 -0
  294. package/dist/server/index.js.map +1 -0
  295. package/dist/server/readConfig.d.ts +81 -0
  296. package/dist/server/readConfig.d.ts.map +1 -0
  297. package/dist/server/readConfig.js +9 -0
  298. package/dist/server/readConfig.js.map +1 -0
  299. package/dist/server/storageMode.d.ts +24 -0
  300. package/dist/server/storageMode.d.ts.map +1 -0
  301. package/dist/server/storageMode.js +18 -0
  302. package/dist/server/storageMode.js.map +1 -0
  303. package/dist/source/adapter.d.ts +84 -0
  304. package/dist/source/adapter.d.ts.map +1 -0
  305. package/dist/source/adapter.js +25 -0
  306. package/dist/source/adapter.js.map +1 -0
  307. package/dist/source/adapters/drizzle.d.ts +49 -0
  308. package/dist/source/adapters/drizzle.d.ts.map +1 -0
  309. package/dist/source/adapters/drizzle.js +220 -0
  310. package/dist/source/adapters/drizzle.js.map +1 -0
  311. package/dist/source/adapters/kysely.d.ts +43 -0
  312. package/dist/source/adapters/kysely.d.ts.map +1 -0
  313. package/dist/source/adapters/kysely.js +206 -0
  314. package/dist/source/adapters/kysely.js.map +1 -0
  315. package/dist/source/adapters/kyselyMutationCore.d.ts +77 -0
  316. package/dist/source/adapters/kyselyMutationCore.d.ts.map +1 -0
  317. package/dist/source/adapters/kyselyMutationCore.js +126 -0
  318. package/dist/source/adapters/kyselyMutationCore.js.map +1 -0
  319. package/dist/source/adapters/memory.d.ts +14 -0
  320. package/dist/source/adapters/memory.d.ts.map +1 -0
  321. package/dist/source/adapters/memory.js +131 -0
  322. package/dist/source/adapters/memory.js.map +1 -0
  323. package/dist/source/adapters/prisma.d.ts +64 -0
  324. package/dist/source/adapters/prisma.d.ts.map +1 -0
  325. package/dist/source/adapters/prisma.js +203 -0
  326. package/dist/source/adapters/prisma.js.map +1 -0
  327. package/dist/source/conformance.d.ts +38 -0
  328. package/dist/source/conformance.d.ts.map +1 -0
  329. package/dist/source/conformance.js +216 -0
  330. package/dist/source/conformance.js.map +1 -0
  331. package/dist/source/connector.d.ts +96 -0
  332. package/dist/source/connector.d.ts.map +1 -0
  333. package/dist/source/connector.js +267 -0
  334. package/dist/source/connector.js.map +1 -0
  335. package/dist/source/connectorProtocol.d.ts +155 -0
  336. package/dist/source/connectorProtocol.d.ts.map +1 -0
  337. package/dist/source/connectorProtocol.js +164 -0
  338. package/dist/source/connectorProtocol.js.map +1 -0
  339. package/dist/source/contract.d.ts +196 -0
  340. package/dist/source/contract.d.ts.map +1 -0
  341. package/dist/source/contract.js +165 -0
  342. package/dist/source/contract.js.map +1 -0
  343. package/dist/source/drizzle.d.ts +2 -0
  344. package/dist/source/drizzle.d.ts.map +1 -0
  345. package/dist/source/drizzle.js +2 -0
  346. package/dist/source/drizzle.js.map +1 -0
  347. package/dist/source/factory.d.ts +93 -0
  348. package/dist/source/factory.d.ts.map +1 -0
  349. package/dist/source/factory.js +287 -0
  350. package/dist/source/factory.js.map +1 -0
  351. package/dist/source/idempotency.d.ts +62 -0
  352. package/dist/source/idempotency.d.ts.map +1 -0
  353. package/dist/source/idempotency.js +145 -0
  354. package/dist/source/idempotency.js.map +1 -0
  355. package/dist/source/index.d.ts +24 -0
  356. package/dist/source/index.d.ts.map +1 -0
  357. package/dist/source/index.js +29 -0
  358. package/dist/source/index.js.map +1 -0
  359. package/dist/source/kysely.d.ts +3 -0
  360. package/dist/source/kysely.d.ts.map +1 -0
  361. package/dist/source/kysely.js +3 -0
  362. package/dist/source/kysely.js.map +1 -0
  363. package/dist/source/migrations.d.ts +22 -0
  364. package/dist/source/migrations.d.ts.map +1 -0
  365. package/dist/source/migrations.js +104 -0
  366. package/dist/source/migrations.js.map +1 -0
  367. package/dist/source/next.d.ts +33 -0
  368. package/dist/source/next.d.ts.map +1 -0
  369. package/dist/source/next.js +26 -0
  370. package/dist/source/next.js.map +1 -0
  371. package/dist/source/pushQueue.d.ts +135 -0
  372. package/dist/source/pushQueue.d.ts.map +1 -0
  373. package/dist/source/pushQueue.js +257 -0
  374. package/dist/source/pushQueue.js.map +1 -0
  375. package/dist/source/signing.d.ts +93 -0
  376. package/dist/source/signing.d.ts.map +1 -0
  377. package/dist/source/signing.js +163 -0
  378. package/dist/source/signing.js.map +1 -0
  379. package/dist/source/types.d.ts +402 -0
  380. package/dist/source/types.d.ts.map +1 -0
  381. package/dist/source/types.js +60 -0
  382. package/dist/source/types.js.map +1 -0
  383. package/dist/syncLog/contract.d.ts +21 -0
  384. package/dist/syncLog/contract.d.ts.map +1 -0
  385. package/dist/syncLog/contract.js +20 -0
  386. package/dist/syncLog/contract.js.map +1 -0
  387. package/dist/syncLog/index.d.ts +2 -0
  388. package/dist/syncLog/index.d.ts.map +1 -0
  389. package/dist/syncLog/index.js +2 -0
  390. package/dist/syncLog/index.js.map +1 -0
  391. package/dist/testing/fixtures/httpResponses.d.ts +74 -0
  392. package/dist/testing/fixtures/httpResponses.d.ts.map +1 -0
  393. package/dist/testing/fixtures/httpResponses.js +102 -0
  394. package/dist/testing/fixtures/httpResponses.js.map +1 -0
  395. package/dist/transactionLayer.d.ts +110 -0
  396. package/dist/transactionLayer.d.ts.map +1 -0
  397. package/dist/transactionLayer.js +25 -0
  398. package/dist/transactionLayer.js.map +1 -0
  399. package/dist/transactions/settlement/commitEnvelope.d.ts +144 -0
  400. package/dist/transactions/settlement/commitEnvelope.d.ts.map +1 -0
  401. package/dist/transactions/settlement/commitEnvelope.js +162 -0
  402. package/dist/transactions/settlement/commitEnvelope.js.map +1 -0
  403. package/dist/transactions/settlement/httpCommitEnvelope.d.ts +54 -0
  404. package/dist/transactions/settlement/httpCommitEnvelope.d.ts.map +1 -0
  405. package/dist/transactions/settlement/httpCommitEnvelope.js +208 -0
  406. package/dist/transactions/settlement/httpCommitEnvelope.js.map +1 -0
  407. package/dist/transactions/settlement/idempotencyKey.d.ts +11 -0
  408. package/dist/transactions/settlement/idempotencyKey.d.ts.map +1 -0
  409. package/dist/transactions/settlement/idempotencyKey.js +10 -0
  410. package/dist/transactions/settlement/idempotencyKey.js.map +1 -0
  411. package/dist/transactions/settlement/pendingWrite.d.ts +113 -0
  412. package/dist/transactions/settlement/pendingWrite.d.ts.map +1 -0
  413. package/dist/transactions/settlement/pendingWrite.js +21 -0
  414. package/dist/transactions/settlement/pendingWrite.js.map +1 -0
  415. package/dist/transport/commitFrames.d.ts +91 -0
  416. package/dist/transport/commitFrames.d.ts.map +1 -0
  417. package/dist/transport/commitFrames.js +135 -0
  418. package/dist/transport/commitFrames.js.map +1 -0
  419. package/dist/transport/connectionManager.d.ts +216 -0
  420. package/dist/transport/connectionManager.d.ts.map +1 -0
  421. package/dist/transport/connectionManager.js +674 -0
  422. package/dist/transport/connectionManager.js.map +1 -0
  423. package/dist/transport/credentialLifecycle.d.ts +178 -0
  424. package/dist/transport/credentialLifecycle.d.ts.map +1 -0
  425. package/dist/transport/credentialLifecycle.js +324 -0
  426. package/dist/transport/credentialLifecycle.js.map +1 -0
  427. package/dist/transport/heartbeat.d.ts +66 -0
  428. package/dist/transport/heartbeat.d.ts.map +1 -0
  429. package/dist/transport/heartbeat.js +94 -0
  430. package/dist/transport/heartbeat.js.map +1 -0
  431. package/dist/transport/httpClient.d.ts +143 -0
  432. package/dist/transport/httpClient.d.ts.map +1 -0
  433. package/dist/transport/httpClient.js +150 -0
  434. package/dist/transport/httpClient.js.map +1 -0
  435. package/dist/transport/httpFeed.d.ts +4 -0
  436. package/dist/transport/httpFeed.d.ts.map +1 -0
  437. package/dist/transport/httpFeed.js +94 -0
  438. package/dist/transport/httpFeed.js.map +1 -0
  439. package/dist/transport/httpOptions.d.ts +34 -0
  440. package/dist/transport/httpOptions.d.ts.map +1 -0
  441. package/dist/transport/httpOptions.js +13 -0
  442. package/dist/transport/httpOptions.js.map +1 -0
  443. package/dist/transport/httpTransport.d.ts +68 -0
  444. package/dist/transport/httpTransport.d.ts.map +1 -0
  445. package/dist/transport/httpTransport.js +1433 -0
  446. package/dist/transport/httpTransport.js.map +1 -0
  447. package/dist/transport/networkProbe.d.ts +85 -0
  448. package/dist/transport/networkProbe.d.ts.map +1 -0
  449. package/dist/transport/networkProbe.js +208 -0
  450. package/dist/transport/networkProbe.js.map +1 -0
  451. package/dist/transport/wsFrameHandlers.d.ts +129 -0
  452. package/dist/transport/wsFrameHandlers.d.ts.map +1 -0
  453. package/dist/transport/wsFrameHandlers.js +429 -0
  454. package/dist/transport/wsFrameHandlers.js.map +1 -0
  455. package/dist/transport/wsTransport.d.ts +575 -0
  456. package/dist/transport/wsTransport.d.ts.map +1 -0
  457. package/dist/transport/wsTransport.js +1024 -0
  458. package/dist/transport/wsTransport.js.map +1 -0
  459. package/dist/types/assertExact.d.ts +18 -0
  460. package/dist/types/assertExact.d.ts.map +1 -0
  461. package/dist/types/assertExact.js +2 -0
  462. package/dist/types/assertExact.js.map +1 -0
  463. package/dist/types/global.d.ts +108 -0
  464. package/dist/types/global.d.ts.map +1 -0
  465. package/dist/types/global.js +41 -0
  466. package/dist/types/global.js.map +1 -0
  467. package/dist/types/index.d.ts +206 -0
  468. package/dist/types/index.d.ts.map +1 -0
  469. package/dist/types/index.js +57 -0
  470. package/dist/types/index.js.map +1 -0
  471. package/dist/types/modelData.d.ts +11 -0
  472. package/dist/types/modelData.d.ts.map +1 -0
  473. package/dist/types/modelData.js +10 -0
  474. package/dist/types/modelData.js.map +1 -0
  475. package/dist/types/participant.d.ts +21 -0
  476. package/dist/types/participant.d.ts.map +1 -0
  477. package/dist/types/participant.js +11 -0
  478. package/dist/types/participant.js.map +1 -0
  479. package/dist/types/streams.d.ts +545 -0
  480. package/dist/types/streams.d.ts.map +1 -0
  481. package/dist/types/streams.js +12 -0
  482. package/dist/types/streams.js.map +1 -0
  483. package/dist/utils/asyncIterator.d.ts +35 -0
  484. package/dist/utils/asyncIterator.d.ts.map +1 -0
  485. package/dist/utils/asyncIterator.js +136 -0
  486. package/dist/utils/asyncIterator.js.map +1 -0
  487. package/dist/utils/duration.d.ts +51 -0
  488. package/dist/utils/duration.d.ts.map +1 -0
  489. package/dist/utils/duration.js +78 -0
  490. package/dist/utils/duration.js.map +1 -0
  491. package/dist/utils/json.d.ts +58 -0
  492. package/dist/utils/json.d.ts.map +1 -0
  493. package/dist/utils/json.js +277 -0
  494. package/dist/utils/json.js.map +1 -0
  495. package/dist/webhooks/events.d.ts +44 -0
  496. package/dist/webhooks/events.d.ts.map +1 -0
  497. package/dist/webhooks/events.js +43 -0
  498. package/dist/webhooks/events.js.map +1 -0
  499. package/dist/webhooks/index.d.ts +9 -0
  500. package/dist/webhooks/index.d.ts.map +1 -0
  501. package/dist/webhooks/index.js +9 -0
  502. package/dist/webhooks/index.js.map +1 -0
  503. package/dist/wire/accountResponses.d.ts +463 -0
  504. package/dist/wire/accountResponses.d.ts.map +1 -0
  505. package/dist/wire/accountResponses.js +294 -0
  506. package/dist/wire/accountResponses.js.map +1 -0
  507. package/dist/wire/auth.d.ts +57 -0
  508. package/dist/wire/auth.d.ts.map +1 -0
  509. package/dist/wire/auth.js +71 -0
  510. package/dist/wire/auth.js.map +1 -0
  511. package/dist/wire/bootstrapReason.d.ts +10 -0
  512. package/dist/wire/bootstrapReason.d.ts.map +1 -0
  513. package/dist/wire/bootstrapReason.js +9 -0
  514. package/dist/wire/bootstrapReason.js.map +1 -0
  515. package/dist/wire/claimEvent.d.ts +70 -0
  516. package/dist/wire/claimEvent.d.ts.map +1 -0
  517. package/dist/wire/claimEvent.js +74 -0
  518. package/dist/wire/claimEvent.js.map +1 -0
  519. package/dist/wire/claims.d.ts +475 -0
  520. package/dist/wire/claims.d.ts.map +1 -0
  521. package/dist/wire/claims.js +326 -0
  522. package/dist/wire/claims.js.map +1 -0
  523. package/dist/wire/commit.d.ts +604 -0
  524. package/dist/wire/commit.d.ts.map +1 -0
  525. package/dist/wire/commit.js +322 -0
  526. package/dist/wire/commit.js.map +1 -0
  527. package/dist/wire/delta.d.ts +251 -0
  528. package/dist/wire/delta.d.ts.map +1 -0
  529. package/dist/wire/delta.js +148 -0
  530. package/dist/wire/delta.js.map +1 -0
  531. package/dist/wire/errorEnvelope.d.ts +73 -0
  532. package/dist/wire/errorEnvelope.d.ts.map +1 -0
  533. package/dist/wire/errorEnvelope.js +124 -0
  534. package/dist/wire/errorEnvelope.js.map +1 -0
  535. package/dist/wire/feedCursor.d.ts +61 -0
  536. package/dist/wire/feedCursor.d.ts.map +1 -0
  537. package/dist/wire/feedCursor.js +83 -0
  538. package/dist/wire/feedCursor.js.map +1 -0
  539. package/dist/wire/feedEvent.d.ts +264 -0
  540. package/dist/wire/feedEvent.d.ts.map +1 -0
  541. package/dist/wire/feedEvent.js +66 -0
  542. package/dist/wire/feedEvent.js.map +1 -0
  543. package/dist/wire/frames.d.ts +195 -0
  544. package/dist/wire/frames.d.ts.map +1 -0
  545. package/dist/wire/frames.js +51 -0
  546. package/dist/wire/frames.js.map +1 -0
  547. package/dist/wire/inboundFrames.d.ts +490 -0
  548. package/dist/wire/inboundFrames.d.ts.map +1 -0
  549. package/dist/wire/inboundFrames.js +117 -0
  550. package/dist/wire/inboundFrames.js.map +1 -0
  551. package/dist/wire/index.d.ts +55 -0
  552. package/dist/wire/index.d.ts.map +1 -0
  553. package/dist/wire/index.js +84 -0
  554. package/dist/wire/index.js.map +1 -0
  555. package/dist/wire/listEnvelope.d.ts +38 -0
  556. package/dist/wire/listEnvelope.d.ts.map +1 -0
  557. package/dist/wire/listEnvelope.js +43 -0
  558. package/dist/wire/listEnvelope.js.map +1 -0
  559. package/dist/wire/modelMutations.d.ts +32 -0
  560. package/dist/wire/modelMutations.d.ts.map +1 -0
  561. package/dist/wire/modelMutations.js +53 -0
  562. package/dist/wire/modelMutations.js.map +1 -0
  563. package/dist/wire/modelResponses.d.ts +79 -0
  564. package/dist/wire/modelResponses.d.ts.map +1 -0
  565. package/dist/wire/modelResponses.js +44 -0
  566. package/dist/wire/modelResponses.js.map +1 -0
  567. package/dist/wire/modelShape.d.ts +79 -0
  568. package/dist/wire/modelShape.d.ts.map +1 -0
  569. package/dist/wire/modelShape.js +75 -0
  570. package/dist/wire/modelShape.js.map +1 -0
  571. package/dist/wire/protocol.d.ts +39 -0
  572. package/dist/wire/protocol.d.ts.map +1 -0
  573. package/dist/wire/protocol.js +39 -0
  574. package/dist/wire/protocol.js.map +1 -0
  575. package/dist/wire/protocolVersion.d.ts +74 -0
  576. package/dist/wire/protocolVersion.d.ts.map +1 -0
  577. package/dist/wire/protocolVersion.js +84 -0
  578. package/dist/wire/protocolVersion.js.map +1 -0
  579. package/package.json +187 -0
  580. package/src/ablo.ts +139 -0
  581. package/src/ai-sdk/coordinatedTool.ts +214 -0
  582. package/src/ai-sdk/index.ts +7 -0
  583. package/src/auth/apiKey.ts +540 -0
  584. package/src/auth/bootstrapScope.ts +15 -0
  585. package/src/auth/browserCredentialSafety.ts +48 -0
  586. package/src/auth/capability.ts +326 -0
  587. package/src/auth/capabilityLifecycle.ts +174 -0
  588. package/src/auth/credentialEndpoint.ts +79 -0
  589. package/src/auth/credentialEndpointProtocol.ts +51 -0
  590. package/src/auth/credentialKind.ts +20 -0
  591. package/src/auth/credentialPolicy.ts +244 -0
  592. package/src/auth/credentialResult.ts +23 -0
  593. package/src/auth/credentialSource.ts +99 -0
  594. package/src/auth/hostedEndpoints.ts +24 -0
  595. package/src/auth/identity.ts +330 -0
  596. package/src/auth/index.ts +592 -0
  597. package/src/auth/schemas.ts +94 -0
  598. package/src/auth/sessionMint.ts +126 -0
  599. package/src/auth/token.ts +4 -0
  600. package/src/batching/index.ts +200 -0
  601. package/src/coordination/awaitClaimGrant.ts +243 -0
  602. package/src/coordination/claimHeartbeatLoop.ts +165 -0
  603. package/src/coordination/claimMeta.ts +56 -0
  604. package/src/coordination/events.ts +86 -0
  605. package/src/coordination/index.ts +181 -0
  606. package/src/coordination/locator.ts +200 -0
  607. package/src/coordination/schema.ts +1346 -0
  608. package/src/coordination/targetConflict.ts +85 -0
  609. package/src/coordination/trace.ts +173 -0
  610. package/src/docs/catalog.ts +274 -0
  611. package/src/docs/index.ts +18 -0
  612. package/src/durableWrites.ts +134 -0
  613. package/src/environment.ts +132 -0
  614. package/src/errorCodes.ts +1591 -0
  615. package/src/errors.ts +918 -0
  616. package/src/footprint.ts +0 -0
  617. package/src/headlessClient.ts +161 -0
  618. package/src/index.ts +52 -0
  619. package/src/keys/index.ts +254 -0
  620. package/src/log/syncDeltaRow.ts +119 -0
  621. package/src/logger.ts +22 -0
  622. package/src/observability.ts +85 -0
  623. package/src/policy/types.ts +292 -0
  624. package/src/resources/functionalUpdate.ts +151 -0
  625. package/src/resources/httpResources.ts +520 -0
  626. package/src/resources/modelOperations.ts +444 -0
  627. package/src/resources/mutationOptions.ts +66 -0
  628. package/src/resources/where.ts +160 -0
  629. package/src/resources/writeOptionsSchema.ts +91 -0
  630. package/src/schema/coordination.ts +161 -0
  631. package/src/schema/ddl.ts +593 -0
  632. package/src/schema/ddlLock.ts +53 -0
  633. package/src/schema/diff.ts +489 -0
  634. package/src/schema/field.ts +321 -0
  635. package/src/schema/fieldRef.ts +88 -0
  636. package/src/schema/generate.ts +95 -0
  637. package/src/schema/index.ts +278 -0
  638. package/src/schema/loadStrategy.ts +52 -0
  639. package/src/schema/model.ts +476 -0
  640. package/src/schema/openapi.ts +658 -0
  641. package/src/schema/queries.ts +273 -0
  642. package/src/schema/relation.ts +291 -0
  643. package/src/schema/residency.ts +30 -0
  644. package/src/schema/roles.ts +325 -0
  645. package/src/schema/schema.ts +825 -0
  646. package/src/schema/select.ts +115 -0
  647. package/src/schema/serialize.ts +373 -0
  648. package/src/schema/sugar.ts +194 -0
  649. package/src/schema/tenancy.ts +221 -0
  650. package/src/server/adapter.ts +203 -0
  651. package/src/server/commit.ts +109 -0
  652. package/src/server/index.ts +26 -0
  653. package/src/server/readConfig.ts +82 -0
  654. package/src/server/storageMode.ts +20 -0
  655. package/src/source/adapter.ts +85 -0
  656. package/src/source/adapters/drizzle.ts +291 -0
  657. package/src/source/adapters/kysely.ts +346 -0
  658. package/src/source/adapters/kyselyMutationCore.ts +220 -0
  659. package/src/source/adapters/memory.ts +154 -0
  660. package/src/source/adapters/prisma.ts +282 -0
  661. package/src/source/conformance.ts +287 -0
  662. package/src/source/connector.ts +394 -0
  663. package/src/source/connectorProtocol.ts +189 -0
  664. package/src/source/contract.ts +221 -0
  665. package/src/source/drizzle.ts +1 -0
  666. package/src/source/factory.ts +444 -0
  667. package/src/source/idempotency.ts +189 -0
  668. package/src/source/index.ts +182 -0
  669. package/src/source/kysely.ts +2 -0
  670. package/src/source/migrations.ts +109 -0
  671. package/src/source/next.ts +38 -0
  672. package/src/source/pushQueue.ts +368 -0
  673. package/src/source/signing.ts +279 -0
  674. package/src/source/types.ts +502 -0
  675. package/src/syncLog/contract.ts +32 -0
  676. package/src/syncLog/index.ts +1 -0
  677. package/src/testing/fixtures/httpResponses.ts +155 -0
  678. package/src/transactionLayer.ts +122 -0
  679. package/src/transactions/settlement/commitEnvelope.ts +192 -0
  680. package/src/transactions/settlement/httpCommitEnvelope.ts +250 -0
  681. package/src/transactions/settlement/idempotencyKey.ts +11 -0
  682. package/src/transactions/settlement/pendingWrite.ts +24 -0
  683. package/src/transport/commitFrames.ts +225 -0
  684. package/src/transport/connectionManager.ts +856 -0
  685. package/src/transport/credentialLifecycle.ts +389 -0
  686. package/src/transport/heartbeat.ts +118 -0
  687. package/src/transport/httpClient.ts +354 -0
  688. package/src/transport/httpFeed.ts +111 -0
  689. package/src/transport/httpOptions.ts +41 -0
  690. package/src/transport/httpTransport.ts +1976 -0
  691. package/src/transport/networkProbe.ts +249 -0
  692. package/src/transport/wsFrameHandlers.ts +619 -0
  693. package/src/transport/wsTransport.ts +1491 -0
  694. package/src/types/assertExact.ts +17 -0
  695. package/src/types/global.ts +123 -0
  696. package/src/types/index.ts +270 -0
  697. package/src/types/modelData.ts +11 -0
  698. package/src/types/participant.ts +22 -0
  699. package/src/types/streams.ts +702 -0
  700. package/src/utils/asyncIterator.ts +141 -0
  701. package/src/utils/duration.ts +88 -0
  702. package/src/utils/json.ts +281 -0
  703. package/src/webhooks/events.ts +96 -0
  704. package/src/webhooks/index.ts +12 -0
  705. package/src/wire/accountResponses.ts +328 -0
  706. package/src/wire/auth.ts +86 -0
  707. package/src/wire/bootstrapReason.ts +10 -0
  708. package/src/wire/claimEvent.ts +85 -0
  709. package/src/wire/claims.ts +370 -0
  710. package/src/wire/commit.ts +379 -0
  711. package/src/wire/delta.ts +173 -0
  712. package/src/wire/errorEnvelope.ts +133 -0
  713. package/src/wire/feedCursor.ts +91 -0
  714. package/src/wire/feedEvent.ts +74 -0
  715. package/src/wire/frames.ts +77 -0
  716. package/src/wire/inboundFrames.ts +182 -0
  717. package/src/wire/index.ts +328 -0
  718. package/src/wire/listEnvelope.ts +51 -0
  719. package/src/wire/modelMutations.ts +55 -0
  720. package/src/wire/modelResponses.ts +48 -0
  721. package/src/wire/modelShape.ts +83 -0
  722. package/src/wire/protocol.ts +39 -0
  723. package/src/wire/protocolVersion.ts +97 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/coordination/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAiB,MAAM,uBAAuB,CAAC;AAyClE;;;;;;GAMG;AACH,MAAM,UAAU,IAAI,CAAC,IAAY;IAC/B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACxB,CAAC;AAED;;;;;;;;;;;GAWG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AE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE;IACjD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACpC,CAAC;KACD,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ClaimTargetDetails } from './locator.js';
2
+ export declare function targetsConflict(held: ClaimTargetDetails, incoming: ClaimTargetDetails | undefined): boolean;
3
+ //# sourceMappingURL=targetConflict.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"targetConflict.d.ts","sourceRoot":"","sources":["../../src/coordination/targetConflict.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAwDvD,wBAAgB,eAAe,CAC7B,IAAI,EAAE,kBAAkB,EACxB,QAAQ,EAAE,kBAAkB,GAAG,SAAS,GACvC,OAAO,CAyBT"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Whether two claims on the same entity collide — the single most consequential
3
+ * predicate in the claim protocol, and the one rule that decides whether a
4
+ * second writer is granted a lease or made to wait.
5
+ *
6
+ * It lived in two files for as long as there were two claim authorities: the
7
+ * Redis lease store, which is authoritative wherever Redis is wired, and the
8
+ * in-process presence store, which answers when it is not. Both spelled the
9
+ * rule out in full, byte for byte, so a change to the granularity semantics had
10
+ * two places to land and no way to notice when it landed in one. It is one
11
+ * definition here, and both authorities import it.
12
+ *
13
+ * It lives in the settlement core rather than the server because it is the rule
14
+ * itself, not a deployment of it: a claim authority running against a
15
+ * developer's own database has to answer this question exactly the same way,
16
+ * and a client that wants to predict a refusal before paying for the round trip
17
+ * reads the same predicate. Nothing about it needs a socket, a store, or a
18
+ * screen.
19
+ *
20
+ * Entity identity is NOT part of this comparison. Callers reach this predicate
21
+ * having already narrowed to a single `(organization, environment, entityType,
22
+ * entityId)` bucket — the lease store through its key, the presence store
23
+ * through its per-entity scan — so what remains to decide is only whether the
24
+ * two sub-targets within that entity overlap.
25
+ *
26
+ * **The bias is deliberate: when in doubt, conflict.** A false conflict costs a
27
+ * writer a wait. A missed conflict hands two writers the same target and loses
28
+ * one of their updates with no error anywhere, which is the failure this
29
+ * predicate exists to prevent.
30
+ */
31
+ /**
32
+ * The named parts a claim covers, as one set.
33
+ *
34
+ * `field` and `fields` are the same idea at two cardinalities, so the rule
35
+ * reads both through here and never has to ask which one a caller used. Names
36
+ * are lowercased for the same reason the single-field comparison always
37
+ * lowercased them.
38
+ */
39
+ function fieldSet(target) {
40
+ const named = [
41
+ ...(target?.field !== undefined ? [target.field] : []),
42
+ ...(target?.fields ?? []),
43
+ ];
44
+ return new Set(named.map((n) => n.toLowerCase()));
45
+ }
46
+ /** Whether a claim narrows below the whole entity at all. */
47
+ function hasSubtarget(target) {
48
+ return Boolean(target?.field || (target?.fields && target.fields.length > 0));
49
+ }
50
+ export function targetsConflict(held, incoming) {
51
+ // Whole-entity claims are conservative: they conflict with any narrower
52
+ // field claim under the same entity.
53
+ if (!hasSubtarget(held) || !hasSubtarget(incoming))
54
+ return true;
55
+ // Field is the floor. A claim is only as fine as the smallest thing the write
56
+ // path can address, and today that is a whole field: nothing writes part of a
57
+ // value. Sub-field targeting — a text range, a path into a document — would
58
+ // let two writers hold disjoint parts of the SAME field at once, which is
59
+ // only safe once concurrent edits to one field can be reconciled (operational
60
+ // transformation). We have not solved that yet, so we do not offer the finer
61
+ // grain: two claims on the same field conflict, full stop. When same-field
62
+ // concurrency is solved, sub-field targets return with real disjointness.
63
+ // See docs/plans/claim-granularity-field-floor.md.
64
+ //
65
+ // A claim that names no field covers every field, so it conflicts with any
66
+ // claim under the same entity. Two that both name fields conflict only where
67
+ // their sets intersect.
68
+ const heldFields = fieldSet(held);
69
+ const incomingFields = fieldSet(incoming);
70
+ return (heldFields.size === 0 ||
71
+ incomingFields.size === 0 ||
72
+ [...heldFields].some((name) => incomingFields.has(name)));
73
+ }
74
+ //# sourceMappingURL=targetConflict.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"targetConflict.js","sourceRoot":"","sources":["../../src/coordination/targetConflict.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;;;;;GAOG;AACH,SAAS,QAAQ,CAAC,MAAsC;IACtD,MAAM,KAAK,GAAG;QACZ,GAAG,CAAC,MAAM,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACtD,GAAG,CAAC,MAAM,EAAE,MAAM,IAAI,EAAE,CAAC;KAC1B,CAAC;IACF,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,6DAA6D;AAC7D,SAAS,YAAY,CAAC,MAAsC;IAC1D,OAAO,OAAO,CACZ,MAAM,EAAE,KAAK,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAC9D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,IAAwB,EACxB,QAAwC;IAExC,wEAAwE;IACxE,qCAAqC;IACrC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IAEhE,8EAA8E;IAC9E,8EAA8E;IAC9E,4EAA4E;IAC5E,0EAA0E;IAC1E,8EAA8E;IAC9E,6EAA6E;IAC7E,2EAA2E;IAC3E,0EAA0E;IAC1E,mDAAmD;IACnD,EAAE;IACF,2EAA2E;IAC3E,6EAA6E;IAC7E,wBAAwB;IACxB,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,cAAc,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC1C,OAAO,CACL,UAAU,CAAC,IAAI,KAAK,CAAC;QACrB,cAAc,CAAC,IAAI,KAAK,CAAC;QACzB,CAAC,GAAG,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CACzD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * A claim log — the simplest way to watch agents collide. The engine reports
3
+ * the claim lifecycle (`acquired → queued → granted → lost / rejected /
4
+ * expired`) and the notify-instead-of-abort stale write through two channels:
5
+ * human-readable `logger` lines (shown with `new Ablo({ debug: true })`) and
6
+ * structured `observability.captureClaim` / `captureConflict` calls.
7
+ *
8
+ * This is a third channel, shaped for tests and evals. Pass a {@link ClaimLog}
9
+ * as `Ablo({ observability })`, run your scenario, then read back an ordered
10
+ * list — print it to eyeball what happened, or call `collisions()` to assert on it.
11
+ */
12
+ import type { ClaimEvent, ConflictEvent, CoordinationObserver } from './events.js';
13
+ /** A claim state change as one quiet, greppable line. */
14
+ export declare function formatClaim(e: ClaimEvent): string;
15
+ /** A notify-instead-of-abort stale write as one readable line. */
16
+ export declare function formatConflict(e: ConflictEvent): string;
17
+ /** One ordered entry in a {@link ClaimLog}. */
18
+ export interface ClaimLogEntry {
19
+ /** Monotonic order index — deterministic, clock-free, eval-friendly. */
20
+ readonly seq: number;
21
+ /** The same one-line text the console and breadcrumb channels emit. */
22
+ readonly line: string;
23
+ /** A collision worth flagging: a rejected/lost claim or a stale write. */
24
+ readonly collision: boolean;
25
+ readonly claim?: ClaimEvent;
26
+ readonly conflict?: ConflictEvent;
27
+ }
28
+ /**
29
+ * Collects the claim lifecycle + stale-write collisions into an ordered list.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const log = new ClaimLog();
34
+ * const ablo = new Ablo({ schema, apiKey, observability: log });
35
+ * // …run the agents…
36
+ * console.log(`${log}`); // pretty timeline for eyeballing
37
+ * expect(log.collisions()).toHaveLength(0); // assert no one stepped on anyone
38
+ * ```
39
+ *
40
+ * Implements the transaction layer's narrow {@link CoordinationObserver}.
41
+ * The sync engine re-serves a compatibility subclass that fills its broader
42
+ * lifecycle-observability contract, so the public `Ablo({ observability })`
43
+ * usage remains unchanged without teaching this core class about bootstrap,
44
+ * IndexedDB, or WebSockets.
45
+ */
46
+ export declare class ClaimLog implements CoordinationObserver {
47
+ private readonly max;
48
+ private rows;
49
+ private seq;
50
+ private readonly listeners;
51
+ /** Cap the buffer so a long-running session can't grow unbounded. */
52
+ constructor(max?: number);
53
+ captureClaim(claim: ClaimEvent): void;
54
+ captureConflict(conflict: ConflictEvent): void;
55
+ /**
56
+ * Fire `listener` every time an event lands. Returns an unsubscribe fn. Same
57
+ * contract as `ablo.claims.onChange` — drop it into `useSyncExternalStore` in
58
+ * React or `autorun` in MobX to render a live activity feed.
59
+ *
60
+ * @example
61
+ * ```tsx
62
+ * const log = useMemo(() => new ClaimLog(), []);
63
+ * const entries = useSyncExternalStore(log.onChange, () => log.entries);
64
+ * return <ul>{entries.map((e) => <li key={e.seq}>{e.line}</li>)}</ul>;
65
+ * ```
66
+ */
67
+ readonly onChange: (listener: () => void) => (() => void);
68
+ /** The full ordered list. Stable reference until the next event lands. */
69
+ get entries(): readonly ClaimLogEntry[];
70
+ /** Only the collisions: rejected/lost claims + stale writes. */
71
+ collisions(): readonly ClaimLogEntry[];
72
+ /** Drop everything — useful between scenarios in one process. */
73
+ clear(): void;
74
+ /** Printable: one event per line, collisions marked. */
75
+ toString(): string;
76
+ private add;
77
+ private notify;
78
+ }
79
+ //# sourceMappingURL=trace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../src/coordination/trace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,UAAU,EACV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@@ -0,0 +1,139 @@
1
+ /**
2
+ * A claim log — the simplest way to watch agents collide. The engine reports
3
+ * the claim lifecycle (`acquired → queued → granted → lost / rejected /
4
+ * expired`) and the notify-instead-of-abort stale write through two channels:
5
+ * human-readable `logger` lines (shown with `new Ablo({ debug: true })`) and
6
+ * structured `observability.captureClaim` / `captureConflict` calls.
7
+ *
8
+ * This is a third channel, shaped for tests and evals. Pass a {@link ClaimLog}
9
+ * as `Ablo({ observability })`, run your scenario, then read back an ordered
10
+ * list — print it to eyeball what happened, or call `collisions()` to assert on it.
11
+ */
12
+ // ─────────────────────────────────────────────
13
+ // Formatters — one readable line per event. Shared by the debug logger and
14
+ // this log so console output and log output never drift.
15
+ // ─────────────────────────────────────────────
16
+ /** A claim state change as one quiet, greppable line. */
17
+ export function formatClaim(e) {
18
+ const target = e.model && e.id ? `${e.model}/${e.id}` : e.claimId ?? 'unknown target';
19
+ const scope = e.field ? `#${e.field}` : '';
20
+ const pos = e.position !== undefined ? ` [pos ${e.position}]` : '';
21
+ // The kind belongs to the counterparty, which is the only participant an
22
+ // event names: on an acquisition the participant is us.
23
+ const kind = e.heldBy?.participantKind;
24
+ const actor = e.actor ? `${e.actor}${kind ? ` (${kind})` : ''}` : '';
25
+ // `rejected`/`lost` name the blocking holder; the rest name us (or no one).
26
+ const by = actor
27
+ ? e.phase === 'rejected' || e.phase === 'lost'
28
+ ? ` — held by ${actor}`
29
+ : ` — by ${actor}`
30
+ : '';
31
+ // The cause when there is one, in the policy's own words when a policy
32
+ // decided; otherwise what the holder said they were doing. A line never
33
+ // shows both, because a claim that ended has a cause and a claim that is
34
+ // simply alive has only its description.
35
+ const why = e.reason
36
+ ? `: ${e.policyReason ?? e.reason}`
37
+ : e.description
38
+ ? `: ${e.description}`
39
+ : '';
40
+ return `claim ${e.phase}: ${target}${scope}${pos}${by}${why}`;
41
+ }
42
+ /** A notify-instead-of-abort stale write as one readable line. */
43
+ export function formatConflict(e) {
44
+ const rows = e.rows.map((r) => `${r.model}/${r.id}(${r.fields.join(',')})`).join(', ');
45
+ return `conflict: tx ${e.clientTxId} — ${e.rows.length} row(s) changed underneath${rows ? `: ${rows}` : ''}`;
46
+ }
47
+ /**
48
+ * Collects the claim lifecycle + stale-write collisions into an ordered list.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * const log = new ClaimLog();
53
+ * const ablo = new Ablo({ schema, apiKey, observability: log });
54
+ * // …run the agents…
55
+ * console.log(`${log}`); // pretty timeline for eyeballing
56
+ * expect(log.collisions()).toHaveLength(0); // assert no one stepped on anyone
57
+ * ```
58
+ *
59
+ * Implements the transaction layer's narrow {@link CoordinationObserver}.
60
+ * The sync engine re-serves a compatibility subclass that fills its broader
61
+ * lifecycle-observability contract, so the public `Ablo({ observability })`
62
+ * usage remains unchanged without teaching this core class about bootstrap,
63
+ * IndexedDB, or WebSockets.
64
+ */
65
+ export class ClaimLog {
66
+ max;
67
+ // Immutable list: a new array reference on every change. This is what lets
68
+ // `useSyncExternalStore(log.onChange, () => log.entries)` detect updates —
69
+ // it compares snapshots by reference, so an in-place push would never render.
70
+ rows = [];
71
+ seq = 0;
72
+ listeners = new Set();
73
+ /** Cap the buffer so a long-running session can't grow unbounded. */
74
+ constructor(max = 1_000) {
75
+ this.max = max;
76
+ }
77
+ // —— the two channels we record ——
78
+ captureClaim(claim) {
79
+ this.add({
80
+ line: formatClaim(claim),
81
+ collision: claim.phase === 'rejected' || claim.phase === 'lost',
82
+ claim,
83
+ });
84
+ }
85
+ captureConflict(conflict) {
86
+ this.add({ line: formatConflict(conflict), collision: true, conflict });
87
+ }
88
+ // —— reactivity ——
89
+ /**
90
+ * Fire `listener` every time an event lands. Returns an unsubscribe fn. Same
91
+ * contract as `ablo.claims.onChange` — drop it into `useSyncExternalStore` in
92
+ * React or `autorun` in MobX to render a live activity feed.
93
+ *
94
+ * @example
95
+ * ```tsx
96
+ * const log = useMemo(() => new ClaimLog(), []);
97
+ * const entries = useSyncExternalStore(log.onChange, () => log.entries);
98
+ * return <ul>{entries.map((e) => <li key={e.seq}>{e.line}</li>)}</ul>;
99
+ * ```
100
+ */
101
+ onChange = (listener) => {
102
+ this.listeners.add(listener);
103
+ return () => this.listeners.delete(listener);
104
+ };
105
+ // —— inspection ——
106
+ /** The full ordered list. Stable reference until the next event lands. */
107
+ get entries() {
108
+ return this.rows;
109
+ }
110
+ /** Only the collisions: rejected/lost claims + stale writes. */
111
+ collisions() {
112
+ return this.rows.filter((e) => e.collision);
113
+ }
114
+ /** Drop everything — useful between scenarios in one process. */
115
+ clear() {
116
+ this.rows = [];
117
+ this.seq = 0;
118
+ this.notify();
119
+ }
120
+ /** Printable: one event per line, collisions marked. */
121
+ toString() {
122
+ if (this.rows.length === 0)
123
+ return 'claim log: (empty)';
124
+ const w = String(this.rows.length).length;
125
+ return this.rows
126
+ .map((e) => `${String(e.seq).padStart(w)} ${e.collision ? '⚠ ' : ' '}${e.line}`)
127
+ .join('\n');
128
+ }
129
+ add(entry) {
130
+ const next = [...this.rows, { seq: this.seq++, ...entry }];
131
+ this.rows = next.length > this.max ? next.slice(next.length - this.max) : next;
132
+ this.notify();
133
+ }
134
+ notify() {
135
+ for (const listener of this.listeners)
136
+ listener();
137
+ }
138
+ }
139
+ //# sourceMappingURL=trace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trace.js","sourceRoot":"","sources":["../../src/coordination/trace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,gDAAgD;AAChD,2EAA2E;AAC3E,yDAAyD;AACzD,gDAAgD;AAEhD,yDAAyD;AACzD,MAAM,UAAU,WAAW,CAAC,CAAa;IACvC,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,gBAAgB,CAAC;IACtF,MAAM,KAAK,GAAG,CAAC,CAAC,KA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,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC/E,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAEO,MAAM;QACZ,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,SAAS;YAAE,QAAQ,EAAE,CAAC;IACpD,CAAC;CAEF"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * The catalog of documentation this package ships.
3
+ *
4
+ * One definition of *which docs exist*, read from the files themselves. Every
5
+ * reader — `ablo docs`, the public `/api/docs/*` routes, the MCP docs tools —
6
+ * resolves through here rather than keeping its own list, because a
7
+ * hand-maintained index of a directory is a copy that drifts the moment a page
8
+ * is added and nothing fails when it does. Before this module the public web
9
+ * allowlist had fallen 21 pages behind the corpus, including `coordination`.
10
+ *
11
+ * Title and description are DERIVED from each file's own convention: an H1,
12
+ * then a one-paragraph blockquote stating what the page is for. That blockquote
13
+ * is the description everywhere it is needed — the site frontmatter lifts the
14
+ * same line — so a page states its own promise exactly once, in the source that
15
+ * ships in the npm tarball and still reads correctly as plain markdown.
16
+ *
17
+ * The published set mirrors the tarball's `files` globs (`docs/*.md`,
18
+ * `docs/examples/*.md`, plus the three root files). Anything else under `docs/`
19
+ * — `docs/internal/**` above all — is neither shipped nor catalogued, and that
20
+ * exclusion is the only thing keeping internal notes off the public routes now
21
+ * that they read from here.
22
+ */
23
+ /** Where a page sits in the corpus, and how a reader should group it. */
24
+ export type DocKind = 'guide' | 'example' | 'package';
25
+ /** One documentation page, as shipped. */
26
+ export interface DocEntry {
27
+ /** Stable reference: `quickstart`, `examples/nextjs`, `agents`. */
28
+ readonly slug: string;
29
+ /** Human-readable title — the file's H1, or curated for the root files. */
30
+ readonly title: string;
31
+ /** One line stating what the page is for — the file's promise blockquote. */
32
+ readonly description: string;
33
+ readonly kind: DocKind;
34
+ /** Absolute path on disk. */
35
+ readonly path: string;
36
+ readonly mime: string;
37
+ }
38
+ /**
39
+ * Read the catalog from a package root — the directory holding `docs/` and the
40
+ * three root files.
41
+ *
42
+ * The root is a parameter rather than resolved here because each reader knows
43
+ * it differently and they are genuinely different facts: the CLI resolves it
44
+ * against its own bundle inside `node_modules`, while the web app resolves it
45
+ * against the monorepo checkout. Nothing is cached; callers that serve many
46
+ * requests should memoize the returned array.
47
+ */
48
+ export declare function readDocsCatalog(packageRoot: string): Promise<DocEntry[]>;
49
+ /**
50
+ * Pull a page's title and promise line out of its markdown.
51
+ *
52
+ * The convention every page follows: an H1, then a blockquote paragraph saying
53
+ * what the page is for. A page missing either simply reports what it has — the
54
+ * catalog never invents prose.
55
+ */
56
+ export declare function parseDocHeader(body: string): {
57
+ readonly title: string | null;
58
+ readonly description: string;
59
+ };
60
+ /**
61
+ * Resolve a reference to a page. Accepts the slug (`coordination`), a curated
62
+ * alias (`storage`), or a repo-relative path (`docs/coordination.md`,
63
+ * `AGENTS.md`) — the three forms readers actually arrive with. Returns null
64
+ * rather than throwing so a caller can render its own not-found.
65
+ */
66
+ export declare function findDoc(catalog: readonly DocEntry[], reference: string): DocEntry | null;
67
+ /**
68
+ * Slugs closest to a miss, for a "did you mean" line. Ranks by shared prefix,
69
+ * then substring containment — enough to catch a typo or a half-remembered
70
+ * name without pulling in a distance library.
71
+ */
72
+ export declare function suggestSlugs(catalog: readonly DocEntry[], reference: string, limit?: number): string[];
73
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/docs/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH,yEAAyE;AACzE,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AAEtD,0CAA0C;AAC1C,MAAM,WAAW,QAAQ;IACvB,mEAAmE;IACnE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,6EAA6E;IAC7E,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AA6DD;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAsB9E;AAwCD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG;IAC5C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B,CAeA;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,SAAS,QAAQ,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAmBxF;AAOD;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,SAAS,QAAQ,EAAE,EAC5B,SAAS,EAAE,MAAM,EACjB,KAAK,SAAI,GACR,MAAM,EAAE,CAgBV"}