@pyric/cli 0.1.0-alpha.9

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 (1169) hide show
  1. package/LICENSE +216 -0
  2. package/README.md +156 -0
  3. package/README.md.orig +138 -0
  4. package/dist/assurance/attachment.d.ts +24 -0
  5. package/dist/assurance/attachment.d.ts.map +1 -0
  6. package/dist/assurance/attachment.js +138 -0
  7. package/dist/assurance/attachment.js.map +1 -0
  8. package/dist/assurance/browser.d.ts +7 -0
  9. package/dist/assurance/browser.d.ts.map +1 -0
  10. package/dist/assurance/browser.js +68 -0
  11. package/dist/assurance/browser.js.map +1 -0
  12. package/dist/assurance/campaign.d.ts +41 -0
  13. package/dist/assurance/campaign.d.ts.map +1 -0
  14. package/dist/assurance/campaign.js +364 -0
  15. package/dist/assurance/campaign.js.map +1 -0
  16. package/dist/assurance/capabilities.d.ts +7 -0
  17. package/dist/assurance/capabilities.d.ts.map +1 -0
  18. package/dist/assurance/capabilities.js +295 -0
  19. package/dist/assurance/capabilities.js.map +1 -0
  20. package/dist/assurance/cases.d.ts +14 -0
  21. package/dist/assurance/cases.d.ts.map +1 -0
  22. package/dist/assurance/cases.js +27 -0
  23. package/dist/assurance/cases.js.map +1 -0
  24. package/dist/assurance/generated-capabilities.d.ts +52 -0
  25. package/dist/assurance/generated-capabilities.d.ts.map +1 -0
  26. package/dist/assurance/generated-capabilities.js +329 -0
  27. package/dist/assurance/generated-capabilities.js.map +1 -0
  28. package/dist/assurance/index.d.ts +11 -0
  29. package/dist/assurance/index.d.ts.map +1 -0
  30. package/dist/assurance/index.js +9 -0
  31. package/dist/assurance/index.js.map +1 -0
  32. package/dist/assurance/runner.d.ts +3 -0
  33. package/dist/assurance/runner.d.ts.map +1 -0
  34. package/dist/assurance/runner.js +633 -0
  35. package/dist/assurance/runner.js.map +1 -0
  36. package/dist/assurance/tool-names.d.ts +4 -0
  37. package/dist/assurance/tool-names.d.ts.map +1 -0
  38. package/dist/assurance/tool-names.js +14 -0
  39. package/dist/assurance/tool-names.js.map +1 -0
  40. package/dist/assurance/tools.d.ts +19 -0
  41. package/dist/assurance/tools.d.ts.map +1 -0
  42. package/dist/assurance/tools.js +740 -0
  43. package/dist/assurance/tools.js.map +1 -0
  44. package/dist/assurance/types.d.ts +348 -0
  45. package/dist/assurance/types.d.ts.map +1 -0
  46. package/dist/assurance/types.js +7 -0
  47. package/dist/assurance/types.js.map +1 -0
  48. package/dist/assurance/validation.d.ts +8 -0
  49. package/dist/assurance/validation.d.ts.map +1 -0
  50. package/dist/assurance/validation.js +269 -0
  51. package/dist/assurance/validation.js.map +1 -0
  52. package/dist/bridge/client/bridge.d.ts +133 -0
  53. package/dist/bridge/client/bridge.d.ts.map +1 -0
  54. package/dist/bridge/client/bridge.js +429 -0
  55. package/dist/bridge/client/bridge.js.map +1 -0
  56. package/dist/bridge/client/dispatch.d.ts +41 -0
  57. package/dist/bridge/client/dispatch.d.ts.map +1 -0
  58. package/dist/bridge/client/dispatch.js +111 -0
  59. package/dist/bridge/client/dispatch.js.map +1 -0
  60. package/dist/bridge/client.d.ts +24 -0
  61. package/dist/bridge/client.d.ts.map +1 -0
  62. package/dist/bridge/client.js +26 -0
  63. package/dist/bridge/client.js.map +1 -0
  64. package/dist/bridge/protocol.d.ts +227 -0
  65. package/dist/bridge/protocol.d.ts.map +1 -0
  66. package/dist/bridge/protocol.js +131 -0
  67. package/dist/bridge/protocol.js.map +1 -0
  68. package/dist/bridge/server/audit.d.ts +19 -0
  69. package/dist/bridge/server/audit.d.ts.map +1 -0
  70. package/dist/bridge/server/audit.js +46 -0
  71. package/dist/bridge/server/audit.js.map +1 -0
  72. package/dist/bridge/server/bridge.d.ts +126 -0
  73. package/dist/bridge/server/bridge.d.ts.map +1 -0
  74. package/dist/bridge/server/bridge.js +383 -0
  75. package/dist/bridge/server/bridge.js.map +1 -0
  76. package/dist/bridge/server/headless.d.ts +36 -0
  77. package/dist/bridge/server/headless.d.ts.map +1 -0
  78. package/dist/bridge/server/headless.js +142 -0
  79. package/dist/bridge/server/headless.js.map +1 -0
  80. package/dist/bridge/server/json-schema-to-zod.d.ts +37 -0
  81. package/dist/bridge/server/json-schema-to-zod.d.ts.map +1 -0
  82. package/dist/bridge/server/json-schema-to-zod.js +93 -0
  83. package/dist/bridge/server/json-schema-to-zod.js.map +1 -0
  84. package/dist/bridge/server/local-bridge.d.ts +33 -0
  85. package/dist/bridge/server/local-bridge.d.ts.map +1 -0
  86. package/dist/bridge/server/local-bridge.js +41 -0
  87. package/dist/bridge/server/local-bridge.js.map +1 -0
  88. package/dist/bridge/server/logger.d.ts +28 -0
  89. package/dist/bridge/server/logger.d.ts.map +1 -0
  90. package/dist/bridge/server/logger.js +42 -0
  91. package/dist/bridge/server/logger.js.map +1 -0
  92. package/dist/bridge/server/mcp-contract.d.ts +21 -0
  93. package/dist/bridge/server/mcp-contract.d.ts.map +1 -0
  94. package/dist/bridge/server/mcp-contract.js +62 -0
  95. package/dist/bridge/server/mcp-contract.js.map +1 -0
  96. package/dist/bridge/server/mcp.d.ts +26 -0
  97. package/dist/bridge/server/mcp.d.ts.map +1 -0
  98. package/dist/bridge/server/mcp.js +102 -0
  99. package/dist/bridge/server/mcp.js.map +1 -0
  100. package/dist/bridge/server/peer.d.ts +39 -0
  101. package/dist/bridge/server/peer.d.ts.map +1 -0
  102. package/dist/bridge/server/peer.js +189 -0
  103. package/dist/bridge/server/peer.js.map +1 -0
  104. package/dist/bridge/server/standalone.d.ts +49 -0
  105. package/dist/bridge/server/standalone.d.ts.map +1 -0
  106. package/dist/bridge/server/standalone.js +267 -0
  107. package/dist/bridge/server/standalone.js.map +1 -0
  108. package/dist/bridge/server/tool-metadata.d.ts +38 -0
  109. package/dist/bridge/server/tool-metadata.d.ts.map +1 -0
  110. package/dist/bridge/server/tool-metadata.js +81 -0
  111. package/dist/bridge/server/tool-metadata.js.map +1 -0
  112. package/dist/bridge/server.d.ts +21 -0
  113. package/dist/bridge/server.d.ts.map +1 -0
  114. package/dist/bridge/server.js +18 -0
  115. package/dist/bridge/server.js.map +1 -0
  116. package/dist/cli/database-rules.d.ts +43 -0
  117. package/dist/cli/database-rules.d.ts.map +1 -0
  118. package/dist/cli/database-rules.js +261 -0
  119. package/dist/cli/database-rules.js.map +1 -0
  120. package/dist/cli/dev-runner.d.ts +112 -0
  121. package/dist/cli/dev-runner.d.ts.map +1 -0
  122. package/dist/cli/dev-runner.js +239 -0
  123. package/dist/cli/dev-runner.js.map +1 -0
  124. package/dist/cli/firebase-json.d.ts +66 -0
  125. package/dist/cli/firebase-json.d.ts.map +1 -0
  126. package/dist/cli/firebase-json.js +60 -0
  127. package/dist/cli/firebase-json.js.map +1 -0
  128. package/dist/cli/firestore-indexes.d.ts +21 -0
  129. package/dist/cli/firestore-indexes.d.ts.map +1 -0
  130. package/dist/cli/firestore-indexes.js +39 -0
  131. package/dist/cli/firestore-indexes.js.map +1 -0
  132. package/dist/cli/index.d.ts +56 -0
  133. package/dist/cli/index.d.ts.map +1 -0
  134. package/dist/cli/index.js +379 -0
  135. package/dist/cli/index.js.map +1 -0
  136. package/dist/cli/init.d.ts +50 -0
  137. package/dist/cli/init.d.ts.map +1 -0
  138. package/dist/cli/init.js +182 -0
  139. package/dist/cli/init.js.map +1 -0
  140. package/dist/cli/mcp-proxy.d.ts +10 -0
  141. package/dist/cli/mcp-proxy.d.ts.map +1 -0
  142. package/dist/cli/mcp-proxy.js +129 -0
  143. package/dist/cli/mcp-proxy.js.map +1 -0
  144. package/dist/cli/parse-args.d.ts +20 -0
  145. package/dist/cli/parse-args.d.ts.map +1 -0
  146. package/dist/cli/parse-args.js +69 -0
  147. package/dist/cli/parse-args.js.map +1 -0
  148. package/dist/cli/rules.d.ts +55 -0
  149. package/dist/cli/rules.d.ts.map +1 -0
  150. package/dist/cli/rules.js +199 -0
  151. package/dist/cli/rules.js.map +1 -0
  152. package/dist/cli/scope.d.ts +12 -0
  153. package/dist/cli/scope.d.ts.map +1 -0
  154. package/dist/cli/scope.js +44 -0
  155. package/dist/cli/scope.js.map +1 -0
  156. package/dist/cli/serve.d.ts +122 -0
  157. package/dist/cli/serve.d.ts.map +1 -0
  158. package/dist/cli/serve.js +844 -0
  159. package/dist/cli/serve.js.map +1 -0
  160. package/dist/cli/service-commands.d.ts +8 -0
  161. package/dist/cli/service-commands.d.ts.map +1 -0
  162. package/dist/cli/service-commands.js +58 -0
  163. package/dist/cli/service-commands.js.map +1 -0
  164. package/dist/cli/snapshot.d.ts +22 -0
  165. package/dist/cli/snapshot.d.ts.map +1 -0
  166. package/dist/cli/snapshot.js +139 -0
  167. package/dist/cli/snapshot.js.map +1 -0
  168. package/dist/cli/storage-rules.d.ts +21 -0
  169. package/dist/cli/storage-rules.d.ts.map +1 -0
  170. package/dist/cli/storage-rules.js +121 -0
  171. package/dist/cli/storage-rules.js.map +1 -0
  172. package/dist/cli/verify.d.ts +23 -0
  173. package/dist/cli/verify.d.ts.map +1 -0
  174. package/dist/cli/verify.js +349 -0
  175. package/dist/cli/verify.js.map +1 -0
  176. package/dist/credentials/core/memoize-ttl.d.ts +58 -0
  177. package/dist/credentials/core/memoize-ttl.d.ts.map +1 -0
  178. package/dist/credentials/core/memoize-ttl.js +88 -0
  179. package/dist/credentials/core/memoize-ttl.js.map +1 -0
  180. package/dist/credentials/core/types.d.ts +11 -0
  181. package/dist/credentials/core/types.d.ts.map +1 -0
  182. package/dist/credentials/core/types.js +2 -0
  183. package/dist/credentials/core/types.js.map +1 -0
  184. package/dist/credentials/node/from-adc.d.ts +10 -0
  185. package/dist/credentials/node/from-adc.d.ts.map +1 -0
  186. package/dist/credentials/node/from-adc.js +76 -0
  187. package/dist/credentials/node/from-adc.js.map +1 -0
  188. package/dist/credentials/node/from-service-account.d.ts +24 -0
  189. package/dist/credentials/node/from-service-account.d.ts.map +1 -0
  190. package/dist/credentials/node/from-service-account.js +108 -0
  191. package/dist/credentials/node/from-service-account.js.map +1 -0
  192. package/dist/credentials/node/index.d.ts +7 -0
  193. package/dist/credentials/node/index.d.ts.map +1 -0
  194. package/dist/credentials/node/index.js +7 -0
  195. package/dist/credentials/node/index.js.map +1 -0
  196. package/dist/discover/concurrency.d.ts +42 -0
  197. package/dist/discover/concurrency.d.ts.map +1 -0
  198. package/dist/discover/concurrency.js +113 -0
  199. package/dist/discover/concurrency.js.map +1 -0
  200. package/dist/discover/crawler-adapter.d.ts +48 -0
  201. package/dist/discover/crawler-adapter.d.ts.map +1 -0
  202. package/dist/discover/crawler-adapter.js +92 -0
  203. package/dist/discover/crawler-adapter.js.map +1 -0
  204. package/dist/discover/crawler.d.ts +294 -0
  205. package/dist/discover/crawler.d.ts.map +1 -0
  206. package/dist/discover/crawler.js +764 -0
  207. package/dist/discover/crawler.js.map +1 -0
  208. package/dist/discover/credential-free.d.ts +19 -0
  209. package/dist/discover/credential-free.d.ts.map +1 -0
  210. package/dist/discover/credential-free.js +18 -0
  211. package/dist/discover/credential-free.js.map +1 -0
  212. package/dist/discover/findCollectionGroup.d.ts +44 -0
  213. package/dist/discover/findCollectionGroup.d.ts.map +1 -0
  214. package/dist/discover/findCollectionGroup.js +81 -0
  215. package/dist/discover/findCollectionGroup.js.map +1 -0
  216. package/dist/discover/firestore-source.d.ts +60 -0
  217. package/dist/discover/firestore-source.d.ts.map +1 -0
  218. package/dist/discover/firestore-source.js +11 -0
  219. package/dist/discover/firestore-source.js.map +1 -0
  220. package/dist/discover/index.d.ts +3 -0
  221. package/dist/discover/index.d.ts.map +1 -0
  222. package/dist/discover/index.js +5 -0
  223. package/dist/discover/index.js.map +1 -0
  224. package/dist/discover/merge.d.ts +108 -0
  225. package/dist/discover/merge.d.ts.map +1 -0
  226. package/dist/discover/merge.js +394 -0
  227. package/dist/discover/merge.js.map +1 -0
  228. package/dist/discover/session.d.ts +116 -0
  229. package/dist/discover/session.d.ts.map +1 -0
  230. package/dist/discover/session.js +331 -0
  231. package/dist/discover/session.js.map +1 -0
  232. package/dist/discover/tools.d.ts +58 -0
  233. package/dist/discover/tools.d.ts.map +1 -0
  234. package/dist/discover/tools.js +115 -0
  235. package/dist/discover/tools.js.map +1 -0
  236. package/dist/discover/types.d.ts +190 -0
  237. package/dist/discover/types.d.ts.map +1 -0
  238. package/dist/discover/types.js +12 -0
  239. package/dist/discover/types.js.map +1 -0
  240. package/dist/discover/wire.d.ts +70 -0
  241. package/dist/discover/wire.d.ts.map +1 -0
  242. package/dist/discover/wire.js +309 -0
  243. package/dist/discover/wire.js.map +1 -0
  244. package/dist/functions-rtdb/child.d.ts +52 -0
  245. package/dist/functions-rtdb/child.d.ts.map +1 -0
  246. package/dist/functions-rtdb/child.js +283 -0
  247. package/dist/functions-rtdb/child.js.map +1 -0
  248. package/dist/functions-rtdb/delivery.d.ts +4 -0
  249. package/dist/functions-rtdb/delivery.d.ts.map +1 -0
  250. package/dist/functions-rtdb/delivery.js +2 -0
  251. package/dist/functions-rtdb/delivery.js.map +1 -0
  252. package/dist/functions-rtdb/discovery.d.ts +41 -0
  253. package/dist/functions-rtdb/discovery.d.ts.map +1 -0
  254. package/dist/functions-rtdb/discovery.js +86 -0
  255. package/dist/functions-rtdb/discovery.js.map +1 -0
  256. package/dist/functions-rtdb/event.d.ts +20 -0
  257. package/dist/functions-rtdb/event.d.ts.map +1 -0
  258. package/dist/functions-rtdb/event.js +45 -0
  259. package/dist/functions-rtdb/event.js.map +1 -0
  260. package/dist/functions-rtdb/execution.d.ts +20 -0
  261. package/dist/functions-rtdb/execution.d.ts.map +1 -0
  262. package/dist/functions-rtdb/execution.js +70 -0
  263. package/dist/functions-rtdb/execution.js.map +1 -0
  264. package/dist/functions-rtdb/in-memory-delivery.d.ts +9 -0
  265. package/dist/functions-rtdb/in-memory-delivery.d.ts.map +1 -0
  266. package/dist/functions-rtdb/in-memory-delivery.js +36 -0
  267. package/dist/functions-rtdb/in-memory-delivery.js.map +1 -0
  268. package/dist/functions-rtdb/project.d.ts +7 -0
  269. package/dist/functions-rtdb/project.d.ts.map +1 -0
  270. package/dist/functions-rtdb/project.js +54 -0
  271. package/dist/functions-rtdb/project.js.map +1 -0
  272. package/dist/functions-rtdb/projection.d.ts +14 -0
  273. package/dist/functions-rtdb/projection.d.ts.map +1 -0
  274. package/dist/functions-rtdb/projection.js +65 -0
  275. package/dist/functions-rtdb/projection.js.map +1 -0
  276. package/dist/functions-rtdb/reference-pattern.d.ts +5 -0
  277. package/dist/functions-rtdb/reference-pattern.d.ts.map +1 -0
  278. package/dist/functions-rtdb/reference-pattern.js +14 -0
  279. package/dist/functions-rtdb/reference-pattern.js.map +1 -0
  280. package/dist/functions-rtdb/remote-delivery.d.ts +9 -0
  281. package/dist/functions-rtdb/remote-delivery.d.ts.map +1 -0
  282. package/dist/functions-rtdb/remote-delivery.js +11 -0
  283. package/dist/functions-rtdb/remote-delivery.js.map +1 -0
  284. package/dist/pkg-version.d.ts +2 -0
  285. package/dist/pkg-version.d.ts.map +1 -0
  286. package/dist/pkg-version.js +47 -0
  287. package/dist/pkg-version.js.map +1 -0
  288. package/dist/register/esm-exports.d.ts +26 -0
  289. package/dist/register/esm-exports.d.ts.map +1 -0
  290. package/dist/register/esm-exports.js +61 -0
  291. package/dist/register/esm-exports.js.map +1 -0
  292. package/dist/register/hooks.d.ts +13 -0
  293. package/dist/register/hooks.d.ts.map +1 -0
  294. package/dist/register/hooks.js +15 -0
  295. package/dist/register/hooks.js.map +1 -0
  296. package/dist/register/index.d.ts +5 -0
  297. package/dist/register/index.d.ts.map +1 -0
  298. package/dist/register/index.js +124 -0
  299. package/dist/register/index.js.map +1 -0
  300. package/dist/register/mapping.d.ts +19 -0
  301. package/dist/register/mapping.d.ts.map +1 -0
  302. package/dist/register/mapping.js +35 -0
  303. package/dist/register/mapping.js.map +1 -0
  304. package/dist/remote/index.d.ts +232 -0
  305. package/dist/remote/index.d.ts.map +1 -0
  306. package/dist/remote/index.js +720 -0
  307. package/dist/remote/index.js.map +1 -0
  308. package/dist/rtdb/crawl-snapshot.d.ts +17 -0
  309. package/dist/rtdb/crawl-snapshot.d.ts.map +1 -0
  310. package/dist/rtdb/crawl-snapshot.js +72 -0
  311. package/dist/rtdb/crawl-snapshot.js.map +1 -0
  312. package/dist/rtdb/inspection.d.ts +8 -0
  313. package/dist/rtdb/inspection.d.ts.map +1 -0
  314. package/dist/rtdb/inspection.js +111 -0
  315. package/dist/rtdb/inspection.js.map +1 -0
  316. package/dist/rtdb/load-rules-document.d.ts +25 -0
  317. package/dist/rtdb/load-rules-document.d.ts.map +1 -0
  318. package/dist/rtdb/load-rules-document.js +38 -0
  319. package/dist/rtdb/load-rules-document.js.map +1 -0
  320. package/dist/rtdb/rules-generation-tool.d.ts +4 -0
  321. package/dist/rtdb/rules-generation-tool.d.ts.map +1 -0
  322. package/dist/rtdb/rules-generation-tool.js +35 -0
  323. package/dist/rtdb/rules-generation-tool.js.map +1 -0
  324. package/dist/rtdb/rules-json.d.ts +8 -0
  325. package/dist/rtdb/rules-json.d.ts.map +1 -0
  326. package/dist/rtdb/rules-json.js +17 -0
  327. package/dist/rtdb/rules-json.js.map +1 -0
  328. package/dist/serve/bridge-mount.d.ts +36 -0
  329. package/dist/serve/bridge-mount.d.ts.map +1 -0
  330. package/dist/serve/bridge-mount.js +162 -0
  331. package/dist/serve/bridge-mount.js.map +1 -0
  332. package/dist/serve/bundler.d.ts +110 -0
  333. package/dist/serve/bundler.d.ts.map +1 -0
  334. package/dist/serve/bundler.js +432 -0
  335. package/dist/serve/bundler.js.map +1 -0
  336. package/dist/serve/capture-store.d.ts +27 -0
  337. package/dist/serve/capture-store.d.ts.map +1 -0
  338. package/dist/serve/capture-store.js +47 -0
  339. package/dist/serve/capture-store.js.map +1 -0
  340. package/dist/serve/discovery.d.ts +71 -0
  341. package/dist/serve/discovery.d.ts.map +1 -0
  342. package/dist/serve/discovery.js +158 -0
  343. package/dist/serve/discovery.js.map +1 -0
  344. package/dist/serve/docs-ui/_astro/_slug_.CQYSemvw.css +1 -0
  345. package/dist/serve/docs-ui/docs/_rhythm/index.html +99 -0
  346. package/dist/serve/docs-ui/docs/_rhythm.md +101 -0
  347. package/dist/serve/docs-ui/docs/api-reference/index.html +64 -0
  348. package/dist/serve/docs-ui/docs/api-reference.md +67 -0
  349. package/dist/serve/docs-ui/docs/audit-your-rules/index.html +34 -0
  350. package/dist/serve/docs-ui/docs/audit-your-rules.md +50 -0
  351. package/dist/serve/docs-ui/docs/create-pyric-reference-api/index.html +498 -0
  352. package/dist/serve/docs-ui/docs/create-pyric-reference-api.md +345 -0
  353. package/dist/serve/docs-ui/docs/firestore-rules-limits/index.html +59 -0
  354. package/dist/serve/docs-ui/docs/firestore-rules-limits.md +54 -0
  355. package/dist/serve/docs-ui/docs/how-the-swap-works/index.html +47 -0
  356. package/dist/serve/docs-ui/docs/how-the-swap-works.md +43 -0
  357. package/dist/serve/docs-ui/docs/how-we-know-it-matches-firebase/index.html +131 -0
  358. package/dist/serve/docs-ui/docs/how-we-know-it-matches-firebase.md +169 -0
  359. package/dist/serve/docs-ui/docs/index.html +2 -0
  360. package/dist/serve/docs-ui/docs/index.json +18637 -0
  361. package/dist/serve/docs-ui/docs/overview/index.html +23 -0
  362. package/dist/serve/docs-ui/docs/overview.md +40 -0
  363. package/dist/serve/docs-ui/docs/pyric-admin-app/index.html +19 -0
  364. package/dist/serve/docs-ui/docs/pyric-admin-app-reference-api/index.html +185 -0
  365. package/dist/serve/docs-ui/docs/pyric-admin-app-reference-api.md +206 -0
  366. package/dist/serve/docs-ui/docs/pyric-admin-app.md +27 -0
  367. package/dist/serve/docs-ui/docs/pyric-admin-auth/index.html +24 -0
  368. package/dist/serve/docs-ui/docs/pyric-admin-auth-reference-api/index.html +617 -0
  369. package/dist/serve/docs-ui/docs/pyric-admin-auth-reference-api.md +441 -0
  370. package/dist/serve/docs-ui/docs/pyric-admin-auth.md +29 -0
  371. package/dist/serve/docs-ui/docs/pyric-admin-database/index.html +26 -0
  372. package/dist/serve/docs-ui/docs/pyric-admin-database-reference-api/index.html +583 -0
  373. package/dist/serve/docs-ui/docs/pyric-admin-database-reference-api.md +597 -0
  374. package/dist/serve/docs-ui/docs/pyric-admin-database.md +31 -0
  375. package/dist/serve/docs-ui/docs/pyric-admin-firestore/index.html +38 -0
  376. package/dist/serve/docs-ui/docs/pyric-admin-firestore-explanation-error-translation/index.html +57 -0
  377. package/dist/serve/docs-ui/docs/pyric-admin-firestore-explanation-error-translation.md +95 -0
  378. package/dist/serve/docs-ui/docs/pyric-admin-firestore-explanation-per-call-delegate/index.html +58 -0
  379. package/dist/serve/docs-ui/docs/pyric-admin-firestore-explanation-per-call-delegate.md +94 -0
  380. package/dist/serve/docs-ui/docs/pyric-admin-firestore-explanation-why-mirror-admin-shape/index.html +59 -0
  381. package/dist/serve/docs-ui/docs/pyric-admin-firestore-explanation-why-mirror-admin-shape.md +88 -0
  382. package/dist/serve/docs-ui/docs/pyric-admin-firestore-how-to-run-a-transaction/index.html +53 -0
  383. package/dist/serve/docs-ui/docs/pyric-admin-firestore-how-to-run-a-transaction.md +76 -0
  384. package/dist/serve/docs-ui/docs/pyric-admin-firestore-how-to-seed-and-set-rules/index.html +62 -0
  385. package/dist/serve/docs-ui/docs/pyric-admin-firestore-how-to-seed-and-set-rules.md +96 -0
  386. package/dist/serve/docs-ui/docs/pyric-admin-firestore-how-to-translate-denials/index.html +80 -0
  387. package/dist/serve/docs-ui/docs/pyric-admin-firestore-how-to-translate-denials.md +98 -0
  388. package/dist/serve/docs-ui/docs/pyric-admin-firestore-how-to-use-onsnapshot/index.html +57 -0
  389. package/dist/serve/docs-ui/docs/pyric-admin-firestore-how-to-use-onsnapshot.md +88 -0
  390. package/dist/serve/docs-ui/docs/pyric-admin-firestore-how-to-write-a-batch/index.html +50 -0
  391. package/dist/serve/docs-ui/docs/pyric-admin-firestore-how-to-write-a-batch.md +73 -0
  392. package/dist/serve/docs-ui/docs/pyric-admin-firestore-reference-api/index.html +32 -0
  393. package/dist/serve/docs-ui/docs/pyric-admin-firestore-reference-api.md +30 -0
  394. package/dist/serve/docs-ui/docs/pyric-admin-firestore-reference-onsnapshot/index.html +68 -0
  395. package/dist/serve/docs-ui/docs/pyric-admin-firestore-reference-onsnapshot.md +81 -0
  396. package/dist/serve/docs-ui/docs/pyric-admin-firestore-reference-re-exported-types/index.html +76 -0
  397. package/dist/serve/docs-ui/docs/pyric-admin-firestore-reference-re-exported-types.md +103 -0
  398. package/dist/serve/docs-ui/docs/pyric-admin-firestore-reference-sandbox-firestore/index.html +40 -0
  399. package/dist/serve/docs-ui/docs/pyric-admin-firestore-reference-sandbox-firestore.md +77 -0
  400. package/dist/serve/docs-ui/docs/pyric-admin-firestore-tutorials-01-first-admin-session/index.html +118 -0
  401. package/dist/serve/docs-ui/docs/pyric-admin-firestore-tutorials-01-first-admin-session.md +166 -0
  402. package/dist/serve/docs-ui/docs/pyric-admin-firestore.md +53 -0
  403. package/dist/serve/docs-ui/docs/pyric-admin-storage/index.html +25 -0
  404. package/dist/serve/docs-ui/docs/pyric-admin-storage-reference-api/index.html +317 -0
  405. package/dist/serve/docs-ui/docs/pyric-admin-storage-reference-api.md +285 -0
  406. package/dist/serve/docs-ui/docs/pyric-admin-storage.md +30 -0
  407. package/dist/serve/docs-ui/docs/pyric-ai-compat/index.html +436 -0
  408. package/dist/serve/docs-ui/docs/pyric-ai-compat.md +471 -0
  409. package/dist/serve/docs-ui/docs/pyric-ai-reference-api/index.html +5831 -0
  410. package/dist/serve/docs-ui/docs/pyric-ai-reference-api.md +5440 -0
  411. package/dist/serve/docs-ui/docs/pyric-ai-scripting-reference-api/index.html +159 -0
  412. package/dist/serve/docs-ui/docs/pyric-ai-scripting-reference-api.md +122 -0
  413. package/dist/serve/docs-ui/docs/pyric-app-compat/index.html +180 -0
  414. package/dist/serve/docs-ui/docs/pyric-app-compat.md +199 -0
  415. package/dist/serve/docs-ui/docs/pyric-app-reference-api/index.html +420 -0
  416. package/dist/serve/docs-ui/docs/pyric-app-reference-api.md +326 -0
  417. package/dist/serve/docs-ui/docs/pyric-auth/index.html +59 -0
  418. package/dist/serve/docs-ui/docs/pyric-auth-compat/index.html +804 -0
  419. package/dist/serve/docs-ui/docs/pyric-auth-compat.md +847 -0
  420. package/dist/serve/docs-ui/docs/pyric-auth-reference-api/index.html +5452 -0
  421. package/dist/serve/docs-ui/docs/pyric-auth-reference-api.md +5271 -0
  422. package/dist/serve/docs-ui/docs/pyric-auth-reference-feature-matrix/index.html +781 -0
  423. package/dist/serve/docs-ui/docs/pyric-auth-reference-feature-matrix.md +198 -0
  424. package/dist/serve/docs-ui/docs/pyric-auth-reference-sandbox-test-driver/index.html +71 -0
  425. package/dist/serve/docs-ui/docs/pyric-auth-reference-sandbox-test-driver.md +108 -0
  426. package/dist/serve/docs-ui/docs/pyric-auth.md +86 -0
  427. package/dist/serve/docs-ui/docs/pyric-cli/index.html +40 -0
  428. package/dist/serve/docs-ui/docs/pyric-cli-assurance-browser-reference-api/index.html +98 -0
  429. package/dist/serve/docs-ui/docs/pyric-cli-assurance-browser-reference-api.md +88 -0
  430. package/dist/serve/docs-ui/docs/pyric-cli-assurance-reference-api/index.html +2355 -0
  431. package/dist/serve/docs-ui/docs/pyric-cli-assurance-reference-api.md +1554 -0
  432. package/dist/serve/docs-ui/docs/pyric-cli-bridge/index.html +69 -0
  433. package/dist/serve/docs-ui/docs/pyric-cli-bridge-client-reference-api/index.html +546 -0
  434. package/dist/serve/docs-ui/docs/pyric-cli-bridge-client-reference-api.md +485 -0
  435. package/dist/serve/docs-ui/docs/pyric-cli-bridge-reference-api/index.html +506 -0
  436. package/dist/serve/docs-ui/docs/pyric-cli-bridge-reference-api.md +419 -0
  437. package/dist/serve/docs-ui/docs/pyric-cli-bridge.md +99 -0
  438. package/dist/serve/docs-ui/docs/pyric-cli-credentials-node-reference-api/index.html +67 -0
  439. package/dist/serve/docs-ui/docs/pyric-cli-credentials-node-reference-api.md +59 -0
  440. package/dist/serve/docs-ui/docs/pyric-cli-discover-reference-api/index.html +2355 -0
  441. package/dist/serve/docs-ui/docs/pyric-cli-discover-reference-api.md +2036 -0
  442. package/dist/serve/docs-ui/docs/pyric-cli-functions-rtdb-compat/index.html +112 -0
  443. package/dist/serve/docs-ui/docs/pyric-cli-functions-rtdb-compat.md +124 -0
  444. package/dist/serve/docs-ui/docs/pyric-cli-how-to-build-a-standalone-binary/index.html +91 -0
  445. package/dist/serve/docs-ui/docs/pyric-cli-how-to-build-a-standalone-binary.md +105 -0
  446. package/dist/serve/docs-ui/docs/pyric-cli-how-to-promote-sandbox-state-to-a-fixture/index.html +52 -0
  447. package/dist/serve/docs-ui/docs/pyric-cli-how-to-promote-sandbox-state-to-a-fixture.md +98 -0
  448. package/dist/serve/docs-ui/docs/pyric-cli-how-to-run-rtdb-onvaluecreated/index.html +66 -0
  449. package/dist/serve/docs-ui/docs/pyric-cli-how-to-run-rtdb-onvaluecreated.md +100 -0
  450. package/dist/serve/docs-ui/docs/pyric-cli-how-to-serve-persistence-and-multi-tab/index.html +228 -0
  451. package/dist/serve/docs-ui/docs/pyric-cli-how-to-serve-persistence-and-multi-tab.md +179 -0
  452. package/dist/serve/docs-ui/docs/pyric-cli-how-to-use-the-vite-plugin/index.html +341 -0
  453. package/dist/serve/docs-ui/docs/pyric-cli-how-to-use-the-vite-plugin.md +309 -0
  454. package/dist/serve/docs-ui/docs/pyric-cli-how-to-verify-against-a-captured-session/index.html +128 -0
  455. package/dist/serve/docs-ui/docs/pyric-cli-how-to-verify-against-a-captured-session.md +207 -0
  456. package/dist/serve/docs-ui/docs/pyric-cli-reference-cli/index.html +404 -0
  457. package/dist/serve/docs-ui/docs/pyric-cli-reference-cli.md +249 -0
  458. package/dist/serve/docs-ui/docs/pyric-cli-reference-package-and-resolution/index.html +93 -0
  459. package/dist/serve/docs-ui/docs/pyric-cli-reference-package-and-resolution.md +65 -0
  460. package/dist/serve/docs-ui/docs/pyric-cli-reference-verify/index.html +81 -0
  461. package/dist/serve/docs-ui/docs/pyric-cli-reference-verify.md +110 -0
  462. package/dist/serve/docs-ui/docs/pyric-cli-register-reference-api/index.html +10 -0
  463. package/dist/serve/docs-ui/docs/pyric-cli-register-reference-api.md +16 -0
  464. package/dist/serve/docs-ui/docs/pyric-cli-remote-reference-api/index.html +1044 -0
  465. package/dist/serve/docs-ui/docs/pyric-cli-remote-reference-api.md +952 -0
  466. package/dist/serve/docs-ui/docs/pyric-cli-serve-worker-reference-api/index.html +5041 -0
  467. package/dist/serve/docs-ui/docs/pyric-cli-serve-worker-reference-api.md +4739 -0
  468. package/dist/serve/docs-ui/docs/pyric-cli-tutorials-server-adoption/index.html +219 -0
  469. package/dist/serve/docs-ui/docs/pyric-cli-tutorials-server-adoption.md +251 -0
  470. package/dist/serve/docs-ui/docs/pyric-cli-tutorials-wire-claude-code/index.html +136 -0
  471. package/dist/serve/docs-ui/docs/pyric-cli-tutorials-wire-claude-code.md +217 -0
  472. package/dist/serve/docs-ui/docs/pyric-cli-verify-reference-api/index.html +926 -0
  473. package/dist/serve/docs-ui/docs/pyric-cli-verify-reference-api.md +586 -0
  474. package/dist/serve/docs-ui/docs/pyric-cli-vite-reference-api/index.html +102 -0
  475. package/dist/serve/docs-ui/docs/pyric-cli-vite-reference-api.md +76 -0
  476. package/dist/serve/docs-ui/docs/pyric-cli.md +42 -0
  477. package/dist/serve/docs-ui/docs/pyric-conformance-scores/index.html +180 -0
  478. package/dist/serve/docs-ui/docs/pyric-conformance-scores.md +184 -0
  479. package/dist/serve/docs-ui/docs/pyric-database/index.html +43 -0
  480. package/dist/serve/docs-ui/docs/pyric-database-compat/index.html +1224 -0
  481. package/dist/serve/docs-ui/docs/pyric-database-compat.md +1289 -0
  482. package/dist/serve/docs-ui/docs/pyric-database-explanation-rules-authoring-and-deploy-are-separate/index.html +16 -0
  483. package/dist/serve/docs-ui/docs/pyric-database-explanation-rules-authoring-and-deploy-are-separate.md +23 -0
  484. package/dist/serve/docs-ui/docs/pyric-database-reference-api/index.html +1851 -0
  485. package/dist/serve/docs-ui/docs/pyric-database-reference-api.md +1842 -0
  486. package/dist/serve/docs-ui/docs/pyric-database-reference-constraints/index.html +381 -0
  487. package/dist/serve/docs-ui/docs/pyric-database-reference-constraints.md +168 -0
  488. package/dist/serve/docs-ui/docs/pyric-database-reference-rules-tooling/index.html +218 -0
  489. package/dist/serve/docs-ui/docs/pyric-database-reference-rules-tooling.md +303 -0
  490. package/dist/serve/docs-ui/docs/pyric-database-tutorials-01-author-rtdb-rules-with-constraints/index.html +125 -0
  491. package/dist/serve/docs-ui/docs/pyric-database-tutorials-01-author-rtdb-rules-with-constraints.md +171 -0
  492. package/dist/serve/docs-ui/docs/pyric-database.md +26 -0
  493. package/dist/serve/docs-ui/docs/pyric-explanation-versioning-and-compatibility/index.html +40 -0
  494. package/dist/serve/docs-ui/docs/pyric-explanation-versioning-and-compatibility.md +68 -0
  495. package/dist/serve/docs-ui/docs/pyric-firestore/index.html +48 -0
  496. package/dist/serve/docs-ui/docs/pyric-firestore-compat/index.html +868 -0
  497. package/dist/serve/docs-ui/docs/pyric-firestore-compat.md +939 -0
  498. package/dist/serve/docs-ui/docs/pyric-firestore-explanation-rules-tooling-is-separate/index.html +92 -0
  499. package/dist/serve/docs-ui/docs/pyric-firestore-explanation-rules-tooling-is-separate.md +70 -0
  500. package/dist/serve/docs-ui/docs/pyric-firestore-explanation-target-symbol-opacity/index.html +59 -0
  501. package/dist/serve/docs-ui/docs/pyric-firestore-explanation-target-symbol-opacity.md +91 -0
  502. package/dist/serve/docs-ui/docs/pyric-firestore-explanation-two-backends-one-surface/index.html +43 -0
  503. package/dist/serve/docs-ui/docs/pyric-firestore-explanation-two-backends-one-surface.md +58 -0
  504. package/dist/serve/docs-ui/docs/pyric-firestore-how-to-migrate-from-firebase-firestore/index.html +58 -0
  505. package/dist/serve/docs-ui/docs/pyric-firestore-how-to-migrate-from-firebase-firestore.md +86 -0
  506. package/dist/serve/docs-ui/docs/pyric-firestore-how-to-pick-a-backend/index.html +52 -0
  507. package/dist/serve/docs-ui/docs/pyric-firestore-how-to-pick-a-backend.md +83 -0
  508. package/dist/serve/docs-ui/docs/pyric-firestore-how-to-run-a-transaction/index.html +42 -0
  509. package/dist/serve/docs-ui/docs/pyric-firestore-how-to-run-a-transaction.md +59 -0
  510. package/dist/serve/docs-ui/docs/pyric-firestore-how-to-use-onsnapshot/index.html +66 -0
  511. package/dist/serve/docs-ui/docs/pyric-firestore-how-to-use-onsnapshot.md +96 -0
  512. package/dist/serve/docs-ui/docs/pyric-firestore-how-to-use-sandbox-ops/index.html +61 -0
  513. package/dist/serve/docs-ui/docs/pyric-firestore-how-to-use-sandbox-ops.md +92 -0
  514. package/dist/serve/docs-ui/docs/pyric-firestore-reference-api/index.html +3623 -0
  515. package/dist/serve/docs-ui/docs/pyric-firestore-reference-api.md +3399 -0
  516. package/dist/serve/docs-ui/docs/pyric-firestore-reference-feature-matrix/index.html +80 -0
  517. package/dist/serve/docs-ui/docs/pyric-firestore-reference-feature-matrix.md +66 -0
  518. package/dist/serve/docs-ui/docs/pyric-firestore-reference-getfirestore/index.html +46 -0
  519. package/dist/serve/docs-ui/docs/pyric-firestore-reference-getfirestore.md +73 -0
  520. package/dist/serve/docs-ui/docs/pyric-firestore-reference-query-constraints/index.html +80 -0
  521. package/dist/serve/docs-ui/docs/pyric-firestore-reference-query-constraints.md +129 -0
  522. package/dist/serve/docs-ui/docs/pyric-firestore-reference-sandbox-ops/index.html +58 -0
  523. package/dist/serve/docs-ui/docs/pyric-firestore-reference-sandbox-ops.md +88 -0
  524. package/dist/serve/docs-ui/docs/pyric-firestore-reference-tool-factories/index.html +51 -0
  525. package/dist/serve/docs-ui/docs/pyric-firestore-reference-tool-factories.md +71 -0
  526. package/dist/serve/docs-ui/docs/pyric-firestore-tutorials-01-write-a-sandbox-demo/index.html +130 -0
  527. package/dist/serve/docs-ui/docs/pyric-firestore-tutorials-01-write-a-sandbox-demo.md +180 -0
  528. package/dist/serve/docs-ui/docs/pyric-firestore-tutorials-02-swap-to-prod-backend/index.html +59 -0
  529. package/dist/serve/docs-ui/docs/pyric-firestore-tutorials-02-swap-to-prod-backend.md +92 -0
  530. package/dist/serve/docs-ui/docs/pyric-firestore-values-reference-api/index.html +30 -0
  531. package/dist/serve/docs-ui/docs/pyric-firestore-values-reference-api.md +30 -0
  532. package/dist/serve/docs-ui/docs/pyric-firestore.md +72 -0
  533. package/dist/serve/docs-ui/docs/pyric-messaging-compat/index.html +300 -0
  534. package/dist/serve/docs-ui/docs/pyric-messaging-compat.md +321 -0
  535. package/dist/serve/docs-ui/docs/pyric-messaging-reference-api/index.html +508 -0
  536. package/dist/serve/docs-ui/docs/pyric-messaging-reference-api.md +374 -0
  537. package/dist/serve/docs-ui/docs/pyric-messaging-sw-reference-api/index.html +482 -0
  538. package/dist/serve/docs-ui/docs/pyric-messaging-sw-reference-api.md +348 -0
  539. package/dist/serve/docs-ui/docs/pyric-rules/index.html +87 -0
  540. package/dist/serve/docs-ui/docs/pyric-rules-compat/index.html +328 -0
  541. package/dist/serve/docs-ui/docs/pyric-rules-compat.md +347 -0
  542. package/dist/serve/docs-ui/docs/pyric-rules-explanation-agent-failure-modes/index.html +50 -0
  543. package/dist/serve/docs-ui/docs/pyric-rules-explanation-agent-failure-modes.md +78 -0
  544. package/dist/serve/docs-ui/docs/pyric-rules-explanation-lint-vs-validate-vs-simulate-vs-test/index.html +79 -0
  545. package/dist/serve/docs-ui/docs/pyric-rules-explanation-lint-vs-validate-vs-simulate-vs-test.md +69 -0
  546. package/dist/serve/docs-ui/docs/pyric-rules-explanation-runtime-budget-and-shared-gates/index.html +67 -0
  547. package/dist/serve/docs-ui/docs/pyric-rules-explanation-runtime-budget-and-shared-gates.md +75 -0
  548. package/dist/serve/docs-ui/docs/pyric-rules-explanation-sentinel-expression-engine/index.html +49 -0
  549. package/dist/serve/docs-ui/docs/pyric-rules-explanation-sentinel-expression-engine.md +74 -0
  550. package/dist/serve/docs-ui/docs/pyric-rules-explanation-simulator-vs-rules-test-api/index.html +95 -0
  551. package/dist/serve/docs-ui/docs/pyric-rules-explanation-simulator-vs-rules-test-api.md +80 -0
  552. package/dist/serve/docs-ui/docs/pyric-rules-explanation-the-2-plus-modules-extension/index.html +58 -0
  553. package/dist/serve/docs-ui/docs/pyric-rules-explanation-the-2-plus-modules-extension.md +79 -0
  554. package/dist/serve/docs-ui/docs/pyric-rules-explanation-value-wrappers-design/index.html +63 -0
  555. package/dist/serve/docs-ui/docs/pyric-rules-explanation-value-wrappers-design.md +84 -0
  556. package/dist/serve/docs-ui/docs/pyric-rules-explanation-why-this-package-exists/index.html +34 -0
  557. package/dist/serve/docs-ui/docs/pyric-rules-explanation-why-this-package-exists.md +43 -0
  558. package/dist/serve/docs-ui/docs/pyric-rules-how-to-compare-rulesets-for-weakening/index.html +55 -0
  559. package/dist/serve/docs-ui/docs/pyric-rules-how-to-compare-rulesets-for-weakening.md +77 -0
  560. package/dist/serve/docs-ui/docs/pyric-rules-how-to-inspect-rules-via-the-ast/index.html +90 -0
  561. package/dist/serve/docs-ui/docs/pyric-rules-how-to-inspect-rules-via-the-ast.md +129 -0
  562. package/dist/serve/docs-ui/docs/pyric-rules-how-to-lint-rules-source/index.html +55 -0
  563. package/dist/serve/docs-ui/docs/pyric-rules-how-to-lint-rules-source.md +84 -0
  564. package/dist/serve/docs-ui/docs/pyric-rules-how-to-pin-request-time/index.html +49 -0
  565. package/dist/serve/docs-ui/docs/pyric-rules-how-to-pin-request-time.md +64 -0
  566. package/dist/serve/docs-ui/docs/pyric-rules-how-to-register-tools-with-an-agent/index.html +61 -0
  567. package/dist/serve/docs-ui/docs/pyric-rules-how-to-register-tools-with-an-agent.md +87 -0
  568. package/dist/serve/docs-ui/docs/pyric-rules-how-to-resolve-module-imports/index.html +93 -0
  569. package/dist/serve/docs-ui/docs/pyric-rules-how-to-resolve-module-imports.md +105 -0
  570. package/dist/serve/docs-ui/docs/pyric-rules-how-to-simulate-rules-locally/index.html +89 -0
  571. package/dist/serve/docs-ui/docs/pyric-rules-how-to-simulate-rules-locally.md +134 -0
  572. package/dist/serve/docs-ui/docs/pyric-rules-how-to-test-rules-against-firebase/index.html +66 -0
  573. package/dist/serve/docs-ui/docs/pyric-rules-how-to-test-rules-against-firebase.md +102 -0
  574. package/dist/serve/docs-ui/docs/pyric-rules-reference-api/index.html +2629 -0
  575. package/dist/serve/docs-ui/docs/pyric-rules-reference-api.md +2213 -0
  576. package/dist/serve/docs-ui/docs/pyric-rules-reference-ast/index.html +85 -0
  577. package/dist/serve/docs-ui/docs/pyric-rules-reference-ast.md +121 -0
  578. package/dist/serve/docs-ui/docs/pyric-rules-reference-conformance-gaps/index.html +277 -0
  579. package/dist/serve/docs-ui/docs/pyric-rules-reference-conformance-gaps.md +360 -0
  580. package/dist/serve/docs-ui/docs/pyric-rules-reference-errors/index.html +76 -0
  581. package/dist/serve/docs-ui/docs/pyric-rules-reference-errors.md +123 -0
  582. package/dist/serve/docs-ui/docs/pyric-rules-reference-lint-rules/index.html +148 -0
  583. package/dist/serve/docs-ui/docs/pyric-rules-reference-lint-rules.md +159 -0
  584. package/dist/serve/docs-ui/docs/pyric-rules-reference-simulator-context/index.html +66 -0
  585. package/dist/serve/docs-ui/docs/pyric-rules-reference-simulator-context.md +104 -0
  586. package/dist/serve/docs-ui/docs/pyric-rules-reference-stdlib-modules/index.html +241 -0
  587. package/dist/serve/docs-ui/docs/pyric-rules-reference-stdlib-modules.md +143 -0
  588. package/dist/serve/docs-ui/docs/pyric-rules-reference-test-case-schema/index.html +94 -0
  589. package/dist/serve/docs-ui/docs/pyric-rules-reference-test-case-schema.md +121 -0
  590. package/dist/serve/docs-ui/docs/pyric-rules-reference-validator-findings/index.html +87 -0
  591. package/dist/serve/docs-ui/docs/pyric-rules-reference-validator-findings.md +117 -0
  592. package/dist/serve/docs-ui/docs/pyric-rules-reference-value-wrappers/index.html +102 -0
  593. package/dist/serve/docs-ui/docs/pyric-rules-reference-value-wrappers.md +152 -0
  594. package/dist/serve/docs-ui/docs/pyric-rules.md +93 -0
  595. package/dist/serve/docs-ui/docs/pyric-sandbox/index.html +67 -0
  596. package/dist/serve/docs-ui/docs/pyric-sandbox-database-reference-api/index.html +120 -0
  597. package/dist/serve/docs-ui/docs/pyric-sandbox-database-reference-api.md +110 -0
  598. package/dist/serve/docs-ui/docs/pyric-sandbox-explanation-every-op-is-a-request/index.html +141 -0
  599. package/dist/serve/docs-ui/docs/pyric-sandbox-explanation-every-op-is-a-request.md +161 -0
  600. package/dist/serve/docs-ui/docs/pyric-sandbox-explanation-identity-is-a-context/index.html +66 -0
  601. package/dist/serve/docs-ui/docs/pyric-sandbox-explanation-identity-is-a-context.md +110 -0
  602. package/dist/serve/docs-ui/docs/pyric-sandbox-explanation-internal-adapter-protocol/index.html +71 -0
  603. package/dist/serve/docs-ui/docs/pyric-sandbox-explanation-internal-adapter-protocol.md +111 -0
  604. package/dist/serve/docs-ui/docs/pyric-sandbox-explanation-listener-re-evaluation/index.html +56 -0
  605. package/dist/serve/docs-ui/docs/pyric-sandbox-explanation-listener-re-evaluation.md +82 -0
  606. package/dist/serve/docs-ui/docs/pyric-sandbox-explanation-local-backend-vs-firestore-offline/index.html +64 -0
  607. package/dist/serve/docs-ui/docs/pyric-sandbox-explanation-local-backend-vs-firestore-offline.md +56 -0
  608. package/dist/serve/docs-ui/docs/pyric-sandbox-explanation-why-adapters-are-siblings/index.html +92 -0
  609. package/dist/serve/docs-ui/docs/pyric-sandbox-explanation-why-adapters-are-siblings.md +90 -0
  610. package/dist/serve/docs-ui/docs/pyric-sandbox-explanation-why-this-package-exists/index.html +69 -0
  611. package/dist/serve/docs-ui/docs/pyric-sandbox-explanation-why-this-package-exists.md +57 -0
  612. package/dist/serve/docs-ui/docs/pyric-sandbox-firestore-reference-api/index.html +202 -0
  613. package/dist/serve/docs-ui/docs/pyric-sandbox-firestore-reference-api.md +134 -0
  614. package/dist/serve/docs-ui/docs/pyric-sandbox-how-to-multiple-isolated-sandboxes/index.html +63 -0
  615. package/dist/serve/docs-ui/docs/pyric-sandbox-how-to-multiple-isolated-sandboxes.md +89 -0
  616. package/dist/serve/docs-ui/docs/pyric-sandbox-how-to-observe-events/index.html +159 -0
  617. package/dist/serve/docs-ui/docs/pyric-sandbox-how-to-observe-events.md +168 -0
  618. package/dist/serve/docs-ui/docs/pyric-sandbox-how-to-pick-an-adapter/index.html +79 -0
  619. package/dist/serve/docs-ui/docs/pyric-sandbox-how-to-pick-an-adapter.md +75 -0
  620. package/dist/serve/docs-ui/docs/pyric-sandbox-how-to-replay-events/index.html +88 -0
  621. package/dist/serve/docs-ui/docs/pyric-sandbox-how-to-replay-events.md +92 -0
  622. package/dist/serve/docs-ui/docs/pyric-sandbox-how-to-reset-between-tests/index.html +68 -0
  623. package/dist/serve/docs-ui/docs/pyric-sandbox-how-to-reset-between-tests.md +92 -0
  624. package/dist/serve/docs-ui/docs/pyric-sandbox-how-to-seed-data-and-rules/index.html +91 -0
  625. package/dist/serve/docs-ui/docs/pyric-sandbox-how-to-seed-data-and-rules.md +122 -0
  626. package/dist/serve/docs-ui/docs/pyric-sandbox-how-to-switch-users/index.html +50 -0
  627. package/dist/serve/docs-ui/docs/pyric-sandbox-how-to-switch-users.md +78 -0
  628. package/dist/serve/docs-ui/docs/pyric-sandbox-how-to-use-admin-reads/index.html +54 -0
  629. package/dist/serve/docs-ui/docs/pyric-sandbox-how-to-use-admin-reads.md +85 -0
  630. package/dist/serve/docs-ui/docs/pyric-sandbox-reference-api/index.html +5019 -0
  631. package/dist/serve/docs-ui/docs/pyric-sandbox-reference-api.md +4060 -0
  632. package/dist/serve/docs-ui/docs/pyric-sandbox-reference-divergences/index.html +125 -0
  633. package/dist/serve/docs-ui/docs/pyric-sandbox-reference-divergences.md +151 -0
  634. package/dist/serve/docs-ui/docs/pyric-sandbox-reference-error-codes/index.html +110 -0
  635. package/dist/serve/docs-ui/docs/pyric-sandbox-reference-error-codes.md +118 -0
  636. package/dist/serve/docs-ui/docs/pyric-sandbox-reference-internal-protocol/index.html +72 -0
  637. package/dist/serve/docs-ui/docs/pyric-sandbox-reference-internal-protocol.md +109 -0
  638. package/dist/serve/docs-ui/docs/pyric-sandbox-reference-sandbox-and-context/index.html +90 -0
  639. package/dist/serve/docs-ui/docs/pyric-sandbox-reference-sandbox-and-context.md +140 -0
  640. package/dist/serve/docs-ui/docs/pyric-sandbox-reference-sandbox-event/index.html +146 -0
  641. package/dist/serve/docs-ui/docs/pyric-sandbox-reference-sandbox-event.md +204 -0
  642. package/dist/serve/docs-ui/docs/pyric-sandbox-reference-snapshot-and-admin/index.html +53 -0
  643. package/dist/serve/docs-ui/docs/pyric-sandbox-reference-snapshot-and-admin.md +89 -0
  644. package/dist/serve/docs-ui/docs/pyric-sandbox-tutorials-01-your-first-sandbox-session/index.html +115 -0
  645. package/dist/serve/docs-ui/docs/pyric-sandbox-tutorials-01-your-first-sandbox-session.md +176 -0
  646. package/dist/serve/docs-ui/docs/pyric-sandbox.md +69 -0
  647. package/dist/serve/docs-ui/docs/pyric-storage/index.html +65 -0
  648. package/dist/serve/docs-ui/docs/pyric-storage-compat/index.html +676 -0
  649. package/dist/serve/docs-ui/docs/pyric-storage-compat.md +699 -0
  650. package/dist/serve/docs-ui/docs/pyric-storage-explanation-implementation-scope/index.html +52 -0
  651. package/dist/serve/docs-ui/docs/pyric-storage-explanation-implementation-scope.md +85 -0
  652. package/dist/serve/docs-ui/docs/pyric-storage-explanation-session-archive-use-case/index.html +58 -0
  653. package/dist/serve/docs-ui/docs/pyric-storage-explanation-session-archive-use-case.md +82 -0
  654. package/dist/serve/docs-ui/docs/pyric-storage-explanation-why-indexeddb/index.html +50 -0
  655. package/dist/serve/docs-ui/docs/pyric-storage-explanation-why-indexeddb.md +82 -0
  656. package/dist/serve/docs-ui/docs/pyric-storage-how-to-enforce-rules/index.html +120 -0
  657. package/dist/serve/docs-ui/docs/pyric-storage-how-to-enforce-rules.md +127 -0
  658. package/dist/serve/docs-ui/docs/pyric-storage-how-to-list-and-delete/index.html +53 -0
  659. package/dist/serve/docs-ui/docs/pyric-storage-how-to-list-and-delete.md +86 -0
  660. package/dist/serve/docs-ui/docs/pyric-storage-how-to-switch-backends/index.html +43 -0
  661. package/dist/serve/docs-ui/docs/pyric-storage-how-to-switch-backends.md +65 -0
  662. package/dist/serve/docs-ui/docs/pyric-storage-how-to-test-rule-expressions/index.html +70 -0
  663. package/dist/serve/docs-ui/docs/pyric-storage-how-to-test-rule-expressions.md +88 -0
  664. package/dist/serve/docs-ui/docs/pyric-storage-reference-api/index.html +2120 -0
  665. package/dist/serve/docs-ui/docs/pyric-storage-reference-api.md +1687 -0
  666. package/dist/serve/docs-ui/docs/pyric-storage-reference-conformance-gaps/index.html +137 -0
  667. package/dist/serve/docs-ui/docs/pyric-storage-reference-conformance-gaps.md +171 -0
  668. package/dist/serve/docs-ui/docs/pyric-storage-reference-error-codes/index.html +37 -0
  669. package/dist/serve/docs-ui/docs/pyric-storage-reference-error-codes.md +57 -0
  670. package/dist/serve/docs-ui/docs/pyric-storage-reference-rules-subset/index.html +96 -0
  671. package/dist/serve/docs-ui/docs/pyric-storage-reference-rules-subset.md +134 -0
  672. package/dist/serve/docs-ui/docs/pyric-storage-reference-storage-options/index.html +39 -0
  673. package/dist/serve/docs-ui/docs/pyric-storage-reference-storage-options.md +61 -0
  674. package/dist/serve/docs-ui/docs/pyric-storage.md +67 -0
  675. package/dist/serve/docs-ui/docs/pyric-ui-agents-reference-api/index.html +638 -0
  676. package/dist/serve/docs-ui/docs/pyric-ui-agents-reference-api.md +430 -0
  677. package/dist/serve/docs-ui/docs/pyric-ui-auth-hooks-reference-api/index.html +813 -0
  678. package/dist/serve/docs-ui/docs/pyric-ui-auth-hooks-reference-api.md +634 -0
  679. package/dist/serve/docs-ui/docs/pyric-ui-auth-reference-api/index.html +1708 -0
  680. package/dist/serve/docs-ui/docs/pyric-ui-auth-reference-api.md +1300 -0
  681. package/dist/serve/docs-ui/docs/pyric-ui-events-hooks-reference-api/index.html +177 -0
  682. package/dist/serve/docs-ui/docs/pyric-ui-events-hooks-reference-api.md +111 -0
  683. package/dist/serve/docs-ui/docs/pyric-ui-events-reference-api/index.html +1542 -0
  684. package/dist/serve/docs-ui/docs/pyric-ui-events-reference-api.md +903 -0
  685. package/dist/serve/docs-ui/docs/pyric-ui-firestore-hooks-reference-api/index.html +1024 -0
  686. package/dist/serve/docs-ui/docs/pyric-ui-firestore-hooks-reference-api.md +640 -0
  687. package/dist/serve/docs-ui/docs/pyric-ui-firestore-reference-api/index.html +2753 -0
  688. package/dist/serve/docs-ui/docs/pyric-ui-firestore-reference-api.md +2171 -0
  689. package/dist/serve/docs-ui/docs/pyric-ui-primitives-reference-api/index.html +1005 -0
  690. package/dist/serve/docs-ui/docs/pyric-ui-primitives-reference-api.md +693 -0
  691. package/dist/serve/docs-ui/docs/pyric-ui-rtdb-reference-api/index.html +1388 -0
  692. package/dist/serve/docs-ui/docs/pyric-ui-rtdb-reference-api.md +1340 -0
  693. package/dist/serve/docs-ui/docs/pyric-ui-rules-hooks-reference-api/index.html +131 -0
  694. package/dist/serve/docs-ui/docs/pyric-ui-rules-hooks-reference-api.md +76 -0
  695. package/dist/serve/docs-ui/docs/pyric-ui-rules-reference-api/index.html +648 -0
  696. package/dist/serve/docs-ui/docs/pyric-ui-rules-reference-api.md +508 -0
  697. package/dist/serve/docs-ui/docs/pyric-ui-storage-hooks-reference-api/index.html +1457 -0
  698. package/dist/serve/docs-ui/docs/pyric-ui-storage-hooks-reference-api.md +1029 -0
  699. package/dist/serve/docs-ui/docs/pyric-ui-storage-reference-api/index.html +2476 -0
  700. package/dist/serve/docs-ui/docs/pyric-ui-storage-reference-api.md +1919 -0
  701. package/dist/serve/docs-ui/docs/pyric-ui-traffic-hooks-reference-api/index.html +1241 -0
  702. package/dist/serve/docs-ui/docs/pyric-ui-traffic-hooks-reference-api.md +817 -0
  703. package/dist/serve/docs-ui/docs/pyric-ui-traffic-reference-api/index.html +2289 -0
  704. package/dist/serve/docs-ui/docs/pyric-ui-traffic-reference-api.md +1489 -0
  705. package/dist/serve/docs-ui/docs/read-a-denial/index.html +40 -0
  706. package/dist/serve/docs-ui/docs/read-a-denial.md +62 -0
  707. package/dist/serve/docs-ui/docs/receive-messages/index.html +28 -0
  708. package/dist/serve/docs-ui/docs/receive-messages.md +43 -0
  709. package/dist/serve/docs-ui/docs/rtdb-rules-in-typescript/index.html +67 -0
  710. package/dist/serve/docs-ui/docs/rtdb-rules-in-typescript.md +101 -0
  711. package/dist/serve/docs-ui/docs/rules-patterns/index.html +68 -0
  712. package/dist/serve/docs-ui/docs/rules-patterns.md +104 -0
  713. package/dist/serve/docs-ui/docs/rules-standard-library/index.html +87 -0
  714. package/dist/serve/docs-ui/docs/rules-standard-library.md +93 -0
  715. package/dist/serve/docs-ui/docs/run-ai-logic-locally/index.html +27 -0
  716. package/dist/serve/docs-ui/docs/run-ai-logic-locally.md +43 -0
  717. package/dist/serve/docs-ui/docs/secure-it-with-rules/index.html +69 -0
  718. package/dist/serve/docs-ui/docs/secure-it-with-rules.md +101 -0
  719. package/dist/serve/docs-ui/docs/see-whats-happening/index.html +73 -0
  720. package/dist/serve/docs-ui/docs/see-whats-happening.md +77 -0
  721. package/dist/serve/docs-ui/docs/set-up-the-project/index.html +14 -0
  722. package/dist/serve/docs-ui/docs/set-up-the-project.md +19 -0
  723. package/dist/serve/docs-ui/docs/set-up-your-agent/index.html +42 -0
  724. package/dist/serve/docs-ui/docs/set-up-your-agent.md +86 -0
  725. package/dist/serve/docs-ui/docs/shape-your-data/index.html +44 -0
  726. package/dist/serve/docs-ui/docs/shape-your-data.md +88 -0
  727. package/dist/serve/docs-ui/docs/ship-to-production/index.html +36 -0
  728. package/dist/serve/docs-ui/docs/ship-to-production.md +80 -0
  729. package/dist/serve/docs-ui/docs/sign-in-and-manage-users/index.html +31 -0
  730. package/dist/serve/docs-ui/docs/sign-in-and-manage-users.md +50 -0
  731. package/dist/serve/docs-ui/docs/simulate-and-lint/index.html +95 -0
  732. package/dist/serve/docs-ui/docs/simulate-and-lint.md +99 -0
  733. package/dist/serve/docs-ui/docs/skills/index.html +20 -0
  734. package/dist/serve/docs-ui/docs/skills.md +34 -0
  735. package/dist/serve/docs-ui/docs/start-building/index.html +32 -0
  736. package/dist/serve/docs-ui/docs/start-building.md +64 -0
  737. package/dist/serve/docs-ui/docs/store-and-query-data/index.html +16 -0
  738. package/dist/serve/docs-ui/docs/store-and-query-data.md +33 -0
  739. package/dist/serve/docs-ui/docs/store-files/index.html +13 -0
  740. package/dist/serve/docs-ui/docs/store-files.md +25 -0
  741. package/dist/serve/docs-ui/docs/sync-realtime-data/index.html +15 -0
  742. package/dist/serve/docs-ui/docs/sync-realtime-data.md +27 -0
  743. package/dist/serve/docs-ui/docs/test-in-node/index.html +74 -0
  744. package/dist/serve/docs-ui/docs/test-in-node.md +100 -0
  745. package/dist/serve/docs-ui/docs/ui/index.html +76 -0
  746. package/dist/serve/docs-ui/docs/ui-auth-authsigninhelper/index.html +194 -0
  747. package/dist/serve/docs-ui/docs/ui-auth-authsigninhelper.md +114 -0
  748. package/dist/serve/docs-ui/docs/ui-auth-authusers/index.html +263 -0
  749. package/dist/serve/docs-ui/docs/ui-auth-authusers.md +183 -0
  750. package/dist/serve/docs-ui/docs/ui-firestore-collectionlist/index.html +92 -0
  751. package/dist/serve/docs-ui/docs/ui-firestore-collectionlist.md +79 -0
  752. package/dist/serve/docs-ui/docs/ui-firestore-deletewithconfirm/index.html +128 -0
  753. package/dist/serve/docs-ui/docs/ui-firestore-deletewithconfirm.md +104 -0
  754. package/dist/serve/docs-ui/docs/ui-firestore-documenteditor/index.html +154 -0
  755. package/dist/serve/docs-ui/docs/ui-firestore-documenteditor.md +117 -0
  756. package/dist/serve/docs-ui/docs/ui-firestore-documentlist/index.html +132 -0
  757. package/dist/serve/docs-ui/docs/ui-firestore-documentlist.md +92 -0
  758. package/dist/serve/docs-ui/docs/ui-firestore-documentpreview/index.html +159 -0
  759. package/dist/serve/docs-ui/docs/ui-firestore-documentpreview.md +84 -0
  760. package/dist/serve/docs-ui/docs/ui-firestore-querybuilder/index.html +104 -0
  761. package/dist/serve/docs-ui/docs/ui-firestore-querybuilder.md +103 -0
  762. package/dist/serve/docs-ui/docs/ui-firestore-referencepicker/index.html +113 -0
  763. package/dist/serve/docs-ui/docs/ui-firestore-referencepicker.md +93 -0
  764. package/dist/serve/docs-ui/docs/ui-primitives-badge/index.html +56 -0
  765. package/dist/serve/docs-ui/docs/ui-primitives-badge.md +40 -0
  766. package/dist/serve/docs-ui/docs/ui-primitives-confirmdialog/index.html +140 -0
  767. package/dist/serve/docs-ui/docs/ui-primitives-confirmdialog.md +108 -0
  768. package/dist/serve/docs-ui/docs/ui-primitives-copybutton/index.html +58 -0
  769. package/dist/serve/docs-ui/docs/ui-primitives-copybutton.md +37 -0
  770. package/dist/serve/docs-ui/docs/ui-primitives-jsonview/index.html +58 -0
  771. package/dist/serve/docs-ui/docs/ui-primitives-jsonview.md +47 -0
  772. package/dist/serve/docs-ui/docs/ui-primitives-segmentedcontrol/index.html +70 -0
  773. package/dist/serve/docs-ui/docs/ui-primitives-segmentedcontrol.md +50 -0
  774. package/dist/serve/docs-ui/docs/ui-primitives-toast/index.html +87 -0
  775. package/dist/serve/docs-ui/docs/ui-primitives-toast.md +82 -0
  776. package/dist/serve/docs-ui/docs/ui-primitives-virtuallist/index.html +85 -0
  777. package/dist/serve/docs-ui/docs/ui-primitives-virtuallist.md +54 -0
  778. package/dist/serve/docs-ui/docs/ui-storage/index.html +150 -0
  779. package/dist/serve/docs-ui/docs/ui-storage-deleteselectionwithconfirm/index.html +126 -0
  780. package/dist/serve/docs-ui/docs/ui-storage-deleteselectionwithconfirm.md +88 -0
  781. package/dist/serve/docs-ui/docs/ui-storage-objectbrowser/index.html +137 -0
  782. package/dist/serve/docs-ui/docs/ui-storage-objectbrowser.md +90 -0
  783. package/dist/serve/docs-ui/docs/ui-storage-objectinspector/index.html +139 -0
  784. package/dist/serve/docs-ui/docs/ui-storage-objectinspector.md +93 -0
  785. package/dist/serve/docs-ui/docs/ui-storage-pathbreadcrumb/index.html +72 -0
  786. package/dist/serve/docs-ui/docs/ui-storage-pathbreadcrumb.md +57 -0
  787. package/dist/serve/docs-ui/docs/ui-storage-rules-aware-affordances/index.html +60 -0
  788. package/dist/serve/docs-ui/docs/ui-storage-rules-aware-affordances.md +52 -0
  789. package/dist/serve/docs-ui/docs/ui-storage-uploaddropzone/index.html +93 -0
  790. package/dist/serve/docs-ui/docs/ui-storage-uploaddropzone.md +78 -0
  791. package/dist/serve/docs-ui/docs/ui-storage-usestoragerulesgate/index.html +144 -0
  792. package/dist/serve/docs-ui/docs/ui-storage-usestoragerulesgate.md +101 -0
  793. package/dist/serve/docs-ui/docs/ui-storage.md +165 -0
  794. package/dist/serve/docs-ui/docs/ui-traffic/index.html +88 -0
  795. package/dist/serve/docs-ui/docs/ui-traffic-ruleheatmap/index.html +79 -0
  796. package/dist/serve/docs-ui/docs/ui-traffic-ruleheatmap.md +60 -0
  797. package/dist/serve/docs-ui/docs/ui-traffic-trafficdetail/index.html +78 -0
  798. package/dist/serve/docs-ui/docs/ui-traffic-trafficdetail.md +59 -0
  799. package/dist/serve/docs-ui/docs/ui-traffic-trafficlog/index.html +118 -0
  800. package/dist/serve/docs-ui/docs/ui-traffic-trafficlog.md +69 -0
  801. package/dist/serve/docs-ui/docs/ui-traffic-trafficstats/index.html +51 -0
  802. package/dist/serve/docs-ui/docs/ui-traffic-trafficstats.md +46 -0
  803. package/dist/serve/docs-ui/docs/ui-traffic.md +102 -0
  804. package/dist/serve/docs-ui/docs/ui.md +90 -0
  805. package/dist/serve/docs-ui/docs/watch-and-review/index.html +25 -0
  806. package/dist/serve/docs-ui/docs/watch-and-review.md +40 -0
  807. package/dist/serve/docs-ui/docs/what-your-agent-can-do/index.html +81 -0
  808. package/dist/serve/docs-ui/docs/what-your-agent-can-do.md +78 -0
  809. package/dist/serve/docs-ui/docs/whats-experimental/index.html +22 -0
  810. package/dist/serve/docs-ui/docs/whats-experimental.md +33 -0
  811. package/dist/serve/docs-ui/docs/whats-possible/index.html +63 -0
  812. package/dist/serve/docs-ui/docs/whats-possible.md +53 -0
  813. package/dist/serve/docs-ui/docs/which-data-service/index.html +8 -0
  814. package/dist/serve/docs-ui/docs/which-data-service.md +11 -0
  815. package/dist/serve/docs-ui/docs/write-a-rules-test-suite/index.html +85 -0
  816. package/dist/serve/docs-ui/docs/write-a-rules-test-suite.md +119 -0
  817. package/dist/serve/docs-ui/index.html +1 -0
  818. package/dist/serve/docs-ui/llms.txt +308 -0
  819. package/dist/serve/entries/ai.d.ts +4 -0
  820. package/dist/serve/entries/ai.d.ts.map +1 -0
  821. package/dist/serve/entries/ai.js +184 -0
  822. package/dist/serve/entries/ai.js.map +1 -0
  823. package/dist/serve/entries/app-backend.d.ts +2 -0
  824. package/dist/serve/entries/app-backend.d.ts.map +1 -0
  825. package/dist/serve/entries/app-backend.js +4 -0
  826. package/dist/serve/entries/app-backend.js.map +1 -0
  827. package/dist/serve/entries/app-client.d.ts +5 -0
  828. package/dist/serve/entries/app-client.d.ts.map +1 -0
  829. package/dist/serve/entries/app-client.js +23 -0
  830. package/dist/serve/entries/app-client.js.map +1 -0
  831. package/dist/serve/entries/app-session-store.d.ts +14 -0
  832. package/dist/serve/entries/app-session-store.d.ts.map +1 -0
  833. package/dist/serve/entries/app-session-store.js +37 -0
  834. package/dist/serve/entries/app-session-store.js.map +1 -0
  835. package/dist/serve/entries/app.d.ts +2 -0
  836. package/dist/serve/entries/app.d.ts.map +1 -0
  837. package/dist/serve/entries/app.js +10 -0
  838. package/dist/serve/entries/app.js.map +1 -0
  839. package/dist/serve/entries/auth-helper-core.d.ts +52 -0
  840. package/dist/serve/entries/auth-helper-core.d.ts.map +1 -0
  841. package/dist/serve/entries/auth-helper-core.js +118 -0
  842. package/dist/serve/entries/auth-helper-core.js.map +1 -0
  843. package/dist/serve/entries/auth-helper-dom.d.ts +14 -0
  844. package/dist/serve/entries/auth-helper-dom.d.ts.map +1 -0
  845. package/dist/serve/entries/auth-helper-dom.js +116 -0
  846. package/dist/serve/entries/auth-helper-dom.js.map +1 -0
  847. package/dist/serve/entries/auth-helper-runtime.d.ts +5 -0
  848. package/dist/serve/entries/auth-helper-runtime.d.ts.map +1 -0
  849. package/dist/serve/entries/auth-helper-runtime.js +11 -0
  850. package/dist/serve/entries/auth-helper-runtime.js.map +1 -0
  851. package/dist/serve/entries/auth.d.ts +77 -0
  852. package/dist/serve/entries/auth.d.ts.map +1 -0
  853. package/dist/serve/entries/auth.js +201 -0
  854. package/dist/serve/entries/auth.js.map +1 -0
  855. package/dist/serve/entries/bridge-url.d.ts +25 -0
  856. package/dist/serve/entries/bridge-url.d.ts.map +1 -0
  857. package/dist/serve/entries/bridge-url.js +30 -0
  858. package/dist/serve/entries/bridge-url.js.map +1 -0
  859. package/dist/serve/entries/database.d.ts +46 -0
  860. package/dist/serve/entries/database.d.ts.map +1 -0
  861. package/dist/serve/entries/database.js +80 -0
  862. package/dist/serve/entries/database.js.map +1 -0
  863. package/dist/serve/entries/firestore.d.ts +104 -0
  864. package/dist/serve/entries/firestore.d.ts.map +1 -0
  865. package/dist/serve/entries/firestore.js +202 -0
  866. package/dist/serve/entries/firestore.js.map +1 -0
  867. package/dist/serve/entries/init.d.ts +2 -0
  868. package/dist/serve/entries/init.d.ts.map +1 -0
  869. package/dist/serve/entries/init.js +40 -0
  870. package/dist/serve/entries/init.js.map +1 -0
  871. package/dist/serve/entries/keepalive.d.ts +20 -0
  872. package/dist/serve/entries/keepalive.d.ts.map +1 -0
  873. package/dist/serve/entries/keepalive.js +38 -0
  874. package/dist/serve/entries/keepalive.js.map +1 -0
  875. package/dist/serve/entries/messaging-sw.d.ts +10 -0
  876. package/dist/serve/entries/messaging-sw.d.ts.map +1 -0
  877. package/dist/serve/entries/messaging-sw.js +36 -0
  878. package/dist/serve/entries/messaging-sw.js.map +1 -0
  879. package/dist/serve/entries/messaging.d.ts +11 -0
  880. package/dist/serve/entries/messaging.d.ts.map +1 -0
  881. package/dist/serve/entries/messaging.js +53 -0
  882. package/dist/serve/entries/messaging.js.map +1 -0
  883. package/dist/serve/entries/runtime.d.ts +46 -0
  884. package/dist/serve/entries/runtime.d.ts.map +1 -0
  885. package/dist/serve/entries/runtime.js +435 -0
  886. package/dist/serve/entries/runtime.js.map +1 -0
  887. package/dist/serve/entries/session-store.d.ts +48 -0
  888. package/dist/serve/entries/session-store.d.ts.map +1 -0
  889. package/dist/serve/entries/session-store.js +82 -0
  890. package/dist/serve/entries/session-store.js.map +1 -0
  891. package/dist/serve/entries/storage.d.ts +25 -0
  892. package/dist/serve/entries/storage.d.ts.map +1 -0
  893. package/dist/serve/entries/storage.js +61 -0
  894. package/dist/serve/entries/storage.js.map +1 -0
  895. package/dist/serve/entries/tab-sync-wiring.d.ts +88 -0
  896. package/dist/serve/entries/tab-sync-wiring.d.ts.map +1 -0
  897. package/dist/serve/entries/tab-sync-wiring.js +217 -0
  898. package/dist/serve/entries/tab-sync-wiring.js.map +1 -0
  899. package/dist/serve/entries/worker-runtime.d.ts +10 -0
  900. package/dist/serve/entries/worker-runtime.d.ts.map +1 -0
  901. package/dist/serve/entries/worker-runtime.js +59 -0
  902. package/dist/serve/entries/worker-runtime.js.map +1 -0
  903. package/dist/serve/init-payload.d.ts +21 -0
  904. package/dist/serve/init-payload.d.ts.map +1 -0
  905. package/dist/serve/init-payload.js +2 -0
  906. package/dist/serve/init-payload.js.map +1 -0
  907. package/dist/serve/namespace.d.ts +73 -0
  908. package/dist/serve/namespace.d.ts.map +1 -0
  909. package/dist/serve/namespace.js +470 -0
  910. package/dist/serve/namespace.js.map +1 -0
  911. package/dist/serve/open-browser.d.ts +23 -0
  912. package/dist/serve/open-browser.d.ts.map +1 -0
  913. package/dist/serve/open-browser.js +58 -0
  914. package/dist/serve/open-browser.js.map +1 -0
  915. package/dist/serve/rules.d.ts +77 -0
  916. package/dist/serve/rules.d.ts.map +1 -0
  917. package/dist/serve/rules.js +202 -0
  918. package/dist/serve/rules.js.map +1 -0
  919. package/dist/serve/sandbox-marker.d.ts +9 -0
  920. package/dist/serve/sandbox-marker.d.ts.map +1 -0
  921. package/dist/serve/sandbox-marker.js +31 -0
  922. package/dist/serve/sandbox-marker.js.map +1 -0
  923. package/dist/serve/server.d.ts +135 -0
  924. package/dist/serve/server.d.ts.map +1 -0
  925. package/dist/serve/server.js +328 -0
  926. package/dist/serve/server.js.map +1 -0
  927. package/dist/serve/standalone-assets.d.ts +67 -0
  928. package/dist/serve/standalone-assets.d.ts.map +1 -0
  929. package/dist/serve/standalone-assets.js +134 -0
  930. package/dist/serve/standalone-assets.js.map +1 -0
  931. package/dist/serve/state-store.d.ts +45 -0
  932. package/dist/serve/state-store.d.ts.map +1 -0
  933. package/dist/serve/state-store.js +120 -0
  934. package/dist/serve/state-store.js.map +1 -0
  935. package/dist/serve/studio/disk-project-store.d.ts +9 -0
  936. package/dist/serve/studio/disk-project-store.d.ts.map +1 -0
  937. package/dist/serve/studio/disk-project-store.js +173 -0
  938. package/dist/serve/studio/disk-project-store.js.map +1 -0
  939. package/dist/serve/studio/disk-workspace.d.ts +14 -0
  940. package/dist/serve/studio/disk-workspace.d.ts.map +1 -0
  941. package/dist/serve/studio/disk-workspace.js +152 -0
  942. package/dist/serve/studio/disk-workspace.js.map +1 -0
  943. package/dist/serve/studio/index.d.ts +10 -0
  944. package/dist/serve/studio/index.d.ts.map +1 -0
  945. package/dist/serve/studio/index.js +9 -0
  946. package/dist/serve/studio/index.js.map +1 -0
  947. package/dist/serve/studio/routes.d.ts +40 -0
  948. package/dist/serve/studio/routes.d.ts.map +1 -0
  949. package/dist/serve/studio/routes.js +182 -0
  950. package/dist/serve/studio/routes.js.map +1 -0
  951. package/dist/serve/studio/store-types.d.ts +45 -0
  952. package/dist/serve/studio/store-types.d.ts.map +1 -0
  953. package/dist/serve/studio/store-types.js +11 -0
  954. package/dist/serve/studio/store-types.js.map +1 -0
  955. package/dist/serve/studio-ui/assets/RulesCodeEditor-BZpD57II.js +23 -0
  956. package/dist/serve/studio-ui/assets/index-Bsa-TQNK.css +1 -0
  957. package/dist/serve/studio-ui/assets/index-DGaVuOhE.js +1211 -0
  958. package/dist/serve/studio-ui/assets/seed-CTmn6YuO.js +2 -0
  959. package/dist/serve/studio-ui/index.html +32 -0
  960. package/dist/serve/studio-ui/pyric-logo.svg +76 -0
  961. package/dist/serve/vite-plugin.d.ts +57 -0
  962. package/dist/serve/vite-plugin.d.ts.map +1 -0
  963. package/dist/serve/vite-plugin.js +658 -0
  964. package/dist/serve/vite-plugin.js.map +1 -0
  965. package/dist/serve/worker/client/admin-firestore.d.ts +18 -0
  966. package/dist/serve/worker/client/admin-firestore.d.ts.map +1 -0
  967. package/dist/serve/worker/client/admin-firestore.js +26 -0
  968. package/dist/serve/worker/client/admin-firestore.js.map +1 -0
  969. package/dist/serve/worker/client/ai.d.ts +31 -0
  970. package/dist/serve/worker/client/ai.d.ts.map +1 -0
  971. package/dist/serve/worker/client/ai.js +89 -0
  972. package/dist/serve/worker/client/ai.js.map +1 -0
  973. package/dist/serve/worker/client/auth.d.ts +168 -0
  974. package/dist/serve/worker/client/auth.d.ts.map +1 -0
  975. package/dist/serve/worker/client/auth.js +322 -0
  976. package/dist/serve/worker/client/auth.js.map +1 -0
  977. package/dist/serve/worker/client/connection.d.ts +80 -0
  978. package/dist/serve/worker/client/connection.d.ts.map +1 -0
  979. package/dist/serve/worker/client/connection.js +148 -0
  980. package/dist/serve/worker/client/connection.js.map +1 -0
  981. package/dist/serve/worker/client/core.d.ts +109 -0
  982. package/dist/serve/worker/client/core.d.ts.map +1 -0
  983. package/dist/serve/worker/client/core.js +248 -0
  984. package/dist/serve/worker/client/core.js.map +1 -0
  985. package/dist/serve/worker/client/disconnect.d.ts +7 -0
  986. package/dist/serve/worker/client/disconnect.d.ts.map +1 -0
  987. package/dist/serve/worker/client/disconnect.js +26 -0
  988. package/dist/serve/worker/client/disconnect.js.map +1 -0
  989. package/dist/serve/worker/client/firestore-reads.d.ts +49 -0
  990. package/dist/serve/worker/client/firestore-reads.d.ts.map +1 -0
  991. package/dist/serve/worker/client/firestore-reads.js +139 -0
  992. package/dist/serve/worker/client/firestore-reads.js.map +1 -0
  993. package/dist/serve/worker/client/firestore-refs.d.ts +54 -0
  994. package/dist/serve/worker/client/firestore-refs.d.ts.map +1 -0
  995. package/dist/serve/worker/client/firestore-refs.js +167 -0
  996. package/dist/serve/worker/client/firestore-refs.js.map +1 -0
  997. package/dist/serve/worker/client/firestore-writes.d.ts +70 -0
  998. package/dist/serve/worker/client/firestore-writes.d.ts.map +1 -0
  999. package/dist/serve/worker/client/firestore-writes.js +169 -0
  1000. package/dist/serve/worker/client/firestore-writes.js.map +1 -0
  1001. package/dist/serve/worker/client/handles.d.ts +73 -0
  1002. package/dist/serve/worker/client/handles.d.ts.map +1 -0
  1003. package/dist/serve/worker/client/handles.js +4 -0
  1004. package/dist/serve/worker/client/handles.js.map +1 -0
  1005. package/dist/serve/worker/client/messaging.d.ts +16 -0
  1006. package/dist/serve/worker/client/messaging.d.ts.map +1 -0
  1007. package/dist/serve/worker/client/messaging.js +60 -0
  1008. package/dist/serve/worker/client/messaging.js.map +1 -0
  1009. package/dist/serve/worker/client/presence.d.ts +43 -0
  1010. package/dist/serve/worker/client/presence.d.ts.map +1 -0
  1011. package/dist/serve/worker/client/presence.js +132 -0
  1012. package/dist/serve/worker/client/presence.js.map +1 -0
  1013. package/dist/serve/worker/client/rtdb.d.ts +36 -0
  1014. package/dist/serve/worker/client/rtdb.d.ts.map +1 -0
  1015. package/dist/serve/worker/client/rtdb.js +241 -0
  1016. package/dist/serve/worker/client/rtdb.js.map +1 -0
  1017. package/dist/serve/worker/client/rules.d.ts +24 -0
  1018. package/dist/serve/worker/client/rules.d.ts.map +1 -0
  1019. package/dist/serve/worker/client/rules.js +44 -0
  1020. package/dist/serve/worker/client/rules.js.map +1 -0
  1021. package/dist/serve/worker/client/service-worker-connection.d.ts +3 -0
  1022. package/dist/serve/worker/client/service-worker-connection.d.ts.map +1 -0
  1023. package/dist/serve/worker/client/service-worker-connection.js +53 -0
  1024. package/dist/serve/worker/client/service-worker-connection.js.map +1 -0
  1025. package/dist/serve/worker/client/snapshots.d.ts +32 -0
  1026. package/dist/serve/worker/client/snapshots.d.ts.map +1 -0
  1027. package/dist/serve/worker/client/snapshots.js +46 -0
  1028. package/dist/serve/worker/client/snapshots.js.map +1 -0
  1029. package/dist/serve/worker/client/storage.d.ts +64 -0
  1030. package/dist/serve/worker/client/storage.d.ts.map +1 -0
  1031. package/dist/serve/worker/client/storage.js +125 -0
  1032. package/dist/serve/worker/client/storage.js.map +1 -0
  1033. package/dist/serve/worker/client/studio.d.ts +32 -0
  1034. package/dist/serve/worker/client/studio.d.ts.map +1 -0
  1035. package/dist/serve/worker/client/studio.js +61 -0
  1036. package/dist/serve/worker/client/studio.js.map +1 -0
  1037. package/dist/serve/worker/client.d.ts +43 -0
  1038. package/dist/serve/worker/client.d.ts.map +1 -0
  1039. package/dist/serve/worker/client.js +44 -0
  1040. package/dist/serve/worker/client.js.map +1 -0
  1041. package/dist/serve/worker/entry.d.ts +40 -0
  1042. package/dist/serve/worker/entry.d.ts.map +1 -0
  1043. package/dist/serve/worker/entry.js +144 -0
  1044. package/dist/serve/worker/entry.js.map +1 -0
  1045. package/dist/serve/worker/host/admin-firestore.d.ts +17 -0
  1046. package/dist/serve/worker/host/admin-firestore.d.ts.map +1 -0
  1047. package/dist/serve/worker/host/admin-firestore.js +92 -0
  1048. package/dist/serve/worker/host/admin-firestore.js.map +1 -0
  1049. package/dist/serve/worker/host/connection.d.ts +40 -0
  1050. package/dist/serve/worker/host/connection.d.ts.map +1 -0
  1051. package/dist/serve/worker/host/connection.js +153 -0
  1052. package/dist/serve/worker/host/connection.js.map +1 -0
  1053. package/dist/serve/worker/host/core.d.ts +159 -0
  1054. package/dist/serve/worker/host/core.d.ts.map +1 -0
  1055. package/dist/serve/worker/host/core.js +296 -0
  1056. package/dist/serve/worker/host/core.js.map +1 -0
  1057. package/dist/serve/worker/host/dispatch.d.ts +34 -0
  1058. package/dist/serve/worker/host/dispatch.d.ts.map +1 -0
  1059. package/dist/serve/worker/host/dispatch.js +267 -0
  1060. package/dist/serve/worker/host/dispatch.js.map +1 -0
  1061. package/dist/serve/worker/host/firestore-reads.d.ts +17 -0
  1062. package/dist/serve/worker/host/firestore-reads.d.ts.map +1 -0
  1063. package/dist/serve/worker/host/firestore-reads.js +108 -0
  1064. package/dist/serve/worker/host/firestore-reads.js.map +1 -0
  1065. package/dist/serve/worker/host/firestore-writes.d.ts +37 -0
  1066. package/dist/serve/worker/host/firestore-writes.d.ts.map +1 -0
  1067. package/dist/serve/worker/host/firestore-writes.js +409 -0
  1068. package/dist/serve/worker/host/firestore-writes.js.map +1 -0
  1069. package/dist/serve/worker/host/presence.d.ts +38 -0
  1070. package/dist/serve/worker/host/presence.d.ts.map +1 -0
  1071. package/dist/serve/worker/host/presence.js +280 -0
  1072. package/dist/serve/worker/host/presence.js.map +1 -0
  1073. package/dist/serve/worker/host/rtdb.d.ts +18 -0
  1074. package/dist/serve/worker/host/rtdb.d.ts.map +1 -0
  1075. package/dist/serve/worker/host/rtdb.js +128 -0
  1076. package/dist/serve/worker/host/rtdb.js.map +1 -0
  1077. package/dist/serve/worker/host/rules.d.ts +17 -0
  1078. package/dist/serve/worker/host/rules.d.ts.map +1 -0
  1079. package/dist/serve/worker/host/rules.js +118 -0
  1080. package/dist/serve/worker/host/rules.js.map +1 -0
  1081. package/dist/serve/worker/host/storage.d.ts +19 -0
  1082. package/dist/serve/worker/host/storage.d.ts.map +1 -0
  1083. package/dist/serve/worker/host/storage.js +260 -0
  1084. package/dist/serve/worker/host/storage.js.map +1 -0
  1085. package/dist/serve/worker/host/studio.d.ts +13 -0
  1086. package/dist/serve/worker/host/studio.d.ts.map +1 -0
  1087. package/dist/serve/worker/host/studio.js +30 -0
  1088. package/dist/serve/worker/host/studio.js.map +1 -0
  1089. package/dist/serve/worker/host/subscriptions.d.ts +21 -0
  1090. package/dist/serve/worker/host/subscriptions.d.ts.map +1 -0
  1091. package/dist/serve/worker/host/subscriptions.js +162 -0
  1092. package/dist/serve/worker/host/subscriptions.js.map +1 -0
  1093. package/dist/serve/worker/host-ai.d.ts +59 -0
  1094. package/dist/serve/worker/host-ai.d.ts.map +1 -0
  1095. package/dist/serve/worker/host-ai.js +158 -0
  1096. package/dist/serve/worker/host-ai.js.map +1 -0
  1097. package/dist/serve/worker/host-auth.d.ts +47 -0
  1098. package/dist/serve/worker/host-auth.d.ts.map +1 -0
  1099. package/dist/serve/worker/host-auth.js +464 -0
  1100. package/dist/serve/worker/host-auth.js.map +1 -0
  1101. package/dist/serve/worker/host-context.d.ts +220 -0
  1102. package/dist/serve/worker/host-context.d.ts.map +1 -0
  1103. package/dist/serve/worker/host-context.js +45 -0
  1104. package/dist/serve/worker/host-context.js.map +1 -0
  1105. package/dist/serve/worker/host-events.d.ts +21 -0
  1106. package/dist/serve/worker/host-events.d.ts.map +1 -0
  1107. package/dist/serve/worker/host-events.js +87 -0
  1108. package/dist/serve/worker/host-events.js.map +1 -0
  1109. package/dist/serve/worker/host-messaging.d.ts +60 -0
  1110. package/dist/serve/worker/host-messaging.d.ts.map +1 -0
  1111. package/dist/serve/worker/host-messaging.js +226 -0
  1112. package/dist/serve/worker/host-messaging.js.map +1 -0
  1113. package/dist/serve/worker/host.d.ts +36 -0
  1114. package/dist/serve/worker/host.d.ts.map +1 -0
  1115. package/dist/serve/worker/host.js +39 -0
  1116. package/dist/serve/worker/host.js.map +1 -0
  1117. package/dist/serve/worker/index.d.ts +22 -0
  1118. package/dist/serve/worker/index.d.ts.map +1 -0
  1119. package/dist/serve/worker/index.js +61 -0
  1120. package/dist/serve/worker/index.js.map +1 -0
  1121. package/dist/serve/worker/presence-timing.d.ts +14 -0
  1122. package/dist/serve/worker/presence-timing.d.ts.map +1 -0
  1123. package/dist/serve/worker/presence-timing.js +14 -0
  1124. package/dist/serve/worker/presence-timing.js.map +1 -0
  1125. package/dist/serve/worker/protocol.d.ts +1150 -0
  1126. package/dist/serve/worker/protocol.d.ts.map +1 -0
  1127. package/dist/serve/worker/protocol.js +228 -0
  1128. package/dist/serve/worker/protocol.js.map +1 -0
  1129. package/dist/serve/worker/serve-init.d.ts +201 -0
  1130. package/dist/serve/worker/serve-init.d.ts.map +1 -0
  1131. package/dist/serve/worker/serve-init.js +579 -0
  1132. package/dist/serve/worker/serve-init.js.map +1 -0
  1133. package/dist/serve/worker/service-worker-channel.d.ts +23 -0
  1134. package/dist/serve/worker/service-worker-channel.d.ts.map +1 -0
  1135. package/dist/serve/worker/service-worker-channel.js +9 -0
  1136. package/dist/serve/worker/service-worker-channel.js.map +1 -0
  1137. package/dist/serve/worker/service-worker-relay.d.ts +22 -0
  1138. package/dist/serve/worker/service-worker-relay.d.ts.map +1 -0
  1139. package/dist/serve/worker/service-worker-relay.js +63 -0
  1140. package/dist/serve/worker/service-worker-relay.js.map +1 -0
  1141. package/dist/serve/writer-lock.d.ts +32 -0
  1142. package/dist/serve/writer-lock.d.ts.map +1 -0
  1143. package/dist/serve/writer-lock.js +43 -0
  1144. package/dist/serve/writer-lock.js.map +1 -0
  1145. package/dist/verify/cases.d.ts +37 -0
  1146. package/dist/verify/cases.d.ts.map +1 -0
  1147. package/dist/verify/cases.js +173 -0
  1148. package/dist/verify/cases.js.map +1 -0
  1149. package/dist/verify/fixture.d.ts +100 -0
  1150. package/dist/verify/fixture.d.ts.map +1 -0
  1151. package/dist/verify/fixture.js +156 -0
  1152. package/dist/verify/fixture.js.map +1 -0
  1153. package/dist/verify/index.d.ts +102 -0
  1154. package/dist/verify/index.d.ts.map +1 -0
  1155. package/dist/verify/index.js +318 -0
  1156. package/dist/verify/index.js.map +1 -0
  1157. package/dist/verify/tools.d.ts +7 -0
  1158. package/dist/verify/tools.d.ts.map +1 -0
  1159. package/dist/verify/tools.js +83 -0
  1160. package/dist/verify/tools.js.map +1 -0
  1161. package/dist/version/compat-target.d.ts +18 -0
  1162. package/dist/version/compat-target.d.ts.map +1 -0
  1163. package/dist/version/compat-target.js +18 -0
  1164. package/dist/version/compat-target.js.map +1 -0
  1165. package/dist/vite.d.ts +12 -0
  1166. package/dist/vite.d.ts.map +1 -0
  1167. package/dist/vite.js +16 -0
  1168. package/dist/vite.js.map +1 -0
  1169. package/package.json +133 -0
@@ -0,0 +1,296 @@
1
+ /**
2
+ * SharedWorker host — shared resolution layer (host/core.ts).
3
+ *
4
+ * The helpers every firestore-touching family module leans on:
5
+ * - the auth-lens → live-handle resolvers (`lensDb`/`lensRtdb`/`sessionDb`/…),
6
+ * the single place a per-op `actAs` lens or a port session becomes a live
7
+ * Firestore/RTDB handle;
8
+ * - descriptor → live ref/query resolution (`resolveTarget`/`resolveConstraint`),
9
+ * used by both the read ops and the subscription handlers;
10
+ * - cross-port snapshot serialization (`serializeDocSnap`);
11
+ * - `opProvenance`, the issue-time provenance both the ambient-provenance
12
+ * window (dispatch) and the storage ops (explicit thread) read.
13
+ *
14
+ * Genuinely-shared STATE lives on `HostCtx` (host-context.ts) — the dependency
15
+ * root. This module adds the shared FUNCTIONS that resolve against that state;
16
+ * it imports the pyric firestore/database engine, so it is deliberately kept
17
+ * out of host-context.ts (which stays engine-free).
18
+ */
19
+ import { getFirestore as pyricGetFirestore, getAdminFirestore as pyricGetAdminFirestore, doc as pyricDoc, collection as pyricCollection, collectionGroup as pyricCollectionGroup, query as pyricQuery, where as pyricWhere, and as pyricAnd, or as pyricOr, orderBy as pyricOrderBy, limit as pyricLimit, limitToLast as pyricLimitToLast, startAt as pyricStartAt, startAfter as pyricStartAfter, endAt as pyricEndAt, endBefore as pyricEndBefore, } from 'pyric/firestore';
20
+ import { rehydrateDocValue } from 'pyric/firestore-values';
21
+ import { getDatabase as pyricGetDatabase, getAdminDatabase as pyricGetAdminDatabase, } from 'pyric/database';
22
+ import { serializeDocData } from '../protocol.js';
23
+ import { portSession } from '../host-auth.js';
24
+ // ─── Descriptor → live ref resolution ───────────────────────────────────
25
+ /**
26
+ * Resolve a TargetDescriptor into a live pyric ref or query.
27
+ *
28
+ * WHY WE RESOLVE ON THE WORKER
29
+ * The client never holds live pyric refs — it holds plain `DocRef`/
30
+ * `CollRef`/`GroupRef`/`QueryDescriptor` objects that serialize cleanly
31
+ * across the MessagePort. On every op the worker rebuilds the live ref
32
+ * from these descriptors. This keeps the client completely stateless with
33
+ * respect to sandbox internals and makes retries trivially correct.
34
+ */
35
+ export function resolveTarget(db, target) {
36
+ if (target.__ref === 'doc') {
37
+ return pyricDoc(db, target.path);
38
+ }
39
+ if (target.__ref === 'collection') {
40
+ return pyricCollection(db, target.path);
41
+ }
42
+ if (target.__ref === 'group') {
43
+ return pyricCollectionGroup(db, target.collectionId);
44
+ }
45
+ // query descriptor
46
+ const source = resolveTarget(db, target.source);
47
+ const constraints = target.constraints.map((c) => resolveConstraint(c));
48
+ return pyricQuery(source, ...constraints);
49
+ }
50
+ function resolveConstraint(c) {
51
+ switch (c.kind) {
52
+ case 'where':
53
+ // Rehydrate the comparison value (same rationale as prepareWriteData,
54
+ // spike gap 4, applied to READ inputs): over the JSON relay legs a
55
+ // Node-side Timestamp/Bytes/GeoPoint arrives as its marker shape;
56
+ // without rehydration the comparison would see a plain map and the
57
+ // filter would silently mismatch typed stored values.
58
+ return pyricWhere(c.field, c.op, rehydrateDocValue(c.value));
59
+ // Composite filters rebuild through the modular `and`/`or` factories,
60
+ // which validate operands: an empty composite or a nested non-filter
61
+ // throws the same TypeError the in-page SDK raises (surfaces as an
62
+ // error res / snap-error, never a crash).
63
+ case 'and':
64
+ return pyricAnd(...c.filters.map(resolveConstraint));
65
+ case 'or':
66
+ return pyricOr(...c.filters.map(resolveConstraint));
67
+ case 'orderBy':
68
+ return pyricOrderBy(c.field, c.direction);
69
+ case 'limit':
70
+ return pyricLimit(c.n);
71
+ case 'limitToLast':
72
+ return pyricLimitToLast(c.n);
73
+ // Cursor values rehydrate for the same reason as `where` values —
74
+ // `startAfter(<timestamp>)` must position against real Timestamps.
75
+ case 'startAt':
76
+ return pyricStartAt(...c.values.map(rehydrateDocValue));
77
+ case 'startAfter':
78
+ return pyricStartAfter(...c.values.map(rehydrateDocValue));
79
+ case 'endAt':
80
+ return pyricEndAt(...c.values.map(rehydrateDocValue));
81
+ case 'endBefore':
82
+ return pyricEndBefore(...c.values.map(rehydrateDocValue));
83
+ }
84
+ }
85
+ // ─── Snapshot serialization ───────────────────────────────────────────────
86
+ /**
87
+ * Serialize a document snapshot to cross-port form.
88
+ * Uses JSON-via-serializeDocData so Timestamp/Bytes/LatLng survive.
89
+ */
90
+ export function serializeDocSnap(snap) {
91
+ const existsBool = typeof snap.exists === 'function' ? snap.exists() : snap.exists;
92
+ const data = existsBool ? snap.data() : undefined;
93
+ return {
94
+ id: snap.id,
95
+ // Doc snapshots carry a top-level `path`; QUERY doc snapshots carry it on
96
+ // `.ref.path`. Read both so query rows serialize their FULL path (Studio's
97
+ // browse resolves the document detail from it).
98
+ path: snap.path ?? snap.ref?.path,
99
+ exists: existsBool,
100
+ data: data ? serializeDocData(data) : undefined,
101
+ };
102
+ }
103
+ // ─── Auth lens (Pyric Studio) ─────────────────────────────────────────────
104
+ /**
105
+ * Resolve the Firestore handle an op runs against, given its `actAs` lens
106
+ * (Pyric Studio auth lens, T2 — implements the C2 protocol seam).
107
+ *
108
+ * Resolution by `actAs.mode` (absent ⇒ the app's session):
109
+ *
110
+ * - `app-session` (and `actAs` absent): `ctx.db` — the shared sandbox-live
111
+ * handle. Reads `sandbox.currentUser` per op, so rules evaluate under
112
+ * whoever the served app is signed in as. This is the unchanged default
113
+ * and the ONLY lens the app itself ever uses.
114
+ *
115
+ * - `{ mode: 'as', uid }` (impersonation — the rules-debugging primitive):
116
+ * a FROZEN-identity `getFirestore(sandbox.withAuth({ uid }))` handle.
117
+ * Security rules APPLY and evaluate as that user — `request.auth.uid`
118
+ * resolves to `uid`. This lets Studio "re-run this denied op as the user
119
+ * who attempted it" (Wave-2 rules-debugging, F4). Handles are cached
120
+ * per-uid on `ctx.lensHandles`.
121
+ *
122
+ * - `{ mode: 'admin' }` (rule bypass): a modular `getAdminFirestore(sandbox)`
123
+ * handle (pyric Gap #2) whose ops skip security-rule evaluation while still
124
+ * reading/writing the same store and emitting events. This is Studio's
125
+ * "edit anything as admin" surface (F2). Cached on `ctx.adminDb`.
126
+ *
127
+ * - `{ mode: 'anon' }` (explicitly unauthenticated): a frozen
128
+ * `getFirestore(sandbox.withAuth(null))` handle — rules apply with
129
+ * `request.auth == null`. The remote arm's `withAuth(null)`; distinct from
130
+ * an ABSENT lens, which resolves to the port's session. Cached on
131
+ * `ctx.anonDb`.
132
+ *
133
+ * WRITE-IMPERSONATION GATING (open micro-decision #1, honoured): the resolver
134
+ * itself is symmetric — an `{ mode: 'as', uid }` lens applies to BOTH reads and
135
+ * writes (a write-as-user is denied/allowed exactly as that user's rules say).
136
+ * The POLICY decision — "read-as-user always; write-as-user only on an explicit
137
+ * reproduce path" — is enforced at the CALLER (the Studio client / UI chooses
138
+ * when to attach a write op's `actAs`), NOT here. Default behaviour stays admin/
139
+ * app-session unless a caller sets `actAs`; no UI is added by T2.
140
+ */
141
+ export function lensDb(ctx, actAs) {
142
+ // Absent / app-session → the app's live session handle.
143
+ if (!actAs || actAs.mode === 'app-session') {
144
+ return ctx.db;
145
+ }
146
+ // { mode: 'admin' } → a modular rules-bypass handle (cached per ctx).
147
+ if (actAs.mode === 'admin') {
148
+ return (ctx.adminDb ??= pyricGetAdminFirestore(ctx.sandbox));
149
+ }
150
+ // { mode: 'anon' } → a genuinely UNAUTHENTICATED handle
151
+ // (`withAuth(null)` — `request.auth == null` in rules). NOT the same as an
152
+ // absent lens, which resolves to the PORT'S SESSION: a relayed op that
153
+ // means "no auth" must pin this lens or it silently runs as whoever the
154
+ // browser tab is signed in as.
155
+ if (actAs.mode === 'anon') {
156
+ return (ctx.anonDb ??= pyricGetFirestore(ctx.sandbox.withAuth(null)));
157
+ }
158
+ // { mode: 'as', uid } → a frozen-identity handle; rules evaluate as `uid`.
159
+ const handles = (ctx.lensHandles ??= new Map());
160
+ const key = lensCacheKey(actAs);
161
+ let handle = handles.get(key);
162
+ if (!handle) {
163
+ handle = pyricGetFirestore(ctx.sandbox.withAuth(authStateForLens(actAs)));
164
+ handles.set(key, handle);
165
+ }
166
+ return handle;
167
+ }
168
+ export function authStateForLens(actAs) {
169
+ return actAs.token === undefined
170
+ ? { uid: actAs.uid }
171
+ : { uid: actAs.uid, token: actAs.token };
172
+ }
173
+ export function lensCacheKey(actAs) {
174
+ return actAs.token === undefined
175
+ ? actAs.uid
176
+ : `${actAs.uid}:${JSON.stringify(actAs.token)}`;
177
+ }
178
+ /** Cache key for a real port session; claims are part of authorization identity. */
179
+ export function sessionCacheKey(session) {
180
+ return session.state.token === undefined
181
+ ? session.user.uid
182
+ : `${session.user.uid}:${JSON.stringify(session.state.token)}`;
183
+ }
184
+ /**
185
+ * Normalise a per-op `actAs` lens to the {@link AuthLens} provenance shape that
186
+ * the unified sandbox event stream stamps on each event's `authLens` field.
187
+ *
188
+ * Absent ⇒ `{ mode: 'app-session' }` (the app's own session) — matching how
189
+ * `EventProvenance.authLens` reads when omitted. C1 added the field to events;
190
+ * T1 owns the EMIT path that actually writes it. T2's job is to thread the lens
191
+ * THROUGH the host so T1 has the value at emit time: see the call in `handleOp`
192
+ * where the resolved lens is passed to the sandbox via `withLens` when that
193
+ * emit seam exists. Today the sandbox event emitters infer `authLens` from the
194
+ * acting identity (the impersonation handle's frozen `auth` is `{ uid }`, so a
195
+ * rules eval already carries that uid); this helper exists so the host has a
196
+ * single canonical normaliser when the explicit emit-time stamp lands.
197
+ */
198
+ export function lensProvenance(actAs) {
199
+ return actAs ?? { mode: 'app-session' };
200
+ }
201
+ /**
202
+ * Resolve the data handle for an op/sub carrying NO explicit lens: the
203
+ * PORT'S SESSION (#754). A signed-in port gets a per-session-token cached
204
+ * `getFirestore(sandbox.withAuth(session.state))` handle — rules evaluate
205
+ * under its uid + custom claims, exactly like a globally signed-in user. A
206
+ * signed-out port falls back to `ctx.db` (sandbox-live; `currentUser` is
207
+ * never set in served mode, so that is the unauthenticated view).
208
+ *
209
+ * This is NOT the impersonation lens: the session was minted by validated
210
+ * sign-in on this port (`sandbox.mintSession`), so both reads and writes
211
+ * legitimately run as that user — the write-impersonation gate on the
212
+ * Studio `as` lens does not apply to a port's own session.
213
+ *
214
+ * Claim changes become visible when the client forces an ID-token refresh;
215
+ * host-auth updates the port session, clears all session-bound service
216
+ * caches, and re-establishes that port's listeners under the new token.
217
+ */
218
+ export function sessionDb(ctx, port) {
219
+ const session = portSession(ctx, port);
220
+ if (!session)
221
+ return ctx.db;
222
+ const cache = (ctx.sessionDbs ??= new Map());
223
+ const key = sessionCacheKey(session);
224
+ let handle = cache.get(key);
225
+ if (!handle) {
226
+ handle = pyricGetFirestore(ctx.sandbox.withAuth(session.state));
227
+ cache.set(key, handle);
228
+ }
229
+ return handle;
230
+ }
231
+ function sessionRtdb(ctx, port) {
232
+ const session = portSession(ctx, port);
233
+ if (!session)
234
+ return ensureRtdb(ctx);
235
+ const cache = (ctx.sessionRtdbs ??= new Map());
236
+ const key = sessionCacheKey(session);
237
+ let handle = cache.get(key);
238
+ if (!handle) {
239
+ handle = pyricGetDatabase(ctx.sandbox.withAuth(session.state));
240
+ cache.set(key, handle);
241
+ }
242
+ return handle;
243
+ }
244
+ export function lensRtdb(ctx, actAs, port) {
245
+ if (!actAs || actAs.mode === 'app-session') {
246
+ return sessionRtdb(ctx, port);
247
+ }
248
+ if (actAs.mode === 'admin') {
249
+ return (ctx.adminRtdb ??= pyricGetAdminDatabase(ctx.sandbox));
250
+ }
251
+ // Genuinely unauthenticated — see the `anon` note on lensDb.
252
+ if (actAs.mode === 'anon') {
253
+ return (ctx.anonRtdb ??= pyricGetDatabase(ctx.sandbox.withAuth(null)));
254
+ }
255
+ const handles = (ctx.lensRtdbs ??= new Map());
256
+ const key = lensCacheKey(actAs);
257
+ let handle = handles.get(key);
258
+ if (!handle) {
259
+ handle = pyricGetDatabase(ctx.sandbox.withAuth(authStateForLens(actAs)));
260
+ handles.set(key, handle);
261
+ }
262
+ return handle;
263
+ }
264
+ export function ensureRtdb(ctx) {
265
+ return (ctx.rtdb ??= pyricGetDatabase(ctx.sandbox));
266
+ }
267
+ // ─── Op provenance ─────────────────────────────────────────────────────────
268
+ /**
269
+ * Op provenance from an inbound message, bound at ISSUE time. This is the
270
+ * source of truth for both the synchronous ambient window used by immediate
271
+ * emitters and the operation-scoped Storage handle used across awaits.
272
+ *
273
+ * - `actor`: a client that DECLARED itself the issuer (`issuer: 'studio'`,
274
+ * stamped by Studio's worker client — `setOpIssuer` in client.ts) gets
275
+ * `actor: { kind: 'studio' }`. Bridge-relayed frames are forwarded
276
+ * verbatim without the stamp (client.ts `relayWorkerOp`), so remote
277
+ * admin/agent traffic is never mislabeled as Studio's.
278
+ * - `authLens`: the op's EFFECTIVE lens (`msg.actAs`) whenever present —
279
+ * independent of issuer, because admin is admin regardless of who asked
280
+ * (an agent tool relay's admin op must classify as a rules BYPASS in
281
+ * Traffic, not a rules allow).
282
+ *
283
+ * Returns `undefined` for a plain served-app op (no issuer, no lens); its
284
+ * app source and app-session lens come from the service handle itself.
285
+ */
286
+ export function opProvenance(msg) {
287
+ const issuer = msg.issuer;
288
+ const actAs = msg.actAs;
289
+ if (issuer !== 'studio' && !actAs)
290
+ return undefined;
291
+ return {
292
+ ...(issuer === 'studio' ? { actor: { kind: 'studio' } } : {}),
293
+ ...(actAs ? { authLens: actAs } : {}),
294
+ };
295
+ }
296
+ //# sourceMappingURL=core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../../../../src/serve/worker/host/core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,YAAY,IAAI,iBAAiB,EACjC,iBAAiB,IAAI,sBAAsB,EAC3C,GAAG,IAAI,QAAQ,EACf,UAAU,IAAI,eAAe,EAC7B,eAAe,IAAI,oBAAoB,EACvC,KAAK,IAAI,UAAU,EACnB,KAAK,IAAI,UAAU,EACnB,GAAG,IAAI,QAAQ,EACf,EAAE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AgB,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACzE,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAY;IACrC,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,YAAY,CAAC,GAAmB;IAC9C,MAAM,MAAM,GAAI,GAA6B,CAAC,MAAM,CAAC;IACrD,MAAM,KAAK,GAAI,GAA4B,CAAC,KAAK,CAAC;IAClD,IAAI,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IACpD,OAAO;QACL,GAAG,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7D,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * SharedWorker host — the message dispatcher + port cleanup.
3
+ *
4
+ * The top of the host: `handleMessage` opens the op's ambient-provenance
5
+ * window and hands to `dispatchMessage`, which peels off the auth / AI /
6
+ * messaging / event families (their sibling `host-*.ts` modules), then routes
7
+ * ops to `handleOp` (the firestore/rules/admin/rtdb/storage/connection/studio
8
+ * orchestrator) and subs to the subscription registry. `cleanupPort` tears a
9
+ * disconnected port's per-subsystem state down.
10
+ *
11
+ * `handleOp` resolves the op's Firestore handle ONCE (the `db`/`lens`
12
+ * preamble) — the eager lens/session resolution every op sees — then dispatches
13
+ * to the per-family `handle*Op` handlers. This is the single unit-testable seam:
14
+ * tests build a real `HostCtx` over an in-memory sandbox and call
15
+ * `handleMessage` directly with fake ports.
16
+ */
17
+ import type { InboundMessage } from '../protocol.js';
18
+ import { type HostCtx, type PortLike } from '../host-context.js';
19
+ /**
20
+ * Handle one inbound message from a port.
21
+ *
22
+ * This is the primary unit-testable seam. Tests create a real `HostCtx`
23
+ * backed by an in-memory pyric sandbox and call this function directly
24
+ * with fake port objects, exercising the full op+subscription lifecycle
25
+ * without a real SharedWorker.
26
+ */
27
+ export declare function handleMessage(ctx: HostCtx, port: PortLike, msg: InboundMessage): Promise<void>;
28
+ /**
29
+ * Tear down all subscriptions for a disconnected port.
30
+ * Called when a port's `close` event fires (browser best-effort) or
31
+ * when the entry point explicitly cleans up a port.
32
+ */
33
+ export declare function cleanupPort(ctx: HostCtx, port: PortLike): void;
34
+ //# sourceMappingURL=dispatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../../../src/serve/worker/host/dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,cAAc,EAA0B,MAAM,gBAAgB,CAAC;AAe7E,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAY,MAAM,oBAAoB,CAAC;AA8G3E;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,QAAQ,EACd,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,IAAI,CAAC,CA8Cf;AA4DD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,CAwC9D"}
@@ -0,0 +1,267 @@
1
+ /**
2
+ * SharedWorker host — the message dispatcher + port cleanup.
3
+ *
4
+ * The top of the host: `handleMessage` opens the op's ambient-provenance
5
+ * window and hands to `dispatchMessage`, which peels off the auth / AI /
6
+ * messaging / event families (their sibling `host-*.ts` modules), then routes
7
+ * ops to `handleOp` (the firestore/rules/admin/rtdb/storage/connection/studio
8
+ * orchestrator) and subs to the subscription registry. `cleanupPort` tears a
9
+ * disconnected port's per-subsystem state down.
10
+ *
11
+ * `handleOp` resolves the op's Firestore handle ONCE (the `db`/`lens`
12
+ * preamble) — the eager lens/session resolution every op sees — then dispatches
13
+ * to the per-family `handle*Op` handlers. This is the single unit-testable seam:
14
+ * tests build a real `HostCtx` over an in-memory sandbox and call
15
+ * `handleMessage` directly with fake ports.
16
+ */
17
+ import { isAuthSub, isEventSub, isRtdbSub, isAiSub, isMessagingSub, isPresenceSub, } from '../protocol.js';
18
+ // The canonical agent tool dispatcher — reused on the worker so a bridged agent
19
+ // executes against THIS sandbox (one backend for app + Studio + agent), instead
20
+ // of a separate in-page sandbox.
21
+ import { buildSandboxDispatcher } from '../../../bridge/client/dispatch.js';
22
+ import { firebaseOptionsEqual } from 'pyric/app/internal';
23
+ import { ok, fail } from '../host-context.js';
24
+ import { authSubsFor, isAuthOp, handleAuthOp, handleAuthSub, handleAuthUnsub, cleanupPortSession, } from '../host-auth.js';
25
+ import { eventSubsFor, handleEventSub, handleEventUnsub, } from '../host-events.js';
26
+ import { isAiOp, handleAiOp, handleAiSub } from '../host-ai.js';
27
+ import { isMessagingOp, handleMessagingOp, handleMessagingSub, cleanupPortMessaging, } from '../host-messaging.js';
28
+ import { lensDb, lensProvenance, sessionDb, opProvenance, } from './core.js';
29
+ import { isFirestoreReadOp, handleFirestoreReadOp } from './firestore-reads.js';
30
+ import { isFirestoreWriteOp, handleFirestoreWriteOp } from './firestore-writes.js';
31
+ import { isRulesOp, handleRulesOp } from './rules.js';
32
+ import { isAdminFirestoreOp, handleAdminFirestoreOp } from './admin-firestore.js';
33
+ import { isRtdbOp, handleRtdbOp } from './rtdb.js';
34
+ import { isStorageOp, handleStorageOp } from './storage.js';
35
+ import { isConnectionOp, handleConnectionOp } from './connection.js';
36
+ import { isStudioOp, handleStudioOp } from './studio.js';
37
+ import { isPresenceOp, handlePresenceOp, handlePresenceSub, handlePresenceUnsub, cleanupPortPresence, } from './presence.js';
38
+ import { handleSub, handleRtdbSub, handleUnsub, dropPortSessionSubs } from './subscriptions.js';
39
+ function configConflictError() {
40
+ return Object.assign(new Error('Pyric currently supports one Firebase configuration per runtime'), { code: 'app/multiple-configs-not-supported' });
41
+ }
42
+ // ─── Op orchestrator ────────────────────────────────────────────────────────
43
+ async function handleOp(ctx, port, msg) {
44
+ // Explicit lens (Studio admin / as / app-session) → lensDb; no lens → the
45
+ // PORT'S SESSION (#754), so app ops run as whoever this tab signed in as.
46
+ const db = msg.actAs ? lensDb(ctx, msg.actAs) : sessionDb(ctx, port);
47
+ // Provenance the op runs under. Stamped onto the unified event stream's
48
+ // `authLens` by the emit path (C1 field / T1 emit). For `{ mode: 'as', uid }`
49
+ // the resolved `db` already carries `auth: { uid }`, so a rules eval emits
50
+ // under that identity; `lens` is the canonical normalised value the host
51
+ // hands forward when the explicit emit-time stamp seam exists (see lensProvenance).
52
+ const lens = lensProvenance(msg.actAs);
53
+ void lens;
54
+ // Firestore reads/writes run against the resolved `db` (lens/session)
55
+ // computed above; peeled off to their family modules.
56
+ if (isFirestoreReadOp(msg.method))
57
+ return handleFirestoreReadOp(ctx, port, msg, db);
58
+ if (isFirestoreWriteOp(msg.method))
59
+ return handleFirestoreWriteOp(ctx, port, msg, db);
60
+ if (isRulesOp(msg.method))
61
+ return handleRulesOp(ctx, port, msg, db);
62
+ if (isAdminFirestoreOp(msg.method))
63
+ return handleAdminFirestoreOp(ctx, port, msg);
64
+ if (isRtdbOp(msg.method))
65
+ return handleRtdbOp(ctx, port, msg);
66
+ if (isStorageOp(msg.method))
67
+ return handleStorageOp(ctx, port, msg);
68
+ if (isConnectionOp(msg.method))
69
+ return handleConnectionOp(ctx, port, msg);
70
+ if (isStudioOp(msg.method))
71
+ return handleStudioOp(ctx, port, msg);
72
+ if (isPresenceOp(msg.method))
73
+ return handlePresenceOp(ctx, port, msg);
74
+ // Auth (`auth.*`), AI (`ai.*`), and messaging (`messaging.*`) ops are routed
75
+ // to their handlers by dispatchMessage BEFORE reaching handleOp, so any
76
+ // method landing here is genuinely unknown.
77
+ fail(port, msg.id, new Error(`Unknown method: ${String(msg.method)}`));
78
+ }
79
+ // ─── Main dispatch ────────────────────────────────────────────────────────
80
+ /**
81
+ * Agent tool-call dispatch. The bridge peer forwards `tool` messages so the
82
+ * agent runs the canonical sandbox tool set against THIS worker's sandbox (the
83
+ * same instance the app + Studio use) instead of a separate in-page backend.
84
+ * Replies with a `res` whose value is the `{ ok, summary, data }` result.
85
+ */
86
+ async function handleTool(ctx, port, msg) {
87
+ try {
88
+ ctx.toolDispatch ??= buildSandboxDispatcher(ctx.sandbox);
89
+ const result = await ctx.toolDispatch(msg.name, msg.args ?? {});
90
+ // Pre-serialize via JSON BEFORE the structured-clone hop over the port. Read
91
+ // results carry real firebase wrapper instances (Timestamp/GeoPoint/Bytes/
92
+ // VectorValue) whose toJSON() produces the canonical agent-facing shapes.
93
+ // structuredClone would strip those prototypes (losing toJSON) and post
94
+ // mangled internals, and would throw DataCloneError on any non-cloneable
95
+ // field. JSON.stringify here runs toJSON() while the instances are intact and
96
+ // yields a plain, clone-safe object — matching the in-page path, which
97
+ // JSON-stringified at the bridge. A serialization error lands in the catch
98
+ // below, never in postMessage.
99
+ ok(port, msg.id, JSON.parse(JSON.stringify(result)));
100
+ }
101
+ catch (e) {
102
+ fail(port, msg.id, e);
103
+ }
104
+ }
105
+ /**
106
+ * Handle one inbound message from a port.
107
+ *
108
+ * This is the primary unit-testable seam. Tests create a real `HostCtx`
109
+ * backed by an in-memory pyric sandbox and call this function directly
110
+ * with fake port objects, exercising the full op+subscription lifecycle
111
+ * without a real SharedWorker.
112
+ */
113
+ export async function handleMessage(ctx, port, msg) {
114
+ if (msg.t === 'appConfig') {
115
+ if (ctx.appOptions === undefined) {
116
+ ctx.appOptions = structuredClone(msg.options);
117
+ }
118
+ else if (!firebaseOptionsEqual(ctx.appOptions, msg.options)) {
119
+ (ctx.rejectedConfigPorts ??= new WeakSet()).add(port);
120
+ }
121
+ return;
122
+ }
123
+ // A rejected app port still owns host-side resources until its explicit
124
+ // disconnect handshake completes. Never swallow that teardown frame.
125
+ if (ctx.rejectedConfigPorts?.has(port) && msg.t !== 'disconnect') {
126
+ if (msg.t === 'op' || msg.t === 'tool') {
127
+ fail(port, msg.id, configConflictError());
128
+ }
129
+ else if (msg.t === 'sub' && msg.target !== 'events') {
130
+ const error = configConflictError();
131
+ port.postMessage({
132
+ t: 'snap',
133
+ subId: msg.subId,
134
+ value: { __error: { code: error.code, message: error.message } },
135
+ });
136
+ }
137
+ return;
138
+ }
139
+ if (ctx.disconnectedPorts?.has(port) && msg.t !== 'disconnect') {
140
+ if (msg.t === 'op' || msg.t === 'tool') {
141
+ fail(port, msg.id, Object.assign(new Error('Firebase App was deleted'), { code: 'app/app-deleted' }));
142
+ }
143
+ return;
144
+ }
145
+ // Op provenance, bound at dispatch by `opProvenance` (see its docs). Opened
146
+ // as the sandbox's SYNCHRONOUS ambient window so firestore/rtdb/auth emits —
147
+ // which run inside `dispatchMessage` before any await — pick it up. Storage
148
+ // ops emit AFTER async awaits, outside this window, so they thread the same
149
+ // provenance EXPLICITLY instead (see `handleOp`'s storage cases). Without the
150
+ // lens on admin ops, `verdictFor` mislabeled a rules BYPASS as ALLOW (the
151
+ // RTDB/Firestore asymmetry the traffic-metrics work flagged).
152
+ const prov = opProvenance(msg);
153
+ if (prov && ctx.sandbox.runWithProvenance) {
154
+ return ctx.sandbox.runWithProvenance(prov, () => dispatchMessage(ctx, port, msg));
155
+ }
156
+ return dispatchMessage(ctx, port, msg);
157
+ }
158
+ async function dispatchMessage(ctx, port, msg) {
159
+ if (msg.t === 'op') {
160
+ if (isAuthOp(msg.method)) {
161
+ await handleAuthOp(ctx, port, msg);
162
+ }
163
+ else if (isAiOp(msg.method)) {
164
+ await handleAiOp(ctx, port, msg);
165
+ }
166
+ else if (isMessagingOp(msg.method)) {
167
+ await handleMessagingOp(ctx, port, msg);
168
+ }
169
+ else {
170
+ await handleOp(ctx, port, msg);
171
+ }
172
+ }
173
+ else if (msg.t === 'sub') {
174
+ if (isAuthSub(msg)) {
175
+ handleAuthSub(ctx, port, msg);
176
+ }
177
+ else if (isEventSub(msg)) {
178
+ handleEventSub(ctx, port, msg);
179
+ }
180
+ else if (isRtdbSub(msg)) {
181
+ handleRtdbSub(ctx, port, msg);
182
+ }
183
+ else if (isAiSub(msg)) {
184
+ // AI streams are FINITE subs registered in ctx.subs (so `unsub` cancels
185
+ // them); they auto-unsub on the terminal done/error snap. host-ai.ts.
186
+ handleAiSub(ctx, port, msg);
187
+ }
188
+ else if (isMessagingSub(msg)) {
189
+ handleMessagingSub(ctx, port, msg);
190
+ }
191
+ else if (isPresenceSub(msg)) {
192
+ handlePresenceSub(ctx, port, msg);
193
+ }
194
+ else {
195
+ handleSub(ctx, port, msg);
196
+ }
197
+ }
198
+ else if (msg.t === 'unsub') {
199
+ // An unsub may target an auth sub, an event-stream sub, a presence sub, or
200
+ // a Firestore listener — try the cheap routing registries first, then fall
201
+ // through to the Firestore listener teardown.
202
+ if (!handleAuthUnsub(ctx, port, msg.subId) &&
203
+ !handleEventUnsub(ctx, port, msg.subId) &&
204
+ !handlePresenceUnsub(ctx, port, msg.subId)) {
205
+ handleUnsub(ctx, port, msg);
206
+ }
207
+ }
208
+ else if (msg.t === 'disconnect') {
209
+ try {
210
+ cleanupPort(ctx, port);
211
+ ok(port, msg.id, undefined);
212
+ }
213
+ catch (error) {
214
+ fail(port, msg.id, error);
215
+ }
216
+ }
217
+ else if (msg.t === 'tool') {
218
+ await handleTool(ctx, port, msg);
219
+ }
220
+ }
221
+ // ─── Port cleanup ─────────────────────────────────────────────────────────
222
+ /**
223
+ * Tear down all subscriptions for a disconnected port.
224
+ * Called when a port's `close` event fires (browser best-effort) or
225
+ * when the entry point explicitly cleans up a port.
226
+ */
227
+ export function cleanupPort(ctx, port) {
228
+ (ctx.disconnectedPorts ??= new WeakSet()).add(port);
229
+ const failures = [];
230
+ const attempt = (cleanup) => {
231
+ try {
232
+ cleanup();
233
+ }
234
+ catch (error) {
235
+ failures.push(error);
236
+ }
237
+ };
238
+ // Drop the port's auth subscriptions (routing entries — no real listener
239
+ // to tear down), its per-port session, and its session-bound sub records
240
+ // (#754).
241
+ attempt(() => { authSubsFor(ctx).delete(port); });
242
+ attempt(() => { cleanupPortSession(ctx, port); });
243
+ attempt(() => { dropPortSessionSubs(ctx, port); });
244
+ // Drop the port's event-stream subscriptions too (also routing entries off
245
+ // the single shared `sandbox.onEvent` subscription — nothing to unsubscribe,
246
+ // just stop fanning out to a dead port).
247
+ attempt(() => { eventSubsFor(ctx).delete(port); });
248
+ // Drop the port's messaging broker client so a closed tab's last-reported
249
+ // visibility stops feeding the routing rule. Its delivery-handler unsubs
250
+ // live in `ctx.subs` and are torn down with the loop below.
251
+ attempt(() => { cleanupPortMessaging(ctx, port); });
252
+ // Presence: best-effort remove this port's logical client when it was the
253
+ // last association (lease expiry remains the correctness path).
254
+ attempt(() => { cleanupPortPresence(ctx, port); });
255
+ const portSubs = ctx.subs.get(port);
256
+ if (portSubs) {
257
+ for (const unsub of portSubs.values())
258
+ attempt(unsub);
259
+ ctx.subs.delete(port);
260
+ }
261
+ if (failures.length === 1)
262
+ throw failures[0];
263
+ if (failures.length > 1) {
264
+ throw new AggregateError(failures, 'Multiple SharedWorker port resources failed to tear down');
265
+ }
266
+ }
267
+ //# sourceMappingURL=dispatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatch.js","sourceRoot":"","sources":["../../../../src/serve/worker/host/dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,OAAO,EACP,cAAc,EACd,aAAa,GACd,MAAM,g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ACpC,IAAI,QAAQ,EAAE,CAAC;QACb,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,MAAM,EAAE;YAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QACtD,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC7C,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,cAAc,CAAC,QAAQ,EAAE,0DAA0D,CAAC,CAAC;IACjG,CAAC;AACH,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * SharedWorker host — Firestore read + aggregate + keyspace ops.
3
+ *
4
+ * The rule-gated read surface: `getDoc`/`getDocs`, the `count`/`aggregate`
5
+ * server aggregations, and the lens-independent keyspace enumeration
6
+ * (`listRootCollections`/`listSubcollections`, the Pyric Studio data browse).
7
+ *
8
+ * Routed here by the host dispatcher (host/dispatch.ts) with the op's resolved
9
+ * Firestore handle (`db` — already lens/session-resolved). This module never
10
+ * imports the dispatcher; it leans only on host-context + host/core.
11
+ */
12
+ import { type Firestore } from 'pyric/firestore';
13
+ import type { OpMessage } from '../protocol.js';
14
+ import { type HostCtx, type PortLike } from '../host-context.js';
15
+ export declare function isFirestoreReadOp(method: OpMessage['method']): boolean;
16
+ export declare function handleFirestoreReadOp(ctx: HostCtx, port: PortLike, msg: OpMessage, db: Firestore): Promise<void>;
17
+ //# sourceMappingURL=firestore-reads.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"firestore-reads.d.ts","sourceRoot":"","sources":["../../../../src/serve/worker/host/firestore-reads.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAOL,KAAK,SAAS,EAEf,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAY,MAAM,oBAAoB,CAAC;AAa3E,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,GAAG,OAAO,CAEtE;AAED,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,QAAQ,EACd,GAAG,EAAE,SAAS,EACd,EAAE,EAAE,SAAS,GACZ,OAAO,CAAC,IAAI,CAAC,CAqEf"}