@pyric/cli 0.1.0-alpha.14 → 0.1.0-alpha.16

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 (606) hide show
  1. package/dist/assurance/.generated/conformance-verdicts.d.ts +120 -75
  2. package/dist/assurance/.generated/conformance-verdicts.d.ts.map +1 -1
  3. package/dist/assurance/.generated/conformance-verdicts.js +120 -75
  4. package/dist/assurance/.generated/conformance-verdicts.js.map +1 -1
  5. package/dist/bridge/client/dispatch.js +1 -1
  6. package/dist/bridge/client/dispatch.js.map +1 -1
  7. package/dist/cli/serve.d.ts +1 -1
  8. package/dist/cli/serve.d.ts.map +1 -1
  9. package/dist/cli/serve.js +207 -284
  10. package/dist/cli/serve.js.map +1 -1
  11. package/dist/cli/service-command-records/database-rules-generate.d.ts +4 -0
  12. package/dist/cli/service-command-records/database-rules-generate.d.ts.map +1 -0
  13. package/dist/cli/service-command-records/database-rules-generate.js +3 -0
  14. package/dist/cli/service-command-records/database-rules-generate.js.map +1 -0
  15. package/dist/cli/service-command-records/database-rules-lint.d.ts +4 -0
  16. package/dist/cli/service-command-records/database-rules-lint.d.ts.map +1 -0
  17. package/dist/cli/service-command-records/database-rules-lint.js +3 -0
  18. package/dist/cli/service-command-records/database-rules-lint.js.map +1 -0
  19. package/dist/cli/service-command-records/database-rules-simulate.d.ts +4 -0
  20. package/dist/cli/service-command-records/database-rules-simulate.d.ts.map +1 -0
  21. package/dist/cli/service-command-records/database-rules-simulate.js +3 -0
  22. package/dist/cli/service-command-records/database-rules-simulate.js.map +1 -0
  23. package/dist/cli/service-command-records/database-rules-validate.d.ts +4 -0
  24. package/dist/cli/service-command-records/database-rules-validate.d.ts.map +1 -0
  25. package/dist/cli/service-command-records/database-rules-validate.js +3 -0
  26. package/dist/cli/service-command-records/database-rules-validate.js.map +1 -0
  27. package/dist/cli/service-command-records/firestore-indexes-generate.d.ts +4 -0
  28. package/dist/cli/service-command-records/firestore-indexes-generate.d.ts.map +1 -0
  29. package/dist/cli/service-command-records/firestore-indexes-generate.js +3 -0
  30. package/dist/cli/service-command-records/firestore-indexes-generate.js.map +1 -0
  31. package/dist/cli/service-command-records/firestore-rules-lint.d.ts +4 -0
  32. package/dist/cli/service-command-records/firestore-rules-lint.d.ts.map +1 -0
  33. package/dist/cli/service-command-records/firestore-rules-lint.js +3 -0
  34. package/dist/cli/service-command-records/firestore-rules-lint.js.map +1 -0
  35. package/dist/cli/service-command-records/firestore-rules-resolve.d.ts +4 -0
  36. package/dist/cli/service-command-records/firestore-rules-resolve.d.ts.map +1 -0
  37. package/dist/cli/service-command-records/firestore-rules-resolve.js +3 -0
  38. package/dist/cli/service-command-records/firestore-rules-resolve.js.map +1 -0
  39. package/dist/cli/service-command-records/firestore-rules-simulate.d.ts +4 -0
  40. package/dist/cli/service-command-records/firestore-rules-simulate.d.ts.map +1 -0
  41. package/dist/cli/service-command-records/firestore-rules-simulate.js +3 -0
  42. package/dist/cli/service-command-records/firestore-rules-simulate.js.map +1 -0
  43. package/dist/cli/service-command-records/firestore-rules-validate.d.ts +4 -0
  44. package/dist/cli/service-command-records/firestore-rules-validate.d.ts.map +1 -0
  45. package/dist/cli/service-command-records/firestore-rules-validate.js +3 -0
  46. package/dist/cli/service-command-records/firestore-rules-validate.js.map +1 -0
  47. package/dist/cli/service-command-records/storage-rules-lint.d.ts +4 -0
  48. package/dist/cli/service-command-records/storage-rules-lint.d.ts.map +1 -0
  49. package/dist/cli/service-command-records/storage-rules-lint.js +3 -0
  50. package/dist/cli/service-command-records/storage-rules-lint.js.map +1 -0
  51. package/dist/cli/service-command-records/storage-rules-simulate.d.ts +4 -0
  52. package/dist/cli/service-command-records/storage-rules-simulate.d.ts.map +1 -0
  53. package/dist/cli/service-command-records/storage-rules-simulate.js +3 -0
  54. package/dist/cli/service-command-records/storage-rules-simulate.js.map +1 -0
  55. package/dist/cli/service-commands.d.ts +7 -0
  56. package/dist/cli/service-commands.d.ts.map +1 -1
  57. package/dist/cli/service-commands.generated.d.ts +35 -0
  58. package/dist/cli/service-commands.generated.d.ts.map +1 -0
  59. package/dist/cli/service-commands.generated.js +25 -0
  60. package/dist/cli/service-commands.generated.js.map +1 -0
  61. package/dist/cli/service-commands.js +23 -40
  62. package/dist/cli/service-commands.js.map +1 -1
  63. package/dist/conformance/.generated/can-i-use-browser.d.ts.map +1 -1
  64. package/dist/conformance/.generated/can-i-use-browser.js +1 -1
  65. package/dist/conformance/.generated/can-i-use-browser.js.map +1 -1
  66. package/dist/conformance/.generated/can-i-use.d.ts.map +1 -1
  67. package/dist/conformance/.generated/can-i-use.js +1 -1
  68. package/dist/conformance/.generated/can-i-use.js.map +1 -1
  69. package/dist/conformance/.generated/conformance-docs.d.ts.map +1 -1
  70. package/dist/conformance/.generated/conformance-docs.js +1 -1
  71. package/dist/conformance/.generated/conformance-docs.js.map +1 -1
  72. package/dist/functions-rtdb/development-runtime.d.ts +63 -0
  73. package/dist/functions-rtdb/development-runtime.d.ts.map +1 -0
  74. package/dist/functions-rtdb/development-runtime.js +244 -0
  75. package/dist/functions-rtdb/development-runtime.js.map +1 -0
  76. package/dist/serve/bridge-mount.d.ts +32 -2
  77. package/dist/serve/bridge-mount.d.ts.map +1 -1
  78. package/dist/serve/bridge-mount.js +232 -18
  79. package/dist/serve/bridge-mount.js.map +1 -1
  80. package/dist/serve/bundler.d.ts +2 -18
  81. package/dist/serve/bundler.d.ts.map +1 -1
  82. package/dist/serve/bundler.js +7 -35
  83. package/dist/serve/bundler.js.map +1 -1
  84. package/dist/serve/entries/app-client.d.ts.map +1 -1
  85. package/dist/serve/entries/app-client.js +5 -5
  86. package/dist/serve/entries/app-client.js.map +1 -1
  87. package/dist/serve/entries/auth-helper-core.d.ts +32 -6
  88. package/dist/serve/entries/auth-helper-core.d.ts.map +1 -1
  89. package/dist/serve/entries/auth-helper-core.js +82 -24
  90. package/dist/serve/entries/auth-helper-core.js.map +1 -1
  91. package/dist/serve/entries/auth.d.ts.map +1 -1
  92. package/dist/serve/entries/auth.js +6 -4
  93. package/dist/serve/entries/auth.js.map +1 -1
  94. package/dist/serve/entries/database.d.ts +28 -0
  95. package/dist/serve/entries/database.d.ts.map +1 -1
  96. package/dist/serve/entries/database.js +95 -26
  97. package/dist/serve/entries/database.js.map +1 -1
  98. package/dist/serve/entries/init.d.ts.map +1 -1
  99. package/dist/serve/entries/init.js +21 -12
  100. package/dist/serve/entries/init.js.map +1 -1
  101. package/dist/serve/html-injection.d.ts +5 -0
  102. package/dist/serve/html-injection.d.ts.map +1 -0
  103. package/dist/serve/html-injection.js +59 -0
  104. package/dist/serve/html-injection.js.map +1 -0
  105. package/dist/serve/namespace.d.ts +6 -22
  106. package/dist/serve/namespace.d.ts.map +1 -1
  107. package/dist/serve/namespace.js +23 -145
  108. package/dist/serve/namespace.js.map +1 -1
  109. package/dist/serve/runtime/worker-replacement.d.ts +1 -2
  110. package/dist/serve/runtime/worker-replacement.d.ts.map +1 -1
  111. package/dist/serve/sandbox-session.d.ts +78 -0
  112. package/dist/serve/sandbox-session.d.ts.map +1 -0
  113. package/dist/serve/sandbox-session.js +171 -0
  114. package/dist/serve/sandbox-session.js.map +1 -0
  115. package/dist/serve/server.d.ts +5 -2
  116. package/dist/serve/server.d.ts.map +1 -1
  117. package/dist/serve/server.js +21 -5
  118. package/dist/serve/server.js.map +1 -1
  119. package/dist/serve/site-tree.d.ts +8 -0
  120. package/dist/serve/site-tree.d.ts.map +1 -0
  121. package/dist/serve/site-tree.js +113 -0
  122. package/dist/serve/site-tree.js.map +1 -0
  123. package/dist/serve/site-ui/_astro/RulesCodeEditor.CzwHdCi9.js +23 -0
  124. package/dist/serve/site-ui/_astro/_example_.jevZ7OdV.css +1 -0
  125. package/dist/serve/site-ui/_astro/_slug_.BoKXYrnu.css +1 -0
  126. package/dist/serve/site-ui/_astro/_studio_.BtYpqe1A.css +1 -0
  127. package/dist/serve/site-ui/_astro/app.4HeLP_FA.js +109 -0
  128. package/dist/serve/site-ui/_astro/app.BgSnCR5G.js +1 -0
  129. package/dist/serve/site-ui/_astro/app.BsFsMjn0.css +1 -0
  130. package/dist/serve/site-ui/_astro/chess-showcase.CnoxIle5.js +1 -0
  131. package/dist/serve/site-ui/_astro/chess-source-explorer.C5k9c5yK.js +1 -0
  132. package/dist/serve/site-ui/_astro/chess-v2.CFHmd3UL.js +354 -0
  133. package/dist/serve/site-ui/_astro/client.D2ORs4B-.js +25 -0
  134. package/dist/serve/site-ui/_astro/example-runtime.R1d96L6-.js +291 -0
  135. package/dist/serve/site-ui/_astro/index.BJiOemMX.js +1 -0
  136. package/dist/serve/site-ui/_astro/index.DBy5LfQW.js +9 -0
  137. package/dist/serve/site-ui/_astro/index.DNyk7q8W.js +9 -0
  138. package/dist/serve/site-ui/_astro/jsx-runtime.D_zvdyIk.js +9 -0
  139. package/dist/serve/site-ui/_astro/reads.BrKNdKAa.js +1 -0
  140. package/dist/serve/site-ui/_astro/sandbox-controls.BTb3EbQp.js +1153 -0
  141. package/dist/serve/site-ui/_astro/seed.EyI3VYEu.js +20 -0
  142. package/dist/serve/site-ui/auth/index.html +11 -0
  143. package/dist/serve/site-ui/docs/_rhythm/index.html +100 -0
  144. package/dist/serve/site-ui/docs/agent/set-up-your-agent/index.html +43 -0
  145. package/dist/serve/site-ui/docs/agent/watch-and-review/index.html +26 -0
  146. package/dist/serve/site-ui/docs/agent/work-with-an-agent/index.html +70 -0
  147. package/dist/serve/{docs-ui → site-ui}/docs/ai-compat/index.html +3 -3
  148. package/dist/serve/site-ui/docs/api-reference/index.html +68 -0
  149. package/dist/serve/{docs-ui → site-ui}/docs/app-compat/index.html +3 -3
  150. package/dist/serve/{docs-ui → site-ui}/docs/auth-compat/index.html +3 -3
  151. package/dist/serve/site-ui/docs/build/ai-logic/index.html +64 -0
  152. package/dist/serve/site-ui/docs/build/authentication/index.html +66 -0
  153. package/dist/serve/site-ui/docs/build/cloud-firestore/index.html +84 -0
  154. package/dist/serve/site-ui/docs/build/cloud-messaging/index.html +71 -0
  155. package/dist/serve/site-ui/docs/build/cloud-storage/index.html +66 -0
  156. package/dist/serve/{docs-ui → site-ui}/docs/build/cloud-storage.md +2 -2
  157. package/dist/serve/site-ui/docs/build/realtime-database/index.html +67 -0
  158. package/dist/serve/site-ui/docs/conformance-scores/index.html +50 -0
  159. package/dist/serve/{docs-ui → site-ui}/docs/conformance-scores.md +3 -3
  160. package/dist/serve/site-ui/docs/create-pyric-reference-api/index.html +531 -0
  161. package/dist/serve/{docs-ui → site-ui}/docs/database-compat/index.html +211 -168
  162. package/dist/serve/{docs-ui → site-ui}/docs/database-compat.md +208 -170
  163. package/dist/serve/site-ui/docs/examples/chess/index.html +384 -0
  164. package/dist/serve/site-ui/docs/examples/chess.md +57 -0
  165. package/dist/serve/site-ui/docs/examples/index.html +3 -0
  166. package/dist/serve/site-ui/docs/examples.md +4 -0
  167. package/dist/serve/{docs-ui → site-ui}/docs/firestore-compat/index.html +55 -91
  168. package/dist/serve/{docs-ui → site-ui}/docs/firestore-compat.md +52 -88
  169. package/dist/serve/site-ui/docs/functions-rtdb-compat/index.html +73 -0
  170. package/dist/serve/site-ui/docs/get-started/how-the-swap-works/index.html +29 -0
  171. package/dist/serve/site-ui/docs/get-started/start-building/index.html +33 -0
  172. package/dist/serve/{docs-ui → site-ui}/docs/index.json +595 -26
  173. package/dist/serve/site-ui/docs/messaging-compat/index.html +324 -0
  174. package/dist/serve/{docs-ui → site-ui}/docs/messaging-compat.md +71 -1
  175. package/dist/serve/site-ui/docs/observe/resolve-runtime-status/index.html +28 -0
  176. package/dist/serve/site-ui/docs/observe/see-whats-happening/index.html +74 -0
  177. package/dist/serve/site-ui/docs/observe/shape-your-data/index.html +45 -0
  178. package/dist/serve/site-ui/docs/overview/index.html +17 -0
  179. package/dist/serve/site-ui/docs/pyric-admin-app-reference-api/index.html +186 -0
  180. package/dist/serve/{docs-ui → site-ui}/docs/pyric-admin-auth-reference-api/index.html +4 -4
  181. package/dist/serve/{docs-ui → site-ui}/docs/pyric-admin-database-reference-api/index.html +4 -4
  182. package/dist/serve/{docs-ui → site-ui}/docs/pyric-admin-firestore-reference-api/index.html +318 -202
  183. package/dist/serve/{docs-ui → site-ui}/docs/pyric-admin-firestore-reference-api.md +154 -27
  184. package/dist/serve/{docs-ui → site-ui}/docs/pyric-admin-messaging-reference-api/index.html +5 -5
  185. package/dist/serve/site-ui/docs/pyric-admin-storage-reference-api/index.html +318 -0
  186. package/dist/serve/{docs-ui → site-ui}/docs/pyric-ai-reference-api/index.html +5 -5
  187. package/dist/serve/site-ui/docs/pyric-ai-scripting-reference-api/index.html +160 -0
  188. package/dist/serve/site-ui/docs/pyric-app-reference-api/index.html +425 -0
  189. package/dist/serve/{docs-ui → site-ui}/docs/pyric-auth-reference-api/index.html +6 -6
  190. package/dist/serve/{docs-ui → site-ui}/docs/pyric-auth-reference-api.md +1 -1
  191. package/dist/serve/site-ui/docs/pyric-cli-assurance-browser-reference-api/index.html +60 -0
  192. package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-assurance-reference-api/index.html +4 -4
  193. package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-bridge-client-reference-api/index.html +4 -4
  194. package/dist/serve/site-ui/docs/pyric-cli-bridge-reference-api/index.html +507 -0
  195. package/dist/serve/site-ui/docs/pyric-cli-conformance-browser-reference-api/index.html +258 -0
  196. package/dist/serve/site-ui/docs/pyric-cli-conformance-docs-reference-api/index.html +51 -0
  197. package/dist/serve/site-ui/docs/pyric-cli-conformance-reference-api/index.html +308 -0
  198. package/dist/serve/site-ui/docs/pyric-cli-credentials-node-reference-api/index.html +68 -0
  199. package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-discover-reference-api/index.html +4 -4
  200. package/dist/serve/site-ui/docs/pyric-cli-register-reference-api/index.html +11 -0
  201. package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-remote-reference-api/index.html +4 -4
  202. package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-serve-worker-reference-api/index.html +1186 -1384
  203. package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-serve-worker-reference-api.md +817 -1291
  204. package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-verify-reference-api/index.html +4 -4
  205. package/dist/serve/site-ui/docs/pyric-cli-vite-reference-api/index.html +126 -0
  206. package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-vite-reference-api.md +1 -1
  207. package/dist/serve/site-ui/docs/pyric-database-reference-api/index.html +2641 -0
  208. package/dist/serve/{docs-ui → site-ui}/docs/pyric-database-reference-api.md +1055 -158
  209. package/dist/serve/{docs-ui → site-ui}/docs/pyric-firestore-reference-api/index.html +311 -249
  210. package/dist/serve/{docs-ui → site-ui}/docs/pyric-firestore-reference-api.md +72 -54
  211. package/dist/serve/site-ui/docs/pyric-messaging-reference-api/index.html +509 -0
  212. package/dist/serve/site-ui/docs/pyric-messaging-sw-reference-api/index.html +182 -0
  213. package/dist/serve/{docs-ui → site-ui}/docs/pyric-rules-reference-api/index.html +7 -26
  214. package/dist/serve/{docs-ui → site-ui}/docs/pyric-rules-reference-api.md +13 -23
  215. package/dist/serve/site-ui/docs/pyric-sandbox-database-reference-api/index.html +121 -0
  216. package/dist/serve/site-ui/docs/pyric-sandbox-firestore-reference-api/index.html +203 -0
  217. package/dist/serve/{docs-ui → site-ui}/docs/pyric-sandbox-reference-api/index.html +26 -5
  218. package/dist/serve/{docs-ui → site-ui}/docs/pyric-sandbox-reference-api.md +22 -22
  219. package/dist/serve/{docs-ui → site-ui}/docs/pyric-storage-reference-api/index.html +5 -15
  220. package/dist/serve/{docs-ui → site-ui}/docs/pyric-storage-reference-api.md +0 -13
  221. package/dist/serve/site-ui/docs/pyric-ui-agents-reference-api/index.html +639 -0
  222. package/dist/serve/site-ui/docs/pyric-ui-auth-hooks-reference-api/index.html +100 -0
  223. package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-auth-reference-api/index.html +4 -4
  224. package/dist/serve/site-ui/docs/pyric-ui-events-hooks-reference-api/index.html +24 -0
  225. package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-events-reference-api/index.html +4 -4
  226. package/dist/serve/site-ui/docs/pyric-ui-firestore-hooks-reference-api/index.html +136 -0
  227. package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-firestore-reference-api/index.html +7 -7
  228. package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-firestore-reference-api.md +4 -4
  229. package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-primitives-reference-api/index.html +4 -4
  230. package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-rtdb-reference-api/index.html +4 -4
  231. package/dist/serve/site-ui/docs/pyric-ui-rules-hooks-reference-api/index.html +16 -0
  232. package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-rules-reference-api/index.html +4 -4
  233. package/dist/serve/site-ui/docs/pyric-ui-storage-hooks-reference-api/index.html +176 -0
  234. package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-storage-reference-api/index.html +10 -11
  235. package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-storage-reference-api.md +7 -8
  236. package/dist/serve/site-ui/docs/pyric-ui-traffic-hooks-reference-api/index.html +188 -0
  237. package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-traffic-reference-api/index.html +4 -4
  238. package/dist/serve/{docs-ui → site-ui}/docs/rules-compat/index.html +87 -57
  239. package/dist/serve/{docs-ui → site-ui}/docs/rules-compat.md +84 -54
  240. package/dist/serve/site-ui/docs/secure/audit-your-rules/index.html +51 -0
  241. package/dist/serve/site-ui/docs/secure/firestore-rules-limits/index.html +106 -0
  242. package/dist/serve/site-ui/docs/secure/read-a-denial/index.html +41 -0
  243. package/dist/serve/site-ui/docs/secure/rtdb-rules-in-typescript/index.html +67 -0
  244. package/dist/serve/site-ui/docs/secure/rules-standard-library/index.html +159 -0
  245. package/dist/serve/{docs-ui → site-ui}/docs/secure/rules-standard-library.md +2 -2
  246. package/dist/serve/site-ui/docs/secure/secure-it-with-rules/index.html +47 -0
  247. package/dist/serve/site-ui/docs/secure/simulate-and-lint/index.html +95 -0
  248. package/dist/serve/site-ui/docs/secure/write-a-rules-test-suite/index.html +82 -0
  249. package/dist/serve/site-ui/docs/ship/ship-to-production/index.html +37 -0
  250. package/dist/serve/site-ui/docs/ship/test-in-node/index.html +75 -0
  251. package/dist/serve/{docs-ui → site-ui}/docs/storage-compat/index.html +8 -8
  252. package/dist/serve/{docs-ui → site-ui}/docs/storage-compat.md +5 -5
  253. package/dist/serve/site-ui/docs/trust/how-we-know-it-matches-firebase/index.html +132 -0
  254. package/dist/serve/site-ui/docs/trust/rules-standard-library/index.html +861 -0
  255. package/dist/serve/site-ui/docs/trust/rules-standard-library.md +344 -0
  256. package/dist/serve/site-ui/docs/trust/storage-rules-stdlib-research/index.html +582 -0
  257. package/dist/serve/site-ui/docs/trust/storage-rules-stdlib-research.md +448 -0
  258. package/dist/serve/site-ui/docs/trust/versioning-and-compatibility/index.html +14 -0
  259. package/dist/serve/{docs-ui → site-ui}/docs/tutorial/index.html +4 -4
  260. package/dist/serve/{docs-ui → site-ui}/docs/tutorial.md +1 -1
  261. package/dist/serve/site-ui/examples/chess/index.html +2 -0
  262. package/dist/serve/site-ui/examples/firestore-first-write/index.html +2 -0
  263. package/dist/serve/site-ui/firestore/index.html +11 -0
  264. package/dist/serve/site-ui/index.html +11 -0
  265. package/dist/serve/{docs-ui → site-ui}/llms.txt +6 -2
  266. package/dist/serve/site-ui/rtdb/index.html +11 -0
  267. package/dist/serve/site-ui/settings/index.html +11 -0
  268. package/dist/serve/site-ui/storage/index.html +11 -0
  269. package/dist/serve/site-ui/studio-routes.json +1 -0
  270. package/dist/serve/site-ui/traffic/index.html +11 -0
  271. package/dist/serve/standalone-assets.d.ts +4 -10
  272. package/dist/serve/standalone-assets.d.ts.map +1 -1
  273. package/dist/serve/standalone-assets.js +8 -21
  274. package/dist/serve/standalone-assets.js.map +1 -1
  275. package/dist/serve/vite-functions-development.d.ts +29 -0
  276. package/dist/serve/vite-functions-development.d.ts.map +1 -0
  277. package/dist/serve/vite-functions-development.js +150 -0
  278. package/dist/serve/vite-functions-development.js.map +1 -0
  279. package/dist/serve/vite-generation-bridge.d.ts +17 -0
  280. package/dist/serve/vite-generation-bridge.d.ts.map +1 -0
  281. package/dist/serve/vite-generation-bridge.js +47 -0
  282. package/dist/serve/vite-generation-bridge.js.map +1 -0
  283. package/dist/serve/vite-generation-functions.d.ts +35 -0
  284. package/dist/serve/vite-generation-functions.d.ts.map +1 -0
  285. package/dist/serve/vite-generation-functions.js +46 -0
  286. package/dist/serve/vite-generation-functions.js.map +1 -0
  287. package/dist/serve/vite-generation-middleware.d.ts +10 -0
  288. package/dist/serve/vite-generation-middleware.d.ts.map +1 -0
  289. package/dist/serve/vite-generation-middleware.js +40 -0
  290. package/dist/serve/vite-generation-middleware.js.map +1 -0
  291. package/dist/serve/vite-generation-rules-watch.d.ts +8 -0
  292. package/dist/serve/vite-generation-rules-watch.d.ts.map +1 -0
  293. package/dist/serve/vite-generation-rules-watch.js +33 -0
  294. package/dist/serve/vite-generation-rules-watch.js.map +1 -0
  295. package/dist/serve/vite-module-swap.d.ts +16 -0
  296. package/dist/serve/vite-module-swap.d.ts.map +1 -0
  297. package/dist/serve/vite-module-swap.js +96 -0
  298. package/dist/serve/vite-module-swap.js.map +1 -0
  299. package/dist/serve/vite-page-runtime.d.ts +29 -0
  300. package/dist/serve/vite-page-runtime.d.ts.map +1 -0
  301. package/dist/serve/vite-page-runtime.js +71 -0
  302. package/dist/serve/vite-page-runtime.js.map +1 -0
  303. package/dist/serve/vite-plugin.d.ts +44 -4
  304. package/dist/serve/vite-plugin.d.ts.map +1 -1
  305. package/dist/serve/vite-plugin.js +62 -864
  306. package/dist/serve/vite-plugin.js.map +1 -1
  307. package/dist/serve/vite-sandbox-generation.d.ts +57 -0
  308. package/dist/serve/vite-sandbox-generation.d.ts.map +1 -0
  309. package/dist/serve/vite-sandbox-generation.js +178 -0
  310. package/dist/serve/vite-sandbox-generation.js.map +1 -0
  311. package/dist/serve/worker/client/disconnect.d.ts.map +1 -1
  312. package/dist/serve/worker/client/disconnect.js +2 -0
  313. package/dist/serve/worker/client/disconnect.js.map +1 -1
  314. package/dist/serve/worker/client/handles.d.ts +5 -0
  315. package/dist/serve/worker/client/handles.d.ts.map +1 -1
  316. package/dist/serve/worker/client/handles.js.map +1 -1
  317. package/dist/serve/worker/client/pagehide.d.ts +13 -0
  318. package/dist/serve/worker/client/pagehide.d.ts.map +1 -0
  319. package/dist/serve/worker/client/pagehide.js +19 -0
  320. package/dist/serve/worker/client/pagehide.js.map +1 -0
  321. package/dist/serve/worker/client/rtdb-admin.d.ts +8 -0
  322. package/dist/serve/worker/client/rtdb-admin.d.ts.map +1 -0
  323. package/dist/serve/worker/client/rtdb-admin.js +39 -0
  324. package/dist/serve/worker/client/rtdb-admin.js.map +1 -0
  325. package/dist/serve/worker/client/rtdb-connection-lifecycle.d.ts +15 -0
  326. package/dist/serve/worker/client/rtdb-connection-lifecycle.d.ts.map +1 -0
  327. package/dist/serve/worker/client/rtdb-connection-lifecycle.js +45 -0
  328. package/dist/serve/worker/client/rtdb-connection-lifecycle.js.map +1 -0
  329. package/dist/serve/worker/client/rtdb-controls.d.ts +6 -0
  330. package/dist/serve/worker/client/rtdb-controls.d.ts.map +1 -0
  331. package/dist/serve/worker/client/rtdb-controls.js +8 -0
  332. package/dist/serve/worker/client/rtdb-controls.js.map +1 -0
  333. package/dist/serve/worker/client/rtdb-listeners.d.ts +24 -0
  334. package/dist/serve/worker/client/rtdb-listeners.d.ts.map +1 -0
  335. package/dist/serve/worker/client/rtdb-listeners.js +262 -0
  336. package/dist/serve/worker/client/rtdb-listeners.js.map +1 -0
  337. package/dist/serve/worker/client/rtdb-reads.d.ts +4 -0
  338. package/dist/serve/worker/client/rtdb-reads.d.ts.map +1 -0
  339. package/dist/serve/worker/client/rtdb-reads.js +11 -0
  340. package/dist/serve/worker/client/rtdb-reads.js.map +1 -0
  341. package/dist/serve/worker/client/rtdb-references.d.ts +19 -0
  342. package/dist/serve/worker/client/rtdb-references.d.ts.map +1 -0
  343. package/dist/serve/worker/client/rtdb-references.js +63 -0
  344. package/dist/serve/worker/client/rtdb-references.js.map +1 -0
  345. package/dist/serve/worker/client/rtdb-snapshots.d.ts +20 -0
  346. package/dist/serve/worker/client/rtdb-snapshots.d.ts.map +1 -0
  347. package/dist/serve/worker/client/rtdb-snapshots.js +64 -0
  348. package/dist/serve/worker/client/rtdb-snapshots.js.map +1 -0
  349. package/dist/serve/worker/client/rtdb-transactions.d.ts +14 -0
  350. package/dist/serve/worker/client/rtdb-transactions.d.ts.map +1 -0
  351. package/dist/serve/worker/client/rtdb-transactions.js +34 -0
  352. package/dist/serve/worker/client/rtdb-transactions.js.map +1 -0
  353. package/dist/serve/worker/client/rtdb-writes.d.ts +8 -0
  354. package/dist/serve/worker/client/rtdb-writes.d.ts.map +1 -0
  355. package/dist/serve/worker/client/rtdb-writes.js +65 -0
  356. package/dist/serve/worker/client/rtdb-writes.js.map +1 -0
  357. package/dist/serve/worker/client.d.ts +0 -2
  358. package/dist/serve/worker/client.d.ts.map +1 -1
  359. package/dist/serve/worker/client.js +0 -2
  360. package/dist/serve/worker/client.js.map +1 -1
  361. package/dist/serve/worker/entry.js +2 -2
  362. package/dist/serve/worker/entry.js.map +1 -1
  363. package/dist/serve/worker/host/dispatch.d.ts +2 -0
  364. package/dist/serve/worker/host/dispatch.d.ts.map +1 -1
  365. package/dist/serve/worker/host/dispatch.js +24 -2
  366. package/dist/serve/worker/host/dispatch.js.map +1 -1
  367. package/dist/serve/worker/host/rtdb.d.ts +6 -2
  368. package/dist/serve/worker/host/rtdb.d.ts.map +1 -1
  369. package/dist/serve/worker/host/rtdb.js +224 -2
  370. package/dist/serve/worker/host/rtdb.js.map +1 -1
  371. package/dist/serve/worker/host/studio.d.ts.map +1 -1
  372. package/dist/serve/worker/host/studio.js +2 -0
  373. package/dist/serve/worker/host/studio.js.map +1 -1
  374. package/dist/serve/worker/host/subscriptions.d.ts.map +1 -1
  375. package/dist/serve/worker/host/subscriptions.js +3 -3
  376. package/dist/serve/worker/host/subscriptions.js.map +1 -1
  377. package/dist/serve/worker/host.d.ts +1 -1
  378. package/dist/serve/worker/host.d.ts.map +1 -1
  379. package/dist/serve/worker/host.js +1 -1
  380. package/dist/serve/worker/host.js.map +1 -1
  381. package/dist/serve/worker/index.d.ts +16 -1
  382. package/dist/serve/worker/index.d.ts.map +1 -1
  383. package/dist/serve/worker/index.js +17 -4
  384. package/dist/serve/worker/index.js.map +1 -1
  385. package/dist/serve/worker/protocol.d.ts +57 -0
  386. package/dist/serve/worker/protocol.d.ts.map +1 -1
  387. package/dist/serve/worker/protocol.js.map +1 -1
  388. package/dist/serve/worker/rtdb-value-equality.d.ts +3 -0
  389. package/dist/serve/worker/rtdb-value-equality.d.ts.map +1 -0
  390. package/dist/serve/worker/rtdb-value-equality.js +18 -0
  391. package/dist/serve/worker/rtdb-value-equality.js.map +1 -0
  392. package/dist/serve/worker/serve-init.js +2 -2
  393. package/dist/serve/worker/serve-init.js.map +1 -1
  394. package/dist/serve/worker/service-worker-relay.js +2 -2
  395. package/dist/serve/worker/service-worker-relay.js.map +1 -1
  396. package/package.json +7 -5
  397. package/src/assurance/.generated/conformance-verdicts.ts +120 -75
  398. package/src/bridge/client/dispatch.ts +1 -1
  399. package/src/cli/serve.ts +215 -307
  400. package/src/cli/service-command-records/database-rules-generate.ts +3 -0
  401. package/src/cli/service-command-records/database-rules-lint.ts +3 -0
  402. package/src/cli/service-command-records/database-rules-simulate.ts +3 -0
  403. package/src/cli/service-command-records/database-rules-validate.ts +3 -0
  404. package/src/cli/service-command-records/firestore-indexes-generate.ts +3 -0
  405. package/src/cli/service-command-records/firestore-rules-lint.ts +3 -0
  406. package/src/cli/service-command-records/firestore-rules-resolve.ts +3 -0
  407. package/src/cli/service-command-records/firestore-rules-simulate.ts +3 -0
  408. package/src/cli/service-command-records/firestore-rules-validate.ts +3 -0
  409. package/src/cli/service-command-records/storage-rules-lint.ts +3 -0
  410. package/src/cli/service-command-records/storage-rules-simulate.ts +3 -0
  411. package/src/cli/service-commands.generated.ts +27 -0
  412. package/src/cli/service-commands.test.ts +43 -0
  413. package/src/cli/service-commands.ts +36 -51
  414. package/src/conformance/.generated/can-i-use-browser.ts +1 -1
  415. package/src/conformance/.generated/can-i-use.ts +1 -1
  416. package/src/conformance/.generated/conformance-docs.ts +1 -1
  417. package/src/functions-rtdb/development-runtime.ts +299 -0
  418. package/src/serve/bridge-mount.ts +253 -19
  419. package/src/serve/bundler.ts +8 -34
  420. package/src/serve/entries/app-client.ts +5 -4
  421. package/src/serve/entries/auth-helper-core.ts +117 -30
  422. package/src/serve/entries/auth.ts +8 -4
  423. package/src/serve/entries/database.ts +180 -57
  424. package/src/serve/entries/init.ts +30 -20
  425. package/src/serve/html-injection.ts +65 -0
  426. package/src/serve/namespace.ts +26 -169
  427. package/src/serve/runtime/worker-replacement.ts +1 -1
  428. package/src/serve/sandbox-session.ts +233 -0
  429. package/src/serve/server.ts +20 -5
  430. package/src/serve/site-tree.ts +146 -0
  431. package/src/serve/standalone-assets.ts +9 -26
  432. package/src/serve/vite-functions-development.ts +201 -0
  433. package/src/serve/vite-generation-bridge.ts +66 -0
  434. package/src/serve/vite-generation-functions.ts +78 -0
  435. package/src/serve/vite-generation-middleware.ts +56 -0
  436. package/src/serve/vite-generation-rules-watch.ts +37 -0
  437. package/src/serve/vite-module-swap.ts +119 -0
  438. package/src/serve/vite-page-runtime.ts +100 -0
  439. package/src/serve/vite-plugin.ts +78 -883
  440. package/src/serve/vite-sandbox-generation.ts +255 -0
  441. package/src/serve/worker/client/disconnect.ts +3 -1
  442. package/src/serve/worker/client/handles.ts +5 -0
  443. package/src/serve/worker/client/pagehide.ts +31 -0
  444. package/src/serve/worker/client/rtdb-admin.ts +74 -0
  445. package/src/serve/worker/client/rtdb-connection-lifecycle.ts +52 -0
  446. package/src/serve/worker/client/rtdb-controls.ts +8 -0
  447. package/src/serve/worker/client/rtdb-listeners.ts +337 -0
  448. package/src/serve/worker/client/rtdb-reads.ts +12 -0
  449. package/src/serve/worker/client/rtdb-references.ts +85 -0
  450. package/src/serve/worker/client/rtdb-snapshots.ts +118 -0
  451. package/src/serve/worker/client/rtdb-transactions.ts +51 -0
  452. package/src/serve/worker/client/rtdb-writes.ts +74 -0
  453. package/src/serve/worker/client.ts +0 -2
  454. package/src/serve/worker/entry.ts +2 -2
  455. package/src/serve/worker/host/dispatch.ts +22 -2
  456. package/src/serve/worker/host/rtdb.ts +243 -2
  457. package/src/serve/worker/host/studio.ts +2 -0
  458. package/src/serve/worker/host/subscriptions.ts +8 -4
  459. package/src/serve/worker/host.ts +1 -1
  460. package/src/serve/worker/index.ts +58 -10
  461. package/src/serve/worker/protocol.ts +23 -2
  462. package/src/serve/worker/rtdb-value-equality.ts +17 -0
  463. package/src/serve/worker/serve-init.ts +2 -2
  464. package/src/serve/worker/service-worker-relay.ts +2 -2
  465. package/dist/serve/docs-ui/_astro/_slug_.DUci-duz.css +0 -1
  466. package/dist/serve/docs-ui/docs/_rhythm/index.html +0 -100
  467. package/dist/serve/docs-ui/docs/agent/set-up-your-agent/index.html +0 -43
  468. package/dist/serve/docs-ui/docs/agent/watch-and-review/index.html +0 -26
  469. package/dist/serve/docs-ui/docs/agent/work-with-an-agent/index.html +0 -70
  470. package/dist/serve/docs-ui/docs/api-reference/index.html +0 -68
  471. package/dist/serve/docs-ui/docs/build/ai-logic/index.html +0 -64
  472. package/dist/serve/docs-ui/docs/build/authentication/index.html +0 -66
  473. package/dist/serve/docs-ui/docs/build/cloud-firestore/index.html +0 -70
  474. package/dist/serve/docs-ui/docs/build/cloud-messaging/index.html +0 -71
  475. package/dist/serve/docs-ui/docs/build/cloud-storage/index.html +0 -66
  476. package/dist/serve/docs-ui/docs/build/realtime-database/index.html +0 -67
  477. package/dist/serve/docs-ui/docs/conformance-scores/index.html +0 -50
  478. package/dist/serve/docs-ui/docs/create-pyric-reference-api/index.html +0 -531
  479. package/dist/serve/docs-ui/docs/functions-rtdb-compat/index.html +0 -73
  480. package/dist/serve/docs-ui/docs/get-started/how-the-swap-works/index.html +0 -29
  481. package/dist/serve/docs-ui/docs/get-started/start-building/index.html +0 -33
  482. package/dist/serve/docs-ui/docs/messaging-compat/index.html +0 -265
  483. package/dist/serve/docs-ui/docs/observe/resolve-runtime-status/index.html +0 -28
  484. package/dist/serve/docs-ui/docs/observe/see-whats-happening/index.html +0 -74
  485. package/dist/serve/docs-ui/docs/observe/shape-your-data/index.html +0 -45
  486. package/dist/serve/docs-ui/docs/overview/index.html +0 -17
  487. package/dist/serve/docs-ui/docs/pyric-admin-app-reference-api/index.html +0 -186
  488. package/dist/serve/docs-ui/docs/pyric-admin-storage-reference-api/index.html +0 -318
  489. package/dist/serve/docs-ui/docs/pyric-ai-scripting-reference-api/index.html +0 -160
  490. package/dist/serve/docs-ui/docs/pyric-app-reference-api/index.html +0 -425
  491. package/dist/serve/docs-ui/docs/pyric-cli-assurance-browser-reference-api/index.html +0 -60
  492. package/dist/serve/docs-ui/docs/pyric-cli-bridge-reference-api/index.html +0 -507
  493. package/dist/serve/docs-ui/docs/pyric-cli-conformance-browser-reference-api/index.html +0 -258
  494. package/dist/serve/docs-ui/docs/pyric-cli-conformance-docs-reference-api/index.html +0 -51
  495. package/dist/serve/docs-ui/docs/pyric-cli-conformance-reference-api/index.html +0 -308
  496. package/dist/serve/docs-ui/docs/pyric-cli-credentials-node-reference-api/index.html +0 -68
  497. package/dist/serve/docs-ui/docs/pyric-cli-register-reference-api/index.html +0 -11
  498. package/dist/serve/docs-ui/docs/pyric-cli-vite-reference-api/index.html +0 -126
  499. package/dist/serve/docs-ui/docs/pyric-database-reference-api/index.html +0 -1852
  500. package/dist/serve/docs-ui/docs/pyric-messaging-reference-api/index.html +0 -509
  501. package/dist/serve/docs-ui/docs/pyric-messaging-sw-reference-api/index.html +0 -182
  502. package/dist/serve/docs-ui/docs/pyric-sandbox-database-reference-api/index.html +0 -121
  503. package/dist/serve/docs-ui/docs/pyric-sandbox-firestore-reference-api/index.html +0 -203
  504. package/dist/serve/docs-ui/docs/pyric-ui-agents-reference-api/index.html +0 -639
  505. package/dist/serve/docs-ui/docs/pyric-ui-auth-hooks-reference-api/index.html +0 -100
  506. package/dist/serve/docs-ui/docs/pyric-ui-events-hooks-reference-api/index.html +0 -24
  507. package/dist/serve/docs-ui/docs/pyric-ui-firestore-hooks-reference-api/index.html +0 -136
  508. package/dist/serve/docs-ui/docs/pyric-ui-rules-hooks-reference-api/index.html +0 -16
  509. package/dist/serve/docs-ui/docs/pyric-ui-storage-hooks-reference-api/index.html +0 -176
  510. package/dist/serve/docs-ui/docs/pyric-ui-traffic-hooks-reference-api/index.html +0 -188
  511. package/dist/serve/docs-ui/docs/secure/audit-your-rules/index.html +0 -51
  512. package/dist/serve/docs-ui/docs/secure/firestore-rules-limits/index.html +0 -106
  513. package/dist/serve/docs-ui/docs/secure/read-a-denial/index.html +0 -41
  514. package/dist/serve/docs-ui/docs/secure/rtdb-rules-in-typescript/index.html +0 -67
  515. package/dist/serve/docs-ui/docs/secure/rules-standard-library/index.html +0 -159
  516. package/dist/serve/docs-ui/docs/secure/secure-it-with-rules/index.html +0 -47
  517. package/dist/serve/docs-ui/docs/secure/simulate-and-lint/index.html +0 -95
  518. package/dist/serve/docs-ui/docs/secure/write-a-rules-test-suite/index.html +0 -82
  519. package/dist/serve/docs-ui/docs/ship/ship-to-production/index.html +0 -37
  520. package/dist/serve/docs-ui/docs/ship/test-in-node/index.html +0 -75
  521. package/dist/serve/docs-ui/docs/trust/how-we-know-it-matches-firebase/index.html +0 -132
  522. package/dist/serve/docs-ui/docs/trust/versioning-and-compatibility/index.html +0 -14
  523. package/dist/serve/docs-ui/index.html +0 -1
  524. package/dist/serve/studio-ui/assets/RulesCodeEditor-BDlH-5lp.js +0 -23
  525. package/dist/serve/studio-ui/assets/index-Bf9SSE8L.js +0 -1218
  526. package/dist/serve/studio-ui/assets/index-BlSGru_r.css +0 -1
  527. package/dist/serve/studio-ui/assets/seed-D_UjxfOU.js +0 -20
  528. package/dist/serve/studio-ui/index.html +0 -32
  529. package/dist/serve/worker/client/rtdb.d.ts +0 -36
  530. package/dist/serve/worker/client/rtdb.d.ts.map +0 -1
  531. package/dist/serve/worker/client/rtdb.js +0 -241
  532. package/dist/serve/worker/client/rtdb.js.map +0 -1
  533. package/src/serve/worker/client/rtdb.ts +0 -311
  534. /package/dist/serve/{docs-ui → site-ui}/404.html +0 -0
  535. /package/dist/serve/{docs-ui → site-ui}/_astro/_slug_.CXh9yTP1.css +0 -0
  536. /package/dist/serve/{docs-ui → site-ui}/docs/_rhythm.md +0 -0
  537. /package/dist/serve/{docs-ui → site-ui}/docs/agent/set-up-your-agent.md +0 -0
  538. /package/dist/serve/{docs-ui → site-ui}/docs/agent/watch-and-review.md +0 -0
  539. /package/dist/serve/{docs-ui → site-ui}/docs/agent/work-with-an-agent.md +0 -0
  540. /package/dist/serve/{docs-ui → site-ui}/docs/ai-compat.md +0 -0
  541. /package/dist/serve/{docs-ui → site-ui}/docs/api-reference.md +0 -0
  542. /package/dist/serve/{docs-ui → site-ui}/docs/app-compat.md +0 -0
  543. /package/dist/serve/{docs-ui → site-ui}/docs/auth-compat.md +0 -0
  544. /package/dist/serve/{docs-ui → site-ui}/docs/build/ai-logic.md +0 -0
  545. /package/dist/serve/{docs-ui → site-ui}/docs/build/authentication.md +0 -0
  546. /package/dist/serve/{docs-ui → site-ui}/docs/build/cloud-firestore.md +0 -0
  547. /package/dist/serve/{docs-ui → site-ui}/docs/build/cloud-messaging.md +0 -0
  548. /package/dist/serve/{docs-ui → site-ui}/docs/build/realtime-database.md +0 -0
  549. /package/dist/serve/{docs-ui → site-ui}/docs/create-pyric-reference-api.md +0 -0
  550. /package/dist/serve/{docs-ui → site-ui}/docs/functions-rtdb-compat.md +0 -0
  551. /package/dist/serve/{docs-ui → site-ui}/docs/get-started/how-the-swap-works.md +0 -0
  552. /package/dist/serve/{docs-ui → site-ui}/docs/get-started/start-building.md +0 -0
  553. /package/dist/serve/{docs-ui → site-ui}/docs/index.html +0 -0
  554. /package/dist/serve/{docs-ui → site-ui}/docs/observe/resolve-runtime-status.md +0 -0
  555. /package/dist/serve/{docs-ui → site-ui}/docs/observe/see-whats-happening.md +0 -0
  556. /package/dist/serve/{docs-ui → site-ui}/docs/observe/shape-your-data.md +0 -0
  557. /package/dist/serve/{docs-ui → site-ui}/docs/overview.md +0 -0
  558. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-admin-app-reference-api.md +0 -0
  559. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-admin-auth-reference-api.md +0 -0
  560. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-admin-database-reference-api.md +0 -0
  561. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-admin-messaging-reference-api.md +0 -0
  562. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-admin-storage-reference-api.md +0 -0
  563. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-ai-reference-api.md +0 -0
  564. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-ai-scripting-reference-api.md +0 -0
  565. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-app-reference-api.md +0 -0
  566. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-assurance-browser-reference-api.md +0 -0
  567. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-assurance-reference-api.md +0 -0
  568. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-bridge-client-reference-api.md +0 -0
  569. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-bridge-reference-api.md +0 -0
  570. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-conformance-browser-reference-api.md +0 -0
  571. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-conformance-docs-reference-api.md +0 -0
  572. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-conformance-reference-api.md +0 -0
  573. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-credentials-node-reference-api.md +0 -0
  574. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-discover-reference-api.md +0 -0
  575. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-register-reference-api.md +0 -0
  576. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-remote-reference-api.md +0 -0
  577. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-cli-verify-reference-api.md +0 -0
  578. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-messaging-reference-api.md +0 -0
  579. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-messaging-sw-reference-api.md +0 -0
  580. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-sandbox-database-reference-api.md +0 -0
  581. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-sandbox-firestore-reference-api.md +0 -0
  582. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-agents-reference-api.md +0 -0
  583. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-auth-hooks-reference-api.md +0 -0
  584. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-auth-reference-api.md +0 -0
  585. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-events-hooks-reference-api.md +0 -0
  586. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-events-reference-api.md +0 -0
  587. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-firestore-hooks-reference-api.md +0 -0
  588. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-primitives-reference-api.md +0 -0
  589. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-rtdb-reference-api.md +0 -0
  590. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-rules-hooks-reference-api.md +0 -0
  591. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-rules-reference-api.md +0 -0
  592. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-storage-hooks-reference-api.md +0 -0
  593. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-traffic-hooks-reference-api.md +0 -0
  594. /package/dist/serve/{docs-ui → site-ui}/docs/pyric-ui-traffic-reference-api.md +0 -0
  595. /package/dist/serve/{docs-ui → site-ui}/docs/secure/audit-your-rules.md +0 -0
  596. /package/dist/serve/{docs-ui → site-ui}/docs/secure/firestore-rules-limits.md +0 -0
  597. /package/dist/serve/{docs-ui → site-ui}/docs/secure/read-a-denial.md +0 -0
  598. /package/dist/serve/{docs-ui → site-ui}/docs/secure/rtdb-rules-in-typescript.md +0 -0
  599. /package/dist/serve/{docs-ui → site-ui}/docs/secure/secure-it-with-rules.md +0 -0
  600. /package/dist/serve/{docs-ui → site-ui}/docs/secure/simulate-and-lint.md +0 -0
  601. /package/dist/serve/{docs-ui → site-ui}/docs/secure/write-a-rules-test-suite.md +0 -0
  602. /package/dist/serve/{docs-ui → site-ui}/docs/ship/ship-to-production.md +0 -0
  603. /package/dist/serve/{docs-ui → site-ui}/docs/ship/test-in-node.md +0 -0
  604. /package/dist/serve/{docs-ui → site-ui}/docs/trust/how-we-know-it-matches-firebase.md +0 -0
  605. /package/dist/serve/{docs-ui → site-ui}/docs/trust/versioning-and-compatibility.md +0 -0
  606. /package/dist/serve/{studio-ui → site-ui}/pyric-logo.svg +0 -0
@@ -1,5 +1,113 @@
1
1
  <!-- Generated from published package declarations via TypeDoc. Rendered by the api-reference content loader. -->
2
2
 
3
+ ## Classes
4
+
5
+ <a id="rtdbondisconnect"></a>
6
+
7
+ ### RtdbOnDisconnect
8
+
9
+ #### Constructors
10
+
11
+ <a id="constructor"></a>
12
+
13
+ ##### Constructor
14
+
15
+ ```ts
16
+ new RtdbOnDisconnect(_repo: RtdbRefHandle, _path?: string): RtdbOnDisconnect;
17
+ ```
18
+
19
+ ###### Parameters
20
+
21
+ | Parameter | Type |
22
+ | :------ | :------ |
23
+ | `_repo` | [`RtdbRefHandle`](#rtdbrefhandle) |
24
+ | `_path?` | `string` |
25
+
26
+ ###### Returns
27
+
28
+ [`RtdbOnDisconnect`](#rtdbondisconnect)
29
+
30
+ #### Methods
31
+
32
+ <a id="cancel"></a>
33
+
34
+ ##### cancel()
35
+
36
+ ```ts
37
+ cancel(): Promise<void>;
38
+ ```
39
+
40
+ ###### Returns
41
+
42
+ `Promise`\<`void`\>
43
+
44
+ <a id="remove"></a>
45
+
46
+ ##### remove()
47
+
48
+ ```ts
49
+ remove(): Promise<void>;
50
+ ```
51
+
52
+ ###### Returns
53
+
54
+ `Promise`\<`void`\>
55
+
56
+ <a id="set"></a>
57
+
58
+ ##### set()
59
+
60
+ ```ts
61
+ set(value: unknown): Promise<void>;
62
+ ```
63
+
64
+ ###### Parameters
65
+
66
+ | Parameter | Type |
67
+ | :------ | :------ |
68
+ | `value` | `unknown` |
69
+
70
+ ###### Returns
71
+
72
+ `Promise`\<`void`\>
73
+
74
+ <a id="setwithpriority"></a>
75
+
76
+ ##### setWithPriority()
77
+
78
+ ```ts
79
+ setWithPriority(value: unknown, priority: string | number): Promise<void>;
80
+ ```
81
+
82
+ ###### Parameters
83
+
84
+ | Parameter | Type |
85
+ | :------ | :------ |
86
+ | `value` | `unknown` |
87
+ | `priority` | `string` \| `number` |
88
+
89
+ ###### Returns
90
+
91
+ `Promise`\<`void`\>
92
+
93
+ <a id="update"></a>
94
+
95
+ ##### update()
96
+
97
+ ```ts
98
+ update(values: Record<string, unknown>): Promise<void>;
99
+ ```
100
+
101
+ ###### Parameters
102
+
103
+ | Parameter | Type |
104
+ | :------ | :------ |
105
+ | `values` | `Record`\<`string`, `unknown`\> |
106
+
107
+ ###### Returns
108
+
109
+ `Promise`\<`void`\>
110
+
3
111
  ## Interfaces
4
112
 
5
113
  <a id="clientauth"></a>
@@ -36,25 +144,6 @@ Opaque client-side Firestore handle. Holds the MessagePort to the worker.
36
144
 
37
145
  ### ClientDocSnapshot
38
146
 
39
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
40
-
41
- This barrel exports ONLY the leaf client + the wire-protocol types — the
42
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
43
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
44
- does NOT re-export `host.ts`/`entry.ts`:
45
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
46
- the backend) — node/engine-heavy, never wanted in a page bundle.
47
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
48
-
49
- `client.ts` imports only the value codec
50
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
51
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
52
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
53
-
54
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
55
- `import { getFirestore, subscribeEvents, setLens } from
56
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
57
-
58
147
  #### Properties
59
148
 
60
149
  | Property | Modifier | Type | Description |
@@ -109,25 +198,6 @@ Worker-backed Storage handle (carries the shared `MessagePort`).
109
198
 
110
199
  ### ClientQuerySnapshot
111
200
 
112
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
113
-
114
- This barrel exports ONLY the leaf client + the wire-protocol types — the
115
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
116
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
117
- does NOT re-export `host.ts`/`entry.ts`:
118
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
119
- the backend) — node/engine-heavy, never wanted in a page bundle.
120
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
121
-
122
- `client.ts` imports only the value codec
123
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
124
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
125
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
126
-
127
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
128
- `import { getFirestore, subscribeEvents, setLens } from
129
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
130
-
131
201
  #### Properties
132
202
 
133
203
  | Property | Modifier | Type |
@@ -142,25 +212,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
142
212
 
143
213
  ### ClientRtdb
144
214
 
145
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
146
-
147
- This barrel exports ONLY the leaf client + the wire-protocol types — the
148
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
149
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
150
- does NOT re-export `host.ts`/`entry.ts`:
151
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
152
- the backend) — node/engine-heavy, never wanted in a page bundle.
153
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
154
-
155
- `client.ts` imports only the value codec
156
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
157
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
158
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
159
-
160
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
161
- `import { getFirestore, subscribeEvents, setLens } from
162
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
163
-
164
215
  #### Properties
165
216
 
166
217
  | Property | Modifier | Type |
@@ -248,7 +299,7 @@ get(ref: DocRefHandle): Promise<ClientDocSnapshot>;
248
299
 
249
300
  `Promise`\<[`ClientDocSnapshot`](#clientdocsnapshot)\>
250
301
 
251
- <a id="set"></a>
302
+ <a id="set-2"></a>
252
303
 
253
304
  ##### set()
254
305
 
@@ -276,7 +327,7 @@ set(
276
327
 
277
328
  `void`
278
329
 
279
- <a id="update"></a>
330
+ <a id="update-2"></a>
280
331
 
281
332
  ##### update()
282
333
 
@@ -419,7 +470,7 @@ delete(ref: DocRefHandle): ClientWriteBatch;
419
470
 
420
471
  [`ClientWriteBatch`](#clientwritebatch)
421
472
 
422
- <a id="set-2"></a>
473
+ <a id="set-4"></a>
423
474
 
424
475
  ##### set()
425
476
 
@@ -447,7 +498,7 @@ set(
447
498
 
448
499
  [`ClientWriteBatch`](#clientwritebatch)
449
500
 
450
- <a id="update-2"></a>
501
+ <a id="update-4"></a>
451
502
 
452
503
  ##### update()
453
504
 
@@ -485,6 +536,18 @@ Client-side collection reference.
485
536
 
486
537
  ***
487
538
 
539
+ <a id="disconnectclientoptions"></a>
540
+
541
+ ### DisconnectClientOptions
542
+
543
+ #### Properties
544
+
545
+ | Property | Type | Description |
546
+ | :------ | :------ | :------ |
547
+ | <a id="acktimeoutms"></a> `ackTimeoutMs?` | `number` | Bound version-skew and worker-crash cases where no disconnect reply arrives. |
548
+
549
+ ***
550
+
488
551
  <a id="docrefhandle"></a>
489
552
 
490
553
  ### DocRefHandle
@@ -506,25 +569,6 @@ Client-side document reference — carries a DocRef descriptor + port.
506
569
 
507
570
  ### PresenceSession
508
571
 
509
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
510
-
511
- This barrel exports ONLY the leaf client + the wire-protocol types — the
512
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
513
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
514
- does NOT re-export `host.ts`/`entry.ts`:
515
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
516
- the backend) — node/engine-heavy, never wanted in a page bundle.
517
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
518
-
519
- `client.ts` imports only the value codec
520
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
521
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
522
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
523
-
524
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
525
- `import { getFirestore, subscribeEvents, setLens } from
526
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
527
-
528
572
  #### Properties
529
573
 
530
574
  | Property | Modifier | Type | Description |
@@ -564,6 +608,41 @@ Authoritative presence snapshot owned by the SharedWorker host.
564
608
 
565
609
  ***
566
610
 
611
+ <a id="pyricruntimemanifest"></a>
612
+
613
+ ### PyricRuntimeManifest
614
+
615
+ Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
616
+
617
+ This barrel exports ONLY the leaf client + the wire-protocol types — the
618
+ pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
619
+ connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
620
+ does NOT re-export `host.ts`/`entry.ts`:
621
+ - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
622
+ the backend) — node/engine-heavy, never wanted in a page bundle.
623
+ - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
624
+
625
+ `client.ts` imports only the value codec
626
+ (`pyric/firestore/internal/value-codec`, a leaf internal seam)
627
+ and type-only `pyric/sandbox` (erased at build), so this entry stays free of
628
+ the ~10 MB rules/sandbox engine — safe to import from any browser app.
629
+
630
+ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
631
+ `import { getFirestore, subscribeEvents, setLens } from
632
+ '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
633
+
634
+ #### Properties
635
+
636
+ | Property | Type | Description |
637
+ | :------ | :------ | :------ |
638
+ | <a id="studiourl"></a> `studioUrl` | `string` | - |
639
+ | <a id="worker"></a> `worker` | \{ `name`: `string`; `servedEpoch`: `string`; `url`: `string`; \} | - |
640
+ | `worker.name` | `string` | - |
641
+ | `worker.servedEpoch` | `string` | Content epoch served by the current dev server; null in in-page mode. |
642
+ | `worker.url` | `string` | - |
643
+
644
+ ***
645
+
567
646
  <a id="queryhandle"></a>
568
647
 
569
648
  ### QueryHandle
@@ -606,30 +685,12 @@ and bridges it here; the worker seeds it + `restoreSession`s it (no password
606
685
 
607
686
  ### RtdbDataSnapshot
608
687
 
609
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
610
-
611
- This barrel exports ONLY the leaf client + the wire-protocol types — the
612
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
613
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
614
- does NOT re-export `host.ts`/`entry.ts`:
615
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
616
- the backend) — node/engine-heavy, never wanted in a page bundle.
617
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
618
-
619
- `client.ts` imports only the value codec
620
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
621
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
622
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
623
-
624
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
625
- `import { getFirestore, subscribeEvents, setLens } from
626
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
627
-
628
688
  #### Properties
629
689
 
630
690
  | Property | Modifier | Type |
631
691
  | :------ | :------ | :------ |
632
692
  | <a id="key"></a> `key` | `readonly` | `string` |
693
+ | <a id="priority"></a> `priority` | `readonly` | `string` \| `number` |
633
694
  | <a id="ref-1"></a> `ref` | `readonly` | [`RtdbRefHandle`](#rtdbrefhandle) |
634
695
  | <a id="size-1"></a> `size` | `readonly` | `number` |
635
696
 
@@ -755,25 +816,6 @@ val(): unknown;
755
816
 
756
817
  ### RtdbRefHandle
757
818
 
758
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
759
-
760
- This barrel exports ONLY the leaf client + the wire-protocol types — the
761
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
762
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
763
- does NOT re-export `host.ts`/`entry.ts`:
764
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
765
- the backend) — node/engine-heavy, never wanted in a page bundle.
766
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
767
-
768
- `client.ts` imports only the value codec
769
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
770
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
771
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
772
-
773
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
774
- `import { getFirestore, subscribeEvents, setLens } from
775
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
776
-
777
819
  #### Properties
778
820
 
779
821
  | Property | Modifier | Type |
@@ -786,25 +828,55 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
786
828
 
787
829
  #### Methods
788
830
 
789
- <a id="tostring"></a>
831
+ <a id="isequal"></a>
790
832
 
791
- ##### toString()
833
+ ##### isEqual()
792
834
 
793
835
  ```ts
794
- toString(): string;
836
+ isEqual(other: RtdbRefHandle): boolean;
795
837
  ```
796
838
 
797
- ###### Returns
839
+ ###### Parameters
798
840
 
799
- `string`
841
+ | Parameter | Type |
842
+ | :------ | :------ |
843
+ | `other` | [`RtdbRefHandle`](#rtdbrefhandle) |
800
844
 
801
- ***
845
+ ###### Returns
802
846
 
803
- <a id="serializedidtokenresult"></a>
847
+ `boolean`
804
848
 
805
- ### SerializedIdTokenResult
849
+ <a id="tojson-2"></a>
806
850
 
807
- Wire form of `getIdTokenResult()`.
851
+ ##### toJSON()
852
+
853
+ ```ts
854
+ toJSON(): string;
855
+ ```
856
+
857
+ ###### Returns
858
+
859
+ `string`
860
+
861
+ <a id="tostring"></a>
862
+
863
+ ##### toString()
864
+
865
+ ```ts
866
+ toString(): string;
867
+ ```
868
+
869
+ ###### Returns
870
+
871
+ `string`
872
+
873
+ ***
874
+
875
+ <a id="serializedidtokenresult"></a>
876
+
877
+ ### SerializedIdTokenResult
878
+
879
+ Wire form of `getIdTokenResult()`.
808
880
 
809
881
  #### Properties
810
882
 
@@ -861,6 +933,38 @@ Wire form of a `UserCredential` returned by the sign-in/create ops.
861
933
  | <a id="providerid-4"></a> `providerId` | `readonly` | `string` |
862
934
  | <a id="user-1"></a> `user` | `readonly` | [`SerializedUser`](#serializeduser) |
863
935
 
936
+ ***
937
+
938
+ <a id="workerreplacement"></a>
939
+
940
+ ### WorkerReplacement
941
+
942
+ #### Methods
943
+
944
+ <a id="dispose"></a>
945
+
946
+ ##### dispose()
947
+
948
+ ```ts
949
+ dispose(): void;
950
+ ```
951
+
952
+ ###### Returns
953
+
954
+ `void`
955
+
956
+ <a id="request"></a>
957
+
958
+ ##### request()
959
+
960
+ ```ts
961
+ request(): Promise<void>;
962
+ ```
963
+
964
+ ###### Returns
965
+
966
+ `Promise`\<`void`\>
967
+
864
968
  ## Type Aliases
865
969
 
866
970
  <a id="anyhandle"></a>
@@ -945,25 +1049,6 @@ const browserLocalPersistence: {
945
1049
  };
946
1050
  ```
947
1051
 
948
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
949
-
950
- This barrel exports ONLY the leaf client + the wire-protocol types — the
951
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
952
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
953
- does NOT re-export `host.ts`/`entry.ts`:
954
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
955
- the backend) — node/engine-heavy, never wanted in a page bundle.
956
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
957
-
958
- `client.ts` imports only the value codec
959
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
960
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
961
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
962
-
963
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
964
- `import { getFirestore, subscribeEvents, setLens } from
965
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
966
-
967
1052
  #### Type Declaration
968
1053
 
969
1054
  <a id="type"></a>
@@ -986,25 +1071,6 @@ const browserSessionPersistence: {
986
1071
  };
987
1072
  ```
988
1073
 
989
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
990
-
991
- This barrel exports ONLY the leaf client + the wire-protocol types — the
992
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
993
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
994
- does NOT re-export `host.ts`/`entry.ts`:
995
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
996
- the backend) — node/engine-heavy, never wanted in a page bundle.
997
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
998
-
999
- `client.ts` imports only the value codec
1000
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1001
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1002
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1003
-
1004
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1005
- `import { getFirestore, subscribeEvents, setLens } from
1006
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1007
-
1008
1074
  #### Type Declaration
1009
1075
 
1010
1076
  <a id="type-1"></a>
@@ -1064,6 +1130,57 @@ const PRESENCE_STALE_MS: 90000 = 90000;
1064
1130
  Lease TTL. Sized to tolerate one delayed background-tab heartbeat under
1065
1131
  typical timer throttling (~1/min) without falsely evicting a live page.
1066
1132
 
1133
+ ***
1134
+
1135
+ <a id="pyric_worker_generation_key"></a>
1136
+
1137
+ ### PYRIC\_WORKER\_GENERATION\_KEY
1138
+
1139
+ ```ts
1140
+ const PYRIC_WORKER_GENERATION_KEY: "pyric:worker-generation" = "pyric:worker-generation";
1141
+ ```
1142
+
1143
+ ***
1144
+
1145
+ <a id="pyric_worker_name"></a>
1146
+
1147
+ ### PYRIC\_WORKER\_NAME
1148
+
1149
+ ```ts
1150
+ const PYRIC_WORKER_NAME: "pyric-shared-worker" = "pyric-shared-worker";
1151
+ ```
1152
+
1153
+ Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1154
+
1155
+ This barrel exports ONLY the leaf client + the wire-protocol types — the
1156
+ pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1157
+ connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1158
+ does NOT re-export `host.ts`/`entry.ts`:
1159
+ - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1160
+ the backend) — node/engine-heavy, never wanted in a page bundle.
1161
+ - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1162
+
1163
+ `client.ts` imports only the value codec
1164
+ (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1165
+ and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1166
+ the ~10 MB rules/sandbox engine — safe to import from any browser app.
1167
+
1168
+ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1169
+ `import { getFirestore, subscribeEvents, setLens } from
1170
+ '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1171
+
1172
+ ***
1173
+
1174
+ <a id="pyric_worker_url"></a>
1175
+
1176
+ ### PYRIC\_WORKER\_URL
1177
+
1178
+ ```ts
1179
+ const PYRIC_WORKER_URL: "/__pyric/sdk/worker.js" = "/__pyric/sdk/worker.js";
1180
+ ```
1181
+
1182
+ Stable routes and identity used by the served runtime and its UI.
1183
+
1067
1184
  ## Functions
1068
1185
 
1069
1186
  <a id="acceptprovidercredential"></a>
@@ -1103,25 +1220,6 @@ read right after the await reflects the new user.
1103
1220
  function addDoc(coll: CollRefHandle, data: Record<string, unknown>): Promise<DocRefHandle>;
1104
1221
  ```
1105
1222
 
1106
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1107
-
1108
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1109
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1110
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1111
- does NOT re-export `host.ts`/`entry.ts`:
1112
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1113
- the backend) — node/engine-heavy, never wanted in a page bundle.
1114
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1115
-
1116
- `client.ts` imports only the value codec
1117
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1118
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1119
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1120
-
1121
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1122
- `import { getFirestore, subscribeEvents, setLens } from
1123
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1124
-
1125
1223
  #### Parameters
1126
1224
 
1127
1225
  | Parameter | Type |
@@ -1143,25 +1241,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1143
1241
  function adminClearUsers(auth: ClientAuth): Promise<void>;
1144
1242
  ```
1145
1243
 
1146
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1147
-
1148
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1149
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1150
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1151
- does NOT re-export `host.ts`/`entry.ts`:
1152
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1153
- the backend) — node/engine-heavy, never wanted in a page bundle.
1154
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1155
-
1156
- `client.ts` imports only the value codec
1157
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1158
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1159
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1160
-
1161
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1162
- `import { getFirestore, subscribeEvents, setLens } from
1163
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1164
-
1165
1244
  #### Parameters
1166
1245
 
1167
1246
  | Parameter | Type |
@@ -1182,25 +1261,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1182
1261
  function adminCreateUser(auth: ClientAuth, request: CreateUserRequest): Promise<AuthUserRecord>;
1183
1262
  ```
1184
1263
 
1185
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1186
-
1187
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1188
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1189
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1190
- does NOT re-export `host.ts`/`entry.ts`:
1191
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1192
- the backend) — node/engine-heavy, never wanted in a page bundle.
1193
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1194
-
1195
- `client.ts` imports only the value codec
1196
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1197
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1198
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1199
-
1200
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1201
- `import { getFirestore, subscribeEvents, setLens } from
1202
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1203
-
1204
1264
  #### Parameters
1205
1265
 
1206
1266
  | Parameter | Type |
@@ -1222,25 +1282,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1222
1282
  function adminDeleteDocument(db: ClientDb, path: string): Promise<boolean>;
1223
1283
  ```
1224
1284
 
1225
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1226
-
1227
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1228
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1229
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1230
- does NOT re-export `host.ts`/`entry.ts`:
1231
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1232
- the backend) — node/engine-heavy, never wanted in a page bundle.
1233
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1234
-
1235
- `client.ts` imports only the value codec
1236
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1237
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1238
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1239
-
1240
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1241
- `import { getFirestore, subscribeEvents, setLens } from
1242
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1243
-
1244
1285
  #### Parameters
1245
1286
 
1246
1287
  | Parameter | Type |
@@ -1262,25 +1303,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1262
1303
  function adminDeleteRtdbValue(db: ClientDb | ClientRtdb, path: string): Promise<void>;
1263
1304
  ```
1264
1305
 
1265
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1266
-
1267
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1268
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1269
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1270
- does NOT re-export `host.ts`/`entry.ts`:
1271
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1272
- the backend) — node/engine-heavy, never wanted in a page bundle.
1273
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1274
-
1275
- `client.ts` imports only the value codec
1276
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1277
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1278
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1279
-
1280
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1281
- `import { getFirestore, subscribeEvents, setLens } from
1282
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1283
-
1284
1306
  #### Parameters
1285
1307
 
1286
1308
  | Parameter | Type |
@@ -1302,25 +1324,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1302
1324
  function adminDeleteUser(auth: ClientAuth, uid: string): Promise<void>;
1303
1325
  ```
1304
1326
 
1305
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1306
-
1307
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1308
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1309
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1310
- does NOT re-export `host.ts`/`entry.ts`:
1311
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1312
- the backend) — node/engine-heavy, never wanted in a page bundle.
1313
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1314
-
1315
- `client.ts` imports only the value codec
1316
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1317
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1318
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1319
-
1320
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1321
- `import { getFirestore, subscribeEvents, setLens } from
1322
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1323
-
1324
1327
  #### Parameters
1325
1328
 
1326
1329
  | Parameter | Type |
@@ -1342,26 +1345,7 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1342
1345
  function adminGetDocument(db: ClientDb, path: string): Promise<Record<string, unknown>>;
1343
1346
  ```
1344
1347
 
1345
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1346
-
1347
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1348
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1349
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1350
- does NOT re-export `host.ts`/`entry.ts`:
1351
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1352
- the backend) — node/engine-heavy, never wanted in a page bundle.
1353
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1354
-
1355
- `client.ts` imports only the value codec
1356
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1357
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1358
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1359
-
1360
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1361
- `import { getFirestore, subscribeEvents, setLens } from
1362
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1363
-
1364
- #### Parameters
1348
+ #### Parameters
1365
1349
 
1366
1350
  | Parameter | Type |
1367
1351
  | :------ | :------ |
@@ -1386,25 +1370,6 @@ function adminListDocuments(db: ClientDb, path: string): Promise<{
1386
1370
  }[]>;
1387
1371
  ```
1388
1372
 
1389
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1390
-
1391
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1392
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1393
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1394
- does NOT re-export `host.ts`/`entry.ts`:
1395
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1396
- the backend) — node/engine-heavy, never wanted in a page bundle.
1397
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1398
-
1399
- `client.ts` imports only the value codec
1400
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1401
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1402
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1403
-
1404
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1405
- `import { getFirestore, subscribeEvents, setLens } from
1406
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1407
-
1408
1373
  #### Parameters
1409
1374
 
1410
1375
  | Parameter | Type |
@@ -1430,25 +1395,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1430
1395
  function adminReadRtdbState(db: ClientDb | ClientRtdb): Promise<unknown>;
1431
1396
  ```
1432
1397
 
1433
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1434
-
1435
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1436
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1437
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1438
- does NOT re-export `host.ts`/`entry.ts`:
1439
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1440
- the backend) — node/engine-heavy, never wanted in a page bundle.
1441
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1442
-
1443
- `client.ts` imports only the value codec
1444
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1445
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1446
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1447
-
1448
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1449
- `import { getFirestore, subscribeEvents, setLens } from
1450
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1451
-
1452
1398
  #### Parameters
1453
1399
 
1454
1400
  | Parameter | Type |
@@ -1472,25 +1418,6 @@ function adminReadState(db: ClientDb, opts?: {
1472
1418
  }): Promise<Record<string, unknown>>;
1473
1419
  ```
1474
1420
 
1475
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1476
-
1477
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1478
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1479
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1480
- does NOT re-export `host.ts`/`entry.ts`:
1481
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1482
- the backend) — node/engine-heavy, never wanted in a page bundle.
1483
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1484
-
1485
- `client.ts` imports only the value codec
1486
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1487
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1488
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1489
-
1490
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1491
- `import { getFirestore, subscribeEvents, setLens } from
1492
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1493
-
1494
1421
  #### Parameters
1495
1422
 
1496
1423
  | Parameter | Type |
@@ -1517,25 +1444,6 @@ function adminSetDocument(
1517
1444
  data: unknown): Promise<void>;
1518
1445
  ```
1519
1446
 
1520
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1521
-
1522
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1523
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1524
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1525
- does NOT re-export `host.ts`/`entry.ts`:
1526
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1527
- the backend) — node/engine-heavy, never wanted in a page bundle.
1528
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1529
-
1530
- `client.ts` imports only the value codec
1531
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1532
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1533
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1534
-
1535
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1536
- `import { getFirestore, subscribeEvents, setLens } from
1537
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1538
-
1539
1447
  #### Parameters
1540
1448
 
1541
1449
  | Parameter | Type |
@@ -1561,25 +1469,6 @@ function adminSetRtdbValue(
1561
1469
  value: unknown): Promise<void>;
1562
1470
  ```
1563
1471
 
1564
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1565
-
1566
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1567
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1568
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1569
- does NOT re-export `host.ts`/`entry.ts`:
1570
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1571
- the backend) — node/engine-heavy, never wanted in a page bundle.
1572
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1573
-
1574
- `client.ts` imports only the value codec
1575
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1576
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1577
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1578
-
1579
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1580
- `import { getFirestore, subscribeEvents, setLens } from
1581
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1582
-
1583
1472
  #### Parameters
1584
1473
 
1585
1474
  | Parameter | Type |
@@ -1606,14 +1495,7 @@ function adminSubscribeRtdbValue(
1606
1495
  error?: (err: unknown) => void): Unsubscribe;
1607
1496
  ```
1608
1497
 
1609
- Subscribe to the raw value at an RTDB path with the ADMIN lens (Pyric Studio
1610
- data viewer). Rides the same `{service:'rtdb'}` value-subscription channel as
1611
- `rtdbOnValue`, but pins `actAs: {mode:'admin'}` per-sub instead of following
1612
- the module default lens, so Studio's viewer stays admin (PRINCIPLES M3) while
1613
- the page's own listeners keep their session semantics.
1614
-
1615
- `next` receives the plain JSON value at `path` (`null` when absent) on
1616
- subscribe and again after every write that changes the subtree.
1498
+ Subscribe with an explicit admin lens so Studio stays rules-independent.
1617
1499
 
1618
1500
  #### Parameters
1619
1501
 
@@ -1641,25 +1523,6 @@ function adminUpdateRtdbValue(
1641
1523
  values: Record<string, unknown>): Promise<void>;
1642
1524
  ```
1643
1525
 
1644
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1645
-
1646
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1647
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1648
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1649
- does NOT re-export `host.ts`/`entry.ts`:
1650
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1651
- the backend) — node/engine-heavy, never wanted in a page bundle.
1652
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1653
-
1654
- `client.ts` imports only the value codec
1655
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1656
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1657
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1658
-
1659
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1660
- `import { getFirestore, subscribeEvents, setLens } from
1661
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1662
-
1663
1526
  #### Parameters
1664
1527
 
1665
1528
  | Parameter | Type |
@@ -1685,25 +1548,6 @@ function adminUpdateUser(
1685
1548
  request: UpdateUserRequest): Promise<AuthUserRecord>;
1686
1549
  ```
1687
1550
 
1688
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1689
-
1690
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1691
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1692
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1693
- does NOT re-export `host.ts`/`entry.ts`:
1694
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1695
- the backend) — node/engine-heavy, never wanted in a page bundle.
1696
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1697
-
1698
- `client.ts` imports only the value codec
1699
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1700
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1701
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1702
-
1703
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1704
- `import { getFirestore, subscribeEvents, setLens } from
1705
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1706
-
1707
1551
  #### Parameters
1708
1552
 
1709
1553
  | Parameter | Type |
@@ -1748,25 +1592,6 @@ AND composite filter — every operand must match. See [or](#or).
1748
1592
  function arrayRemove(...values: unknown[]): SentinelMarker;
1749
1593
  ```
1750
1594
 
1751
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1752
-
1753
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1754
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1755
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1756
- does NOT re-export `host.ts`/`entry.ts`:
1757
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1758
- the backend) — node/engine-heavy, never wanted in a page bundle.
1759
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1760
-
1761
- `client.ts` imports only the value codec
1762
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1763
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1764
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1765
-
1766
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1767
- `import { getFirestore, subscribeEvents, setLens } from
1768
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1769
-
1770
1595
  #### Parameters
1771
1596
 
1772
1597
  | Parameter | Type |
@@ -1787,25 +1612,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1787
1612
  function arrayUnion(...values: unknown[]): SentinelMarker;
1788
1613
  ```
1789
1614
 
1790
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1791
-
1792
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1793
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1794
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1795
- does NOT re-export `host.ts`/`entry.ts`:
1796
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1797
- the backend) — node/engine-heavy, never wanted in a page bundle.
1798
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1799
-
1800
- `client.ts` imports only the value codec
1801
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1802
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
1803
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1804
-
1805
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
1806
- `import { getFirestore, subscribeEvents, setLens } from
1807
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1808
-
1809
1615
  #### Parameters
1810
1616
 
1811
1617
  | Parameter | Type |
@@ -1984,25 +1790,6 @@ function createUserWithEmailAndPassword(
1984
1790
  password: string): Promise<ClientUserCredential>;
1985
1791
  ```
1986
1792
 
1987
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1988
-
1989
- This barrel exports ONLY the leaf client + the wire-protocol types — the
1990
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
1991
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
1992
- does NOT re-export `host.ts`/`entry.ts`:
1993
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
1994
- the backend) — node/engine-heavy, never wanted in a page bundle.
1995
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1996
-
1997
- `client.ts` imports only the value codec
1998
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
1999
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
2000
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
2001
-
2002
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2003
- `import { getFirestore, subscribeEvents, setLens } from
2004
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
2005
-
2006
1793
  #### Parameters
2007
1794
 
2008
1795
  | Parameter | Type |
@@ -2017,32 +1804,35 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2017
1804
 
2018
1805
  ***
2019
1806
 
2020
- <a id="deletedoc"></a>
1807
+ <a id="createworkerreplacement"></a>
2021
1808
 
2022
- ### deleteDoc()
1809
+ ### createWorkerReplacement()
2023
1810
 
2024
1811
  ```ts
2025
- function deleteDoc(ref: DocRefHandle): Promise<void>;
1812
+ function createWorkerReplacement(options: WorkerReplacementOptions): WorkerReplacement;
2026
1813
  ```
2027
1814
 
2028
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
1815
+ Coordinate one reload per page after the old SharedWorker announces retirement.
2029
1816
 
2030
- This barrel exports ONLY the leaf client + the wire-protocol types — the
2031
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
2032
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
2033
- does NOT re-export `host.ts`/`entry.ts`:
2034
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
2035
- the backend) — node/engine-heavy, never wanted in a page bundle.
2036
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
1817
+ #### Parameters
2037
1818
 
2038
- `client.ts` imports only the value codec
2039
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
2040
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
2041
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
1819
+ | Parameter | Type |
1820
+ | :------ | :------ |
1821
+ | `options` | `WorkerReplacementOptions` |
2042
1822
 
2043
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2044
- `import { getFirestore, subscribeEvents, setLens } from
2045
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
1823
+ #### Returns
1824
+
1825
+ [`WorkerReplacement`](#workerreplacement)
1826
+
1827
+ ***
1828
+
1829
+ <a id="deletedoc"></a>
1830
+
1831
+ ### deleteDoc()
1832
+
1833
+ ```ts
1834
+ function deleteDoc(ref: DocRefHandle): Promise<void>;
1835
+ ```
2046
1836
 
2047
1837
  #### Parameters
2048
1838
 
@@ -2064,25 +1854,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2064
1854
  function deleteField(): SentinelMarker;
2065
1855
  ```
2066
1856
 
2067
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
2068
-
2069
- This barrel exports ONLY the leaf client + the wire-protocol types — the
2070
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
2071
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
2072
- does NOT re-export `host.ts`/`entry.ts`:
2073
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
2074
- the backend) — node/engine-heavy, never wanted in a page bundle.
2075
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
2076
-
2077
- `client.ts` imports only the value codec
2078
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
2079
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
2080
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
2081
-
2082
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2083
- `import { getFirestore, subscribeEvents, setLens } from
2084
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
2085
-
2086
1857
  #### Returns
2087
1858
 
2088
1859
  `SentinelMarker`
@@ -2135,15 +1906,36 @@ Phase 3: delete a named branch.
2135
1906
 
2136
1907
  ***
2137
1908
 
2138
- <a id="doc"></a>
1909
+ <a id="disconnectclient"></a>
2139
1910
 
2140
- ### doc()
1911
+ ### disconnectClient()
2141
1912
 
2142
1913
  ```ts
2143
- function doc(parent: ClientDb | CollRefHandle, ...pathSegments: string[]): DocRefHandle;
1914
+ function disconnectClient(db: ClientDb, options?: DisconnectClientOptions): Promise<void>;
2144
1915
  ```
2145
1916
 
2146
- Build a document reference. Mirrors `pyric/firestore`'s `doc(db, path)`.
1917
+ #### Parameters
1918
+
1919
+ | Parameter | Type |
1920
+ | :------ | :------ |
1921
+ | `db` | [`ClientDb`](#clientdb) |
1922
+ | `options?` | [`DisconnectClientOptions`](#disconnectclientoptions) |
1923
+
1924
+ #### Returns
1925
+
1926
+ `Promise`\<`void`\>
1927
+
1928
+ ***
1929
+
1930
+ <a id="doc"></a>
1931
+
1932
+ ### doc()
1933
+
1934
+ ```ts
1935
+ function doc(parent: ClientDb | CollRefHandle, ...pathSegments: string[]): DocRefHandle;
1936
+ ```
1937
+
1938
+ Build a document reference. Mirrors `pyric/firestore`'s `doc(db, path)`.
2147
1939
 
2148
1940
  WHY CLIENT-SIDE: Firebase's `doc()` is synchronous and path-only — it
2149
1941
  needs no data from the sandbox. We build a descriptor object here and
@@ -2170,25 +1962,6 @@ include the port so execution calls can route to the worker.
2170
1962
  function endAt(...values: unknown[]): QueryConstraintHandle;
2171
1963
  ```
2172
1964
 
2173
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
2174
-
2175
- This barrel exports ONLY the leaf client + the wire-protocol types — the
2176
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
2177
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
2178
- does NOT re-export `host.ts`/`entry.ts`:
2179
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
2180
- the backend) — node/engine-heavy, never wanted in a page bundle.
2181
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
2182
-
2183
- `client.ts` imports only the value codec
2184
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
2185
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
2186
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
2187
-
2188
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2189
- `import { getFirestore, subscribeEvents, setLens } from
2190
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
2191
-
2192
1965
  #### Parameters
2193
1966
 
2194
1967
  | Parameter | Type |
@@ -2209,25 +1982,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2209
1982
  function endBefore(...values: unknown[]): QueryConstraintHandle;
2210
1983
  ```
2211
1984
 
2212
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
2213
-
2214
- This barrel exports ONLY the leaf client + the wire-protocol types — the
2215
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
2216
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
2217
- does NOT re-export `host.ts`/`entry.ts`:
2218
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
2219
- the backend) — node/engine-heavy, never wanted in a page bundle.
2220
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
2221
-
2222
- `client.ts` imports only the value codec
2223
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
2224
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
2225
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
2226
-
2227
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2228
- `import { getFirestore, subscribeEvents, setLens } from
2229
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
2230
-
2231
1985
  #### Parameters
2232
1986
 
2233
1987
  | Parameter | Type |
@@ -2297,25 +2051,6 @@ it to a file and [importWorkerState](#importworkerstate) it into another instanc
2297
2051
  function getActiveRules(db: ClientDb | ClientRtdb, service?: "firestore" | "database"): Promise<unknown>;
2298
2052
  ```
2299
2053
 
2300
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
2301
-
2302
- This barrel exports ONLY the leaf client + the wire-protocol types — the
2303
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
2304
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
2305
- does NOT re-export `host.ts`/`entry.ts`:
2306
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
2307
- the backend) — node/engine-heavy, never wanted in a page bundle.
2308
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
2309
-
2310
- `client.ts` imports only the value codec
2311
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
2312
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
2313
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
2314
-
2315
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2316
- `import { getFirestore, subscribeEvents, setLens } from
2317
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
2318
-
2319
2054
  #### Parameters
2320
2055
 
2321
2056
  | Parameter | Type |
@@ -2455,25 +2190,6 @@ function getCountFromServer(source: CollRefHandle | QueryHandle): Promise<{
2455
2190
  }>;
2456
2191
  ```
2457
2192
 
2458
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
2459
-
2460
- This barrel exports ONLY the leaf client + the wire-protocol types — the
2461
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
2462
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
2463
- does NOT re-export `host.ts`/`entry.ts`:
2464
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
2465
- the backend) — node/engine-heavy, never wanted in a page bundle.
2466
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
2467
-
2468
- `client.ts` imports only the value codec
2469
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
2470
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
2471
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
2472
-
2473
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2474
- `import { getFirestore, subscribeEvents, setLens } from
2475
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
2476
-
2477
2193
  #### Parameters
2478
2194
 
2479
2195
  | Parameter | Type |
@@ -2498,25 +2214,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2498
2214
  function getDoc(ref: DocRefHandle): Promise<ClientDocSnapshot>;
2499
2215
  ```
2500
2216
 
2501
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
2502
-
2503
- This barrel exports ONLY the leaf client + the wire-protocol types — the
2504
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
2505
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
2506
- does NOT re-export `host.ts`/`entry.ts`:
2507
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
2508
- the backend) — node/engine-heavy, never wanted in a page bundle.
2509
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
2510
-
2511
- `client.ts` imports only the value codec
2512
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
2513
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
2514
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
2515
-
2516
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2517
- `import { getFirestore, subscribeEvents, setLens } from
2518
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
2519
-
2520
2217
  #### Parameters
2521
2218
 
2522
2219
  | Parameter | Type |
@@ -2537,25 +2234,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2537
2234
  function getDocs(source: CollRefHandle | QueryHandle): Promise<ClientQuerySnapshot>;
2538
2235
  ```
2539
2236
 
2540
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
2541
-
2542
- This barrel exports ONLY the leaf client + the wire-protocol types — the
2543
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
2544
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
2545
- does NOT re-export `host.ts`/`entry.ts`:
2546
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
2547
- the backend) — node/engine-heavy, never wanted in a page bundle.
2548
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
2549
-
2550
- `client.ts` imports only the value codec
2551
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
2552
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
2553
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
2554
-
2555
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2556
- `import { getFirestore, subscribeEvents, setLens } from
2557
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
2558
-
2559
2237
  #### Parameters
2560
2238
 
2561
2239
  | Parameter | Type |
@@ -2601,25 +2279,6 @@ function getFirestore(
2601
2279
  options?: SharedWorkerConnectionOptions): ClientDb;
2602
2280
  ```
2603
2281
 
2604
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
2605
-
2606
- This barrel exports ONLY the leaf client + the wire-protocol types — the
2607
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
2608
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
2609
- does NOT re-export `host.ts`/`entry.ts`:
2610
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
2611
- the backend) — node/engine-heavy, never wanted in a page bundle.
2612
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
2613
-
2614
- `client.ts` imports only the value codec
2615
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
2616
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
2617
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
2618
-
2619
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2620
- `import { getFirestore, subscribeEvents, setLens } from
2621
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
2622
-
2623
2282
  #### Parameters
2624
2283
 
2625
2284
  | Parameter | Type |
@@ -2729,25 +2388,6 @@ function getProviderConfig(auth: ClientAuth): Promise<{
2729
2388
  }[]>;
2730
2389
  ```
2731
2390
 
2732
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
2733
-
2734
- This barrel exports ONLY the leaf client + the wire-protocol types — the
2735
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
2736
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
2737
- does NOT re-export `host.ts`/`entry.ts`:
2738
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
2739
- the backend) — node/engine-heavy, never wanted in a page bundle.
2740
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
2741
-
2742
- `client.ts` imports only the value codec
2743
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
2744
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
2745
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
2746
-
2747
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2748
- `import { getFirestore, subscribeEvents, setLens } from
2749
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
2750
-
2751
2391
  #### Parameters
2752
2392
 
2753
2393
  | Parameter | Type |
@@ -2771,25 +2411,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2771
2411
  function getRulesStatus(db: ClientDb | ClientRtdb, service?: "firestore" | "database"): Promise<unknown>;
2772
2412
  ```
2773
2413
 
2774
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
2775
-
2776
- This barrel exports ONLY the leaf client + the wire-protocol types — the
2777
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
2778
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
2779
- does NOT re-export `host.ts`/`entry.ts`:
2780
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
2781
- the backend) — node/engine-heavy, never wanted in a page bundle.
2782
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
2783
-
2784
- `client.ts` imports only the value codec
2785
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
2786
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
2787
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
2788
-
2789
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2790
- `import { getFirestore, subscribeEvents, setLens } from
2791
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
2792
-
2793
2414
  #### Parameters
2794
2415
 
2795
2416
  | Parameter | Type |
@@ -2936,25 +2557,6 @@ Phase 2 (clobber): replace this sandbox's ENTIRE state with `bundle`.
2936
2557
  function increment(n: number): SentinelMarker;
2937
2558
  ```
2938
2559
 
2939
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
2940
-
2941
- This barrel exports ONLY the leaf client + the wire-protocol types — the
2942
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
2943
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
2944
- does NOT re-export `host.ts`/`entry.ts`:
2945
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
2946
- the backend) — node/engine-heavy, never wanted in a page bundle.
2947
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
2948
-
2949
- `client.ts` imports only the value codec
2950
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
2951
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
2952
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
2953
-
2954
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2955
- `import { getFirestore, subscribeEvents, setLens } from
2956
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
2957
-
2958
2560
  #### Parameters
2959
2561
 
2960
2562
  | Parameter | Type |
@@ -2975,25 +2577,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2975
2577
  function limit(n: number): QueryConstraintHandle;
2976
2578
  ```
2977
2579
 
2978
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
2979
-
2980
- This barrel exports ONLY the leaf client + the wire-protocol types — the
2981
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
2982
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
2983
- does NOT re-export `host.ts`/`entry.ts`:
2984
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
2985
- the backend) — node/engine-heavy, never wanted in a page bundle.
2986
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
2987
-
2988
- `client.ts` imports only the value codec
2989
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
2990
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
2991
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
2992
-
2993
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
2994
- `import { getFirestore, subscribeEvents, setLens } from
2995
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
2996
-
2997
2580
  #### Parameters
2998
2581
 
2999
2582
  | Parameter | Type |
@@ -3014,25 +2597,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3014
2597
  function limitToLast(n: number): QueryConstraintHandle;
3015
2598
  ```
3016
2599
 
3017
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
3018
-
3019
- This barrel exports ONLY the leaf client + the wire-protocol types — the
3020
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
3021
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
3022
- does NOT re-export `host.ts`/`entry.ts`:
3023
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
3024
- the backend) — node/engine-heavy, never wanted in a page bundle.
3025
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
3026
-
3027
- `client.ts` imports only the value codec
3028
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
3029
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
3030
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
3031
-
3032
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3033
- `import { getFirestore, subscribeEvents, setLens } from
3034
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
3035
-
3036
2600
  #### Parameters
3037
2601
 
3038
2602
  | Parameter | Type |
@@ -3130,26 +2694,7 @@ Enumerate subcollection ids under a document path (Pyric Studio data browse).
3130
2694
  function listUsers(auth: ClientAuth): Promise<AuthUserRecord[]>;
3131
2695
  ```
3132
2696
 
3133
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
3134
-
3135
- This barrel exports ONLY the leaf client + the wire-protocol types — the
3136
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
3137
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
3138
- does NOT re-export `host.ts`/`entry.ts`:
3139
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
3140
- the backend) — node/engine-heavy, never wanted in a page bundle.
3141
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
3142
-
3143
- `client.ts` imports only the value codec
3144
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
3145
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
3146
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
3147
-
3148
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3149
- `import { getFirestore, subscribeEvents, setLens } from
3150
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
3151
-
3152
- #### Parameters
2697
+ #### Parameters
3153
2698
 
3154
2699
  | Parameter | Type |
3155
2700
  | :------ | :------ |
@@ -3286,6 +2831,34 @@ to deregister the listener on the worker side.
3286
2831
 
3287
2832
  ***
3288
2833
 
2834
+ <a id="onworkerruntimereload"></a>
2835
+
2836
+ ### onWorkerRuntimeReload()
2837
+
2838
+ ```ts
2839
+ function onWorkerRuntimeReload(listener: (epoch: string) => void): () => void;
2840
+ ```
2841
+
2842
+ Observe the worker's all-pages reload signal.
2843
+
2844
+ #### Parameters
2845
+
2846
+ | Parameter | Type |
2847
+ | :------ | :------ |
2848
+ | `listener` | (`epoch`: `string`) => `void` |
2849
+
2850
+ #### Returns
2851
+
2852
+ ```ts
2853
+ (): void;
2854
+ ```
2855
+
2856
+ ##### Returns
2857
+
2858
+ `void`
2859
+
2860
+ ***
2861
+
3289
2862
  <a id="or"></a>
3290
2863
 
3291
2864
  ### or()
@@ -3318,35 +2891,93 @@ filters (`where()`, or nested `or()`/`and()`). Mirrors `pyric/firestore`'s
3318
2891
  function orderBy(field: string, direction?: "asc" | "desc"): QueryConstraintHandle;
3319
2892
  ```
3320
2893
 
3321
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
2894
+ #### Parameters
3322
2895
 
3323
- This barrel exports ONLY the leaf client + the wire-protocol types — the
3324
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
3325
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
3326
- does NOT re-export `host.ts`/`entry.ts`:
3327
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
3328
- the backend) — node/engine-heavy, never wanted in a page bundle.
3329
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
2896
+ | Parameter | Type |
2897
+ | :------ | :------ |
2898
+ | `field` | `string` |
2899
+ | `direction?` | `"asc"` \| `"desc"` |
3330
2900
 
3331
- `client.ts` imports only the value codec
3332
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
3333
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
3334
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
2901
+ #### Returns
3335
2902
 
3336
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3337
- `import { getFirestore, subscribeEvents, setLens } from
3338
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
2903
+ `QueryConstraintHandle`
2904
+
2905
+ ***
2906
+
2907
+ <a id="ownclientuntilpagehide"></a>
2908
+
2909
+ ### ownClientUntilPagehide()
2910
+
2911
+ ```ts
2912
+ function ownClientUntilPagehide(
2913
+ client: ClientDb,
2914
+ events?: PagehideEvents,
2915
+ disconnectClientImpl?: Disconnect): {
2916
+ disconnect: Promise<void>;
2917
+ dispose: void;
2918
+ };
2919
+ ```
2920
+
2921
+ Own a worker port until its page permanently leaves.
3339
2922
 
3340
2923
  #### Parameters
3341
2924
 
3342
2925
  | Parameter | Type |
3343
2926
  | :------ | :------ |
3344
- | `field` | `string` |
3345
- | `direction?` | `"asc"` \| `"desc"` |
2927
+ | `client` | [`ClientDb`](#clientdb) |
2928
+ | `events?` | `PagehideEvents` |
2929
+ | `disconnectClientImpl?` | `Disconnect` |
3346
2930
 
3347
2931
  #### Returns
3348
2932
 
3349
- `QueryConstraintHandle`
2933
+ ```ts
2934
+ {
2935
+ disconnect: Promise<void>;
2936
+ dispose: void;
2937
+ }
2938
+ ```
2939
+
2940
+ ##### disconnect()
2941
+
2942
+ ```ts
2943
+ disconnect(): Promise<void>;
2944
+ ```
2945
+
2946
+ ###### Returns
2947
+
2948
+ `Promise`\<`void`\>
2949
+
2950
+ ##### dispose()
2951
+
2952
+ ```ts
2953
+ dispose(): void;
2954
+ ```
2955
+
2956
+ ###### Returns
2957
+
2958
+ `void`
2959
+
2960
+ ***
2961
+
2962
+ <a id="preflightworkerepochstorage"></a>
2963
+
2964
+ ### preflightWorkerEpochStorage()
2965
+
2966
+ ```ts
2967
+ function preflightWorkerEpochStorage(storage: EpochStorage): void;
2968
+ ```
2969
+
2970
+ Prove origin storage works without publishing a successor generation.
2971
+
2972
+ #### Parameters
2973
+
2974
+ | Parameter | Type |
2975
+ | :------ | :------ |
2976
+ | `storage` | `EpochStorage` |
2977
+
2978
+ #### Returns
2979
+
2980
+ `void`
3350
2981
 
3351
2982
  ***
3352
2983
 
@@ -3374,6 +3005,28 @@ Mirrors `pyric/firestore`'s `query(source, ...constraints)`.
3374
3005
 
3375
3006
  ***
3376
3007
 
3008
+ <a id="readpyricruntimemanifest"></a>
3009
+
3010
+ ### readPyricRuntimeManifest()
3011
+
3012
+ ```ts
3013
+ function readPyricRuntimeManifest(documentLike?: RuntimeDocument): PyricRuntimeManifest;
3014
+ ```
3015
+
3016
+ Read the server-stamped worker epoch before application code starts.
3017
+
3018
+ #### Parameters
3019
+
3020
+ | Parameter | Type |
3021
+ | :------ | :------ |
3022
+ | `documentLike?` | `RuntimeDocument` |
3023
+
3024
+ #### Returns
3025
+
3026
+ [`PyricRuntimeManifest`](#pyricruntimemanifest)
3027
+
3028
+ ***
3029
+
3377
3030
  <a id="ref-2"></a>
3378
3031
 
3379
3032
  ### ref()
@@ -3467,6 +3120,29 @@ history batches aren't coalescible, so it needs bounded backpressure first
3467
3120
 
3468
3121
  ***
3469
3122
 
3123
+ <a id="rememberworkerepoch"></a>
3124
+
3125
+ ### rememberWorkerEpoch()
3126
+
3127
+ ```ts
3128
+ function rememberWorkerEpoch(epoch: string, storage: EpochStorage): void;
3129
+ ```
3130
+
3131
+ Persist the generation boundary before a page reloads.
3132
+
3133
+ #### Parameters
3134
+
3135
+ | Parameter | Type |
3136
+ | :------ | :------ |
3137
+ | `epoch` | `string` |
3138
+ | `storage` | `EpochStorage` |
3139
+
3140
+ #### Returns
3141
+
3142
+ `void`
3143
+
3144
+ ***
3145
+
3470
3146
  <a id="resetall"></a>
3471
3147
 
3472
3148
  ### resetAll()
@@ -3497,32 +3173,43 @@ counterpart of calling `sandbox.resetAll()` on an in-process sandbox.
3497
3173
 
3498
3174
  ***
3499
3175
 
3500
- <a id="rtdbchild"></a>
3176
+ <a id="retireworkerruntime"></a>
3501
3177
 
3502
- ### rtdbChild()
3178
+ ### retireWorkerRuntime()
3503
3179
 
3504
3180
  ```ts
3505
- function rtdbChild(parent: RtdbRefHandle, path: string): RtdbRefHandle;
3181
+ function retireWorkerRuntime(
3182
+ db: ClientDb,
3183
+ targetEpoch: string,
3184
+ options?: {
3185
+ timeoutMs?: number;
3186
+ }): Promise<void>;
3506
3187
  ```
3507
3188
 
3508
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
3189
+ Ask the current SharedWorker to drain accepted work and retire.
3509
3190
 
3510
- This barrel exports ONLY the leaf client + the wire-protocol types — the
3511
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
3512
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
3513
- does NOT re-export `host.ts`/`entry.ts`:
3514
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
3515
- the backend) — node/engine-heavy, never wanted in a page bundle.
3516
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
3191
+ #### Parameters
3517
3192
 
3518
- `client.ts` imports only the value codec
3519
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
3520
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
3521
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
3193
+ | Parameter | Type |
3194
+ | :------ | :------ |
3195
+ | `db` | [`ClientDb`](#clientdb) |
3196
+ | `targetEpoch` | `string` |
3197
+ | `options?` | \{ `timeoutMs?`: `number`; \} |
3198
+ | `options.timeoutMs?` | `number` |
3522
3199
 
3523
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3524
- `import { getFirestore, subscribeEvents, setLens } from
3525
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
3200
+ #### Returns
3201
+
3202
+ `Promise`\<`void`\>
3203
+
3204
+ ***
3205
+
3206
+ <a id="rtdbchild"></a>
3207
+
3208
+ ### rtdbChild()
3209
+
3210
+ ```ts
3211
+ function rtdbChild(parent: RtdbRefHandle, path: string): RtdbRefHandle;
3212
+ ```
3526
3213
 
3527
3214
  #### Parameters
3528
3215
 
@@ -3545,25 +3232,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3545
3232
  function rtdbConnectDatabaseEmulator(): void;
3546
3233
  ```
3547
3234
 
3548
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
3549
-
3550
- This barrel exports ONLY the leaf client + the wire-protocol types — the
3551
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
3552
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
3553
- does NOT re-export `host.ts`/`entry.ts`:
3554
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
3555
- the backend) — node/engine-heavy, never wanted in a page bundle.
3556
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
3557
-
3558
- `client.ts` imports only the value codec
3559
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
3560
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
3561
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
3562
-
3563
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3564
- `import { getFirestore, subscribeEvents, setLens } from
3565
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
3566
-
3567
3235
  #### Returns
3568
3236
 
3569
3237
  `void`
@@ -3575,33 +3243,14 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3575
3243
  ### rtdbGet()
3576
3244
 
3577
3245
  ```ts
3578
- function rtdbGet(r: RtdbRefHandle): Promise<RtdbDataSnapshot>;
3246
+ function rtdbGet(target: RtdbTarget): Promise<RtdbDataSnapshot>;
3579
3247
  ```
3580
3248
 
3581
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
3582
-
3583
- This barrel exports ONLY the leaf client + the wire-protocol types — the
3584
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
3585
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
3586
- does NOT re-export `host.ts`/`entry.ts`:
3587
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
3588
- the backend) — node/engine-heavy, never wanted in a page bundle.
3589
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
3590
-
3591
- `client.ts` imports only the value codec
3592
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
3593
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
3594
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
3595
-
3596
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3597
- `import { getFirestore, subscribeEvents, setLens } from
3598
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
3599
-
3600
3249
  #### Parameters
3601
3250
 
3602
3251
  | Parameter | Type |
3603
3252
  | :------ | :------ |
3604
- | `r` | [`RtdbRefHandle`](#rtdbrefhandle) |
3253
+ | `target` | `RtdbTarget` |
3605
3254
 
3606
3255
  #### Returns
3607
3256
 
@@ -3617,25 +3266,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3617
3266
  function rtdbGetDatabase(source?: string | ClientDb | URL, name?: string): ClientRtdb;
3618
3267
  ```
3619
3268
 
3620
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
3621
-
3622
- This barrel exports ONLY the leaf client + the wire-protocol types — the
3623
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
3624
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
3625
- does NOT re-export `host.ts`/`entry.ts`:
3626
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
3627
- the backend) — node/engine-heavy, never wanted in a page bundle.
3628
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
3629
-
3630
- `client.ts` imports only the value codec
3631
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
3632
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
3633
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
3634
-
3635
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3636
- `import { getFirestore, subscribeEvents, setLens } from
3637
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
3638
-
3639
3269
  #### Parameters
3640
3270
 
3641
3271
  | Parameter | Type |
@@ -3649,43 +3279,39 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3649
3279
 
3650
3280
  ***
3651
3281
 
3652
- <a id="rtdboff"></a>
3282
+ <a id="rtdbgooffline"></a>
3653
3283
 
3654
- ### rtdbOff()
3284
+ ### rtdbGoOffline()
3655
3285
 
3656
3286
  ```ts
3657
- function rtdbOff(
3658
- _r: RtdbRefHandle,
3659
- _eventType?: unknown,
3660
- _callback?: unknown): void;
3287
+ function rtdbGoOffline(db: ClientRtdb): void;
3661
3288
  ```
3662
3289
 
3663
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
3290
+ #### Parameters
3664
3291
 
3665
- This barrel exports ONLY the leaf client + the wire-protocol types — the
3666
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
3667
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
3668
- does NOT re-export `host.ts`/`entry.ts`:
3669
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
3670
- the backend) — node/engine-heavy, never wanted in a page bundle.
3671
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
3292
+ | Parameter | Type |
3293
+ | :------ | :------ |
3294
+ | `db` | [`ClientRtdb`](#clientrtdb) |
3672
3295
 
3673
- `client.ts` imports only the value codec
3674
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
3675
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
3676
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
3296
+ #### Returns
3677
3297
 
3678
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3679
- `import { getFirestore, subscribeEvents, setLens } from
3680
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
3298
+ `void`
3299
+
3300
+ ***
3301
+
3302
+ <a id="rtdbgoonline"></a>
3303
+
3304
+ ### rtdbGoOnline()
3305
+
3306
+ ```ts
3307
+ function rtdbGoOnline(db: ClientRtdb): void;
3308
+ ```
3681
3309
 
3682
3310
  #### Parameters
3683
3311
 
3684
3312
  | Parameter | Type |
3685
3313
  | :------ | :------ |
3686
- | `_r` | [`RtdbRefHandle`](#rtdbrefhandle) |
3687
- | `_eventType?` | `unknown` |
3688
- | `_callback?` | `unknown` |
3314
+ | `db` | [`ClientRtdb`](#clientrtdb) |
3689
3315
 
3690
3316
  #### Returns
3691
3317
 
@@ -3693,43 +3319,53 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3693
3319
 
3694
3320
  ***
3695
3321
 
3696
- <a id="rtdbonvalue"></a>
3322
+ <a id="rtdboff"></a>
3697
3323
 
3698
- ### rtdbOnValue()
3324
+ ### rtdbOff()
3699
3325
 
3700
3326
  ```ts
3701
- function rtdbOnValue(
3702
- r: RtdbRefHandle,
3703
- next: (snap: RtdbDataSnapshot) => void,
3704
- error?: (err: unknown) => void): Unsubscribe;
3327
+ function rtdbOff(
3328
+ target: RtdbTarget,
3329
+ eventType?: RtdbEventType,
3330
+ callback?: object): void;
3705
3331
  ```
3706
3332
 
3707
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
3333
+ #### Parameters
3708
3334
 
3709
- This barrel exports ONLY the leaf client + the wire-protocol types — the
3710
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
3711
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
3712
- does NOT re-export `host.ts`/`entry.ts`:
3713
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
3714
- the backend) — node/engine-heavy, never wanted in a page bundle.
3715
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
3335
+ | Parameter | Type |
3336
+ | :------ | :------ |
3337
+ | `target` | `RtdbTarget` |
3338
+ | `eventType?` | `RtdbEventType` |
3339
+ | `callback?` | `object` |
3716
3340
 
3717
- `client.ts` imports only the value codec
3718
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
3719
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
3720
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
3341
+ #### Returns
3721
3342
 
3722
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3723
- `import { getFirestore, subscribeEvents, setLens } from
3724
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
3343
+ `void`
3344
+
3345
+ ***
3346
+
3347
+ <a id="rtdbonchildadded"></a>
3348
+
3349
+ ### rtdbOnChildAdded()
3350
+
3351
+ ```ts
3352
+ function rtdbOnChildAdded(
3353
+ target: RtdbTarget,
3354
+ next: ChildCallback,
3355
+ cancel?: CancelOrOptions,
3356
+ options?: ListenOptions,
3357
+ identity?: object): Unsubscribe;
3358
+ ```
3725
3359
 
3726
3360
  #### Parameters
3727
3361
 
3728
3362
  | Parameter | Type |
3729
3363
  | :------ | :------ |
3730
- | `r` | [`RtdbRefHandle`](#rtdbrefhandle) |
3731
- | `next` | (`snap`: [`RtdbDataSnapshot`](#rtdbdatasnapshot)) => `void` |
3732
- | `error?` | (`err`: `unknown`) => `void` |
3364
+ | `target` | `RtdbTarget` |
3365
+ | `next` | `ChildCallback` |
3366
+ | `cancel?` | `CancelOrOptions` |
3367
+ | `options?` | `ListenOptions` |
3368
+ | `identity?` | `object` |
3733
3369
 
3734
3370
  #### Returns
3735
3371
 
@@ -3737,38 +3373,162 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3737
3373
 
3738
3374
  ***
3739
3375
 
3740
- <a id="rtdbpush"></a>
3376
+ <a id="rtdbonchildchanged"></a>
3741
3377
 
3742
- ### rtdbPush()
3378
+ ### rtdbOnChildChanged()
3743
3379
 
3744
3380
  ```ts
3745
- function rtdbPush(r: RtdbRefHandle, value?: unknown): RtdbRefHandle & PromiseLike<RtdbRefHandle>;
3381
+ function rtdbOnChildChanged(
3382
+ target: RtdbTarget,
3383
+ next: ChildCallback,
3384
+ cancel?: CancelOrOptions,
3385
+ options?: ListenOptions,
3386
+ identity?: object): Unsubscribe;
3746
3387
  ```
3747
3388
 
3748
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
3389
+ #### Parameters
3749
3390
 
3750
- This barrel exports ONLY the leaf client + the wire-protocol types — the
3751
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
3752
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
3753
- does NOT re-export `host.ts`/`entry.ts`:
3754
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
3755
- the backend) node/engine-heavy, never wanted in a page bundle.
3756
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
3391
+ | Parameter | Type |
3392
+ | :------ | :------ |
3393
+ | `target` | `RtdbTarget` |
3394
+ | `next` | `ChildCallback` |
3395
+ | `cancel?` | `CancelOrOptions` |
3396
+ | `options?` | `ListenOptions` |
3397
+ | `identity?` | `object` |
3757
3398
 
3758
- `client.ts` imports only the value codec
3759
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
3760
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
3761
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
3399
+ #### Returns
3762
3400
 
3763
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3764
- `import { getFirestore, subscribeEvents, setLens } from
3765
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
3401
+ [`Unsubscribe`](#unsubscribe)
3402
+
3403
+ ***
3404
+
3405
+ <a id="rtdbonchildmoved"></a>
3406
+
3407
+ ### rtdbOnChildMoved()
3408
+
3409
+ ```ts
3410
+ function rtdbOnChildMoved(
3411
+ target: RtdbTarget,
3412
+ next: ChildCallback,
3413
+ cancel?: CancelOrOptions,
3414
+ options?: ListenOptions,
3415
+ identity?: object): Unsubscribe;
3416
+ ```
3417
+
3418
+ #### Parameters
3419
+
3420
+ | Parameter | Type |
3421
+ | :------ | :------ |
3422
+ | `target` | `RtdbTarget` |
3423
+ | `next` | `ChildCallback` |
3424
+ | `cancel?` | `CancelOrOptions` |
3425
+ | `options?` | `ListenOptions` |
3426
+ | `identity?` | `object` |
3427
+
3428
+ #### Returns
3429
+
3430
+ [`Unsubscribe`](#unsubscribe)
3431
+
3432
+ ***
3433
+
3434
+ <a id="rtdbonchildremoved"></a>
3435
+
3436
+ ### rtdbOnChildRemoved()
3437
+
3438
+ ```ts
3439
+ function rtdbOnChildRemoved(
3440
+ target: RtdbTarget,
3441
+ next: ChildCallback,
3442
+ cancel?: CancelOrOptions,
3443
+ options?: ListenOptions,
3444
+ identity?: object): Unsubscribe;
3445
+ ```
3446
+
3447
+ #### Parameters
3448
+
3449
+ | Parameter | Type |
3450
+ | :------ | :------ |
3451
+ | `target` | `RtdbTarget` |
3452
+ | `next` | `ChildCallback` |
3453
+ | `cancel?` | `CancelOrOptions` |
3454
+ | `options?` | `ListenOptions` |
3455
+ | `identity?` | `object` |
3456
+
3457
+ #### Returns
3458
+
3459
+ [`Unsubscribe`](#unsubscribe)
3460
+
3461
+ ***
3462
+
3463
+ <a id="rtdbondisconnect-1"></a>
3464
+
3465
+ ### rtdbOnDisconnect()
3466
+
3467
+ ```ts
3468
+ function rtdbOnDisconnect(ref: RtdbRefHandle): RtdbOnDisconnect;
3469
+ ```
3470
+
3471
+ #### Parameters
3472
+
3473
+ | Parameter | Type |
3474
+ | :------ | :------ |
3475
+ | `ref` | [`RtdbRefHandle`](#rtdbrefhandle) |
3476
+
3477
+ #### Returns
3478
+
3479
+ [`RtdbOnDisconnect`](#rtdbondisconnect)
3480
+
3481
+ ***
3482
+
3483
+ <a id="rtdbonvalue"></a>
3484
+
3485
+ ### rtdbOnValue()
3486
+
3487
+ ```ts
3488
+ function rtdbOnValue(
3489
+ target: RtdbTarget,
3490
+ next: (snap: RtdbDataSnapshot) => void,
3491
+ cancelCallbackOrOptions?:
3492
+ | (err: unknown) => void
3493
+ | {
3494
+ onlyOnce?: boolean;
3495
+ },
3496
+ options?: {
3497
+ onlyOnce?: boolean;
3498
+ },
3499
+ registryCallback?: object): Unsubscribe;
3500
+ ```
3501
+
3502
+ #### Parameters
3503
+
3504
+ | Parameter | Type |
3505
+ | :------ | :------ |
3506
+ | `target` | `RtdbTarget` |
3507
+ | `next` | (`snap`: [`RtdbDataSnapshot`](#rtdbdatasnapshot)) => `void` |
3508
+ | `cancelCallbackOrOptions?` | \| (`err`: `unknown`) => `void` \| \{ `onlyOnce?`: `boolean`; \} |
3509
+ | `options?` | \{ `onlyOnce?`: `boolean`; \} |
3510
+ | `options.onlyOnce?` | `boolean` |
3511
+ | `registryCallback?` | `object` |
3512
+
3513
+ #### Returns
3514
+
3515
+ [`Unsubscribe`](#unsubscribe)
3516
+
3517
+ ***
3518
+
3519
+ <a id="rtdbpush"></a>
3520
+
3521
+ ### rtdbPush()
3522
+
3523
+ ```ts
3524
+ function rtdbPush(ref: RtdbRefHandle, value?: unknown): RtdbRefHandle & PromiseLike<RtdbRefHandle>;
3525
+ ```
3766
3526
 
3767
3527
  #### Parameters
3768
3528
 
3769
3529
  | Parameter | Type |
3770
3530
  | :------ | :------ |
3771
- | `r` | [`RtdbRefHandle`](#rtdbrefhandle) |
3531
+ | `ref` | [`RtdbRefHandle`](#rtdbrefhandle) |
3772
3532
  | `value?` | `unknown` |
3773
3533
 
3774
3534
  #### Returns
@@ -3785,25 +3545,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3785
3545
  function rtdbRef(db: ClientRtdb, path?: string): RtdbRefHandle;
3786
3546
  ```
3787
3547
 
3788
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
3789
-
3790
- This barrel exports ONLY the leaf client + the wire-protocol types — the
3791
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
3792
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
3793
- does NOT re-export `host.ts`/`entry.ts`:
3794
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
3795
- the backend) — node/engine-heavy, never wanted in a page bundle.
3796
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
3797
-
3798
- `client.ts` imports only the value codec
3799
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
3800
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
3801
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
3802
-
3803
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3804
- `import { getFirestore, subscribeEvents, setLens } from
3805
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
3806
-
3807
3548
  #### Parameters
3808
3549
 
3809
3550
  | Parameter | Type |
@@ -3822,37 +3563,49 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3822
3563
  ### rtdbRemove()
3823
3564
 
3824
3565
  ```ts
3825
- function rtdbRemove(r: RtdbRefHandle): Promise<void>;
3566
+ function rtdbRemove(ref: RtdbRefHandle): Promise<void>;
3826
3567
  ```
3827
3568
 
3828
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
3569
+ #### Parameters
3829
3570
 
3830
- This barrel exports ONLY the leaf client + the wire-protocol types — the
3831
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
3832
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
3833
- does NOT re-export `host.ts`/`entry.ts`:
3834
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
3835
- the backend) — node/engine-heavy, never wanted in a page bundle.
3836
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
3571
+ | Parameter | Type |
3572
+ | :------ | :------ |
3573
+ | `ref` | [`RtdbRefHandle`](#rtdbrefhandle) |
3837
3574
 
3838
- `client.ts` imports only the value codec
3839
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
3840
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
3841
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
3575
+ #### Returns
3842
3576
 
3843
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3844
- `import { getFirestore, subscribeEvents, setLens } from
3845
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
3577
+ `Promise`\<`void`\>
3578
+
3579
+ ***
3580
+
3581
+ <a id="rtdbruntransaction"></a>
3582
+
3583
+ ### rtdbRunTransaction()
3584
+
3585
+ ```ts
3586
+ function rtdbRunTransaction<T>(
3587
+ ref: RtdbRefHandle,
3588
+ transactionUpdate: (current: T) => T,
3589
+ options?: RtdbTransactionOptions): Promise<RtdbTransactionResult>;
3590
+ ```
3591
+
3592
+ #### Type Parameters
3593
+
3594
+ | Type Parameter |
3595
+ | :------ |
3596
+ | `T` |
3846
3597
 
3847
3598
  #### Parameters
3848
3599
 
3849
3600
  | Parameter | Type |
3850
3601
  | :------ | :------ |
3851
- | `r` | [`RtdbRefHandle`](#rtdbrefhandle) |
3602
+ | `ref` | [`RtdbRefHandle`](#rtdbrefhandle) |
3603
+ | `transactionUpdate` | (`current`: `T`) => `T` |
3604
+ | `options?` | `RtdbTransactionOptions` |
3852
3605
 
3853
3606
  #### Returns
3854
3607
 
3855
- `Promise`\<`void`\>
3608
+ `Promise`\<`RtdbTransactionResult`\>
3856
3609
 
3857
3610
  ***
3858
3611
 
@@ -3865,24 +3618,7 @@ function rtdbServerTimestamp(): {
3865
3618
  };
3866
3619
  ```
3867
3620
 
3868
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
3869
-
3870
- This barrel exports ONLY the leaf client + the wire-protocol types — the
3871
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
3872
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
3873
- does NOT re-export `host.ts`/`entry.ts`:
3874
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
3875
- the backend) — node/engine-heavy, never wanted in a page bundle.
3876
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
3877
-
3878
- `client.ts` imports only the value codec
3879
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
3880
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
3881
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
3882
-
3883
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3884
- `import { getFirestore, subscribeEvents, setLens } from
3885
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
3621
+ RTDB environment controls and server-value construction for served apps.
3886
3622
 
3887
3623
  #### Returns
3888
3624
 
@@ -3898,34 +3634,36 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3898
3634
  ### rtdbSet()
3899
3635
 
3900
3636
  ```ts
3901
- function rtdbSet(r: RtdbRefHandle, value: unknown): Promise<void>;
3637
+ function rtdbSet(ref: RtdbRefHandle, value: unknown): Promise<void>;
3902
3638
  ```
3903
3639
 
3904
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
3640
+ #### Parameters
3905
3641
 
3906
- This barrel exports ONLY the leaf client + the wire-protocol types — the
3907
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
3908
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
3909
- does NOT re-export `host.ts`/`entry.ts`:
3910
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
3911
- the backend) — node/engine-heavy, never wanted in a page bundle.
3912
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
3642
+ | Parameter | Type |
3643
+ | :------ | :------ |
3644
+ | `ref` | [`RtdbRefHandle`](#rtdbrefhandle) |
3645
+ | `value` | `unknown` |
3913
3646
 
3914
- `client.ts` imports only the value codec
3915
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
3916
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
3917
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
3647
+ #### Returns
3918
3648
 
3919
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3920
- `import { getFirestore, subscribeEvents, setLens } from
3921
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
3649
+ `Promise`\<`void`\>
3650
+
3651
+ ***
3652
+
3653
+ <a id="rtdbsetpriority"></a>
3654
+
3655
+ ### rtdbSetPriority()
3656
+
3657
+ ```ts
3658
+ function rtdbSetPriority(ref: RtdbRefHandle, priority: string | number): Promise<void>;
3659
+ ```
3922
3660
 
3923
3661
  #### Parameters
3924
3662
 
3925
3663
  | Parameter | Type |
3926
3664
  | :------ | :------ |
3927
- | `r` | [`RtdbRefHandle`](#rtdbrefhandle) |
3928
- | `value` | `unknown` |
3665
+ | `ref` | [`RtdbRefHandle`](#rtdbrefhandle) |
3666
+ | `priority` | `string` \| `number` |
3929
3667
 
3930
3668
  #### Returns
3931
3669
 
@@ -3933,38 +3671,44 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3933
3671
 
3934
3672
  ***
3935
3673
 
3936
- <a id="rtdbupdate"></a>
3674
+ <a id="rtdbsetwithpriority"></a>
3937
3675
 
3938
- ### rtdbUpdate()
3676
+ ### rtdbSetWithPriority()
3939
3677
 
3940
3678
  ```ts
3941
- function rtdbUpdate(r: RtdbRefHandle, values: Record<string, unknown>): Promise<void>;
3679
+ function rtdbSetWithPriority(
3680
+ ref: RtdbRefHandle,
3681
+ value: unknown,
3682
+ priority: string | number): Promise<void>;
3942
3683
  ```
3943
3684
 
3944
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
3685
+ #### Parameters
3945
3686
 
3946
- This barrel exports ONLY the leaf client + the wire-protocol types — the
3947
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
3948
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
3949
- does NOT re-export `host.ts`/`entry.ts`:
3950
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
3951
- the backend) — node/engine-heavy, never wanted in a page bundle.
3952
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
3687
+ | Parameter | Type |
3688
+ | :------ | :------ |
3689
+ | `ref` | [`RtdbRefHandle`](#rtdbrefhandle) |
3690
+ | `value` | `unknown` |
3691
+ | `priority` | `string` \| `number` |
3953
3692
 
3954
- `client.ts` imports only the value codec
3955
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
3956
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
3957
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
3693
+ #### Returns
3958
3694
 
3959
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
3960
- `import { getFirestore, subscribeEvents, setLens } from
3961
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
3695
+ `Promise`\<`void`\>
3696
+
3697
+ ***
3698
+
3699
+ <a id="rtdbupdate"></a>
3700
+
3701
+ ### rtdbUpdate()
3702
+
3703
+ ```ts
3704
+ function rtdbUpdate(ref: RtdbRefHandle, values: Record<string, unknown>): Promise<void>;
3705
+ ```
3962
3706
 
3963
3707
  #### Parameters
3964
3708
 
3965
3709
  | Parameter | Type |
3966
3710
  | :------ | :------ |
3967
- | `r` | [`RtdbRefHandle`](#rtdbrefhandle) |
3711
+ | `ref` | [`RtdbRefHandle`](#rtdbrefhandle) |
3968
3712
  | `values` | `Record`\<`string`, `unknown`\> |
3969
3713
 
3970
3714
  #### Returns
@@ -4047,32 +3791,13 @@ Phase 3: save the live sandbox as a named branch (a saved state bundle).
4047
3791
 
4048
3792
  ***
4049
3793
 
4050
- <a id="servertimestamp"></a>
4051
-
4052
- ### serverTimestamp()
4053
-
4054
- ```ts
4055
- function serverTimestamp(): SentinelMarker;
4056
- ```
4057
-
4058
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
4059
-
4060
- This barrel exports ONLY the leaf client + the wire-protocol types — the
4061
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
4062
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
4063
- does NOT re-export `host.ts`/`entry.ts`:
4064
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
4065
- the backend) — node/engine-heavy, never wanted in a page bundle.
4066
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
3794
+ <a id="servertimestamp"></a>
4067
3795
 
4068
- `client.ts` imports only the value codec
4069
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
4070
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
4071
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
3796
+ ### serverTimestamp()
4072
3797
 
4073
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4074
- `import { getFirestore, subscribeEvents, setLens } from
4075
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
3798
+ ```ts
3799
+ function serverTimestamp(): SentinelMarker;
3800
+ ```
4076
3801
 
4077
3802
  #### Returns
4078
3803
 
@@ -4091,25 +3816,6 @@ function setDatabaseRules(db: ClientDb | ClientRtdb, source: unknown): Promise<{
4091
3816
  }>;
4092
3817
  ```
4093
3818
 
4094
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
4095
-
4096
- This barrel exports ONLY the leaf client + the wire-protocol types — the
4097
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
4098
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
4099
- does NOT re-export `host.ts`/`entry.ts`:
4100
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
4101
- the backend) — node/engine-heavy, never wanted in a page bundle.
4102
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
4103
-
4104
- `client.ts` imports only the value codec
4105
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
4106
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
4107
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
4108
-
4109
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4110
- `import { getFirestore, subscribeEvents, setLens } from
4111
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
4112
-
4113
3819
  #### Parameters
4114
3820
 
4115
3821
  | Parameter | Type |
@@ -4140,25 +3846,6 @@ function setDoc(
4140
3846
  }): Promise<void>;
4141
3847
  ```
4142
3848
 
4143
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
4144
-
4145
- This barrel exports ONLY the leaf client + the wire-protocol types — the
4146
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
4147
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
4148
- does NOT re-export `host.ts`/`entry.ts`:
4149
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
4150
- the backend) — node/engine-heavy, never wanted in a page bundle.
4151
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
4152
-
4153
- `client.ts` imports only the value codec
4154
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
4155
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
4156
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
4157
-
4158
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4159
- `import { getFirestore, subscribeEvents, setLens } from
4160
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
4161
-
4162
3849
  #### Parameters
4163
3850
 
4164
3851
  | Parameter | Type |
@@ -4187,25 +3874,6 @@ function setFirestoreRules(db: ClientDb, source: string): Promise<{
4187
3874
  }>;
4188
3875
  ```
4189
3876
 
4190
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
4191
-
4192
- This barrel exports ONLY the leaf client + the wire-protocol types — the
4193
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
4194
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
4195
- does NOT re-export `host.ts`/`entry.ts`:
4196
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
4197
- the backend) — node/engine-heavy, never wanted in a page bundle.
4198
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
4199
-
4200
- `client.ts` imports only the value codec
4201
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
4202
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
4203
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
4204
-
4205
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4206
- `import { getFirestore, subscribeEvents, setLens } from
4207
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
4208
-
4209
3877
  #### Parameters
4210
3878
 
4211
3879
  | Parameter | Type |
@@ -4311,25 +3979,6 @@ function setProviderConfig(
4311
3979
  enabled: boolean): Promise<void>;
4312
3980
  ```
4313
3981
 
4314
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
4315
-
4316
- This barrel exports ONLY the leaf client + the wire-protocol types — the
4317
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
4318
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
4319
- does NOT re-export `host.ts`/`entry.ts`:
4320
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
4321
- the backend) — node/engine-heavy, never wanted in a page bundle.
4322
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
4323
-
4324
- `client.ts` imports only the value codec
4325
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
4326
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
4327
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
4328
-
4329
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4330
- `import { getFirestore, subscribeEvents, setLens } from
4331
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
4332
-
4333
3982
  #### Parameters
4334
3983
 
4335
3984
  | Parameter | Type |
@@ -4381,25 +4030,6 @@ if the new rules deny them.
4381
4030
  function signInAnonymously(auth: ClientAuth): Promise<ClientUserCredential>;
4382
4031
  ```
4383
4032
 
4384
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
4385
-
4386
- This barrel exports ONLY the leaf client + the wire-protocol types — the
4387
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
4388
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
4389
- does NOT re-export `host.ts`/`entry.ts`:
4390
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
4391
- the backend) — node/engine-heavy, never wanted in a page bundle.
4392
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
4393
-
4394
- `client.ts` imports only the value codec
4395
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
4396
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
4397
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
4398
-
4399
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4400
- `import { getFirestore, subscribeEvents, setLens } from
4401
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
4402
-
4403
4033
  #### Parameters
4404
4034
 
4405
4035
  | Parameter | Type |
@@ -4423,25 +4053,6 @@ function signInWithEmailAndPassword(
4423
4053
  password: string): Promise<ClientUserCredential>;
4424
4054
  ```
4425
4055
 
4426
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
4427
-
4428
- This barrel exports ONLY the leaf client + the wire-protocol types — the
4429
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
4430
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
4431
- does NOT re-export `host.ts`/`entry.ts`:
4432
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
4433
- the backend) — node/engine-heavy, never wanted in a page bundle.
4434
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
4435
-
4436
- `client.ts` imports only the value codec
4437
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
4438
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
4439
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
4440
-
4441
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4442
- `import { getFirestore, subscribeEvents, setLens } from
4443
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
4444
-
4445
4056
  #### Parameters
4446
4057
 
4447
4058
  | Parameter | Type |
@@ -4464,25 +4075,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4464
4075
  function signOut(auth: ClientAuth): Promise<void>;
4465
4076
  ```
4466
4077
 
4467
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
4468
-
4469
- This barrel exports ONLY the leaf client + the wire-protocol types — the
4470
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
4471
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
4472
- does NOT re-export `host.ts`/`entry.ts`:
4473
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
4474
- the backend) — node/engine-heavy, never wanted in a page bundle.
4475
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
4476
-
4477
- `client.ts` imports only the value codec
4478
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
4479
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
4480
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
4481
-
4482
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4483
- `import { getFirestore, subscribeEvents, setLens } from
4484
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
4485
-
4486
4078
  #### Parameters
4487
4079
 
4488
4080
  | Parameter | Type |
@@ -4503,25 +4095,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4503
4095
  function startAfter(...values: unknown[]): QueryConstraintHandle;
4504
4096
  ```
4505
4097
 
4506
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
4507
-
4508
- This barrel exports ONLY the leaf client + the wire-protocol types — the
4509
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
4510
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
4511
- does NOT re-export `host.ts`/`entry.ts`:
4512
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
4513
- the backend) — node/engine-heavy, never wanted in a page bundle.
4514
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
4515
-
4516
- `client.ts` imports only the value codec
4517
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
4518
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
4519
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
4520
-
4521
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4522
- `import { getFirestore, subscribeEvents, setLens } from
4523
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
4524
-
4525
4098
  #### Parameters
4526
4099
 
4527
4100
  | Parameter | Type |
@@ -4542,25 +4115,6 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4542
4115
  function startAt(...values: unknown[]): QueryConstraintHandle;
4543
4116
  ```
4544
4117
 
4545
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
4546
-
4547
- This barrel exports ONLY the leaf client + the wire-protocol types — the
4548
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
4549
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
4550
- does NOT re-export `host.ts`/`entry.ts`:
4551
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
4552
- the backend) — node/engine-heavy, never wanted in a page bundle.
4553
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
4554
-
4555
- `client.ts` imports only the value codec
4556
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
4557
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
4558
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
4559
-
4560
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4561
- `import { getFirestore, subscribeEvents, setLens } from
4562
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
4563
-
4564
4118
  #### Parameters
4565
4119
 
4566
4120
  | Parameter | Type |
@@ -4703,25 +4257,6 @@ Phase 3 (clobber): switch the live sandbox to a named branch's state.
4703
4257
  function updateDoc(ref: DocRefHandle, data: Record<string, unknown>): Promise<void>;
4704
4258
  ```
4705
4259
 
4706
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
4707
-
4708
- This barrel exports ONLY the leaf client + the wire-protocol types — the
4709
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
4710
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
4711
- does NOT re-export `host.ts`/`entry.ts`:
4712
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
4713
- the backend) — node/engine-heavy, never wanted in a page bundle.
4714
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
4715
-
4716
- `client.ts` imports only the value codec
4717
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
4718
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
4719
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
4720
-
4721
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4722
- `import { getFirestore, subscribeEvents, setLens } from
4723
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
4724
-
4725
4260
  #### Parameters
4726
4261
 
4727
4262
  | Parameter | Type |
@@ -4780,25 +4315,6 @@ function where(
4780
4315
  value: unknown): QueryConstraintHandle;
4781
4316
  ```
4782
4317
 
4783
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
4784
-
4785
- This barrel exports ONLY the leaf client + the wire-protocol types — the
4786
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
4787
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
4788
- does NOT re-export `host.ts`/`entry.ts`:
4789
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
4790
- the backend) — node/engine-heavy, never wanted in a page bundle.
4791
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
4792
-
4793
- `client.ts` imports only the value codec
4794
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
4795
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
4796
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
4797
-
4798
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4799
- `import { getFirestore, subscribeEvents, setLens } from
4800
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
4801
-
4802
4318
  #### Parameters
4803
4319
 
4804
4320
  | Parameter | Type |
@@ -4813,32 +4329,42 @@ Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4813
4329
 
4814
4330
  ***
4815
4331
 
4816
- <a id="writebatch"></a>
4332
+ <a id="workernameforepoch"></a>
4817
4333
 
4818
- ### writeBatch()
4334
+ ### workerNameForEpoch()
4819
4335
 
4820
4336
  ```ts
4821
- function writeBatch(db: ClientDb): ClientWriteBatch;
4337
+ function workerNameForEpoch(servedEpoch: string, storage: EpochStorage): string;
4822
4338
  ```
4823
4339
 
4824
- Browser-safe SharedWorker CLIENT surface (Pyric Studio data plane).
4340
+ Select the origin's active worker generation.
4825
4341
 
4826
- This barrel exports ONLY the leaf client + the wire-protocol types — the
4827
- pieces a browser app (the served page, or Pyric Studio's Vite app) imports to
4828
- connect to the `pyric-shared-worker` over its `MessagePort`. It deliberately
4829
- does NOT re-export `host.ts`/`entry.ts`:
4830
- - `host.ts` imports the full `pyric/firestore` + `pyric/auth` engine (it IS
4831
- the backend) — node/engine-heavy, never wanted in a page bundle.
4832
- - `entry.ts` references `SharedWorkerGlobalScope` and is esbuild-only.
4342
+ A browser that predates generation-aware workers has no stored epoch but may
4343
+ still have the legacy `pyric-shared-worker` alive. Seed the first served
4344
+ epoch before connecting so a new client never attaches to that incompatible
4345
+ worker. Later releases keep using the stored generation until replacement
4346
+ is explicitly committed.
4833
4347
 
4834
- `client.ts` imports only the value codec
4835
- (`pyric/firestore/internal/value-codec`, a leaf internal seam)
4836
- and type-only `pyric/sandbox` (erased at build), so this entry stays free of
4837
- the ~10 MB rules/sandbox engine — safe to import from any browser app.
4348
+ #### Parameters
4838
4349
 
4839
- Exposed by `@pyric/cli`'s `./serve/worker` package export so Studio can
4840
- `import { getFirestore, subscribeEvents, setLens } from
4841
- '@pyric/cli/serve/worker'` and reach the live SharedWorker backend.
4350
+ | Parameter | Type |
4351
+ | :------ | :------ |
4352
+ | `servedEpoch` | `string` |
4353
+ | `storage` | `EpochStorage` |
4354
+
4355
+ #### Returns
4356
+
4357
+ `string`
4358
+
4359
+ ***
4360
+
4361
+ <a id="writebatch"></a>
4362
+
4363
+ ### writeBatch()
4364
+
4365
+ ```ts
4366
+ function writeBatch(db: ClientDb): ClientWriteBatch;
4367
+ ```
4842
4368
 
4843
4369
  #### Parameters
4844
4370