@lunora/studio 1.0.0-alpha.39 → 1.0.0-alpha.390

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 (491) hide show
  1. package/LICENSE.md +201 -104
  2. package/README.md +7 -7
  3. package/dist/index.d.mts +1647 -0
  4. package/dist/index.d.ts +1039 -809
  5. package/dist/index.mjs +1 -0
  6. package/dist/mount.d.mts +23 -0
  7. package/dist/mount.d.ts +13 -11
  8. package/dist/mount.mjs +1 -0
  9. package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -0
  10. package/dist/packem_chunks/ApiTab.mjs +1 -0
  11. package/dist/packem_chunks/AuditPanel.mjs +1 -0
  12. package/dist/packem_chunks/DeploymentHealthPanel.mjs +1 -0
  13. package/dist/packem_chunks/ExportImportPanel.mjs +10 -0
  14. package/dist/packem_chunks/FileBrowser.mjs +4 -0
  15. package/dist/packem_chunks/FunctionRunner.mjs +1 -0
  16. package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -0
  17. package/dist/packem_chunks/HealthPanel.mjs +1 -0
  18. package/dist/packem_chunks/InsightsPanel.mjs +1 -0
  19. package/dist/packem_chunks/LogsPanel.mjs +1 -0
  20. package/dist/packem_chunks/MailPanel.mjs +2 -0
  21. package/dist/packem_chunks/MetricsPanel.mjs +1 -0
  22. package/dist/packem_chunks/NotificationsPanel.mjs +1 -0
  23. package/dist/packem_chunks/PitrPanel.mjs +1 -0
  24. package/dist/packem_chunks/SchemaViewer.mjs +1 -0
  25. package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -0
  26. package/dist/packem_chunks/SettingsPanel.mjs +1 -0
  27. package/dist/packem_chunks/SqlEditorPanel.mjs +26 -0
  28. package/dist/packem_chunks/TableEditor.mjs +1 -0
  29. package/dist/packem_chunks/agents-panel.mjs +1 -0
  30. package/dist/packem_chunks/ai-knowledge.mjs +1 -0
  31. package/dist/packem_chunks/ai-usage-panel.mjs +1 -0
  32. package/dist/packem_chunks/analytics-panel.mjs +1 -0
  33. package/dist/packem_chunks/architecture-panel.mjs +1 -0
  34. package/dist/packem_chunks/assistant-panel.mjs +3 -0
  35. package/dist/packem_chunks/auth-audit-panel.mjs +1 -0
  36. package/dist/packem_chunks/auth-config-panel.mjs +1 -0
  37. package/dist/packem_chunks/auth-sessions-panel.mjs +1 -0
  38. package/dist/packem_chunks/containers-panel.mjs +1 -0
  39. package/dist/packem_chunks/dashboards-panel.mjs +1 -0
  40. package/dist/packem_chunks/evals-panel.mjs +1 -0
  41. package/dist/packem_chunks/fanout-panel.mjs +1 -0
  42. package/dist/packem_chunks/flags-panel.mjs +1 -0
  43. package/dist/packem_chunks/issues-panel.mjs +1 -0
  44. package/dist/packem_chunks/kv-browser.mjs +1 -0
  45. package/dist/packem_chunks/log-drains-panel.mjs +4 -0
  46. package/dist/packem_chunks/migrations-route.mjs +1 -0
  47. package/dist/packem_chunks/organizations-panel.mjs +1 -0
  48. package/dist/packem_chunks/payments-panel.mjs +1 -0
  49. package/dist/packem_chunks/permissions-panel.mjs +1 -0
  50. package/dist/packem_chunks/privacy-requests-panel.mjs +1 -0
  51. package/dist/packem_chunks/queues-panel.mjs +1 -0
  52. package/dist/packem_chunks/reactors-panel.mjs +1 -0
  53. package/dist/packem_chunks/rls-panel.mjs +1 -0
  54. package/dist/packem_chunks/schedule-panel.mjs +1 -0
  55. package/dist/packem_chunks/storage-rules-panel.mjs +1 -0
  56. package/dist/packem_chunks/subscriptions-panel.mjs +1 -0
  57. package/dist/packem_chunks/sync-client-panel.mjs +1 -0
  58. package/dist/packem_chunks/theme-indicator.mjs +1 -0
  59. package/dist/packem_chunks/traces-panel.mjs +1 -0
  60. package/dist/packem_chunks/users-panel.mjs +1 -0
  61. package/dist/packem_chunks/vector-browser.mjs +1 -0
  62. package/dist/packem_chunks/workflows-panel.mjs +1 -0
  63. package/dist/packem_shared/ADMIN_FUNCTIONS-DAHZ35kM.mjs +1 -0
  64. package/dist/packem_shared/ApiDocsPanel-CgjWqkBr.mjs +2 -0
  65. package/dist/packem_shared/ApiReferencePanel-DDvLw7c1.mjs +1 -0
  66. package/dist/packem_shared/CommandPalette-BjHFgNA6.mjs +1 -0
  67. package/dist/packem_shared/ConfirmButton-CIXYF6Mg.mjs +1 -0
  68. package/dist/packem_shared/ConnectionBadge-BfcoN-VE.mjs +1 -0
  69. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-jK7srdI4.mjs +1 -0
  70. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs +1 -0
  71. package/dist/packem_shared/DEFAULT_LOCALE-BQ3jRT74.mjs +1 -0
  72. package/dist/packem_shared/DataBrowser-Dp8ayK1S.mjs +4 -0
  73. package/dist/packem_shared/DataFilters--ocFTVT2.mjs +1 -0
  74. package/dist/packem_shared/ErrorBoundary-BWNF98VF.mjs +1 -0
  75. package/dist/packem_shared/GlobalDataBrowser-VehUMwUK.mjs +1 -0
  76. package/dist/packem_shared/HomePanel-D5-wWLAj.mjs +1 -0
  77. package/dist/packem_shared/MigrationsPanel-CTd2YSSk.mjs +1 -0
  78. package/dist/packem_shared/OpenRpcReferencePanel-dXFl95w8.mjs +1 -0
  79. package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.mjs +1 -0
  80. package/dist/packem_shared/ScheduledJobs-DPQHuiy6.mjs +1 -0
  81. package/dist/packem_shared/ShardInput-CoySruKZ.mjs +1 -0
  82. package/dist/packem_shared/Studio-CrfDOmdv.mjs +1 -0
  83. package/dist/packem_shared/StudioApp-DKBDIF7N.mjs +1 -0
  84. package/dist/packem_shared/StudioI18nProvider-CGXCPnQn.mjs +1 -0
  85. package/dist/packem_shared/advisor-view-C6C3kmZj.mjs +5 -0
  86. package/dist/packem_shared/aggregateMetrics-DKFJc-o5.mjs +1 -0
  87. package/dist/packem_shared/alert-PB5W11MM.mjs +1 -0
  88. package/dist/packem_shared/app.d-QqDN78r1.d.mts +374 -0
  89. package/dist/packem_shared/app.d-QqDN78r1.d.ts +374 -0
  90. package/dist/packem_shared/assistant-provider-b2GtJb5K.mjs +1 -0
  91. package/dist/packem_shared/assistant-reason-D6EwMCxT.mjs +1 -0
  92. package/dist/packem_shared/auth-pager-DW77WeZw.mjs +1 -0
  93. package/dist/packem_shared/badge-r_5B4LHP.mjs +1 -0
  94. package/dist/packem_shared/bar-chart-BCsEIQoQ.mjs +6 -0
  95. package/dist/packem_shared/browser-storage-BH1MxLZs.mjs +1 -0
  96. package/dist/packem_shared/button-q0UYSmrn.mjs +1 -0
  97. package/dist/packem_shared/card-By2O8ULa.mjs +1 -0
  98. package/dist/packem_shared/cf-links-BPy1pJRO.mjs +1 -0
  99. package/dist/packem_shared/checkbox-CnS9cyCz.mjs +1 -0
  100. package/dist/packem_shared/control-button-BOZ5K-FC.mjs +1 -0
  101. package/dist/packem_shared/data-grid-GQLHcpMI.mjs +1 -0
  102. package/dist/packem_shared/data-view-params-C-_G-biH.mjs +1 -0
  103. package/dist/packem_shared/diagram-export-panel-miFPsocM.mjs +2 -0
  104. package/dist/packem_shared/dropdown-menu-jLZenfWH.mjs +2 -0
  105. package/dist/packem_shared/empty-state-D7jEML_T.mjs +1 -0
  106. package/dist/packem_shared/error-alert-BxCd81tw.mjs +6 -0
  107. package/dist/packem_shared/grid-features-Cdy2nWxA.mjs +6 -0
  108. package/dist/packem_shared/grid-pagination-DY2erU65.mjs +1 -0
  109. package/dist/packem_shared/home-panel-BlvQ0xK2.mjs +3 -0
  110. package/dist/packem_shared/input-CXhxesPC.mjs +1 -0
  111. package/dist/packem_shared/internal-BT5tH08j.mjs +2 -0
  112. package/dist/packem_shared/label-DKFzyHq6.mjs +1 -0
  113. package/dist/packem_shared/live-status-D1GasNsH.mjs +1 -0
  114. package/dist/packem_shared/log-fields-CV-9O0nh.mjs +8 -0
  115. package/dist/packem_shared/log-line-BmYn49u1.mjs +1 -0
  116. package/dist/packem_shared/metrics-format-1sNGG47R.mjs +1 -0
  117. package/dist/packem_shared/modal-shell-CDztwLnv.mjs +1 -0
  118. package/dist/packem_shared/operation-console-provider-DoloEvon.mjs +1 -0
  119. package/dist/packem_shared/recording-client-D_-eNapT.mjs +1 -0
  120. package/dist/packem_shared/reference-view-CRtrtDMy.mjs +13 -0
  121. package/dist/packem_shared/schema-diagram-Dbs7-jSJ.mjs +2 -0
  122. package/dist/packem_shared/scroll-area-CXCQH7VT.mjs +2 -0
  123. package/dist/packem_shared/select-DPyS18Vy.mjs +2 -0
  124. package/dist/packem_shared/shard-history-CaO3C4KQ.mjs +1 -0
  125. package/dist/packem_shared/shortcuts-B9gDaXmw.mjs +1 -0
  126. package/dist/packem_shared/skeleton-DX1gfixl.mjs +1 -0
  127. package/dist/packem_shared/sparkline-B_sPPO_8.mjs +1 -0
  128. package/dist/packem_shared/sql-result-table-BuOHHoFG.mjs +1 -0
  129. package/dist/packem_shared/stat-card-BAv73QtB.mjs +1 -0
  130. package/dist/packem_shared/storage-tier-C2mKwYRj.mjs +1 -0
  131. package/dist/packem_shared/studio-CwelGawN.mjs +2 -0
  132. package/dist/packem_shared/table-D0SBiDu-.mjs +2 -0
  133. package/dist/packem_shared/table-list-sidebar-Cw7ll9yK.mjs +1 -0
  134. package/dist/packem_shared/textarea--40GKAyz.mjs +1 -0
  135. package/dist/packem_shared/trace-handoff-BV3EWqy_.mjs +1 -0
  136. package/dist/packem_shared/use-admin-query-DMnTt_hg.mjs +1 -0
  137. package/dist/packem_shared/use-admin-spec-Cokw73Ks.mjs +1 -0
  138. package/dist/packem_shared/use-assistant-rpc-DLsuqTPB.mjs +1 -0
  139. package/dist/packem_shared/use-async-submit-CBFJevkc.mjs +1 -0
  140. package/dist/packem_shared/use-auth-config-xzSMjhOV.mjs +1 -0
  141. package/dist/packem_shared/use-mirrored-ref-CVDf2z1M.mjs +1 -0
  142. package/dist/packem_shared/use-open-trace-trRfFb77.mjs +1 -0
  143. package/dist/packem_shared/use-shard-key-BsP3o5wT.mjs +1 -0
  144. package/dist/packem_shared/use-studio-client-DCA50tF2.mjs +1 -0
  145. package/dist/packem_shared/useDebounced-DVeQ5-oW.mjs +1 -0
  146. package/dist/packem_shared/utils-bhneXptQ.mjs +1 -0
  147. package/dist/packem_shared/virtual-rect-D_j7aLxX.mjs +1 -0
  148. package/dist/standalone/chunk-23MMGFHI.js +1 -0
  149. package/dist/standalone/chunk-2CDROYSG.js +1 -0
  150. package/dist/standalone/chunk-2D4WBSDO.js +3 -0
  151. package/dist/standalone/chunk-2KTN53PK.js +1 -0
  152. package/dist/standalone/chunk-2M37OAK3.js +1 -0
  153. package/dist/standalone/chunk-2NUCBQFU.js +1 -0
  154. package/dist/standalone/chunk-2OSZRVNW.js +1 -0
  155. package/dist/standalone/chunk-2YDK4MZM.js +1 -0
  156. package/dist/standalone/chunk-2ZJJH4YN.js +33 -0
  157. package/dist/standalone/chunk-375GZTYC.js +14 -0
  158. package/dist/standalone/chunk-3OVQC66W.js +1 -0
  159. package/dist/standalone/chunk-3WYPRZY3.js +1 -0
  160. package/dist/standalone/chunk-3YCWRKSW.js +1 -0
  161. package/dist/standalone/chunk-4AG356VE.js +1 -0
  162. package/dist/standalone/chunk-4KPATTV6.js +1 -0
  163. package/dist/standalone/chunk-4MFQ4XEJ.js +1 -0
  164. package/dist/standalone/chunk-4SY2N2RS.js +1 -0
  165. package/dist/standalone/chunk-4YVCKOYF.js +1 -0
  166. package/dist/standalone/chunk-5EIGSLIK.js +1 -0
  167. package/dist/standalone/chunk-5PEAXTYQ.js +1 -0
  168. package/dist/standalone/chunk-6K4F727K.js +1 -0
  169. package/dist/standalone/chunk-7ASIMMZY.js +1 -0
  170. package/dist/standalone/chunk-7WGZSDRS.js +2 -0
  171. package/dist/standalone/chunk-A6TVTNKO.js +1 -0
  172. package/dist/standalone/chunk-ADABTCDI.js +1 -0
  173. package/dist/standalone/chunk-ADS4BJ7K.js +1 -0
  174. package/dist/standalone/chunk-AFLNQEZ5.js +1 -0
  175. package/dist/standalone/chunk-APCHI5CD.js +1 -0
  176. package/dist/standalone/chunk-AQG5OGO4.js +5 -0
  177. package/dist/standalone/chunk-ATBPQT7F.js +1 -0
  178. package/dist/standalone/chunk-AXB32N5O.js +1 -0
  179. package/dist/standalone/chunk-AXDXIMCN.js +1 -0
  180. package/dist/standalone/chunk-BHUWAGFN.js +1 -0
  181. package/dist/standalone/chunk-BRPLE2Z6.js +4 -0
  182. package/dist/standalone/chunk-BU5VWXRR.js +1 -0
  183. package/dist/standalone/chunk-BWBECJFT.js +1 -0
  184. package/dist/standalone/chunk-BWHVY6L6.js +1 -0
  185. package/dist/standalone/chunk-CBTPJPCZ.js +1 -0
  186. package/dist/standalone/chunk-CFQQHZYU.js +1 -0
  187. package/dist/standalone/chunk-CL3JOU6F.js +1 -0
  188. package/dist/standalone/chunk-CO6R6GCX.js +1 -0
  189. package/dist/standalone/chunk-CP3LCFFM.js +8 -0
  190. package/dist/standalone/chunk-CQDENTSP.js +1 -0
  191. package/dist/standalone/chunk-CVJDEN5L.js +1 -0
  192. package/dist/standalone/chunk-CVSIFPI5.js +1 -0
  193. package/dist/standalone/chunk-CXXCVBMK.js +1 -0
  194. package/dist/standalone/chunk-CY45AO5T.js +1 -0
  195. package/dist/standalone/chunk-DA2CAFXI.js +1 -0
  196. package/dist/standalone/chunk-DRHZZ7IN.js +1 -0
  197. package/dist/standalone/chunk-DZV6YFWZ.js +1 -0
  198. package/dist/standalone/chunk-EDL46BPM.js +1 -0
  199. package/dist/standalone/chunk-EKXAE4PS.js +1 -0
  200. package/dist/standalone/chunk-ELPLRD4S.js +1 -0
  201. package/dist/standalone/chunk-EMZ7RPR3.js +4 -0
  202. package/dist/standalone/chunk-EOFWXI3T.js +1 -0
  203. package/dist/standalone/chunk-ERUKFS3I.js +1 -0
  204. package/dist/standalone/chunk-EYSF4DHD.js +1 -0
  205. package/dist/standalone/chunk-EZMAQE3T.js +59 -0
  206. package/dist/standalone/chunk-FKAOFBS3.js +1 -0
  207. package/dist/standalone/chunk-FWM5Z6CH.js +1 -0
  208. package/dist/standalone/chunk-FYAUOSTX.js +1 -0
  209. package/dist/standalone/chunk-H6VTIXVB.js +1 -0
  210. package/dist/standalone/chunk-HCK62XWB.js +1 -0
  211. package/dist/standalone/chunk-HJOXP6C3.js +2 -0
  212. package/dist/standalone/chunk-HLBZ7OAO.js +10 -0
  213. package/dist/standalone/chunk-HMMALUXM.js +1 -0
  214. package/dist/standalone/chunk-HUL247LG.js +1 -0
  215. package/dist/standalone/chunk-I6YVDNKQ.js +1 -0
  216. package/dist/standalone/chunk-IL64HWFW.js +1 -0
  217. package/dist/standalone/chunk-IQ5CIBXJ.js +1 -0
  218. package/dist/standalone/chunk-IXCSVK2Z.js +3 -0
  219. package/dist/standalone/chunk-JNWK5MJC.js +1 -0
  220. package/dist/standalone/chunk-JQBVRWFN.js +1 -0
  221. package/dist/standalone/chunk-JZN3MNJX.js +6 -0
  222. package/dist/standalone/chunk-K2LXQ3LS.js +1 -0
  223. package/dist/standalone/chunk-K5W5C237.js +1 -0
  224. package/dist/standalone/chunk-KGQPMSNY.js +1 -0
  225. package/dist/standalone/chunk-KIQ34774.js +1 -0
  226. package/dist/standalone/chunk-KZXSJF7K.js +1 -0
  227. package/dist/standalone/chunk-L27FKJTG.js +1 -0
  228. package/dist/standalone/chunk-L6VJTINV.js +1 -0
  229. package/dist/standalone/chunk-L7TFQUD7.js +1 -0
  230. package/dist/standalone/chunk-LJLNIVUA.js +8 -0
  231. package/dist/standalone/chunk-LLD7TMBV.js +1 -0
  232. package/dist/standalone/chunk-LLSK6QBX.js +1 -0
  233. package/dist/standalone/chunk-LMCBMC2V.js +1 -0
  234. package/dist/standalone/chunk-LOEVTOKP.js +6 -0
  235. package/dist/standalone/chunk-LRUYEVHH.js +1 -0
  236. package/dist/standalone/chunk-LYVYUTQY.js +1 -0
  237. package/dist/standalone/chunk-LYWT6GTX.js +1 -0
  238. package/dist/standalone/chunk-MHZNDDGI.js +1 -0
  239. package/dist/standalone/chunk-MNN3YCKF.js +1 -0
  240. package/dist/standalone/chunk-N7FOBAV3.js +1 -0
  241. package/dist/standalone/chunk-NAGIOR23.js +1 -0
  242. package/dist/standalone/chunk-NFI2TNKU.js +1 -0
  243. package/dist/standalone/chunk-NP6CBOPK.js +1 -0
  244. package/dist/standalone/chunk-O5QATFN3.js +159 -0
  245. package/dist/standalone/chunk-O66HDCZT.js +1 -0
  246. package/dist/standalone/chunk-ODEIAS3V.js +1 -0
  247. package/dist/standalone/chunk-OJR7BDKC.js +1 -0
  248. package/dist/standalone/chunk-OQTMT64P.js +5 -0
  249. package/dist/standalone/chunk-OWCTA7GY.js +1 -0
  250. package/dist/standalone/chunk-OWRWDDJT.js +1 -0
  251. package/dist/standalone/chunk-OZID3UYF.js +1 -0
  252. package/dist/standalone/chunk-P3ML7HGE.js +1 -0
  253. package/dist/standalone/chunk-PBXRUYD3.js +1 -0
  254. package/dist/standalone/chunk-PDBW6GTJ.js +1 -0
  255. package/dist/standalone/chunk-QF743FSL.js +1 -0
  256. package/dist/standalone/chunk-QFN62JQJ.js +7 -0
  257. package/dist/standalone/chunk-QHVUXMRV.js +1 -0
  258. package/dist/standalone/chunk-QLZGKBOW.js +1 -0
  259. package/dist/standalone/chunk-QTWNCDLK.js +1 -0
  260. package/dist/standalone/chunk-R3RIZDUS.js +1 -0
  261. package/dist/standalone/chunk-R6NJ4ER6.js +1 -0
  262. package/dist/standalone/chunk-RIAOZECW.js +1 -0
  263. package/dist/standalone/chunk-RJJRUUTE.js +1 -0
  264. package/dist/standalone/chunk-SCTYLLJT.js +1 -0
  265. package/dist/standalone/chunk-SGIEXE5J.js +1 -0
  266. package/dist/standalone/chunk-T7UKRA6J.js +1 -0
  267. package/dist/standalone/chunk-U5UEDY4E.js +1 -0
  268. package/dist/standalone/chunk-U7NVTULW.js +1 -0
  269. package/dist/standalone/chunk-UFS6UP4Z.js +1 -0
  270. package/dist/standalone/chunk-UL5XVKGR.js +1 -0
  271. package/dist/standalone/chunk-V3DOKU22.js +1 -0
  272. package/dist/standalone/chunk-V4B7ZPEG.js +1 -0
  273. package/dist/standalone/chunk-V5TGDG6U.js +1 -0
  274. package/dist/standalone/chunk-VQQEDEHH.js +1 -0
  275. package/dist/standalone/chunk-W5BTAOHO.js +1 -0
  276. package/dist/standalone/chunk-W7CLOQOU.js +1 -0
  277. package/dist/standalone/chunk-WEPANQGT.js +1 -0
  278. package/dist/standalone/chunk-WXZ334CL.js +1 -0
  279. package/dist/standalone/chunk-XV2XEUUB.js +1 -0
  280. package/dist/standalone/chunk-Y2AKO63C.js +31 -0
  281. package/dist/standalone/{chunk-BJGBHGK3.js → chunk-Y2YLTUMD.js} +1 -1
  282. package/dist/standalone/chunk-Y5QMX4YG.js +1 -0
  283. package/dist/standalone/chunk-Y6OVSHPH.js +1 -0
  284. package/dist/standalone/chunk-YLC2ZYCL.js +1 -0
  285. package/dist/standalone/chunk-YNCZVYCO.js +1 -0
  286. package/dist/standalone/chunk-YYJGL32M.js +1 -0
  287. package/dist/standalone/chunk-ZADOHFZB.js +3 -0
  288. package/dist/standalone/chunk-ZJIYJZ6F.js +1 -0
  289. package/dist/standalone/chunk-ZP453BM4.js +1 -0
  290. package/dist/standalone/chunk-ZPQBVYNN.js +1 -0
  291. package/dist/standalone/studio.js +9 -214
  292. package/dist/styles.css +2 -2
  293. package/package.json +28 -23
  294. package/dist/index.js +0 -41
  295. package/dist/mount.js +0 -27
  296. package/dist/packem_chunks/ApiTab.js +0 -251
  297. package/dist/packem_chunks/AuditPanel.js +0 -200
  298. package/dist/packem_chunks/ExportImportPanel.js +0 -198
  299. package/dist/packem_chunks/FileBrowser.js +0 -2932
  300. package/dist/packem_chunks/FunctionRunner.js +0 -343
  301. package/dist/packem_chunks/FunctionStatsPanel.js +0 -377
  302. package/dist/packem_chunks/HealthPanel.js +0 -648
  303. package/dist/packem_chunks/InsightsPanel.js +0 -462
  304. package/dist/packem_chunks/LogsPanel.js +0 -827
  305. package/dist/packem_chunks/MailPanel.js +0 -353
  306. package/dist/packem_chunks/MetricsPanel.js +0 -1344
  307. package/dist/packem_chunks/MigrationsPanel.js +0 -239
  308. package/dist/packem_chunks/PitrPanel.js +0 -252
  309. package/dist/packem_chunks/SchemaViewer.js +0 -2513
  310. package/dist/packem_chunks/SecurityAdvisorPanel.js +0 -95
  311. package/dist/packem_chunks/SettingsPanel.js +0 -391
  312. package/dist/packem_chunks/SqlEditorPanel.js +0 -2333
  313. package/dist/packem_chunks/TableEditor.js +0 -313
  314. package/dist/packem_chunks/analytics-panel.js +0 -261
  315. package/dist/packem_chunks/auth-config-panel.js +0 -365
  316. package/dist/packem_chunks/auth-sessions-panel.js +0 -175
  317. package/dist/packem_chunks/containers-panel.js +0 -247
  318. package/dist/packem_chunks/dashboards-panel.js +0 -780
  319. package/dist/packem_chunks/fanout-panel.js +0 -482
  320. package/dist/packem_chunks/flags-panel.js +0 -176
  321. package/dist/packem_chunks/kv-browser.js +0 -1896
  322. package/dist/packem_chunks/log-drains-panel.js +0 -273
  323. package/dist/packem_chunks/organizations-panel.js +0 -3178
  324. package/dist/packem_chunks/payments-panel.js +0 -186
  325. package/dist/packem_chunks/permissions-panel.js +0 -805
  326. package/dist/packem_chunks/queues-panel.js +0 -1075
  327. package/dist/packem_chunks/rls-panel.js +0 -315
  328. package/dist/packem_chunks/schedule-panel.js +0 -831
  329. package/dist/packem_chunks/sparkline.js +0 -79
  330. package/dist/packem_chunks/storage-rules-panel.js +0 -140
  331. package/dist/packem_chunks/subscriptions-panel.js +0 -238
  332. package/dist/packem_chunks/users-panel.js +0 -1731
  333. package/dist/packem_chunks/vector-browser.js +0 -281
  334. package/dist/packem_chunks/workflows-panel.js +0 -562
  335. package/dist/packem_shared/ADMIN_FUNCTIONS-BHHJi3Gb.js +0 -52
  336. package/dist/packem_shared/ApiDocsPanel-CBma-lnp.js +0 -842
  337. package/dist/packem_shared/ApiReferencePanel-CQM3pPN7.js +0 -230
  338. package/dist/packem_shared/CommandPalette-X2tkbyHk.js +0 -373
  339. package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
  340. package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
  341. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
  342. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
  343. package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
  344. package/dist/packem_shared/DataBrowser-D2ywrdId.js +0 -4493
  345. package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
  346. package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
  347. package/dist/packem_shared/GlobalDataBrowser-BkTPLzAY.js +0 -289
  348. package/dist/packem_shared/HomePanel-D1Q9LZgK.js +0 -14
  349. package/dist/packem_shared/OpenRpcReferencePanel-Dno-hfDb.js +0 -192
  350. package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
  351. package/dist/packem_shared/ScheduledJobs-Ctw4jYtU.js +0 -262
  352. package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
  353. package/dist/packem_shared/Studio-lJhzDAze.js +0 -16
  354. package/dist/packem_shared/StudioApp-DiMkupvZ.js +0 -648
  355. package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
  356. package/dist/packem_shared/advisor-view-BX8OhG0w.js +0 -159
  357. package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
  358. package/dist/packem_shared/alert-CdAET2K_.js +0 -68
  359. package/dist/packem_shared/app.d-CNLRTrWw.d.ts +0 -300
  360. package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
  361. package/dist/packem_shared/bar-chart-DSwcWIRy.js +0 -3246
  362. package/dist/packem_shared/browser-storage-BTrX4y3B.js +0 -215
  363. package/dist/packem_shared/button-BhsN2uZH.js +0 -49
  364. package/dist/packem_shared/card-DURq3ElK.js +0 -175
  365. package/dist/packem_shared/cf-links-BZfRdxSE.js +0 -8
  366. package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
  367. package/dist/packem_shared/data-grid-CdXztApG.js +0 -183
  368. package/dist/packem_shared/data-view-params-Cd6yRVbv.js +0 -96
  369. package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
  370. package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
  371. package/dist/packem_shared/error-alert-CXjqyGw9.js +0 -114
  372. package/dist/packem_shared/grid-features-BF-KBDFz.js +0 -808
  373. package/dist/packem_shared/home-panel-TFcRf9Ui.js +0 -1889
  374. package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
  375. package/dist/packem_shared/internal-CYcbqMjX.js +0 -109
  376. package/dist/packem_shared/label-D8ykjn5J.js +0 -46
  377. package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
  378. package/dist/packem_shared/modal-shell-hyaJvIJ6.js +0 -100
  379. package/dist/packem_shared/reference-view-DUiJcILV.js +0 -2141
  380. package/dist/packem_shared/scroll-area-DLhcy-ml.js +0 -93
  381. package/dist/packem_shared/select-UkNYCT3s.js +0 -273
  382. package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
  383. package/dist/packem_shared/skeleton-CGhL0p20.js +0 -45
  384. package/dist/packem_shared/sparkline-BnA1kC9X.js +0 -93
  385. package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
  386. package/dist/packem_shared/studio-Dh9UlaF_.js +0 -4015
  387. package/dist/packem_shared/table-DsCa9Qp9.js +0 -246
  388. package/dist/packem_shared/table-list-sidebar-UVIXQJdU.js +0 -832
  389. package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
  390. package/dist/packem_shared/use-admin-query-CfHYWx5n.js +0 -106
  391. package/dist/packem_shared/use-async-submit-DJQiPc-_.js +0 -91
  392. package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
  393. package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
  394. package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
  395. package/dist/standalone/chunk-23C4TCRO.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-3CJW6NWG.js +0 -4
  399. package/dist/standalone/chunk-3OA7PECS.js +0 -6
  400. package/dist/standalone/chunk-4QHKBC77.js +0 -1
  401. package/dist/standalone/chunk-5OIBXYZM.js +0 -1
  402. package/dist/standalone/chunk-5ZAA2PVR.js +0 -1
  403. package/dist/standalone/chunk-676HEBIR.js +0 -3
  404. package/dist/standalone/chunk-6VO23MMW.js +0 -4
  405. package/dist/standalone/chunk-7RE5UW27.js +0 -8
  406. package/dist/standalone/chunk-7TJJXVSE.js +0 -1
  407. package/dist/standalone/chunk-7YXOPTWI.js +0 -1
  408. package/dist/standalone/chunk-AAVIFQ4Y.js +0 -2
  409. package/dist/standalone/chunk-AHILM3ZP.js +0 -1
  410. package/dist/standalone/chunk-AJFQ3LNM.js +0 -1
  411. package/dist/standalone/chunk-AJULNB46.js +0 -4
  412. package/dist/standalone/chunk-BGXOXASQ.js +0 -1
  413. package/dist/standalone/chunk-BKW7FFEO.js +0 -1
  414. package/dist/standalone/chunk-BOXSWNXZ.js +0 -1
  415. package/dist/standalone/chunk-BXOYVWJR.js +0 -13
  416. package/dist/standalone/chunk-C7WTJLC3.js +0 -1
  417. package/dist/standalone/chunk-CACB34RQ.js +0 -1
  418. package/dist/standalone/chunk-CICVBMEN.js +0 -1
  419. package/dist/standalone/chunk-CKSHCYGC.js +0 -2
  420. package/dist/standalone/chunk-CWEAJUHW.js +0 -1
  421. package/dist/standalone/chunk-DC72CQY4.js +0 -76
  422. package/dist/standalone/chunk-DECHEGIC.js +0 -1
  423. package/dist/standalone/chunk-DWDILV2E.js +0 -1
  424. package/dist/standalone/chunk-E75ANNWX.js +0 -19
  425. package/dist/standalone/chunk-ERJNDIXC.js +0 -1
  426. package/dist/standalone/chunk-FKACHRWO.js +0 -1
  427. package/dist/standalone/chunk-FSGCANAU.js +0 -1
  428. package/dist/standalone/chunk-GLUNBZRI.js +0 -1
  429. package/dist/standalone/chunk-GMSGZDDH.js +0 -13
  430. package/dist/standalone/chunk-GTM65MVX.js +0 -1
  431. package/dist/standalone/chunk-H6RKXQZU.js +0 -1
  432. package/dist/standalone/chunk-HV7G6DFP.js +0 -5
  433. package/dist/standalone/chunk-HZTGDL4L.js +0 -1
  434. package/dist/standalone/chunk-I7ZZRM7I.js +0 -1
  435. package/dist/standalone/chunk-IXDH4GL5.js +0 -1
  436. package/dist/standalone/chunk-J46WXQYL.js +0 -1
  437. package/dist/standalone/chunk-J6J54MBP.js +0 -1
  438. package/dist/standalone/chunk-JSEXCW5Q.js +0 -1
  439. package/dist/standalone/chunk-JVODY4EP.js +0 -1
  440. package/dist/standalone/chunk-KEGAWN6Y.js +0 -1
  441. package/dist/standalone/chunk-KJJ3WM6H.js +0 -4
  442. package/dist/standalone/chunk-KSKXW5PX.js +0 -1
  443. package/dist/standalone/chunk-KZ6INM5M.js +0 -1
  444. package/dist/standalone/chunk-L7SK4ZZD.js +0 -1
  445. package/dist/standalone/chunk-LAK5VSPI.js +0 -1
  446. package/dist/standalone/chunk-LNZIB2MD.js +0 -1
  447. package/dist/standalone/chunk-LYB5L53X.js +0 -1
  448. package/dist/standalone/chunk-MJWVMKQ4.js +0 -6
  449. package/dist/standalone/chunk-MT2J3H7O.js +0 -3
  450. package/dist/standalone/chunk-N746FOQP.js +0 -1
  451. package/dist/standalone/chunk-NC6MBMSI.js +0 -1
  452. package/dist/standalone/chunk-NN27EDQB.js +0 -1
  453. package/dist/standalone/chunk-NY6GDADQ.js +0 -1
  454. package/dist/standalone/chunk-O3NAGRTR.js +0 -1
  455. package/dist/standalone/chunk-OY3HD7BJ.js +0 -4
  456. package/dist/standalone/chunk-P5HJXCZS.js +0 -1
  457. package/dist/standalone/chunk-PTS5TW3J.js +0 -1
  458. package/dist/standalone/chunk-Q52CHOSY.js +0 -1
  459. package/dist/standalone/chunk-QAFAJBAW.js +0 -1
  460. package/dist/standalone/chunk-QBAT52GB.js +0 -1
  461. package/dist/standalone/chunk-QDBOPDJ7.js +0 -1
  462. package/dist/standalone/chunk-QHFTGJPS.js +0 -4
  463. package/dist/standalone/chunk-RRCPZMC2.js +0 -22
  464. package/dist/standalone/chunk-SEU5V7I6.js +0 -1
  465. package/dist/standalone/chunk-SG3ALJJU.js +0 -1
  466. package/dist/standalone/chunk-SSI4G2MY.js +0 -1
  467. package/dist/standalone/chunk-TAD43CG5.js +0 -1
  468. package/dist/standalone/chunk-TBMYIZIO.js +0 -1
  469. package/dist/standalone/chunk-TH45YG6Q.js +0 -1
  470. package/dist/standalone/chunk-TQ36RWOP.js +0 -1
  471. package/dist/standalone/chunk-UGUEC6BC.js +0 -1
  472. package/dist/standalone/chunk-UK64ZSUW.js +0 -1
  473. package/dist/standalone/chunk-UKDJ4H7I.js +0 -1
  474. package/dist/standalone/chunk-V6IWFYAQ.js +0 -1
  475. package/dist/standalone/chunk-V7SRH36W.js +0 -1
  476. package/dist/standalone/chunk-VLXV72QE.js +0 -1
  477. package/dist/standalone/chunk-VON7JUPG.js +0 -1
  478. package/dist/standalone/chunk-WI7GWFEG.js +0 -1
  479. package/dist/standalone/chunk-WPNXY7IS.js +0 -1
  480. package/dist/standalone/chunk-X33MSJPP.js +0 -1
  481. package/dist/standalone/chunk-XNJNSCLM.js +0 -1
  482. package/dist/standalone/chunk-XRNXOIVZ.js +0 -1
  483. package/dist/standalone/chunk-YAECF5LW.js +0 -1
  484. package/dist/standalone/chunk-YBGC4PPD.js +0 -1
  485. package/dist/standalone/chunk-YNZ7ARWW.js +0 -1
  486. package/dist/standalone/chunk-YTO65GHS.js +0 -1
  487. package/dist/standalone/chunk-ZE6FT5Z3.js +0 -1
  488. package/dist/standalone/chunk-ZHVTQ37P.js +0 -1
  489. package/dist/standalone/chunk-ZIGWVHCS.js +0 -1
  490. package/dist/standalone/chunk-ZPP2KOR4.js +0 -1
  491. package/dist/standalone/chunk-ZPUO7FNI.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-Cokw73Ks.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-CRtrtDMy.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-DMnTt_hg.mjs";import{useAutoRefresh as V}from"./DEFAULT_AUTO_REFRESH_MS-jK7srdI4.mjs";import{u as W}from"./use-studio-client-DCA50tF2.mjs";import{useT as z}from"./DEFAULT_LOCALE-BQ3jRT74.mjs";import{f as G,c as O,b as U}from"./internal-BT5tH08j.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-b2GtJb5K.mjs";import{S as c}from"./studio-CwelGawN.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-BlvQ0xK2.mjs";import"./DEFAULT_LOCALE-BQ3jRT74.mjs";import"./StudioI18nProvider-CGXCPnQn.mjs";import"./data-view-params-C-_G-biH.mjs";import"./internal-BT5tH08j.mjs";import"./utils-bhneXptQ.mjs";import"./CommandPalette-BjHFgNA6.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-CwelGawN.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-BT5tH08j.mjs";import{w as R}from"./recording-client-D_-eNapT.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 N}from"react";import{u as T}from"./assistant-provider-b2GtJb5K.mjs";import{E as k}from"./error-alert-BxCd81tw.mjs";import{B as E}from"./badge-r_5B4LHP.mjs";import{C as A,a as C}from"./card-By2O8ULa.mjs";import{T as L,a as $,b as p,c as u,d as R,e as d}from"./table-D0SBiDu-.mjs";import{useT as S}from"./DEFAULT_LOCALE-BQ3jRT74.mjs";import{c as V}from"./utils-bhneXptQ.mjs";import{jsxs as a,jsx as t}from"react/jsx-runtime";const B={ERROR:"error",INFO:"info",WARN:"warning"},P=s=>{const n=typeof s.metadata.table=="string"?s.metadata.table:void 0;return{description:`${s.detail} ${s.remediation}`,entity:n,issueType:s.title,key:s.cacheKey,level:B[s.level],...s.suppressed===void 0?{}:{suppressed:{file:s.suppressed.file,line:s.suppressed.line,reason:s.suppressed.reason}}}},O=["error","warning","info"],D={error:"bg-destructive",info:"bg-info",warning:"bg-warning"},H=(s,n)=>({error:s("Errors"),info:s("Info"),warning:s("Warnings")})[n],I=(s,n,i)=>({error:s("{count} errors",{count:i}),info:s("{count} suggestions",{count:i}),warning:s("{count} warnings",{count:i})})[n],W=(s,n)=>({error:s("No errors detected"),info:s("No suggestions"),warning:s("No warnings detected")})[n],j=s=>{const n={error:0,info:0,warning:0};for(const i of s??[])n[i.level]+=1;return n},Q=({error:s=null,errorSource:n,rows:i,shardKey:m,testId:o,toolbar:f})=>{const r=S(),l=T(),h=l!==void 0&&!l.unavailable,[c,g]=N("error"),v=j(i),x=(i??[]).filter(e=>e.suppressed!==void 0).length,b=(i??[]).filter(e=>e.level===c),y=e=>{g(e.currentTarget.dataset.level)};return a("div",{className:"flex flex-col gap-3","data-testid":o,children:[a("div",{className:"flex border-b border-border",role:"tablist",children:[O.map(e=>a("button",{"aria-selected":c===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:[t("span",{"aria-hidden":"true",className:V("size-2 rounded-sm",D[e])}),H(r,e)]}),t("span",{className:"ps-4 text-xs text-muted-foreground",children:I(r,e,v[e])})]},e)),x>0&&t("span",{className:"ms-auto self-center px-4 text-xs text-muted-foreground","data-testid":`${o}-suppressed-count`,children:r("{count} suppressed",{count:x})})]}),f!==void 0&&t("div",{className:"flex flex-wrap items-center gap-2",children:f}),s!==null&&t(k,{error:n??s,shardKey:m,testId:`${o}-error`}),t(A,{className:"overflow-hidden py-0",children:t(C,{className:"px-0",children:a(L,{children:[t($,{children:a(p,{children:[t(u,{children:r("Issue type")}),t(u,{children:r("Entity/item")}),t(u,{children:r("Description")})]})}),t(R,{children:b.length===0?t(p,{children:a(d,{className:"h-40 text-center align-middle text-muted-foreground",colSpan:3,"data-testid":`${o}-empty`,children:[t("span",{className:"block text-sm font-medium text-foreground",children:W(r,c)}),t("span",{className:"block text-sm",children:r("Nothing to report for this deployment.")})]})}):b.map(e=>a(p,{children:[a(d,{className:"font-medium text-foreground",children:[e.issueType,e.suppressed!==void 0&&t(E,{className:"ms-2","data-testid":"advisor-suppressed-badge",title:e.suppressed.reason,variant:"outline",children:r("Suppressed")})]}),t(d,{className:"font-mono text-xs text-muted-foreground",children:e.entity??"—"}),a(d,{className:"text-muted-foreground",children:[t("span",{children:e.description}),e.suppressed!==void 0&&t("span",{className:"mt-1 block text-xs","data-testid":"advisor-suppressed-reason",children:r("Suppressed at {location}: {reason}",{location:`${e.suppressed.file}:${String(e.suppressed.line)}`,reason:e.suppressed.reason})}),(e.action!==void 0||h)&&a("span",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[e.action,h&&t("button",{className:"text-xs underline outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":"advisor-ask-assistant",onClick:()=>{l.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:m,suggestions:[r("How do I verify this is fixed?")],title:e.issueType})},type:"button",children:r("Ask the assistant")})]})]})]},e.key))})]})})})]})};export{Q as A,P 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,374 @@
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", "restored", "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
+ * The worker this Studio talks to has the companion advisor Worker deployed
154
+ * (`studio.companion` in `lunora.config.ts`). Off by default: a hosted Studio
155
+ * with no companion would otherwise request a route that is expected to 404.
156
+ * A dev host does not need it, since it serves the list from its own origin.
157
+ */
158
+ readonly advisorCompanion?: boolean;
159
+ /**
160
+ * The host serves `/__lunora/advisor-procedures`, which the Advisors Health tab
161
+ * reads as its score denominator. Off by default. Set by the dev hosts only; kept
162
+ * apart from {@link StudioProps.schemaEditable} because a host can serve the
163
+ * schema editor without this route.
164
+ */
165
+ readonly advisorProcedures?: boolean;
166
+ /**
167
+ * Resolve one Analytics tab panel by its key (`"volume"`, `"latency"`,
168
+ * `"hotShards"`). Supply a runner that calls an action in your app which
169
+ * builds the statement server-side and runs it through `ctx.analyticsSql`:
170
+ *
171
+ * ```ts
172
+ * // lunora/studio-analytics.ts
173
+ * export const usagePanel = action.input({ panel: v.string() }).action(async ({ args, ctx }) => {
174
+ * assertAdmin(ctx); // your own admin check: this reads account analytics
175
+ * if (!isFunctionUsagePanel(args.panel)) throw new LunoraError("BAD_REQUEST", "unknown panel");
176
+ * const { params, query } = functionUsageQuery(args.panel);
177
+ * return ctx.analyticsSql.query(query, params);
178
+ * });
179
+ * ```
180
+ *
181
+ * The action MUST be admin-gated and MUST take the panel key, never SQL: an
182
+ * action running caller-supplied SQL could read every dataset in the account.
183
+ * Without a runner the Analytics tab renders an empty state and issues no
184
+ * request.
185
+ *
186
+ * Pass a STABLE reference — a module-level function, or one held in a
187
+ * `useCallback`/ref. It is read while building the tab router, so a fresh
188
+ * inline arrow on every render rebuilds the router and remounts the panel
189
+ * tree, losing in-progress query state. The same holds for `scheduledLoad`,
190
+ * `scheduledCancel` and `scheduledCron`.
191
+ */
192
+ readonly analyticsSqlQuery?: AnalyticsPanelProps["runQuery"];
193
+ /**
194
+ * URL path prefix the studio is mounted under, passed to the router as its
195
+ * `basepath`. Defaults to `/` (mounted at the origin root). The `@lunora/vite`
196
+ * dev route serves the studio under `/__lunora`, so it sets this — without
197
+ * it the router treats `/__lunora` as unknown and bounces to `/data`, escaping
198
+ * the mount.
199
+ */
200
+ readonly basePath?: string;
201
+ /**
202
+ * App-owned top-bar + sidebar-footer chrome (theme toggle, admin-token
203
+ * popover, rules banner). The batteries-included `StudioApp` supplies
204
+ * this; composing `<Studio>` bare omits those affordances. See {@link StudioChrome}.
205
+ */
206
+ readonly chrome?: StudioChrome;
207
+ /**
208
+ * Show the data tab's write controls (insert/edit/delete rows). Off by
209
+ * default; see {@link TableEditor}.
210
+ *
211
+ * **This HIDES THE CONTROLS. It does not make anything read-only.** The
212
+ * write RPCs are gated server-side by `LUNORA_ADMIN_TOKEN` alone — one
213
+ * all-or-nothing check in `handleAdminRpc`, with no read/write scoping — and
214
+ * `renderStudioHtml({ adminToken })` already ships that bearer to the
215
+ * browser. So a viewer handed a studio deployed with `dataEditable: false`
216
+ * still holds a credential that can write; the buttons are simply absent
217
+ * from the page. Treat it as an affordance switch for a trusted operator,
218
+ * never as an authorization boundary. The same holds for
219
+ * {@link StudioProps.schemaEditable} and {@link StudioProps.runAsIdentity}.
220
+ */
221
+ readonly dataEditable?: boolean;
222
+ /**
223
+ * Functions exposed in the runner tab. The runner tab only appears when at
224
+ * least one descriptor is supplied (a query/mutation/action's `kind` is
225
+ * compile-time-only, so it must be named here).
226
+ */
227
+ readonly functions?: FunctionDescriptor[];
228
+ /** Reuse an existing Lingui instance (wins over `locale`). */
229
+ readonly i18n?: I18n;
230
+ /** Shard key every shard-scoped panel targets on first load. */
231
+ readonly initialShardKey?: string;
232
+ /** Active locale for the studio's own UI strings. Defaults to `en`. */
233
+ readonly locale?: string;
234
+ /**
235
+ * Inline OpenAPI 3.1 document rendered by the API tab's reference sub-view.
236
+ * Thread the generated `_generated/openapi.json` here to render it
237
+ * without a round-trip. When omitted the reference fetches the worker's
238
+ * admin-gated `GET /_lunora/admin/openapi` endpoint via the client.
239
+ */
240
+ readonly openApiSpec?: unknown;
241
+ /**
242
+ * Inline OpenRPC 1.x document rendered by the API tab's reference sub-view
243
+ * when the OpenRPC format is selected. Thread the generated
244
+ * `_generated/openrpc.json` here to render it without a round-trip. When
245
+ * omitted the OpenRPC view fetches the worker's admin-gated
246
+ * `GET /_lunora/admin/openrpc` endpoint via the client.
247
+ */
248
+ readonly openRpcSpec?: unknown;
249
+ /**
250
+ * The app's data-subject request source for the Privacy requests page, built
251
+ * from the app's own admin functions (`listOpenPrivacyRequests`,
252
+ * `retryPrivacyRequest`). Without one the page renders a "not configured" state
253
+ * and issues no request. Pass a STABLE reference, as for `analyticsSqlQuery`.
254
+ */
255
+ readonly privacyRequests?: PrivacyRequestsSource;
256
+ /**
257
+ * Allow the function runner to execute a function AS a chosen authenticated
258
+ * identity (the "Run as identity" tool), so an operator can test auth + RLS
259
+ * behavior. Security-sensitive: it forges identity on an admin-gated RPC, so
260
+ * the host MUST set this only on a trusted loopback-dev gate (the same gate
261
+ * as `dataEditable`) — never in a production/static deploy. Off by default;
262
+ * see {@link FunctionRunner}.
263
+ *
264
+ * Like {@link StudioProps.dataEditable}, leaving it off only hides the tool.
265
+ * The RPC behind it stays reachable to anyone holding the admin token the
266
+ * page already carries — the gate is the token, not this flag.
267
+ */
268
+ readonly runAsIdentity?: boolean;
269
+ /**
270
+ * Override how the schedule tab cancels a job. Defaults to the client's
271
+ * scheduler admin endpoint; see {@link SchedulePanel}.
272
+ */
273
+ readonly scheduledCancel?: SchedulePanelProps["scheduledCancel"];
274
+ /**
275
+ * Override how the schedule tab's Cron triggers sub-view loads triggers.
276
+ * Defaults to the client's `/_lunora/admin/cron-jobs` endpoint; see
277
+ * {@link SchedulePanel}.
278
+ */
279
+ readonly scheduledCron?: SchedulePanelProps["loadCronJobs"];
280
+ /**
281
+ * Override how the schedule tab loads jobs. Defaults to the client's
282
+ * scheduler admin endpoint, so the tab works without extra wiring.
283
+ */
284
+ readonly scheduledLoad?: SchedulePanelProps["scheduledLoad"];
285
+ /**
286
+ * Show the visual schema editor overlay on the schema diagram (add table /
287
+ * column / index, written back to `lunora/schema.ts` + codegen). Off by
288
+ * default. Only the loopback-only dev hosts set this — the write path needs
289
+ * the project's filesystem + toolchain, so a static deploy leaves it off.
290
+ *
291
+ * Like {@link StudioProps.dataEditable}, it hides the overlay rather than
292
+ * making the diagram read-only: what actually stops a schema write in a
293
+ * static deploy is that the host has no filesystem to write to, not this
294
+ * flag.
295
+ */
296
+ readonly schemaEditable?: boolean;
297
+ }
298
+ /**
299
+ * Top-bar + sidebar-footer chrome the `StudioApp` owns (theme + admin
300
+ * token state, the rules banner) but which renders *inside* the router-owned
301
+ * {@link StudioLayout} (the header and sidebar footer). The layout is a route
302
+ * component with no props, so it reads this from context rather than threading
303
+ * it through the router. Absent (composing `<Studio>` bare) the layout simply
304
+ * omits those affordances.
305
+ */
306
+ interface StudioChrome {
307
+ readonly clearToken: () => void;
308
+ readonly onTokenChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
309
+ readonly rulesInstalled?: boolean;
310
+ readonly token: string;
311
+ }
312
+ /**
313
+ * The composable studio. {@link StudioShell} reads its strings from `useT`,
314
+ * which needs a `StudioI18nProvider` above it.
315
+ *
316
+ * When an `i18n` instance or a `locale` is supplied, this owns a provider so the
317
+ * studio localises itself standalone. When neither is given it renders the
318
+ * shell bare and inherits whatever provider is already in scope — the host app's
319
+ * (`StudioApp` owns one for the top bar too) or the shared default — instead
320
+ * of nesting a second, redundant provider.
321
+ */
322
+ declare const Studio: ({ i18n, locale, ...shellProps }: StudioProps) => ReactElement;
323
+ interface StudioAppProps {
324
+ /**
325
+ * Admin bearer token to send with every admin request. When omitted the app
326
+ * renders a small prompt so an operator can paste it at runtime — handy in
327
+ * dev where you don't want to bake the token into a bundle.
328
+ */
329
+ readonly adminToken?: string;
330
+ /**
331
+ * URL path prefix the studio is mounted under (router `basepath`). Defaults
332
+ * to `/`. The `@lunora/vite` dev route sets `/__lunora`. Forwarded to the
333
+ * composed {@link Studio}.
334
+ */
335
+ readonly basePath?: string;
336
+ /**
337
+ * Base URL of the Lunora worker the studio talks to. Defaults to the
338
+ * current origin, which is correct when the studio is served from the
339
+ * same worker (the `@lunora/vite` dev route) or proxied to it.
340
+ */
341
+ readonly baseUrl?: string;
342
+ /**
343
+ * Inject a pre-built client instead of constructing one from `baseUrl` +
344
+ * the admin token. Used by the dev mock harness (and embeddings that own
345
+ * the client) so the chrome renders against a supplied client; when set,
346
+ * `baseUrl`/`adminToken` are ignored and this client is never closed here.
347
+ */
348
+ readonly client?: LunoraAdminClient;
349
+ /** UI language for the studio's own strings. Defaults to `en`. */
350
+ readonly locale?: string;
351
+ /**
352
+ * Whether the project's Lunora agent skills ("rules") are installed. When
353
+ * explicitly `false`, the studio shows a one-line banner pointing at
354
+ * `lunora rules install`. The loopback dev hosts inject this; a static deploy
355
+ * leaves it unset (no banner).
356
+ */
357
+ readonly rulesInstalled?: boolean;
358
+ /** Forwarded to the composed {@link Studio} (functions, initialShardKey, scheduled overrides). */
359
+ readonly studio?: Omit<StudioProps, "children" | "chrome" | "i18n" | "locale">;
360
+ }
361
+ /**
362
+ * A fully self-contained studio page: it constructs a {@link LunoraAdminClient}
363
+ * pointed at the worker, wires it through a `<LunoraProvider>`, manages the
364
+ * admin token + theme, and renders the composed {@link Studio} — handing it the
365
+ * top-bar/sidebar {@link StudioChrome} (theme toggle, admin-token popover, rules
366
+ * banner) so those affordances render inside the sidebar shell.
367
+ *
368
+ * Mount this directly (the standalone app and the `@lunora/vite` dev route both
369
+ * do) when you want the batteries-included page rather than composing panels
370
+ * yourself. For embedding into an existing admin UI, use the individual panels
371
+ * or `<Studio>` under your own provider instead.
372
+ */
373
+ declare const StudioApp: ({ adminToken, basePath, baseUrl, client: injectedClient, rulesInstalled, studio, locale }?: StudioAppProps) => ReactElement;
374
+ 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 };