@lunora/studio 1.0.0-alpha.37 → 1.0.0-alpha.371

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 (489) hide show
  1. package/README.md +4 -4
  2. package/dist/index.d.mts +1629 -0
  3. package/dist/index.d.ts +1021 -809
  4. package/dist/index.mjs +1 -0
  5. package/dist/mount.d.mts +23 -0
  6. package/dist/mount.d.ts +13 -11
  7. package/dist/mount.mjs +1 -0
  8. package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -0
  9. package/dist/packem_chunks/ApiTab.mjs +1 -0
  10. package/dist/packem_chunks/AuditPanel.mjs +1 -0
  11. package/dist/packem_chunks/DeploymentHealthPanel.mjs +1 -0
  12. package/dist/packem_chunks/ExportImportPanel.mjs +10 -0
  13. package/dist/packem_chunks/FileBrowser.mjs +4 -0
  14. package/dist/packem_chunks/FunctionRunner.mjs +1 -0
  15. package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -0
  16. package/dist/packem_chunks/HealthPanel.mjs +1 -0
  17. package/dist/packem_chunks/InsightsPanel.mjs +1 -0
  18. package/dist/packem_chunks/LogsPanel.mjs +1 -0
  19. package/dist/packem_chunks/MailPanel.mjs +2 -0
  20. package/dist/packem_chunks/MetricsPanel.mjs +1 -0
  21. package/dist/packem_chunks/NotificationsPanel.mjs +1 -0
  22. package/dist/packem_chunks/PitrPanel.mjs +1 -0
  23. package/dist/packem_chunks/SchemaViewer.mjs +1 -0
  24. package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -0
  25. package/dist/packem_chunks/SettingsPanel.mjs +1 -0
  26. package/dist/packem_chunks/SqlEditorPanel.mjs +25 -0
  27. package/dist/packem_chunks/TableEditor.mjs +1 -0
  28. package/dist/packem_chunks/agents-panel.mjs +1 -0
  29. package/dist/packem_chunks/ai-knowledge.mjs +1 -0
  30. package/dist/packem_chunks/ai-usage-panel.mjs +1 -0
  31. package/dist/packem_chunks/analytics-panel.mjs +1 -0
  32. package/dist/packem_chunks/architecture-panel.mjs +1 -0
  33. package/dist/packem_chunks/assistant-panel.mjs +3 -0
  34. package/dist/packem_chunks/auth-audit-panel.mjs +1 -0
  35. package/dist/packem_chunks/auth-config-panel.mjs +1 -0
  36. package/dist/packem_chunks/auth-sessions-panel.mjs +1 -0
  37. package/dist/packem_chunks/containers-panel.mjs +1 -0
  38. package/dist/packem_chunks/dashboards-panel.mjs +1 -0
  39. package/dist/packem_chunks/evals-panel.mjs +1 -0
  40. package/dist/packem_chunks/fanout-panel.mjs +1 -0
  41. package/dist/packem_chunks/flags-panel.mjs +1 -0
  42. package/dist/packem_chunks/issues-panel.mjs +1 -0
  43. package/dist/packem_chunks/kv-browser.mjs +1 -0
  44. package/dist/packem_chunks/log-drains-panel.mjs +4 -0
  45. package/dist/packem_chunks/migrations-route.mjs +1 -0
  46. package/dist/packem_chunks/organizations-panel.mjs +1 -0
  47. package/dist/packem_chunks/payments-panel.mjs +1 -0
  48. package/dist/packem_chunks/permissions-panel.mjs +1 -0
  49. package/dist/packem_chunks/privacy-requests-panel.mjs +1 -0
  50. package/dist/packem_chunks/queues-panel.mjs +1 -0
  51. package/dist/packem_chunks/reactors-panel.mjs +1 -0
  52. package/dist/packem_chunks/rls-panel.mjs +1 -0
  53. package/dist/packem_chunks/schedule-panel.mjs +1 -0
  54. package/dist/packem_chunks/storage-rules-panel.mjs +1 -0
  55. package/dist/packem_chunks/subscriptions-panel.mjs +1 -0
  56. package/dist/packem_chunks/sync-client-panel.mjs +1 -0
  57. package/dist/packem_chunks/theme-indicator.mjs +1 -0
  58. package/dist/packem_chunks/traces-panel.mjs +1 -0
  59. package/dist/packem_chunks/users-panel.mjs +1 -0
  60. package/dist/packem_chunks/vector-browser.mjs +1 -0
  61. package/dist/packem_chunks/workflows-panel.mjs +1 -0
  62. package/dist/packem_shared/ADMIN_FUNCTIONS-C6U-ugro.mjs +1 -0
  63. package/dist/packem_shared/ApiDocsPanel-xqgxgYCy.mjs +2 -0
  64. package/dist/packem_shared/ApiReferencePanel-CQxU1Ocx.mjs +1 -0
  65. package/dist/packem_shared/CommandPalette-BZCHLpst.mjs +1 -0
  66. package/dist/packem_shared/ConfirmButton-CIXYF6Mg.mjs +1 -0
  67. package/dist/packem_shared/ConnectionBadge-BfcoN-VE.mjs +1 -0
  68. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Py5Yx7rP.mjs +1 -0
  69. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs +1 -0
  70. package/dist/packem_shared/DEFAULT_LOCALE-BQ3jRT74.mjs +1 -0
  71. package/dist/packem_shared/DataBrowser-BrRWqnCr.mjs +4 -0
  72. package/dist/packem_shared/DataFilters--ocFTVT2.mjs +1 -0
  73. package/dist/packem_shared/ErrorBoundary-BWNF98VF.mjs +1 -0
  74. package/dist/packem_shared/GlobalDataBrowser-D8ZheGwm.mjs +1 -0
  75. package/dist/packem_shared/HomePanel-CHq9VBrh.mjs +1 -0
  76. package/dist/packem_shared/MigrationsPanel-BWGgOwmX.mjs +1 -0
  77. package/dist/packem_shared/OpenRpcReferencePanel-BFDG91tn.mjs +1 -0
  78. package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.mjs +1 -0
  79. package/dist/packem_shared/ScheduledJobs-QCTRdugp.mjs +1 -0
  80. package/dist/packem_shared/ShardInput-CoySruKZ.mjs +1 -0
  81. package/dist/packem_shared/Studio-pDEG4JTx.mjs +1 -0
  82. package/dist/packem_shared/StudioApp-C4IOJPR6.mjs +1 -0
  83. package/dist/packem_shared/StudioI18nProvider-CGXCPnQn.mjs +1 -0
  84. package/dist/packem_shared/advisor-view-Dj-mZPAq.mjs +5 -0
  85. package/dist/packem_shared/aggregateMetrics-DKFJc-o5.mjs +1 -0
  86. package/dist/packem_shared/alert-PB5W11MM.mjs +1 -0
  87. package/dist/packem_shared/app.d-BXrVLb99.d.mts +360 -0
  88. package/dist/packem_shared/app.d-BXrVLb99.d.ts +360 -0
  89. package/dist/packem_shared/assistant-provider-BQG7QZAu.mjs +1 -0
  90. package/dist/packem_shared/assistant-reason-D6EwMCxT.mjs +1 -0
  91. package/dist/packem_shared/auth-pager-DW77WeZw.mjs +1 -0
  92. package/dist/packem_shared/badge-r_5B4LHP.mjs +1 -0
  93. package/dist/packem_shared/bar-chart-BCsEIQoQ.mjs +6 -0
  94. package/dist/packem_shared/browser-storage-BH1MxLZs.mjs +1 -0
  95. package/dist/packem_shared/button-q0UYSmrn.mjs +1 -0
  96. package/dist/packem_shared/card-By2O8ULa.mjs +1 -0
  97. package/dist/packem_shared/cf-links-C4DVTr8A.mjs +1 -0
  98. package/dist/packem_shared/checkbox-CnS9cyCz.mjs +1 -0
  99. package/dist/packem_shared/control-button-BOZ5K-FC.mjs +1 -0
  100. package/dist/packem_shared/data-grid-B5m1OosL.mjs +1 -0
  101. package/dist/packem_shared/data-view-params-C-_G-biH.mjs +1 -0
  102. package/dist/packem_shared/diagram-export-panel-Vdt-DZnO.mjs +2 -0
  103. package/dist/packem_shared/dropdown-menu-jLZenfWH.mjs +2 -0
  104. package/dist/packem_shared/empty-state-D7jEML_T.mjs +1 -0
  105. package/dist/packem_shared/error-alert-BzZfqmf4.mjs +6 -0
  106. package/dist/packem_shared/grid-features-Drvfswwy.mjs +6 -0
  107. package/dist/packem_shared/grid-pagination-DY2erU65.mjs +1 -0
  108. package/dist/packem_shared/home-panel-DTWHlX5S.mjs +3 -0
  109. package/dist/packem_shared/input-CXhxesPC.mjs +1 -0
  110. package/dist/packem_shared/internal-hIuTpSbx.mjs +2 -0
  111. package/dist/packem_shared/label-DKFzyHq6.mjs +1 -0
  112. package/dist/packem_shared/live-status-D1GasNsH.mjs +1 -0
  113. package/dist/packem_shared/log-fields-BolUoZ9g.mjs +1 -0
  114. package/dist/packem_shared/log-line-BH0iWiBv.mjs +1 -0
  115. package/dist/packem_shared/metrics-format-1sNGG47R.mjs +1 -0
  116. package/dist/packem_shared/modal-shell-CDztwLnv.mjs +1 -0
  117. package/dist/packem_shared/operation-console-provider-DoloEvon.mjs +1 -0
  118. package/dist/packem_shared/recording-client-z4CBi0y8.mjs +1 -0
  119. package/dist/packem_shared/reference-view-DENugPcj.mjs +13 -0
  120. package/dist/packem_shared/schema-diagram-CtVPhOGj.mjs +2 -0
  121. package/dist/packem_shared/scroll-area-CXCQH7VT.mjs +2 -0
  122. package/dist/packem_shared/select-DPyS18Vy.mjs +2 -0
  123. package/dist/packem_shared/shard-history-CaO3C4KQ.mjs +1 -0
  124. package/dist/packem_shared/shortcuts-B9gDaXmw.mjs +1 -0
  125. package/dist/packem_shared/skeleton-DX1gfixl.mjs +1 -0
  126. package/dist/packem_shared/sparkline-B_sPPO_8.mjs +1 -0
  127. package/dist/packem_shared/sql-result-table-DCwooMGW.mjs +1 -0
  128. package/dist/packem_shared/stat-card-BAv73QtB.mjs +1 -0
  129. package/dist/packem_shared/storage-tier-C2mKwYRj.mjs +1 -0
  130. package/dist/packem_shared/studio-DE7i2--m.mjs +2 -0
  131. package/dist/packem_shared/table-D0SBiDu-.mjs +2 -0
  132. package/dist/packem_shared/table-list-sidebar-DUnCjFL7.mjs +1 -0
  133. package/dist/packem_shared/textarea--40GKAyz.mjs +1 -0
  134. package/dist/packem_shared/trace-handoff-BV3EWqy_.mjs +1 -0
  135. package/dist/packem_shared/use-admin-query-CaOm4JS3.mjs +1 -0
  136. package/dist/packem_shared/use-admin-spec-CK7mk3Ui.mjs +1 -0
  137. package/dist/packem_shared/use-assistant-rpc-DCC6ph2u.mjs +1 -0
  138. package/dist/packem_shared/use-async-submit-D0r7-m2J.mjs +1 -0
  139. package/dist/packem_shared/use-auth-config-CG7VvAvQ.mjs +1 -0
  140. package/dist/packem_shared/use-mirrored-ref-CVDf2z1M.mjs +1 -0
  141. package/dist/packem_shared/use-open-trace-BJKMJjeS.mjs +1 -0
  142. package/dist/packem_shared/use-shard-key-BsP3o5wT.mjs +1 -0
  143. package/dist/packem_shared/use-studio-client-DCA50tF2.mjs +1 -0
  144. package/dist/packem_shared/useDebounced-DVeQ5-oW.mjs +1 -0
  145. package/dist/packem_shared/utils-bhneXptQ.mjs +1 -0
  146. package/dist/packem_shared/virtual-rect-D_j7aLxX.mjs +1 -0
  147. package/dist/standalone/chunk-23TGXTY3.js +1 -0
  148. package/dist/standalone/chunk-2BN5NW34.js +1 -0
  149. package/dist/standalone/chunk-2DT3QG6Q.js +1 -0
  150. package/dist/standalone/chunk-2EB7FN5S.js +1 -0
  151. package/dist/standalone/chunk-2STFVRP6.js +1 -0
  152. package/dist/standalone/chunk-2WELEPUX.js +14 -0
  153. package/dist/standalone/chunk-34E6NNQZ.js +1 -0
  154. package/dist/standalone/chunk-35IQT6SS.js +7 -0
  155. package/dist/standalone/chunk-3D67ZJRW.js +1 -0
  156. package/dist/standalone/chunk-3HR74V73.js +1 -0
  157. package/dist/standalone/chunk-3NC6JA7A.js +1 -0
  158. package/dist/standalone/chunk-43VARWUD.js +1 -0
  159. package/dist/standalone/chunk-4AJML27P.js +1 -0
  160. package/dist/standalone/chunk-4EPW63HS.js +1 -0
  161. package/dist/standalone/chunk-4M223MUW.js +1 -0
  162. package/dist/standalone/chunk-4NKJV7YX.js +1 -0
  163. package/dist/standalone/chunk-4PI2OSSP.js +1 -0
  164. package/dist/standalone/chunk-5IXKYP7I.js +1 -0
  165. package/dist/standalone/chunk-5PEAXTYQ.js +1 -0
  166. package/dist/standalone/chunk-5REEK2HD.js +1 -0
  167. package/dist/standalone/chunk-5W5XLOZO.js +1 -0
  168. package/dist/standalone/chunk-5Y67VCSW.js +1 -0
  169. package/dist/standalone/chunk-64WVI7AU.js +1 -0
  170. package/dist/standalone/chunk-6A6AELDJ.js +1 -0
  171. package/dist/standalone/chunk-6DU2UW57.js +33 -0
  172. package/dist/standalone/chunk-6FPV3EK2.js +1 -0
  173. package/dist/standalone/chunk-6G3E4PJ2.js +1 -0
  174. package/dist/standalone/chunk-72PNA5CK.js +1 -0
  175. package/dist/standalone/chunk-73GEDGFE.js +1 -0
  176. package/dist/standalone/chunk-74WS3GUC.js +3 -0
  177. package/dist/standalone/chunk-A2Q3TGIQ.js +1 -0
  178. package/dist/standalone/chunk-AHANHVFC.js +1 -0
  179. package/dist/standalone/chunk-ALXTADCX.js +10 -0
  180. package/dist/standalone/chunk-AXKOMM2J.js +1 -0
  181. package/dist/standalone/chunk-BG2CJOVS.js +1 -0
  182. package/dist/standalone/chunk-BKI3JMXQ.js +1 -0
  183. package/dist/standalone/chunk-BO35TSLE.js +1 -0
  184. package/dist/standalone/chunk-BWT5ANXC.js +1 -0
  185. package/dist/standalone/chunk-C724GMPR.js +1 -0
  186. package/dist/standalone/chunk-CHJYRPLL.js +6 -0
  187. package/dist/standalone/chunk-CKK227GJ.js +1 -0
  188. package/dist/standalone/chunk-CL3JOU6F.js +1 -0
  189. package/dist/standalone/chunk-CVSIFPI5.js +1 -0
  190. package/dist/standalone/chunk-D65UVZIA.js +1 -0
  191. package/dist/standalone/chunk-DA2CAFXI.js +1 -0
  192. package/dist/standalone/chunk-DFOIQN5E.js +1 -0
  193. package/dist/standalone/chunk-EDN4JTLK.js +1 -0
  194. package/dist/standalone/chunk-FVITJ4Q4.js +1 -0
  195. package/dist/standalone/chunk-FWJ7VSGQ.js +1 -0
  196. package/dist/standalone/chunk-FWM5Z6CH.js +1 -0
  197. package/dist/standalone/chunk-G2BUKFAD.js +1 -0
  198. package/dist/standalone/chunk-G6IFVCSL.js +1 -0
  199. package/dist/standalone/chunk-GN3GGVCY.js +1 -0
  200. package/dist/standalone/chunk-GWNGVKLG.js +1 -0
  201. package/dist/standalone/chunk-GXTSE66Z.js +1 -0
  202. package/dist/standalone/chunk-HAVIBMMB.js +1 -0
  203. package/dist/standalone/chunk-HCOF7HOM.js +1 -0
  204. package/dist/standalone/chunk-HDBRX5CX.js +1 -0
  205. package/dist/standalone/chunk-HFBSWKJS.js +1 -0
  206. package/dist/standalone/chunk-HG3MXWXT.js +1 -0
  207. package/dist/standalone/chunk-HRH5FYV6.js +1 -0
  208. package/dist/standalone/chunk-I2EFWZXX.js +3 -0
  209. package/dist/standalone/chunk-IJAZY2M7.js +1 -0
  210. package/dist/standalone/chunk-IOMK34E4.js +1 -0
  211. package/dist/standalone/chunk-J45HAKBU.js +1 -0
  212. package/dist/standalone/chunk-J4KHSWXK.js +1 -0
  213. package/dist/standalone/chunk-J7NEJGZW.js +1 -0
  214. package/dist/standalone/chunk-JMZT3CEW.js +1 -0
  215. package/dist/standalone/chunk-JW3TXMEF.js +59 -0
  216. package/dist/standalone/chunk-K3LRNI56.js +4 -0
  217. package/dist/standalone/chunk-KGLIQIZU.js +1 -0
  218. package/dist/standalone/chunk-KGURUUEC.js +1 -0
  219. package/dist/standalone/chunk-KQQOOBL5.js +1 -0
  220. package/dist/standalone/chunk-KRWSRKJ3.js +1 -0
  221. package/dist/standalone/chunk-KSFVO6OB.js +1 -0
  222. package/dist/standalone/chunk-KSLMSLWZ.js +30 -0
  223. package/dist/standalone/chunk-KTK4NDWQ.js +1 -0
  224. package/dist/standalone/chunk-LHAYLYCA.js +1 -0
  225. package/dist/standalone/chunk-LRQTVCUX.js +1 -0
  226. package/dist/standalone/chunk-MY7J2X2Y.js +1 -0
  227. package/dist/standalone/chunk-MYRTLPF5.js +1 -0
  228. package/dist/standalone/chunk-N77FOL5Q.js +1 -0
  229. package/dist/standalone/chunk-NGVP66OH.js +1 -0
  230. package/dist/standalone/chunk-O3AZ7JKE.js +1 -0
  231. package/dist/standalone/chunk-O4D6HJOQ.js +1 -0
  232. package/dist/standalone/chunk-OLI3R5ZJ.js +1 -0
  233. package/dist/standalone/chunk-ONTGYVAN.js +1 -0
  234. package/dist/standalone/chunk-OYBBHQRO.js +1 -0
  235. package/dist/standalone/chunk-P2JJ33X3.js +1 -0
  236. package/dist/standalone/chunk-P6VNMPWR.js +1 -0
  237. package/dist/standalone/chunk-PD56UWVC.js +1 -0
  238. package/dist/standalone/chunk-PDBW6GTJ.js +1 -0
  239. package/dist/standalone/chunk-PLLNOYT6.js +1 -0
  240. package/dist/standalone/chunk-PRTIYJFL.js +1 -0
  241. package/dist/standalone/chunk-PYK4VXG6.js +1 -0
  242. package/dist/standalone/chunk-QAOZXPLU.js +1 -0
  243. package/dist/standalone/chunk-QCWPTLPV.js +2 -0
  244. package/dist/standalone/chunk-QK46WKIS.js +1 -0
  245. package/dist/standalone/chunk-QNJJIVLQ.js +1 -0
  246. package/dist/standalone/chunk-QRA7AKYO.js +1 -0
  247. package/dist/standalone/chunk-QTEJHIZD.js +1 -0
  248. package/dist/standalone/chunk-QY5JC5H6.js +1 -0
  249. package/dist/standalone/chunk-RIAOZECW.js +1 -0
  250. package/dist/standalone/chunk-RLSKEGNK.js +1 -0
  251. package/dist/standalone/chunk-RPHIAYMR.js +1 -0
  252. package/dist/standalone/chunk-RPKPLAT2.js +1 -0
  253. package/dist/standalone/chunk-RTS5G3ET.js +2 -0
  254. package/dist/standalone/chunk-RXGN7E4K.js +1 -0
  255. package/dist/standalone/chunk-S36FVTKK.js +1 -0
  256. package/dist/standalone/chunk-S6RKBBI5.js +1 -0
  257. package/dist/standalone/chunk-SEPNNN6O.js +1 -0
  258. package/dist/standalone/chunk-STHN562E.js +1 -0
  259. package/dist/standalone/chunk-SY7AVD6C.js +1 -0
  260. package/dist/standalone/chunk-TDYA6E3G.js +1 -0
  261. package/dist/standalone/chunk-TW4O2BA5.js +159 -0
  262. package/dist/standalone/chunk-U2E36H6V.js +5 -0
  263. package/dist/standalone/chunk-U4X2I55T.js +1 -0
  264. package/dist/standalone/chunk-UBX5ZPLV.js +1 -0
  265. package/dist/standalone/chunk-UMDBJGZH.js +1 -0
  266. package/dist/standalone/chunk-UQZUK6MO.js +1 -0
  267. package/dist/standalone/chunk-URNEEX2Q.js +1 -0
  268. package/dist/standalone/chunk-UTE2SZQY.js +1 -0
  269. package/dist/standalone/chunk-VCLCELNQ.js +8 -0
  270. package/dist/standalone/chunk-VHRWGZVT.js +1 -0
  271. package/dist/standalone/chunk-VNH4OBJS.js +1 -0
  272. package/dist/standalone/chunk-VUOEJJUH.js +1 -0
  273. package/dist/standalone/chunk-WMF3KFRB.js +1 -0
  274. package/dist/standalone/chunk-WUJWIBTQ.js +1 -0
  275. package/dist/standalone/chunk-X7TFLK6L.js +5 -0
  276. package/dist/standalone/chunk-XAI64L2D.js +1 -0
  277. package/dist/standalone/chunk-XIJQY7MK.js +4 -0
  278. package/dist/standalone/chunk-XLYFGUEF.js +1 -0
  279. package/dist/standalone/chunk-Y23CK77V.js +1 -0
  280. package/dist/standalone/{chunk-BJGBHGK3.js → chunk-Y2YLTUMD.js} +1 -1
  281. package/dist/standalone/chunk-YEMTJB7N.js +1 -0
  282. package/dist/standalone/chunk-YORPLSI5.js +1 -0
  283. package/dist/standalone/chunk-YUVGMKHG.js +1 -0
  284. package/dist/standalone/chunk-Z4VISCXI.js +1 -0
  285. package/dist/standalone/chunk-ZN6LJWXV.js +6 -0
  286. package/dist/standalone/chunk-ZPQBVYNN.js +1 -0
  287. package/dist/standalone/chunk-ZSWW2UGP.js +1 -0
  288. package/dist/standalone/chunk-ZYARVDS6.js +1 -0
  289. package/dist/standalone/chunk-ZYGPKYEU.js +3 -0
  290. package/dist/standalone/studio.js +9 -214
  291. package/dist/styles.css +2 -2
  292. package/package.json +27 -22
  293. package/dist/index.js +0 -41
  294. package/dist/mount.js +0 -27
  295. package/dist/packem_chunks/ApiTab.js +0 -251
  296. package/dist/packem_chunks/AuditPanel.js +0 -200
  297. package/dist/packem_chunks/ExportImportPanel.js +0 -198
  298. package/dist/packem_chunks/FileBrowser.js +0 -2932
  299. package/dist/packem_chunks/FunctionRunner.js +0 -343
  300. package/dist/packem_chunks/FunctionStatsPanel.js +0 -377
  301. package/dist/packem_chunks/HealthPanel.js +0 -648
  302. package/dist/packem_chunks/InsightsPanel.js +0 -462
  303. package/dist/packem_chunks/LogsPanel.js +0 -827
  304. package/dist/packem_chunks/MailPanel.js +0 -353
  305. package/dist/packem_chunks/MetricsPanel.js +0 -1344
  306. package/dist/packem_chunks/MigrationsPanel.js +0 -239
  307. package/dist/packem_chunks/PitrPanel.js +0 -252
  308. package/dist/packem_chunks/SchemaViewer.js +0 -2513
  309. package/dist/packem_chunks/SecurityAdvisorPanel.js +0 -95
  310. package/dist/packem_chunks/SettingsPanel.js +0 -391
  311. package/dist/packem_chunks/SqlEditorPanel.js +0 -2323
  312. package/dist/packem_chunks/TableEditor.js +0 -313
  313. package/dist/packem_chunks/analytics-panel.js +0 -261
  314. package/dist/packem_chunks/auth-config-panel.js +0 -179
  315. package/dist/packem_chunks/auth-sessions-panel.js +0 -175
  316. package/dist/packem_chunks/containers-panel.js +0 -247
  317. package/dist/packem_chunks/dashboards-panel.js +0 -780
  318. package/dist/packem_chunks/fanout-panel.js +0 -482
  319. package/dist/packem_chunks/flags-panel.js +0 -176
  320. package/dist/packem_chunks/kv-browser.js +0 -1896
  321. package/dist/packem_chunks/log-drains-panel.js +0 -273
  322. package/dist/packem_chunks/organizations-panel.js +0 -670
  323. package/dist/packem_chunks/payments-panel.js +0 -186
  324. package/dist/packem_chunks/permissions-panel.js +0 -805
  325. package/dist/packem_chunks/queues-panel.js +0 -1052
  326. package/dist/packem_chunks/rls-panel.js +0 -315
  327. package/dist/packem_chunks/schedule-panel.js +0 -831
  328. package/dist/packem_chunks/sparkline.js +0 -79
  329. package/dist/packem_chunks/storage-rules-panel.js +0 -140
  330. package/dist/packem_chunks/subscriptions-panel.js +0 -238
  331. package/dist/packem_chunks/users-panel.js +0 -1265
  332. package/dist/packem_chunks/vector-browser.js +0 -281
  333. package/dist/packem_chunks/workflows-panel.js +0 -562
  334. package/dist/packem_shared/ADMIN_FUNCTIONS-BHHJi3Gb.js +0 -52
  335. package/dist/packem_shared/ApiDocsPanel-D4CJf2ad.js +0 -842
  336. package/dist/packem_shared/ApiReferencePanel-Co_wpRF2.js +0 -230
  337. package/dist/packem_shared/CommandPalette-BUPpbpMc.js +0 -373
  338. package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
  339. package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
  340. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
  341. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
  342. package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
  343. package/dist/packem_shared/DataBrowser-BeVNxSVm.js +0 -4493
  344. package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
  345. package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
  346. package/dist/packem_shared/GlobalDataBrowser-ErfvIs1S.js +0 -289
  347. package/dist/packem_shared/HomePanel-D9MQk8I7.js +0 -14
  348. package/dist/packem_shared/OpenRpcReferencePanel-DLWzrIx9.js +0 -192
  349. package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
  350. package/dist/packem_shared/ScheduledJobs-ClaNpZsg.js +0 -262
  351. package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
  352. package/dist/packem_shared/Studio-C48P1K5W.js +0 -16
  353. package/dist/packem_shared/StudioApp-Cqh-SYm2.js +0 -657
  354. package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
  355. package/dist/packem_shared/advisor-view-D3-U4kRR.js +0 -159
  356. package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
  357. package/dist/packem_shared/alert-CdAET2K_.js +0 -68
  358. package/dist/packem_shared/app.d-CNLRTrWw.d.ts +0 -300
  359. package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
  360. package/dist/packem_shared/bar-chart-DSwcWIRy.js +0 -3246
  361. package/dist/packem_shared/browser-storage-tLOxkIHd.js +0 -185
  362. package/dist/packem_shared/button-BhsN2uZH.js +0 -49
  363. package/dist/packem_shared/card-DURq3ElK.js +0 -175
  364. package/dist/packem_shared/cf-links-BZfRdxSE.js +0 -8
  365. package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
  366. package/dist/packem_shared/data-grid-Jz8FqQ2C.js +0 -183
  367. package/dist/packem_shared/data-view-params-Cd6yRVbv.js +0 -96
  368. package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
  369. package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
  370. package/dist/packem_shared/error-alert-BBT6D22d.js +0 -114
  371. package/dist/packem_shared/grid-features-CUr8Z1_O.js +0 -745
  372. package/dist/packem_shared/home-panel-CoGxi-oj.js +0 -1639
  373. package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
  374. package/dist/packem_shared/internal-DTsYVn-g.js +0 -97
  375. package/dist/packem_shared/label-D8ykjn5J.js +0 -46
  376. package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
  377. package/dist/packem_shared/modal-shell-hyaJvIJ6.js +0 -100
  378. package/dist/packem_shared/reference-view-CSKyUyPl.js +0 -2141
  379. package/dist/packem_shared/scroll-area-DLhcy-ml.js +0 -93
  380. package/dist/packem_shared/select-UkNYCT3s.js +0 -273
  381. package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
  382. package/dist/packem_shared/skeleton-CGhL0p20.js +0 -45
  383. package/dist/packem_shared/sparkline-BnA1kC9X.js +0 -93
  384. package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
  385. package/dist/packem_shared/studio-CPHA_-3I.js +0 -4015
  386. package/dist/packem_shared/table-DsCa9Qp9.js +0 -246
  387. package/dist/packem_shared/table-list-sidebar-B5psdSV1.js +0 -832
  388. package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
  389. package/dist/packem_shared/use-admin-query-BHPKmPuj.js +0 -106
  390. package/dist/packem_shared/use-auth-capabilities-C-VH0oJJ.js +0 -32
  391. package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
  392. package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
  393. package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
  394. package/dist/standalone/chunk-22W5VKZ6.js +0 -1
  395. package/dist/standalone/chunk-2GGMGPEP.js +0 -1
  396. package/dist/standalone/chunk-2K47A3P6.js +0 -1
  397. package/dist/standalone/chunk-2NGUNNGW.js +0 -1
  398. package/dist/standalone/chunk-2THHW7BC.js +0 -1
  399. package/dist/standalone/chunk-3CJW6NWG.js +0 -4
  400. package/dist/standalone/chunk-3OA7PECS.js +0 -6
  401. package/dist/standalone/chunk-46K3NKPA.js +0 -1
  402. package/dist/standalone/chunk-4QHKBC77.js +0 -1
  403. package/dist/standalone/chunk-5OH3VPZF.js +0 -1
  404. package/dist/standalone/chunk-5OIBXYZM.js +0 -1
  405. package/dist/standalone/chunk-6GFEVKJP.js +0 -1
  406. package/dist/standalone/chunk-6WRZP62V.js +0 -1
  407. package/dist/standalone/chunk-764T6X6X.js +0 -1
  408. package/dist/standalone/chunk-7SLSB2TS.js +0 -4
  409. package/dist/standalone/chunk-7TJJXVSE.js +0 -1
  410. package/dist/standalone/chunk-7VF3IAAW.js +0 -2
  411. package/dist/standalone/chunk-AHILM3ZP.js +0 -1
  412. package/dist/standalone/chunk-AJIUI7DD.js +0 -1
  413. package/dist/standalone/chunk-ATYUMPDM.js +0 -1
  414. package/dist/standalone/chunk-BACPICH6.js +0 -1
  415. package/dist/standalone/chunk-BI35RXKQ.js +0 -1
  416. package/dist/standalone/chunk-BOXSWNXZ.js +0 -1
  417. package/dist/standalone/chunk-BQUQS7QN.js +0 -1
  418. package/dist/standalone/chunk-CKSHCYGC.js +0 -2
  419. package/dist/standalone/chunk-DC72CQY4.js +0 -76
  420. package/dist/standalone/chunk-DORBUITF.js +0 -1
  421. package/dist/standalone/chunk-DVC6YWVP.js +0 -1
  422. package/dist/standalone/chunk-DVKPRFIJ.js +0 -1
  423. package/dist/standalone/chunk-DWDILV2E.js +0 -1
  424. package/dist/standalone/chunk-DWTBY343.js +0 -1
  425. package/dist/standalone/chunk-EUIHTPKI.js +0 -1
  426. package/dist/standalone/chunk-FCSPAJW4.js +0 -1
  427. package/dist/standalone/chunk-GMSGZDDH.js +0 -13
  428. package/dist/standalone/chunk-GTM65MVX.js +0 -1
  429. package/dist/standalone/chunk-HV7G6DFP.js +0 -5
  430. package/dist/standalone/chunk-ILCTSAOB.js +0 -1
  431. package/dist/standalone/chunk-IOFMK4D7.js +0 -1
  432. package/dist/standalone/chunk-J6J54MBP.js +0 -1
  433. package/dist/standalone/chunk-JE2YOAB7.js +0 -4
  434. package/dist/standalone/chunk-JSEXCW5Q.js +0 -1
  435. package/dist/standalone/chunk-K3GNLVYK.js +0 -1
  436. package/dist/standalone/chunk-KEGAWN6Y.js +0 -1
  437. package/dist/standalone/chunk-KJJ3WM6H.js +0 -4
  438. package/dist/standalone/chunk-KZ6INM5M.js +0 -1
  439. package/dist/standalone/chunk-LAK5VSPI.js +0 -1
  440. package/dist/standalone/chunk-LD2R263D.js +0 -1
  441. package/dist/standalone/chunk-LI43EKM6.js +0 -1
  442. package/dist/standalone/chunk-M55U7NHO.js +0 -1
  443. package/dist/standalone/chunk-MPTM7ZU3.js +0 -3
  444. package/dist/standalone/chunk-MPYFGAOW.js +0 -1
  445. package/dist/standalone/chunk-NKJDGOM3.js +0 -1
  446. package/dist/standalone/chunk-O3NAGRTR.js +0 -1
  447. package/dist/standalone/chunk-OCHNCAXJ.js +0 -1
  448. package/dist/standalone/chunk-OIZ4CHPN.js +0 -8
  449. package/dist/standalone/chunk-OY3GVYS7.js +0 -4
  450. package/dist/standalone/chunk-PACH5AHG.js +0 -1
  451. package/dist/standalone/chunk-PN5NCZDX.js +0 -1
  452. package/dist/standalone/chunk-PVZI3CXP.js +0 -19
  453. package/dist/standalone/chunk-PZ7HD5T2.js +0 -1
  454. package/dist/standalone/chunk-Q52CHOSY.js +0 -1
  455. package/dist/standalone/chunk-QAFAJBAW.js +0 -1
  456. package/dist/standalone/chunk-QBAT52GB.js +0 -1
  457. package/dist/standalone/chunk-QLM6FYZW.js +0 -2
  458. package/dist/standalone/chunk-RRAFQ5G2.js +0 -1
  459. package/dist/standalone/chunk-RRCPZMC2.js +0 -22
  460. package/dist/standalone/chunk-RSEEHNFI.js +0 -1
  461. package/dist/standalone/chunk-SEU5V7I6.js +0 -1
  462. package/dist/standalone/chunk-SG3ALJJU.js +0 -1
  463. package/dist/standalone/chunk-SLKF2L74.js +0 -1
  464. package/dist/standalone/chunk-TAD43CG5.js +0 -1
  465. package/dist/standalone/chunk-TBMYIZIO.js +0 -1
  466. package/dist/standalone/chunk-TDL7NEWA.js +0 -1
  467. package/dist/standalone/chunk-TO4JQX7W.js +0 -1
  468. package/dist/standalone/chunk-TOJ3TC35.js +0 -1
  469. package/dist/standalone/chunk-TQ36RWOP.js +0 -1
  470. package/dist/standalone/chunk-U4OAQPBT.js +0 -1
  471. package/dist/standalone/chunk-UK64ZSUW.js +0 -1
  472. package/dist/standalone/chunk-VLXV72QE.js +0 -1
  473. package/dist/standalone/chunk-VTGBPW24.js +0 -1
  474. package/dist/standalone/chunk-WI7GWFEG.js +0 -1
  475. package/dist/standalone/chunk-WXPWVBIY.js +0 -1
  476. package/dist/standalone/chunk-X5P2WRYI.js +0 -1
  477. package/dist/standalone/chunk-X7MMBSNW.js +0 -1
  478. package/dist/standalone/chunk-XLQ4BHBD.js +0 -1
  479. package/dist/standalone/chunk-XNJNSCLM.js +0 -1
  480. package/dist/standalone/chunk-XUGSA2NG.js +0 -1
  481. package/dist/standalone/chunk-Y2ZPNDL7.js +0 -4
  482. package/dist/standalone/chunk-YAECF5LW.js +0 -1
  483. package/dist/standalone/chunk-YEVCU7TB.js +0 -13
  484. package/dist/standalone/chunk-ZHVTQ37P.js +0 -1
  485. package/dist/standalone/chunk-ZIGWVHCS.js +0 -1
  486. package/dist/standalone/chunk-ZPP2KOR4.js +0 -1
  487. package/dist/standalone/chunk-ZPUO7FNI.js +0 -1
  488. package/dist/standalone/chunk-ZU4DZ6NK.js +0 -1
  489. package/dist/standalone/chunk-ZYRGPDZB.js +0 -1
@@ -0,0 +1 @@
1
+ import{c as O}from"react/compiler-runtime";import{E as g}from"./empty-state-D7jEML_T.mjs";import{S as y}from"./skeleton-DX1gfixl.mjs";import{u as R}from"./use-admin-spec-CK7mk3Ui.mjs";import{u as S}from"./use-studio-client-DCA50tF2.mjs";import{useT as P}from"./DEFAULT_LOCALE-BQ3jRT74.mjs";import{R as x}from"./reference-view-DENugPcj.mjs";import{jsxs as h,jsx as l}from"react/jsx-runtime";const k=n=>(n.methods??[]).filter(e=>e["x-lunora-function-kind"]!=="stream"),w=n=>(n.params??[]).find(e=>e.name==="args")??(n.params??[])[0],C=n=>n["x-tags"]?.[0]?.name??(n.name.includes(":")?n.name.slice(0,n.name.indexOf(":")):""),I=n=>{const e=w(n)?.schema;return{argsSchema:e,description:n.description,functionPath:n.name,httpPath:"/_lunora/rpc",key:n.name,kind:n["x-lunora-function-kind"],method:"POST",operationId:n.name,requestSchema:e,responses:[{description:n.result?.name,schema:n.result?.schema,status:"200"}],summary:n.summary??n.name,tags:[C(n)],title:n.summary??n.name}},v=n=>{const e=n??{},m=k(e).map(a=>I(a)),r=new Map;for(const a of m){const i=a.tags[0]??"",s=r.get(i)??[];s.push(a),r.set(i,s)}return{groups:[...r.entries()].map(([a,i])=>({name:a,operations:i.toSorted((s,p)=>s.operationId.localeCompare(p.operationId))})).toSorted((a,i)=>a.name.localeCompare(i.name)),operationByKey:new Map(m.map(a=>[a.key,a])),title:e.info?.title??"API reference",version:e.info?.version}},N=n=>k(n).length===0,b=n=>{const e=n;return N(e)?{kind:"empty"}:{kind:"ready",spec:e}},B=n=>{const e=O(23),{spec:m}=n,r=P(),f=S();let a;e[0]!==f?(a=()=>f.fetchOpenRpc(),e[0]=f,e[1]=a):a=e[1];const s=R(m,a,b);let p;e[2]!==s.kind||e[3]!==s.spec?(p=s.kind==="ready"?v(s.spec):void 0,e[2]=s.kind,e[3]=s.spec,e[4]=p):p=e[4];const u=p;if(s.kind==="loading"){let t;return e[5]===Symbol.for("react.memo_cache_sentinel")?(t=h("div",{className:"flex flex-col gap-4","data-testid":"openrpc-reference-loading",children:[l(y,{className:"h-8 w-48"}),l(y,{className:"h-64 w-full"})]}),e[5]=t):t=e[5],t}if(s.kind==="error"){let t;e[6]!==s.message||e[7]!==r?(t=r("Couldn't load the OpenRPC spec: {message}",{message:s.message}),e[6]=s.message,e[7]=r,e[8]=t):t=e[8];let o;e[9]!==r?(o=r("API reference unavailable"),e[9]=r,e[10]=o):o=e[10];let c;return e[11]!==t||e[12]!==o?(c=l(g,{description:t,testId:"openrpc-reference-error",title:o}),e[11]=t,e[12]=o,e[13]=c):c=e[13],c}if(s.kind==="empty"||u===void 0){let t;e[14]!==r?(t=r("Run `lunora codegen --api-spec openrpc` and wire `_generated/openrpc.json` to the worker to render the OpenRPC reference here."),e[14]=r,e[15]=t):t=e[15];let o;e[16]!==r?(o=r("No OpenRPC spec configured"),e[16]=r,e[17]=o):o=e[17];let c;return e[18]!==t||e[19]!==o?(c=l(g,{description:t,testId:"openrpc-reference-empty",title:o}),e[18]=t,e[19]=o,e[20]=c):c=e[20],c}let d;return e[21]!==u?(d=l(x,{model:u}),e[21]=u,e[22]=d):d=e[22],d};export{B as default};
@@ -0,0 +1 @@
1
+ const o="lunora-studio-root";export{o as default};
@@ -0,0 +1 @@
1
+ import{c as I}from"react/compiler-runtime";import{useState as T,useEffect as $}from"react";import{ConfirmButton as H}from"./ConfirmButton-CIXYF6Mg.mjs";import{C as M,a as P}from"./card-By2O8ULa.mjs";import{E as Q}from"./empty-state-D7jEML_T.mjs";import{T as R,a as q,b as J,c as l,d as D,e as i}from"./table-D0SBiDu-.mjs";import{a as K}from"./use-admin-query-CaOm4JS3.mjs";import{useAutoRefresh as V}from"./DEFAULT_AUTO_REFRESH_MS-Py5Yx7rP.mjs";import{u as W}from"./use-studio-client-DCA50tF2.mjs";import{useT as z}from"./DEFAULT_LOCALE-BQ3jRT74.mjs";import{f as G,h as O,b as U}from"./internal-hIuTpSbx.mjs";import{jsx as t,jsxs as p}from"react/jsx-runtime";const X=s=>Number.isFinite(s)?O(s,"—"):"—",F=s=>s.toSorted((e,u)=>e.scheduledFor-u.scheduledFor),Y=(s,e,u)=>e!==void 0?e:u===void 0?f=>s.cancelScheduledJob(f):void 0,he=s=>{const e=I(16),{cancelJob:u,loadJobs:f}=s===void 0?{}:s,n=W(),o=z(),c=f===void 0;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=["lunora-scheduled-jobs"],e[0]=b):b=e[0];const d=K(b,async()=>{const r=await(f??(()=>n.listScheduledJobs()))();return F(r)}),[j,k]=T(void 0),[A,w]=T(void 0);let v,x;e[1]!==n||e[2]!==c?(v=()=>{if(c)return n.subscribeScheduledJobs(r=>{w(void 0),k(F(r))})},x=[c,n],e[1]=n,e[2]=c,e[3]=v,e[4]=x):(v=e[3],x=e[4]),$(v,x);let y;e[5]!==d?(y=()=>d.poll(),e[5]=d,e[6]=y):y=e[6],V(y,!c);const C=Y(n,u,f),a=j??d.data,N=A??d.error,E=async r=>{if(C!==void 0){w(void 0);try{await C(r),c||d.refetch()}catch(_){w(U(_))}}},L="flex flex-col gap-3",B="lunora-scheduled-jobs";let m;e[7]!==N?(m=N!==null&&t("p",{className:"text-sm text-destructive","data-testid":"sj-error",role:"alert",children:N}),e[7]=N,e[8]=m):m=e[8];let h;e[9]!==a?.length||e[10]!==o?(h=a?.length===0&&t(Q,{description:o("Jobs queued with runAfter / runAt will appear here."),icon:p("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[t("circle",{cx:"12",cy:"12",r:"9"}),t("path",{d:"M12 7.5V12l4 2"})]}),testId:"sj-empty",title:o("No scheduled jobs.")}),e[9]=a?.length,e[10]=o,e[11]=h):h=e[11];const S=a!==void 0&&a.length>0&&t(M,{className:"overflow-hidden py-0",children:t(P,{className:"px-0",children:p(R,{"data-testid":"sj-table",children:[t(q,{children:p(J,{children:[t(l,{children:o("function")}),t(l,{children:o("scheduled for")}),t(l,{children:o("pool")}),t(l,{children:o("attempts")}),t(l,{children:o("shard")}),t(l,{children:o("id")}),C!==void 0&&t(l,{"aria-label":o("Actions")})]})}),t(D,{children:a.map(r=>p(J,{"data-testid":`sj-row-${r.id}`,children:[t(i,{className:"font-mono text-xs",children:r.workflow??r.functionPath}),t(i,{className:"text-muted-foreground tabular-nums",children:X(r.scheduledFor)}),t(i,{className:"font-mono text-xs",children:r.pool??""}),t(i,{className:"tabular-nums",children:r.attempts??0}),t(i,{children:r.shardKey??""}),t(i,{className:"font-mono text-xs",children:r.id}),C!==void 0&&t(i,{className:"text-right",children:t(H,{confirmLabel:o("Cancel job?"),onConfirm:()=>{G(E(r.id))},testId:`sj-cancel-${r.id}`,children:o("Cancel")})})]},r.id))})]})})});let g;return e[12]!==S||e[13]!==m||e[14]!==h?(g=p("div",{className:L,"data-testid":B,children:[m,h,S]}),e[12]=S,e[13]=m,e[14]=h,e[15]=g):g=e[15],g};export{he as ScheduledJobs};
@@ -0,0 +1 @@
1
+ import{c as S}from"react/compiler-runtime";import{useId as x,useState as C}from"react";import{useT as b}from"./DEFAULT_LOCALE-BQ3jRT74.mjs";import{l as j}from"./shard-history-CaO3C4KQ.mjs";import{I as k}from"./input-CXhxesPC.mjs";import{jsx as I,jsxs as y,Fragment as _}from"react/jsx-runtime";const A=r=>{const t=S(21),{id:p,onChange:f,testId:e,value:u}=r,n=b(),c=x(),[i]=C($);let d;t[0]!==f?(d=v=>{f(v.target.value)},t[0]=f,t[1]=d):d=t[1];const h=d;let o;t[2]!==n?(o=n("Shard key"),t[2]=n,t[3]=o):o=t[3];const g=i.length>0?c:void 0;let l;t[4]!==n?(l=n("shard key (optional)"),t[4]=n,t[5]=l):l=t[5];let s;t[6]!==p||t[7]!==h||t[8]!==o||t[9]!==g||t[10]!==l||t[11]!==e||t[12]!==u?(s=I(k,{"aria-label":o,className:"h-8 w-48","data-testid":e,id:p,list:g,onChange:h,placeholder:l,value:u}),t[6]=p,t[7]=h,t[8]=o,t[9]=g,t[10]=l,t[11]=e,t[12]=u,t[13]=s):s=t[13];let a;t[14]!==c||t[15]!==i||t[16]!==e?(a=i.length>0&&I("datalist",{"data-testid":`${e}-recents`,id:c,children:i.map(w)}),t[14]=c,t[15]=i,t[16]=e,t[17]=a):a=t[17];let m;return t[18]!==s||t[19]!==a?(m=y(_,{children:[s,a]}),t[18]=s,t[19]=a,t[20]=m):m=t[20],m};function $(){return j()}function w(r){return I("option",{"aria-label":r,value:r},r)}export{A as ShardInput};
@@ -0,0 +1 @@
1
+ import"./assistant-provider-BQG7QZAu.mjs";import{S as c}from"./studio-DE7i2--m.mjs";import"./ErrorBoundary-BWNF98VF.mjs";import"./operation-console-provider-DoloEvon.mjs";import"./badge-r_5B4LHP.mjs";import"./input-CXhxesPC.mjs";import"./skeleton-DX1gfixl.mjs";import"./home-panel-DTWHlX5S.mjs";import"./DEFAULT_LOCALE-BQ3jRT74.mjs";import"./StudioI18nProvider-CGXCPnQn.mjs";import"./data-view-params-C-_G-biH.mjs";import"./internal-hIuTpSbx.mjs";import"./utils-bhneXptQ.mjs";import"./CommandPalette-BZCHLpst.mjs";export{c as Studio};
@@ -0,0 +1 @@
1
+ import{c as O}from"react/compiler-runtime";import{LunoraAdminClient as G}from"@lunora/client/admin";import{LunoraProvider as H}from"@lunora/react";import{useState as B,useEffect as $}from"react";import{ErrorBoundary as z}from"./ErrorBoundary-BWNF98VF.mjs";import{u as U,B as V,T as Y,a as q,S as J}from"./studio-DE7i2--m.mjs";import Q from"./useDebounced-DVeQ5-oW.mjs";import{useT as j,createStudioI18n as X}from"./DEFAULT_LOCALE-BQ3jRT74.mjs";import{StudioI18nProvider as D}from"./StudioI18nProvider-CGXCPnQn.mjs";import{r as Z}from"./internal-hIuTpSbx.mjs";import{w as R}from"./recording-client-z4CBi0y8.mjs";import F from"./STUDIO_ROOT_CLASS-C6MccdVk.mjs";import{a as K}from"./browser-storage-BH1MxLZs.mjs";import{c as W}from"./utils-bhneXptQ.mjs";import{B as ee}from"./button-q0UYSmrn.mjs";import{I as te}from"./input-CXhxesPC.mjs";import{jsx as f,jsxs as C}from"react/jsx-runtime";const M="lunora-studio-admin-token",oe=()=>{try{return K("session")?.getItem(M)??""}catch{return""}},ne=m=>{const e=K("session");if(e!==void 0)try{m===""?e.removeItem(M):e.setItem(M,m)}catch{}},ie="/_lunora/admin/ws-token",se=1e4,le=m=>{const e=m;return typeof e?.token=="string"&&e.token.length>0&&typeof e.expiresAtMs=="number"},re=m=>{const{adminToken:e,baseUrl:a}=m,o=m.fetchImpl??fetch;let l=a;for(;l.endsWith("/");)l=l.slice(0,-1);const r=`${l}${ie}`;let t,n;const i=async()=>{const s=await o(r,{headers:{authorization:`Bearer ${e}`},method:"POST"});if(!s.ok)throw new Error(`ws-token mint failed: ${String(s.status)}`);const u=await s.json().catch(()=>{});if(!le(u))throw new Error("ws-token mint failed: malformed response body");return t=u,u.token};return{getToken:async()=>t!==void 0&&t.expiresAtMs-se>Date.now()?t.token:(n??=i().finally(()=>{n=void 0}),n),invalidate:()=>{t=void 0}}},ae=m=>{const e=O(42),{onSubmit:a}=m,o=j(),[l,r]=B("");let t;e[0]!==l?(t=l.trim(),e[0]=l,e[1]=t):t=e[1];const n=t;let i;e[2]!==a||e[3]!==n?(i=_=>{_.preventDefault(),n!==""&&a(n)},e[2]=a,e[3]=n,e[4]=i):i=e[4];const s=i;let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=f("div",{className:"h-10 w-10 text-foreground",children:f(V,{})}),e[5]=u):u=e[5];let d;e[6]!==o?(d=o("Connect to Lunora Studio"),e[6]=o,e[7]=d):d=e[7];let v;e[8]!==d?(v=f("h1",{className:"text-base font-semibold text-foreground",children:d}),e[8]=d,e[9]=v):v=e[9];let k;e[10]!==o?(k=o("Enter your admin token to access the studio."),e[10]=o,e[11]=k):k=e[11];let p;e[12]!==k?(p=f("p",{className:"text-[13px] text-muted-foreground",children:k}),e[12]=k,e[13]=p):p=e[13];let h;e[14]!==v||e[15]!==p?(h=C("div",{className:"flex flex-col items-center gap-3 text-center",children:[u,C("div",{className:"flex flex-col gap-1",children:[v,p]})]}),e[14]=v,e[15]=p,e[16]=h):h=e[16];let g;e[17]!==o?(g=o("admin token"),e[17]=o,e[18]=g):g=e[18];let c;e[19]!==g?(c=f("label",{className:"text-xs font-medium text-foreground",htmlFor:"lunora-studio-login-token",children:g}),e[19]=g,e[20]=c):c=e[20];let b;e[21]===Symbol.for("react.memo_cache_sentinel")?(b=_=>{r(_.target.value)},e[21]=b):b=e[21];let x;e[22]!==l?(x=f(te,{autoComplete:"off",autoFocus:!0,"data-testid":"lunora-studio-login-token",id:"lunora-studio-login-token",onChange:b,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:l}),e[22]=l,e[23]=x):x=e[23];let T;e[24]!==o?(T=o("From your worker's LUNORA_ADMIN_TOKEN — your project's .dev.vars in dev, or a deployment secret in production."),e[24]=o,e[25]=T):T=e[25];let I;e[26]!==T?(I=f("p",{className:"text-[11px] text-muted-foreground",children:T}),e[26]=T,e[27]=I):I=e[27];let S;e[28]!==c||e[29]!==x||e[30]!==I?(S=C("div",{className:"flex flex-col gap-1.5",children:[c,x,I]}),e[28]=c,e[29]=x,e[30]=I,e[31]=S):S=e[31];const E=n==="";let y;e[32]!==o?(y=o("Connect"),e[32]=o,e[33]=y):y=e[33];let w;e[34]!==E||e[35]!==y?(w=f(ee,{"data-testid":"lunora-studio-login-submit",disabled:E,type:"submit",children:y}),e[34]=E,e[35]=y,e[36]=w):w=e[36];let N;return e[37]!==s||e[38]!==S||e[39]!==w||e[40]!==h?(N=C("form",{className:"flex w-full max-w-sm flex-col gap-5 rounded-xl border border-border bg-card p-7 shadow-lg","data-testid":"lunora-studio-login",onSubmit:s,children:[h,S,w]}),e[37]=s,e[38]=S,e[39]=w,e[40]=h,e[41]=N):N=e[41],N},de=m=>{const e=O(10),{i18n:a,onSubmit:o}=m,{resolvedTheme:l}=U(),r=l==="dark"&&"dark";let t;e[0]!==r?(t=W(F,r,"flex h-dvh items-center justify-center bg-sidebar p-6 text-sm text-foreground"),e[0]=r,e[1]=t):t=e[1];let n;e[2]!==o?(n=f(ae,{onSubmit:o}),e[2]=o,e[3]=n):n=e[3];let i;e[4]!==a||e[5]!==n?(i=f(D,{i18n:a,children:n}),e[4]=a,e[5]=n,e[6]=i):i=e[6];let s;return e[7]!==t||e[8]!==i?(s=f("div",{className:t,"data-testid":"lunora-studio-login-root",children:i}),e[7]=t,e[8]=i,e[9]=s):s=e[9],s},ce=m=>{const e=O(15),{basePath:a,chrome:o,studio:l}=m,r=j();let t;e[0]!==r?(t=r("Studio failed"),e[0]=r,e[1]=t):t=e[1];let n;e[2]!==r?(n=r("Studio"),e[2]=r,e[3]=n):n=e[3];let i;e[4]!==r?(i=r("Try again"),e[4]=r,e[5]=i):i=e[5];let s;e[6]!==a||e[7]!==o||e[8]!==l?(s=f(J,{...l,basePath:a,chrome:o}),e[6]=a,e[7]=o,e[8]=l,e[9]=s):s=e[9];let u;return e[10]!==t||e[11]!==n||e[12]!==i||e[13]!==s?(u=f(z,{fallbackTitle:t,label:n,retryLabel:i,children:s}),e[10]=t,e[11]=n,e[12]=i,e[13]=s,e[14]=u):u=e[14],u},fe=m=>{const e=O(20),{basePath:a,clearToken:o,client:l,i18n:r,onTokenChange:t,rulesInstalled:n,studio:i,token:s}=m,{resolvedTheme:u}=U();let d;e[0]!==o||e[1]!==t||e[2]!==n||e[3]!==s?(d={clearToken:o,onTokenChange:t,rulesInstalled:n,token:s},e[0]=o,e[1]=t,e[2]=n,e[3]=s,e[4]=d):d=e[4];const v=d,k=u==="dark"&&"dark";let p;e[5]!==k?(p=W(F,k,"flex h-dvh flex-col overflow-hidden bg-sidebar text-sm text-foreground"),e[5]=k,e[6]=p):p=e[6];let h;e[7]!==a||e[8]!==v||e[9]!==i?(h=f(q,{children:f(ce,{basePath:a,chrome:v,studio:i})}),e[7]=a,e[8]=v,e[9]=i,e[10]=h):h=e[10];let g;e[11]!==r||e[12]!==h?(g=f(D,{i18n:r,children:h}),e[11]=r,e[12]=h,e[13]=g):g=e[13];let c;e[14]!==l||e[15]!==g?(c=f(H,{client:l,children:g}),e[14]=l,e[15]=g,e[16]=c):c=e[16];let b;return e[17]!==p||e[18]!==c?(b=f("div",{className:p,"data-testid":"lunora-studio-app",children:c}),e[17]=p,e[18]=c,e[19]=b):b=e[19],b},Ee=m=>{const e=O(28);let a;e[0]!==m?(a=m===void 0?{}:m,e[0]=m,e[1]=a):a=e[1];const{adminToken:o,basePath:l,baseUrl:r,client:t,rulesInstalled:n,studio:i,locale:s}=a;let u;e[2]!==o?(u=()=>o??oe(),e[2]=o,e[3]=u):u=e[3];const[d,v]=B(u);let k,p;e[4]!==d?(k=()=>{ne(d)},p=[d],e[4]=d,e[5]=k,e[6]=p):(k=e[5],p=e[6]),$(k,p);const h=Q(d,300,d==="");let g;e:{if(t!==void 0){let A;e[7]!==t?(A=R(t),e[7]=t,e[8]=A):A=e[8],g=A;break e}let _;if(e[9]!==r||e[10]!==h){const A=Z(r),P=h===""?void 0:re({adminToken:h,baseUrl:A}),L=new G({url:A,...P===void 0?{}:{wsTicket:P.getToken}});P!==void 0&&(L.setAuthToken(h),L.onTokenExpired(P.invalidate)),_=R(L),e[9]=r,e[10]=h,e[11]=_}else _=e[11];g=_}const c=g;let b,x;e[12]!==c||e[13]!==t?(b=()=>()=>{t===void 0&&c.close()},x=[c,t],e[12]=c,e[13]=t,e[14]=b,e[15]=x):(b=e[14],x=e[15]),$(b,x);let T;e[16]===Symbol.for("react.memo_cache_sentinel")?(T=_=>{v(_.target.value)},e[16]=T):T=e[16];const I=T;let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{v("")},e[17]=S):S=e[17];const E=S;let y;e[18]!==s?(y=X(s),e[18]=s,e[19]=y):y=e[19];const w=y;let N;return e[20]!==l||e[21]!==c||e[22]!==w||e[23]!==t||e[24]!==n||e[25]!==i||e[26]!==d?(N=f(Y,{children:d===""&&t===void 0?f(de,{i18n:w,onSubmit:v}):f(fe,{basePath:l,clearToken:E,client:c,i18n:w,onTokenChange:I,rulesInstalled:n,studio:i,token:d})}),e[20]=l,e[21]=c,e[22]=w,e[23]=t,e[24]=n,e[25]=i,e[26]=d,e[27]=N):N=e[27],N};export{Ee as StudioApp};
@@ -0,0 +1 @@
1
+ import{c as u}from"react/compiler-runtime";import{studioI18n as f,createStudioI18n as l,StudioI18nContext as m}from"./DEFAULT_LOCALE-BQ3jRT74.mjs";import{jsx as v}from"react/jsx-runtime";const I=(e,t,o)=>e!==void 0?e:t===void 0&&o===void 0?f:l(t,o),S=e=>{const t=u(7),{catalogs:o,children:i,i18n:s,locale:c}=e;let r;t[0]!==o||t[1]!==s||t[2]!==c?(r=I(s,c,o),t[0]=o,t[1]=s,t[2]=c,t[3]=r):r=t[3];const d=r;let n;return t[4]!==i||t[5]!==d?(n=v(m,{value:d,children:i}),t[4]=i,t[5]=d,t[6]=n):n=t[6],n};export{S as StudioI18nProvider};
@@ -0,0 +1,5 @@
1
+ import{useState as v}from"react";import{u as N}from"./assistant-provider-BQG7QZAu.mjs";import{E as T}from"./error-alert-BzZfqmf4.mjs";import{C as E,a as k}from"./card-By2O8ULa.mjs";import{T as A,a as L,b as m,c as p,d as w,e as l}from"./table-D0SBiDu-.mjs";import{useT as C}from"./DEFAULT_LOCALE-BQ3jRT74.mjs";import{c as R}from"./utils-bhneXptQ.mjs";import{jsxs as a,jsx as s}from"react/jsx-runtime";const $={ERROR:"error",INFO:"info",WARN:"warning"},J=t=>{const n=typeof t.metadata.table=="string"?t.metadata.table:void 0;return{description:`${t.detail} ${t.remediation}`,entity:n,issueType:t.title,key:t.cacheKey,level:$[t.level]}},V=["error","warning","info"],I={error:"bg-destructive",info:"bg-info",warning:"bg-warning"},O=(t,n)=>({error:t("Errors"),info:t("Info"),warning:t("Warnings")})[n],S=(t,n,i)=>({error:t("{count} errors",{count:i}),info:t("{count} suggestions",{count:i}),warning:t("{count} warnings",{count:i})})[n],D=(t,n)=>({error:t("No errors detected"),info:t("No suggestions"),warning:t("No warnings detected")})[n],H=t=>{const n={error:0,info:0,warning:0};for(const i of t??[])n[i.level]+=1;return n},K=({error:t=null,errorSource:n,rows:i,shardKey:u,testId:o,toolbar:f})=>{const r=C(),c=N(),h=c!==void 0&&!c.unavailable,[d,b]=v("error"),x=H(i),g=(i??[]).filter(e=>e.level===d),y=e=>{b(e.currentTarget.dataset.level)};return a("div",{className:"flex flex-col gap-3","data-testid":o,children:[s("div",{className:"flex border-b border-border",role:"tablist",children:V.map(e=>a("button",{"aria-selected":d===e,className:"flex min-w-32 flex-col gap-0.5 border-b-2 border-transparent px-4 py-2 text-start outline-none transition-colors hover:bg-muted/40 focus-visible:bg-muted/40 aria-selected:border-foreground","data-level":e,"data-testid":`${o}-tab-${e}`,onClick:y,role:"tab",type:"button",children:[a("span",{className:"flex items-center gap-2 text-sm font-medium text-foreground",children:[s("span",{"aria-hidden":"true",className:R("size-2 rounded-sm",I[e])}),O(r,e)]}),s("span",{className:"ps-4 text-xs text-muted-foreground",children:S(r,e,x[e])})]},e))}),f!==void 0&&s("div",{className:"flex flex-wrap items-center gap-2",children:f}),t!==null&&s(T,{error:n??t,shardKey:u,testId:`${o}-error`}),s(E,{className:"overflow-hidden py-0",children:s(k,{className:"px-0",children:a(A,{children:[s(L,{children:a(m,{children:[s(p,{children:r("Issue type")}),s(p,{children:r("Entity/item")}),s(p,{children:r("Description")})]})}),s(w,{children:g.length===0?s(m,{children:a(l,{className:"h-40 text-center align-middle text-muted-foreground",colSpan:3,"data-testid":`${o}-empty`,children:[s("span",{className:"block text-sm font-medium text-foreground",children:D(r,d)}),s("span",{className:"block text-sm",children:r("Nothing to report for this deployment.")})]})}):g.map(e=>a(m,{children:[s(l,{className:"font-medium text-foreground",children:e.issueType}),s(l,{className:"font-mono text-xs text-muted-foreground",children:e.entity??"—"}),a(l,{className:"text-muted-foreground",children:[s("span",{children:e.description}),(e.action!==void 0||h)&&a("span",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[e.action,h&&s("button",{className:"text-xs underline outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":"advisor-ask-assistant",onClick:()=>{c.openAssistant({ask:r(`The Lunora advisor reported: {finding}.
2
+
3
+ {description}
4
+
5
+ What does this mean for my app, and how should I fix it?`,{description:e.description,finding:e.entity===void 0?e.issueType:r("{issueType} on {entity}",{entity:e.entity,issueType:e.issueType})}),shardKey:u,suggestions:[r("How do I verify this is fixed?")],title:e.issueType})},type:"button",children:r("Ask the assistant")})]})]})]},e.key))})]})})})]})};export{K as A,J as a};
@@ -0,0 +1 @@
1
+ const i=l=>{let e=0,s=0,o=0,c=0,t=0,n=0,r=0;for(const{metrics:a}of l){if(a===null){t+=1;continue}c+=1,e+=a.requests,s+=a.errors,o+=a.databaseSize??0,a.cache&&(n+=a.cache.hits,r+=a.cache.hits+a.cache.misses)}return{failed:t,hitRate:r===0?null:n/r,reachable:c,totalDatabaseSize:o,totalErrors:s,totalRequests:e}},u=(l,e)=>{const s=new Set,o=[];for(const c of["",l.trim(),...e])s.has(c)||(s.add(c),o.push(c));return o},h=l=>{const e=l,s=[];let o=0;for(const t of e.functions??[])t.calls>0&&(s.push({avg:t.totalDurationMs/t.calls,calls:t.calls}),o+=t.calls);s.sort((t,n)=>t.avg-n.avg);const c=t=>{const n=Math.ceil(t/100*o);let r=0;for(const a of s)if(r+=a.calls,r>=n)return a.avg;return s.at(-1)?.avg??0};return{p90:c(90),p95:c(95)}},f=l=>l.map(e=>({...e,avgDurationMs:e.execCount>0?e.totalDurationMs/e.execCount:0}));export{i as aggregateMetrics,h as computeLatencyPercentiles,f as enrichQueryStats,u as shardsToAggregate};
@@ -0,0 +1 @@
1
+ import{c as l}from"react/compiler-runtime";import{cva as c}from"class-variance-authority";import{c as v}from"./utils-bhneXptQ.mjs";import{jsx as f,jsxs as b}from"react/jsx-runtime";const u=c("flex items-start gap-2 rounded-md border px-3 py-2 text-sm [&>svg]:mt-0.5 [&>svg]:size-4 [&>svg]:shrink-0",{defaultVariants:{variant:"default"},variants:{variant:{default:"border-border bg-muted/40 text-foreground",destructive:"border-destructive/40 bg-destructive/5 text-destructive",warning:"border-amber-500/40 bg-amber-500/5 text-amber-700 dark:text-amber-400"}}}),N=n=>{const t=l(10),{children:s,className:i,icon:d,testId:o,variant:m}=n;let e;t[0]!==i||t[1]!==m?(e=v(u({variant:m}),i),t[0]=i,t[1]=m,t[2]=e):e=t[2];let r;t[3]!==s?(r=f("div",{className:"min-w-0 flex-1",children:s}),t[3]=s,t[4]=r):r=t[4];let a;return t[5]!==d||t[6]!==e||t[7]!==r||t[8]!==o?(a=b("div",{className:e,"data-testid":o,role:"alert",children:[d,r]}),t[5]=d,t[6]=e,t[7]=r,t[8]=o,t[9]=a):a=t[9],a};export{N as A};
@@ -0,0 +1,360 @@
1
+ import { LunoraAdminClient } from '@lunora/client/admin';
2
+ import { ReactElement } from 'react';
3
+ import { I18n } from '@lingui/core';
4
+ import { FunctionUsagePanel, AnalyticsSqlQueryResult } from '@lunora/bindings/analytics-sql';
5
+ import { CronJobInfo, CronRunsResult, ScheduleRecord } from '@lunora/client';
6
+ interface AnalyticsPanelProps {
7
+ /**
8
+ * Resolve one usage panel. The panel sends only its key; the host's runner
9
+ * calls an action that builds the statement server-side with
10
+ * `functionUsageQuery(panel)` from `@lunora/bindings/analytics-sql` and runs it
11
+ * through `ctx.analyticsSql`. That action reads account analytics, so it must
12
+ * be admin-gated, and it must take the panel key, never SQL: an action that
13
+ * ran caller-supplied SQL could read every dataset in the account. Studio passes
14
+ * its analyticsSqlQuery prop through here; with none, the panel renders an empty
15
+ * state and makes no network call.
16
+ */
17
+ readonly runQuery?: (panel: FunctionUsagePanel) => Promise<AnalyticsSqlQueryResult>;
18
+ }
19
+ interface CronTriggersPanelProps {
20
+ /**
21
+ * Load the code-defined cron triggers. Defaults to `client.getCronJobs`,
22
+ * which hits the worker's admin-gated `/_lunora/admin/cron-jobs` endpoint —
23
+ * so the panel works out of the box under `<LunoraProvider>`, provided the
24
+ * worker is built with a `cronJobs` map and `adminToken`. Override it to
25
+ * source triggers from elsewhere (e.g. tests).
26
+ */
27
+ readonly loadCronJobs?: () => Promise<CronJobInfo[]>;
28
+ /**
29
+ * Load the cron run history (in-flight runs and recorded fires). Defaults to
30
+ * `client.listCronRuns` when the triggers also come from the client; a custom
31
+ * {@link CronTriggersPanelProps.loadCronJobs} without one shows no history.
32
+ */
33
+ readonly loadCronRuns?: () => Promise<CronRunsResult>;
34
+ /**
35
+ * Manually fire one cron job by name. Defaults to `client.runCronJob`, which
36
+ * hits the admin-gated `POST /_lunora/admin/cron-jobs/run` endpoint (the same
37
+ * dispatch the scheduled trigger runs). When a custom {@link CronTriggersPanelProps.loadCronJobs}
38
+ * is supplied without a `runCronJob`, the "Run now" control is hidden — useful
39
+ * for a read-only view.
40
+ */
41
+ readonly runCronJob?: (name: string) => Promise<{
42
+ name: string;
43
+ ran: boolean;
44
+ }>;
45
+ }
46
+ interface ScheduledJobsProps {
47
+ /**
48
+ * Cancel a pending job by id. Defaults to `client.cancelScheduledJob` when
49
+ * {@link ScheduledJobsProps.loadJobs} is also left to the client. When a
50
+ * custom `loadJobs` is supplied without a `cancelJob`, the cancel control is
51
+ * hidden — useful for a read-only view.
52
+ */
53
+ readonly cancelJob?: (id: string) => Promise<{
54
+ cancelled: boolean;
55
+ }>;
56
+ /**
57
+ * Load the pending scheduled jobs. Defaults to `client.listScheduledJobs`,
58
+ * which hits the worker's admin-gated `/_lunora/admin/scheduled` endpoint —
59
+ * so the panel works out of the box under `<LunoraProvider>`, provided the
60
+ * worker is built with a `schedulerDO` namespace and `adminToken`. Override
61
+ * it to source jobs from elsewhere.
62
+ */
63
+ readonly loadJobs?: () => Promise<ScheduleRecord[]>;
64
+ }
65
+ /**
66
+ * View — and cancel — the functions queued via `runAfter` / `runAt` on the
67
+ * scheduler. Cron *triggers* are static wrangler config and don't appear here;
68
+ * this lists the dynamic, in-flight schedule only.
69
+ *
70
+ * Works out of the box under `<LunoraProvider>` via the client's scheduler
71
+ * admin methods; pass {@link ScheduledJobsProps.loadJobs} /
72
+ * {@link ScheduledJobsProps.cancelJob} to override the transport.
73
+ */
74
+ declare const ScheduledJobs: ({ cancelJob, loadJobs }?: ScheduledJobsProps) => ReactElement;
75
+ interface SchedulePanelProps {
76
+ /** The shard the Pools view reads scheduler lag from first. */
77
+ readonly initialShardKey?: string;
78
+ /** Override how the Cron triggers sub-view loads triggers; see {@link CronTriggersPanel}. */
79
+ readonly loadCronJobs?: CronTriggersPanelProps["loadCronJobs"];
80
+ /** Override how the Scheduled jobs sub-view cancels a job; see {@link ScheduledJobs}. */
81
+ readonly scheduledCancel?: ScheduledJobsProps["cancelJob"];
82
+ /** Override how the Scheduled jobs sub-view loads jobs; see {@link ScheduledJobs}. */
83
+ readonly scheduledLoad?: ScheduledJobsProps["loadJobs"];
84
+ }
85
+ /**
86
+ * The statuses a privacy request moves through, and which of them are terminal.
87
+ *
88
+ * `@lunora/privacy` stores them and the Studio's Privacy requests page renders them.
89
+ * The Studio must not depend on the runtime package, so both read the list from here
90
+ * and the bundler inlines it into each. A status added here reaches both, and the
91
+ * Studio's exhaustive badge map fails to compile until it has a variant.
92
+ */
93
+ /** Every status, in lifecycle order. */
94
+ declare const REQUEST_STATUSES: readonly ["received", "grace", "processing", "ready", "completed", "failed", "cancelled", "expired"];
95
+ type RequestStatus = (typeof REQUEST_STATUSES)[number];
96
+ type RequestType = "erasure" | "export";
97
+ /**
98
+ * Timestamps are epoch milliseconds. `extendedDueAt` is set only when the deadline was extended, so
99
+ * the effective deadline is `extendedDueAt ?? dueAt`.
100
+ */
101
+ interface PrivacyRequestRow {
102
+ readonly dueAt: number;
103
+ readonly extendedDueAt?: null | number;
104
+ readonly id: string;
105
+ readonly receivedAt: number;
106
+ readonly status: RequestStatus;
107
+ readonly subjectId: string;
108
+ readonly type: RequestType;
109
+ }
110
+ /** What the Studio's Privacy requests page reads and writes. */
111
+ interface PrivacyRequestsSource {
112
+ /** The open requests, in any order; the page sorts nothing. */
113
+ listOpenPrivacyRequests: () => Promise<ReadonlyArray<PrivacyRequestRow>>;
114
+ /** Re-run a failed request. Rejects with the server's message on failure. */
115
+ retryPrivacyRequest: (id: string) => Promise<unknown>;
116
+ }
117
+ /** Which client method a {@link FunctionDescriptor} is invoked through. */
118
+ type FunctionKind = "action" | "mutation" | "query";
119
+ /**
120
+ * One argument of a registered function, derived from its `v.*` validator by the
121
+ * worker's `/_lunora/admin/functions` endpoint. A compact signature shape.
122
+ */
123
+ interface FunctionArgumentDescriptor {
124
+ /** Element validator kind for an `array` arg (one level), e.g. `string`. */
125
+ element?: string;
126
+ /** The (optional-unwrapped) validator kind, e.g. `string`, `id`, `object`. */
127
+ kind: string;
128
+ /** The argument name. */
129
+ name: string;
130
+ /** True when the arg is wrapped in `v.optional(...)`. */
131
+ optional: boolean;
132
+ /** True when the arg is marked `v.sensitive`: its value is never kept in run history. */
133
+ sensitive?: true;
134
+ /** Target table for an `id` arg (`v.id("table")`). */
135
+ table?: string;
136
+ }
137
+ /**
138
+ * Runtime descriptor for a registered Lunora function. The function's `kind` is
139
+ * a compile-time-only phantom on `FunctionReference`, so the runner needs it
140
+ * spelled out here to know which client method to call. `args` carries the
141
+ * function's argument signature (absent on responses from an older worker).
142
+ */
143
+ interface FunctionDescriptor {
144
+ args?: FunctionArgumentDescriptor[];
145
+ kind: FunctionKind;
146
+ /** The `<file>:<function>` identifier, e.g. `messages:list`. */
147
+ path: string;
148
+ }
149
+ /** Outcome of a single `FunctionRunner` invocation. */
150
+ type RunStatus = "error" | "idle" | "running" | "success";
151
+ interface StudioProps {
152
+ /**
153
+ * Resolve one Analytics tab panel by its key (`"volume"`, `"latency"`,
154
+ * `"hotShards"`). Supply a runner that calls an action in your app which
155
+ * builds the statement server-side and runs it through `ctx.analyticsSql`:
156
+ *
157
+ * ```ts
158
+ * // lunora/studio-analytics.ts
159
+ * export const usagePanel = action.input({ panel: v.string() }).action(async ({ args, ctx }) => {
160
+ * assertAdmin(ctx); // your own admin check: this reads account analytics
161
+ * if (!isFunctionUsagePanel(args.panel)) throw new LunoraError("BAD_REQUEST", "unknown panel");
162
+ * const { params, query } = functionUsageQuery(args.panel);
163
+ * return ctx.analyticsSql.query(query, params);
164
+ * });
165
+ * ```
166
+ *
167
+ * The action MUST be admin-gated and MUST take the panel key, never SQL: an
168
+ * action running caller-supplied SQL could read every dataset in the account.
169
+ * Without a runner the Analytics tab renders an empty state and issues no
170
+ * request.
171
+ *
172
+ * Pass a STABLE reference — a module-level function, or one held in a
173
+ * `useCallback`/ref. It is read while building the tab router, so a fresh
174
+ * inline arrow on every render rebuilds the router and remounts the panel
175
+ * tree, losing in-progress query state. The same holds for `scheduledLoad`,
176
+ * `scheduledCancel` and `scheduledCron`.
177
+ */
178
+ readonly analyticsSqlQuery?: AnalyticsPanelProps["runQuery"];
179
+ /**
180
+ * URL path prefix the studio is mounted under, passed to the router as its
181
+ * `basepath`. Defaults to `/` (mounted at the origin root). The `@lunora/vite`
182
+ * dev route serves the studio under `/__lunora`, so it sets this — without
183
+ * it the router treats `/__lunora` as unknown and bounces to `/data`, escaping
184
+ * the mount.
185
+ */
186
+ readonly basePath?: string;
187
+ /**
188
+ * App-owned top-bar + sidebar-footer chrome (theme toggle, admin-token
189
+ * popover, rules banner). The batteries-included `StudioApp` supplies
190
+ * this; composing `<Studio>` bare omits those affordances. See {@link StudioChrome}.
191
+ */
192
+ readonly chrome?: StudioChrome;
193
+ /**
194
+ * Show the data tab's write controls (insert/edit/delete rows). Off by
195
+ * default; see {@link TableEditor}.
196
+ *
197
+ * **This HIDES THE CONTROLS. It does not make anything read-only.** The
198
+ * write RPCs are gated server-side by `LUNORA_ADMIN_TOKEN` alone — one
199
+ * all-or-nothing check in `handleAdminRpc`, with no read/write scoping — and
200
+ * `renderStudioHtml({ adminToken })` already ships that bearer to the
201
+ * browser. So a viewer handed a studio deployed with `dataEditable: false`
202
+ * still holds a credential that can write; the buttons are simply absent
203
+ * from the page. Treat it as an affordance switch for a trusted operator,
204
+ * never as an authorization boundary. The same holds for
205
+ * {@link StudioProps.schemaEditable} and {@link StudioProps.runAsIdentity}.
206
+ */
207
+ readonly dataEditable?: boolean;
208
+ /**
209
+ * Functions exposed in the runner tab. The runner tab only appears when at
210
+ * least one descriptor is supplied (a query/mutation/action's `kind` is
211
+ * compile-time-only, so it must be named here).
212
+ */
213
+ readonly functions?: FunctionDescriptor[];
214
+ /** Reuse an existing Lingui instance (wins over `locale`). */
215
+ readonly i18n?: I18n;
216
+ /** Shard key every shard-scoped panel targets on first load. */
217
+ readonly initialShardKey?: string;
218
+ /** Active locale for the studio's own UI strings. Defaults to `en`. */
219
+ readonly locale?: string;
220
+ /**
221
+ * Inline OpenAPI 3.1 document rendered by the API tab's reference sub-view.
222
+ * Thread the generated `_generated/openapi.json` here to render it
223
+ * without a round-trip. When omitted the reference fetches the worker's
224
+ * admin-gated `GET /_lunora/admin/openapi` endpoint via the client.
225
+ */
226
+ readonly openApiSpec?: unknown;
227
+ /**
228
+ * Inline OpenRPC 1.x document rendered by the API tab's reference sub-view
229
+ * when the OpenRPC format is selected. Thread the generated
230
+ * `_generated/openrpc.json` here to render it without a round-trip. When
231
+ * omitted the OpenRPC view fetches the worker's admin-gated
232
+ * `GET /_lunora/admin/openrpc` endpoint via the client.
233
+ */
234
+ readonly openRpcSpec?: unknown;
235
+ /**
236
+ * The app's data-subject request source for the Privacy requests page, built
237
+ * from the app's own admin functions (`listOpenPrivacyRequests`,
238
+ * `retryPrivacyRequest`). Without one the page renders a "not configured" state
239
+ * and issues no request. Pass a STABLE reference, as for `analyticsSqlQuery`.
240
+ */
241
+ readonly privacyRequests?: PrivacyRequestsSource;
242
+ /**
243
+ * Allow the function runner to execute a function AS a chosen authenticated
244
+ * identity (the "Run as identity" tool), so an operator can test auth + RLS
245
+ * behavior. Security-sensitive: it forges identity on an admin-gated RPC, so
246
+ * the host MUST set this only on a trusted loopback-dev gate (the same gate
247
+ * as `dataEditable`) — never in a production/static deploy. Off by default;
248
+ * see {@link FunctionRunner}.
249
+ *
250
+ * Like {@link StudioProps.dataEditable}, leaving it off only hides the tool.
251
+ * The RPC behind it stays reachable to anyone holding the admin token the
252
+ * page already carries — the gate is the token, not this flag.
253
+ */
254
+ readonly runAsIdentity?: boolean;
255
+ /**
256
+ * Override how the schedule tab cancels a job. Defaults to the client's
257
+ * scheduler admin endpoint; see {@link SchedulePanel}.
258
+ */
259
+ readonly scheduledCancel?: SchedulePanelProps["scheduledCancel"];
260
+ /**
261
+ * Override how the schedule tab's Cron triggers sub-view loads triggers.
262
+ * Defaults to the client's `/_lunora/admin/cron-jobs` endpoint; see
263
+ * {@link SchedulePanel}.
264
+ */
265
+ readonly scheduledCron?: SchedulePanelProps["loadCronJobs"];
266
+ /**
267
+ * Override how the schedule tab loads jobs. Defaults to the client's
268
+ * scheduler admin endpoint, so the tab works without extra wiring.
269
+ */
270
+ readonly scheduledLoad?: SchedulePanelProps["scheduledLoad"];
271
+ /**
272
+ * Show the visual schema editor overlay on the schema diagram (add table /
273
+ * column / index, written back to `lunora/schema.ts` + codegen). Off by
274
+ * default. Only the loopback-only dev hosts set this — the write path needs
275
+ * the project's filesystem + toolchain, so a static deploy leaves it off.
276
+ *
277
+ * Like {@link StudioProps.dataEditable}, it hides the overlay rather than
278
+ * making the diagram read-only: what actually stops a schema write in a
279
+ * static deploy is that the host has no filesystem to write to, not this
280
+ * flag.
281
+ */
282
+ readonly schemaEditable?: boolean;
283
+ }
284
+ /**
285
+ * Top-bar + sidebar-footer chrome the `StudioApp` owns (theme + admin
286
+ * token state, the rules banner) but which renders *inside* the router-owned
287
+ * {@link StudioLayout} (the header and sidebar footer). The layout is a route
288
+ * component with no props, so it reads this from context rather than threading
289
+ * it through the router. Absent (composing `<Studio>` bare) the layout simply
290
+ * omits those affordances.
291
+ */
292
+ interface StudioChrome {
293
+ readonly clearToken: () => void;
294
+ readonly onTokenChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
295
+ readonly rulesInstalled?: boolean;
296
+ readonly token: string;
297
+ }
298
+ /**
299
+ * The composable studio. {@link StudioShell} reads its strings from `useT`,
300
+ * which needs a `StudioI18nProvider` above it.
301
+ *
302
+ * When an `i18n` instance or a `locale` is supplied, this owns a provider so the
303
+ * studio localises itself standalone. When neither is given it renders the
304
+ * shell bare and inherits whatever provider is already in scope — the host app's
305
+ * (`StudioApp` owns one for the top bar too) or the shared default — instead
306
+ * of nesting a second, redundant provider.
307
+ */
308
+ declare const Studio: ({ i18n, locale, ...shellProps }: StudioProps) => ReactElement;
309
+ interface StudioAppProps {
310
+ /**
311
+ * Admin bearer token to send with every admin request. When omitted the app
312
+ * renders a small prompt so an operator can paste it at runtime — handy in
313
+ * dev where you don't want to bake the token into a bundle.
314
+ */
315
+ readonly adminToken?: string;
316
+ /**
317
+ * URL path prefix the studio is mounted under (router `basepath`). Defaults
318
+ * to `/`. The `@lunora/vite` dev route sets `/__lunora`. Forwarded to the
319
+ * composed {@link Studio}.
320
+ */
321
+ readonly basePath?: string;
322
+ /**
323
+ * Base URL of the Lunora worker the studio talks to. Defaults to the
324
+ * current origin, which is correct when the studio is served from the
325
+ * same worker (the `@lunora/vite` dev route) or proxied to it.
326
+ */
327
+ readonly baseUrl?: string;
328
+ /**
329
+ * Inject a pre-built client instead of constructing one from `baseUrl` +
330
+ * the admin token. Used by the dev mock harness (and embeddings that own
331
+ * the client) so the chrome renders against a supplied client; when set,
332
+ * `baseUrl`/`adminToken` are ignored and this client is never closed here.
333
+ */
334
+ readonly client?: LunoraAdminClient;
335
+ /** UI language for the studio's own strings. Defaults to `en`. */
336
+ readonly locale?: string;
337
+ /**
338
+ * Whether the project's Lunora agent skills ("rules") are installed. When
339
+ * explicitly `false`, the studio shows a one-line banner pointing at
340
+ * `lunora rules install`. The loopback dev hosts inject this; a static deploy
341
+ * leaves it unset (no banner).
342
+ */
343
+ readonly rulesInstalled?: boolean;
344
+ /** Forwarded to the composed {@link Studio} (functions, initialShardKey, scheduled overrides). */
345
+ readonly studio?: Omit<StudioProps, "children" | "chrome" | "i18n" | "locale">;
346
+ }
347
+ /**
348
+ * A fully self-contained studio page: it constructs a {@link LunoraAdminClient}
349
+ * pointed at the worker, wires it through a `<LunoraProvider>`, manages the
350
+ * admin token + theme, and renders the composed {@link Studio} — handing it the
351
+ * top-bar/sidebar {@link StudioChrome} (theme toggle, admin-token popover, rules
352
+ * banner) so those affordances render inside the sidebar shell.
353
+ *
354
+ * Mount this directly (the standalone app and the `@lunora/vite` dev route both
355
+ * do) when you want the batteries-included page rather than composing panels
356
+ * yourself. For embedding into an existing admin UI, use the individual panels
357
+ * or `<Studio>` under your own provider instead.
358
+ */
359
+ declare const StudioApp: ({ adminToken, basePath, baseUrl, client: injectedClient, rulesInstalled, studio, locale }?: StudioAppProps) => ReactElement;
360
+ export { FunctionDescriptor as F, PrivacyRequestRow as P, RunStatus as R, StudioAppProps as S, FunctionKind as a, PrivacyRequestsSource as b, ScheduledJobs as c, ScheduledJobsProps as d, Studio as e, StudioApp as f, StudioProps as g };