jazz-tools 2.0.0-alpha.6 → 2.0.0-alpha.60

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 (1660) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +178 -2
  3. package/bin/jazz-tools.js +91 -45
  4. package/dist/_dev/inspector-cache-runtime.d.ts +8 -0
  5. package/dist/_dev/inspector-cache-runtime.d.ts.map +1 -0
  6. package/dist/_dev/inspector-cache-runtime.js +237 -0
  7. package/dist/_dev/inspector-cache-runtime.js.map +1 -0
  8. package/dist/_dev/inspector-client.d.ts +15 -0
  9. package/dist/_dev/inspector-client.d.ts.map +1 -0
  10. package/dist/_dev/inspector-client.js +134 -0
  11. package/dist/_dev/inspector-client.js.map +1 -0
  12. package/dist/_dev/native-account-session.d.ts +16 -0
  13. package/dist/_dev/native-account-session.d.ts.map +1 -0
  14. package/dist/_dev/native-account-session.js +51 -0
  15. package/dist/_dev/native-account-session.js.map +1 -0
  16. package/dist/_dev/native-binding-codec.d.ts +9 -0
  17. package/dist/_dev/native-binding-codec.d.ts.map +1 -0
  18. package/dist/_dev/native-binding-codec.js +9 -0
  19. package/dist/_dev/native-binding-codec.js.map +1 -0
  20. package/dist/accounts/account-manager-core.d.ts +28 -0
  21. package/dist/accounts/account-manager-core.d.ts.map +1 -0
  22. package/dist/accounts/account-manager-core.js +179 -0
  23. package/dist/accounts/account-manager-core.js.map +1 -0
  24. package/dist/accounts/browser-host.d.ts +8 -0
  25. package/dist/accounts/browser-host.d.ts.map +1 -0
  26. package/dist/accounts/browser-host.js +16 -0
  27. package/dist/accounts/browser-host.js.map +1 -0
  28. package/dist/accounts/config-capability.d.ts +26 -0
  29. package/dist/accounts/config-capability.d.ts.map +1 -0
  30. package/dist/accounts/config-capability.js +58 -0
  31. package/dist/accounts/config-capability.js.map +1 -0
  32. package/dist/accounts/context.d.ts +14 -0
  33. package/dist/accounts/context.d.ts.map +1 -0
  34. package/dist/accounts/context.js +214 -0
  35. package/dist/accounts/context.js.map +1 -0
  36. package/dist/accounts/create-account-manager.d.ts +52 -0
  37. package/dist/accounts/create-account-manager.d.ts.map +1 -0
  38. package/dist/accounts/create-account-manager.js +17 -0
  39. package/dist/accounts/create-account-manager.js.map +1 -0
  40. package/dist/accounts/enrollment.d.ts +87 -0
  41. package/dist/accounts/enrollment.d.ts.map +1 -0
  42. package/dist/accounts/enrollment.js +305 -0
  43. package/dist/accounts/enrollment.js.map +1 -0
  44. package/dist/accounts/exports.d.ts +4 -0
  45. package/dist/accounts/exports.d.ts.map +1 -0
  46. package/dist/accounts/exports.js +2 -0
  47. package/dist/accounts/exports.js.map +1 -0
  48. package/dist/accounts/local-first.d.ts +14 -0
  49. package/dist/accounts/local-first.d.ts.map +1 -0
  50. package/dist/accounts/local-first.js +62 -0
  51. package/dist/accounts/local-first.js.map +1 -0
  52. package/dist/accounts/persistence.d.ts +34 -0
  53. package/dist/accounts/persistence.d.ts.map +1 -0
  54. package/dist/accounts/persistence.js +299 -0
  55. package/dist/accounts/persistence.js.map +1 -0
  56. package/dist/accounts/registry-client.d.ts +50 -0
  57. package/dist/accounts/registry-client.d.ts.map +1 -0
  58. package/dist/accounts/registry-client.js +108 -0
  59. package/dist/accounts/registry-client.js.map +1 -0
  60. package/dist/accounts/state.d.ts +76 -0
  61. package/dist/accounts/state.d.ts.map +1 -0
  62. package/dist/accounts/state.js +171 -0
  63. package/dist/accounts/state.js.map +1 -0
  64. package/dist/backend/admission.d.ts +18 -0
  65. package/dist/backend/admission.d.ts.map +1 -0
  66. package/dist/backend/admission.js +139 -0
  67. package/dist/backend/admission.js.map +1 -0
  68. package/dist/backend/backend-clients.d.ts +76 -0
  69. package/dist/backend/backend-clients.d.ts.map +1 -0
  70. package/dist/backend/backend-clients.js +237 -0
  71. package/dist/backend/backend-clients.js.map +1 -0
  72. package/dist/backend/backend-issuer.d.ts +6 -0
  73. package/dist/backend/backend-issuer.d.ts.map +1 -0
  74. package/dist/backend/backend-issuer.js +6 -0
  75. package/dist/backend/backend-issuer.js.map +1 -0
  76. package/dist/backend/blobs.d.ts +121 -0
  77. package/dist/backend/blobs.d.ts.map +1 -0
  78. package/dist/backend/blobs.js +123 -0
  79. package/dist/backend/blobs.js.map +1 -0
  80. package/dist/backend/create-jazz-context.d.ts +116 -0
  81. package/dist/backend/create-jazz-context.d.ts.map +1 -0
  82. package/dist/backend/create-jazz-context.js +607 -0
  83. package/dist/backend/create-jazz-context.js.map +1 -0
  84. package/dist/backend/create-jazz-session.d.ts +105 -0
  85. package/dist/backend/create-jazz-session.d.ts.map +1 -0
  86. package/dist/backend/create-jazz-session.js +467 -0
  87. package/dist/backend/create-jazz-session.js.map +1 -0
  88. package/dist/backend/create-jazz.d.ts +405 -0
  89. package/dist/backend/create-jazz.d.ts.map +1 -0
  90. package/dist/backend/create-jazz.js +2731 -0
  91. package/dist/backend/create-jazz.js.map +1 -0
  92. package/dist/backend/early-db.d.ts +29 -0
  93. package/dist/backend/early-db.d.ts.map +1 -0
  94. package/dist/backend/early-db.js +202 -0
  95. package/dist/backend/early-db.js.map +1 -0
  96. package/dist/backend/external-jwt.d.ts +27 -0
  97. package/dist/backend/external-jwt.d.ts.map +1 -0
  98. package/dist/backend/external-jwt.js +380 -0
  99. package/dist/backend/external-jwt.js.map +1 -0
  100. package/dist/backend/from-jwt.d.ts +62 -0
  101. package/dist/backend/from-jwt.d.ts.map +1 -0
  102. package/dist/backend/from-jwt.js +96 -0
  103. package/dist/backend/from-jwt.js.map +1 -0
  104. package/dist/backend/index.d.ts +11 -1
  105. package/dist/backend/index.d.ts.map +1 -1
  106. package/dist/backend/index.js +8 -1
  107. package/dist/backend/index.js.map +1 -1
  108. package/dist/backend/no-account-error.d.ts +23 -0
  109. package/dist/backend/no-account-error.d.ts.map +1 -0
  110. package/dist/backend/no-account-error.js +30 -0
  111. package/dist/backend/no-account-error.js.map +1 -0
  112. package/dist/backend/optional-peer.d.ts +9 -0
  113. package/dist/backend/optional-peer.d.ts.map +1 -0
  114. package/dist/backend/optional-peer.js +24 -0
  115. package/dist/backend/optional-peer.js.map +1 -0
  116. package/dist/backend/request-auth.d.ts +39 -0
  117. package/dist/backend/request-auth.d.ts.map +1 -0
  118. package/dist/backend/request-auth.js +77 -0
  119. package/dist/backend/request-auth.js.map +1 -0
  120. package/dist/backend/session-recheck.d.ts +18 -0
  121. package/dist/backend/session-recheck.d.ts.map +1 -0
  122. package/dist/backend/session-recheck.js +57 -0
  123. package/dist/backend/session-recheck.js.map +1 -0
  124. package/dist/backend/socket-deadline.d.ts +23 -0
  125. package/dist/backend/socket-deadline.d.ts.map +1 -0
  126. package/dist/backend/socket-deadline.js +70 -0
  127. package/dist/backend/socket-deadline.js.map +1 -0
  128. package/dist/backend/vercel-store.d.ts +223 -0
  129. package/dist/backend/vercel-store.d.ts.map +1 -0
  130. package/dist/backend/vercel-store.js +932 -0
  131. package/dist/backend/vercel-store.js.map +1 -0
  132. package/dist/better-auth-adapter/fixtures/permissions.d.ts +2 -0
  133. package/dist/better-auth-adapter/fixtures/permissions.d.ts.map +1 -0
  134. package/dist/better-auth-adapter/fixtures/permissions.js +2 -0
  135. package/dist/better-auth-adapter/fixtures/permissions.js.map +1 -0
  136. package/dist/better-auth-adapter/fixtures/schema.d.ts +69 -0
  137. package/dist/better-auth-adapter/fixtures/schema.d.ts.map +1 -0
  138. package/dist/better-auth-adapter/fixtures/schema.js +84 -0
  139. package/dist/better-auth-adapter/fixtures/schema.js.map +1 -0
  140. package/dist/better-auth-adapter/index.d.ts +13 -0
  141. package/dist/better-auth-adapter/index.d.ts.map +1 -0
  142. package/dist/better-auth-adapter/index.js +366 -0
  143. package/dist/better-auth-adapter/index.js.map +1 -0
  144. package/dist/better-auth-adapter/indexes.d.ts +9 -0
  145. package/dist/better-auth-adapter/indexes.d.ts.map +1 -0
  146. package/dist/better-auth-adapter/indexes.js +40 -0
  147. package/dist/better-auth-adapter/indexes.js.map +1 -0
  148. package/dist/better-auth-adapter/schema.d.ts +49 -0
  149. package/dist/better-auth-adapter/schema.d.ts.map +1 -0
  150. package/dist/better-auth-adapter/schema.js +300 -0
  151. package/dist/better-auth-adapter/schema.js.map +1 -0
  152. package/dist/better-auth-adapter/types.d.ts +13 -0
  153. package/dist/better-auth-adapter/types.d.ts.map +1 -0
  154. package/dist/better-auth-adapter/types.js +2 -0
  155. package/dist/better-auth-adapter/types.js.map +1 -0
  156. package/dist/better-auth-adapter/utils.d.ts +27 -0
  157. package/dist/better-auth-adapter/utils.d.ts.map +1 -0
  158. package/dist/better-auth-adapter/utils.js +189 -0
  159. package/dist/better-auth-adapter/utils.js.map +1 -0
  160. package/dist/browser-benchmark-mode.d.ts +6 -0
  161. package/dist/browser-benchmark-mode.d.ts.map +1 -0
  162. package/dist/browser-benchmark-mode.js +13 -0
  163. package/dist/browser-benchmark-mode.js.map +1 -0
  164. package/dist/classic-api.d.ts +59 -0
  165. package/dist/classic-api.d.ts.map +1 -0
  166. package/dist/classic-api.js +86 -0
  167. package/dist/classic-api.js.map +1 -0
  168. package/dist/cli.d.ts +29 -2
  169. package/dist/cli.d.ts.map +1 -1
  170. package/dist/cli.js +358 -268
  171. package/dist/cli.js.map +1 -1
  172. package/dist/client/index.d.ts +14 -0
  173. package/dist/client/index.d.ts.map +1 -0
  174. package/dist/client/index.js +8 -0
  175. package/dist/client/index.js.map +1 -0
  176. package/dist/cloud/api.d.ts +11 -0
  177. package/dist/cloud/api.d.ts.map +1 -0
  178. package/dist/cloud/api.js +46 -0
  179. package/dist/cloud/api.js.map +1 -0
  180. package/dist/cloud/commands.d.ts +13 -0
  181. package/dist/cloud/commands.d.ts.map +1 -0
  182. package/dist/cloud/commands.js +413 -0
  183. package/dist/cloud/commands.js.map +1 -0
  184. package/dist/cloud/credentials.d.ts +49 -0
  185. package/dist/cloud/credentials.d.ts.map +1 -0
  186. package/dist/cloud/credentials.js +219 -0
  187. package/dist/cloud/credentials.js.map +1 -0
  188. package/dist/cloud/session.d.ts +57 -0
  189. package/dist/cloud/session.d.ts.map +1 -0
  190. package/dist/cloud/session.js +269 -0
  191. package/dist/cloud/session.js.map +1 -0
  192. package/dist/codegen/relation-analyzer.d.ts +5 -12
  193. package/dist/codegen/relation-analyzer.d.ts.map +1 -1
  194. package/dist/codegen/relation-analyzer.js +54 -65
  195. package/dist/codegen/relation-analyzer.js.map +1 -1
  196. package/dist/codegen/schema-reader.d.ts +6 -2
  197. package/dist/codegen/schema-reader.d.ts.map +1 -1
  198. package/dist/codegen/schema-reader.js +129 -98
  199. package/dist/codegen/schema-reader.js.map +1 -1
  200. package/dist/dev/catalogue-api.d.ts +157 -0
  201. package/dist/dev/catalogue-api.d.ts.map +1 -0
  202. package/dist/dev/catalogue-api.js +145 -0
  203. package/dist/dev/catalogue-api.js.map +1 -0
  204. package/dist/dev/catalogue-project.d.ts +150 -0
  205. package/dist/dev/catalogue-project.d.ts.map +1 -0
  206. package/dist/dev/catalogue-project.js +1466 -0
  207. package/dist/dev/catalogue-project.js.map +1 -0
  208. package/dist/dev/catalogue.d.ts +72 -0
  209. package/dist/dev/catalogue.d.ts.map +1 -0
  210. package/dist/dev/catalogue.js +279 -0
  211. package/dist/dev/catalogue.js.map +1 -0
  212. package/dist/dev/dev-server.d.ts +57 -0
  213. package/dist/dev/dev-server.d.ts.map +1 -0
  214. package/dist/dev/dev-server.js +122 -0
  215. package/dist/dev/dev-server.js.map +1 -0
  216. package/dist/dev/index.d.ts +3 -0
  217. package/dist/dev/index.d.ts.map +1 -0
  218. package/dist/dev/index.js +3 -0
  219. package/dist/dev/index.js.map +1 -0
  220. package/dist/dev/inspector-overlay/browser-control-registry.d.ts +10 -0
  221. package/dist/dev/inspector-overlay/browser-control-registry.d.ts.map +1 -0
  222. package/dist/dev/inspector-overlay/browser-control-registry.js +188 -0
  223. package/dist/dev/inspector-overlay/browser-control-registry.js.map +1 -0
  224. package/dist/dev/inspector-overlay/embedded/assets/create-legacy-browser-delegate-X_T_QKCN.js +1 -0
  225. package/dist/dev/inspector-overlay/embedded/assets/esm-7mP3GQX4.js +1 -0
  226. package/dist/dev/inspector-overlay/embedded/assets/esm-BX6IY2Mv.js +1 -0
  227. package/dist/dev/inspector-overlay/embedded/assets/esm-CH5eVyQQ.js +1 -0
  228. package/dist/dev/inspector-overlay/embedded/assets/esm-aRzpnC3u.js +1 -0
  229. package/dist/dev/inspector-overlay/embedded/assets/esm-ezD5H765.js +1 -0
  230. package/dist/dev/inspector-overlay/embedded/assets/esm-k3rsq4Gn.js +1 -0
  231. package/dist/dev/inspector-overlay/embedded/assets/index-C-btvLcw.js +20 -0
  232. package/dist/dev/inspector-overlay/embedded/assets/index-C78Pprka.css +1 -0
  233. package/dist/dev/inspector-overlay/embedded/assets/jazz-broker-worker-CAMcDeUa.js +3 -0
  234. package/dist/dev/inspector-overlay/embedded/assets/jazz-broker-worker-XRRxJUcx.js +23997 -0
  235. package/dist/dev/inspector-overlay/embedded/assets/jazz_wasm-Cc71x_6y.js +1 -0
  236. package/dist/dev/inspector-overlay/embedded/assets/jazz_wasm_bg-KR7h3v27.wasm +0 -0
  237. package/dist/dev/inspector-overlay/embedded/assets/node-foreground-node-lease.browser-Bm3gYjlT.js +1 -0
  238. package/dist/dev/inspector-overlay/embedded/assets/trace-api-B5CaetI0.js +1 -0
  239. package/dist/dev/inspector-overlay/embedded/embedded.html +13 -0
  240. package/dist/dev/inspector-overlay/embedded/favicon.ico +0 -0
  241. package/dist/dev/inspector-overlay/host-bridge.d.ts +8 -0
  242. package/dist/dev/inspector-overlay/host-bridge.d.ts.map +1 -0
  243. package/dist/dev/inspector-overlay/host-bridge.js +136 -0
  244. package/dist/dev/inspector-overlay/host-bridge.js.map +1 -0
  245. package/dist/dev/inspector-overlay/inspector-host-types.d.ts +35 -0
  246. package/dist/dev/inspector-overlay/inspector-host-types.d.ts.map +1 -0
  247. package/dist/dev/inspector-overlay/inspector-host-types.js +10 -0
  248. package/dist/dev/inspector-overlay/inspector-host-types.js.map +1 -0
  249. package/dist/dev/inspector-overlay/loader.d.ts +13 -0
  250. package/dist/dev/inspector-overlay/loader.d.ts.map +1 -0
  251. package/dist/dev/inspector-overlay/loader.js +506 -0
  252. package/dist/dev/inspector-overlay/loader.js.map +1 -0
  253. package/dist/dev/inspector-overlay/serve.d.ts +46 -0
  254. package/dist/dev/inspector-overlay/serve.d.ts.map +1 -0
  255. package/dist/dev/inspector-overlay/serve.js +131 -0
  256. package/dist/dev/inspector-overlay/serve.js.map +1 -0
  257. package/dist/dev/legacy-schema-hash.d.ts +4 -0
  258. package/dist/dev/legacy-schema-hash.d.ts.map +1 -0
  259. package/dist/dev/legacy-schema-hash.js +12 -0
  260. package/dist/dev/legacy-schema-hash.js.map +1 -0
  261. package/dist/dev/migration-graph.d.ts +32 -0
  262. package/dist/dev/migration-graph.d.ts.map +1 -0
  263. package/dist/dev/migration-graph.js +136 -0
  264. package/dist/dev/migration-graph.js.map +1 -0
  265. package/dist/dev/migrations.d.ts +14 -0
  266. package/dist/dev/migrations.d.ts.map +1 -0
  267. package/dist/dev/migrations.js +441 -0
  268. package/dist/dev/migrations.js.map +1 -0
  269. package/dist/dev/schema-utils.d.ts +18 -0
  270. package/dist/dev/schema-utils.d.ts.map +1 -0
  271. package/dist/dev/schema-utils.js +365 -0
  272. package/dist/dev/schema-utils.js.map +1 -0
  273. package/dist/dev/schema-validation.d.ts +5 -0
  274. package/dist/dev/schema-validation.d.ts.map +1 -0
  275. package/dist/dev/schema-validation.js +11 -0
  276. package/dist/dev/schema-validation.js.map +1 -0
  277. package/dist/dev-tools/auto-attach.d.ts +11 -0
  278. package/dist/dev-tools/auto-attach.d.ts.map +1 -0
  279. package/dist/dev-tools/auto-attach.js +26 -0
  280. package/dist/dev-tools/auto-attach.js.map +1 -0
  281. package/dist/drivers/index.d.ts +1 -1
  282. package/dist/drivers/index.d.ts.map +1 -1
  283. package/dist/drivers/index.js.map +1 -1
  284. package/dist/drivers/schema-wire.d.ts +18 -0
  285. package/dist/drivers/schema-wire.d.ts.map +1 -0
  286. package/dist/drivers/schema-wire.js +66 -0
  287. package/dist/drivers/schema-wire.js.map +1 -0
  288. package/dist/drivers/types.d.ts +322 -45
  289. package/dist/drivers/types.d.ts.map +1 -1
  290. package/dist/drivers/types.js +5 -4
  291. package/dist/drivers/types.js.map +1 -1
  292. package/dist/dsl.d.ts +291 -101
  293. package/dist/dsl.d.ts.map +1 -1
  294. package/dist/dsl.js +244 -113
  295. package/dist/dsl.js.map +1 -1
  296. package/dist/e2ee/SODIUM-LICENSE.txt +36 -0
  297. package/dist/e2ee/SODIUM-SOURCES.json +4 -0
  298. package/dist/e2ee/browser.d.ts +18 -0
  299. package/dist/e2ee/browser.d.ts.map +1 -0
  300. package/dist/e2ee/browser.js +111 -0
  301. package/dist/e2ee/browser.js.map +1 -0
  302. package/dist/e2ee/context.d.ts +23 -0
  303. package/dist/e2ee/context.d.ts.map +1 -0
  304. package/dist/e2ee/context.js +49 -0
  305. package/dist/e2ee/context.js.map +1 -0
  306. package/dist/e2ee/crypto.d.ts +10 -0
  307. package/dist/e2ee/crypto.d.ts.map +1 -0
  308. package/dist/e2ee/crypto.js +22 -0
  309. package/dist/e2ee/crypto.js.map +1 -0
  310. package/dist/e2ee/envelope.d.ts +22 -0
  311. package/dist/e2ee/envelope.d.ts.map +1 -0
  312. package/dist/e2ee/envelope.js +52 -0
  313. package/dist/e2ee/envelope.js.map +1 -0
  314. package/dist/e2ee/index.d.ts +14 -0
  315. package/dist/e2ee/index.d.ts.map +1 -0
  316. package/dist/e2ee/index.js +3 -0
  317. package/dist/e2ee/index.js.map +1 -0
  318. package/dist/e2ee/large-value.d.ts +20 -0
  319. package/dist/e2ee/large-value.d.ts.map +1 -0
  320. package/dist/e2ee/large-value.js +204 -0
  321. package/dist/e2ee/large-value.js.map +1 -0
  322. package/dist/e2ee/native.d.ts +18 -0
  323. package/dist/e2ee/native.d.ts.map +1 -0
  324. package/dist/e2ee/native.js +91 -0
  325. package/dist/e2ee/native.js.map +1 -0
  326. package/dist/e2ee/record-frame.d.ts +3 -0
  327. package/dist/e2ee/record-frame.d.ts.map +1 -0
  328. package/dist/e2ee/record-frame.js +18 -0
  329. package/dist/e2ee/record-frame.js.map +1 -0
  330. package/dist/e2ee/signer.d.ts +10 -0
  331. package/dist/e2ee/signer.d.ts.map +1 -0
  332. package/dist/e2ee/signer.js +54 -0
  333. package/dist/e2ee/signer.js.map +1 -0
  334. package/dist/e2ee/sodium-browser.d.ts +2 -0
  335. package/dist/e2ee/sodium-browser.d.ts.map +1 -0
  336. package/dist/e2ee/sodium-browser.js +3432 -0
  337. package/dist/e2ee/sodium.d.ts +20 -0
  338. package/dist/e2ee/sodium.d.ts.map +1 -0
  339. package/dist/e2ee/sodium.js +165 -0
  340. package/dist/e2ee/sodium.js.map +1 -0
  341. package/dist/e2ee/types.d.ts +92 -0
  342. package/dist/e2ee/types.d.ts.map +1 -0
  343. package/dist/e2ee/types.js +2 -0
  344. package/dist/e2ee/types.js.map +1 -0
  345. package/dist/effect/backend/index.d.ts +8 -0
  346. package/dist/effect/backend/index.d.ts.map +1 -0
  347. package/dist/effect/backend/index.js +8 -0
  348. package/dist/effect/backend/index.js.map +1 -0
  349. package/dist/effect/errors.d.ts +53 -0
  350. package/dist/effect/errors.d.ts.map +1 -0
  351. package/dist/effect/errors.js +61 -0
  352. package/dist/effect/errors.js.map +1 -0
  353. package/dist/effect/index.d.ts +9 -0
  354. package/dist/effect/index.d.ts.map +1 -0
  355. package/dist/effect/index.js +9 -0
  356. package/dist/effect/index.js.map +1 -0
  357. package/dist/effect/jazz-backend.d.ts +69 -0
  358. package/dist/effect/jazz-backend.d.ts.map +1 -0
  359. package/dist/effect/jazz-backend.js +92 -0
  360. package/dist/effect/jazz-backend.js.map +1 -0
  361. package/dist/effect/jazz.d.ts +122 -0
  362. package/dist/effect/jazz.d.ts.map +1 -0
  363. package/dist/effect/jazz.js +159 -0
  364. package/dist/effect/jazz.js.map +1 -0
  365. package/dist/expo/auth-secret-store.d.ts +37 -0
  366. package/dist/expo/auth-secret-store.d.ts.map +1 -0
  367. package/dist/expo/auth-secret-store.js +139 -0
  368. package/dist/expo/auth-secret-store.js.map +1 -0
  369. package/dist/expo/create-account-manager.d.ts +28 -0
  370. package/dist/expo/create-account-manager.d.ts.map +1 -0
  371. package/dist/expo/create-account-manager.js +35 -0
  372. package/dist/expo/create-account-manager.js.map +1 -0
  373. package/dist/expo/create-jazz-session.d.ts +35 -0
  374. package/dist/expo/create-jazz-session.d.ts.map +1 -0
  375. package/dist/expo/create-jazz-session.js +39 -0
  376. package/dist/expo/create-jazz-session.js.map +1 -0
  377. package/dist/expo/index.d.ts +16 -0
  378. package/dist/expo/index.d.ts.map +1 -0
  379. package/dist/expo/index.js +14 -0
  380. package/dist/expo/index.js.map +1 -0
  381. package/dist/expo/polyfills.d.ts +2 -0
  382. package/dist/expo/polyfills.d.ts.map +1 -0
  383. package/dist/expo/polyfills.js +5 -0
  384. package/dist/expo/polyfills.js.map +1 -0
  385. package/dist/expo/provider.d.ts +7 -0
  386. package/dist/expo/provider.d.ts.map +1 -0
  387. package/dist/expo/provider.js +10 -0
  388. package/dist/expo/provider.js.map +1 -0
  389. package/dist/expo/session.d.ts +10 -0
  390. package/dist/expo/session.d.ts.map +1 -0
  391. package/dist/expo/session.js +5 -0
  392. package/dist/expo/session.js.map +1 -0
  393. package/dist/expo/use-local-first-auth.d.ts +12 -0
  394. package/dist/expo/use-local-first-auth.d.ts.map +1 -0
  395. package/dist/expo/use-local-first-auth.js +13 -0
  396. package/dist/expo/use-local-first-auth.js.map +1 -0
  397. package/dist/index.d.ts +24 -7
  398. package/dist/index.d.ts.map +1 -1
  399. package/dist/index.js +19 -8
  400. package/dist/index.js.map +1 -1
  401. package/dist/internal/inspector-query.d.ts +6 -0
  402. package/dist/internal/inspector-query.d.ts.map +1 -0
  403. package/dist/internal/inspector-query.js +20 -0
  404. package/dist/internal/inspector-query.js.map +1 -0
  405. package/dist/ir.d.ts +139 -115
  406. package/dist/ir.d.ts.map +1 -1
  407. package/dist/ir.js +496 -1
  408. package/dist/ir.js.map +1 -1
  409. package/dist/local-first/index.d.ts +16 -0
  410. package/dist/local-first/index.d.ts.map +1 -0
  411. package/dist/local-first/index.js +15 -0
  412. package/dist/local-first/index.js.map +1 -0
  413. package/dist/local-first-auth/browser.d.ts +18 -0
  414. package/dist/local-first-auth/browser.d.ts.map +1 -0
  415. package/dist/local-first-auth/browser.js +26 -0
  416. package/dist/local-first-auth/browser.js.map +1 -0
  417. package/dist/local-first-auth/encoding.d.ts +10 -0
  418. package/dist/local-first-auth/encoding.d.ts.map +1 -0
  419. package/dist/local-first-auth/encoding.js +38 -0
  420. package/dist/local-first-auth/encoding.js.map +1 -0
  421. package/dist/local-first-auth/identity.d.ts +73 -0
  422. package/dist/local-first-auth/identity.d.ts.map +1 -0
  423. package/dist/local-first-auth/identity.js +258 -0
  424. package/dist/local-first-auth/identity.js.map +1 -0
  425. package/dist/local-first-auth/index.d.ts +6 -0
  426. package/dist/local-first-auth/index.d.ts.map +1 -0
  427. package/dist/local-first-auth/index.js +4 -0
  428. package/dist/local-first-auth/index.js.map +1 -0
  429. package/dist/local-first-auth/passkey.d.ts +22 -0
  430. package/dist/local-first-auth/passkey.d.ts.map +1 -0
  431. package/dist/local-first-auth/passkey.js +116 -0
  432. package/dist/local-first-auth/passkey.js.map +1 -0
  433. package/dist/local-first-auth/recovery-phrase.d.ts +10 -0
  434. package/dist/local-first-auth/recovery-phrase.d.ts.map +1 -0
  435. package/dist/local-first-auth/recovery-phrase.js +59 -0
  436. package/dist/local-first-auth/recovery-phrase.js.map +1 -0
  437. package/dist/local-first-auth/secret.d.ts +25 -0
  438. package/dist/local-first-auth/secret.d.ts.map +1 -0
  439. package/dist/local-first-auth/secret.js +68 -0
  440. package/dist/local-first-auth/secret.js.map +1 -0
  441. package/dist/local-first-auth/server.d.ts +13 -0
  442. package/dist/local-first-auth/server.d.ts.map +1 -0
  443. package/dist/local-first-auth/server.js +32 -0
  444. package/dist/local-first-auth/server.js.map +1 -0
  445. package/dist/local-first-auth/store.d.ts +51 -0
  446. package/dist/local-first-auth/store.d.ts.map +1 -0
  447. package/dist/local-first-auth/store.js +112 -0
  448. package/dist/local-first-auth/store.js.map +1 -0
  449. package/dist/magic-columns.d.ts +34 -0
  450. package/dist/magic-columns.d.ts.map +1 -0
  451. package/dist/magic-columns.js +86 -0
  452. package/dist/magic-columns.js.map +1 -0
  453. package/dist/migration-namespace.d.ts +8 -0
  454. package/dist/migration-namespace.d.ts.map +1 -0
  455. package/dist/migration-namespace.js +9 -0
  456. package/dist/migration-namespace.js.map +1 -0
  457. package/dist/migrations.d.ts +229 -0
  458. package/dist/migrations.d.ts.map +1 -0
  459. package/dist/migrations.js +383 -0
  460. package/dist/migrations.js.map +1 -0
  461. package/dist/observed-jazz-client.d.ts +15 -0
  462. package/dist/observed-jazz-client.d.ts.map +1 -0
  463. package/dist/observed-jazz-client.js +38 -0
  464. package/dist/observed-jazz-client.js.map +1 -0
  465. package/dist/passkey-backup.d.ts +3 -0
  466. package/dist/passkey-backup.d.ts.map +1 -0
  467. package/dist/passkey-backup.js +2 -0
  468. package/dist/passkey-backup.js.map +1 -0
  469. package/dist/passphrase.d.ts +2 -0
  470. package/dist/passphrase.d.ts.map +1 -0
  471. package/dist/passphrase.js +2 -0
  472. package/dist/passphrase.js.map +1 -0
  473. package/dist/permissions/index.d.ts +149 -41
  474. package/dist/permissions/index.d.ts.map +1 -1
  475. package/dist/permissions/index.js +1209 -423
  476. package/dist/permissions/index.js.map +1 -1
  477. package/dist/policy-expr-map.d.ts +15 -0
  478. package/dist/policy-expr-map.d.ts.map +1 -0
  479. package/dist/policy-expr-map.js +45 -0
  480. package/dist/policy-expr-map.js.map +1 -0
  481. package/dist/prosemirror/anchors.d.ts +30 -0
  482. package/dist/prosemirror/anchors.d.ts.map +1 -0
  483. package/dist/prosemirror/anchors.js +28 -0
  484. package/dist/prosemirror/anchors.js.map +1 -0
  485. package/dist/prosemirror/index.d.ts +7 -0
  486. package/dist/prosemirror/index.d.ts.map +1 -0
  487. package/dist/prosemirror/index.js +7 -0
  488. package/dist/prosemirror/index.js.map +1 -0
  489. package/dist/prosemirror/markdown.d.ts +95 -0
  490. package/dist/prosemirror/markdown.d.ts.map +1 -0
  491. package/dist/prosemirror/markdown.js +428 -0
  492. package/dist/prosemirror/markdown.js.map +1 -0
  493. package/dist/prosemirror/overlays.d.ts +69 -0
  494. package/dist/prosemirror/overlays.d.ts.map +1 -0
  495. package/dist/prosemirror/overlays.js +143 -0
  496. package/dist/prosemirror/overlays.js.map +1 -0
  497. package/dist/prosemirror/presence.d.ts +39 -0
  498. package/dist/prosemirror/presence.d.ts.map +1 -0
  499. package/dist/prosemirror/presence.js +88 -0
  500. package/dist/prosemirror/presence.js.map +1 -0
  501. package/dist/prosemirror/sync.d.ts +60 -0
  502. package/dist/prosemirror/sync.d.ts.map +1 -0
  503. package/dist/prosemirror/sync.js +174 -0
  504. package/dist/prosemirror/sync.js.map +1 -0
  505. package/dist/prosemirror/text-map.d.ts +21 -0
  506. package/dist/prosemirror/text-map.d.ts.map +1 -0
  507. package/dist/prosemirror/text-map.js +85 -0
  508. package/dist/prosemirror/text-map.js.map +1 -0
  509. package/dist/provenance-guidance.d.ts +3 -0
  510. package/dist/provenance-guidance.d.ts.map +1 -0
  511. package/dist/provenance-guidance.js +19 -0
  512. package/dist/provenance-guidance.js.map +1 -0
  513. package/dist/react/create-jazz-client.d.ts +2 -10
  514. package/dist/react/create-jazz-client.d.ts.map +1 -1
  515. package/dist/react/create-jazz-client.js +1 -25
  516. package/dist/react/create-jazz-client.js.map +1 -1
  517. package/dist/react/devtools-auto-attach.d.ts +2 -0
  518. package/dist/react/devtools-auto-attach.d.ts.map +1 -0
  519. package/dist/react/devtools-auto-attach.js +11 -0
  520. package/dist/react/devtools-auto-attach.js.map +1 -0
  521. package/dist/react/index.d.ts +20 -6
  522. package/dist/react/index.d.ts.map +1 -1
  523. package/dist/react/index.js +12 -5
  524. package/dist/react/index.js.map +1 -1
  525. package/dist/react/provider.d.ts +23 -11
  526. package/dist/react/provider.d.ts.map +1 -1
  527. package/dist/react/provider.js +43 -3
  528. package/dist/react/provider.js.map +1 -1
  529. package/dist/react/session.d.ts +18 -0
  530. package/dist/react/session.d.ts.map +1 -0
  531. package/dist/react/session.js +28 -0
  532. package/dist/react/session.js.map +1 -0
  533. package/dist/react/use-all.d.ts +1 -1
  534. package/dist/react/use-all.d.ts.map +1 -1
  535. package/dist/react/use-all.js +1 -1
  536. package/dist/react/use-all.js.map +1 -1
  537. package/dist/react/use-local-first-auth.d.ts +11 -0
  538. package/dist/react/use-local-first-auth.d.ts.map +1 -0
  539. package/dist/react/use-local-first-auth.js +13 -0
  540. package/dist/react/use-local-first-auth.js.map +1 -0
  541. package/dist/react/use-one.d.ts +2 -0
  542. package/dist/react/use-one.d.ts.map +1 -0
  543. package/dist/react/use-one.js +2 -0
  544. package/dist/react/use-one.js.map +1 -0
  545. package/dist/react-core/app.d.ts +31 -0
  546. package/dist/react-core/app.d.ts.map +1 -0
  547. package/dist/react-core/app.js +65 -0
  548. package/dist/react-core/app.js.map +1 -0
  549. package/dist/react-core/index.d.ts +11 -4
  550. package/dist/react-core/index.d.ts.map +1 -1
  551. package/dist/react-core/index.js +8 -2
  552. package/dist/react-core/index.js.map +1 -1
  553. package/dist/react-core/provider.d.ts +44 -12
  554. package/dist/react-core/provider.d.ts.map +1 -1
  555. package/dist/react-core/provider.js +110 -10
  556. package/dist/react-core/provider.js.map +1 -1
  557. package/dist/react-core/session.d.ts +45 -0
  558. package/dist/react-core/session.d.ts.map +1 -0
  559. package/dist/react-core/session.js +130 -0
  560. package/dist/react-core/session.js.map +1 -0
  561. package/dist/react-core/use-account-state.d.ts +4 -0
  562. package/dist/react-core/use-account-state.d.ts.map +1 -0
  563. package/dist/react-core/use-account-state.js +6 -0
  564. package/dist/react-core/use-account-state.js.map +1 -0
  565. package/dist/react-core/use-all.d.ts +95 -3
  566. package/dist/react-core/use-all.d.ts.map +1 -1
  567. package/dist/react-core/use-all.js +126 -52
  568. package/dist/react-core/use-all.js.map +1 -1
  569. package/dist/react-core/use-auth-state.d.ts +13 -0
  570. package/dist/react-core/use-auth-state.d.ts.map +1 -0
  571. package/dist/react-core/use-auth-state.js +15 -0
  572. package/dist/react-core/use-auth-state.js.map +1 -0
  573. package/dist/react-core/use-local-first-auth.d.ts +12 -0
  574. package/dist/react-core/use-local-first-auth.d.ts.map +1 -0
  575. package/dist/react-core/use-local-first-auth.js +14 -0
  576. package/dist/react-core/use-local-first-auth.js.map +1 -0
  577. package/dist/react-core/use-one.d.ts +58 -0
  578. package/dist/react-core/use-one.d.ts.map +1 -0
  579. package/dist/react-core/use-one.js +19 -0
  580. package/dist/react-core/use-one.js.map +1 -0
  581. package/dist/react-core/use-sync-status.d.ts +8 -0
  582. package/dist/react-core/use-sync-status.d.ts.map +1 -0
  583. package/dist/react-core/use-sync-status.js +12 -0
  584. package/dist/react-core/use-sync-status.js.map +1 -0
  585. package/dist/react-native/abort-signal.d.ts +9 -0
  586. package/dist/react-native/abort-signal.d.ts.map +1 -0
  587. package/dist/react-native/abort-signal.js +51 -0
  588. package/dist/react-native/abort-signal.js.map +1 -0
  589. package/dist/react-native/account-session.d.ts +11 -0
  590. package/dist/react-native/account-session.d.ts.map +1 -0
  591. package/dist/react-native/account-session.js +59 -0
  592. package/dist/react-native/account-session.js.map +1 -0
  593. package/dist/react-native/create-account-manager.d.ts +28 -0
  594. package/dist/react-native/create-account-manager.d.ts.map +1 -0
  595. package/dist/react-native/create-account-manager.js +30 -0
  596. package/dist/react-native/create-account-manager.js.map +1 -0
  597. package/dist/react-native/create-db.d.ts +8 -0
  598. package/dist/react-native/create-db.d.ts.map +1 -0
  599. package/dist/react-native/create-db.js +9 -0
  600. package/dist/react-native/create-db.js.map +1 -0
  601. package/dist/react-native/create-jazz-client.d.ts +12 -10
  602. package/dist/react-native/create-jazz-client.d.ts.map +1 -1
  603. package/dist/react-native/create-jazz-client.js +6 -21
  604. package/dist/react-native/create-jazz-client.js.map +1 -1
  605. package/dist/react-native/create-jazz-session.d.ts +35 -0
  606. package/dist/react-native/create-jazz-session.d.ts.map +1 -0
  607. package/dist/react-native/create-jazz-session.js +39 -0
  608. package/dist/react-native/create-jazz-session.js.map +1 -0
  609. package/dist/react-native/errors.d.ts +6 -0
  610. package/dist/react-native/errors.d.ts.map +1 -0
  611. package/dist/react-native/errors.js +6 -0
  612. package/dist/react-native/errors.js.map +1 -0
  613. package/dist/react-native/index.d.ts +25 -9
  614. package/dist/react-native/index.d.ts.map +1 -1
  615. package/dist/react-native/index.js +17 -7
  616. package/dist/react-native/index.js.map +1 -1
  617. package/dist/react-native/native-foreground-db.d.ts +192 -0
  618. package/dist/react-native/native-foreground-db.d.ts.map +1 -0
  619. package/dist/react-native/native-foreground-db.js +801 -0
  620. package/dist/react-native/native-foreground-db.js.map +1 -0
  621. package/dist/react-native/native-relay.d.ts +7 -0
  622. package/dist/react-native/native-relay.d.ts.map +1 -0
  623. package/dist/react-native/native-relay.js +14 -0
  624. package/dist/react-native/native-relay.js.map +1 -0
  625. package/dist/react-native/provider.d.ts +23 -10
  626. package/dist/react-native/provider.d.ts.map +1 -1
  627. package/dist/react-native/provider.js +23 -3
  628. package/dist/react-native/provider.js.map +1 -1
  629. package/dist/react-native/runtime-source.d.ts +40 -0
  630. package/dist/react-native/runtime-source.d.ts.map +1 -0
  631. package/dist/react-native/runtime-source.js +250 -0
  632. package/dist/react-native/runtime-source.js.map +1 -0
  633. package/dist/react-native/session.d.ts +10 -0
  634. package/dist/react-native/session.d.ts.map +1 -0
  635. package/dist/react-native/session.js +5 -0
  636. package/dist/react-native/session.js.map +1 -0
  637. package/dist/react-native/use-all.d.ts +1 -1
  638. package/dist/react-native/use-all.d.ts.map +1 -1
  639. package/dist/react-native/use-all.js +1 -1
  640. package/dist/react-native/use-all.js.map +1 -1
  641. package/dist/react-native/use-local-first-auth.d.ts +15 -0
  642. package/dist/react-native/use-local-first-auth.d.ts.map +1 -0
  643. package/dist/react-native/use-local-first-auth.js +14 -0
  644. package/dist/react-native/use-local-first-auth.js.map +1 -0
  645. package/dist/react-native/use-one.d.ts +2 -0
  646. package/dist/react-native/use-one.d.ts.map +1 -0
  647. package/dist/react-native/use-one.js +2 -0
  648. package/dist/react-native/use-one.js.map +1 -0
  649. package/dist/reconcile-array.d.ts +45 -0
  650. package/dist/reconcile-array.d.ts.map +1 -0
  651. package/dist/reconcile-array.js +252 -0
  652. package/dist/reconcile-array.js.map +1 -0
  653. package/dist/relationships.d.ts +18 -0
  654. package/dist/relationships.d.ts.map +1 -0
  655. package/dist/relationships.js +28 -0
  656. package/dist/relationships.js.map +1 -0
  657. package/dist/runtime/anonymous-write-denied-error.d.ts +13 -0
  658. package/dist/runtime/anonymous-write-denied-error.d.ts.map +1 -0
  659. package/dist/runtime/anonymous-write-denied-error.js +58 -0
  660. package/dist/runtime/anonymous-write-denied-error.js.map +1 -0
  661. package/dist/runtime/auth-renewal-backoff.d.ts +14 -0
  662. package/dist/runtime/auth-renewal-backoff.d.ts.map +1 -0
  663. package/dist/runtime/auth-renewal-backoff.js +23 -0
  664. package/dist/runtime/auth-renewal-backoff.js.map +1 -0
  665. package/dist/runtime/auth-request-deadline.d.ts +3 -0
  666. package/dist/runtime/auth-request-deadline.d.ts.map +1 -0
  667. package/dist/runtime/auth-request-deadline.js +24 -0
  668. package/dist/runtime/auth-request-deadline.js.map +1 -0
  669. package/dist/runtime/auth-secret-codec.d.ts +21 -0
  670. package/dist/runtime/auth-secret-codec.d.ts.map +1 -0
  671. package/dist/runtime/auth-secret-codec.js +32 -0
  672. package/dist/runtime/auth-secret-codec.js.map +1 -0
  673. package/dist/runtime/auth-secret-store.d.ts +51 -0
  674. package/dist/runtime/auth-secret-store.d.ts.map +1 -0
  675. package/dist/runtime/auth-secret-store.js +114 -0
  676. package/dist/runtime/auth-secret-store.js.map +1 -0
  677. package/dist/runtime/auth-state.d.ts +40 -0
  678. package/dist/runtime/auth-state.d.ts.map +1 -0
  679. package/dist/runtime/auth-state.js +145 -0
  680. package/dist/runtime/auth-state.js.map +1 -0
  681. package/dist/runtime/author-id.d.ts +42 -0
  682. package/dist/runtime/author-id.d.ts.map +1 -0
  683. package/dist/runtime/author-id.js +172 -0
  684. package/dist/runtime/author-id.js.map +1 -0
  685. package/dist/runtime/authority-changed-error.d.ts +54 -0
  686. package/dist/runtime/authority-changed-error.d.ts.map +1 -0
  687. package/dist/runtime/authority-changed-error.js +72 -0
  688. package/dist/runtime/authority-changed-error.js.map +1 -0
  689. package/dist/runtime/browser-physical-database-epoch.d.ts +37 -0
  690. package/dist/runtime/browser-physical-database-epoch.d.ts.map +1 -0
  691. package/dist/runtime/browser-physical-database-epoch.js +89 -0
  692. package/dist/runtime/browser-physical-database-epoch.js.map +1 -0
  693. package/dist/runtime/browser-storage-invalidation.d.ts +8 -0
  694. package/dist/runtime/browser-storage-invalidation.d.ts.map +1 -0
  695. package/dist/runtime/browser-storage-invalidation.js +20 -0
  696. package/dist/runtime/browser-storage-invalidation.js.map +1 -0
  697. package/dist/runtime/browser-worker-assets.d.ts +4 -0
  698. package/dist/runtime/browser-worker-assets.d.ts.map +1 -0
  699. package/dist/runtime/browser-worker-assets.js +8 -0
  700. package/dist/runtime/browser-worker-assets.js.map +1 -0
  701. package/dist/runtime/browser-worker-assets.native.d.ts +5 -0
  702. package/dist/runtime/browser-worker-assets.native.d.ts.map +1 -0
  703. package/dist/runtime/browser-worker-assets.native.js +6 -0
  704. package/dist/runtime/browser-worker-assets.native.js.map +1 -0
  705. package/dist/runtime/browser-worker-config.d.ts +55 -0
  706. package/dist/runtime/browser-worker-config.d.ts.map +1 -0
  707. package/dist/runtime/browser-worker-config.js +222 -0
  708. package/dist/runtime/browser-worker-config.js.map +1 -0
  709. package/dist/runtime/client-config-key.d.ts +6 -0
  710. package/dist/runtime/client-config-key.d.ts.map +1 -0
  711. package/dist/runtime/client-config-key.js +83 -0
  712. package/dist/runtime/client-config-key.js.map +1 -0
  713. package/dist/runtime/client-migrations.d.ts +33 -0
  714. package/dist/runtime/client-migrations.d.ts.map +1 -0
  715. package/dist/runtime/client-migrations.js +30 -0
  716. package/dist/runtime/client-migrations.js.map +1 -0
  717. package/dist/runtime/client-registry.d.ts +21 -0
  718. package/dist/runtime/client-registry.d.ts.map +1 -0
  719. package/dist/runtime/client-registry.js +169 -0
  720. package/dist/runtime/client-registry.js.map +1 -0
  721. package/dist/runtime/client-scope.d.ts +38 -0
  722. package/dist/runtime/client-scope.d.ts.map +1 -0
  723. package/dist/runtime/client-scope.js +64 -0
  724. package/dist/runtime/client-scope.js.map +1 -0
  725. package/dist/runtime/client-session.d.ts +56 -13
  726. package/dist/runtime/client-session.d.ts.map +1 -1
  727. package/dist/runtime/client-session.js +212 -196
  728. package/dist/runtime/client-session.js.map +1 -1
  729. package/dist/runtime/client.d.ts +624 -191
  730. package/dist/runtime/client.d.ts.map +1 -1
  731. package/dist/runtime/client.js +1105 -425
  732. package/dist/runtime/client.js.map +1 -1
  733. package/dist/runtime/column-transforms.d.ts +40 -0
  734. package/dist/runtime/column-transforms.d.ts.map +1 -0
  735. package/dist/runtime/column-transforms.js +279 -0
  736. package/dist/runtime/column-transforms.js.map +1 -0
  737. package/dist/runtime/connection-manager/browser-connection-manager.d.ts +119 -0
  738. package/dist/runtime/connection-manager/browser-connection-manager.d.ts.map +1 -0
  739. package/dist/runtime/connection-manager/browser-connection-manager.js +836 -0
  740. package/dist/runtime/connection-manager/browser-connection-manager.js.map +1 -0
  741. package/dist/runtime/connection-manager/direct-connection-manager.d.ts +26 -0
  742. package/dist/runtime/connection-manager/direct-connection-manager.d.ts.map +1 -0
  743. package/dist/runtime/connection-manager/direct-connection-manager.js +198 -0
  744. package/dist/runtime/connection-manager/direct-connection-manager.js.map +1 -0
  745. package/dist/runtime/connection-manager/index.d.ts +5 -0
  746. package/dist/runtime/connection-manager/index.d.ts.map +1 -0
  747. package/dist/runtime/connection-manager/index.js +4 -0
  748. package/dist/runtime/connection-manager/index.js.map +1 -0
  749. package/dist/runtime/connection-manager/types.d.ts +136 -0
  750. package/dist/runtime/connection-manager/types.d.ts.map +1 -0
  751. package/dist/runtime/connection-manager/types.js +340 -0
  752. package/dist/runtime/connection-manager/types.js.map +1 -0
  753. package/dist/runtime/context.d.ts +90 -30
  754. package/dist/runtime/context.d.ts.map +1 -1
  755. package/dist/runtime/context.js.map +1 -1
  756. package/dist/runtime/credentialed-transport.d.ts +27 -0
  757. package/dist/runtime/credentialed-transport.d.ts.map +1 -0
  758. package/dist/runtime/credentialed-transport.js +155 -0
  759. package/dist/runtime/credentialed-transport.js.map +1 -0
  760. package/dist/runtime/db-access-context.d.ts +14 -0
  761. package/dist/runtime/db-access-context.d.ts.map +1 -0
  762. package/dist/runtime/db-access-context.js +26 -0
  763. package/dist/runtime/db-access-context.js.map +1 -0
  764. package/dist/runtime/db-internal-session.d.ts +7 -0
  765. package/dist/runtime/db-internal-session.d.ts.map +1 -0
  766. package/dist/runtime/db-internal-session.js +21 -0
  767. package/dist/runtime/db-internal-session.js.map +1 -0
  768. package/dist/runtime/db-replaced-error.d.ts +19 -0
  769. package/dist/runtime/db-replaced-error.d.ts.map +1 -0
  770. package/dist/runtime/db-replaced-error.js +20 -0
  771. package/dist/runtime/db-replaced-error.js.map +1 -0
  772. package/dist/runtime/db.d.ts +735 -201
  773. package/dist/runtime/db.d.ts.map +1 -1
  774. package/dist/runtime/db.js +3287 -727
  775. package/dist/runtime/db.js.map +1 -1
  776. package/dist/runtime/default-create-db.d.ts +5 -0
  777. package/dist/runtime/default-create-db.d.ts.map +1 -0
  778. package/dist/runtime/default-create-db.js +7 -0
  779. package/dist/runtime/default-create-db.js.map +1 -0
  780. package/dist/runtime/default-runtime-source.d.ts +41 -0
  781. package/dist/runtime/default-runtime-source.d.ts.map +1 -0
  782. package/dist/runtime/default-runtime-source.js +315 -0
  783. package/dist/runtime/default-runtime-source.js.map +1 -0
  784. package/dist/runtime/deterministic-bytes.d.ts +6 -0
  785. package/dist/runtime/deterministic-bytes.d.ts.map +1 -0
  786. package/dist/runtime/deterministic-bytes.js +18 -0
  787. package/dist/runtime/deterministic-bytes.js.map +1 -0
  788. package/dist/runtime/graceful-shutdown-error.d.ts +9 -0
  789. package/dist/runtime/graceful-shutdown-error.d.ts.map +1 -0
  790. package/dist/runtime/graceful-shutdown-error.js +17 -0
  791. package/dist/runtime/graceful-shutdown-error.js.map +1 -0
  792. package/dist/runtime/hex.d.ts +17 -0
  793. package/dist/runtime/hex.d.ts.map +1 -0
  794. package/dist/runtime/hex.js +56 -0
  795. package/dist/runtime/hex.js.map +1 -0
  796. package/dist/runtime/history-relation.d.ts +8 -0
  797. package/dist/runtime/history-relation.d.ts.map +1 -0
  798. package/dist/runtime/history-relation.js +44 -0
  799. package/dist/runtime/history-relation.js.map +1 -0
  800. package/dist/runtime/in-process-transport.d.ts +18 -0
  801. package/dist/runtime/in-process-transport.d.ts.map +1 -0
  802. package/dist/runtime/in-process-transport.js +32 -0
  803. package/dist/runtime/in-process-transport.js.map +1 -0
  804. package/dist/runtime/index.d.ts +22 -11
  805. package/dist/runtime/index.d.ts.map +1 -1
  806. package/dist/runtime/index.js +14 -10
  807. package/dist/runtime/index.js.map +1 -1
  808. package/dist/runtime/indexeddb-page-store.d.ts +214 -0
  809. package/dist/runtime/indexeddb-page-store.d.ts.map +1 -0
  810. package/dist/runtime/indexeddb-page-store.js +848 -0
  811. package/dist/runtime/indexeddb-page-store.js.map +1 -0
  812. package/dist/runtime/introspection-fetch.d.ts +18 -0
  813. package/dist/runtime/introspection-fetch.d.ts.map +1 -0
  814. package/dist/runtime/introspection-fetch.js +12 -0
  815. package/dist/runtime/introspection-fetch.js.map +1 -0
  816. package/dist/runtime/json-schema-evaluate.d.ts +55 -0
  817. package/dist/runtime/json-schema-evaluate.d.ts.map +1 -0
  818. package/dist/runtime/json-schema-evaluate.js +946 -0
  819. package/dist/runtime/json-schema-evaluate.js.map +1 -0
  820. package/dist/runtime/json-schema-formats.d.ts +14 -0
  821. package/dist/runtime/json-schema-formats.d.ts.map +1 -0
  822. package/dist/runtime/json-schema-formats.js +555 -0
  823. package/dist/runtime/json-schema-formats.js.map +1 -0
  824. package/dist/runtime/json-schema-json.d.ts +41 -0
  825. package/dist/runtime/json-schema-json.d.ts.map +1 -0
  826. package/dist/runtime/json-schema-json.js +309 -0
  827. package/dist/runtime/json-schema-json.js.map +1 -0
  828. package/dist/runtime/json-schema-metaschemas.d.ts +1403 -0
  829. package/dist/runtime/json-schema-metaschemas.d.ts.map +1 -0
  830. package/dist/runtime/json-schema-metaschemas.js +64 -0
  831. package/dist/runtime/json-schema-metaschemas.js.map +1 -0
  832. package/dist/runtime/json-schema-regex.d.ts +32 -0
  833. package/dist/runtime/json-schema-regex.d.ts.map +1 -0
  834. package/dist/runtime/json-schema-regex.js +895 -0
  835. package/dist/runtime/json-schema-regex.js.map +1 -0
  836. package/dist/runtime/json-schema-validator.d.ts +47 -0
  837. package/dist/runtime/json-schema-validator.d.ts.map +1 -0
  838. package/dist/runtime/json-schema-validator.js +404 -0
  839. package/dist/runtime/json-schema-validator.js.map +1 -0
  840. package/dist/runtime/json-text.d.ts +2 -0
  841. package/dist/runtime/json-text.d.ts.map +1 -0
  842. package/dist/runtime/json-text.js +17 -0
  843. package/dist/runtime/json-text.js.map +1 -0
  844. package/dist/runtime/local-first-auth-controller.d.ts +29 -0
  845. package/dist/runtime/local-first-auth-controller.d.ts.map +1 -0
  846. package/dist/runtime/local-first-auth-controller.js +101 -0
  847. package/dist/runtime/local-first-auth-controller.js.map +1 -0
  848. package/dist/runtime/local-first-token.d.ts +11 -0
  849. package/dist/runtime/local-first-token.d.ts.map +1 -0
  850. package/dist/runtime/local-first-token.js +20 -0
  851. package/dist/runtime/local-first-token.js.map +1 -0
  852. package/dist/runtime/local-first-upgrade.d.ts +27 -0
  853. package/dist/runtime/local-first-upgrade.d.ts.map +1 -0
  854. package/dist/runtime/local-first-upgrade.js +31 -0
  855. package/dist/runtime/local-first-upgrade.js.map +1 -0
  856. package/dist/runtime/local-write-observer.d.ts +5 -0
  857. package/dist/runtime/local-write-observer.d.ts.map +1 -0
  858. package/dist/runtime/local-write-observer.js +31 -0
  859. package/dist/runtime/local-write-observer.js.map +1 -0
  860. package/dist/runtime/native-artifact-compatibility.d.ts +12 -0
  861. package/dist/runtime/native-artifact-compatibility.d.ts.map +1 -0
  862. package/dist/runtime/native-artifact-compatibility.js +24 -0
  863. package/dist/runtime/native-artifact-compatibility.js.map +1 -0
  864. package/dist/runtime/native-artifact-fingerprint-napi.d.ts +2 -0
  865. package/dist/runtime/native-artifact-fingerprint-napi.d.ts.map +1 -0
  866. package/dist/runtime/native-artifact-fingerprint-napi.js +3 -0
  867. package/dist/runtime/native-artifact-fingerprint-napi.js.map +1 -0
  868. package/dist/runtime/native-artifact-fingerprint-wasm.d.ts +2 -0
  869. package/dist/runtime/native-artifact-fingerprint-wasm.d.ts.map +1 -0
  870. package/dist/runtime/native-artifact-fingerprint-wasm.js +3 -0
  871. package/dist/runtime/native-artifact-fingerprint-wasm.js.map +1 -0
  872. package/dist/runtime/native-artifact-fingerprints.d.ts +5 -0
  873. package/dist/runtime/native-artifact-fingerprints.d.ts.map +1 -0
  874. package/dist/runtime/native-artifact-fingerprints.js +7 -0
  875. package/dist/runtime/native-artifact-fingerprints.js.map +1 -0
  876. package/dist/runtime/native-runtime/attached-browser-worker-connection.d.ts +20 -0
  877. package/dist/runtime/native-runtime/attached-browser-worker-connection.d.ts.map +1 -0
  878. package/dist/runtime/native-runtime/attached-browser-worker-connection.js +42 -0
  879. package/dist/runtime/native-runtime/attached-browser-worker-connection.js.map +1 -0
  880. package/dist/runtime/native-runtime/auxiliary-receive-deadline.d.ts +15 -0
  881. package/dist/runtime/native-runtime/auxiliary-receive-deadline.d.ts.map +1 -0
  882. package/dist/runtime/native-runtime/auxiliary-receive-deadline.js +64 -0
  883. package/dist/runtime/native-runtime/auxiliary-receive-deadline.js.map +1 -0
  884. package/dist/runtime/native-runtime/browser-follower-connection.d.ts +78 -0
  885. package/dist/runtime/native-runtime/browser-follower-connection.d.ts.map +1 -0
  886. package/dist/runtime/native-runtime/browser-follower-connection.js +494 -0
  887. package/dist/runtime/native-runtime/browser-follower-connection.js.map +1 -0
  888. package/dist/runtime/native-runtime/browser-shared-worker-connection.d.ts +96 -0
  889. package/dist/runtime/native-runtime/browser-shared-worker-connection.d.ts.map +1 -0
  890. package/dist/runtime/native-runtime/browser-shared-worker-connection.js +780 -0
  891. package/dist/runtime/native-runtime/browser-shared-worker-connection.js.map +1 -0
  892. package/dist/runtime/native-runtime/browser-worker-protocol.d.ts +455 -0
  893. package/dist/runtime/native-runtime/browser-worker-protocol.d.ts.map +1 -0
  894. package/dist/runtime/native-runtime/browser-worker-protocol.js +281 -0
  895. package/dist/runtime/native-runtime/browser-worker-protocol.js.map +1 -0
  896. package/dist/runtime/native-runtime/browser-worker-transport.d.ts +53 -0
  897. package/dist/runtime/native-runtime/browser-worker-transport.d.ts.map +1 -0
  898. package/dist/runtime/native-runtime/browser-worker-transport.js +252 -0
  899. package/dist/runtime/native-runtime/browser-worker-transport.js.map +1 -0
  900. package/dist/runtime/native-runtime/exact-integer.d.ts +7 -0
  901. package/dist/runtime/native-runtime/exact-integer.d.ts.map +1 -0
  902. package/dist/runtime/native-runtime/exact-integer.js +18 -0
  903. package/dist/runtime/native-runtime/exact-integer.js.map +1 -0
  904. package/dist/runtime/native-runtime/http-stream-socket.d.ts +85 -0
  905. package/dist/runtime/native-runtime/http-stream-socket.d.ts.map +1 -0
  906. package/dist/runtime/native-runtime/http-stream-socket.js +433 -0
  907. package/dist/runtime/native-runtime/http-stream-socket.js.map +1 -0
  908. package/dist/runtime/native-runtime/inspector-control-lifecycle.d.ts +4 -0
  909. package/dist/runtime/native-runtime/inspector-control-lifecycle.d.ts.map +1 -0
  910. package/dist/runtime/native-runtime/inspector-control-lifecycle.js +33 -0
  911. package/dist/runtime/native-runtime/inspector-control-lifecycle.js.map +1 -0
  912. package/dist/runtime/native-runtime/native-codec.d.ts +177 -0
  913. package/dist/runtime/native-runtime/native-codec.d.ts.map +1 -0
  914. package/dist/runtime/native-runtime/native-codec.js +627 -0
  915. package/dist/runtime/native-runtime/native-codec.js.map +1 -0
  916. package/dist/runtime/native-runtime/native-error-code.d.ts +39 -0
  917. package/dist/runtime/native-runtime/native-error-code.d.ts.map +1 -0
  918. package/dist/runtime/native-runtime/native-error-code.js +62 -0
  919. package/dist/runtime/native-runtime/native-error-code.js.map +1 -0
  920. package/dist/runtime/native-runtime/native-row-codec.d.ts +161 -0
  921. package/dist/runtime/native-runtime/native-row-codec.d.ts.map +1 -0
  922. package/dist/runtime/native-runtime/native-row-codec.js +942 -0
  923. package/dist/runtime/native-runtime/native-row-codec.js.map +1 -0
  924. package/dist/runtime/native-runtime/native-row-descriptor-key.d.ts +15 -0
  925. package/dist/runtime/native-runtime/native-row-descriptor-key.d.ts.map +1 -0
  926. package/dist/runtime/native-runtime/native-row-descriptor-key.js +25 -0
  927. package/dist/runtime/native-runtime/native-row-descriptor-key.js.map +1 -0
  928. package/dist/runtime/native-runtime/native-runtime-adapter.d.ts +728 -0
  929. package/dist/runtime/native-runtime/native-runtime-adapter.d.ts.map +1 -0
  930. package/dist/runtime/native-runtime/native-runtime-adapter.js +5705 -0
  931. package/dist/runtime/native-runtime/native-runtime-adapter.js.map +1 -0
  932. package/dist/runtime/native-runtime/node-foreground-node-lease.browser.d.ts +17 -0
  933. package/dist/runtime/native-runtime/node-foreground-node-lease.browser.d.ts.map +1 -0
  934. package/dist/runtime/native-runtime/node-foreground-node-lease.browser.js +4 -0
  935. package/dist/runtime/native-runtime/node-foreground-node-lease.browser.js.map +1 -0
  936. package/dist/runtime/native-runtime/node-foreground-node-lease.d.ts +19 -0
  937. package/dist/runtime/native-runtime/node-foreground-node-lease.d.ts.map +1 -0
  938. package/dist/runtime/native-runtime/node-foreground-node-lease.js +297 -0
  939. package/dist/runtime/native-runtime/node-foreground-node-lease.js.map +1 -0
  940. package/dist/runtime/native-runtime/row-values-transport.d.ts +2 -0
  941. package/dist/runtime/native-runtime/row-values-transport.d.ts.map +1 -0
  942. package/dist/runtime/native-runtime/row-values-transport.js +21 -0
  943. package/dist/runtime/native-runtime/row-values-transport.js.map +1 -0
  944. package/dist/runtime/native-runtime/schema-codec.d.ts +10 -0
  945. package/dist/runtime/native-runtime/schema-codec.d.ts.map +1 -0
  946. package/dist/runtime/native-runtime/schema-codec.js +13 -0
  947. package/dist/runtime/native-runtime/schema-codec.js.map +1 -0
  948. package/dist/runtime/native-runtime/websocket.d.ts +165 -0
  949. package/dist/runtime/native-runtime/websocket.d.ts.map +1 -0
  950. package/dist/runtime/native-runtime/websocket.js +713 -0
  951. package/dist/runtime/native-runtime/websocket.js.map +1 -0
  952. package/dist/runtime/passkey-backup.d.ts +3 -0
  953. package/dist/runtime/passkey-backup.d.ts.map +1 -0
  954. package/dist/runtime/passkey-backup.js +2 -0
  955. package/dist/runtime/passkey-backup.js.map +1 -0
  956. package/dist/runtime/platform-url.d.ts +10 -0
  957. package/dist/runtime/platform-url.d.ts.map +1 -0
  958. package/dist/runtime/platform-url.js +3 -0
  959. package/dist/runtime/platform-url.js.map +1 -0
  960. package/dist/runtime/platform-url.native.d.ts +6 -0
  961. package/dist/runtime/platform-url.native.d.ts.map +1 -0
  962. package/dist/runtime/platform-url.native.js +37 -0
  963. package/dist/runtime/platform-url.native.js.map +1 -0
  964. package/dist/runtime/query-adapter.d.ts +7 -15
  965. package/dist/runtime/query-adapter.d.ts.map +1 -1
  966. package/dist/runtime/query-adapter.js +554 -167
  967. package/dist/runtime/query-adapter.js.map +1 -1
  968. package/dist/runtime/query-builder-shape.d.ts +75 -0
  969. package/dist/runtime/query-builder-shape.d.ts.map +1 -0
  970. package/dist/runtime/query-builder-shape.js +225 -0
  971. package/dist/runtime/query-builder-shape.js.map +1 -0
  972. package/dist/runtime/query-column-name.d.ts +3 -0
  973. package/dist/runtime/query-column-name.d.ts.map +1 -0
  974. package/dist/runtime/query-column-name.js +10 -0
  975. package/dist/runtime/query-column-name.js.map +1 -0
  976. package/dist/runtime/query-output-table.d.ts +5 -0
  977. package/dist/runtime/query-output-table.d.ts.map +1 -0
  978. package/dist/runtime/query-output-table.js +30 -0
  979. package/dist/runtime/query-output-table.js.map +1 -0
  980. package/dist/runtime/recovery-phrase.d.ts +3 -0
  981. package/dist/runtime/recovery-phrase.d.ts.map +1 -0
  982. package/dist/runtime/recovery-phrase.js +2 -0
  983. package/dist/runtime/recovery-phrase.js.map +1 -0
  984. package/dist/runtime/remote-link-state.d.ts +20 -0
  985. package/dist/runtime/remote-link-state.d.ts.map +1 -0
  986. package/dist/runtime/remote-link-state.js +5 -0
  987. package/dist/runtime/remote-link-state.js.map +1 -0
  988. package/dist/runtime/row-transformer.d.ts +18 -6
  989. package/dist/runtime/row-transformer.d.ts.map +1 -1
  990. package/dist/runtime/row-transformer.js +195 -41
  991. package/dist/runtime/row-transformer.js.map +1 -1
  992. package/dist/runtime/run-cleanup-steps.d.ts +5 -0
  993. package/dist/runtime/run-cleanup-steps.d.ts.map +1 -0
  994. package/dist/runtime/run-cleanup-steps.js +19 -0
  995. package/dist/runtime/run-cleanup-steps.js.map +1 -0
  996. package/dist/runtime/runtime-closed-error.d.ts +9 -0
  997. package/dist/runtime/runtime-closed-error.d.ts.map +1 -0
  998. package/dist/runtime/runtime-closed-error.js +12 -0
  999. package/dist/runtime/runtime-closed-error.js.map +1 -0
  1000. package/dist/runtime/runtime-config.d.ts +9 -0
  1001. package/dist/runtime/runtime-config.d.ts.map +1 -0
  1002. package/dist/runtime/runtime-config.js +111 -0
  1003. package/dist/runtime/runtime-config.js.map +1 -0
  1004. package/dist/runtime/runtime-entropy.d.ts +14 -0
  1005. package/dist/runtime/runtime-entropy.d.ts.map +1 -0
  1006. package/dist/runtime/runtime-entropy.js +43 -0
  1007. package/dist/runtime/runtime-entropy.js.map +1 -0
  1008. package/dist/runtime/runtime-source.d.ts +167 -0
  1009. package/dist/runtime/runtime-source.d.ts.map +1 -0
  1010. package/dist/runtime/runtime-source.js +64 -0
  1011. package/dist/runtime/runtime-source.js.map +1 -0
  1012. package/dist/runtime/schema-metadata.d.ts +5 -0
  1013. package/dist/runtime/schema-metadata.d.ts.map +1 -0
  1014. package/dist/runtime/schema-metadata.js +34 -0
  1015. package/dist/runtime/schema-metadata.js.map +1 -0
  1016. package/dist/runtime/select-projection.d.ts +5 -0
  1017. package/dist/runtime/select-projection.d.ts.map +1 -0
  1018. package/dist/runtime/select-projection.js +47 -0
  1019. package/dist/runtime/select-projection.js.map +1 -0
  1020. package/dist/runtime/snapshot-ref.d.ts +24 -0
  1021. package/dist/runtime/snapshot-ref.d.ts.map +1 -0
  1022. package/dist/runtime/snapshot-ref.js +43 -0
  1023. package/dist/runtime/snapshot-ref.js.map +1 -0
  1024. package/dist/runtime/store-held-by-another-tab-error.d.ts +36 -0
  1025. package/dist/runtime/store-held-by-another-tab-error.d.ts.map +1 -0
  1026. package/dist/runtime/store-held-by-another-tab-error.js +38 -0
  1027. package/dist/runtime/store-held-by-another-tab-error.js.map +1 -0
  1028. package/dist/runtime/streaming-source.d.ts +4 -0
  1029. package/dist/runtime/streaming-source.d.ts.map +1 -0
  1030. package/dist/runtime/streaming-source.js +53 -0
  1031. package/dist/runtime/streaming-source.js.map +1 -0
  1032. package/dist/runtime/structural-values.d.ts +6 -0
  1033. package/dist/runtime/structural-values.d.ts.map +1 -0
  1034. package/dist/runtime/structural-values.js +55 -0
  1035. package/dist/runtime/structural-values.js.map +1 -0
  1036. package/dist/runtime/subscription-manager.d.ts +98 -14
  1037. package/dist/runtime/subscription-manager.d.ts.map +1 -1
  1038. package/dist/runtime/subscription-manager.js +1049 -25
  1039. package/dist/runtime/subscription-manager.js.map +1 -1
  1040. package/dist/runtime/sync-status.d.ts +98 -0
  1041. package/dist/runtime/sync-status.d.ts.map +1 -0
  1042. package/dist/runtime/sync-status.js +93 -0
  1043. package/dist/runtime/sync-status.js.map +1 -0
  1044. package/dist/runtime/sync-telemetry.d.ts +35 -0
  1045. package/dist/runtime/sync-telemetry.d.ts.map +1 -0
  1046. package/dist/runtime/sync-telemetry.js +354 -0
  1047. package/dist/runtime/sync-telemetry.js.map +1 -0
  1048. package/dist/runtime/system-identity.d.ts +5 -0
  1049. package/dist/runtime/system-identity.d.ts.map +1 -0
  1050. package/dist/runtime/system-identity.js +10 -0
  1051. package/dist/runtime/system-identity.js.map +1 -0
  1052. package/dist/runtime/telemetry-env.d.ts +2 -0
  1053. package/dist/runtime/telemetry-env.d.ts.map +1 -0
  1054. package/dist/runtime/telemetry-env.js +16 -0
  1055. package/dist/runtime/telemetry-env.js.map +1 -0
  1056. package/dist/runtime/telemetry-env.native.d.ts +3 -0
  1057. package/dist/runtime/telemetry-env.native.d.ts.map +1 -0
  1058. package/dist/runtime/telemetry-env.native.js +7 -0
  1059. package/dist/runtime/telemetry-env.native.js.map +1 -0
  1060. package/dist/runtime/text-anchors.d.ts +58 -0
  1061. package/dist/runtime/text-anchors.d.ts.map +1 -0
  1062. package/dist/runtime/text-anchors.js +9 -0
  1063. package/dist/runtime/text-anchors.js.map +1 -0
  1064. package/dist/runtime/unsupported-storage-codecs-error.d.ts +53 -0
  1065. package/dist/runtime/unsupported-storage-codecs-error.d.ts.map +1 -0
  1066. package/dist/runtime/unsupported-storage-codecs-error.js +74 -0
  1067. package/dist/runtime/unsupported-storage-codecs-error.js.map +1 -0
  1068. package/dist/runtime/url.d.ts +32 -0
  1069. package/dist/runtime/url.d.ts.map +1 -0
  1070. package/dist/runtime/url.js +96 -0
  1071. package/dist/runtime/url.js.map +1 -0
  1072. package/dist/runtime/utf8.d.ts +10 -0
  1073. package/dist/runtime/utf8.d.ts.map +1 -0
  1074. package/dist/runtime/utf8.js +93 -0
  1075. package/dist/runtime/utf8.js.map +1 -0
  1076. package/dist/runtime/util.d.ts +18 -0
  1077. package/dist/runtime/util.d.ts.map +1 -0
  1078. package/dist/runtime/util.js +59 -0
  1079. package/dist/runtime/util.js.map +1 -0
  1080. package/dist/runtime/value-converter.d.ts +9 -17
  1081. package/dist/runtime/value-converter.d.ts.map +1 -1
  1082. package/dist/runtime/value-converter.js +196 -43
  1083. package/dist/runtime/value-converter.js.map +1 -1
  1084. package/dist/runtime/wasm-loader.d.ts +6 -0
  1085. package/dist/runtime/wasm-loader.d.ts.map +1 -0
  1086. package/dist/runtime/wasm-loader.js +120 -0
  1087. package/dist/runtime/wasm-loader.js.map +1 -0
  1088. package/dist/runtime/write-preparation.d.ts +24 -0
  1089. package/dist/runtime/write-preparation.d.ts.map +1 -0
  1090. package/dist/runtime/write-preparation.js +63 -0
  1091. package/dist/runtime/write-preparation.js.map +1 -0
  1092. package/dist/runtime/write-row.d.ts +8 -0
  1093. package/dist/runtime/write-row.d.ts.map +1 -0
  1094. package/dist/runtime/write-row.js +17 -0
  1095. package/dist/runtime/write-row.js.map +1 -0
  1096. package/dist/schema-hash.d.ts +3 -0
  1097. package/dist/schema-hash.d.ts.map +1 -0
  1098. package/dist/schema-hash.js +5 -0
  1099. package/dist/schema-hash.js.map +1 -0
  1100. package/dist/schema-loader.d.ts +31 -0
  1101. package/dist/schema-loader.d.ts.map +1 -0
  1102. package/dist/schema-loader.js +501 -0
  1103. package/dist/schema-loader.js.map +1 -0
  1104. package/dist/schema-name.d.ts +2 -0
  1105. package/dist/schema-name.d.ts.map +1 -0
  1106. package/dist/schema-name.js +19 -0
  1107. package/dist/schema-name.js.map +1 -0
  1108. package/dist/schema-namespace.d.ts +35 -0
  1109. package/dist/schema-namespace.d.ts.map +1 -0
  1110. package/dist/schema-namespace.js +17 -0
  1111. package/dist/schema-namespace.js.map +1 -0
  1112. package/dist/schema-permissions.d.ts +16 -0
  1113. package/dist/schema-permissions.d.ts.map +1 -0
  1114. package/dist/schema-permissions.js +405 -0
  1115. package/dist/schema-permissions.js.map +1 -0
  1116. package/dist/schema-source.d.ts +11 -0
  1117. package/dist/schema-source.d.ts.map +1 -0
  1118. package/dist/schema-source.js +39 -0
  1119. package/dist/schema-source.js.map +1 -0
  1120. package/dist/schema.d.ts +108 -36
  1121. package/dist/schema.d.ts.map +1 -1
  1122. package/dist/schema.js +1 -10
  1123. package/dist/schema.js.map +1 -1
  1124. package/dist/session/app.d.ts +58 -0
  1125. package/dist/session/app.d.ts.map +1 -0
  1126. package/dist/session/app.js +325 -0
  1127. package/dist/session/app.js.map +1 -0
  1128. package/dist/session/backend-watch.d.ts +138 -0
  1129. package/dist/session/backend-watch.d.ts.map +1 -0
  1130. package/dist/session/backend-watch.js +576 -0
  1131. package/dist/session/backend-watch.js.map +1 -0
  1132. package/dist/session/consumer.d.ts +3 -0
  1133. package/dist/session/consumer.d.ts.map +1 -0
  1134. package/dist/session/consumer.js +3 -0
  1135. package/dist/session/consumer.js.map +1 -0
  1136. package/dist/session/create-jazz-app.d.ts +11 -0
  1137. package/dist/session/create-jazz-app.d.ts.map +1 -0
  1138. package/dist/session/create-jazz-app.js +11 -0
  1139. package/dist/session/create-jazz-app.js.map +1 -0
  1140. package/dist/session/create-jazz-session.d.ts +68 -0
  1141. package/dist/session/create-jazz-session.d.ts.map +1 -0
  1142. package/dist/session/create-jazz-session.js +448 -0
  1143. package/dist/session/create-jazz-session.js.map +1 -0
  1144. package/dist/session/follow-user.d.ts +53 -0
  1145. package/dist/session/follow-user.d.ts.map +1 -0
  1146. package/dist/session/follow-user.js +107 -0
  1147. package/dist/session/follow-user.js.map +1 -0
  1148. package/dist/session/left-behind-replicas.d.ts +62 -0
  1149. package/dist/session/left-behind-replicas.d.ts.map +1 -0
  1150. package/dist/session/left-behind-replicas.js +146 -0
  1151. package/dist/session/left-behind-replicas.js.map +1 -0
  1152. package/dist/session/native-backend-watch.d.ts +4 -0
  1153. package/dist/session/native-backend-watch.d.ts.map +1 -0
  1154. package/dist/session/native-backend-watch.js +14 -0
  1155. package/dist/session/native-backend-watch.js.map +1 -0
  1156. package/dist/session/state.d.ts +93 -0
  1157. package/dist/session/state.d.ts.map +1 -0
  1158. package/dist/session/state.js +383 -0
  1159. package/dist/session/state.js.map +1 -0
  1160. package/dist/shared/index.d.ts +20 -0
  1161. package/dist/shared/index.d.ts.map +1 -0
  1162. package/dist/shared/index.js +17 -0
  1163. package/dist/shared/index.js.map +1 -0
  1164. package/dist/solid/app.d.ts +30 -0
  1165. package/dist/solid/app.d.ts.map +1 -0
  1166. package/dist/solid/app.js +95 -0
  1167. package/dist/solid/app.js.map +1 -0
  1168. package/dist/solid/app.ssr.js +109 -0
  1169. package/dist/solid/app.ssr.js.map +1 -0
  1170. package/dist/solid/create-account-state.d.ts +4 -0
  1171. package/dist/solid/create-account-state.d.ts.map +1 -0
  1172. package/dist/solid/create-account-state.js +10 -0
  1173. package/dist/solid/create-account-state.js.map +1 -0
  1174. package/dist/solid/create-account-state.ssr.js +12 -0
  1175. package/dist/solid/create-account-state.ssr.js.map +1 -0
  1176. package/dist/solid/create-solid-jazz-client-internal.d.ts +13 -0
  1177. package/dist/solid/create-solid-jazz-client-internal.d.ts.map +1 -0
  1178. package/dist/solid/create-solid-jazz-client-internal.js +83 -0
  1179. package/dist/solid/create-solid-jazz-client-internal.js.map +1 -0
  1180. package/dist/solid/create-solid-jazz-client-internal.ssr.js +101 -0
  1181. package/dist/solid/create-solid-jazz-client-internal.ssr.js.map +1 -0
  1182. package/dist/solid/create-solid-jazz-client.d.ts +24 -0
  1183. package/dist/solid/create-solid-jazz-client.d.ts.map +1 -0
  1184. package/dist/solid/create-solid-jazz-client.js +43 -0
  1185. package/dist/solid/create-solid-jazz-client.js.map +1 -0
  1186. package/dist/solid/create-solid-jazz-client.ssr.js +46 -0
  1187. package/dist/solid/create-solid-jazz-client.ssr.js.map +1 -0
  1188. package/dist/solid/index.d.ts +20 -0
  1189. package/dist/solid/index.d.ts.map +1 -0
  1190. package/dist/solid/index.js +13 -0
  1191. package/dist/solid/index.ssr.js +13 -0
  1192. package/dist/solid/provider.d.ts +32 -0
  1193. package/dist/solid/provider.d.ts.map +1 -0
  1194. package/dist/solid/provider.js +63 -0
  1195. package/dist/solid/provider.js.map +1 -0
  1196. package/dist/solid/provider.ssr.js +64 -0
  1197. package/dist/solid/provider.ssr.js.map +1 -0
  1198. package/dist/solid/session.d.ts +22 -0
  1199. package/dist/solid/session.d.ts.map +1 -0
  1200. package/dist/solid/session.js +76 -0
  1201. package/dist/solid/session.js.map +1 -0
  1202. package/dist/solid/session.ssr.js +85 -0
  1203. package/dist/solid/session.ssr.js.map +1 -0
  1204. package/dist/solid/solid-jazz-client-store.d.ts +11 -0
  1205. package/dist/solid/solid-jazz-client-store.d.ts.map +1 -0
  1206. package/dist/solid/solid-jazz-client-store.js +37 -0
  1207. package/dist/solid/solid-jazz-client-store.js.map +1 -0
  1208. package/dist/solid/solid-jazz-client-store.ssr.js +39 -0
  1209. package/dist/solid/solid-jazz-client-store.ssr.js.map +1 -0
  1210. package/dist/solid/use-all.d.ts +18 -0
  1211. package/dist/solid/use-all.d.ts.map +1 -0
  1212. package/dist/solid/use-all.js +73 -0
  1213. package/dist/solid/use-all.js.map +1 -0
  1214. package/dist/solid/use-all.ssr.js +84 -0
  1215. package/dist/solid/use-all.ssr.js.map +1 -0
  1216. package/dist/solid/use-local-first-auth.d.ts +11 -0
  1217. package/dist/solid/use-local-first-auth.d.ts.map +1 -0
  1218. package/dist/solid/use-local-first-auth.js +30 -0
  1219. package/dist/solid/use-local-first-auth.js.map +1 -0
  1220. package/dist/solid/use-local-first-auth.ssr.js +31 -0
  1221. package/dist/solid/use-local-first-auth.ssr.js.map +1 -0
  1222. package/dist/solid/use-one.d.ts +18 -0
  1223. package/dist/solid/use-one.d.ts.map +1 -0
  1224. package/dist/solid/use-one.js +28 -0
  1225. package/dist/solid/use-one.js.map +1 -0
  1226. package/dist/solid/use-one.ssr.js +28 -0
  1227. package/dist/solid/use-one.ssr.js.map +1 -0
  1228. package/dist/solid/use-sync-status.d.ts +8 -0
  1229. package/dist/solid/use-sync-status.d.ts.map +1 -0
  1230. package/dist/solid/use-sync-status.js +14 -0
  1231. package/dist/solid/use-sync-status.js.map +1 -0
  1232. package/dist/solid/use-sync-status.ssr.js +21 -0
  1233. package/dist/solid/use-sync-status.ssr.js.map +1 -0
  1234. package/dist/subscription-store-internal.d.ts +11 -0
  1235. package/dist/subscription-store-internal.d.ts.map +1 -0
  1236. package/dist/subscription-store-internal.js +18 -0
  1237. package/dist/subscription-store-internal.js.map +1 -0
  1238. package/dist/subscriptions-orchestrator.d.ts +53 -13
  1239. package/dist/subscriptions-orchestrator.d.ts.map +1 -1
  1240. package/dist/subscriptions-orchestrator.js +295 -74
  1241. package/dist/subscriptions-orchestrator.js.map +1 -1
  1242. package/dist/svelte/JazzProvider.svelte +62 -0
  1243. package/dist/svelte/JazzProvider.svelte.d.ts +13 -0
  1244. package/dist/svelte/JazzProvider.svelte.d.ts.map +1 -0
  1245. package/dist/svelte/JazzSessionClientProvider.svelte +42 -0
  1246. package/dist/svelte/JazzSessionClientProvider.svelte.d.ts +13 -0
  1247. package/dist/svelte/JazzSessionClientProvider.svelte.d.ts.map +1 -0
  1248. package/dist/svelte/JazzSessionProvider.svelte +68 -0
  1249. package/dist/svelte/JazzSessionProvider.svelte.d.ts +19 -0
  1250. package/dist/svelte/JazzSessionProvider.svelte.d.ts.map +1 -0
  1251. package/dist/svelte/JazzSvelteClientProvider.svelte +79 -0
  1252. package/dist/svelte/JazzSvelteClientProvider.svelte.d.ts +14 -0
  1253. package/dist/svelte/JazzSvelteClientProvider.svelte.d.ts.map +1 -0
  1254. package/dist/svelte/JazzSvelteProvider.svelte +158 -27
  1255. package/dist/svelte/JazzSvelteProvider.svelte.d.ts +3 -2
  1256. package/dist/svelte/JazzSvelteProvider.svelte.d.ts.map +1 -1
  1257. package/dist/svelte/account-state.d.ts +5 -0
  1258. package/dist/svelte/account-state.d.ts.map +1 -0
  1259. package/dist/svelte/account-state.js +9 -0
  1260. package/dist/svelte/auth-state.d.ts +23 -0
  1261. package/dist/svelte/auth-state.d.ts.map +1 -0
  1262. package/dist/svelte/auth-state.js +16 -0
  1263. package/dist/svelte/context.svelte.d.ts +23 -3
  1264. package/dist/svelte/context.svelte.d.ts.map +1 -1
  1265. package/dist/svelte/context.svelte.js +23 -3
  1266. package/dist/svelte/create-jazz-client.d.ts +2 -8
  1267. package/dist/svelte/create-jazz-client.d.ts.map +1 -1
  1268. package/dist/svelte/create-jazz-client.js +1 -17
  1269. package/dist/svelte/index.d.ts +21 -5
  1270. package/dist/svelte/index.d.ts.map +1 -1
  1271. package/dist/svelte/index.js +14 -5
  1272. package/dist/svelte/local-first-auth.svelte.d.ts +50 -0
  1273. package/dist/svelte/local-first-auth.svelte.d.ts.map +1 -0
  1274. package/dist/svelte/local-first-auth.svelte.js +58 -0
  1275. package/dist/svelte/query-subscription.svelte.d.ts +60 -0
  1276. package/dist/svelte/query-subscription.svelte.d.ts.map +1 -0
  1277. package/dist/svelte/query-subscription.svelte.js +135 -0
  1278. package/dist/svelte/session-state.d.ts +11 -0
  1279. package/dist/svelte/session-state.d.ts.map +1 -0
  1280. package/dist/svelte/session-state.js +23 -0
  1281. package/dist/svelte/sync-status.d.ts +11 -0
  1282. package/dist/svelte/sync-status.d.ts.map +1 -0
  1283. package/dist/svelte/sync-status.js +15 -0
  1284. package/dist/testing/client-migrations.d.ts +29 -0
  1285. package/dist/testing/client-migrations.d.ts.map +1 -0
  1286. package/dist/testing/client-migrations.js +34 -0
  1287. package/dist/testing/client-migrations.js.map +1 -0
  1288. package/dist/testing/fixtures/basic/schema.d.ts +11 -0
  1289. package/dist/testing/fixtures/basic/schema.d.ts.map +1 -0
  1290. package/dist/testing/fixtures/basic/schema.js +10 -0
  1291. package/dist/testing/fixtures/basic/schema.js.map +1 -0
  1292. package/dist/testing/fixtures/with-bigint/schema.d.ts +18 -0
  1293. package/dist/testing/fixtures/with-bigint/schema.d.ts.map +1 -0
  1294. package/dist/testing/fixtures/with-bigint/schema.js +15 -0
  1295. package/dist/testing/fixtures/with-bigint/schema.js.map +1 -0
  1296. package/dist/testing/fixtures/with-defaults/schema.d.ts +385 -0
  1297. package/dist/testing/fixtures/with-defaults/schema.d.ts.map +1 -0
  1298. package/dist/testing/fixtures/with-defaults/schema.js +15 -0
  1299. package/dist/testing/fixtures/with-defaults/schema.js.map +1 -0
  1300. package/dist/testing/fixtures/with-enum-payload-defaults/schema.d.ts +4 -0
  1301. package/dist/testing/fixtures/with-enum-payload-defaults/schema.d.ts.map +1 -0
  1302. package/dist/testing/fixtures/with-enum-payload-defaults/schema.js +22 -0
  1303. package/dist/testing/fixtures/with-enum-payload-defaults/schema.js.map +1 -0
  1304. package/dist/testing/fixtures/with-enum-payload-required-null/schema.d.ts +4 -0
  1305. package/dist/testing/fixtures/with-enum-payload-required-null/schema.d.ts.map +1 -0
  1306. package/dist/testing/fixtures/with-enum-payload-required-null/schema.js +14 -0
  1307. package/dist/testing/fixtures/with-enum-payload-required-null/schema.js.map +1 -0
  1308. package/dist/testing/fixtures/with-enum-payload-wrong-tag/schema.d.ts +4 -0
  1309. package/dist/testing/fixtures/with-enum-payload-wrong-tag/schema.d.ts.map +1 -0
  1310. package/dist/testing/fixtures/with-enum-payload-wrong-tag/schema.js +14 -0
  1311. package/dist/testing/fixtures/with-enum-payload-wrong-tag/schema.js.map +1 -0
  1312. package/dist/testing/index.d.ts +6 -1
  1313. package/dist/testing/index.d.ts.map +1 -1
  1314. package/dist/testing/index.js +5 -1
  1315. package/dist/testing/index.js.map +1 -1
  1316. package/dist/testing/policy-test-app.d.ts +123 -0
  1317. package/dist/testing/policy-test-app.d.ts.map +1 -0
  1318. package/dist/testing/policy-test-app.js +215 -0
  1319. package/dist/testing/policy-test-app.js.map +1 -0
  1320. package/dist/testing/test-jazz.d.ts +106 -0
  1321. package/dist/testing/test-jazz.d.ts.map +1 -0
  1322. package/dist/testing/test-jazz.js +154 -0
  1323. package/dist/testing/test-jazz.js.map +1 -0
  1324. package/dist/testing/test-jwt-issuer.d.ts +19 -0
  1325. package/dist/testing/test-jwt-issuer.d.ts.map +1 -0
  1326. package/dist/testing/test-jwt-issuer.js +40 -0
  1327. package/dist/testing/test-jwt-issuer.js.map +1 -0
  1328. package/dist/text-field/index.d.ts +40 -0
  1329. package/dist/text-field/index.d.ts.map +1 -0
  1330. package/dist/text-field/index.js +129 -0
  1331. package/dist/text-field/index.js.map +1 -0
  1332. package/dist/thin/index.d.ts +84 -0
  1333. package/dist/thin/index.d.ts.map +1 -0
  1334. package/dist/thin/index.js +204 -0
  1335. package/dist/thin/index.js.map +1 -0
  1336. package/dist/thin/self-signed-token.d.ts +13 -0
  1337. package/dist/thin/self-signed-token.d.ts.map +1 -0
  1338. package/dist/thin/self-signed-token.js +84 -0
  1339. package/dist/thin/self-signed-token.js.map +1 -0
  1340. package/dist/thin/thin-runtime-source.d.ts +19 -0
  1341. package/dist/thin/thin-runtime-source.d.ts.map +1 -0
  1342. package/dist/thin/thin-runtime-source.js +66 -0
  1343. package/dist/thin/thin-runtime-source.js.map +1 -0
  1344. package/dist/thin/thin-runtime.d.ts +224 -0
  1345. package/dist/thin/thin-runtime.d.ts.map +1 -0
  1346. package/dist/thin/thin-runtime.js +1190 -0
  1347. package/dist/thin/thin-runtime.js.map +1 -0
  1348. package/dist/thin/wire.d.ts +160 -0
  1349. package/dist/thin/wire.d.ts.map +1 -0
  1350. package/dist/thin/wire.js +304 -0
  1351. package/dist/thin/wire.js.map +1 -0
  1352. package/dist/typed-app.d.ts +729 -0
  1353. package/dist/typed-app.d.ts.map +1 -0
  1354. package/dist/typed-app.js +789 -0
  1355. package/dist/typed-app.js.map +1 -0
  1356. package/dist/vue/app.d.ts +76 -0
  1357. package/dist/vue/app.d.ts.map +1 -0
  1358. package/dist/vue/app.js +100 -0
  1359. package/dist/vue/app.js.map +1 -0
  1360. package/dist/vue/create-jazz-client.d.ts +3 -0
  1361. package/dist/vue/create-jazz-client.d.ts.map +1 -0
  1362. package/dist/vue/create-jazz-client.js +2 -0
  1363. package/dist/vue/create-jazz-client.js.map +1 -0
  1364. package/dist/vue/index.d.ts +19 -0
  1365. package/dist/vue/index.d.ts.map +1 -0
  1366. package/dist/vue/index.js +13 -0
  1367. package/dist/vue/index.js.map +1 -0
  1368. package/dist/vue/provider.d.ts +87 -0
  1369. package/dist/vue/provider.d.ts.map +1 -0
  1370. package/dist/vue/provider.js +225 -0
  1371. package/dist/vue/provider.js.map +1 -0
  1372. package/dist/vue/session.d.ts +39 -0
  1373. package/dist/vue/session.d.ts.map +1 -0
  1374. package/dist/vue/session.js +42 -0
  1375. package/dist/vue/session.js.map +1 -0
  1376. package/dist/vue/use-account-state.d.ts +5 -0
  1377. package/dist/vue/use-account-state.d.ts.map +1 -0
  1378. package/dist/vue/use-account-state.js +10 -0
  1379. package/dist/vue/use-account-state.js.map +1 -0
  1380. package/dist/vue/use-all.d.ts +61 -0
  1381. package/dist/vue/use-all.d.ts.map +1 -0
  1382. package/dist/vue/use-all.js +104 -0
  1383. package/dist/vue/use-all.js.map +1 -0
  1384. package/dist/vue/use-local-first-auth.d.ts +53 -0
  1385. package/dist/vue/use-local-first-auth.d.ts.map +1 -0
  1386. package/dist/vue/use-local-first-auth.js +67 -0
  1387. package/dist/vue/use-local-first-auth.js.map +1 -0
  1388. package/dist/vue/use-one.d.ts +24 -0
  1389. package/dist/vue/use-one.d.ts.map +1 -0
  1390. package/dist/vue/use-one.js +17 -0
  1391. package/dist/vue/use-one.js.map +1 -0
  1392. package/dist/vue/use-sync-status.d.ts +9 -0
  1393. package/dist/vue/use-sync-status.d.ts.map +1 -0
  1394. package/dist/vue/use-sync-status.js +16 -0
  1395. package/dist/vue/use-sync-status.js.map +1 -0
  1396. package/dist/web/create-jazz-client.d.ts +8 -0
  1397. package/dist/web/create-jazz-client.d.ts.map +1 -0
  1398. package/dist/web/create-jazz-client.js +8 -0
  1399. package/dist/web/create-jazz-client.js.map +1 -0
  1400. package/dist/web/lazy-local-first.d.ts +8 -0
  1401. package/dist/web/lazy-local-first.d.ts.map +1 -0
  1402. package/dist/web/lazy-local-first.js +13 -0
  1403. package/dist/web/lazy-local-first.js.map +1 -0
  1404. package/dist/web/registered-jazz-client.d.ts +15 -0
  1405. package/dist/web/registered-jazz-client.d.ts.map +1 -0
  1406. package/dist/web/registered-jazz-client.js +35 -0
  1407. package/dist/web/registered-jazz-client.js.map +1 -0
  1408. package/dist/where-operators.d.ts +13 -0
  1409. package/dist/where-operators.d.ts.map +1 -0
  1410. package/dist/where-operators.js +70 -0
  1411. package/dist/where-operators.js.map +1 -0
  1412. package/dist/window-client-storage.d.ts +33 -0
  1413. package/dist/window-client-storage.d.ts.map +1 -0
  1414. package/dist/window-client-storage.js +88 -0
  1415. package/dist/window-client-storage.js.map +1 -0
  1416. package/dist/worker/jazz-broker-worker-core.d.ts +34 -0
  1417. package/dist/worker/jazz-broker-worker-core.d.ts.map +1 -0
  1418. package/dist/worker/jazz-broker-worker-core.js +2033 -0
  1419. package/dist/worker/jazz-broker-worker-core.js.map +1 -0
  1420. package/dist/worker/jazz-broker-worker.d.ts +2 -0
  1421. package/dist/worker/jazz-broker-worker.d.ts.map +1 -0
  1422. package/dist/worker/jazz-broker-worker.js +23997 -0
  1423. package/dist/worker/jazz_wasm_bg.wasm +0 -0
  1424. package/dist/worker/mutation-error-delivery.d.ts +8 -0
  1425. package/dist/worker/mutation-error-delivery.d.ts.map +1 -0
  1426. package/dist/worker/mutation-error-delivery.js +10 -0
  1427. package/dist/worker/mutation-error-delivery.js.map +1 -0
  1428. package/package.json +248 -30
  1429. package/bin/native/.gitkeep +0 -0
  1430. package/bin/native/jazz-tools-darwin-arm64 +0 -0
  1431. package/bin/native/jazz-tools-darwin-x64 +0 -0
  1432. package/bin/native/jazz-tools-linux-arm64 +0 -0
  1433. package/bin/native/jazz-tools-linux-x64 +0 -0
  1434. package/bin/native/jazz-tools-windows-x64.exe +0 -0
  1435. package/dist/cli.test.d.ts +0 -2
  1436. package/dist/cli.test.d.ts.map +0 -1
  1437. package/dist/cli.test.js +0 -154
  1438. package/dist/cli.test.js.map +0 -1
  1439. package/dist/codegen/codegen.test.d.ts +0 -2
  1440. package/dist/codegen/codegen.test.d.ts.map +0 -1
  1441. package/dist/codegen/codegen.test.js +0 -844
  1442. package/dist/codegen/codegen.test.js.map +0 -1
  1443. package/dist/codegen/index.d.ts +0 -18
  1444. package/dist/codegen/index.d.ts.map +0 -1
  1445. package/dist/codegen/index.js +0 -22
  1446. package/dist/codegen/index.js.map +0 -1
  1447. package/dist/codegen/query-builder-generator.d.ts +0 -23
  1448. package/dist/codegen/query-builder-generator.d.ts.map +0 -1
  1449. package/dist/codegen/query-builder-generator.js +0 -325
  1450. package/dist/codegen/query-builder-generator.js.map +0 -1
  1451. package/dist/codegen/type-generator.d.ts +0 -29
  1452. package/dist/codegen/type-generator.d.ts.map +0 -1
  1453. package/dist/codegen/type-generator.js +0 -226
  1454. package/dist/codegen/type-generator.js.map +0 -1
  1455. package/dist/dsl.test.d.ts +0 -2
  1456. package/dist/dsl.test.d.ts.map +0 -1
  1457. package/dist/dsl.test.js +0 -51
  1458. package/dist/dsl.test.js.map +0 -1
  1459. package/dist/permissions/index.test.d.ts +0 -2
  1460. package/dist/permissions/index.test.d.ts.map +0 -1
  1461. package/dist/permissions/index.test.js +0 -830
  1462. package/dist/permissions/index.test.js.map +0 -1
  1463. package/dist/permissions/type-inference.test.d.ts +0 -2
  1464. package/dist/permissions/type-inference.test.d.ts.map +0 -1
  1465. package/dist/permissions/type-inference.test.js +0 -151
  1466. package/dist/permissions/type-inference.test.js.map +0 -1
  1467. package/dist/react/create-jazz-client.integration.test.d.ts +0 -2
  1468. package/dist/react/create-jazz-client.integration.test.d.ts.map +0 -1
  1469. package/dist/react/create-jazz-client.integration.test.js +0 -84
  1470. package/dist/react/create-jazz-client.integration.test.js.map +0 -1
  1471. package/dist/react/create-jazz-client.test.d.ts +0 -2
  1472. package/dist/react/create-jazz-client.test.d.ts.map +0 -1
  1473. package/dist/react/create-jazz-client.test.js +0 -133
  1474. package/dist/react/create-jazz-client.test.js.map +0 -1
  1475. package/dist/react/synthetic-user-switcher.d.ts +0 -9
  1476. package/dist/react/synthetic-user-switcher.d.ts.map +0 -1
  1477. package/dist/react/synthetic-user-switcher.js +0 -65
  1478. package/dist/react/synthetic-user-switcher.js.map +0 -1
  1479. package/dist/react/synthetic-users.d.ts +0 -2
  1480. package/dist/react/synthetic-users.d.ts.map +0 -1
  1481. package/dist/react/synthetic-users.js +0 -2
  1482. package/dist/react/synthetic-users.js.map +0 -1
  1483. package/dist/react/synthetic-users.test.d.ts +0 -2
  1484. package/dist/react/synthetic-users.test.d.ts.map +0 -1
  1485. package/dist/react/synthetic-users.test.js +0 -43
  1486. package/dist/react/synthetic-users.test.js.map +0 -1
  1487. package/dist/react/use-link-external-identity.d.ts +0 -25
  1488. package/dist/react/use-link-external-identity.d.ts.map +0 -1
  1489. package/dist/react/use-link-external-identity.js +0 -45
  1490. package/dist/react/use-link-external-identity.js.map +0 -1
  1491. package/dist/react-native/create-jazz-client.test.d.ts +0 -2
  1492. package/dist/react-native/create-jazz-client.test.d.ts.map +0 -1
  1493. package/dist/react-native/create-jazz-client.test.js +0 -162
  1494. package/dist/react-native/create-jazz-client.test.js.map +0 -1
  1495. package/dist/react-native/create-jazz-rn-runtime.d.ts +0 -13
  1496. package/dist/react-native/create-jazz-rn-runtime.d.ts.map +0 -1
  1497. package/dist/react-native/create-jazz-rn-runtime.js +0 -7
  1498. package/dist/react-native/create-jazz-rn-runtime.js.map +0 -1
  1499. package/dist/react-native/db.d.ts +0 -16
  1500. package/dist/react-native/db.d.ts.map +0 -1
  1501. package/dist/react-native/db.js +0 -50
  1502. package/dist/react-native/db.js.map +0 -1
  1503. package/dist/react-native/db.test.d.ts +0 -2
  1504. package/dist/react-native/db.test.d.ts.map +0 -1
  1505. package/dist/react-native/db.test.js +0 -150
  1506. package/dist/react-native/db.test.js.map +0 -1
  1507. package/dist/react-native/jazz-rn-runtime-adapter.d.ts +0 -56
  1508. package/dist/react-native/jazz-rn-runtime-adapter.d.ts.map +0 -1
  1509. package/dist/react-native/jazz-rn-runtime-adapter.js +0 -192
  1510. package/dist/react-native/jazz-rn-runtime-adapter.js.map +0 -1
  1511. package/dist/react-native/jazz-rn-runtime-adapter.test.d.ts +0 -2
  1512. package/dist/react-native/jazz-rn-runtime-adapter.test.d.ts.map +0 -1
  1513. package/dist/react-native/jazz-rn-runtime-adapter.test.js +0 -165
  1514. package/dist/react-native/jazz-rn-runtime-adapter.test.js.map +0 -1
  1515. package/dist/runtime/client-session.test.d.ts +0 -2
  1516. package/dist/runtime/client-session.test.d.ts.map +0 -1
  1517. package/dist/runtime/client-session.test.js +0 -84
  1518. package/dist/runtime/client-session.test.js.map +0 -1
  1519. package/dist/runtime/client.for-request.test.d.ts +0 -2
  1520. package/dist/runtime/client.for-request.test.d.ts.map +0 -1
  1521. package/dist/runtime/client.for-request.test.js +0 -171
  1522. package/dist/runtime/client.for-request.test.js.map +0 -1
  1523. package/dist/runtime/cloud-server.integration.test.d.ts +0 -2
  1524. package/dist/runtime/cloud-server.integration.test.d.ts.map +0 -1
  1525. package/dist/runtime/cloud-server.integration.test.js +0 -985
  1526. package/dist/runtime/cloud-server.integration.test.js.map +0 -1
  1527. package/dist/runtime/leader-lock.d.ts +0 -15
  1528. package/dist/runtime/leader-lock.d.ts.map +0 -1
  1529. package/dist/runtime/leader-lock.js +0 -49
  1530. package/dist/runtime/leader-lock.js.map +0 -1
  1531. package/dist/runtime/local-auth.d.ts +0 -32
  1532. package/dist/runtime/local-auth.d.ts.map +0 -1
  1533. package/dist/runtime/local-auth.js +0 -93
  1534. package/dist/runtime/local-auth.js.map +0 -1
  1535. package/dist/runtime/local-auth.test.d.ts +0 -2
  1536. package/dist/runtime/local-auth.test.d.ts.map +0 -1
  1537. package/dist/runtime/local-auth.test.js +0 -50
  1538. package/dist/runtime/local-auth.test.js.map +0 -1
  1539. package/dist/runtime/query-adapter.test.d.ts +0 -5
  1540. package/dist/runtime/query-adapter.test.d.ts.map +0 -1
  1541. package/dist/runtime/query-adapter.test.js +0 -1209
  1542. package/dist/runtime/query-adapter.test.js.map +0 -1
  1543. package/dist/runtime/row-transformer.test.d.ts +0 -5
  1544. package/dist/runtime/row-transformer.test.d.ts.map +0 -1
  1545. package/dist/runtime/row-transformer.test.js +0 -364
  1546. package/dist/runtime/row-transformer.test.js.map +0 -1
  1547. package/dist/runtime/subscription-manager.test.d.ts +0 -5
  1548. package/dist/runtime/subscription-manager.test.d.ts.map +0 -1
  1549. package/dist/runtime/subscription-manager.test.js +0 -120
  1550. package/dist/runtime/subscription-manager.test.js.map +0 -1
  1551. package/dist/runtime/sync-transport.d.ts +0 -163
  1552. package/dist/runtime/sync-transport.d.ts.map +0 -1
  1553. package/dist/runtime/sync-transport.js +0 -477
  1554. package/dist/runtime/sync-transport.js.map +0 -1
  1555. package/dist/runtime/sync-transport.test.d.ts +0 -2
  1556. package/dist/runtime/sync-transport.test.d.ts.map +0 -1
  1557. package/dist/runtime/sync-transport.test.js +0 -310
  1558. package/dist/runtime/sync-transport.test.js.map +0 -1
  1559. package/dist/runtime/tab-leader-election.d.ts +0 -97
  1560. package/dist/runtime/tab-leader-election.d.ts.map +0 -1
  1561. package/dist/runtime/tab-leader-election.js +0 -339
  1562. package/dist/runtime/tab-leader-election.js.map +0 -1
  1563. package/dist/runtime/tab-leader-election.test.d.ts +0 -2
  1564. package/dist/runtime/tab-leader-election.test.d.ts.map +0 -1
  1565. package/dist/runtime/tab-leader-election.test.js +0 -278
  1566. package/dist/runtime/tab-leader-election.test.js.map +0 -1
  1567. package/dist/runtime/testing/wasm-runtime-test-utils.d.ts +0 -13
  1568. package/dist/runtime/testing/wasm-runtime-test-utils.d.ts.map +0 -1
  1569. package/dist/runtime/testing/wasm-runtime-test-utils.js +0 -75
  1570. package/dist/runtime/testing/wasm-runtime-test-utils.js.map +0 -1
  1571. package/dist/runtime/utils.d.ts +0 -2
  1572. package/dist/runtime/utils.d.ts.map +0 -1
  1573. package/dist/runtime/utils.js +0 -16
  1574. package/dist/runtime/utils.js.map +0 -1
  1575. package/dist/runtime/value-converter.test.d.ts +0 -5
  1576. package/dist/runtime/value-converter.test.d.ts.map +0 -1
  1577. package/dist/runtime/value-converter.test.js +0 -212
  1578. package/dist/runtime/value-converter.test.js.map +0 -1
  1579. package/dist/runtime/worker-bridge.d.ts +0 -86
  1580. package/dist/runtime/worker-bridge.d.ts.map +0 -1
  1581. package/dist/runtime/worker-bridge.js +0 -250
  1582. package/dist/runtime/worker-bridge.js.map +0 -1
  1583. package/dist/runtime/worker-bridge.race-harness.test.d.ts +0 -2
  1584. package/dist/runtime/worker-bridge.race-harness.test.d.ts.map +0 -1
  1585. package/dist/runtime/worker-bridge.race-harness.test.js +0 -265
  1586. package/dist/runtime/worker-bridge.race-harness.test.js.map +0 -1
  1587. package/dist/runtime/worker-bridge.test.d.ts +0 -2
  1588. package/dist/runtime/worker-bridge.test.d.ts.map +0 -1
  1589. package/dist/runtime/worker-bridge.test.js +0 -233
  1590. package/dist/runtime/worker-bridge.test.js.map +0 -1
  1591. package/dist/sql-gen.d.ts +0 -4
  1592. package/dist/sql-gen.d.ts.map +0 -1
  1593. package/dist/sql-gen.js +0 -163
  1594. package/dist/sql-gen.js.map +0 -1
  1595. package/dist/sql-gen.test.d.ts +0 -2
  1596. package/dist/sql-gen.test.d.ts.map +0 -1
  1597. package/dist/sql-gen.test.js +0 -412
  1598. package/dist/sql-gen.test.js.map +0 -1
  1599. package/dist/subscriptions-orchestrator.integration.test.d.ts +0 -2
  1600. package/dist/subscriptions-orchestrator.integration.test.d.ts.map +0 -1
  1601. package/dist/subscriptions-orchestrator.integration.test.js +0 -194
  1602. package/dist/subscriptions-orchestrator.integration.test.js.map +0 -1
  1603. package/dist/subscriptions-orchestrator.test.d.ts +0 -2
  1604. package/dist/subscriptions-orchestrator.test.d.ts.map +0 -1
  1605. package/dist/subscriptions-orchestrator.test.js +0 -367
  1606. package/dist/subscriptions-orchestrator.test.js.map +0 -1
  1607. package/dist/svelte/SyntheticUserSwitcher.svelte +0 -121
  1608. package/dist/svelte/SyntheticUserSwitcher.svelte.d.ts +0 -11
  1609. package/dist/svelte/SyntheticUserSwitcher.svelte.d.ts.map +0 -1
  1610. package/dist/svelte/context.test.d.ts +0 -2
  1611. package/dist/svelte/context.test.d.ts.map +0 -1
  1612. package/dist/svelte/context.test.js +0 -51
  1613. package/dist/svelte/create-jazz-client.test.d.ts +0 -2
  1614. package/dist/svelte/create-jazz-client.test.d.ts.map +0 -1
  1615. package/dist/svelte/create-jazz-client.test.js +0 -50
  1616. package/dist/svelte/use-all.svelte.d.ts +0 -32
  1617. package/dist/svelte/use-all.svelte.d.ts.map +0 -1
  1618. package/dist/svelte/use-all.svelte.js +0 -61
  1619. package/dist/svelte/use-all.test.d.ts +0 -2
  1620. package/dist/svelte/use-all.test.d.ts.map +0 -1
  1621. package/dist/svelte/use-all.test.js +0 -154
  1622. package/dist/svelte/use-link-external-identity.d.ts +0 -25
  1623. package/dist/svelte/use-link-external-identity.d.ts.map +0 -1
  1624. package/dist/svelte/use-link-external-identity.js +0 -33
  1625. package/dist/svelte/use-link-external-identity.test.d.ts +0 -2
  1626. package/dist/svelte/use-link-external-identity.test.d.ts.map +0 -1
  1627. package/dist/svelte/use-link-external-identity.test.js +0 -97
  1628. package/dist/synthetic-user-switcher.d.ts +0 -16
  1629. package/dist/synthetic-user-switcher.d.ts.map +0 -1
  1630. package/dist/synthetic-user-switcher.js +0 -134
  1631. package/dist/synthetic-user-switcher.js.map +0 -1
  1632. package/dist/synthetic-users.d.ts +0 -32
  1633. package/dist/synthetic-users.d.ts.map +0 -1
  1634. package/dist/synthetic-users.js +0 -124
  1635. package/dist/synthetic-users.js.map +0 -1
  1636. package/dist/testing/fixtures/basic/app.d.ts +0 -55
  1637. package/dist/testing/fixtures/basic/app.d.ts.map +0 -1
  1638. package/dist/testing/fixtures/basic/app.js +0 -176
  1639. package/dist/testing/fixtures/basic/app.js.map +0 -1
  1640. package/dist/testing/fixtures/basic/current.d.ts +0 -2
  1641. package/dist/testing/fixtures/basic/current.d.ts.map +0 -1
  1642. package/dist/testing/fixtures/basic/current.js +0 -6
  1643. package/dist/testing/fixtures/basic/current.js.map +0 -1
  1644. package/dist/testing/index.test.d.ts +0 -2
  1645. package/dist/testing/index.test.d.ts.map +0 -1
  1646. package/dist/testing/index.test.js +0 -234
  1647. package/dist/testing/index.test.js.map +0 -1
  1648. package/dist/testing/local-jazz-server.d.ts +0 -34
  1649. package/dist/testing/local-jazz-server.d.ts.map +0 -1
  1650. package/dist/testing/local-jazz-server.js +0 -313
  1651. package/dist/testing/local-jazz-server.js.map +0 -1
  1652. package/dist/worker/jazz-worker.d.ts +0 -9
  1653. package/dist/worker/jazz-worker.d.ts.map +0 -1
  1654. package/dist/worker/jazz-worker.js +0 -516
  1655. package/dist/worker/jazz-worker.js.map +0 -1
  1656. package/dist/worker/jazz-worker.ts +0 -581
  1657. package/dist/worker/worker-protocol.d.ts +0 -136
  1658. package/dist/worker/worker-protocol.d.ts.map +0 -1
  1659. package/dist/worker/worker-protocol.js +0 -7
  1660. package/dist/worker/worker-protocol.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-foreground-db.js","sourceRoot":"","sources":["../../src/react-native/native-foreground-db.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AA8B7D;;;;;;;GAOG;AACH;;;;;;;;GAQG;AACH,MAAM,OAAO,kBAAkB;IAeV;IACA;IAfX,MAAM,GAAG,KAAK,CAAC;IACf,qBAAqB,CAAoD;IACzE,oBAAoB,CAAyC;IACrE,2EAA2E;IACnE,qBAAqB,GAAG,CAAC,CAAC;IAC1B,uBAAuB,CAAgE;IAC/F,2EAA2E;IACnE,uBAAuB,GAAmD,IAAI,CAAC;IACtE,YAAY,GAAG,IAAI,GAAG,EAAuC,CAAC;IAC/E,oEAAoE;IAC5D,uBAAuB,GAAG,KAAK,CAAC;IAChC,6BAA6B,GAAG,KAAK,CAAC;IAE9C,YACmB,OA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CAAC,EAAE,CAAC,CAAC;IACrF,OAAO,GAAG,CAAC;AACb,CAAC;AAED,kEAAkE;AAClE,SAAS,cAAc,CAAC,KAAc;IACpC,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO,OAAO,CAAC,QAAQ,CAAC,+BAA+B,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["import type * as Relay from \"jazz-rn/relay\";\nimport type { MutationErrorEvent } from \"../runtime/client.js\";\nimport { UnsupportedSnapshotError } from \"../runtime/snapshot-ref.js\";\nimport { REACT_NATIVE_UNSUPPORTED_ERROR } from \"./errors.js\";\n\n// The foreground command vocabulary is owned by jazz-rn. This module is\n// internal: no public declaration of jazz-tools reaches it, so applications\n// never need the optional jazz-rn peer to type-check.\ntype ForegroundCommand = Relay.NativeForegroundCommand;\ntype ForegroundResponse = Relay.NativeForegroundResponse;\ntype ForegroundMutationKind = Extract<ForegroundCommand, { type: \"directMutation\" }>[\"mutation\"];\ntype NativeConnectionStatus = Extract<ForegroundResponse, { type: \"nativeConnectionStatus\" }>;\n/** An upstream connection failure other than a refused credential (#4337). */\nexport type NativeUpstreamFailure = { reason: string; retrying: boolean };\ntype ForegroundMutationOptions = {\n rowId?: Uint8Array;\n branch?: unknown;\n head?: unknown;\n base?: unknown;\n updatedAtMs?: number;\n author?: Uint8Array;\n attribution?: Uint8Array;\n};\n\nexport type NativeForegroundRuntime = Relay.NativeForegroundRuntime;\nexport type NativeForegroundFactory = Relay.NativeForegroundRuntimeFactory;\nexport type NativeForegroundModule = Pick<\n typeof Relay,\n | \"installNativeForegroundRuntime\"\n | \"encodeNativeForegroundCommand\"\n | \"decodeNativeForegroundResponse\"\n>;\n\n/**\n * Narrow NativeDb consumer for the first JSI foreground slice.\n *\n * Rows and subscription deltas stay in the ordinary binding byte format, so\n * NativeRuntimeAdapter remains the sole schema-aware decoder. This is not a\n * second object-shaped database facade and intentionally grows only as the\n * shared Rust command ABI grows.\n */\n/**\n * Thin `NativeDb` adapter over the native foreground command ABI.\n *\n * This deliberately contains no row, query, or mutation interpretation: the\n * normal `NativeRuntimeAdapter` owns the public API and existing codecs. A\n * direct mutation is represented by one ordinary native mergeable transaction;\n * explicit public transactions retain their native transaction handle until\n * commit/rollback.\n */\nexport class NativeForegroundDb {\n private closed = false;\n private mutationErrorCallback: ((event: MutationErrorEvent) => void) | undefined;\n private authRejectedCallback: ((reason: string) => void) | undefined;\n /** The sequence of the refusal last reported, so each is reported once. */\n private reportedAuthRejection = 0;\n private upstreamFailureCallback: ((failure: NativeUpstreamFailure | null) => void) | undefined;\n /** The upstream failure last reported, so each change is reported once. */\n private reportedUpstreamFailure: { sequence: number; retrying: boolean } | null = null;\n private readonly transactions = new Map<string, NativeForegroundTransaction>();\n /** A native build without the (append-only) slow-query commands. */\n private slowQueryLogUnsupported = false;\n private pendingUploadCountUnsupported = false;\n\n constructor(\n private readonly runtime: NativeForegroundRuntime,\n private readonly commands: NativeForegroundModule,\n ) {}\n\n setTickScheduler(callback: (first: Error | string | null, second?: string) => void): void {\n if (!this.runtime.setTickScheduler) {\n throw new Error(\n \"React Native native foreground runtime does not expose owner wake scheduling\",\n );\n }\n this.runtime.setTickScheduler((urgency) => {\n // Native invalidation clears the JSI registration first, but a\n // CallInvoker task may already have crossed into JS when close races\n // teardown. Do not let that stale task re-enter the adapter after its\n // foreground facade has become unusable.\n if (!this.closed) callback(urgency);\n });\n }\n\n onMutationError(callback: (event: MutationErrorEvent) => void): void {\n this.assertOpen();\n this.mutationErrorCallback = callback;\n }\n\n /**\n * Observe the upstream refusing the scope's credential. The refusal is auth\n * state, not a failed tick: local ticks keep running, and the tick that\n * first sees a refusal reports it once, so the app can renew the\n * credential (#4248, #4296).\n */\n onAuthRejected(callback: (reason: string) => void): void {\n this.assertOpen();\n this.authRejectedCallback = callback;\n }\n\n /**\n * Observe the scope's upstream connection failing for a reason other than\n * its credential, and recovering (`null`). A failure is connection state,\n * not a failed tick: local ticks keep running (#4337).\n */\n onUpstreamFailure(callback: (failure: NativeUpstreamFailure | null) => void): void {\n this.assertOpen();\n this.upstreamFailureCallback = callback;\n }\n\n all(\n query: Uint8Array,\n opts: unknown,\n openTransactionId?: string,\n ): Uint8Array | { poll(): Uint8Array | null; cancel(): void } {\n const transaction =\n openTransactionId === undefined\n ? undefined\n : this.openTransaction(openTransactionId, \"read\").handle;\n // No tick here: the native relay owner applies admitted writes and pumps\n // on its own thread. The read is fenced natively behind every write\n // admitted before it, so it resolves (possibly as pending) with them.\n const response = this.execute({\n type: \"all\",\n query,\n optionsJson: JSON.stringify(opts ?? {}),\n transaction,\n });\n if (response.type === \"rows\") return response.rows;\n if (response.type === \"operationError\") throw foregroundOperationError(response);\n if (response.type === \"pending\") return this.pendingRows(response.operation);\n return unexpected(\"all\", response.type);\n }\n\n captureSnapshot(): Uint8Array | { poll(): Uint8Array | null; cancel(): void } {\n this.assertOpen();\n if (this.runtime.supportsSnapshotCapture !== true) {\n throw new UnsupportedSnapshotError(\n \"Capturing snapshots requires a newer Jazz native build; rebuild the native app to use captureSnapshot()\",\n );\n }\n const response = this.execute({ type: \"captureSnapshot\" });\n if (response.type === \"operationError\") throw foregroundOperationError(response);\n if (response.type === \"rows\") return response.rows;\n if (response.type === \"pending\") return this.pendingRows(response.operation);\n return unexpected(\"captureSnapshot\", response.type);\n }\n\n // The shared mutation adapter needs one exact local row, without coverage\n // registration or hydration, to merge staged patches synchronously.\n localCurrentRow(table: string, rowId: Uint8Array): Uint8Array {\n const response = this.execute({ type: \"localCurrentRow\", table, rowId });\n if (response.type === \"operationError\") throw foregroundOperationError(response);\n if (response.type !== \"rows\") return unexpected(\"localCurrentRow\", response.type);\n return response.rows;\n }\n\n subscribe(query: Uint8Array, opts: unknown): NativeForegroundSubscription {\n // Fenced natively like `all()`: the first frame reflects earlier writes.\n const response = this.execute({\n type: \"subscribe\",\n query,\n optionsJson: JSON.stringify(opts ?? {}),\n });\n if (response.type === \"operationError\") throw foregroundOperationError(response);\n if (response.type !== \"subscribed\") return unexpected(\"subscribe\", response.type);\n return new NativeForegroundSubscription(response.subscription, this);\n }\n\n tick(): void {\n this.assertOpen();\n this.runtime.tick();\n if (!this.mutationErrorCallback && !this.authRejectedCallback && !this.upstreamFailureCallback)\n return;\n // One call drains everything a tick reports.\n const response = this.execute({ type: \"drainTickEvents\" });\n if (response.type === \"operationError\") throw foregroundOperationError(response);\n if (response.type !== \"tickEvents\") return unexpected(\"drainTickEvents\", response.type);\n const rejection = response.authRejection;\n if (rejection && rejection.sequence !== this.reportedAuthRejection) {\n this.reportedAuthRejection = rejection.sequence;\n queueMicrotask(() => {\n if (!this.closed) this.authRejectedCallback?.(rejection.reason);\n });\n }\n const failure = response.upstreamFailure;\n const reported = this.reportedUpstreamFailure;\n if (\n failure\n ? failure.sequence !== reported?.sequence || failure.retrying !== reported.retrying\n : reported\n ) {\n this.reportedUpstreamFailure = failure && {\n sequence: failure.sequence,\n retrying: failure.retrying,\n };\n const change = failure && { reason: failure.reason, retrying: failure.retrying };\n queueMicrotask(() => {\n if (!this.closed) this.upstreamFailureCallback?.(change);\n });\n }\n // The drain claims mutation errors; with no observer they are dropped.\n if (!this.mutationErrorCallback) return;\n const events = JSON.parse(response.eventsJson) as MutationErrorEvent[];\n for (const event of events)\n queueMicrotask(() => {\n if (!this.closed) this.mutationErrorCallback?.(event);\n });\n }\n\n close(): boolean {\n if (this.closed) return false;\n this.closed = true;\n this.transactions.clear();\n try {\n const response = this.executeAllowClosed(\"close\");\n if (response.type !== \"closed\") return unexpected(\"close\", response.type);\n return response.closed;\n } finally {\n // The command owns logical Db closure. The HostObject close releases the\n // JSI handle and is deliberately safe to call after that transition.\n // It must also run when command execution fails (for example, because a\n // platform logout revoked the capability just before this call).\n this.runtime.close();\n }\n }\n\n /**\n * The slow-query report due now: one line per slow query shape, naming\n * `app`. An older native build without the command reports nothing.\n */\n takeSlowQueryReport(app?: string): string[] {\n if (this.slowQueryLogUnsupported || this.closed) return [];\n let response: ForegroundResponse;\n try {\n response = this.execute({ type: \"takeSlowQueryReport\", app });\n } catch {\n this.slowQueryLogUnsupported = true;\n return [];\n }\n if (response.type !== \"slowQueryReport\") {\n this.slowQueryLogUnsupported = true;\n return [];\n }\n return response.lines;\n }\n\n /**\n * How many of this foreground's commits still wait for the server's\n * verdict. An older native build without the command reports none.\n */\n pendingUploadCount(): number {\n if (this.pendingUploadCountUnsupported || this.closed) return 0;\n let response: ForegroundResponse;\n try {\n response = this.execute({ type: \"pendingUploadCount\" });\n } catch (error) {\n // An older host rejects the unknown command (InvalidCommand). A busy\n // host or a revoked handle is transient and must not disable the count.\n if (rejectsCommand(error)) this.pendingUploadCountUnsupported = true;\n return 0;\n }\n if (response.type !== \"pendingUploadCount\") {\n this.pendingUploadCountUnsupported = true;\n return 0;\n }\n return response.count;\n }\n\n /** Report query runs of at least `ms` milliseconds; 0 turns the log off. */\n setSlowQueryThresholdMs(ms: number): void {\n if (this.slowQueryLogUnsupported || this.closed) return;\n let response: ForegroundResponse;\n try {\n response = this.execute({ type: \"setSlowQueryThresholdMs\", ms: Math.round(ms) });\n } catch {\n this.slowQueryLogUnsupported = true;\n return;\n }\n if (response.type !== \"slowQueryThresholdSet\") this.slowQueryLogUnsupported = true;\n }\n\n isNativeForegroundClosed(): boolean {\n // Only a typed native closed/revoked receipt suppresses a stale wake.\n // Missing support or any unexpected native/probe failure is not closure.\n return this.closed || this.runtime.isClosed?.() === true;\n }\n\n nativeSessionMetadata(): {\n node: Uint8Array;\n registryAuthority: string;\n accountId: string | null;\n issuer: string;\n userId: string;\n } {\n const response = this.execute({ type: \"nativeSessionMetadata\" });\n if (response.type !== \"nativeSessionMetadata\")\n return unexpected(\"nativeSessionMetadata\", response.type);\n return response;\n }\n\n disconnectNativeUpstream(): void {\n const response = this.execute({ type: \"disconnectNativeUpstream\" });\n if (response.type !== \"nativeConnectionStatus\")\n return unexpected(\"disconnectNativeUpstream\", response.type);\n }\n\n reconnectNativeUpstream(): void {\n const response = this.execute({ type: \"reconnectNativeUpstream\" });\n if (response.type !== \"nativeConnectionStatus\")\n return unexpected(\"reconnectNativeUpstream\", response.type);\n }\n\n nativeConnectionStatus(): NativeConnectionStatus {\n const response = this.execute({ type: \"nativeConnectionStatus\" });\n if (response.type !== \"nativeConnectionStatus\")\n return unexpected(\"nativeConnectionStatus\", response.type);\n return response;\n }\n\n rejectAuthUpdate(): never {\n throw new Error(\n \"React Native native foreground cannot rotate authentication in place; keep the existing admitted session or revoke the old native capability and create a new Db for the newly admitted session\",\n );\n }\n\n drain(subscription: number, operation?: number): unknown[] | { pendingOperation: number } {\n const response =\n operation === undefined\n ? this.execute({ type: \"drainSubscription\", subscription })\n : this.execute({ type: \"poll\", operation });\n if (response.type === \"pending\") return { pendingOperation: response.operation };\n if (response.type === \"operationError\") {\n throw foregroundOperationError({\n ...response,\n reason: `React Native native foreground subscription failed: ${response.reason}`,\n });\n }\n if (response.type !== \"subscriptionEvents\")\n return unexpected(\"drainSubscription\", response.type);\n return response.events.map((event) => {\n if (event.type === \"delta\") return event;\n if (event.type === \"closed\") return event;\n return {\n type: \"rejected\",\n reason: { type: \"ServerFailure\", code: event.reason },\n };\n });\n }\n\n unsubscribe(subscription: number): boolean {\n if (this.closed) return false;\n const response = this.execute({ type: \"unsubscribe\", subscription });\n if (response.type !== \"unsubscribed\") return unexpected(\"unsubscribe\", response.type);\n // Native unsubscribe retires the stream handle synchronously but queues\n // its core cleanup for the following ordinary turn. Drive that turn here:\n // after the JS reader stops polling there may be no unrelated operation\n // to do it for us.\n if (response.closed) this.tick();\n return response.closed;\n }\n\n requestInsertPermissionAdvice(table: string, cells: Uint8Array) {\n return this.requestPermissionAdvice({ type: \"insert\", table, cells });\n }\n\n requestReadPermissionAdvice(table: string, rowId: Uint8Array) {\n return this.requestPermissionAdvice({ type: \"read\", table, rowId });\n }\n\n requestUpdatePermissionAdvice(table: string, rowId: Uint8Array, patch: Uint8Array) {\n return this.requestPermissionAdvice({ type: \"update\", table, rowId, patch });\n }\n\n requestDeletePermissionAdvice(table: string, rowId: Uint8Array) {\n return this.requestPermissionAdvice({ type: \"delete\", table, rowId });\n }\n\n private requestPermissionAdvice(action: Relay.NativeForegroundPermissionAdviceAction) {\n let response = this.execute({ type: \"permissionAdvice\", action });\n if (response.type === \"permissionAdvice\") return response.advice;\n if (response.type === \"operationError\") throw foregroundOperationError(response);\n if (response.type !== \"pending\") return unexpected(\"permissionAdvice\", response.type);\n const operation = response.operation;\n let completed = false;\n return {\n poll: (): string | null => {\n if (completed || this.closed) return \"unknown\";\n this.tick();\n response = this.execute({ type: \"poll\", operation });\n if (response.type === \"pending\") return null;\n completed = true;\n if (response.type === \"operationError\") throw foregroundOperationError(response);\n if (response.type !== \"permissionAdvice\")\n return unexpected(\"permissionAdvice\", response.type);\n return response.advice;\n },\n cancel: (): boolean => {\n if (completed || this.closed) return false;\n completed = true;\n const cancelled = this.execute({ type: \"cancel\", operation });\n if (cancelled.type !== \"cancelled\")\n return unexpected(\"permissionAdvice cancellation\", cancelled.type);\n return cancelled.cancelled;\n },\n };\n }\n\n /**\n * Resolve once every local write so far reached `tier`. A wait that does\n * not settle at once is a pollable read, so a caller that stops waiting\n * cancels it.\n */\n waitForPendingWrites(\n tier: string,\n ): Uint8Array | { poll(): Uint8Array | null; cancel(): boolean } {\n let response = this.execute({ type: \"waitForPendingWrites\", tier });\n const settle = (): Uint8Array => {\n if (response.type === \"operationError\") throw foregroundOperationError(response);\n if (response.type !== \"rows\" || response.rows.length !== 0)\n return unexpected(\"waitForPendingWrites\", response.type);\n return response.rows;\n };\n if (response.type !== \"pending\") return settle();\n const operation = response.operation;\n let completed = false;\n return {\n poll: (): Uint8Array | null => {\n if (completed || this.closed) throw new Error(\"waitForPendingWrites was cancelled\");\n this.tick();\n response = this.execute({ type: \"poll\", operation });\n if (response.type === \"pending\") return null;\n completed = true;\n return settle();\n },\n cancel: (): boolean => {\n if (completed || this.closed) return false;\n completed = true;\n const cancelled = this.execute({ type: \"cancel\", operation });\n if (cancelled.type !== \"cancelled\")\n return unexpected(\"waitForPendingWrites cancellation\", cancelled.type);\n return cancelled.cancelled;\n },\n };\n }\n\n async waitForTransaction(txId: Uint8Array, tier: string, observeOnly = false): Promise<void> {\n if (![\"local\", \"global\"].includes(tier)) {\n throw new Error(`Unsupported write durability tier: ${tier}`);\n }\n let response = this.execute({ type: \"waitForTransaction\", txId, tier, observeOnly });\n while (response.type === \"pending\") {\n const operation = response.operation;\n await new Promise<void>((resolve) => setTimeout(resolve, 0));\n this.tick();\n response = this.execute({ type: \"poll\", operation });\n }\n if (response.type === \"operationError\") throw foregroundOperationError(response);\n if (response.type !== \"transactionSettled\")\n return unexpected(\"waitForTransaction\", response.type);\n }\n\n private execute(command: ForegroundCommand): ForegroundResponse {\n this.assertOpen();\n return this.executeAllowClosed(command);\n }\n\n private pendingRows(operation: number): { poll(): Uint8Array | null; cancel(): void } {\n let completed = false;\n return {\n poll: () => {\n if (completed) throw new Error(\"Native foreground read is already complete\");\n this.tick();\n const response = this.execute({ type: \"poll\", operation });\n if (response.type === \"pending\") return null;\n completed = true;\n if (response.type === \"operationError\") {\n throw foregroundOperationError({\n ...response,\n reason: `React Native native foreground read failed: ${response.reason}`,\n });\n }\n if (response.type !== \"rows\") return unexpected(\"poll\", response.type);\n return response.rows;\n },\n cancel: () => {\n if (completed || this.closed) return;\n completed = true;\n const response = this.execute({ type: \"cancel\", operation });\n if (response.type !== \"cancelled\") return unexpected(\"read cancellation\", response.type);\n },\n };\n }\n\n private executeAllowClosed(command: ForegroundCommand): ForegroundResponse {\n return this.commands.decodeNativeForegroundResponse(\n this.runtime.execute(this.commands.encodeNativeForegroundCommand(command)),\n );\n }\n\n private assertOpen(): void {\n if (this.closed) throw new Error(\"React Native native foreground runtime is closed\");\n }\n\n // The admitted native host already owns and validates the schema. A schema\n // view therefore shares this foreground rather than opening a second store.\n registerSchema(): NativeForegroundDb {\n return this;\n }\n\n beginTransaction(openTransactionId: string, kind: \"mergeable\" | \"serializable\"): void {\n this.assertOpen();\n if (this.transactions.has(openTransactionId)) {\n throw new Error(\n `React Native native foreground transaction ${openTransactionId} is already open`,\n );\n }\n const response = this.execute({ type: \"beginTransaction\", kind });\n if (response.type !== \"transactionOpened\") return unexpected(\"beginTransaction\", response.type);\n this.transactions.set(openTransactionId, {\n handle: response.transaction,\n kind,\n closed: false,\n });\n }\n\n commitTransaction(openTransactionId: string): NativeForegroundWrite {\n const transaction = this.openTransaction(openTransactionId, \"commit\");\n const response = this.execute({\n type: \"commitTransaction\",\n transaction: transaction.handle,\n });\n if (response.type === \"operationError\") throw foregroundOperationError(response);\n if (response.type !== \"transactionCommitted\")\n return unexpected(\"commitTransaction\", response.type);\n this.transactions.delete(openTransactionId);\n transaction.closed = true;\n return nativeWrite(this, response.txId);\n }\n\n rollbackTransaction(openTransactionId: string): void {\n const transaction = this.openTransaction(openTransactionId, \"rollback\");\n const response = this.execute({\n type: \"rollbackTransaction\",\n transaction: transaction.handle,\n });\n if (response.type !== \"transactionRolledBack\")\n return unexpected(\"rollbackTransaction\", response.type);\n this.transactions.delete(openTransactionId);\n transaction.closed = true;\n }\n\n insert(\n table: string,\n cells: Uint8Array,\n options?: ForegroundMutationOptions,\n ): NativeForegroundWrite {\n return this.directMutation(\"insert\", table, options?.rowId, cells, options);\n }\n\n insertInTransaction(\n openTransactionId: string,\n table: string,\n cells: Uint8Array,\n options?: ForegroundMutationOptions,\n ): Uint8Array {\n return this.stageMutation(\n this.openTransaction(openTransactionId, \"insert into\"),\n \"insert\",\n table,\n options?.rowId,\n cells,\n options,\n );\n }\n\n update(\n table: string,\n rowId: Uint8Array,\n patch: Uint8Array,\n options?: ForegroundMutationOptions,\n ): NativeForegroundWrite {\n return this.directMutation(\"update\", table, rowId, patch, options);\n }\n\n updateInTransaction(\n openTransactionId: string,\n table: string,\n rowId: Uint8Array,\n patch: Uint8Array,\n options?: ForegroundMutationOptions,\n ): void {\n this.stageMutation(\n this.openTransaction(openTransactionId, \"update in\"),\n \"update\",\n table,\n rowId,\n patch,\n options,\n );\n }\n\n upsert(\n table: string,\n rowId: Uint8Array,\n cells: Uint8Array,\n options?: ForegroundMutationOptions,\n ): NativeForegroundWrite {\n return this.directMutation(\"upsert\", table, rowId, cells, options);\n }\n\n upsertInTransaction(\n openTransactionId: string,\n table: string,\n rowId: Uint8Array,\n cells: Uint8Array,\n options?: ForegroundMutationOptions,\n ): void {\n this.stageMutation(\n this.openTransaction(openTransactionId, \"upsert into\"),\n \"upsert\",\n table,\n rowId,\n cells,\n options,\n );\n }\n\n delete(\n table: string,\n rowId: Uint8Array,\n options?: ForegroundMutationOptions,\n ): NativeForegroundWrite {\n return this.directMutation(\"delete\", table, rowId, new Uint8Array(), options);\n }\n\n deleteInTransaction(\n openTransactionId: string,\n table: string,\n rowId: Uint8Array,\n options?: ForegroundMutationOptions,\n ): void {\n this.stageMutation(\n this.openTransaction(openTransactionId, \"delete from\"),\n \"delete\",\n table,\n rowId,\n new Uint8Array(),\n options,\n );\n }\n\n restore(\n table: string,\n rowId: Uint8Array,\n cells: Uint8Array,\n options?: ForegroundMutationOptions,\n ): NativeForegroundWrite {\n return this.directMutation(\"restore\", table, rowId, cells, options);\n }\n\n restoreInTransaction(\n openTransactionId: string,\n table: string,\n rowId: Uint8Array,\n cells: Uint8Array,\n options?: ForegroundMutationOptions,\n ): void {\n this.stageMutation(\n this.openTransaction(openTransactionId, \"restore in\"),\n \"restore\",\n table,\n rowId,\n cells,\n options,\n );\n }\n\n connectUpstream(): never {\n return unsupported(\"JavaScript upstream transport\");\n }\n\n writeState(txId: Uint8Array): unknown {\n const response = this.execute({ type: \"writeState\", txId });\n if (response.type === \"operationError\") throw foregroundOperationError(response);\n if (response.type !== \"writeState\") return unexpected(\"writeState\", response.type);\n return JSON.parse(response.stateJson);\n }\n\n updateLargeValues(\n table: string,\n rowId: Uint8Array,\n patch: Uint8Array,\n descriptors: readonly unknown[],\n updatedAtMs?: number,\n ): NativeForegroundWrite {\n const response = this.execute({\n type: \"updateLargeValues\",\n table,\n rowId,\n patch,\n descriptorsJson: JSON.stringify(descriptors),\n updatedAtMs,\n });\n if (response.type === \"operationError\") throw foregroundOperationError(response);\n if (response.type !== \"transactionCommitted\")\n return unexpected(\"updateLargeValues\", response.type);\n return nativeWrite(this, response.txId, rowId);\n }\n\n beginStreamingMutation(\n table: string,\n rowId: Uint8Array,\n cells: Uint8Array,\n column: string,\n mutation: \"insert\" | \"update\" | \"upsert\" = \"insert\",\n _author?: Uint8Array,\n _attribution?: Uint8Array,\n updatedAtMs?: number,\n head?: unknown,\n base?: unknown,\n transaction?: string,\n ) {\n if (updatedAtMs !== undefined && (!Number.isSafeInteger(updatedAtMs) || updatedAtMs < 0)) {\n throw new Error(\"updatedAtMs must be a non-negative safe integer\");\n }\n const response = this.execute({\n type: \"beginStreamingMutation\",\n mutation,\n table,\n rowId,\n cells,\n column,\n optionsJson: JSON.stringify({ updatedAtMs, head, base, transaction }),\n });\n if (response.type === \"operationError\") throw foregroundOperationError(response);\n if (response.type !== \"streamingMutationOpened\")\n return unexpected(\"beginStreamingMutation\", response.type);\n const upload = response.upload;\n let closed = false;\n const assertOpen = () => {\n if (closed) throw new Error(\"streaming mutation is closed\");\n this.assertOpen();\n };\n return {\n push: async (chunk: Uint8Array): Promise<void> => {\n assertOpen();\n const pushed = await this.completeMutationOperation(\n this.execute({ type: \"pushStreamingMutation\", upload, chunk }),\n );\n if (pushed.type === \"operationError\") throw foregroundOperationError(pushed);\n if (pushed.type !== \"streamingMutationPushed\")\n return unexpected(\"pushStreamingMutation\", pushed.type);\n },\n finishInTransaction: async (): Promise<void> => {\n assertOpen();\n const finished = await this.completeMutationOperation(\n this.execute({ type: \"finishStreamingMutation\", upload }),\n );\n closed = true;\n if (finished.type === \"operationError\") throw foregroundOperationError(finished);\n if (finished.type !== \"mutationStaged\")\n return unexpected(\"finishStreamingMutation\", finished.type);\n },\n finish: async (): Promise<NativeForegroundWrite> => {\n assertOpen();\n let finished = this.execute({ type: \"finishStreamingMutation\", upload });\n if (finished.type === \"operationError\") throw foregroundOperationError(finished);\n closed = true;\n while (finished.type === \"pending\") {\n const operation = finished.operation;\n await new Promise<void>((resolve) => setTimeout(resolve, 0));\n this.tick();\n finished = this.execute({ type: \"poll\", operation });\n }\n if (finished.type === \"operationError\") throw foregroundOperationError(finished);\n if (finished.type !== \"transactionCommitted\")\n return unexpected(\"finishStreamingMutation\", finished.type);\n return nativeWrite(this, finished.txId, rowId);\n },\n abort: async (): Promise<boolean> => {\n if (closed || this.closed) return false;\n const admitted = this.execute({ type: \"abortStreamingMutation\", upload });\n if (admitted.type === \"operationError\") throw foregroundOperationError(admitted);\n closed = true;\n const aborted = await this.completeMutationOperation(admitted);\n if (aborted.type === \"operationError\") throw foregroundOperationError(aborted);\n if (aborted.type !== \"streamingMutationAborted\")\n return unexpected(\"abortStreamingMutation\", aborted.type);\n return aborted.aborted;\n },\n };\n }\n\n private async completeMutationOperation(\n response: ForegroundResponse,\n ): Promise<ForegroundResponse> {\n while (response.type === \"pending\") {\n const operation = response.operation;\n await new Promise<void>((resolve) => setTimeout(resolve, 0));\n this.tick();\n response = this.execute({ type: \"poll\", operation });\n }\n return response;\n }\n\n private directMutation(\n mutation: ForegroundMutationKind,\n table: string,\n rowId: Uint8Array | undefined,\n cells: Uint8Array,\n options?: ForegroundMutationOptions,\n ): NativeForegroundWrite {\n if (mutation === \"upsert\" && options && \"branch\" in options)\n throw new Error(\"upsert option `branch` is not supported; use `head`\");\n if (\n options?.updatedAtMs !== undefined &&\n (!Number.isSafeInteger(options.updatedAtMs) || options.updatedAtMs < 0)\n )\n throw new Error(\"updatedAtMs must be a non-negative safe integer\");\n const {\n rowId: _rowId,\n author: _author,\n attribution: _attribution,\n ...wireOptions\n } = options ?? {};\n const response = this.execute({\n type: \"directMutation\",\n mutation,\n table,\n rowId,\n cells,\n optionsJson: JSON.stringify(wireOptions),\n });\n if (response.type === \"operationError\") throw foregroundOperationError(response);\n if (response.type !== \"mutationCommitted\") return unexpected(mutation, response.type);\n return nativeWrite(this, response.txId, response.rowId);\n }\n\n private stageMutation(\n transaction: NativeForegroundTransaction,\n mutation: ForegroundMutationKind,\n table: string,\n rowId: Uint8Array | undefined,\n cells: Uint8Array,\n options?: ForegroundMutationOptions,\n ): Uint8Array {\n if (transaction.closed) throw new Error(\"React Native native foreground transaction is closed\");\n if (mutation === \"upsert\" && options && \"branch\" in options) {\n throw new Error(\n \"upsert option `branch` is not supported; use `head` (and optional `base`) for a branch view\",\n );\n }\n if (\n options?.updatedAtMs !== undefined &&\n (!Number.isSafeInteger(options.updatedAtMs) || options.updatedAtMs < 0)\n ) {\n throw new Error(\"updatedAtMs must be a non-negative safe integer\");\n }\n // Identity belongs to the admitted native capability, never the command.\n const {\n rowId: _rowId,\n author: _author,\n attribution: _attribution,\n ...wireOptions\n } = options ?? {};\n const response = this.execute({\n type: \"stageMutation\",\n transaction: transaction.handle,\n mutation,\n table,\n rowId,\n cells,\n optionsJson: JSON.stringify(wireOptions),\n });\n if (response.type === \"operationError\") throw foregroundOperationError(response);\n if (mutation === \"insert\" && response.type === \"inserted\") return response.rowId;\n if (mutation !== \"insert\" && response.type === \"mutationStaged\") return rowId!;\n return unexpected(mutation, response.type);\n }\n\n private openTransaction(id: string, operation: string): NativeForegroundTransaction {\n const transaction = this.transactions.get(id);\n if (!transaction || transaction.closed) {\n throw new Error(\n `React Native native foreground cannot ${operation} unknown transaction ${id}`,\n );\n }\n return transaction;\n }\n}\n\ntype NativeForegroundTransaction = {\n handle: number;\n kind: \"mergeable\" | \"serializable\";\n closed: boolean;\n};\n\ntype NativeForegroundWrite = {\n /** Public write identity. Native binding spellings are normalized here. */\n readonly txId: string;\n readonly payload: Uint8Array;\n readonly rowId: Uint8Array;\n wait(tier: string, observeOnly?: boolean): Promise<void>;\n writeState(): unknown;\n close(): boolean;\n};\n\nfunction nativeWrite(\n db: NativeForegroundDb,\n txId: Uint8Array<ArrayBufferLike>,\n rowId: Uint8Array<ArrayBufferLike> = new Uint8Array(16),\n): NativeForegroundWrite {\n const id = formatTransactionId(txId);\n let closed = false;\n return {\n txId: id,\n payload: new Uint8Array(),\n rowId: rowId.slice(),\n async wait(tier: string, observeOnly = false): Promise<void> {\n if (closed) throw new Error(\"write state is unavailable\");\n await db.waitForTransaction(txId, tier, observeOnly);\n },\n writeState: () => {\n if (closed) throw new Error(\"write state is unavailable\");\n return db.writeState(txId);\n },\n close: () => {\n if (closed) return false;\n closed = true;\n return true;\n },\n };\n}\n\nclass NativeForegroundSubscription {\n private closed = false;\n private pendingOperation: number | undefined;\n\n constructor(\n private readonly handle: number,\n private readonly db: NativeForegroundDb,\n ) {}\n\n readAll(): unknown[] | { retryAfterMs(): number } {\n if (this.closed) return [];\n // Native core publication already materializes the canonical event before\n // waking this owner. Keep this pull delivery-only: a foreground read must\n // never run a full relay tick while the JS mutation call is returning.\n const events = this.db.drain(this.handle, this.pendingOperation);\n if (!Array.isArray(events)) {\n this.pendingOperation = events.pendingOperation;\n return { retryAfterMs: () => 0 };\n }\n this.pendingOperation = undefined;\n // An empty batch is a ready native pull with no current event. Returning\n // it lets NativeRuntimeAdapter finish the reader so the next native wake\n // can restart it; a timer here recreates the old relay-polling latency.\n return events;\n }\n\n close(): boolean {\n if (this.closed) return false;\n this.closed = true;\n return this.db.unsubscribe(this.handle);\n }\n}\n\n/**\n * The error a failed foreground operation throws: the unchanged reason text as\n * the message, plus the stable core `code` when a core error caused it.\n */\nfunction foregroundOperationError(response: {\n reason: string;\n code?: string;\n reasonName?: string;\n}): Error {\n const error = new Error(response.reason);\n if (response.code !== undefined) Object.assign(error, { code: response.code });\n if (response.reasonName !== undefined) Object.assign(error, { reason: response.reasonName });\n return error;\n}\n\nfunction unsupported(operation: string): never {\n throw new Error(`${REACT_NATIVE_UNSUPPORTED_ERROR}; ${operation} is unavailable`);\n}\n\nfunction unexpected(operation: string, response: string): never {\n throw new Error(\n `React Native native foreground ${operation} returned unexpected ${response} response`,\n );\n}\n\nfunction formatTransactionId(bytes: Uint8Array<ArrayBufferLike>): string {\n if (bytes.byteLength !== 16)\n throw new Error(\"React Native native foreground returned malformed transaction id\");\n const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, \"0\")).join(\"\");\n return hex;\n}\n\n/** Whether the native host refused a command it does not know. */\nfunction rejectsCommand(error: unknown): boolean {\n const message = error instanceof Error ? error.message : String(error);\n return message.includes(\"runtime failed during execute\");\n}\n"]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Load jazz-rn's relay, refusing the web target first. react-native-web has no
3
+ * TurboModuleRegistry and no native build, so the relay cannot load there; the
4
+ * lookup alone would fail with an unrelated TypeError.
5
+ */
6
+ export declare function importNativeRelay(): Promise<typeof import("jazz-rn/relay")>;
7
+ //# sourceMappingURL=native-relay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-relay.d.ts","sourceRoot":"","sources":["../../src/react-native/native-relay.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAAC,cAAc,eAAe,CAAC,CAAC,CAI3E"}
@@ -0,0 +1,14 @@
1
+ // A namespace import: a host or test stub without Platform is then native, not a link error.
2
+ import * as ReactNative from "react-native";
3
+ import { REACT_NATIVE_WEB_UNSUPPORTED_ERROR } from "./errors.js";
4
+ /**
5
+ * Load jazz-rn's relay, refusing the web target first. react-native-web has no
6
+ * TurboModuleRegistry and no native build, so the relay cannot load there; the
7
+ * lookup alone would fail with an unrelated TypeError.
8
+ */
9
+ export function importNativeRelay() {
10
+ if (ReactNative.Platform?.OS === "web")
11
+ return Promise.reject(new Error(REACT_NATIVE_WEB_UNSUPPORTED_ERROR));
12
+ return import("jazz-rn/relay");
13
+ }
14
+ //# sourceMappingURL=native-relay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-relay.js","sourceRoot":"","sources":["../../src/react-native/native-relay.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,kCAAkC,EAAE,MAAM,aAAa,CAAC;AAEjE;;;;GAIG;AACH,MAAM,UAAU,iBAAiB;IAC/B,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,KAAK,KAAK;QACpC,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC,CAAC;IACvE,OAAO,MAAM,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// A namespace import: a host or test stub without Platform is then native, not a link error.\nimport * as ReactNative from \"react-native\";\nimport { REACT_NATIVE_WEB_UNSUPPORTED_ERROR } from \"./errors.js\";\n\n/**\n * Load jazz-rn's relay, refusing the web target first. react-native-web has no\n * TurboModuleRegistry and no native build, so the relay cannot load there; the\n * lookup alone would fail with an unrelated TypeError.\n */\nexport function importNativeRelay(): Promise<typeof import(\"jazz-rn/relay\")> {\n if (ReactNative.Platform?.OS === \"web\")\n return Promise.reject(new Error(REACT_NATIVE_WEB_UNSUPPORTED_ERROR));\n return import(\"jazz-rn/relay\");\n}\n"]}
@@ -1,22 +1,35 @@
1
1
  import type { ReactNode } from "react";
2
- import type { Db } from "./db.js";
2
+ import { type JazzAppViewProps } from "../react-core/app.js";
3
+ import type { JazzSession } from "../session/state.js";
4
+ import { type JazzClientConfig } from "./create-jazz-session.js";
5
+ import type { PublicSession } from "../runtime/context.js";
6
+ import type { Db } from "../runtime/db.js";
3
7
  import { useSession } from "../react-core/provider.js";
4
- import type { JazzClient as CreatedJazzClient } from "./create-jazz-client.js";
5
- import type { Session } from "../runtime/context.js";
8
+ import { type JazzClient as CreatedJazzClient } from "./create-jazz-client.js";
9
+ import type { OpenJazzClientConfig as DbConfig } from "./create-jazz-client.js";
10
+ export { JazzClientProvider, type JazzClientProviderProps } from "../react-core/provider.js";
6
11
  interface JazzClientContextValue {
7
12
  db: Db;
8
- manager: CreatedJazzClient["manager"];
9
- session: Session | null;
13
+ session: PublicSession | null;
10
14
  shutdown: CreatedJazzClient["shutdown"];
11
15
  }
12
- type JazzProviderClientProps = {
13
- client: CreatedJazzClient | Promise<CreatedJazzClient>;
16
+ export type LegacyJazzProviderProps = {
17
+ config: DbConfig;
18
+ fallback?: ReactNode;
14
19
  children: ReactNode;
15
20
  };
16
- export type JazzProviderProps = JazzProviderClientProps;
17
- export declare function JazzProvider({ client, children }: JazzProviderProps): import("react/jsx-runtime").JSX.Element;
21
+ export type JazzAppProviderProps = JazzClientConfig & JazzAppViewProps<CreatedJazzClient>;
22
+ export type JazzProviderProps = LegacyJazzProviderProps | JazzAppProviderProps;
23
+ export declare function JazzProvider(props: JazzProviderProps): import("react/jsx-runtime").JSX.Element;
18
24
  export declare function useJazzClient(): JazzClientContextValue;
19
25
  export declare function useDb(): Db;
20
- export type { JazzClientContextValue };
21
26
  export { useSession };
27
+ export type { JazzClientContextValue };
28
+ /** The app shell shared by React Native and Expo, with native default loading and error views. */
29
+ export declare function NativeJazzAppProvider<Config extends {
30
+ initial?: unknown;
31
+ }>({ config, createJazzClient, loading, error, ...view }: JazzAppViewProps<CreatedJazzClient> & {
32
+ config: Config;
33
+ createJazzClient: (config: Config) => Promise<JazzSession<CreatedJazzClient>>;
34
+ }): import("react/jsx-runtime").JSX.Element;
22
35
  //# sourceMappingURL=provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/react-native/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAIL,UAAU,EACX,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD,UAA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F,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAE7F,UAAU,sBAAsB;IAC9B,EAAE,EAAE,EAAE,CAAC;IACP,OAAO,EAAE,aAAa,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;CACzC;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,QAAQ,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;AAC1F,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG,oBAAoB,CAAC;AAE/E,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAQpD;AAED,wBAAgB,aAAa,IAAI,sBAAsB,CAEtD;AAED,wBAAgB,KAAK,IAAI,EAAE,CAE1B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,sBAAsB,EAAE,CAAC;AAQvC,kGAAkG;AAClG,wBAAgB,qBAAqB,CAAC,MAAM,SAAS;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,EAC1E,MAAM,EACN,gBAAgB,EAChB,OAAO,EACP,KAAK,EACL,GAAG,IAAI,EACR,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,GAAG;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAAC;CAC/E,2CA6BA"}
@@ -1,7 +1,16 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { View, Text, Pressable } from "react-native";
3
+ import { ConfiguredJazzAppProvider } from "../react-core/app.js";
4
+ import { createJazzClient } from "./create-jazz-session.js";
2
5
  import { JazzProvider as CoreJazzProvider, useDb as useCoreDb, useJazzClient as useCoreJazzClient, useSession, } from "../react-core/provider.js";
3
- export function JazzProvider({ client, children }) {
4
- return _jsx(CoreJazzProvider, { client: client, children: children });
6
+ import { openJazzClient } from "./create-jazz-client.js";
7
+ const createClient = (config) => openJazzClient(config);
8
+ export { JazzClientProvider } from "../react-core/provider.js";
9
+ export function JazzProvider(props) {
10
+ if (!("config" in props))
11
+ return _jsx(ApplicationJazzProvider, { ...props });
12
+ const { config, fallback, children } = props;
13
+ return (_jsx(CoreJazzProvider, { config: config, fallback: fallback, openJazzClient: createClient, children: children }));
5
14
  }
6
15
  export function useJazzClient() {
7
16
  return useCoreJazzClient();
@@ -10,4 +19,15 @@ export function useDb() {
10
19
  return useCoreDb();
11
20
  }
12
21
  export { useSession };
22
+ function ApplicationJazzProvider(props) {
23
+ const { children, signedOut, loading, error, ...config } = props;
24
+ const view = { children, signedOut, loading, error };
25
+ return _jsx(NativeJazzAppProvider, { ...view, config: config, createJazzClient: createJazzClient });
26
+ }
27
+ /** The app shell shared by React Native and Expo, with native default loading and error views. */
28
+ export function NativeJazzAppProvider({ config, createJazzClient, loading, error, ...view }) {
29
+ return (_jsx(ConfiguredJazzAppProvider, { ...view, config: config, createJazzClient: createJazzClient, loading: loading === undefined ? (_jsx(View, { children: _jsx(Text, { children: "Loading\u2026" }) })) : (loading), error: error === undefined
30
+ ? (state) => (_jsxs(View, { accessibilityRole: "alert", children: [_jsx(Text, { children: "We couldn\u2019t connect to your account. Please try again." }), _jsx(Pressable, { accessibilityRole: "button", onPress: () => void state.retry(), children: _jsx(Text, { children: "Try again" }) })] }))
31
+ : error }));
32
+ }
13
33
  //# sourceMappingURL=provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/react-native/provider.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,YAAY,IAAI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KAAK,KAAK,CAAC,KAAK,EAAE,YACrE,KAAC,IAAI,4BAAiB,GACZ,IACP,CACR;YACH,CAAC,CAAC,KAAK,GAEX,CACH,CAAC;AACJ,CAAC","sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, Text, Pressable } from \"react-native\";\nimport { ConfiguredJazzAppProvider, type JazzAppViewProps } from \"../react-core/app.js\";\nimport type { JazzSession } from \"../session/state.js\";\nimport { createJazzClient, type JazzClientConfig } from \"./create-jazz-session.js\";\nimport type { PublicSession } from \"../runtime/context.js\";\nimport type { Db } from \"../runtime/db.js\";\nimport {\n JazzProvider as CoreJazzProvider,\n useDb as useCoreDb,\n useJazzClient as useCoreJazzClient,\n useSession,\n type OpenJazzClient,\n} from \"../react-core/provider.js\";\nimport { openJazzClient, type JazzClient as CreatedJazzClient } from \"./create-jazz-client.js\";\nimport type { OpenJazzClientConfig as DbConfig } from \"./create-jazz-client.js\";\n\nconst createClient: OpenJazzClient = (config) =>\n openJazzClient(config as DbConfig) as Promise<CreatedJazzClient>;\n\nexport { JazzClientProvider, type JazzClientProviderProps } from \"../react-core/provider.js\";\n\ninterface JazzClientContextValue {\n db: Db;\n session: PublicSession | null;\n shutdown: CreatedJazzClient[\"shutdown\"];\n}\n\nexport type LegacyJazzProviderProps = {\n config: DbConfig;\n fallback?: ReactNode;\n children: ReactNode;\n};\n\nexport type JazzAppProviderProps = JazzClientConfig & JazzAppViewProps<CreatedJazzClient>;\nexport type JazzProviderProps = LegacyJazzProviderProps | JazzAppProviderProps;\n\nexport function JazzProvider(props: JazzProviderProps) {\n if (!(\"config\" in props)) return <ApplicationJazzProvider {...props} />;\n const { config, fallback, children } = props;\n return (\n <CoreJazzProvider config={config} fallback={fallback} openJazzClient={createClient}>\n {children}\n </CoreJazzProvider>\n );\n}\n\nexport function useJazzClient(): JazzClientContextValue {\n return useCoreJazzClient() as JazzClientContextValue;\n}\n\nexport function useDb(): Db {\n return useCoreDb<Db>();\n}\n\nexport { useSession };\nexport type { JazzClientContextValue };\n\nfunction ApplicationJazzProvider(props: JazzAppProviderProps) {\n const { children, signedOut, loading, error, ...config } = props;\n const view = { children, signedOut, loading, error };\n return <NativeJazzAppProvider {...view} config={config} createJazzClient={createJazzClient} />;\n}\n\n/** The app shell shared by React Native and Expo, with native default loading and error views. */\nexport function NativeJazzAppProvider<Config extends { initial?: unknown }>({\n config,\n createJazzClient,\n loading,\n error,\n ...view\n}: JazzAppViewProps<CreatedJazzClient> & {\n config: Config;\n createJazzClient: (config: Config) => Promise<JazzSession<CreatedJazzClient>>;\n}) {\n return (\n <ConfiguredJazzAppProvider\n {...view}\n config={config}\n createJazzClient={createJazzClient}\n loading={\n loading === undefined ? (\n <View>\n <Text>Loading…</Text>\n </View>\n ) : (\n loading\n )\n }\n error={\n error === undefined\n ? (state) => (\n <View accessibilityRole=\"alert\">\n <Text>We couldn’t connect to your account. Please try again.</Text>\n <Pressable accessibilityRole=\"button\" onPress={() => void state.retry()}>\n <Text>Try again</Text>\n </Pressable>\n </View>\n )\n : error\n }\n />\n );\n}\n"]}
@@ -0,0 +1,40 @@
1
+ import "./abort-signal.js";
2
+ import type { RuntimeClientContext } from "../runtime/runtime-source.js";
3
+ import { RuntimeSource } from "../runtime/runtime-source.js";
4
+ import type { TextAnchors } from "../runtime/text-anchors.js";
5
+ import type { JazzClient } from "../runtime/client.js";
6
+ import type { DbConfig } from "../runtime/db.js";
7
+ /**
8
+ * Opaque authority supplied by trusted native platform admission. It is
9
+ * deliberately only a field of the React-Native client configuration: app
10
+ * code must neither construct a scope nor use low-level foreground helpers.
11
+ */
12
+ export type ReactNativeRelayConfig = Readonly<{
13
+ capability: Uint8Array;
14
+ }>;
15
+ export type ReactNativeDbConfig = DbConfig & {
16
+ /**
17
+ * Opaque authority issued by trusted native platform admission. The normal
18
+ * persistent RN runtime consumes it through its installed JSI foreground
19
+ * engine; application JavaScript cannot construct scope configuration.
20
+ */
21
+ nativeRelay?: ReactNativeRelayConfig;
22
+ };
23
+ export declare class ReactNativeRuntimeSource extends RuntimeSource<ReactNativeDbConfig> {
24
+ private admittedSession;
25
+ private admittedCapability;
26
+ private foregroundModule;
27
+ private foregroundFactory;
28
+ private lifecycleForeground;
29
+ private pendingCapability;
30
+ private ownsAdmission;
31
+ private explicitlyOffline;
32
+ textAnchors(): TextAnchors;
33
+ load(config: ReactNativeDbConfig): Promise<void>;
34
+ assertAuthUpdateAllowed(): never;
35
+ admitConfig(config: ReactNativeDbConfig): void;
36
+ createClient(context: RuntimeClientContext<ReactNativeDbConfig>): JazzClient;
37
+ shutdown(): Promise<void>;
38
+ refreshAccountToken(token: string): boolean;
39
+ }
40
+ //# sourceMappingURL=runtime-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-source.d.ts","sourceRoot":"","sources":["../../src/react-native/runtime-source.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAUvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA0BjD;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC5C,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG;IAC3C;;;;OAIG;IACH,WAAW,CAAC,EAAE,sBAAsB,CAAC;CACtC,CAAC;AAMF,qBAAa,wBAAyB,SAAQ,aAAa,CAAC,mBAAmB,CAAC;IAC9E,OAAO,CAAC,eAAe,CAAwB;IAC/C,OAAO,CAAC,kBAAkB,CAA2B;IACrD,OAAO,CAAC,gBAAgB,CAAuC;IAC/D,OAAO,CAAC,iBAAiB,CAAwC;IACjE,OAAO,CAAC,mBAAmB,CAAmC;IAC9D,OAAO,CAAC,iBAAiB,CAA2B;IACpD,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,iBAAiB,CAAS;IAEzB,WAAW,IAAI,WAAW;IAcpB,IAAI,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAgHtD,uBAAuB,IAAI,KAAK;IAMhC,WAAW,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI;IAU9C,YAAY,CAAC,OAAO,EAAE,oBAAoB,CAAC,mBAAmB,CAAC,GAAG,UAAU;IAyEtE,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAU/B,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAgBrD"}
@@ -0,0 +1,250 @@
1
+ import "./abort-signal.js";
2
+ import { clientScope } from "../runtime/client-scope.js";
3
+ import { installNativeRuntimeEntropy } from "../runtime/runtime-entropy.js";
4
+ import { RuntimeSource } from "../runtime/runtime-source.js";
5
+ import { JazzClient as JazzRuntimeClient } from "../runtime/client.js";
6
+ import { markTrustedReservedSession, parseJwtPayload, internalSessionFromJwtPayload, internalSessionFromVerifiedReservedJwtPayload, } from "../runtime/client-session.js";
7
+ import { NativeRuntimeAdapter } from "../runtime/native-runtime/native-runtime-adapter.js";
8
+ import { getTrustedReservedSession, setTrustedReservedSession, } from "../runtime/db-internal-session.js";
9
+ import { authorBytesForSession } from "../runtime/author-id.js";
10
+ import { accountConfigBearer, assertAccountConfig } from "../accounts/config-capability.js";
11
+ import { beginNativeAccountSession, attachNativeAccountSchema, resolveNativeSession, } from "./account-session.js";
12
+ import { serializeSchemaSource } from "../drivers/schema-wire.js";
13
+ import { REACT_NATIVE_MEMORY_RUNTIME_UNSUPPORTED_ERROR, REACT_NATIVE_NATIVE_RELAY_MEMORY_ONLY_ERROR, REACT_NATIVE_NATIVE_RELAY_REQUIRED_ERROR, } from "./errors.js";
14
+ import { NativeForegroundDb, } from "./native-foreground-db.js";
15
+ import { importNativeRelay } from "./native-relay.js";
16
+ function shouldRequireSqliteDriver(config) {
17
+ return (config.driver?.type ?? "persistent") === "persistent";
18
+ }
19
+ export class ReactNativeRuntimeSource extends RuntimeSource {
20
+ admittedSession = null;
21
+ admittedCapability = null;
22
+ foregroundModule = null;
23
+ foregroundFactory = null;
24
+ lifecycleForeground = null;
25
+ pendingCapability = null;
26
+ ownsAdmission = false;
27
+ explicitlyOffline = false;
28
+ textAnchors() {
29
+ const call = this.foregroundFactory?.textAnchors;
30
+ if (!call)
31
+ throw new Error("This React Native runtime does not support text anchors");
32
+ const run = (request) => JSON.parse(call(JSON.stringify(request)));
33
+ return {
34
+ captureAnchor: (text, position, side, version) => run({ op: "captureAnchor", text, position, side, version }),
35
+ resolveAnchor: (anchor, text, version) => run({ op: "resolveAnchor", anchor, text, version }),
36
+ captureRange: (text, start, end, version) => run({ op: "captureRange", text, start, end, version }),
37
+ resolveRange: (range, text, version) => run({ op: "resolveRange", range, text, version }),
38
+ };
39
+ }
40
+ async load(config) {
41
+ if (shouldRequireSqliteDriver(config)) {
42
+ if (!config.nativeRelay && config.accountId && config.accountRegistryAuthority) {
43
+ if (this.pendingCapability || this.admittedCapability)
44
+ return;
45
+ assertAccountConfig(config);
46
+ const session = resolveNativeSession(config);
47
+ const module = await importNativeRelay();
48
+ const factory = module.installNativeForegroundRuntime();
49
+ if (factory.accountSecret)
50
+ installNativeRuntimeEntropy(factory.accountSecret);
51
+ const bearer = config.cookieSession
52
+ ? ((await accountConfigBearer(config)?.()) ?? undefined)
53
+ : undefined;
54
+ this.pendingCapability = beginNativeAccountSession(factory, config, session, bearer);
55
+ this.foregroundFactory = factory;
56
+ this.foregroundModule = module;
57
+ this.ownsAdmission = true;
58
+ this.admittedSession = markTrustedReservedSession({
59
+ ...session,
60
+ account_id: config.accountId,
61
+ });
62
+ this.nativeConnection = {
63
+ configured: () => config.serverUrl !== undefined,
64
+ disconnect: () => {
65
+ this.explicitlyOffline = true;
66
+ this.lifecycleForeground?.disconnectNativeUpstream();
67
+ },
68
+ reconnect: () => {
69
+ this.explicitlyOffline = false;
70
+ this.lifecycleForeground?.reconnectNativeUpstream();
71
+ },
72
+ };
73
+ return;
74
+ }
75
+ if (config.nativeRelay) {
76
+ if (this.admittedCapability)
77
+ return;
78
+ assertNativeRelay(config.nativeRelay);
79
+ // Capture before the first await: caller-owned bytes must never select
80
+ // a different scope after native identity preflight.
81
+ const capability = new Uint8Array(config.nativeRelay.capability);
82
+ const foreground = await importNativeRelay();
83
+ this.foregroundFactory = foreground.installNativeForegroundRuntime();
84
+ if (this.foregroundFactory.accountSecret)
85
+ installNativeRuntimeEntropy(this.foregroundFactory.accountSecret);
86
+ this.foregroundModule = foreground;
87
+ const withForeground = (run) => {
88
+ if (this.lifecycleForeground)
89
+ return run(this.lifecycleForeground);
90
+ // Connectivity is available before the lazy schema client exists.
91
+ const temporary = new NativeForegroundDb(this.foregroundFactory.openAttached(capability), foreground);
92
+ try {
93
+ return run(temporary);
94
+ }
95
+ finally {
96
+ temporary.close();
97
+ }
98
+ };
99
+ const opened = new NativeForegroundDb(this.foregroundFactory.openAttached(capability), foreground);
100
+ try {
101
+ const metadata = opened.nativeSessionMetadata();
102
+ const selected = resolveNativeSession(config);
103
+ if (metadata.accountId !== (config.accountId ?? null) ||
104
+ (config.accountRegistryAuthority !== undefined &&
105
+ metadata.registryAuthority !== config.accountRegistryAuthority) ||
106
+ metadata.issuer !== selected.issuer ||
107
+ metadata.userId !== selected.user_id) {
108
+ throw new Error("React Native admitted session does not match the selected account identity");
109
+ }
110
+ const configured = opened.nativeConnectionStatus().configured;
111
+ // The admitted scope's transport configuration is immutable. Lifecycle
112
+ // actions use the application owner, rather than opening a recovery
113
+ // foreground merely to inspect or change connectivity.
114
+ this.nativeConnection = {
115
+ configured: () => configured,
116
+ disconnect: () => withForeground((db) => db.disconnectNativeUpstream()),
117
+ reconnect: () => withForeground((db) => db.reconnectNativeUpstream()),
118
+ };
119
+ this.admittedSession = markTrustedReservedSession({
120
+ account_id: metadata.accountId ?? undefined,
121
+ issuer: metadata.issuer,
122
+ user_id: metadata.userId,
123
+ claims: selected.claims,
124
+ authMode: metadata.issuer === "urn:jazz:local-first"
125
+ ? "local-first"
126
+ : metadata.issuer === "urn:jazz:anonymous"
127
+ ? "anonymous"
128
+ : "external",
129
+ });
130
+ }
131
+ finally {
132
+ opened.close();
133
+ }
134
+ this.admittedCapability = capability;
135
+ return;
136
+ }
137
+ throw new Error(REACT_NATIVE_NATIVE_RELAY_REQUIRED_ERROR);
138
+ }
139
+ if (config.nativeRelay)
140
+ throw new Error(REACT_NATIVE_NATIVE_RELAY_MEMORY_ONLY_ERROR);
141
+ // Do not delegate to DefaultRuntimeSource here. It is the browser/Node
142
+ // implementation and imports the WASM runtime; Metro resolves that import
143
+ // even for code paths that would never execute on a native device.
144
+ throw new Error(REACT_NATIVE_MEMORY_RUNTIME_UNSUPPORTED_ERROR);
145
+ }
146
+ assertAuthUpdateAllowed() {
147
+ throw new Error("React Native authentication is native-admission bound; revoke the old native scope, admit the new scope, and create a new Db");
148
+ }
149
+ admitConfig(config) {
150
+ if (!this.admittedSession)
151
+ throw new Error("React Native native session is not admitted");
152
+ if (this.ownsAdmission)
153
+ return;
154
+ // The handle's JWT was checked against the native account/identity during
155
+ // load. Keep its bearer representation: reserved local-first identities
156
+ // deliberately cannot enter through the generic cookie-session path.
157
+ // Native authority still comes exclusively from the admitted capability.
158
+ setTrustedReservedSession(config, this.admittedSession);
159
+ }
160
+ createClient(context) {
161
+ if (this.pendingCapability) {
162
+ const pending = this.pendingCapability;
163
+ try {
164
+ this.admittedCapability = attachNativeAccountSchema(this.foregroundFactory, pending, serializeSchemaSource(context.schema));
165
+ }
166
+ finally {
167
+ this.pendingCapability = null;
168
+ }
169
+ }
170
+ if (this.admittedCapability) {
171
+ const factory = this.foregroundFactory;
172
+ const module = this.foregroundModule;
173
+ const capability = this.admittedCapability;
174
+ if (!factory || !module)
175
+ throw new Error("React Native native foreground runtime is not loaded");
176
+ const session = resolveNativeSession(context.config);
177
+ const foreground = new NativeForegroundDb(factory.openAttached(capability), module);
178
+ try {
179
+ const metadata = foreground.nativeSessionMetadata();
180
+ if (metadata.accountId !== (context.config.accountId ?? null) ||
181
+ metadata.issuer !== session.issuer ||
182
+ metadata.userId !== session.user_id ||
183
+ (context.config.accountRegistryAuthority !== undefined &&
184
+ metadata.registryAuthority !== context.config.accountRegistryAuthority)) {
185
+ throw new Error("React Native admitted session does not match the selected account identity");
186
+ }
187
+ if (this.explicitlyOffline)
188
+ foreground.disconnectNativeUpstream();
189
+ this.lifecycleForeground = foreground;
190
+ const runtime = NativeRuntimeAdapter.fromDb(foreground, context.schema, metadata.node, authorBytesForSession(session), 1, false, {
191
+ slowQueryLog: {
192
+ appId: clientScope(context.config),
193
+ thresholdMs: context.config.slowQueryThresholdMs,
194
+ },
195
+ });
196
+ const appContext = {
197
+ appId: clientScope(context.config),
198
+ accountId: context.config.accountId,
199
+ schema: context.schema,
200
+ driver: context.config.driver,
201
+ serverUrl: context.config.serverUrl,
202
+ env: context.config.env,
203
+ jwtToken: context.config.jwtToken,
204
+ cookieSession: context.config.cookieSession,
205
+ };
206
+ setTrustedReservedSession(appContext, getTrustedReservedSession(context.config));
207
+ return JazzRuntimeClient.connectWithRuntime(runtime, appContext, {
208
+ onAuthFailure: context.onAuthFailure,
209
+ });
210
+ }
211
+ catch (error) {
212
+ this.lifecycleForeground = null;
213
+ foreground.close();
214
+ throw error;
215
+ }
216
+ }
217
+ throw new Error(REACT_NATIVE_MEMORY_RUNTIME_UNSUPPORTED_ERROR);
218
+ }
219
+ async shutdown() {
220
+ if (!this.ownsAdmission)
221
+ return;
222
+ const capability = this.admittedCapability ?? this.pendingCapability;
223
+ if (capability)
224
+ this.foregroundFactory.releaseAccountSession(capability);
225
+ this.admittedCapability = null;
226
+ this.pendingCapability = null;
227
+ this.lifecycleForeground = null;
228
+ this.ownsAdmission = false;
229
+ }
230
+ refreshAccountToken(token) {
231
+ if (!this.ownsAdmission)
232
+ this.assertAuthUpdateAllowed();
233
+ const capability = this.admittedCapability ?? this.pendingCapability;
234
+ if (!capability)
235
+ throw new Error("React Native account context is closed");
236
+ const payload = parseJwtPayload(token);
237
+ const session = payload?.iss === "urn:jazz:local-first"
238
+ ? internalSessionFromVerifiedReservedJwtPayload(payload, "local-first")
239
+ : payload && internalSessionFromJwtPayload(payload);
240
+ if (!session)
241
+ throw new Error("Invalid account refresh token");
242
+ this.foregroundFactory.refreshAccountSession(capability, JSON.stringify({ jwt: token, claims: session.claims }));
243
+ return true;
244
+ }
245
+ }
246
+ function assertNativeRelay(relay) {
247
+ if (!(relay.capability instanceof Uint8Array) || relay.capability.byteLength !== 32)
248
+ throw new Error(REACT_NATIVE_NATIVE_RELAY_REQUIRED_ERROR);
249
+ }
250
+ //# sourceMappingURL=runtime-source.js.map