ramosedb 0.0.0-stage → 0.4.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 (960) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +17 -0
  3. package/README.md +57 -2
  4. package/dist/Auth.d.ts +55 -0
  5. package/dist/Auth.d.ts.map +1 -0
  6. package/dist/Auth.js +50 -0
  7. package/dist/Auth.js.map +1 -0
  8. package/dist/Database.d.ts +40 -0
  9. package/dist/Database.d.ts.map +1 -0
  10. package/dist/Database.js +62 -0
  11. package/dist/Database.js.map +1 -0
  12. package/dist/Providers.d.ts +8 -0
  13. package/dist/Providers.d.ts.map +1 -0
  14. package/dist/Providers.js +9 -0
  15. package/dist/Providers.js.map +1 -0
  16. package/dist/RamoseEnv.d.ts +37 -0
  17. package/dist/RamoseEnv.d.ts.map +1 -0
  18. package/dist/RamoseEnv.js +2 -0
  19. package/dist/RamoseEnv.js.map +1 -0
  20. package/dist/Server.d.ts +100 -0
  21. package/dist/Server.d.ts.map +1 -0
  22. package/dist/Server.js +263 -0
  23. package/dist/Server.js.map +1 -0
  24. package/dist/ServerRuntime.d.ts +10 -0
  25. package/dist/ServerRuntime.d.ts.map +1 -0
  26. package/dist/ServerRuntime.js +11 -0
  27. package/dist/ServerRuntime.js.map +1 -0
  28. package/dist/better-auth/client.d.ts +19 -0
  29. package/dist/better-auth/client.d.ts.map +1 -0
  30. package/dist/better-auth/client.js +110 -0
  31. package/dist/better-auth/client.js.map +1 -0
  32. package/dist/better-auth/index.d.ts +140 -0
  33. package/dist/better-auth/index.d.ts.map +1 -0
  34. package/dist/better-auth/index.js +168 -0
  35. package/dist/better-auth/index.js.map +1 -0
  36. package/dist/client/activation.d.ts +2 -0
  37. package/dist/client/activation.d.ts.map +1 -0
  38. package/dist/client/activation.js +33 -0
  39. package/dist/client/activation.js.map +1 -0
  40. package/dist/client/catalog.d.ts +15 -0
  41. package/dist/client/catalog.d.ts.map +1 -0
  42. package/dist/client/catalog.js +48 -0
  43. package/dist/client/catalog.js.map +1 -0
  44. package/dist/client/changesets.d.ts +85 -0
  45. package/dist/client/changesets.d.ts.map +1 -0
  46. package/dist/client/changesets.js +160 -0
  47. package/dist/client/changesets.js.map +1 -0
  48. package/dist/client/client.d.ts +45 -0
  49. package/dist/client/client.d.ts.map +1 -0
  50. package/dist/client/client.js +425 -0
  51. package/dist/client/client.js.map +1 -0
  52. package/dist/client/database.d.ts +163 -0
  53. package/dist/client/database.d.ts.map +1 -0
  54. package/dist/client/database.js +795 -0
  55. package/dist/client/database.js.map +1 -0
  56. package/dist/client/entity.d.ts +63 -0
  57. package/dist/client/entity.d.ts.map +1 -0
  58. package/dist/client/entity.js +141 -0
  59. package/dist/client/entity.js.map +1 -0
  60. package/dist/client/errors.d.ts +67 -0
  61. package/dist/client/errors.d.ts.map +1 -0
  62. package/dist/client/errors.js +39 -0
  63. package/dist/client/errors.js.map +1 -0
  64. package/dist/client/index.d.ts +13 -0
  65. package/dist/client/index.d.ts.map +1 -0
  66. package/dist/client/index.js +6 -0
  67. package/dist/client/index.js.map +1 -0
  68. package/dist/client/mutation-schema.d.ts +92 -0
  69. package/dist/client/mutation-schema.d.ts.map +1 -0
  70. package/dist/client/mutation-schema.js +2 -0
  71. package/dist/client/mutation-schema.js.map +1 -0
  72. package/dist/client/mutation.d.ts +25 -0
  73. package/dist/client/mutation.d.ts.map +1 -0
  74. package/dist/client/mutation.js +75 -0
  75. package/dist/client/mutation.js.map +1 -0
  76. package/dist/client/operations.d.ts +39 -0
  77. package/dist/client/operations.d.ts.map +1 -0
  78. package/dist/client/operations.js +183 -0
  79. package/dist/client/operations.js.map +1 -0
  80. package/dist/client/query.d.ts +53 -0
  81. package/dist/client/query.d.ts.map +1 -0
  82. package/dist/client/query.js +85 -0
  83. package/dist/client/query.js.map +1 -0
  84. package/dist/client/receipt.d.ts +53 -0
  85. package/dist/client/receipt.d.ts.map +1 -0
  86. package/dist/client/receipt.js +79 -0
  87. package/dist/client/receipt.js.map +1 -0
  88. package/dist/client/submission.d.ts +44 -0
  89. package/dist/client/submission.d.ts.map +1 -0
  90. package/dist/client/submission.js +165 -0
  91. package/dist/client/submission.js.map +1 -0
  92. package/dist/client/subscription.d.ts +18 -0
  93. package/dist/client/subscription.d.ts.map +1 -0
  94. package/dist/client/subscription.js +75 -0
  95. package/dist/client/subscription.js.map +1 -0
  96. package/dist/client/sync.d.ts +32 -0
  97. package/dist/client/sync.d.ts.map +1 -0
  98. package/dist/client/sync.js +34 -0
  99. package/dist/client/sync.js.map +1 -0
  100. package/dist/client/view.d.ts +37 -0
  101. package/dist/client/view.d.ts.map +1 -0
  102. package/dist/client/view.js +112 -0
  103. package/dist/client/view.js.map +1 -0
  104. package/dist/db/Binding.d.ts +79 -0
  105. package/dist/db/Binding.d.ts.map +1 -0
  106. package/dist/db/Binding.js +138 -0
  107. package/dist/db/Binding.js.map +1 -0
  108. package/dist/db/Composer.d.ts +7 -0
  109. package/dist/db/Composer.d.ts.map +1 -0
  110. package/dist/db/Composer.js +6 -0
  111. package/dist/db/Composer.js.map +1 -0
  112. package/dist/db/DatabaseName.d.ts +7 -0
  113. package/dist/db/DatabaseName.d.ts.map +1 -0
  114. package/dist/db/DatabaseName.js +9 -0
  115. package/dist/db/DatabaseName.js.map +1 -0
  116. package/dist/db/Eid.d.ts +19 -0
  117. package/dist/db/Eid.d.ts.map +1 -0
  118. package/dist/db/Eid.js +2 -0
  119. package/dist/db/Eid.js.map +1 -0
  120. package/dist/db/Entity.d.ts +133 -0
  121. package/dist/db/Entity.d.ts.map +1 -0
  122. package/dist/db/Entity.js +104 -0
  123. package/dist/db/Entity.js.map +1 -0
  124. package/dist/db/Errors.d.ts +138 -0
  125. package/dist/db/Errors.d.ts.map +1 -0
  126. package/dist/db/Errors.js +171 -0
  127. package/dist/db/Errors.js.map +1 -0
  128. package/dist/db/Field.d.ts +170 -0
  129. package/dist/db/Field.d.ts.map +1 -0
  130. package/dist/db/Field.js +187 -0
  131. package/dist/db/Field.js.map +1 -0
  132. package/dist/db/IdentName.d.ts +94 -0
  133. package/dist/db/IdentName.d.ts.map +1 -0
  134. package/dist/db/IdentName.js +34 -0
  135. package/dist/db/IdentName.js.map +1 -0
  136. package/dist/db/Operation.d.ts +441 -0
  137. package/dist/db/Operation.d.ts.map +1 -0
  138. package/dist/db/Operation.js +237 -0
  139. package/dist/db/Operation.js.map +1 -0
  140. package/dist/db/Projection.d.ts +97 -0
  141. package/dist/db/Projection.d.ts.map +1 -0
  142. package/dist/db/Projection.js +183 -0
  143. package/dist/db/Projection.js.map +1 -0
  144. package/dist/db/Pull.d.ts +361 -0
  145. package/dist/db/Pull.d.ts.map +1 -0
  146. package/dist/db/Pull.js +547 -0
  147. package/dist/db/Pull.js.map +1 -0
  148. package/dist/db/Schema.d.ts +37 -0
  149. package/dist/db/Schema.d.ts.map +1 -0
  150. package/dist/db/Schema.js +94 -0
  151. package/dist/db/Schema.js.map +1 -0
  152. package/dist/db/Trait.d.ts +129 -0
  153. package/dist/db/Trait.d.ts.map +1 -0
  154. package/dist/db/Trait.js +65 -0
  155. package/dist/db/Trait.js.map +1 -0
  156. package/dist/db/Tx.d.ts +128 -0
  157. package/dist/db/Tx.d.ts.map +1 -0
  158. package/dist/db/Tx.js +248 -0
  159. package/dist/db/Tx.js.map +1 -0
  160. package/dist/db/allocations.d.ts +44 -0
  161. package/dist/db/allocations.d.ts.map +1 -0
  162. package/dist/db/allocations.js +70 -0
  163. package/dist/db/allocations.js.map +1 -0
  164. package/dist/db/attrRef.d.ts +5 -0
  165. package/dist/db/attrRef.d.ts.map +1 -0
  166. package/dist/db/attrRef.js +6 -0
  167. package/dist/db/attrRef.js.map +1 -0
  168. package/dist/db/compose.d.ts +26 -0
  169. package/dist/db/compose.d.ts.map +1 -0
  170. package/dist/db/compose.js +105 -0
  171. package/dist/db/compose.js.map +1 -0
  172. package/dist/db/composition.d.ts +4 -0
  173. package/dist/db/composition.d.ts.map +1 -0
  174. package/dist/db/composition.js +24 -0
  175. package/dist/db/composition.js.map +1 -0
  176. package/dist/db/creation.d.ts +102 -0
  177. package/dist/db/creation.d.ts.map +1 -0
  178. package/dist/db/creation.js +448 -0
  179. package/dist/db/creation.js.map +1 -0
  180. package/dist/db/deployedSchema.d.ts +12 -0
  181. package/dist/db/deployedSchema.d.ts.map +1 -0
  182. package/dist/db/deployedSchema.js +80 -0
  183. package/dist/db/deployedSchema.js.map +1 -0
  184. package/dist/db/documentation.d.ts +4 -0
  185. package/dist/db/documentation.d.ts.map +1 -0
  186. package/dist/db/documentation.js +4 -0
  187. package/dist/db/documentation.js.map +1 -0
  188. package/dist/db/ensure.d.ts +16 -0
  189. package/dist/db/ensure.d.ts.map +1 -0
  190. package/dist/db/ensure.js +48 -0
  191. package/dist/db/ensure.js.map +1 -0
  192. package/dist/db/entityArg.d.ts +15 -0
  193. package/dist/db/entityArg.d.ts.map +1 -0
  194. package/dist/db/entityArg.js +71 -0
  195. package/dist/db/entityArg.js.map +1 -0
  196. package/dist/db/equal.d.ts +4 -0
  197. package/dist/db/equal.d.ts.map +1 -0
  198. package/dist/db/equal.js +2 -0
  199. package/dist/db/equal.js.map +1 -0
  200. package/dist/db/idents.d.ts +90 -0
  201. package/dist/db/idents.d.ts.map +1 -0
  202. package/dist/db/idents.js +2 -0
  203. package/dist/db/idents.js.map +1 -0
  204. package/dist/db/index.d.ts +27 -0
  205. package/dist/db/index.d.ts.map +1 -0
  206. package/dist/db/index.js +20 -0
  207. package/dist/db/index.js.map +1 -0
  208. package/dist/db/internal.d.ts +27 -0
  209. package/dist/db/internal.d.ts.map +1 -0
  210. package/dist/db/internal.js +27 -0
  211. package/dist/db/internal.js.map +1 -0
  212. package/dist/db/query/cursor.d.ts +13 -0
  213. package/dist/db/query/cursor.d.ts.map +1 -0
  214. package/dist/db/query/cursor.js +150 -0
  215. package/dist/db/query/cursor.js.map +1 -0
  216. package/dist/db/query/elemFilter.d.ts +7 -0
  217. package/dist/db/query/elemFilter.d.ts.map +1 -0
  218. package/dist/db/query/elemFilter.js +280 -0
  219. package/dist/db/query/elemFilter.js.map +1 -0
  220. package/dist/db/query/fluent.d.ts +92 -0
  221. package/dist/db/query/fluent.d.ts.map +1 -0
  222. package/dist/db/query/fluent.js +125 -0
  223. package/dist/db/query/fluent.js.map +1 -0
  224. package/dist/db/query/focus.d.ts +42 -0
  225. package/dist/db/query/focus.d.ts.map +1 -0
  226. package/dist/db/query/focus.js +2 -0
  227. package/dist/db/query/focus.js.map +1 -0
  228. package/dist/db/query/index.d.ts +7 -0
  229. package/dist/db/query/index.d.ts.map +1 -0
  230. package/dist/db/query/index.js +6 -0
  231. package/dist/db/query/index.js.map +1 -0
  232. package/dist/db/query/kernel.d.ts +215 -0
  233. package/dist/db/query/kernel.d.ts.map +1 -0
  234. package/dist/db/query/kernel.js +284 -0
  235. package/dist/db/query/kernel.js.map +1 -0
  236. package/dist/db/query/lib.d.ts +168 -0
  237. package/dist/db/query/lib.d.ts.map +1 -0
  238. package/dist/db/query/lib.js +175 -0
  239. package/dist/db/query/lib.js.map +1 -0
  240. package/dist/db/query/query.d.ts +209 -0
  241. package/dist/db/query/query.d.ts.map +1 -0
  242. package/dist/db/query/query.js +1536 -0
  243. package/dist/db/query/query.js.map +1 -0
  244. package/dist/db/query/stdlib/failures.d.ts +91 -0
  245. package/dist/db/query/stdlib/failures.d.ts.map +1 -0
  246. package/dist/db/query/stdlib/failures.js +57 -0
  247. package/dist/db/query/stdlib/failures.js.map +1 -0
  248. package/dist/db/query/stdlib/implementations.d.ts +5 -0
  249. package/dist/db/query/stdlib/implementations.d.ts.map +1 -0
  250. package/dist/db/query/stdlib/implementations.js +208 -0
  251. package/dist/db/query/stdlib/implementations.js.map +1 -0
  252. package/dist/db/query/stdlib/index.d.ts +6 -0
  253. package/dist/db/query/stdlib/index.d.ts.map +1 -0
  254. package/dist/db/query/stdlib/index.js +6 -0
  255. package/dist/db/query/stdlib/index.js.map +1 -0
  256. package/dist/db/query/stdlib/manifest.d.ts +3 -0
  257. package/dist/db/query/stdlib/manifest.d.ts.map +1 -0
  258. package/dist/db/query/stdlib/manifest.js +1067 -0
  259. package/dist/db/query/stdlib/manifest.js.map +1 -0
  260. package/dist/db/query/stdlib/registry.d.ts +22 -0
  261. package/dist/db/query/stdlib/registry.d.ts.map +1 -0
  262. package/dist/db/query/stdlib/registry.js +144 -0
  263. package/dist/db/query/stdlib/registry.js.map +1 -0
  264. package/dist/db/query/stdlib/types.d.ts +50 -0
  265. package/dist/db/query/stdlib/types.d.ts.map +1 -0
  266. package/dist/db/query/stdlib/types.js +17 -0
  267. package/dist/db/query/stdlib/types.js.map +1 -0
  268. package/dist/db/query/stdlib/values.d.ts +17 -0
  269. package/dist/db/query/stdlib/values.d.ts.map +1 -0
  270. package/dist/db/query/stdlib/values.js +200 -0
  271. package/dist/db/query/stdlib/values.js.map +1 -0
  272. package/dist/db/query/surface.d.ts +15 -0
  273. package/dist/db/query/surface.d.ts.map +1 -0
  274. package/dist/db/query/surface.js +14 -0
  275. package/dist/db/query/surface.js.map +1 -0
  276. package/dist/db/reachability.d.ts +40 -0
  277. package/dist/db/reachability.d.ts.map +1 -0
  278. package/dist/db/reachability.js +118 -0
  279. package/dist/db/reachability.js.map +1 -0
  280. package/dist/db/refs.d.ts +46 -0
  281. package/dist/db/refs.d.ts.map +1 -0
  282. package/dist/db/refs.js +69 -0
  283. package/dist/db/refs.js.map +1 -0
  284. package/dist/db/shapes.d.ts +227 -0
  285. package/dist/db/shapes.d.ts.map +1 -0
  286. package/dist/db/shapes.js +246 -0
  287. package/dist/db/shapes.js.map +1 -0
  288. package/dist/db/valueTypes.d.ts +92 -0
  289. package/dist/db/valueTypes.d.ts.map +1 -0
  290. package/dist/db/valueTypes.js +105 -0
  291. package/dist/db/valueTypes.js.map +1 -0
  292. package/dist/errorHttp.d.ts +27 -0
  293. package/dist/errorHttp.d.ts.map +1 -0
  294. package/dist/errorHttp.js +95 -0
  295. package/dist/errorHttp.js.map +1 -0
  296. package/dist/index.d.ts +7 -0
  297. package/dist/index.d.ts.map +1 -0
  298. package/dist/index.js +7 -0
  299. package/dist/index.js.map +1 -0
  300. package/dist/internal/authorization/authoring/compile.d.ts +132 -0
  301. package/dist/internal/authorization/authoring/compile.d.ts.map +1 -0
  302. package/dist/internal/authorization/authoring/compile.js +634 -0
  303. package/dist/internal/authorization/authoring/compile.js.map +1 -0
  304. package/dist/internal/authorization/authoring/expr.d.ts +25 -0
  305. package/dist/internal/authorization/authoring/expr.d.ts.map +1 -0
  306. package/dist/internal/authorization/authoring/expr.js +56 -0
  307. package/dist/internal/authorization/authoring/expr.js.map +1 -0
  308. package/dist/internal/authorization/authoring/index.d.ts +10 -0
  309. package/dist/internal/authorization/authoring/index.d.ts.map +1 -0
  310. package/dist/internal/authorization/authoring/index.js +8 -0
  311. package/dist/internal/authorization/authoring/index.js.map +1 -0
  312. package/dist/internal/authorization/authoring/invoke.d.ts +8 -0
  313. package/dist/internal/authorization/authoring/invoke.d.ts.map +1 -0
  314. package/dist/internal/authorization/authoring/invoke.js +7 -0
  315. package/dist/internal/authorization/authoring/invoke.js.map +1 -0
  316. package/dist/internal/authorization/authoring/operations.d.ts +81 -0
  317. package/dist/internal/authorization/authoring/operations.d.ts.map +1 -0
  318. package/dist/internal/authorization/authoring/operations.js +591 -0
  319. package/dist/internal/authorization/authoring/operations.js.map +1 -0
  320. package/dist/internal/authorization/authoring/path.d.ts +20 -0
  321. package/dist/internal/authorization/authoring/path.d.ts.map +1 -0
  322. package/dist/internal/authorization/authoring/path.js +109 -0
  323. package/dist/internal/authorization/authoring/path.js.map +1 -0
  324. package/dist/internal/authorization/authoring/policy.d.ts +120 -0
  325. package/dist/internal/authorization/authoring/policy.d.ts.map +1 -0
  326. package/dist/internal/authorization/authoring/policy.js +218 -0
  327. package/dist/internal/authorization/authoring/policy.js.map +1 -0
  328. package/dist/internal/authorization/authoring/read.d.ts +13 -0
  329. package/dist/internal/authorization/authoring/read.d.ts.map +1 -0
  330. package/dist/internal/authorization/authoring/read.js +27 -0
  331. package/dist/internal/authorization/authoring/read.js.map +1 -0
  332. package/dist/internal/authorization/authoring/types.d.ts +127 -0
  333. package/dist/internal/authorization/authoring/types.d.ts.map +1 -0
  334. package/dist/internal/authorization/authoring/types.js +43 -0
  335. package/dist/internal/authorization/authoring/types.js.map +1 -0
  336. package/dist/internal/authorization/bind.d.ts +687 -0
  337. package/dist/internal/authorization/bind.d.ts.map +1 -0
  338. package/dist/internal/authorization/bind.js +485 -0
  339. package/dist/internal/authorization/bind.js.map +1 -0
  340. package/dist/internal/authorization/bounds.d.ts +13 -0
  341. package/dist/internal/authorization/bounds.d.ts.map +1 -0
  342. package/dist/internal/authorization/bounds.js +9 -0
  343. package/dist/internal/authorization/bounds.js.map +1 -0
  344. package/dist/internal/authorization/canonical-json.d.ts +6 -0
  345. package/dist/internal/authorization/canonical-json.d.ts.map +1 -0
  346. package/dist/internal/authorization/canonical-json.js +65 -0
  347. package/dist/internal/authorization/canonical-json.js.map +1 -0
  348. package/dist/internal/authorization/catalog-unit.d.ts +1033 -0
  349. package/dist/internal/authorization/catalog-unit.d.ts.map +1 -0
  350. package/dist/internal/authorization/catalog-unit.js +303 -0
  351. package/dist/internal/authorization/catalog-unit.js.map +1 -0
  352. package/dist/internal/authorization/catalog.d.ts +472 -0
  353. package/dist/internal/authorization/catalog.d.ts.map +1 -0
  354. package/dist/internal/authorization/catalog.js +134 -0
  355. package/dist/internal/authorization/catalog.js.map +1 -0
  356. package/dist/internal/authorization/changesets.d.ts +54 -0
  357. package/dist/internal/authorization/changesets.d.ts.map +1 -0
  358. package/dist/internal/authorization/changesets.js +156 -0
  359. package/dist/internal/authorization/changesets.js.map +1 -0
  360. package/dist/internal/authorization/composition.d.ts +10 -0
  361. package/dist/internal/authorization/composition.d.ts.map +1 -0
  362. package/dist/internal/authorization/composition.js +28 -0
  363. package/dist/internal/authorization/composition.js.map +1 -0
  364. package/dist/internal/authorization/database-bindings.d.ts +48 -0
  365. package/dist/internal/authorization/database-bindings.d.ts.map +1 -0
  366. package/dist/internal/authorization/database-bindings.js +101 -0
  367. package/dist/internal/authorization/database-bindings.js.map +1 -0
  368. package/dist/internal/authorization/database-target.d.ts +75 -0
  369. package/dist/internal/authorization/database-target.d.ts.map +1 -0
  370. package/dist/internal/authorization/database-target.js +65 -0
  371. package/dist/internal/authorization/database-target.js.map +1 -0
  372. package/dist/internal/authorization/decode.d.ts +1704 -0
  373. package/dist/internal/authorization/decode.d.ts.map +1 -0
  374. package/dist/internal/authorization/decode.js +294 -0
  375. package/dist/internal/authorization/decode.js.map +1 -0
  376. package/dist/internal/authorization/definitions.d.ts +66 -0
  377. package/dist/internal/authorization/definitions.d.ts.map +1 -0
  378. package/dist/internal/authorization/definitions.js +335 -0
  379. package/dist/internal/authorization/definitions.js.map +1 -0
  380. package/dist/internal/authorization/deployed.d.ts +43 -0
  381. package/dist/internal/authorization/deployed.d.ts.map +1 -0
  382. package/dist/internal/authorization/deployed.js +184 -0
  383. package/dist/internal/authorization/deployed.js.map +1 -0
  384. package/dist/internal/authorization/entity-targets.d.ts +68 -0
  385. package/dist/internal/authorization/entity-targets.d.ts.map +1 -0
  386. package/dist/internal/authorization/entity-targets.js +244 -0
  387. package/dist/internal/authorization/entity-targets.js.map +1 -0
  388. package/dist/internal/authorization/expr.d.ts +259 -0
  389. package/dist/internal/authorization/expr.d.ts.map +1 -0
  390. package/dist/internal/authorization/expr.js +55 -0
  391. package/dist/internal/authorization/expr.js.map +1 -0
  392. package/dist/internal/authorization/failures.d.ts +78 -0
  393. package/dist/internal/authorization/failures.d.ts.map +1 -0
  394. package/dist/internal/authorization/failures.js +22 -0
  395. package/dist/internal/authorization/failures.js.map +1 -0
  396. package/dist/internal/authorization/identities.d.ts +207 -0
  397. package/dist/internal/authorization/identities.d.ts.map +1 -0
  398. package/dist/internal/authorization/identities.js +71 -0
  399. package/dist/internal/authorization/identities.js.map +1 -0
  400. package/dist/internal/authorization/index.d.ts +33 -0
  401. package/dist/internal/authorization/index.d.ts.map +1 -0
  402. package/dist/internal/authorization/index.js +33 -0
  403. package/dist/internal/authorization/index.js.map +1 -0
  404. package/dist/internal/authorization/install/normalize.d.ts +196 -0
  405. package/dist/internal/authorization/install/normalize.d.ts.map +1 -0
  406. package/dist/internal/authorization/install/normalize.js +168 -0
  407. package/dist/internal/authorization/install/normalize.js.map +1 -0
  408. package/dist/internal/authorization/install/plan.d.ts +8 -0
  409. package/dist/internal/authorization/install/plan.d.ts.map +1 -0
  410. package/dist/internal/authorization/install/plan.js +177 -0
  411. package/dist/internal/authorization/install/plan.js.map +1 -0
  412. package/dist/internal/authorization/install.d.ts +404 -0
  413. package/dist/internal/authorization/install.d.ts.map +1 -0
  414. package/dist/internal/authorization/install.js +103 -0
  415. package/dist/internal/authorization/install.js.map +1 -0
  416. package/dist/internal/authorization/invocation-codec.d.ts +10 -0
  417. package/dist/internal/authorization/invocation-codec.d.ts.map +1 -0
  418. package/dist/internal/authorization/invocation-codec.js +36 -0
  419. package/dist/internal/authorization/invocation-codec.js.map +1 -0
  420. package/dist/internal/authorization/invocation-receipts.d.ts +192 -0
  421. package/dist/internal/authorization/invocation-receipts.d.ts.map +1 -0
  422. package/dist/internal/authorization/invocation-receipts.js +546 -0
  423. package/dist/internal/authorization/invocation-receipts.js.map +1 -0
  424. package/dist/internal/authorization/ir.d.ts +1465 -0
  425. package/dist/internal/authorization/ir.d.ts.map +1 -0
  426. package/dist/internal/authorization/ir.js +131 -0
  427. package/dist/internal/authorization/ir.js.map +1 -0
  428. package/dist/internal/authorization/json.d.ts +8 -0
  429. package/dist/internal/authorization/json.d.ts.map +1 -0
  430. package/dist/internal/authorization/json.js +13 -0
  431. package/dist/internal/authorization/json.js.map +1 -0
  432. package/dist/internal/authorization/live.d.ts +38 -0
  433. package/dist/internal/authorization/live.d.ts.map +1 -0
  434. package/dist/internal/authorization/live.js +227 -0
  435. package/dist/internal/authorization/live.js.map +1 -0
  436. package/dist/internal/authorization/operation-grant.d.ts +16 -0
  437. package/dist/internal/authorization/operation-grant.d.ts.map +1 -0
  438. package/dist/internal/authorization/operation-grant.js +79 -0
  439. package/dist/internal/authorization/operation-grant.js.map +1 -0
  440. package/dist/internal/authorization/operation-version.d.ts +28 -0
  441. package/dist/internal/authorization/operation-version.d.ts.map +1 -0
  442. package/dist/internal/authorization/operation-version.js +206 -0
  443. package/dist/internal/authorization/operation-version.js.map +1 -0
  444. package/dist/internal/authorization/operations-runtime.d.ts +78 -0
  445. package/dist/internal/authorization/operations-runtime.d.ts.map +1 -0
  446. package/dist/internal/authorization/operations-runtime.js +1130 -0
  447. package/dist/internal/authorization/operations-runtime.js.map +1 -0
  448. package/dist/internal/authorization/principal.d.ts +95 -0
  449. package/dist/internal/authorization/principal.d.ts.map +1 -0
  450. package/dist/internal/authorization/principal.js +53 -0
  451. package/dist/internal/authorization/principal.js.map +1 -0
  452. package/dist/internal/authorization/query-view.d.ts +7 -0
  453. package/dist/internal/authorization/query-view.d.ts.map +1 -0
  454. package/dist/internal/authorization/query-view.js +17 -0
  455. package/dist/internal/authorization/query-view.js.map +1 -0
  456. package/dist/internal/authorization/read-compatibility.d.ts +185 -0
  457. package/dist/internal/authorization/read-compatibility.d.ts.map +1 -0
  458. package/dist/internal/authorization/read-compatibility.js +176 -0
  459. package/dist/internal/authorization/read-compatibility.js.map +1 -0
  460. package/dist/internal/authorization/read-filter.d.ts +48 -0
  461. package/dist/internal/authorization/read-filter.d.ts.map +1 -0
  462. package/dist/internal/authorization/read-filter.js +496 -0
  463. package/dist/internal/authorization/read-filter.js.map +1 -0
  464. package/dist/internal/authorization/read-tables.d.ts +9 -0
  465. package/dist/internal/authorization/read-tables.d.ts.map +1 -0
  466. package/dist/internal/authorization/read-tables.js +120 -0
  467. package/dist/internal/authorization/read-tables.js.map +1 -0
  468. package/dist/internal/authorization/reads.d.ts +36 -0
  469. package/dist/internal/authorization/reads.d.ts.map +1 -0
  470. package/dist/internal/authorization/reads.js +35 -0
  471. package/dist/internal/authorization/reads.js.map +1 -0
  472. package/dist/internal/authorization/request.d.ts +64 -0
  473. package/dist/internal/authorization/request.d.ts.map +1 -0
  474. package/dist/internal/authorization/request.js +210 -0
  475. package/dist/internal/authorization/request.js.map +1 -0
  476. package/dist/internal/authorization/truth.d.ts +51 -0
  477. package/dist/internal/authorization/truth.d.ts.map +1 -0
  478. package/dist/internal/authorization/truth.js +23 -0
  479. package/dist/internal/authorization/truth.js.map +1 -0
  480. package/dist/internal/authorization/validate.d.ts +3 -0
  481. package/dist/internal/authorization/validate.d.ts.map +1 -0
  482. package/dist/internal/authorization/validate.js +3 -0
  483. package/dist/internal/authorization/validate.js.map +1 -0
  484. package/dist/internal/authorization/validation/catalog.d.ts +32 -0
  485. package/dist/internal/authorization/validation/catalog.d.ts.map +1 -0
  486. package/dist/internal/authorization/validation/catalog.js +417 -0
  487. package/dist/internal/authorization/validation/catalog.js.map +1 -0
  488. package/dist/internal/authorization/validation/common.d.ts +20 -0
  489. package/dist/internal/authorization/validation/common.d.ts.map +1 -0
  490. package/dist/internal/authorization/validation/common.js +36 -0
  491. package/dist/internal/authorization/validation/common.js.map +1 -0
  492. package/dist/internal/authorization/validation/decisions.d.ts +7 -0
  493. package/dist/internal/authorization/validation/decisions.d.ts.map +1 -0
  494. package/dist/internal/authorization/validation/decisions.js +107 -0
  495. package/dist/internal/authorization/validation/decisions.js.map +1 -0
  496. package/dist/internal/authorization/validation/descriptors.d.ts +8 -0
  497. package/dist/internal/authorization/validation/descriptors.d.ts.map +1 -0
  498. package/dist/internal/authorization/validation/descriptors.js +24 -0
  499. package/dist/internal/authorization/validation/descriptors.js.map +1 -0
  500. package/dist/internal/authorization/validation/expression.d.ts +11 -0
  501. package/dist/internal/authorization/validation/expression.d.ts.map +1 -0
  502. package/dist/internal/authorization/validation/expression.js +114 -0
  503. package/dist/internal/authorization/validation/expression.js.map +1 -0
  504. package/dist/internal/authorization/validation/traversal.d.ts +19 -0
  505. package/dist/internal/authorization/validation/traversal.d.ts.map +1 -0
  506. package/dist/internal/authorization/validation/traversal.js +141 -0
  507. package/dist/internal/authorization/validation/traversal.js.map +1 -0
  508. package/dist/internal/authorization/validation/types.d.ts +55 -0
  509. package/dist/internal/authorization/validation/types.d.ts.map +1 -0
  510. package/dist/internal/authorization/validation/types.js +184 -0
  511. package/dist/internal/authorization/validation/types.js.map +1 -0
  512. package/dist/internal/authorization/validation/validate.d.ts +421 -0
  513. package/dist/internal/authorization/validation/validate.d.ts.map +1 -0
  514. package/dist/internal/authorization/validation/validate.js +95 -0
  515. package/dist/internal/authorization/validation/validate.js.map +1 -0
  516. package/dist/internal/authorization/version.d.ts +11 -0
  517. package/dist/internal/authorization/version.d.ts.map +1 -0
  518. package/dist/internal/authorization/version.js +10 -0
  519. package/dist/internal/authorization/version.js.map +1 -0
  520. package/dist/internal/changesets/protocol.d.ts +185 -0
  521. package/dist/internal/changesets/protocol.d.ts.map +1 -0
  522. package/dist/internal/changesets/protocol.js +39 -0
  523. package/dist/internal/changesets/protocol.js.map +1 -0
  524. package/dist/internal/changesets/service.d.ts +69 -0
  525. package/dist/internal/changesets/service.d.ts.map +1 -0
  526. package/dist/internal/changesets/service.js +298 -0
  527. package/dist/internal/changesets/service.js.map +1 -0
  528. package/dist/internal/core/bytes.d.ts +41 -0
  529. package/dist/internal/core/bytes.d.ts.map +1 -0
  530. package/dist/internal/core/bytes.js +215 -0
  531. package/dist/internal/core/bytes.js.map +1 -0
  532. package/dist/internal/core/composition.d.ts +20 -0
  533. package/dist/internal/core/composition.d.ts.map +1 -0
  534. package/dist/internal/core/composition.js +52 -0
  535. package/dist/internal/core/composition.js.map +1 -0
  536. package/dist/internal/core/conn.d.ts +64 -0
  537. package/dist/internal/core/conn.d.ts.map +1 -0
  538. package/dist/internal/core/conn.js +240 -0
  539. package/dist/internal/core/conn.js.map +1 -0
  540. package/dist/internal/core/datom.d.ts +73 -0
  541. package/dist/internal/core/datom.d.ts.map +1 -0
  542. package/dist/internal/core/datom.js +477 -0
  543. package/dist/internal/core/datom.js.map +1 -0
  544. package/dist/internal/core/db.d.ts +65 -0
  545. package/dist/internal/core/db.d.ts.map +1 -0
  546. package/dist/internal/core/db.js +261 -0
  547. package/dist/internal/core/db.js.map +1 -0
  548. package/dist/internal/core/index.d.ts +21 -0
  549. package/dist/internal/core/index.d.ts.map +1 -0
  550. package/dist/internal/core/index.js +21 -0
  551. package/dist/internal/core/index.js.map +1 -0
  552. package/dist/internal/core/json.d.ts +5 -0
  553. package/dist/internal/core/json.d.ts.map +1 -0
  554. package/dist/internal/core/json.js +56 -0
  555. package/dist/internal/core/json.js.map +1 -0
  556. package/dist/internal/core/log.d.ts +68 -0
  557. package/dist/internal/core/log.d.ts.map +1 -0
  558. package/dist/internal/core/log.js +76 -0
  559. package/dist/internal/core/log.js.map +1 -0
  560. package/dist/internal/core/novelty.d.ts +38 -0
  561. package/dist/internal/core/novelty.d.ts.map +1 -0
  562. package/dist/internal/core/novelty.js +300 -0
  563. package/dist/internal/core/novelty.js.map +1 -0
  564. package/dist/internal/core/query/ast.d.ts +174 -0
  565. package/dist/internal/core/query/ast.d.ts.map +1 -0
  566. package/dist/internal/core/query/ast.js +37 -0
  567. package/dist/internal/core/query/ast.js.map +1 -0
  568. package/dist/internal/core/query/builtins.d.ts +19 -0
  569. package/dist/internal/core/query/builtins.d.ts.map +1 -0
  570. package/dist/internal/core/query/builtins.js +242 -0
  571. package/dist/internal/core/query/builtins.js.map +1 -0
  572. package/dist/internal/core/query/edn.d.ts +19 -0
  573. package/dist/internal/core/query/edn.d.ts.map +1 -0
  574. package/dist/internal/core/query/edn.js +248 -0
  575. package/dist/internal/core/query/edn.js.map +1 -0
  576. package/dist/internal/core/query/engine.d.ts +56 -0
  577. package/dist/internal/core/query/engine.d.ts.map +1 -0
  578. package/dist/internal/core/query/engine.js +0 -0
  579. package/dist/internal/core/query/engine.js.map +1 -0
  580. package/dist/internal/core/query/parse.d.ts +8 -0
  581. package/dist/internal/core/query/parse.d.ts.map +1 -0
  582. package/dist/internal/core/query/parse.js +606 -0
  583. package/dist/internal/core/query/parse.js.map +1 -0
  584. package/dist/internal/core/query/pull.d.ts +7 -0
  585. package/dist/internal/core/query/pull.d.ts.map +1 -0
  586. package/dist/internal/core/query/pull.js +304 -0
  587. package/dist/internal/core/query/pull.js.map +1 -0
  588. package/dist/internal/core/query/value.d.ts +10 -0
  589. package/dist/internal/core/query/value.d.ts.map +1 -0
  590. package/dist/internal/core/query/value.js +21 -0
  591. package/dist/internal/core/query/value.js.map +1 -0
  592. package/dist/internal/core/revision.d.ts +19 -0
  593. package/dist/internal/core/revision.d.ts.map +1 -0
  594. package/dist/internal/core/revision.js +13 -0
  595. package/dist/internal/core/revision.js.map +1 -0
  596. package/dist/internal/core/schema.d.ts +63 -0
  597. package/dist/internal/core/schema.d.ts.map +1 -0
  598. package/dist/internal/core/schema.js +228 -0
  599. package/dist/internal/core/schema.js.map +1 -0
  600. package/dist/internal/core/segment.d.ts +16 -0
  601. package/dist/internal/core/segment.d.ts.map +1 -0
  602. package/dist/internal/core/segment.js +149 -0
  603. package/dist/internal/core/segment.js.map +1 -0
  604. package/dist/internal/core/store.d.ts +35 -0
  605. package/dist/internal/core/store.d.ts.map +1 -0
  606. package/dist/internal/core/store.js +88 -0
  607. package/dist/internal/core/store.js.map +1 -0
  608. package/dist/internal/core/telemetry.d.ts +53 -0
  609. package/dist/internal/core/telemetry.d.ts.map +1 -0
  610. package/dist/internal/core/telemetry.js +103 -0
  611. package/dist/internal/core/telemetry.js.map +1 -0
  612. package/dist/internal/core/tree.d.ts +60 -0
  613. package/dist/internal/core/tree.d.ts.map +1 -0
  614. package/dist/internal/core/tree.js +625 -0
  615. package/dist/internal/core/tree.js.map +1 -0
  616. package/dist/internal/core/tx-provenance.d.ts +7 -0
  617. package/dist/internal/core/tx-provenance.d.ts.map +1 -0
  618. package/dist/internal/core/tx-provenance.js +16 -0
  619. package/dist/internal/core/tx-provenance.js.map +1 -0
  620. package/dist/internal/core/tx.d.ts +51 -0
  621. package/dist/internal/core/tx.d.ts.map +1 -0
  622. package/dist/internal/core/tx.js +1029 -0
  623. package/dist/internal/core/tx.js.map +1 -0
  624. package/dist/internal/replica/basis.d.ts +15 -0
  625. package/dist/internal/replica/basis.d.ts.map +1 -0
  626. package/dist/internal/replica/basis.js +32 -0
  627. package/dist/internal/replica/basis.js.map +1 -0
  628. package/dist/internal/replica/errors.d.ts +32 -0
  629. package/dist/internal/replica/errors.d.ts.map +1 -0
  630. package/dist/internal/replica/errors.js +30 -0
  631. package/dist/internal/replica/errors.js.map +1 -0
  632. package/dist/internal/replica/index.d.ts +4 -0
  633. package/dist/internal/replica/index.d.ts.map +1 -0
  634. package/dist/internal/replica/index.js +4 -0
  635. package/dist/internal/replica/index.js.map +1 -0
  636. package/dist/internal/replica/replica-do-testing.d.ts +11 -0
  637. package/dist/internal/replica/replica-do-testing.d.ts.map +1 -0
  638. package/dist/internal/replica/replica-do-testing.js +340 -0
  639. package/dist/internal/replica/replica-do-testing.js.map +1 -0
  640. package/dist/internal/replica/replica-do.d.ts +87 -0
  641. package/dist/internal/replica/replica-do.d.ts.map +1 -0
  642. package/dist/internal/replica/replica-do.js +735 -0
  643. package/dist/internal/replica/replica-do.js.map +1 -0
  644. package/dist/internal/replica/revision-retention.d.ts +29 -0
  645. package/dist/internal/replica/revision-retention.d.ts.map +1 -0
  646. package/dist/internal/replica/revision-retention.js +39 -0
  647. package/dist/internal/replica/revision-retention.js.map +1 -0
  648. package/dist/internal/replication/activation-fence.d.ts +40 -0
  649. package/dist/internal/replication/activation-fence.d.ts.map +1 -0
  650. package/dist/internal/replication/activation-fence.js +85 -0
  651. package/dist/internal/replication/activation-fence.js.map +1 -0
  652. package/dist/internal/replication/digest.d.ts +2 -0
  653. package/dist/internal/replication/digest.d.ts.map +1 -0
  654. package/dist/internal/replication/digest.js +12 -0
  655. package/dist/internal/replication/digest.js.map +1 -0
  656. package/dist/internal/replication/entity-id.d.ts +23 -0
  657. package/dist/internal/replication/entity-id.d.ts.map +1 -0
  658. package/dist/internal/replication/entity-id.js +161 -0
  659. package/dist/internal/replication/entity-id.js.map +1 -0
  660. package/dist/internal/replication/idb.d.ts +9 -0
  661. package/dist/internal/replication/idb.d.ts.map +1 -0
  662. package/dist/internal/replication/idb.js +46 -0
  663. package/dist/internal/replication/idb.js.map +1 -0
  664. package/dist/internal/replication/identity-root.d.ts +11 -0
  665. package/dist/internal/replication/identity-root.d.ts.map +1 -0
  666. package/dist/internal/replication/identity-root.js +48 -0
  667. package/dist/internal/replication/identity-root.js.map +1 -0
  668. package/dist/internal/replication/identity.d.ts +40 -0
  669. package/dist/internal/replication/identity.d.ts.map +1 -0
  670. package/dist/internal/replication/identity.js +95 -0
  671. package/dist/internal/replication/identity.js.map +1 -0
  672. package/dist/internal/replication/index.d.ts +13 -0
  673. package/dist/internal/replication/index.d.ts.map +1 -0
  674. package/dist/internal/replication/index.js +13 -0
  675. package/dist/internal/replication/index.js.map +1 -0
  676. package/dist/internal/replication/indexeddb.d.ts +171 -0
  677. package/dist/internal/replication/indexeddb.d.ts.map +1 -0
  678. package/dist/internal/replication/indexeddb.js +1809 -0
  679. package/dist/internal/replication/indexeddb.js.map +1 -0
  680. package/dist/internal/replication/leadership.d.ts +36 -0
  681. package/dist/internal/replication/leadership.d.ts.map +1 -0
  682. package/dist/internal/replication/leadership.js +108 -0
  683. package/dist/internal/replication/leadership.js.map +1 -0
  684. package/dist/internal/replication/logical.d.ts +40 -0
  685. package/dist/internal/replication/logical.d.ts.map +1 -0
  686. package/dist/internal/replication/logical.js +375 -0
  687. package/dist/internal/replication/logical.js.map +1 -0
  688. package/dist/internal/replication/notices.d.ts +32 -0
  689. package/dist/internal/replication/notices.d.ts.map +1 -0
  690. package/dist/internal/replication/notices.js +92 -0
  691. package/dist/internal/replication/notices.js.map +1 -0
  692. package/dist/internal/replication/outbox-storage.d.ts +98 -0
  693. package/dist/internal/replication/outbox-storage.d.ts.map +1 -0
  694. package/dist/internal/replication/outbox-storage.js +826 -0
  695. package/dist/internal/replication/outbox-storage.js.map +1 -0
  696. package/dist/internal/replication/outbox.d.ts +200 -0
  697. package/dist/internal/replication/outbox.d.ts.map +1 -0
  698. package/dist/internal/replication/outbox.js +744 -0
  699. package/dist/internal/replication/outbox.js.map +1 -0
  700. package/dist/internal/replication/overlay-layers.d.ts +14 -0
  701. package/dist/internal/replication/overlay-layers.d.ts.map +1 -0
  702. package/dist/internal/replication/overlay-layers.js +2 -0
  703. package/dist/internal/replication/overlay-layers.js.map +1 -0
  704. package/dist/internal/replication/overlay-records.d.ts +61 -0
  705. package/dist/internal/replication/overlay-records.d.ts.map +1 -0
  706. package/dist/internal/replication/overlay-records.js +328 -0
  707. package/dist/internal/replication/overlay-records.js.map +1 -0
  708. package/dist/internal/replication/overlay.d.ts +20 -0
  709. package/dist/internal/replication/overlay.d.ts.map +1 -0
  710. package/dist/internal/replication/overlay.js +159 -0
  711. package/dist/internal/replication/overlay.js.map +1 -0
  712. package/dist/internal/replication/projection-binding.d.ts +39 -0
  713. package/dist/internal/replication/projection-binding.d.ts.map +1 -0
  714. package/dist/internal/replication/projection-binding.js +76 -0
  715. package/dist/internal/replication/projection-binding.js.map +1 -0
  716. package/dist/internal/replication/protocol.d.ts +633 -0
  717. package/dist/internal/replication/protocol.d.ts.map +1 -0
  718. package/dist/internal/replication/protocol.js +263 -0
  719. package/dist/internal/replication/protocol.js.map +1 -0
  720. package/dist/internal/replication/reconciliation.d.ts +64 -0
  721. package/dist/internal/replication/reconciliation.d.ts.map +1 -0
  722. package/dist/internal/replication/reconciliation.js +184 -0
  723. package/dist/internal/replication/reconciliation.js.map +1 -0
  724. package/dist/internal/replication/replica-gc.d.ts +42 -0
  725. package/dist/internal/replication/replica-gc.d.ts.map +1 -0
  726. package/dist/internal/replication/replica-gc.js +91 -0
  727. package/dist/internal/replication/replica-gc.js.map +1 -0
  728. package/dist/internal/replication/replica-integrity.d.ts +107 -0
  729. package/dist/internal/replication/replica-integrity.d.ts.map +1 -0
  730. package/dist/internal/replication/replica-integrity.js +418 -0
  731. package/dist/internal/replication/replica-integrity.js.map +1 -0
  732. package/dist/internal/replication/replica-lifecycle.d.ts +72 -0
  733. package/dist/internal/replication/replica-lifecycle.d.ts.map +1 -0
  734. package/dist/internal/replication/replica-lifecycle.js +126 -0
  735. package/dist/internal/replication/replica-lifecycle.js.map +1 -0
  736. package/dist/internal/replication/replica-schema.d.ts +27 -0
  737. package/dist/internal/replication/replica-schema.d.ts.map +1 -0
  738. package/dist/internal/replication/replica-schema.js +130 -0
  739. package/dist/internal/replication/replica-schema.js.map +1 -0
  740. package/dist/internal/replication/route-slot.d.ts +9 -0
  741. package/dist/internal/replication/route-slot.d.ts.map +1 -0
  742. package/dist/internal/replication/route-slot.js +8 -0
  743. package/dist/internal/replication/route-slot.js.map +1 -0
  744. package/dist/internal/replication/server-identity.d.ts +54 -0
  745. package/dist/internal/replication/server-identity.d.ts.map +1 -0
  746. package/dist/internal/replication/server-identity.js +68 -0
  747. package/dist/internal/replication/server-identity.js.map +1 -0
  748. package/dist/internal/replication/session.d.ts +91 -0
  749. package/dist/internal/replication/session.d.ts.map +1 -0
  750. package/dist/internal/replication/session.js +673 -0
  751. package/dist/internal/replication/session.js.map +1 -0
  752. package/dist/internal/replication/state.d.ts +34 -0
  753. package/dist/internal/replication/state.d.ts.map +1 -0
  754. package/dist/internal/replication/state.js +344 -0
  755. package/dist/internal/replication/state.js.map +1 -0
  756. package/dist/internal/replication/submission.d.ts +115 -0
  757. package/dist/internal/replication/submission.d.ts.map +1 -0
  758. package/dist/internal/replication/submission.js +266 -0
  759. package/dist/internal/replication/submission.js.map +1 -0
  760. package/dist/internal/replication/transport.d.ts +34 -0
  761. package/dist/internal/replication/transport.d.ts.map +1 -0
  762. package/dist/internal/replication/transport.js +215 -0
  763. package/dist/internal/replication/transport.js.map +1 -0
  764. package/dist/internal/runtime-boundaries.d.ts +8 -0
  765. package/dist/internal/runtime-boundaries.d.ts.map +1 -0
  766. package/dist/internal/runtime-boundaries.js +7 -0
  767. package/dist/internal/runtime-boundaries.js.map +1 -0
  768. package/dist/internal/storage/index.d.ts +111 -0
  769. package/dist/internal/storage/index.d.ts.map +1 -0
  770. package/dist/internal/storage/index.js +288 -0
  771. package/dist/internal/storage/index.js.map +1 -0
  772. package/dist/internal/storage/memory.d.ts +31 -0
  773. package/dist/internal/storage/memory.d.ts.map +1 -0
  774. package/dist/internal/storage/memory.js +46 -0
  775. package/dist/internal/storage/memory.js.map +1 -0
  776. package/dist/internal/storage/revisions.d.ts +24 -0
  777. package/dist/internal/storage/revisions.d.ts.map +1 -0
  778. package/dist/internal/storage/revisions.js +74 -0
  779. package/dist/internal/storage/revisions.js.map +1 -0
  780. package/dist/internal/test-hooks.d.ts +47 -0
  781. package/dist/internal/test-hooks.d.ts.map +1 -0
  782. package/dist/internal/test-hooks.js +256 -0
  783. package/dist/internal/test-hooks.js.map +1 -0
  784. package/dist/internal/transactor/env.d.ts +3 -0
  785. package/dist/internal/transactor/env.d.ts.map +1 -0
  786. package/dist/internal/transactor/env.js +5 -0
  787. package/dist/internal/transactor/env.js.map +1 -0
  788. package/dist/internal/transactor/errors.d.ts +47 -0
  789. package/dist/internal/transactor/errors.d.ts.map +1 -0
  790. package/dist/internal/transactor/errors.js +66 -0
  791. package/dist/internal/transactor/errors.js.map +1 -0
  792. package/dist/internal/transactor/host.d.ts +37 -0
  793. package/dist/internal/transactor/host.d.ts.map +1 -0
  794. package/dist/internal/transactor/host.js +11 -0
  795. package/dist/internal/transactor/host.js.map +1 -0
  796. package/dist/internal/transactor/index.d.ts +8 -0
  797. package/dist/internal/transactor/index.d.ts.map +1 -0
  798. package/dist/internal/transactor/index.js +8 -0
  799. package/dist/internal/transactor/index.js.map +1 -0
  800. package/dist/internal/transactor/indexer.d.ts +53 -0
  801. package/dist/internal/transactor/indexer.d.ts.map +1 -0
  802. package/dist/internal/transactor/indexer.js +125 -0
  803. package/dist/internal/transactor/indexer.js.map +1 -0
  804. package/dist/internal/transactor/internal.d.ts +8 -0
  805. package/dist/internal/transactor/internal.d.ts.map +1 -0
  806. package/dist/internal/transactor/internal.js +28 -0
  807. package/dist/internal/transactor/internal.js.map +1 -0
  808. package/dist/internal/transactor/observability.d.ts +44 -0
  809. package/dist/internal/transactor/observability.d.ts.map +1 -0
  810. package/dist/internal/transactor/observability.js +39 -0
  811. package/dist/internal/transactor/observability.js.map +1 -0
  812. package/dist/internal/transactor/transactor-do.d.ts +35 -0
  813. package/dist/internal/transactor/transactor-do.d.ts.map +1 -0
  814. package/dist/internal/transactor/transactor-do.js +198 -0
  815. package/dist/internal/transactor/transactor-do.js.map +1 -0
  816. package/dist/internal/transactor/transactor.d.ts +209 -0
  817. package/dist/internal/transactor/transactor.d.ts.map +1 -0
  818. package/dist/internal/transactor/transactor.js +1166 -0
  819. package/dist/internal/transactor/transactor.js.map +1 -0
  820. package/dist/mcp/contract.d.ts +49 -0
  821. package/dist/mcp/contract.d.ts.map +1 -0
  822. package/dist/mcp/contract.js +199 -0
  823. package/dist/mcp/contract.js.map +1 -0
  824. package/dist/mcp/kernel.d.ts +56 -0
  825. package/dist/mcp/kernel.d.ts.map +1 -0
  826. package/dist/mcp/kernel.js +344 -0
  827. package/dist/mcp/kernel.js.map +1 -0
  828. package/dist/mcp/server.d.ts +8 -0
  829. package/dist/mcp/server.d.ts.map +1 -0
  830. package/dist/mcp/server.js +182 -0
  831. package/dist/mcp/server.js.map +1 -0
  832. package/dist/peer.d.ts +175 -0
  833. package/dist/peer.d.ts.map +1 -0
  834. package/dist/peer.js +200 -0
  835. package/dist/peer.js.map +1 -0
  836. package/dist/react/hooks.d.ts +157 -0
  837. package/dist/react/hooks.d.ts.map +1 -0
  838. package/dist/react/hooks.js +130 -0
  839. package/dist/react/hooks.js.map +1 -0
  840. package/dist/react/index.d.ts +4 -0
  841. package/dist/react/index.d.ts.map +1 -0
  842. package/dist/react/index.js +2 -0
  843. package/dist/react/index.js.map +1 -0
  844. package/dist/react/query-state.d.ts +60 -0
  845. package/dist/react/query-state.d.ts.map +1 -0
  846. package/dist/react/query-state.js +48 -0
  847. package/dist/react/query-state.js.map +1 -0
  848. package/dist/react/receipt-state.d.ts +27 -0
  849. package/dist/react/receipt-state.d.ts.map +1 -0
  850. package/dist/react/receipt-state.js +2 -0
  851. package/dist/react/receipt-state.js.map +1 -0
  852. package/dist/react/store.d.ts +30 -0
  853. package/dist/react/store.d.ts.map +1 -0
  854. package/dist/react/store.js +118 -0
  855. package/dist/react/store.js.map +1 -0
  856. package/dist/react/suspense.d.ts +6 -0
  857. package/dist/react/suspense.d.ts.map +1 -0
  858. package/dist/react/suspense.js +111 -0
  859. package/dist/react/suspense.js.map +1 -0
  860. package/dist/worker/admit.d.ts +9 -0
  861. package/dist/worker/admit.d.ts.map +1 -0
  862. package/dist/worker/admit.js +43 -0
  863. package/dist/worker/admit.js.map +1 -0
  864. package/dist/worker/analytics.d.ts +39 -0
  865. package/dist/worker/analytics.d.ts.map +1 -0
  866. package/dist/worker/analytics.js +54 -0
  867. package/dist/worker/analytics.js.map +1 -0
  868. package/dist/worker/auth.d.ts +26 -0
  869. package/dist/worker/auth.d.ts.map +1 -0
  870. package/dist/worker/auth.js +2 -0
  871. package/dist/worker/auth.js.map +1 -0
  872. package/dist/worker/authorized-live.d.ts +15 -0
  873. package/dist/worker/authorized-live.d.ts.map +1 -0
  874. package/dist/worker/authorized-live.js +30 -0
  875. package/dist/worker/authorized-live.js.map +1 -0
  876. package/dist/worker/authorized-operation.d.ts +30 -0
  877. package/dist/worker/authorized-operation.d.ts.map +1 -0
  878. package/dist/worker/authorized-operation.js +304 -0
  879. package/dist/worker/authorized-operation.js.map +1 -0
  880. package/dist/worker/authorized-read.d.ts +32 -0
  881. package/dist/worker/authorized-read.d.ts.map +1 -0
  882. package/dist/worker/authorized-read.js +194 -0
  883. package/dist/worker/authorized-read.js.map +1 -0
  884. package/dist/worker/authorized-replication.d.ts +21 -0
  885. package/dist/worker/authorized-replication.d.ts.map +1 -0
  886. package/dist/worker/authorized-replication.js +593 -0
  887. package/dist/worker/authorized-replication.js.map +1 -0
  888. package/dist/worker/changesets.d.ts +9 -0
  889. package/dist/worker/changesets.d.ts.map +1 -0
  890. package/dist/worker/changesets.js +105 -0
  891. package/dist/worker/changesets.js.map +1 -0
  892. package/dist/worker/demo.d.ts +2 -0
  893. package/dist/worker/demo.d.ts.map +1 -0
  894. package/dist/worker/demo.js +85 -0
  895. package/dist/worker/demo.js.map +1 -0
  896. package/dist/worker/errors.d.ts +53 -0
  897. package/dist/worker/errors.d.ts.map +1 -0
  898. package/dist/worker/errors.js +107 -0
  899. package/dist/worker/errors.js.map +1 -0
  900. package/dist/worker/handle.d.ts +21 -0
  901. package/dist/worker/handle.d.ts.map +1 -0
  902. package/dist/worker/handle.js +386 -0
  903. package/dist/worker/handle.js.map +1 -0
  904. package/dist/worker/index.d.ts +27 -0
  905. package/dist/worker/index.d.ts.map +1 -0
  906. package/dist/worker/index.js +24 -0
  907. package/dist/worker/index.js.map +1 -0
  908. package/dist/worker/jwt.d.ts +23 -0
  909. package/dist/worker/jwt.d.ts.map +1 -0
  910. package/dist/worker/jwt.js +288 -0
  911. package/dist/worker/jwt.js.map +1 -0
  912. package/dist/worker/mcp.d.ts +17 -0
  913. package/dist/worker/mcp.d.ts.map +1 -0
  914. package/dist/worker/mcp.js +151 -0
  915. package/dist/worker/mcp.js.map +1 -0
  916. package/dist/worker/operation-catalogs.d.ts +38 -0
  917. package/dist/worker/operation-catalogs.d.ts.map +1 -0
  918. package/dist/worker/operation-catalogs.js +114 -0
  919. package/dist/worker/operation-catalogs.js.map +1 -0
  920. package/dist/worker/peer.d.ts +70 -0
  921. package/dist/worker/peer.d.ts.map +1 -0
  922. package/dist/worker/peer.js +330 -0
  923. package/dist/worker/peer.js.map +1 -0
  924. package/dist/worker/public-observation.d.ts +15 -0
  925. package/dist/worker/public-observation.d.ts.map +1 -0
  926. package/dist/worker/public-observation.js +111 -0
  927. package/dist/worker/public-observation.js.map +1 -0
  928. package/dist/worker/server-identity.d.ts +2 -0
  929. package/dist/worker/server-identity.d.ts.map +1 -0
  930. package/dist/worker/server-identity.js +2 -0
  931. package/dist/worker/server-identity.js.map +1 -0
  932. package/dist/worker/session-sync.d.ts +27 -0
  933. package/dist/worker/session-sync.d.ts.map +1 -0
  934. package/dist/worker/session-sync.js +4 -0
  935. package/dist/worker/session-sync.js.map +1 -0
  936. package/dist/worker/session.d.ts +144 -0
  937. package/dist/worker/session.d.ts.map +1 -0
  938. package/dist/worker/session.js +408 -0
  939. package/dist/worker/session.js.map +1 -0
  940. package/dist/worker/storage-test-admin.d.ts +3 -0
  941. package/dist/worker/storage-test-admin.d.ts.map +1 -0
  942. package/dist/worker/storage-test-admin.js +277 -0
  943. package/dist/worker/storage-test-admin.js.map +1 -0
  944. package/dist/worker/test-admin.d.ts +11 -0
  945. package/dist/worker/test-admin.d.ts.map +1 -0
  946. package/dist/worker/test-admin.js +432 -0
  947. package/dist/worker/test-admin.js.map +1 -0
  948. package/dist/worker/testing.d.ts +14 -0
  949. package/dist/worker/testing.d.ts.map +1 -0
  950. package/dist/worker/testing.js +71 -0
  951. package/dist/worker/testing.js.map +1 -0
  952. package/dist/workerEntry.d.ts +2 -0
  953. package/dist/workerEntry.d.ts.map +1 -0
  954. package/dist/workerEntry.js +10 -0
  955. package/dist/workerEntry.js.map +1 -0
  956. package/dist/writes.d.ts +8 -0
  957. package/dist/writes.d.ts.map +1 -0
  958. package/dist/writes.js +11 -0
  959. package/dist/writes.js.map +1 -0
  960. package/package.json +104 -4
@@ -0,0 +1,68 @@
1
+ import { type AllocationPathSegment } from "../../db/allocations.ts";
2
+ import { type ClientRef } from "../../db/refs.ts";
3
+ import { type EntityIdScope, type SealedEntityId } from "../replication/entity-id.ts";
4
+ import type { ServerSealingKey } from "../replication/server-identity.ts";
5
+ import type { AllocationSlotDescriptor, OperationInputShape, OperationWireShape } from "./catalog.ts";
6
+ export type InvocationAllocation = {
7
+ readonly slot: string;
8
+ readonly clientRef: ClientRef;
9
+ };
10
+ export declare const parseInvocationAllocations: (value: unknown) => readonly InvocationAllocation[] | undefined;
11
+ export type EpochBoundScope = {
12
+ readonly keyId: string;
13
+ readonly scope: EntityIdScope;
14
+ };
15
+ export type EpochDecision = {
16
+ readonly _tag: "Agreed";
17
+ readonly sealing: ServerSealingKey;
18
+ readonly scope: EntityIdScope;
19
+ } | {
20
+ readonly _tag: "UpdateRequired";
21
+ };
22
+ export declare const decideEpoch: (bound: EpochBoundScope, sealing: ServerSealingKey) => EpochDecision;
23
+ export declare const sameEpochScope: (left: EpochBoundScope, right: EpochBoundScope) => boolean;
24
+ export declare const parseEntityIdScope: (value: unknown) => EntityIdScope | undefined;
25
+ export type SealedTargetResolution = {
26
+ readonly _tag: "Resolved";
27
+ readonly eid: number;
28
+ } | {
29
+ readonly _tag: "UpdateRequired";
30
+ } | {
31
+ readonly _tag: "Denied";
32
+ };
33
+ export declare const resolveSealedTarget: (sealing: ServerSealingKey, scope: EntityIdScope, token: string) => Promise<SealedTargetResolution>;
34
+ export declare const isEntityRefPath: (shape: OperationInputShape, path: readonly AllocationPathSegment[]) => boolean;
35
+ export type AllocatedSlot = {
36
+ readonly slot: string;
37
+ readonly eid: number;
38
+ };
39
+ export type AllocationExtraction = {
40
+ readonly _tag: "Allocated";
41
+ readonly slots: readonly AllocatedSlot[];
42
+ } | {
43
+ readonly _tag: "Unallocated";
44
+ readonly slot: string;
45
+ };
46
+ export declare const allocatedEids: (tempids: Readonly<Record<string, number>>) => ReadonlySet<number>;
47
+ export declare const extractAllocations: (declared: readonly AllocationSlotDescriptor[], outputShape: OperationInputShape, output: unknown, requested: readonly InvocationAllocation[], allocated: ReadonlySet<number>) => AllocationExtraction;
48
+ export declare const wireEntityRefPaths: (shape: OperationWireShape, value: unknown, holds: (candidate: unknown) => boolean) => readonly (readonly AllocationPathSegment[])[];
49
+ export declare const outputEntityRefPaths: (shape: OperationWireShape, output: unknown) => readonly (readonly AllocationPathSegment[])[];
50
+ export declare const sealOutputEntityRefs: (sealing: ServerSealingKey, scope: EntityIdScope, output: unknown, paths: readonly (readonly AllocationPathSegment[])[]) => Promise<unknown>;
51
+ export declare const mayCarrySealedEntityId: (input: unknown) => boolean;
52
+ export declare const inputEntityRefHandles: (shape: OperationWireShape, input: unknown) => readonly (readonly AllocationPathSegment[])[];
53
+ export type SealedInputResolution = {
54
+ readonly _tag: "Resolved";
55
+ readonly input: unknown;
56
+ } | {
57
+ readonly _tag: "UpdateRequired";
58
+ } | {
59
+ readonly _tag: "Denied";
60
+ };
61
+ export declare const resolveSealedInputRefs: (sealing: ServerSealingKey, scope: EntityIdScope, input: unknown, paths: readonly (readonly AllocationPathSegment[])[]) => Promise<SealedInputResolution>;
62
+ export type SealedAllocationMapping = {
63
+ readonly slot: string;
64
+ readonly clientRef: string;
65
+ readonly entityId: SealedEntityId;
66
+ };
67
+ export declare const sealAllocationMappings: (sealing: ServerSealingKey, scope: EntityIdScope, slots: readonly AllocatedSlot[], requested: readonly InvocationAllocation[]) => Promise<readonly SealedAllocationMapping[]>;
68
+ //# sourceMappingURL=entity-targets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-targets.d.ts","sourceRoot":"","sources":["../../../src/internal/authorization/entity-targets.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC/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D;IAAE,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAA;CAAE,GACnC;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAOhC,eAAO,MAAM,sBAAsB,YACxB,gBAAgB,SAClB,aAAa,SACb,OAAO,SACP,SAAS,CAAC,SAAS,qBAAqB,EAAE,CAAC,EAAE,KACnD,OAAO,CAAC,qBAAqB,CAoB/B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,sBAAsB,YACxB,gBAAgB,SAClB,aAAa,SACb,SAAS,aAAa,EAAE,aACpB,SAAS,oBAAoB,EAAE,KACzC,OAAO,CAAC,SAAS,uBAAuB,EAAE,CAe5C,CAAC"}
@@ -0,0 +1,244 @@
1
+ import { isAllocationSlotName, readAllocationPath, } from "../../db/allocations.js";
2
+ import { isClientRef } from "../../db/refs.js";
3
+ import { openEntityId, sealEntityId, SEALED_ENTITY_ID_MIN_LENGTH, } from "../replication/entity-id.js";
4
+ export const parseInvocationAllocations = (value) => {
5
+ if (value === undefined)
6
+ return [];
7
+ if (!Array.isArray(value))
8
+ return undefined;
9
+ const slots = new Set();
10
+ const refs = new Set();
11
+ const parsed = [];
12
+ for (const entry of value) {
13
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
14
+ return undefined;
15
+ }
16
+ const record = entry;
17
+ if (Object.keys(record).length !== 2 ||
18
+ !isAllocationSlotName(record.slot) || !isClientRef(record.clientRef))
19
+ return undefined;
20
+ if (slots.has(record.slot) || refs.has(record.clientRef))
21
+ return undefined;
22
+ slots.add(record.slot);
23
+ refs.add(record.clientRef);
24
+ parsed.push(Object.freeze({ slot: record.slot, clientRef: record.clientRef }));
25
+ }
26
+ return Object.freeze(parsed.sort((left, right) => left.slot < right.slot ? -1 : left.slot > right.slot ? 1 : 0));
27
+ };
28
+ const EPOCH_UPDATE_REQUIRED = Object.freeze({ _tag: "UpdateRequired" });
29
+ export const decideEpoch = (bound, sealing) => bound.keyId === sealing.keyId
30
+ ? Object.freeze({ _tag: "Agreed", sealing, scope: bound.scope })
31
+ : EPOCH_UPDATE_REQUIRED;
32
+ export const sameEpochScope = (left, right) => left.keyId === right.keyId &&
33
+ left.scope.server === right.scope.server &&
34
+ left.scope.principal === right.scope.principal &&
35
+ left.scope.database === right.scope.database;
36
+ export const parseEntityIdScope = (value) => {
37
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
38
+ return undefined;
39
+ }
40
+ const record = value;
41
+ if (typeof record.server !== "string" || record.server.length === 0 ||
42
+ typeof record.principal !== "string" || record.principal.length === 0 ||
43
+ typeof record.database !== "string" || record.database.length === 0)
44
+ return undefined;
45
+ return Object.freeze({
46
+ server: record.server,
47
+ principal: record.principal,
48
+ database: record.database,
49
+ });
50
+ };
51
+ const MAX_SEALED_TARGET_LENGTH = 4096;
52
+ const DENIED = Object.freeze({ _tag: "Denied" });
53
+ const UPDATE_REQUIRED = Object.freeze({ _tag: "UpdateRequired" });
54
+ export const resolveSealedTarget = async (sealing, scope, token) => {
55
+ if (token.length === 0 || token.length > MAX_SEALED_TARGET_LENGTH)
56
+ return DENIED;
57
+ const resolution = await openEntityId(sealing, scope, token);
58
+ switch (resolution.type) {
59
+ case "resolved":
60
+ return Object.freeze({ _tag: "Resolved", eid: resolution.eid });
61
+ case "update-required":
62
+ return UPDATE_REQUIRED;
63
+ case "denied":
64
+ return DENIED;
65
+ }
66
+ };
67
+ export const isEntityRefPath = (shape, path) => {
68
+ let cursor = shape;
69
+ for (const segment of path) {
70
+ if (cursor._tag === "array") {
71
+ if (typeof segment !== "number")
72
+ return false;
73
+ cursor = cursor.items;
74
+ continue;
75
+ }
76
+ if (cursor._tag === "struct") {
77
+ if (typeof segment !== "string")
78
+ return false;
79
+ const field = cursor.fields.find((candidate) => candidate.key === segment);
80
+ if (field === undefined)
81
+ return false;
82
+ cursor = field.shape;
83
+ continue;
84
+ }
85
+ return false;
86
+ }
87
+ return cursor._tag === "ref";
88
+ };
89
+ export const allocatedEids = (tempids) => new Set(Object.values(tempids));
90
+ export const extractAllocations = (declared, outputShape, output, requested, allocated) => {
91
+ const slots = [];
92
+ for (const allocation of requested) {
93
+ const declaration = declared.find((candidate) => candidate.slot === allocation.slot);
94
+ if (declaration === undefined ||
95
+ !isEntityRefPath(outputShape, declaration.path)) {
96
+ return Object.freeze({ _tag: "Unallocated", slot: allocation.slot });
97
+ }
98
+ const value = readAllocationPath(output, declaration.path);
99
+ if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 0) {
100
+ return Object.freeze({ _tag: "Unallocated", slot: allocation.slot });
101
+ }
102
+ if (!allocated.has(value)) {
103
+ return Object.freeze({ _tag: "Unallocated", slot: allocation.slot });
104
+ }
105
+ slots.push(Object.freeze({ slot: allocation.slot, eid: value }));
106
+ }
107
+ return Object.freeze({ _tag: "Allocated", slots: Object.freeze(slots) });
108
+ };
109
+ export const wireEntityRefPaths = (shape, value, holds) => {
110
+ const paths = [];
111
+ const walk = (current, node, path) => {
112
+ switch (current._tag) {
113
+ case "ref":
114
+ if (holds(node))
115
+ paths.push(Object.freeze([...path]));
116
+ return;
117
+ case "array":
118
+ if (Array.isArray(node)) {
119
+ for (let index = 0; index < node.length; index++) {
120
+ walk(current.items, node[index], [...path, index]);
121
+ }
122
+ }
123
+ return;
124
+ case "struct":
125
+ if (typeof node === "object" && node !== null && !Array.isArray(node)) {
126
+ for (const field of current.fields) {
127
+ if (!Object.hasOwn(node, field.key))
128
+ continue;
129
+ walk(field.shape, node[field.key], [...path, field.key]);
130
+ }
131
+ }
132
+ return;
133
+ case "scalar":
134
+ case "opaque":
135
+ return;
136
+ }
137
+ };
138
+ walk(shape, value, []);
139
+ return Object.freeze(paths);
140
+ };
141
+ const isResolvedEid = (candidate) => typeof candidate === "number" && Number.isSafeInteger(candidate) &&
142
+ candidate >= 0;
143
+ export const outputEntityRefPaths = (shape, output) => wireEntityRefPaths(shape, output, isResolvedEid);
144
+ const replaceAt = (value, path, replacement) => {
145
+ const [head, ...rest] = path;
146
+ if (head === undefined)
147
+ return replacement;
148
+ if (typeof head === "number") {
149
+ if (!Array.isArray(value) || head >= value.length) {
150
+ throw new Error("entity-reference position is not an array index");
151
+ }
152
+ const copy = [...value];
153
+ copy[head] = replaceAt(value[head], rest, replacement);
154
+ return copy;
155
+ }
156
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
157
+ throw new Error("entity-reference position is not an object property");
158
+ }
159
+ const record = value;
160
+ if (!Object.hasOwn(record, head)) {
161
+ throw new Error("entity-reference position is absent");
162
+ }
163
+ return { ...record, [head]: replaceAt(record[head], rest, replacement) };
164
+ };
165
+ export const sealOutputEntityRefs = async (sealing, scope, output, paths) => {
166
+ const sealed = await Promise.all(paths.map(async (path) => {
167
+ const eid = readAllocationPath(output, path);
168
+ if (typeof eid !== "number" || !Number.isSafeInteger(eid) || eid < 0) {
169
+ throw new Error("output entity-reference position holds no resolved eid");
170
+ }
171
+ return { path, handle: await sealEntityId(sealing, scope, eid) };
172
+ }));
173
+ let projected = output;
174
+ for (const { path, handle } of sealed) {
175
+ projected = replaceAt(projected, path, handle);
176
+ }
177
+ return projected;
178
+ };
179
+ const BASE64URL = /^[A-Za-z0-9_-]+$/;
180
+ const mayBeSealedEntityId = (value) => value.length >= SEALED_ENTITY_ID_MIN_LENGTH &&
181
+ value.length <= MAX_SEALED_TARGET_LENGTH &&
182
+ value.length % 4 !== 1 &&
183
+ BASE64URL.test(value);
184
+ export const mayCarrySealedEntityId = (input) => {
185
+ const seen = new Set();
186
+ const pending = [input];
187
+ while (pending.length > 0) {
188
+ const value = pending.pop();
189
+ if (typeof value === "string") {
190
+ if (mayBeSealedEntityId(value))
191
+ return true;
192
+ continue;
193
+ }
194
+ if (typeof value !== "object" || value === null)
195
+ continue;
196
+ if (seen.has(value))
197
+ continue;
198
+ seen.add(value);
199
+ for (const child of Array.isArray(value) ? value : Object.values(value)) {
200
+ pending.push(child);
201
+ }
202
+ }
203
+ return false;
204
+ };
205
+ export const inputEntityRefHandles = (shape, input) => wireEntityRefPaths(shape, input, (candidate) => typeof candidate === "string");
206
+ const DENIED_INPUT = Object.freeze({ _tag: "Denied" });
207
+ const UPDATE_REQUIRED_INPUT = Object.freeze({ _tag: "UpdateRequired" });
208
+ export const resolveSealedInputRefs = async (sealing, scope, input, paths) => {
209
+ const opened = await Promise.all(paths.map(async (path) => {
210
+ const token = readAllocationPath(input, path);
211
+ if (typeof token !== "string") {
212
+ throw new Error("input entity-reference position holds no handle");
213
+ }
214
+ return { path, resolution: await resolveSealedTarget(sealing, scope, token) };
215
+ }));
216
+ if (opened.some(({ resolution }) => resolution._tag === "UpdateRequired")) {
217
+ return UPDATE_REQUIRED_INPUT;
218
+ }
219
+ if (opened.some(({ resolution }) => resolution._tag === "Denied")) {
220
+ return DENIED_INPUT;
221
+ }
222
+ let resolved = input;
223
+ for (const { path, resolution } of opened) {
224
+ if (resolution._tag !== "Resolved")
225
+ continue;
226
+ resolved = replaceAt(resolved, path, resolution.eid);
227
+ }
228
+ return Object.freeze({ _tag: "Resolved", input: resolved });
229
+ };
230
+ export const sealAllocationMappings = async (sealing, scope, slots, requested) => {
231
+ const bound = new Map(requested.map((entry) => [entry.slot, entry.clientRef]));
232
+ return Object.freeze(await Promise.all(slots.map(async (allocated) => {
233
+ const clientRef = bound.get(allocated.slot);
234
+ if (clientRef === undefined) {
235
+ throw new Error("allocated slot has no bound client ref");
236
+ }
237
+ return Object.freeze({
238
+ slot: allocated.slot,
239
+ clientRef,
240
+ entityId: await sealEntityId(sealing, scope, allocated.eid),
241
+ });
242
+ })));
243
+ };
244
+ //# sourceMappingURL=entity-targets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-targets.js","sourceRoot":"","sources":["../../../src/internal/authorization/entity-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ACL,CAAC,CAAC,CAAC,CACJ,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,259 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { type CanonicalIdentities, type IdentitySpace, type RelativeIdentities } from "./identities.ts";
3
+ export declare const PathRoot: Schema.Union<readonly [Schema.TaggedStruct<"resource", {}>, Schema.TaggedStruct<"me", {}>]>;
4
+ export type PathRoot = typeof PathRoot.Type;
5
+ export declare const PathStep: <F extends Schema.Top>(field: F) => Schema.Struct<{
6
+ readonly field: F;
7
+ }>;
8
+ export declare const RefTerm: <F extends Schema.Top>(field: F) => Schema.TaggedStruct<"ref", {
9
+ readonly root: Schema.Union<readonly [Schema.TaggedStruct<"resource", {}>, Schema.TaggedStruct<"me", {}>]>;
10
+ readonly steps: Schema.$Array<Schema.Struct<{
11
+ readonly field: F;
12
+ }>>;
13
+ }>;
14
+ export declare const LitTerm: Schema.TaggedStruct<"lit", {
15
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
16
+ }>;
17
+ export type LitTerm = typeof LitTerm.Type;
18
+ export declare const SubjectTerm: Schema.TaggedStruct<"subject", {}>;
19
+ export type SubjectTerm = typeof SubjectTerm.Type;
20
+ export declare const MeTerm: Schema.TaggedStruct<"me", {}>;
21
+ export type MeTerm = typeof MeTerm.Type;
22
+ export declare const ClaimTerm: Schema.TaggedStruct<"claim", {
23
+ readonly key: Schema.String;
24
+ }>;
25
+ export type ClaimTerm = typeof ClaimTerm.Type;
26
+ export declare const ValueTerm: <F extends Schema.Top>(field: F) => Schema.Union<readonly [Schema.TaggedStruct<"lit", {
27
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
28
+ }>, Schema.TaggedStruct<"subject", {}>, Schema.TaggedStruct<"me", {}>, Schema.TaggedStruct<"claim", {
29
+ readonly key: Schema.String;
30
+ }>, Schema.TaggedStruct<"ref", {
31
+ readonly root: Schema.Union<readonly [Schema.TaggedStruct<"resource", {}>, Schema.TaggedStruct<"me", {}>]>;
32
+ readonly steps: Schema.$Array<Schema.Struct<{
33
+ readonly field: F;
34
+ }>>;
35
+ }>]>;
36
+ export declare const ConstExpr: Schema.TaggedStruct<"const", {
37
+ readonly value: Schema.Boolean;
38
+ }>;
39
+ export type ConstExpr = typeof ConstExpr.Type;
40
+ export declare const HasClassExpr: Schema.TaggedStruct<"hasClass", {
41
+ readonly class: Schema.String;
42
+ }>;
43
+ export type HasClassExpr = typeof HasClassExpr.Type;
44
+ export declare const AndExpr: <E extends Schema.Top>(expr: E) => Schema.TaggedStruct<"and", {
45
+ readonly exprs: Schema.$Array<E>;
46
+ }>;
47
+ export declare const OrExpr: <E extends Schema.Top>(expr: E) => Schema.TaggedStruct<"or", {
48
+ readonly exprs: Schema.$Array<E>;
49
+ }>;
50
+ export declare const NotExpr: <E extends Schema.Top>(expr: E) => Schema.TaggedStruct<"not", {
51
+ readonly expr: E;
52
+ }>;
53
+ export declare const EqExpr: <V extends Schema.Top>(value: V) => Schema.TaggedStruct<"eq", {
54
+ readonly left: V;
55
+ readonly right: V;
56
+ }>;
57
+ export declare const HasExpr: <V extends Schema.Top>(value: V) => Schema.TaggedStruct<"has", {
58
+ readonly term: V;
59
+ }>;
60
+ export declare const InExpr: <V extends Schema.Top>(value: V) => Schema.TaggedStruct<"in", {
61
+ readonly value: V;
62
+ readonly collection: V;
63
+ }>;
64
+ export declare const RelativePathStep: Schema.Struct<{
65
+ readonly field: Schema.TaggedStruct<"RelativeFieldId", {
66
+ readonly owner: Schema.Struct<{
67
+ readonly kind: Schema.Literals<readonly ["entity", "trait"]>;
68
+ readonly name: Schema.String;
69
+ }>;
70
+ readonly localName: Schema.String;
71
+ }>;
72
+ }>;
73
+ export type RelativePathStep = typeof RelativePathStep.Type;
74
+ export declare const CanonicalPathStep: Schema.Struct<{
75
+ readonly field: Schema.TaggedStruct<"FieldId", {
76
+ readonly catalog: Schema.brand<Schema.String, "CatalogId">;
77
+ readonly owner: Schema.Struct<{
78
+ readonly kind: Schema.Literals<readonly ["entity", "trait"]>;
79
+ readonly name: Schema.String;
80
+ }>;
81
+ readonly localName: Schema.String;
82
+ }>;
83
+ }>;
84
+ export type CanonicalPathStep = typeof CanonicalPathStep.Type;
85
+ export declare const RelativeRefTerm: Schema.TaggedStruct<"ref", {
86
+ readonly root: Schema.Union<readonly [Schema.TaggedStruct<"resource", {}>, Schema.TaggedStruct<"me", {}>]>;
87
+ readonly steps: Schema.$Array<Schema.Struct<{
88
+ readonly field: Schema.TaggedStruct<"RelativeFieldId", {
89
+ readonly owner: Schema.Struct<{
90
+ readonly kind: Schema.Literals<readonly ["entity", "trait"]>;
91
+ readonly name: Schema.String;
92
+ }>;
93
+ readonly localName: Schema.String;
94
+ }>;
95
+ }>>;
96
+ }>;
97
+ export type RelativeRefTerm = typeof RelativeRefTerm.Type;
98
+ export declare const CanonicalRefTerm: Schema.TaggedStruct<"ref", {
99
+ readonly root: Schema.Union<readonly [Schema.TaggedStruct<"resource", {}>, Schema.TaggedStruct<"me", {}>]>;
100
+ readonly steps: Schema.$Array<Schema.Struct<{
101
+ readonly field: Schema.TaggedStruct<"FieldId", {
102
+ readonly catalog: Schema.brand<Schema.String, "CatalogId">;
103
+ readonly owner: Schema.Struct<{
104
+ readonly kind: Schema.Literals<readonly ["entity", "trait"]>;
105
+ readonly name: Schema.String;
106
+ }>;
107
+ readonly localName: Schema.String;
108
+ }>;
109
+ }>>;
110
+ }>;
111
+ export type CanonicalRefTerm = typeof CanonicalRefTerm.Type;
112
+ export declare const RelativeValueTerm: Schema.Union<readonly [Schema.TaggedStruct<"lit", {
113
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
114
+ }>, Schema.TaggedStruct<"subject", {}>, Schema.TaggedStruct<"me", {}>, Schema.TaggedStruct<"claim", {
115
+ readonly key: Schema.String;
116
+ }>, Schema.TaggedStruct<"ref", {
117
+ readonly root: Schema.Union<readonly [Schema.TaggedStruct<"resource", {}>, Schema.TaggedStruct<"me", {}>]>;
118
+ readonly steps: Schema.$Array<Schema.Struct<{
119
+ readonly field: Schema.TaggedStruct<"RelativeFieldId", {
120
+ readonly owner: Schema.Struct<{
121
+ readonly kind: Schema.Literals<readonly ["entity", "trait"]>;
122
+ readonly name: Schema.String;
123
+ }>;
124
+ readonly localName: Schema.String;
125
+ }>;
126
+ }>>;
127
+ }>]>;
128
+ export type RelativeValueTerm = typeof RelativeValueTerm.Type;
129
+ export declare const CanonicalValueTerm: Schema.Union<readonly [Schema.TaggedStruct<"lit", {
130
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
131
+ }>, Schema.TaggedStruct<"subject", {}>, Schema.TaggedStruct<"me", {}>, Schema.TaggedStruct<"claim", {
132
+ readonly key: Schema.String;
133
+ }>, Schema.TaggedStruct<"ref", {
134
+ readonly root: Schema.Union<readonly [Schema.TaggedStruct<"resource", {}>, Schema.TaggedStruct<"me", {}>]>;
135
+ readonly steps: Schema.$Array<Schema.Struct<{
136
+ readonly field: Schema.TaggedStruct<"FieldId", {
137
+ readonly catalog: Schema.brand<Schema.String, "CatalogId">;
138
+ readonly owner: Schema.Struct<{
139
+ readonly kind: Schema.Literals<readonly ["entity", "trait"]>;
140
+ readonly name: Schema.String;
141
+ }>;
142
+ readonly localName: Schema.String;
143
+ }>;
144
+ }>>;
145
+ }>]>;
146
+ export type CanonicalValueTerm = typeof CanonicalValueTerm.Type;
147
+ export type RelativeValueTermEncoded = typeof RelativeValueTerm.Encoded;
148
+ export type CanonicalValueTermEncoded = typeof CanonicalValueTerm.Encoded;
149
+ export type RelativeRefTermEncoded = typeof RelativeRefTerm.Encoded;
150
+ export type CanonicalRefTermEncoded = typeof CanonicalRefTerm.Encoded;
151
+ export type RelativeAuthorizationExpr = ConstExpr | HasClassExpr | {
152
+ readonly _tag: "and";
153
+ readonly exprs: ReadonlyArray<RelativeAuthorizationExpr>;
154
+ } | {
155
+ readonly _tag: "or";
156
+ readonly exprs: ReadonlyArray<RelativeAuthorizationExpr>;
157
+ } | {
158
+ readonly _tag: "not";
159
+ readonly expr: RelativeAuthorizationExpr;
160
+ } | {
161
+ readonly _tag: "eq";
162
+ readonly left: RelativeValueTerm;
163
+ readonly right: RelativeValueTerm;
164
+ } | {
165
+ readonly _tag: "has";
166
+ readonly term: RelativeValueTerm;
167
+ } | {
168
+ readonly _tag: "in";
169
+ readonly value: RelativeValueTerm;
170
+ readonly collection: RelativeValueTerm;
171
+ };
172
+ export type CanonicalAuthorizationExpr = ConstExpr | HasClassExpr | {
173
+ readonly _tag: "and";
174
+ readonly exprs: ReadonlyArray<CanonicalAuthorizationExpr>;
175
+ } | {
176
+ readonly _tag: "or";
177
+ readonly exprs: ReadonlyArray<CanonicalAuthorizationExpr>;
178
+ } | {
179
+ readonly _tag: "not";
180
+ readonly expr: CanonicalAuthorizationExpr;
181
+ } | {
182
+ readonly _tag: "eq";
183
+ readonly left: CanonicalValueTerm;
184
+ readonly right: CanonicalValueTerm;
185
+ } | {
186
+ readonly _tag: "has";
187
+ readonly term: CanonicalValueTerm;
188
+ } | {
189
+ readonly _tag: "in";
190
+ readonly value: CanonicalValueTerm;
191
+ readonly collection: CanonicalValueTerm;
192
+ };
193
+ export type RelativeAuthorizationExprEncoded = ConstExpr | HasClassExpr | {
194
+ readonly _tag: "and";
195
+ readonly exprs: ReadonlyArray<RelativeAuthorizationExprEncoded>;
196
+ } | {
197
+ readonly _tag: "or";
198
+ readonly exprs: ReadonlyArray<RelativeAuthorizationExprEncoded>;
199
+ } | {
200
+ readonly _tag: "not";
201
+ readonly expr: RelativeAuthorizationExprEncoded;
202
+ } | {
203
+ readonly _tag: "eq";
204
+ readonly left: RelativeValueTermEncoded;
205
+ readonly right: RelativeValueTermEncoded;
206
+ } | {
207
+ readonly _tag: "has";
208
+ readonly term: RelativeValueTermEncoded;
209
+ } | {
210
+ readonly _tag: "in";
211
+ readonly value: RelativeValueTermEncoded;
212
+ readonly collection: RelativeValueTermEncoded;
213
+ };
214
+ export type CanonicalAuthorizationExprEncoded = ConstExpr | HasClassExpr | {
215
+ readonly _tag: "and";
216
+ readonly exprs: ReadonlyArray<CanonicalAuthorizationExprEncoded>;
217
+ } | {
218
+ readonly _tag: "or";
219
+ readonly exprs: ReadonlyArray<CanonicalAuthorizationExprEncoded>;
220
+ } | {
221
+ readonly _tag: "not";
222
+ readonly expr: CanonicalAuthorizationExprEncoded;
223
+ } | {
224
+ readonly _tag: "eq";
225
+ readonly left: CanonicalValueTermEncoded;
226
+ readonly right: CanonicalValueTermEncoded;
227
+ } | {
228
+ readonly _tag: "has";
229
+ readonly term: CanonicalValueTermEncoded;
230
+ } | {
231
+ readonly _tag: "in";
232
+ readonly value: CanonicalValueTermEncoded;
233
+ readonly collection: CanonicalValueTermEncoded;
234
+ };
235
+ export declare const RelativeAuthorizationExpr: Schema.Codec<RelativeAuthorizationExpr, RelativeAuthorizationExprEncoded>;
236
+ export declare const CanonicalAuthorizationExpr: Schema.Codec<CanonicalAuthorizationExpr, CanonicalAuthorizationExprEncoded>;
237
+ export type PathStep<I extends IdentitySpace = RelativeIdentities> = I extends CanonicalIdentities ? CanonicalPathStep : RelativePathStep;
238
+ export type RefTerm<I extends IdentitySpace = RelativeIdentities> = I extends CanonicalIdentities ? CanonicalRefTerm : RelativeRefTerm;
239
+ export type ValueTerm<I extends IdentitySpace = RelativeIdentities> = I extends CanonicalIdentities ? CanonicalValueTerm : RelativeValueTerm;
240
+ export type AndExpr = Extract<RelativeAuthorizationExpr | CanonicalAuthorizationExpr, {
241
+ readonly _tag: "and";
242
+ }>;
243
+ export type OrExpr = Extract<RelativeAuthorizationExpr | CanonicalAuthorizationExpr, {
244
+ readonly _tag: "or";
245
+ }>;
246
+ export type NotExpr = Extract<RelativeAuthorizationExpr | CanonicalAuthorizationExpr, {
247
+ readonly _tag: "not";
248
+ }>;
249
+ export type EqExpr = Extract<RelativeAuthorizationExpr | CanonicalAuthorizationExpr, {
250
+ readonly _tag: "eq";
251
+ }>;
252
+ export type HasExpr = Extract<RelativeAuthorizationExpr | CanonicalAuthorizationExpr, {
253
+ readonly _tag: "has";
254
+ }>;
255
+ export type InExpr = Extract<RelativeAuthorizationExpr | CanonicalAuthorizationExpr, {
256
+ readonly _tag: "in";
257
+ }>;
258
+ export type AuthorizationExpr<I extends IdentitySpace = RelativeIdentities> = I extends CanonicalIdentities ? CanonicalAuthorizationExpr : I extends RelativeIdentities ? RelativeAuthorizationExpr : RelativeAuthorizationExpr | CanonicalAuthorizationExpr;
259
+ //# sourceMappingURL=expr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expr.d.ts","sourceRoot":"","sources":["../../../src/internal/authorization/expr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAIL,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACxB,MAAM,iBAAiB,CAAC;AAGzB,eAAO,MAAM,QAAQ,6FAGnB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAC;AAE5C,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,MAAM,CAAC,GAAG,SAAS,CAAC;;EAA6B,CAAC;AAErF,eAAO,MAAM,OAAO,GAAI,CAAC,SAAS,MAAM,CAAC,GAAG,SAAS,CAAC;;;;;EAIlD,CAAC;AAEL,eAAO,MAAM,OAAO;;EAElB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC;AAE1C,eAAO,MAAM,WAAW,oCAAqC,CAAC;AAC9D,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAC;AAElD,eAAO,MAAM,MAAM,+BAAgC,CAAC;AACpD,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAC;AAExC,eAAO,MAAM,SAAS;;EAEpB,CAAC;AACH,MA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