@lobu/runtime-server 22.0.0 → 24.0.0

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 (303) hide show
  1. package/dist/catalogs/connectors.json +1448 -212
  2. package/dist/catalogs/skills.json +1 -1
  3. package/dist/component.json +1 -1
  4. package/dist/connectors/README.md +15 -2
  5. package/dist/connectors/google_gmail.ts +1 -0
  6. package/dist/connectors/jira-helpers.ts +313 -0
  7. package/dist/connectors/jira.ts +29 -221
  8. package/dist/connectors/linkedin-browser-script.ts +13 -0
  9. package/dist/connectors/linkedin-draft-page.js +104 -0
  10. package/dist/connectors/linkedin-drafts.ts +73 -0
  11. package/dist/connectors/linkedin-identity.ts +32 -0
  12. package/dist/connectors/linkedin-inbox-adapter.js +1182 -0
  13. package/dist/connectors/linkedin-inbox.ts +156 -0
  14. package/dist/connectors/linkedin-like.ts +114 -0
  15. package/dist/connectors/linkedin-takeout.ts +577 -0
  16. package/dist/connectors/linkedin.ts +4017 -0
  17. package/dist/connectors/reddit.ts +92 -20
  18. package/dist/connectors/slack.ts +1 -0
  19. package/dist/connectors/takeout-utils.ts +240 -0
  20. package/dist/connectors/tiktok-inbox-page.js +9 -9
  21. package/dist/connectors/tiktok-web-page.js +21 -15
  22. package/dist/connectors/tiktok_web.ts +63 -30
  23. package/dist/connectors/whatsapp-web-adapter.js +104 -574
  24. package/dist/connectors/whatsapp-web-helpers.ts +30 -444
  25. package/dist/connectors/whatsapp-web-identity.ts +20 -6
  26. package/dist/connectors/whatsapp_web.ts +46 -646
  27. package/dist/connectors/x-dm-adapter.js +556 -0
  28. package/dist/connectors/x-identity.ts +33 -2
  29. package/dist/connectors/x.ts +266 -120
  30. package/dist/db/migrations/20261017120000_drop_feeds_kind_virtual.sql +26 -0
  31. package/dist/db/migrations/20261017130000_drop_retired_dead_code_columns.sql +46 -0
  32. package/dist/db/migrations/20261019120000_retire_identities_of_deleted_entities.sql +21 -0
  33. package/dist/db/migrations/20261020120000_entities_live_metadata_domain.sql +66 -0
  34. package/dist/db/migrations/20261020130000_agents_starters.sql +14 -0
  35. package/dist/db/migrations/20261020140000_view_attachments_by_page.sql +71 -0
  36. package/dist/dependencies.bun.lock +78 -75
  37. package/dist/guest.bundle.js +650 -448
  38. package/dist/owletto/dist/assets/_-CC8cTmRg.js +3 -0
  39. package/dist/owletto/dist/assets/_-ksFp4zVf.js +2 -0
  40. package/dist/owletto/dist/assets/_agentId-DWUFSrVp.js +2 -0
  41. package/dist/owletto/dist/assets/_agentId-MENLoohA.js +2 -0
  42. package/dist/owletto/dist/assets/_automationId-BnHqdXOC.js +2 -0
  43. package/dist/owletto/dist/assets/_connectorKey._connectionId-CefXIqy2.js +2 -0
  44. package/dist/owletto/dist/assets/_connectorKey.index-C1QPGf9E.js +2 -0
  45. package/dist/owletto/dist/assets/_conversationId-DinuPCUp.js +2 -0
  46. package/dist/owletto/dist/assets/{_deploymentId-BQfYN1U2.js → _deploymentId-BeyzVjRm.js} +2 -2
  47. package/dist/owletto/dist/assets/_eventId-3L_qeL_l.js +2 -0
  48. package/dist/owletto/dist/assets/_name-Dgedji78.js +2 -0
  49. package/dist/owletto/dist/assets/_owner-DbrKma4e.js +3 -0
  50. package/dist/owletto/dist/assets/_shape-DtVfRFz_.js +2 -0
  51. package/dist/owletto/dist/assets/_skillKey-CqLHzm7L.js +2 -0
  52. package/dist/owletto/dist/assets/_slug-ndDr_CUg.js +2 -0
  53. package/dist/owletto/dist/assets/_viewKey-3CH5w8mr.js +2 -0
  54. package/dist/owletto/dist/assets/_viewKey-DHQY9A8u.js +2 -0
  55. package/dist/owletto/dist/assets/{accept-invitation-D3OgJG4i.js → accept-invitation-CRKbM2Xy.js} +2 -2
  56. package/dist/owletto/dist/assets/activity-route-view-CFLNukhD.js +2 -0
  57. package/dist/owletto/dist/assets/{agent-card-controls-DzRs4Ix9.js → agent-card-controls-Be1Okb2C.js} +2 -2
  58. package/dist/owletto/dist/assets/{agent-client-setup-list-B2SvH7xD.js → agent-client-setup-list-BA8dU_C6.js} +2 -2
  59. package/dist/owletto/dist/assets/agent-connect-pages-CAV-yXus.js +2 -0
  60. package/dist/owletto/dist/assets/agent-editor-form-Bi6WvYX-.js +2 -0
  61. package/dist/owletto/dist/assets/{agent-guardrails-route-BaV1VpDh.js → agent-guardrails-route-DMOjG1D4.js} +2 -2
  62. package/dist/owletto/dist/assets/{agent-loading-shells-CtZJM2Gc.js → agent-loading-shells-De_2d8Lr.js} +2 -2
  63. package/dist/owletto/dist/assets/{agent-permissions-matrix-Ds48KFK9.js → agent-permissions-matrix-gZWl6mAe.js} +2 -2
  64. package/dist/owletto/dist/assets/{agent-skill-context-DPk5r08w.js → agent-skill-context-JLaTamGR.js} +2 -2
  65. package/dist/owletto/dist/assets/{agent-skills-route-DYpB5H1J.js → agent-skills-route-DcK41PWj.js} +2 -2
  66. package/dist/owletto/dist/assets/agent-subpage-shell-BBJoyTuC.js +2 -0
  67. package/dist/owletto/dist/assets/agent-thread-Buz3naVF.js +6 -0
  68. package/dist/owletto/dist/assets/agents-C-ReckCa.js +2 -0
  69. package/dist/owletto/dist/assets/agents-workbench-CqaKGggb.js +2 -0
  70. package/dist/owletto/dist/assets/app._appId-Cl1fTuIt.js +2 -0
  71. package/dist/owletto/dist/assets/automation-detail-content-BMLL4lxO.js +2 -0
  72. package/dist/owletto/dist/assets/automations-C-ReckCa.js +2 -0
  73. package/dist/owletto/dist/assets/callback-DTKKsfkz.js +2 -0
  74. package/dist/owletto/dist/assets/{card-DIF8SF9b.js → card-yU0TmNRH.js} +2 -2
  75. package/dist/owletto/dist/assets/{claim-DELEa-gH.js → claim-DJfTvlT2.js} +2 -2
  76. package/dist/owletto/dist/assets/client-rows--FrZfJol.js +2 -0
  77. package/dist/owletto/dist/assets/{clients-CpG676mg.js → clients-L4K1UT8c.js} +2 -2
  78. package/dist/owletto/dist/assets/{code-editor-V27Z4o3P.js → code-editor-U54Gwjit.js} +2 -2
  79. package/dist/owletto/dist/assets/connect-4zqtnDHb.js +2 -0
  80. package/dist/owletto/dist/assets/connect._clientId-Dj0SqgbE.js +2 -0
  81. package/dist/owletto/dist/assets/connected._clientId-sgtocSvf.js +2 -0
  82. package/dist/owletto/dist/assets/connected._clientId.activity-DTpSW1Xy.js +2 -0
  83. package/dist/owletto/dist/assets/connected._clientId.index-h9X5H1x8.js +2 -0
  84. package/dist/owletto/dist/assets/{connection-DySpRE9x.js → connection-ByvKkyFm.js} +2 -2
  85. package/dist/owletto/dist/assets/{connection-feed-detail-C_D68j6d.js → connection-feed-detail-DWM9lTao.js} +2 -2
  86. package/dist/owletto/dist/assets/connections-browser-CEwYrYqt.js +2 -0
  87. package/dist/owletto/dist/assets/{connector-provenance-CNXtzYg5.js → connector-provenance-BocTm__v.js} +2 -2
  88. package/dist/owletto/dist/assets/connector-scope-lists-OYDOydtz.js +2 -0
  89. package/dist/owletto/dist/assets/connectors-CyZpcE5f.js +2 -0
  90. package/dist/owletto/dist/assets/{consent-BVzxrAO9.js → consent-DdfINrVp.js} +2 -2
  91. package/dist/owletto/dist/assets/{conversations-table-DfZGICl7.js → conversations-table-BSznfdYt.js} +2 -2
  92. package/dist/owletto/dist/assets/{core.esm-DiTpULFl.js → core.esm-Dr7tcIB-.js} +2 -2
  93. package/dist/owletto/dist/assets/create-CBGwASon.js +2 -0
  94. package/dist/owletto/dist/assets/create-Cf5hp6Z8.js +2 -0
  95. package/dist/owletto/dist/assets/create-CwThQtd3.js +2 -0
  96. package/dist/owletto/dist/assets/create-automation-form-9T5WnoUs.js +3 -0
  97. package/dist/owletto/dist/assets/create._connectorKey-sNHQHNpg.js +2 -0
  98. package/dist/owletto/dist/assets/{cronstrue-DPXl0qA2.js → cronstrue-BWFEyy_P.js} +2 -2
  99. package/dist/owletto/dist/assets/deployments-DHh9dyzv.js +2 -0
  100. package/dist/owletto/dist/assets/{deployments-body-D6TAWs_6.js → deployments-body-2xKS8gRo.js} +2 -2
  101. package/dist/owletto/dist/assets/{deployments-DCQdFdwG.js → deployments-wG_8QzOF.js} +2 -2
  102. package/dist/owletto/dist/assets/{device-CntqYW65.js → device-6z-xgsoW.js} +2 -2
  103. package/dist/owletto/dist/assets/device-pin-tombstone-Cwq88RMU.js +2 -0
  104. package/dist/owletto/dist/assets/device._deviceId-BDerBfD9.js +2 -0
  105. package/dist/owletto/dist/assets/entity-avatar-Cc1CuI-0.js +2 -0
  106. package/dist/owletto/dist/assets/entity-options-DHdMC1Lx.js +2 -0
  107. package/dist/owletto/dist/assets/entity-page--OkXmlNP.js +2 -0
  108. package/dist/owletto/dist/assets/entity-type-page-89RoK_-P.js +2 -0
  109. package/dist/owletto/dist/assets/event-detail-D4YZRtrA.js +2 -0
  110. package/dist/owletto/dist/assets/events-feed-DsrkV2ix.js +2 -0
  111. package/dist/owletto/dist/assets/filter-editors-B1_QUpg_.js +2 -0
  112. package/dist/owletto/dist/assets/{full-page-spinner-KpV2FS2u.js → full-page-spinner-Cqih-8IW.js} +2 -2
  113. package/dist/owletto/dist/assets/guardrails-B8Rs1be3.js +2 -0
  114. package/dist/owletto/dist/assets/identity-B0nH4yiC.js +2 -0
  115. package/dist/owletto/dist/assets/index-4TSkcsth.js +2 -0
  116. package/dist/owletto/dist/assets/index-BSH07yVD.css +1 -0
  117. package/dist/owletto/dist/assets/index-BgkhXElB.js +2 -0
  118. package/dist/owletto/dist/assets/index-CoW4Bz3w.js +2 -0
  119. package/dist/owletto/dist/assets/index-Codw-Qqi.js +2 -0
  120. package/dist/owletto/dist/assets/{index-BNh2cidi.js → index-DAOyXG1X.js} +2 -2
  121. package/dist/owletto/dist/assets/{index-BEvyBdOU.js → index-DKPwCasf.js} +2 -2
  122. package/dist/owletto/dist/assets/index-DMyXd3bJ.js +2 -0
  123. package/dist/owletto/dist/assets/index-DYCqXaMf.js +7950 -0
  124. package/dist/owletto/dist/assets/index-DYYZLcJ0.js +2 -0
  125. package/dist/owletto/dist/assets/index-DYzWV5_z.js +2 -0
  126. package/dist/owletto/dist/assets/index-Da6CrGEu.js +2 -0
  127. package/dist/owletto/dist/assets/{index-DCdkwg9H.js → index-DfyDUpuI.js} +2 -2
  128. package/dist/owletto/dist/assets/index-DneshLbf.js +2 -0
  129. package/dist/owletto/dist/assets/index-TgRS2v_F.js +2 -0
  130. package/dist/owletto/dist/assets/{index-BJXkc60S.js → index-ZNlrDc_f.js} +2 -2
  131. package/dist/owletto/dist/assets/{json-diff-D_Ym3Uku.js → json-diff-DFvYINBT.js} +3 -3
  132. package/dist/owletto/dist/assets/{list-skeleton-Bl0OS39L.js → list-skeleton-DFsEqLU1.js} +2 -2
  133. package/dist/owletto/dist/assets/login-DO0j-AYr.js +2 -0
  134. package/dist/owletto/dist/assets/{logout-DUccApuZ.js → logout-BmNwoAf7.js} +2 -2
  135. package/dist/owletto/dist/assets/member-scope-gate-B2LrMWBU.js +2 -0
  136. package/dist/owletto/dist/assets/memory-browse-page-Cjpl8EbB.js +103 -0
  137. package/dist/owletto/dist/assets/{model-selector-CB1BDvlW.js → model-selector-TQcA93xm.js} +2 -2
  138. package/dist/owletto/dist/assets/models-D7aED5Sa.js +2 -0
  139. package/dist/owletto/dist/assets/new-BMrFy5Qa.js +2 -0
  140. package/dist/owletto/dist/assets/{new-B5UsLiy6.js → new-ByBhteWA.js} +2 -2
  141. package/dist/owletto/dist/assets/new-DWp3deoW.js +2 -0
  142. package/dist/owletto/dist/assets/{oauth-workspace-access-PGyTnW2K.js → oauth-workspace-access-D_5uESuz.js} +2 -2
  143. package/dist/owletto/dist/assets/{organization-BH8PYlVu.js → organization-DTFoYP4V.js} +2 -2
  144. package/dist/owletto/dist/assets/peek-pane-content-DF5iGC3c.js +2 -0
  145. package/dist/owletto/dist/assets/{permissions-CwN_YP3u.js → permissions-C_auqxfP.js} +2 -2
  146. package/dist/owletto/dist/assets/proposal-review-shell-DsNiavG_.js +2 -0
  147. package/dist/owletto/dist/assets/public-shell-ready-B2NUI89V.js +2 -0
  148. package/dist/owletto/dist/assets/{recent-DqdZE_TI.js → recent-3d99S2IE.js} +2 -2
  149. package/dist/owletto/dist/assets/record-activity-C9KfBkXb.js +2 -0
  150. package/dist/owletto/dist/assets/record-field-peek-BBZcRuGT.js +2 -0
  151. package/dist/owletto/dist/assets/record-session-BizRugWs.js +2 -0
  152. package/dist/owletto/dist/assets/{reset-password-DAvBYkiI.js → reset-password-DqfcSn8M.js} +2 -2
  153. package/dist/owletto/dist/assets/runs-panel-T1ZxTVz6.js +2 -0
  154. package/dist/owletto/dist/assets/runs-table-D_8QlCCN.js +2 -0
  155. package/dist/owletto/dist/assets/schema-value-normalization-CylKX3PK.js +97 -0
  156. package/dist/owletto/dist/assets/settings-B_ClYztB.js +2 -0
  157. package/dist/owletto/dist/assets/settings-DgX1-xo7.js +2 -0
  158. package/dist/owletto/dist/assets/skills-Drw5tcZw.js +2 -0
  159. package/dist/owletto/dist/assets/{source-record-panels-CRIPMWfN.js → source-record-panels-Cg249m1S.js} +2 -2
  160. package/dist/owletto/dist/assets/{use-mention-search-DqEykWl_.js → use-mention-search-BYbFvHbJ.js} +2 -2
  161. package/dist/owletto/dist/assets/view-param-filters-DMSqkN2J.js +2 -0
  162. package/dist/owletto/dist/index.html +2 -2
  163. package/dist/server-main.bundle.mjs +14031 -12680
  164. package/npm-shrinkwrap.json +329 -313
  165. package/package.json +6 -5
  166. package/vendor/connector-sdk/dist/browser-handoff-banner.d.ts +39 -0
  167. package/vendor/connector-sdk/dist/browser-handoff-banner.js +175 -0
  168. package/vendor/connector-sdk/dist/browser-source-read.d.ts +52 -0
  169. package/vendor/connector-sdk/dist/browser-source-read.js +107 -0
  170. package/vendor/connector-sdk/dist/connector-types.d.ts +10 -0
  171. package/vendor/connector-sdk/dist/index.d.ts +3 -0
  172. package/vendor/connector-sdk/dist/index.js +2 -0
  173. package/vendor/connector-sdk/package.json +9 -1
  174. package/vendor/core/dist/agent-policy.js +0 -3
  175. package/vendor/core/dist/agent-tooling.d.ts +1 -1
  176. package/vendor/core/dist/agent-tooling.js +3 -1
  177. package/vendor/core/dist/capabilities.d.ts +1 -1
  178. package/vendor/core/dist/capabilities.js +0 -1
  179. package/vendor/core/dist/connector-query-errors.d.ts +32 -0
  180. package/vendor/core/dist/connector-query-errors.js +41 -1
  181. package/vendor/core/dist/contracts/agent-settings.d.ts +6 -2
  182. package/vendor/core/dist/contracts/agent-settings.js +12 -1
  183. package/vendor/core/dist/contracts/tools/manage-conversations.js +2 -2
  184. package/vendor/core/dist/contracts/tools/manage-feeds.d.ts +14 -0
  185. package/vendor/core/dist/contracts/tools/manage-feeds.js +17 -0
  186. package/vendor/core/dist/contracts/tools/manage-views.d.ts +53 -234
  187. package/vendor/core/dist/contracts/tools/manage-views.js +50 -76
  188. package/vendor/core/dist/contracts/tools/view-attach.d.ts +5 -8
  189. package/vendor/core/dist/contracts/tools/view-attach.js +14 -31
  190. package/vendor/core/dist/contracts/tools/view-definition.d.ts +21 -0
  191. package/vendor/core/dist/contracts/tools/view-definition.js +165 -0
  192. package/vendor/core/dist/contracts/worker/protocol.d.ts +47 -133
  193. package/vendor/core/dist/contracts/worker/protocol.js +33 -62
  194. package/vendor/core/dist/device-pin-tombstones.d.ts +44 -0
  195. package/vendor/core/dist/device-pin-tombstones.js +57 -0
  196. package/vendor/core/dist/index.d.ts +3 -2
  197. package/vendor/core/dist/index.js +3 -1
  198. package/vendor/core/dist/logger.js +10 -25
  199. package/vendor/core/dist/suggestions.d.ts +15 -2
  200. package/vendor/core/dist/suggestions.js +48 -3
  201. package/vendor/core/dist/types.d.ts +26 -0
  202. package/vendor/core/dist/types.js +5 -0
  203. package/vendor/core/dist/utils/diagnostic-scrubber.js +258 -21
  204. package/vendor/core/dist/worker/wire.d.ts +0 -10
  205. package/vendor/core/package.json +16 -10
  206. package/vendor/postgres/cf/src/connection.js +18 -0
  207. package/vendor/postgres/cjs/src/connection.js +18 -0
  208. package/vendor/postgres/src/connection.js +18 -0
  209. package/vendor/views/dist/api.d.ts +71 -17
  210. package/vendor/views/dist/api.js +200 -35
  211. package/vendor/views/dist/bridge.d.ts +3 -0
  212. package/vendor/views/dist/bridge.js +9 -1
  213. package/vendor/views/dist/components.d.ts +170 -0
  214. package/vendor/views/dist/components.js +361 -0
  215. package/vendor/views/dist/index.d.ts +1 -1
  216. package/vendor/views/package.json +11 -1
  217. package/dist/owletto/dist/assets/_-CEPl6gU4.js +0 -3
  218. package/dist/owletto/dist/assets/_-C_zNZben.js +0 -2
  219. package/dist/owletto/dist/assets/_agentId-CBC_SadO.js +0 -2
  220. package/dist/owletto/dist/assets/_agentId-QQW91cHX.js +0 -2
  221. package/dist/owletto/dist/assets/_automationId-YTTNksw6.js +0 -2
  222. package/dist/owletto/dist/assets/_connectorKey._connectionId-fK0h7RAp.js +0 -2
  223. package/dist/owletto/dist/assets/_connectorKey.index-C7TPS598.js +0 -2
  224. package/dist/owletto/dist/assets/_conversationId-CEhxlTIo.js +0 -2
  225. package/dist/owletto/dist/assets/_eventId-Cl8GSdjg.js +0 -2
  226. package/dist/owletto/dist/assets/_name-t3oBJ6Zf.js +0 -2
  227. package/dist/owletto/dist/assets/_owner-cUtGHqSw.js +0 -3
  228. package/dist/owletto/dist/assets/_shape-bo2lMVCu.js +0 -2
  229. package/dist/owletto/dist/assets/_skillKey-Dwm4Q4wI.js +0 -2
  230. package/dist/owletto/dist/assets/_slug-CU1PuHB9.js +0 -2
  231. package/dist/owletto/dist/assets/_viewKey-Bh6E_NxA.js +0 -2
  232. package/dist/owletto/dist/assets/_viewKey-D4jKl-Zf.js +0 -2
  233. package/dist/owletto/dist/assets/activity-route-view-DQglkhXU.js +0 -2
  234. package/dist/owletto/dist/assets/agent-connect-pages-B6uKvT_X.js +0 -2
  235. package/dist/owletto/dist/assets/agent-editor-form-oUnIYHd7.js +0 -2
  236. package/dist/owletto/dist/assets/agent-subpage-shell-B3K_jPYR.js +0 -2
  237. package/dist/owletto/dist/assets/agent-thread-C8UaUTWc.js +0 -6
  238. package/dist/owletto/dist/assets/agents-F4mGI2oF.js +0 -2
  239. package/dist/owletto/dist/assets/agents-workbench-CMyk4PI7.js +0 -2
  240. package/dist/owletto/dist/assets/app._appId-DH1Qutz6.js +0 -2
  241. package/dist/owletto/dist/assets/automation-detail-content-CEDNboId.js +0 -2
  242. package/dist/owletto/dist/assets/automations-F4mGI2oF.js +0 -2
  243. package/dist/owletto/dist/assets/callback-CU-hb8JB.js +0 -2
  244. package/dist/owletto/dist/assets/client-rows-EJSKR6z1.js +0 -2
  245. package/dist/owletto/dist/assets/connect-B2YL6qIK.js +0 -2
  246. package/dist/owletto/dist/assets/connect._clientId-B6LDmDRV.js +0 -2
  247. package/dist/owletto/dist/assets/connected._clientId-D_HaKoI1.js +0 -2
  248. package/dist/owletto/dist/assets/connected._clientId.activity-DQWcUqKM.js +0 -2
  249. package/dist/owletto/dist/assets/connected._clientId.index-BC3R303A.js +0 -2
  250. package/dist/owletto/dist/assets/connections-browser-Cnv2iBbZ.js +0 -2
  251. package/dist/owletto/dist/assets/connector-scope-lists-BKDetNDc.js +0 -2
  252. package/dist/owletto/dist/assets/connectors-BJnk1z_2.js +0 -2
  253. package/dist/owletto/dist/assets/create-CUqO6Kfk.js +0 -2
  254. package/dist/owletto/dist/assets/create-JRFM8mMf.js +0 -2
  255. package/dist/owletto/dist/assets/create-automation-form-_4vUkrls.js +0 -3
  256. package/dist/owletto/dist/assets/create-iHcxV0xd.js +0 -2
  257. package/dist/owletto/dist/assets/create._connectorKey-CCYLEicg.js +0 -2
  258. package/dist/owletto/dist/assets/deployments-ihkhK1zV.js +0 -2
  259. package/dist/owletto/dist/assets/device-pin-tombstone-Bz4JHHMK.js +0 -2
  260. package/dist/owletto/dist/assets/device._deviceId-D4plO3GM.js +0 -2
  261. package/dist/owletto/dist/assets/entity-options-UJs64GdQ.js +0 -2
  262. package/dist/owletto/dist/assets/entity-page-Djz6T50J.js +0 -2
  263. package/dist/owletto/dist/assets/entity-type-page-OznRag6A.js +0 -2
  264. package/dist/owletto/dist/assets/event-detail-04qOUGIP.js +0 -2
  265. package/dist/owletto/dist/assets/events-feed-fucGZSJR.js +0 -2
  266. package/dist/owletto/dist/assets/filter-editors-DCQgGLyR.js +0 -2
  267. package/dist/owletto/dist/assets/guardrails-molekzAF.js +0 -2
  268. package/dist/owletto/dist/assets/identity-BJcaG66g.js +0 -2
  269. package/dist/owletto/dist/assets/index-B04ON9Jv.js +0 -2
  270. package/dist/owletto/dist/assets/index-BLEcy9-T.css +0 -1
  271. package/dist/owletto/dist/assets/index-BOsK-K-2.js +0 -2
  272. package/dist/owletto/dist/assets/index-BOzuAbvi.js +0 -2
  273. package/dist/owletto/dist/assets/index-Bk1x7A67.js +0 -2
  274. package/dist/owletto/dist/assets/index-CFnx5huL.js +0 -2
  275. package/dist/owletto/dist/assets/index-D3s8rhG9.js +0 -2
  276. package/dist/owletto/dist/assets/index-Dbd1jusf.js +0 -2
  277. package/dist/owletto/dist/assets/index-DqZuqC08.js +0 -2
  278. package/dist/owletto/dist/assets/index-Dr-Xg_xO.js +0 -2
  279. package/dist/owletto/dist/assets/index-KPOvMVa-.js +0 -2
  280. package/dist/owletto/dist/assets/index-_oPeVpL_.js +0 -7950
  281. package/dist/owletto/dist/assets/login-QHdxqX-4.js +0 -2
  282. package/dist/owletto/dist/assets/member-scope-gate-CFbrq1by.js +0 -2
  283. package/dist/owletto/dist/assets/memory-browse-page-IrIXuZTF.js +0 -103
  284. package/dist/owletto/dist/assets/models-DnMb3n-Z.js +0 -2
  285. package/dist/owletto/dist/assets/new-BWo8_Pms.js +0 -2
  286. package/dist/owletto/dist/assets/new-DpmDXmFI.js +0 -2
  287. package/dist/owletto/dist/assets/peek-pane-content-B2AFNTzP.js +0 -2
  288. package/dist/owletto/dist/assets/proposal-review-shell-DKKGu4Ww.js +0 -2
  289. package/dist/owletto/dist/assets/public-shell-ready-7KYnww6e.js +0 -2
  290. package/dist/owletto/dist/assets/record-activity-CvgZyCmw.js +0 -2
  291. package/dist/owletto/dist/assets/renderer-BL6VcwQH.js +0 -97
  292. package/dist/owletto/dist/assets/runs-BWtc5rmc.js +0 -2
  293. package/dist/owletto/dist/assets/runs-panel-BO3h5RkS.js +0 -2
  294. package/dist/owletto/dist/assets/runs-table-DxIiqrSk.js +0 -2
  295. package/dist/owletto/dist/assets/settings-4Ev-0iNL.js +0 -2
  296. package/dist/owletto/dist/assets/settings-Crxlwps-.js +0 -2
  297. package/dist/owletto/dist/assets/skills-D0X430X8.js +0 -2
  298. package/dist/owletto/dist/assets/status-dot-C5KDvvm9.js +0 -2
  299. package/dist/owletto/dist/assets/tabs-B4Er9hJj.js +0 -2
  300. package/dist/owletto/dist/assets/view-param-filters-Cylutoy1.js +0 -2
  301. package/vendor/core/dist/contracts/worker/device-chat.d.ts +0 -4
  302. package/vendor/core/dist/contracts/worker/device-chat.js +0 -26
  303. /package/vendor/postgres/{.bun-tag-f39dafdb2305d504 → .bun-tag-2f292c6554a8475e} +0 -0
@@ -1,2 +0,0 @@
1
- import{iC as a,j as e}from"./index-_oPeVpL_.js";import{b as i}from"./agent-guardrails-route-BaV1VpDh.js";import"./model-selector-CB1BDvlW.js";import"./agent-subpage-shell-B3K_jPYR.js";import"./agent-loading-shells-CtZJM2Gc.js";import"./agent-card-controls-DzRs4Ix9.js";function l(){const{owner:t,agentId:r,name:o}=a.useParams();return e.jsx(i,{owner:t,agentId:r,name:o})}export{l as component};
2
- //# sourceMappingURL=_name-t3oBJ6Zf.js.map
@@ -1,3 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/peek-pane-content-B2AFNTzP.js","assets/index-_oPeVpL_.js","assets/index-BLEcy9-T.css","assets/automation-detail-content-CEDNboId.js","assets/create-automation-form-_4vUkrls.js","assets/cronstrue-DPXl0qA2.js","assets/entity-options-UJs64GdQ.js","assets/connection-label-BobuYiAG.js","assets/model-selector-CB1BDvlW.js","assets/skill-editor-D_W3QlRz.js","assets/code-editor-V27Z4o3P.js","assets/index-CDz3-ieP.js","assets/index-Vcq4gwWv.js","assets/use-mention-search-DqEykWl_.js","assets/proposal-review-shell-DKKGu4Ww.js","assets/runs-BWtc5rmc.js","assets/json-diff-D_Ym3Uku.js","assets/deployments-DCQdFdwG.js","assets/events-feed-fucGZSJR.js","assets/conversations-table-DfZGICl7.js","assets/renderer-BL6VcwQH.js","assets/card-DIF8SF9b.js","assets/clients-CpG676mg.js","assets/agent-loading-shells-CtZJM2Gc.js","assets/agent-thread-C8UaUTWc.js","assets/app-bridge-BCm4muqj.js","assets/connection-feed-detail-C_D68j6d.js","assets/runs-table-DxIiqrSk.js","assets/connector-scope-lists-BKDetNDc.js","assets/status-dot-C5KDvvm9.js","assets/connections-browser-Cnv2iBbZ.js","assets/source-record-panels-CRIPMWfN.js","assets/event-detail-04qOUGIP.js","assets/view-param-filters-Cylutoy1.js","assets/filter-editors-DCQgGLyR.js"])))=>i.map(i=>d[i]);
2
- import{u as f,a as h,j as e,p as m,r as x,D as p,b as g,c as k,d as w,e as j,B as c,C as b,L as v,A as y,X as N,l as P,_ as R,S as d,R as E,f as S,g as z,i as L,h as C,N as D,O}from"./index-_oPeVpL_.js";const _=P(async()=>({default:(await R(async()=>{const{PeekPaneContent:a}=await import("./peek-pane-content-B2AFNTzP.js");return{PeekPaneContent:a}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]))).PeekPaneContent}));function A(){return e.jsxs("div",{"data-testid":"peek-pane-body-loading",className:"space-y-3 p-4",children:[e.jsx(d,{className:"h-5 w-2/3"}),e.jsx(d,{className:"h-4 w-full"}),e.jsx(d,{className:"h-24 w-full rounded-lg"})]})}function I(){const a=f(),s=h();return a?.item?e.jsx(B,{item:a.item,onClose:a.close,onBack:a.back,isNarrow:s}):null}function B({item:a,onClose:s,onBack:o,isNarrow:t}){const r=a.href?m(a.href):null;x.useEffect(()=>{if(t)return;const n=u=>{u.key==="Escape"&&(u.preventDefault(),s())};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[s,t]);const i=n=>e.jsxs("div",{className:"flex h-11 shrink-0 items-center gap-1 border-b border-border px-3",children:[o||n?e.jsx(c,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0 text-muted-foreground hover:text-foreground","aria-label":"Back",onClick:o??s,children:e.jsx(b,{className:"h-4 w-4"})}):null,e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:a.title}),r?e.jsx(c,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0 text-muted-foreground hover:text-foreground","aria-label":"Open full page",asChild:!0,children:e.jsx(v,{to:r.pathname,search:r.search??{},onClick:s,children:e.jsx(y,{className:"h-4 w-4"})})}):null,e.jsx(c,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0 text-muted-foreground hover:text-foreground","aria-label":"Close preview",onClick:s,children:e.jsx(N,{className:"h-4 w-4"})})]}),l=e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e.jsx(x.Suspense,{fallback:e.jsx(A,{}),children:e.jsx(_,{item:a})})});return t?e.jsx(p,{open:!0,onOpenChange:n=>{n||s()},children:e.jsxs(g,{children:[e.jsx(k,{className:"fixed inset-0 z-40 bg-black/60 data-[state=open]:animate-in data-[state=open]:fade-in-0"}),e.jsxs(w,{"aria-describedby":void 0,className:"fixed inset-y-0 right-0 z-50 flex w-full max-w-[460px] flex-col border-l border-border bg-background outline-none data-[state=open]:animate-in data-[state=open]:slide-in-from-right",children:[e.jsx(j,{className:"sr-only",children:a.title}),i(!0),l]})]})}):e.jsxs("aside",{className:"flex w-[460px] max-w-[45vw] shrink-0 flex-col border-l border-border bg-background",children:[i(!1),l]})}function W(){const{owner:a}=E.useParams(),{data:s,isLoading:o,error:t}=S(a==="me"?null:a,{slug:a}),{session:r,isReady:i}=z(),l=L(t)&&!s?.workspace;return C({active:!o&&!l&&i&&!r&&!s?.workspace,owner:a})?null:e.jsx(D,{children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-row",children:[e.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto",children:e.jsx(O,{})}),e.jsx(I,{})]})})}export{W as component};
3
- //# sourceMappingURL=_owner-cUtGHqSw.js.map
@@ -1,2 +0,0 @@
1
- import{iq as p,j as e,bl as m}from"./index-_oPeVpL_.js";import{M as i}from"./memory-browse-page-IrIXuZTF.js";import"./public-shell-ready-7KYnww6e.js";import"./entity-type-page-OznRag6A.js";import"./json-diff-D_Ym3Uku.js";import"./index-CDz3-ieP.js";import"./index-Vcq4gwWv.js";import"./code-editor-V27Z4o3P.js";import"./tabs-B4Er9hJj.js";import"./filter-editors-DCQgGLyR.js";import"./renderer-BL6VcwQH.js";import"./card-DIF8SF9b.js";import"./core.esm-DiTpULFl.js";import"./view-param-filters-Cylutoy1.js";import"./app-bridge-BCm4muqj.js";import"./member-scope-gate-CFbrq1by.js";function d(){const{owner:t,entityType:o,shape:r}=p.useParams();return e.jsx(i,{ownerSlug:t,typeScope:m(o),create:!1,shape:r})}export{d as component};
2
- //# sourceMappingURL=_shape-bo2lMVCu.js.map
@@ -1,2 +0,0 @@
1
- import{iA as r,j as e}from"./index-_oPeVpL_.js";import{b as m}from"./agent-skills-route-DYpB5H1J.js";import"./agent-subpage-shell-B3K_jPYR.js";import"./agent-skill-context-DPk5r08w.js";import"./core.esm-DiTpULFl.js";import"./skill-editor-D_W3QlRz.js";import"./agent-loading-shells-CtZJM2Gc.js";import"./agent-card-controls-DzRs4Ix9.js";function c(){const{owner:t,agentId:o,skillKey:i}=r.useParams();return e.jsx(m,{owner:t,agentId:o,skillKey:i})}export{c as component};
2
- //# sourceMappingURL=_skillKey-Dwm4Q4wI.js.map
@@ -1,2 +0,0 @@
1
- import{fK as l,k as x,m as d,em as y,ch as c,j as t,bx as g}from"./index-_oPeVpL_.js";import{E as u}from"./entity-type-page-OznRag6A.js";import"./json-diff-D_Ym3Uku.js";import"./index-CDz3-ieP.js";import"./index-Vcq4gwWv.js";import"./code-editor-V27Z4o3P.js";function N(){const{owner:a,slug:n}=l.useParams(),{orgContext:s}=x(),o=d(),{data:i=[],isLoading:r}=y(s),e=i.find(p=>p.slug===n)??null,m=e?c(e):!1;return t.jsx("div",{className:"flex flex-1 flex-col gap-4 px-4 py-6 lg:px-6",children:t.jsx("div",{className:"max-w-3xl",children:r?t.jsx(g,{label:"entity type",variant:"panel"}):e?t.jsx(u,{entityType:e,orgContext:s,hideDelete:m,onClose:()=>{o({to:"/$owner/data",params:{owner:a}})}}):t.jsx("div",{className:"text-sm text-muted-foreground",children:"Entity type not found."})})})}export{N as component};
2
- //# sourceMappingURL=_slug-CU1PuHB9.js.map
@@ -1,2 +0,0 @@
1
- import{iF as e,j as i,bl as p}from"./index-_oPeVpL_.js";import{M as m}from"./memory-browse-page-IrIXuZTF.js";import"./public-shell-ready-7KYnww6e.js";import"./entity-type-page-OznRag6A.js";import"./json-diff-D_Ym3Uku.js";import"./index-CDz3-ieP.js";import"./index-Vcq4gwWv.js";import"./code-editor-V27Z4o3P.js";import"./tabs-B4Er9hJj.js";import"./filter-editors-DCQgGLyR.js";import"./renderer-BL6VcwQH.js";import"./card-DIF8SF9b.js";import"./core.esm-DiTpULFl.js";import"./view-param-filters-Cylutoy1.js";import"./app-bridge-BCm4muqj.js";import"./member-scope-gate-CFbrq1by.js";function M(){const{owner:t,entityType:o,viewKey:r}=e.useParams();return i.jsx(m,{ownerSlug:t,typeScope:p(o),create:!1,viewKey:r})}export{M as component};
2
- //# sourceMappingURL=_viewKey-Bh6E_NxA.js.map
@@ -1,2 +0,0 @@
1
- import{ix as t,j as m}from"./index-_oPeVpL_.js";import{M as i}from"./memory-browse-page-IrIXuZTF.js";import"./public-shell-ready-7KYnww6e.js";import"./entity-type-page-OznRag6A.js";import"./json-diff-D_Ym3Uku.js";import"./index-CDz3-ieP.js";import"./index-Vcq4gwWv.js";import"./code-editor-V27Z4o3P.js";import"./tabs-B4Er9hJj.js";import"./filter-editors-DCQgGLyR.js";import"./renderer-BL6VcwQH.js";import"./card-DIF8SF9b.js";import"./core.esm-DiTpULFl.js";import"./view-param-filters-Cylutoy1.js";import"./app-bridge-BCm4muqj.js";import"./member-scope-gate-CFbrq1by.js";function R(){const{owner:o,viewKey:r}=t.useParams();return m.jsx(i,{ownerSlug:o,create:!1,viewKey:r})}export{R as component};
2
- //# sourceMappingURL=_viewKey-D4jKl-Zf.js.map
@@ -1,2 +0,0 @@
1
- import{c3 as K,j as e,c4 as Q,r as _,k as q,t as D,a as H,c5 as J,P as c,L as d,bl as N,an as U,c6 as X,c7 as Y,aj as Z,bx as A,aQ as E,c8 as S,B,be as ee,bh as te,c9 as ne,ah as se,ca as oe}from"./index-_oPeVpL_.js";import{R as ae,E as re,M as ie}from"./record-activity-CvgZyCmw.js";import{M as ce}from"./member-scope-gate-CFbrq1by.js";import{P as de}from"./public-shell-ready-7KYnww6e.js";function le(n){const t=K();return e.jsx(xe,{...n,context:t},`${n.ownerSlug}:${n.attentionLens}:${Q(t)}`)}function xe({organizationId:n,ownerSlug:t,typeScope:x,entityScope:o,attentionLens:m=!1,activityTab:f="events",context:a}){const[y,I]=_.useState(m?"relevant":"activity"),r=a?y!=="activity":m,{orgContext:R}=q(),{isMember:T,isLoading:M}=D(),O=T&&!!n,l=H(),i=f==="sessions"&&l,{attentionItems:W}=J(t),k=W.length,u=a?e.jsx("fieldset",{"aria-label":"Activity view",className:c("flex min-w-0 max-w-full items-center gap-1",l&&"justify-center"),children:[["relevant","Relevant here"],["attention","Needs attention"],["activity","All activity"]].map(([s,g])=>e.jsxs("button",{type:"button","aria-pressed":y===s,onClick:()=>I(s),className:"flex min-w-0 items-center justify-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors aria-pressed:bg-muted aria-pressed:text-foreground hover:text-foreground",children:[g,s==="attention"?e.jsx(P,{count:k}):null]},s))}):e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(d,{to:"/$owner/events",params:{owner:t},search:s=>({...s??{}}),"aria-current":r?void 0:"page",className:c("rounded-md px-2.5 py-1 text-xs font-medium transition-colors",r?"text-muted-foreground hover:text-foreground":"bg-muted text-foreground"),children:"All activity"}),e.jsxs(d,{to:"/$owner",params:{owner:t},search:s=>({...s??{}}),"aria-current":r?"page":void 0,className:c("flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",r?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"),children:["Needs attention",e.jsx(P,{count:k})]})]}),h=x?N(x):void 0,{data:v,isLoading:b,error:z}=U(o?`/${t}/${X(o)}`:r?`/${t}`:"",R),j=o?v?.entity:void 0,F=(o?j?.entity_type??N(o.split("/").at(-2)??""):h)==="$member",L=o!=null&&!b&&(z!=null||v?.entity==null),C=M||b,p=v?.counts,G=p?p.connections>0||p.agents>0:!1,V=O&&!C&&p!=null&&!G,w=!l&&!i&&!L,$=o&&b?e.jsx(A,{label:"Loading record…"}):L?e.jsx(E,{icon:ne,title:"Record not found",description:"It may have been deleted, or it may live in a workspace you can't access."}):j?e.jsx(ae,{ownerSlug:t,filterBarLeading:w?u:void 0,entity:j,organizationId:n}):e.jsx(re,{organizationId:n,ownerSlug:t,filterBarLeading:w?u:void 0,hideSourceFilter:!0,scopedEntityTypes:!o&&h?[h]:void 0});if(r){const s=C?e.jsx(A,{label:"workspace setup",variant:"panel",className:"px-6 py-8"}):V?e.jsx("div",{className:"px-6",children:e.jsx(E,{icon:S,title:"Nothing to catch up on — yet",description:"No notifications here. Add a connector to bring in data, or bring your agent to Lobu and give it something to work with.",children:e.jsxs("div",{className:"mt-4 flex flex-wrap justify-center gap-2",children:[e.jsx(B,{asChild:!0,children:e.jsxs(d,{to:"/$owner/connectors/create",params:{owner:t},children:[e.jsx(ee,{className:"mr-2 h-4 w-4"}),"Add a connector"]})}),e.jsx(B,{asChild:!0,variant:"outline",children:e.jsxs(d,{to:"/$owner/agents",params:{owner:t},children:[e.jsx(te,{className:"mr-2 h-4 w-4"}),"Connect agent"]})})]})})}):e.jsx("p",{className:"rounded-lg border bg-muted/20 px-3 py-6 text-center text-xs text-muted-foreground",children:"Nothing needs attention right now."});return e.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col gap-4",children:e.jsx(Y,{context:a,relevant:y==="relevant",owner:t,emptyState:s,tabs:u})})}return e.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col gap-4",children:[w?null:e.jsxs("div",{className:c("sticky top-0 z-20 flex min-w-0 flex-wrap items-center gap-x-4 gap-y-2 bg-background pt-1",l?"justify-center":"justify-between"),children:[u,l?e.jsxs("div",{className:"flex items-center rounded-lg bg-muted/60 p-0.5 text-xs",children:[e.jsx(d,{to:"/$owner/events",params:{owner:t},search:s=>{const g={...s??{}};return delete g.tab,g},"aria-current":i?void 0:"page",className:c("rounded-md px-2.5 py-1 text-xs font-medium transition-colors",i?"text-muted-foreground hover:text-foreground":"bg-background text-foreground "),children:"Events"}),e.jsx(d,{to:"/$owner/events",params:{owner:t},search:s=>({...s??{},tab:"sessions"}),"aria-current":i?"page":void 0,className:c("rounded-md px-2.5 py-1 text-xs font-medium transition-colors",i?"bg-background text-foreground ":"text-muted-foreground hover:text-foreground"),children:"Sessions"})]}):null]}),i?e.jsx(Z,{owner:t,tone:"page",empty:"message"}):F?e.jsx(ce,{children:$}):$]})}function P({count:n}){return n===0?null:e.jsx("span",{role:"img","aria-label":`${n} item${n===1?"":"s"} need attention`,className:"rounded-full bg-blue-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-blue-600 dark:text-blue-400",children:n})}function ye({owner:n,search:t,attentionLens:x,entityScope:o}){const m=typeof t.type=="string"&&t.type.trim()?N(t.type.trim()):void 0,f=t.tab==="sessions"?"sessions":"events";return e.jsxs("div",{className:"flex flex-1 flex-col gap-6 px-4 py-6 lg:px-6",children:[e.jsx(de,{}),e.jsx(se,{owner:n,children:a=>e.jsx(ie,{organizationId:a.organizationId,isWorkspaceLoading:a.isWorkspaceLoading,children:e.jsxs("div",{className:"mx-auto flex min-h-0 w-full min-w-0 max-w-3xl flex-1 flex-col",children:[e.jsx(le,{organizationId:a.organizationId,ownerSlug:a.ownerSlug,typeScope:m,entityScope:o,attentionLens:x,activityTab:f}),e.jsx(oe,{ownerSlug:a.ownerSlug})]})})})]})}export{ye as A};
2
- //# sourceMappingURL=activity-route-view-DQglkhXU.js.map
@@ -1,2 +0,0 @@
1
- import{H as m,j as e,aB as b,fL as N,af as A,fM as L,L as p,fN as w,f as k,r as C,h3 as S,hl as x,B as y,A as I,bi as f,dd as M,gD as P}from"./index-_oPeVpL_.js";import{A as R,f as $,b as B}from"./agent-client-setup-list-B2SvH7xD.js";import{u as T}from"./clients-CpG676mg.js";import{g as _,c as U}from"./client-rows-EJSKR6z1.js";function E(t){const n=t?`/mcp/${t}`:"/mcp";if(!m)return`http://localhost:8787${n}`;try{const s=new URL(m);return s.pathname=n,s.toString()}catch{return`${m}${n}`}}const u="flex min-h-0 flex-1 flex-col gap-3 px-4 pt-4 pb-8 lg:px-6";function D(t,n){return`flex items-center gap-3 px-3 py-2.5 text-left text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground ${t===n-1?"":"border-b"}`}function v({owner:t}){return e.jsx(L,{crumbs:[e.jsx(p,{to:"/$owner/agents",params:{owner:t},className:w,children:"Agents"},"agents")]})}function W({owner:t}){return e.jsx("div",{className:u,children:e.jsxs(b,{className:"flex flex-1 flex-col gap-6",children:[e.jsx(N,{breadcrumb:e.jsx(v,{owner:t}),icon:e.jsx(A.agents.icon,{className:"h-6 w-6"}),title:"Connect an agent",caption:"Choose the agent you already use. Install directly where supported, or copy a setup prompt into the agent."}),e.jsx(R,{owner:t}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Local Automation delivery is separate and is not enabled by connecting an agent."})]})})}function j({text:t,label:n}){const[s,l]=C.useState(!1);return e.jsxs(y,{type:"button",variant:"outline",size:"sm",className:"h-8 text-xs",onClick:()=>{typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(t).then(()=>{l(!0),setTimeout(()=>l(!1),1500)})},children:[s?e.jsx(M,{className:"mr-1.5 h-3.5 w-3.5"}):e.jsx(P,{className:"mr-1.5 h-3.5 w-3.5"}),s?"Copied":n]})}function q({owner:t,clientId:n}){const s=$(n),{data:l}=k(t,{slug:t}),{data:h=[]}=T(null,{refetchInterval:2500}),r=C.useMemo(()=>_(h).filter(a=>a.connected),[h]);if(!s)return e.jsx("div",{className:u,children:e.jsxs(b,{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"There is no agent client by that name."}),e.jsx(p,{to:"/$owner/agents/connect",params:{owner:t},className:"text-sm text-primary hover:underline",children:"Back to agent clients"})]})});const o=E(t),c=B({workspaceName:l?.workspace?.name??t,owner:t,mcpUrl:o,clientLabel:s.id==="other"?void 0:s.label,terminalLogin:s.terminalLogin}),i=s.setupMode==="agent-prompt",g=i?c:s.installText?.(o)??c;return e.jsx("div",{className:u,children:e.jsxs(S,{header:e.jsx(N,{breadcrumb:e.jsx(v,{owner:t}),icon:e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(f,{name:s.label})}),title:s.label,caption:s.description}),children:[e.jsx(x,{title:"Set up",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:s.installTitle}),e.jsxs("div",{className:"flex items-start gap-2 rounded-lg border bg-muted/40 p-2.5",children:[e.jsx("pre",{className:"min-w-0 flex-1 overflow-x-auto whitespace-pre-wrap font-mono text-xs leading-relaxed",children:g}),e.jsx(j,{text:g,label:i?"Copy setup prompt":"Copy"})]})]}),e.jsx("ol",{className:"space-y-1 text-xs text-muted-foreground",children:s.steps(o).map((a,d)=>e.jsxs("li",{children:[d+1,". ",a]},a))}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[i?null:e.jsx(j,{text:c,label:"Copy setup prompt"}),s.guideLinks.map(a=>e.jsx(y,{asChild:!0,variant:"ghost",size:"sm",className:"h-8 text-xs",children:e.jsxs("a",{href:a.href,target:"_blank",rel:"noreferrer",children:[a.label,e.jsx(I,{className:"ml-1.5 h-3.5 w-3.5"})]})},a.href))]})]})}),e.jsx(x,{title:"Connected agents",count:r.length>0?String(r.length):void 0,children:r.length===0?e.jsx("div",{className:"rounded-lg border border-dashed px-3 py-2.5 text-xs text-muted-foreground",children:"Nothing yet. Finish setup and make an authenticated Lobu MCP request; the agent appears here automatically."}):e.jsx("div",{className:"overflow-hidden rounded-lg border",children:r.map((a,d)=>e.jsxs(p,{to:"/$owner/agents/connected/$clientId",params:{owner:t,clientId:a.clientId},className:D(d,r.length),children:[e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(f,{name:a.title})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:a.title}),e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:U(a)})]})]},a.key))})}),e.jsx(x,{title:"Manual MCP details",children:e.jsxs("dl",{className:"grid grid-cols-[5rem_1fr] gap-x-3 gap-y-1 rounded-lg border bg-muted/40 p-3 text-xs",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Name"}),e.jsx("dd",{className:"font-mono",children:"lobu"}),e.jsx("dt",{className:"text-muted-foreground",children:"MCP URL"}),e.jsx("dd",{className:"break-all font-mono",children:o})]})})]})})}export{W as A,q as a};
2
- //# sourceMappingURL=agent-connect-pages-B6uKvT_X.js.map
@@ -1,2 +0,0 @@
1
- import{aw as he,ax as xe,j as e,B as f,cC as pe,e1 as fe,a_ as ve,P as be,fe as je,ck as U,dd as V,cy as we,gK as ye,gL as Ne,gM as Ce,gN as Me,fV as Se,gO as ke,bO as Ie,bP as Ae,ay as Pe,r as q,bH as E,ex as H,bS as Fe,y as b,f3 as $,I as De,Q as Te,bn as $e,bo as Re,bp as _e,bq as Ee,br as K}from"./index-_oPeVpL_.js";import{b as Le,s as Oe}from"./model-selector-CB1BDvlW.js";function Be(t){const a=t.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,"-");return(a?/^[a-z]/.test(a)&&a.length>=3?a:`agent-${a}`:"agent").slice(0,60).replace(/-+$/g,"")||"agent"}function ze(t,a){const m=new Set(a),h=Be(t);let x=h,u=2;for(;m.has(x);){const g=`-${u}`;x=`${h.slice(0,Math.max(1,60-g.length)).replace(/-+$/g,"")||"agent"}${g}`,u+=1}return x}const Ue="__unresolved__";function W(t){return t.endsWith(`/${Ue}`)}function G(t){const a=t.indexOf("/");return a===-1?{slug:t,model:""}:{slug:t.slice(0,a),model:t.slice(a+1)}}function Ve(t,a){const{slug:m,model:h}=G(t);return{provider:a.find(g=>g.value===t)?.provider??a.find(g=>G(g.value).slug===m)?.provider??m,model:h}}function qe({value:t,onChange:a,disabled:m}){const{data:h=[]}=he(),{data:x=[]}=xe(),u=Le(h,x),g=(s,o)=>{const n=s+o;if(n<0||n>=t.length)return;const c=[...t];[c[s],c[n]]=[c[n],c[s]],a(c)},C=s=>{a(t.filter((o,n)=>n!==s))},M=s=>{t.includes(s)||a([...t,s])},d=u.filter(s=>!t.includes(s.value)&&!W(s.value));return e.jsxs("div",{className:"grid gap-2",children:[t.length===0?e.jsx("p",{className:"rounded-lg border border-dashed bg-muted/20 px-3 py-4 text-center text-[11px] text-muted-foreground",children:"No models pinned — this agent uses the org default."}):e.jsx("ul",{className:"grid gap-1.5",children:t.map((s,o)=>{const n=W(s),{provider:c,model:i}=Ve(s,u);return e.jsxs("li",{className:be("flex items-center gap-2 rounded-lg border bg-muted/20 px-3 py-2",n&&"opacity-60"),children:[e.jsxs("div",{className:"grid min-w-0 flex-1 gap-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"truncate text-sm",children:c}),o===0?e.jsx("span",{className:"shrink-0 rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"Default"}):null]}),e.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:n?"no model selected":i})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-0.5",children:[e.jsx(f,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":"Move up",disabled:m||o===0,onClick:()=>g(o,-1),children:e.jsx(pe,{className:"h-4 w-4"})}),e.jsx(f,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":"Move down",disabled:m||o===t.length-1,onClick:()=>g(o,1),children:e.jsx(fe,{className:"h-4 w-4"})}),e.jsx(f,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive","aria-label":"Remove model",disabled:m,onClick:()=>C(o),children:e.jsx(ve,{className:"h-4 w-4"})})]})]},s)})}),e.jsx(je,{contentClassName:"w-[--radix-popover-trigger-width] min-w-[280px]",searchPlaceholder:"Search or type a model ref…",emptyText:"Type a full provider/model ref to use it.",trigger:s=>e.jsxs(f,{type:"button",variant:"outline",role:"combobox","aria-expanded":s,disabled:m,className:"w-full justify-start font-normal text-muted-foreground",children:[e.jsx(we,{className:"mr-2 h-4 w-4 shrink-0"}),"Add model"]}),children:(s,o)=>{const n=o.trim(),c=Oe(n,u)&&!t.includes(n);return e.jsxs(e.Fragment,{children:[d.map(i=>e.jsxs(U,{value:`${i.provider} ${i.model} ${i.value}`,onSelect:()=>{M(i.value),s()},className:"cursor-pointer",children:[e.jsx(V,{className:"mr-2 h-4 w-4 opacity-0"}),e.jsxs("span",{className:"truncate",children:[i.provider," ",e.jsx("span",{className:"text-muted-foreground text-xs",children:i.model}),i.isDefault?e.jsx("span",{className:"ml-1.5 text-muted-foreground text-xs",children:"· org default"}):null]})]},i.value)),c?e.jsxs(U,{value:`__custom__ ${n}`,onSelect:()=>{M(n),s()},className:"cursor-pointer",children:[e.jsx(V,{className:"mr-2 h-4 w-4 opacity-0"}),e.jsxs("span",{children:["Use ",e.jsx("span",{className:"font-mono text-xs",children:n})]})]}):null]})}})]})}function Ge({mode:t,section:a="identity",existingAgentIds:m=[],onCreated:h,onCancel:x,onDone:u,reviewMode:g="none",reviewProposal:C=null,reviewControlsDisabled:M=!1}){const d=t.kind==="create",s=t.kind==="edit"?t.agent:null,o=!d&&a!=="platforms"&&a!=="skills"&&!!s,n=ye(),c=Ne(s?.agentId??""),i=Ce(s?.agentId??""),S=Me(s?.agentId??""),{data:p,isLoading:L}=Se(s?.agentId,{enabled:o}),O=!d&&g==="active"?C:null,R=O?ke(O.proposal):void 0,w=p,B=s?.agentId??"create",r=Ie(B,{name:R?.name??s?.name??"",description:R?.description??s?.description??"",identityMd:R?.identityMd??p?.identityMd??"",soulMd:p?.soulMd??"",userMd:p?.userMd??"",models:w?.models??w?.settings?.models??[],showToolCalls:w?.showToolCalls??w?.settings?.showToolCalls??!1,sandboxId:w?.sandboxId??w?.settings?.sandboxId??"builtin"}),[j,Q]=r.field("name"),[y,Y]=r.field("description"),[k,J]=r.field("identityMd"),[I,X]=r.field("soulMd"),[A,Z]=r.field("userMd"),[P,ee]=r.field("models"),[F,se]=r.field("showToolCalls"),[N,te]=r.field("sandboxId"),[ae,D]=Ae(B,!1),{data:ne}=Pe({enabled:a==="models"&&!d}),le=q.useCallback(async l=>{if(l.preventDefault(),!!r.canSubmit){if(d){const T=await n.mutateAsync({agentId:ze(j,m),name:j.trim(),description:y.trim()||void 0});h?await h(T.agentId):u?.();return}if(s){if(!p){E.error("Still loading agent settings — try again in a moment");return}try{await Promise.all([c.mutateAsync({name:j.trim()||s.name,description:y.trim()||void 0}),S.mutateAsync({identityMd:k.trim(),soulMd:I.trim(),userMd:A.trim(),models:P,authProfiles:p.authProfiles??[],skillsConfig:p.skillsConfig,showToolCalls:F,sandboxId:N==="builtin"?void 0:N})]),r.accept(r.values,{name:j.trim()||s.name,description:y.trim()||s.description||"",identityMd:k.trim(),soulMd:I.trim(),userMd:A.trim(),models:P,showToolCalls:F,sandboxId:N}),E.success("Agent saved"),u?.()}catch(T){E.error(T instanceof Error?T.message:"Failed to save agent")}}}},[p,n,y,r.accept,r.values,r.canSubmit,N,m,k,d,P,j,h,u,s,F,I,c,S,A]),ie=q.useCallback(async()=>{s&&(await i.mutateAsync(),D(!1),u?.())},[i,u,s,D]),_=n.isPending||c.isPending||i.isPending||S.isPending,re=d||!!p;if(o&&L)return e.jsx(H,{rows:6});const v=_||M,de=g==="none"||g==="gone",oe=j.trim().length>0&&re,ce=d||a==="settings",me=!d&&(a==="identity"||a==="settings"),ue=!d&&a==="settings",ge=!d&&a==="settings",z=!d&&a==="models";return e.jsxs("form",{onSubmit:le,className:"flex min-h-0 flex-col",children:[e.jsx(Fe,{visible:r.hasConflict,onReload:r.reset}),e.jsxs("div",{className:"grid content-start gap-4 py-2",children:[me?L?e.jsx(H,{rows:4}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"identity-md",children:"Identity"}),e.jsx($,{id:"identity-md",rows:6,value:k,onChange:l=>J(l.target.value),disabled:v,placeholder:"You are a market intelligence agent. Track competitors, analyze launches and signals, and surface concise, decision-ready insights."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"soul-md",children:"Soul"}),e.jsx($,{id:"soul-md",rows:6,value:I,onChange:l=>X(l.target.value),disabled:v,placeholder:"Be rigorous, skeptical of weak signals, and calm under ambiguity. Prefer crisp summaries, explicit evidence, and clear confidence levels."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"user-md",children:"User prompt"}),e.jsx($,{id:"user-md",rows:6,value:A,onChange:l=>Z(l.target.value),disabled:v,placeholder:"Monitor the market for notable competitor moves, pricing changes, launches, partnerships, and customer sentiment shifts. Summarize what changed, why it matters, and what to watch next."})]})]}):null,ce?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(b,{htmlFor:"agent-name",children:["Name ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(De,{id:"agent-name",placeholder:"Support Bot",value:j,onChange:l=>Q(l.target.value),disabled:v,required:!0}),d?e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"The agent ID will be generated automatically from the name."}):null]}),d?null:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"agent-description",children:"Description"}),e.jsx($,{id:"agent-description",placeholder:"Handles customer support and triage across channels.",value:y,onChange:l=>Y(l.target.value),disabled:v,rows:3})]})]}):null,ge?e.jsxs("div",{className:"flex items-start gap-3 rounded-lg border bg-muted/20 p-3",children:[e.jsx(Te,{id:"show-tool-calls",checked:F,onCheckedChange:l=>se(l===!0),disabled:v,className:"mt-0.5"}),e.jsxs("div",{className:"grid gap-0.5",children:[e.jsx(b,{htmlFor:"show-tool-calls",className:"cursor-pointer",children:"Show tool calls in chat"}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Render the agent's tool invocations (name, arguments, and result) as cards in the web chat. Off by default."})]})]}):null,z?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{children:"Models"}),e.jsx(qe,{value:P,onChange:ee,disabled:v}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Ordered list; the first is the default. Only these models may be used — a request for anything else falls back to the first available one. Leave empty to use the org default."})]}):null,z?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"agent-sandbox",children:"Run in sandbox"}),e.jsxs($e,{value:N,onValueChange:te,disabled:v,children:[e.jsx(Re,{id:"agent-sandbox",className:"w-full",children:e.jsx(_e,{placeholder:"Built-in"})}),e.jsxs(Ee,{children:[e.jsx(K,{value:"builtin",children:"Built-in (default)"}),(ne?.sandboxes??[]).map(l=>e.jsxs(K,{value:l.id,children:[l.name," (",l.providerKind,")",l.connected?"":" — no credential"]},l.id))]})]}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Where this agent's commands execute. Built-in runs in-process; sandboxes run on a connected provider. Manage sandboxes under Connect › Runtime."})]}):null]}),de?e.jsxs("div",{className:"mt-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[ue?ae?e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx(f,{type:"button",variant:"destructive",onClick:()=>void ie(),disabled:i.isPending,children:i.isPending?"Deleting...":"Delete agent"}),e.jsx(f,{type:"button",variant:"outline",onClick:()=>D(!1),disabled:i.isPending,children:"Cancel"})]}):e.jsx(f,{type:"button",variant:"outline",className:"text-destructive hover:text-destructive",onClick:()=>D(!0),disabled:i.isPending,children:"Delete agent"}):e.jsx("span",{}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[x?e.jsx(f,{type:"button",variant:"outline",onClick:x,disabled:_,children:"Cancel"}):null,e.jsx(f,{type:"submit",disabled:!r.canSubmit||!oe||_,children:d?n.isPending?"Creating...":"Create agent":c.isPending||S.isPending?"Saving...":"Save changes"})]})]}):null]})}export{Ge as A};
2
- //# sourceMappingURL=agent-editor-form-oUnIYHd7.js.map
@@ -1,2 +0,0 @@
1
- import{m,j as e,P as h,B as n,gj as i}from"./index-_oPeVpL_.js";function p({owner:t,agentId:a,children:s,showBack:r,backLabel:o,backTo:x,title:c,className:u}){const d=m(),l=()=>{d({to:x,params:{owner:t,agentId:a}})};return e.jsx("div",{className:h("mx-auto w-full max-w-3xl pb-8",u),children:c?e.jsxs(e.Fragment,{children:[e.jsx(j,{title:c,onBack:l,backLabel:o}),s]}):r?e.jsx(g,{onBack:l,backLabel:o,children:s}):s})}function g({onBack:t,backLabel:a,children:s}){return e.jsxs("div",{className:"relative",children:[e.jsx(n,{type:"button",variant:"ghost",size:"icon",className:"absolute right-full top-0 mr-1 size-8 text-muted-foreground hover:text-foreground","aria-label":`Back to ${a}`,onClick:t,children:e.jsx(i,{className:"h-4 w-4"})}),s]})}function j({title:t,onBack:a,backLabel:s,action:r}){return e.jsx("div",{className:"sticky top-0 z-10 mb-2 bg-background py-2",children:e.jsxs("div",{className:"relative flex items-center justify-center gap-1",children:[e.jsx(n,{type:"button",variant:"ghost",size:"icon",className:"size-8 shrink-0 text-muted-foreground hover:text-foreground","aria-label":`Back to ${s}`,onClick:a,children:e.jsx(i,{className:"h-4 w-4"})}),e.jsx("span",{className:"truncate text-base font-semibold",children:t}),r?e.jsx("div",{className:"absolute right-0",children:r}):null]})})}function v({title:t,description:a,onBack:s,backLabel:r}){return e.jsxs("div",{className:"mb-2 space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx(n,{type:"button",variant:"ghost",size:"icon",className:"size-8 shrink-0 text-muted-foreground hover:text-foreground","aria-label":`Back to ${r}`,onClick:s,children:e.jsx(i,{className:"h-4 w-4"})}),e.jsx("h1",{className:"text-xl font-semibold",children:t})]}),e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:a})]})}export{p as A,v as a};
2
- //# sourceMappingURL=agent-subpage-shell-B3K_jPYR.js.map
@@ -1,6 +0,0 @@
1
- import{j as s,r as l,aD as Bt,Z as Ht,fU as zt,fV as Wt,V as tt,H as Be,W as nt,bV as Kt,fW as rt,fX as qt,fY as Gt,L as gt,P as L,fj as Qt,dO as xt,dP as Xt,fZ as Yt,dv as Jt,dQ as Zt,f_ as en,ah as tn,B as ce,e1 as nn,f$ as rn,g0 as He,X as on,a1 as sn,cC as ln,ae as Ce,g1 as an,d5 as cn,d7 as un,g2 as dn,d6 as fn,bb as pn,g3 as mn,g4 as hn,ds as gn,b7 as xn,g5 as bn,g6 as vn}from"./index-_oPeVpL_.js";import{D as yn,E as Rn}from"./app-bridge-BCm4muqj.js";import{A as wn,a as Sn,b as Tn,c as Ge,d as bt,e as jn}from"./agent-loading-shells-CtZJM2Gc.js";import{h as Cn,t as Nn,R as En,i as An,u as kn,M as In,a as _n}from"./use-mention-search-DqEykWl_.js";import{E as On,c as Pn}from"./events-feed-fucGZSJR.js";const vt=l.createContext(null);function Mn({extension:e,children:t}){return s.jsx(vt.Provider,{value:e??null,children:t})}function Qe(){return l.useContext(vt)}var Xe=(e=>(e.PROVIDER_QUOTA_EXHAUSTED="PROVIDER_QUOTA_EXHAUSTED",e.PROVIDER_AUTH="PROVIDER_AUTH",e.PROVIDER_UNKNOWN_MODEL="PROVIDER_UNKNOWN_MODEL",e.PROVIDER_BASE_URL_UNRESOLVED="PROVIDER_BASE_URL_UNRESOLVED",e.NO_MODEL_CONFIGURED="NO_MODEL_CONFIGURED",e.WORKER_UNRESPONSIVE="WORKER_UNRESPONSIVE",e.WORKER_DIED="WORKER_DIED",e.WORKER_STARTUP_FAILED="WORKER_STARTUP_FAILED",e.PROVIDER_TOOL_CALL_FAILED="PROVIDER_TOOL_CALL_FAILED",e.SESSION_TIMEOUT="SESSION_TIMEOUT",e))(Xe||{});const Ln={PROVIDER_QUOTA_EXHAUSTED:{cta:"provider-management",ctaLabel:"Manage provider"},PROVIDER_AUTH:{cta:"provider-management",ctaLabel:"Reconnect provider"},PROVIDER_UNKNOWN_MODEL:{cta:"agent-settings",ctaLabel:"Choose model"},PROVIDER_BASE_URL_UNRESOLVED:{cta:"provider-management",ctaLabel:"Manage provider"},PROVIDER_TOOL_CALL_FAILED:{message:"The model provider rejected its own tool call and ended the turn. This is usually temporary — please try again.",cta:"none"},NO_MODEL_CONFIGURED:{message:"No model is configured for this agent. Choose a model in agent settings.",cta:"agent-settings",ctaLabel:"Choose a model"},WORKER_UNRESPONSIVE:{message:"The agent didn't finish responding in time. This is usually temporary — please try again.",cta:"none"},WORKER_DIED:{message:"The agent stopped unexpectedly before it could reply. This is usually temporary — please try again.",cta:"none"},WORKER_STARTUP_FAILED:{message:"The agent couldn't start, so your request wasn't processed. Please try again in a moment.",cta:"none"},SESSION_TIMEOUT:{cta:"none",silent:!0}};function $n(e){if(typeof e=="string")return Object.values(Xe).includes(e)?e:void 0}const Dn=Object.freeze(Object.defineProperty({__proto__:null,AGENT_ERRORS:Ln,AgentErrorCode:Xe,toAgentErrorCode:$n},Symbol.toStringTag,{value:"Module"})),{AGENT_ERRORS:Un,toAgentErrorCode:Fn}=Dn;function ot(e,t){if(!t)return null;try{const n=new URL(t);return n.protocol!=="http:"&&n.protocol!=="https:"?null:new URL(e,`${n.origin}/`).toString()}catch{return null}}function yt(e,t){const n=Fn(e);if(!n)return null;const r=Un[n];if(r.cta==="none"||!t.workspaceSlug)return null;const o=encodeURIComponent(t.workspaceSlug);if(r.cta==="provider-connect"||r.cta==="provider-management"){const i=t.provider?`/${o}/connectors/${encodeURIComponent(`${Bt}${t.provider}`)}`:`/${o}/connectors`,c=ot(i,t.webOrigin);if(!c)return null;const u=new URL(c);return t.provider&&t.model&&u.searchParams.set("model",t.model),{label:r.ctaLabel??"Connect a provider",href:u.toString()}}if(!t.agentId)return null;const a=ot(`/${o}/agents/${encodeURIComponent(t.agentId)}/settings`,t.webOrigin);return a?{label:r.ctaLabel??"Open settings",href:a}:null}function Rt(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e.subscribable;if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;if(typeof n.connector_key!="string"||!n.connector_key||typeof n.resource_type!="string"||!n.resource_type||typeof n.resource_ref!="string"||!n.resource_ref||typeof n.label!="string"||!n.label)return null;const r=Array.isArray(n.suggested_event_keys)?n.suggested_event_keys.filter(o=>typeof o=="string"&&!!o):void 0;return{connector_key:n.connector_key,resource_type:n.resource_type,resource_ref:n.resource_ref,label:n.label,...r?.length?{suggested_event_keys:r}:{}}}const st=new Set(["localhost","127.0.0.1","::1","[::1]"]);function Vn(e){return e?.trim().toLowerCase().replace(/^\.+|\.+$/g,"")||null}function lt(e,t){const n=Vn(t);if(!n)return!1;const r=e.toLowerCase().replace(/\.$/,"");return r===n||r.endsWith(`.${n}`)}function at(e,t,n){try{const r=new URL(t),o=new URL(e,t),a=st.has(o.hostname)&&st.has(r.hostname),i=o.protocol===r.protocol&&(o.protocol==="https:"||o.protocol==="http:")&&lt(o.hostname,n)&&lt(r.hostname,n);return o.origin!==r.origin&&(a||i)&&(o.protocol=r.protocol,o.host=r.host),o.origin===r.origin&&o.pathname.startsWith("/api/v1/agents")&&(o.pathname=`/lobu${o.pathname}`),o.toString()}catch{return e}}const Bn=/\.(png|jpe?g|gif|webp|avif|bmp|svg)$/i,wt=new Set(["suggest_actions"]),Me="Thinking…";function Hn(e){const{textOut:t,statusLine:n,errorText:r,toolCalls:o}=e,a=[];n===Me&&a.push({type:"reasoning"}),r&&a.push({type:"error",text:r});let i=t;return n&&n!==Me&&(i=t?`${t}
2
-
3
- ${n}`:n),i&&a.push({type:"text",text:i}),a.push(...o),a}const Ye=l.createContext(null);function Ne(){const e=l.useContext(Ye);if(!e)throw new Error("useLobuChat must be used within <LobuChatProvider>");return e}function Po({messages:e,workspaceSlug:t=null,children:n}){const r=l.useMemo(()=>({messages:e,running:!1,append:()=>{},cancel:()=>{},pendingAttachments:[],addAttachments:()=>{},removeAttachment:()=>{},agentId:null,conversationId:"",workspaceSlug:t,currentSuggestions:null}),[e,t]);return s.jsx(Ye.Provider,{value:r,children:n})}const St=/\[([^\]]*)\]\((\S*?\/api\/v1\/files\/[^)\s]+)\)/g;function it(e){return e.replace(/<lobu_internal_context>[\s\S]*?<\/lobu_internal_context>\n*/g,"").replace(St,"").replace(/\n{3,}/g,`
4
-
5
- `).trim()}function zn(e){const t=[];for(const n of e.matchAll(St)){const r=n[1]?.trim()||"file",o=n[2];o&&t.push({name:r,url:o})}return t}function Wn(e,t={}){if(typeof e=="string"){const r=it(e);return r?[{type:"text",text:r}]:[]}if(!Array.isArray(e))return[];const n=[];for(const r of e){if(!r||typeof r!="object")continue;const o=r;if(o.type==="text"&&typeof o.text=="string"){const a=it(o.text);a&&n.push({type:"text",text:a})}else t.showToolCalls&&o.type==="toolCall"&&typeof o.name=="string"&&!wt.has(o.name)?n.push({type:"tool-call",toolCallId:o.id??`tc-${n.length}`,toolName:o.name,args:o.arguments??{},...o.result!==void 0?{result:o.result}:{}}):t.showToolCalls&&o.type==="tool_use"&&typeof o.name=="string"&&n.push({type:"tool-call",toolCallId:o.id??`tc-${n.length}`,toolName:o.name,args:o.input??{},...o.result!==void 0?{result:o.result}:{}})}return n}function Kn(e){const t=[],n=r=>{for(const{name:o,url:a}of zn(r))t.push({id:`file-${t.length}`,name:o,url:a,isImage:Bn.test(o)})};if(typeof e=="string")return n(e),t.length>0?t:void 0;if(Array.isArray(e)){for(const r of e){if(!r||typeof r!="object")continue;const o=r;if(o.type==="image"&&typeof o.data=="string"){const a=o.mimeType||"image/png";t.push({id:`img-${t.length}`,name:`image-${t.length+1}`,imageDataUrl:`data:${a};base64,${o.data}`,isImage:!0})}else o.type==="text"&&typeof o.text=="string"&&n(o.text)}return t.length>0?t:void 0}}function qn(e,t){if(e.type==="bashExecution"){const r=e.content??{},o=e.timestamp?new Date(e.timestamp).getTime():void 0;return{id:e.id,role:"user",parts:[{type:"bash",command:r.command??"",output:r.output??"",exitCode:r.exitCode,cancelled:r.cancelled??!1}],createdAt:o&&!Number.isNaN(o)?o:void 0}}if(e.type!=="message"||e.isVerbose||e.role!=="assistant"&&e.role!=="user"&&e.role!=="system")return null;const n=e.timestamp?new Date(e.timestamp).getTime():void 0;return{id:e.id,role:e.role,parts:Wn(e.content,t),attachments:Kn(e.content),createdAt:n&&!Number.isNaN(n)?n:void 0}}const Gn=[],Qn=[];function Xn(e){let t=null;for(const n of e)n.type==="suggestion"&&(t=n.prompts.length>0?n.prompts:null);return t}function Yn(e,t){if(e.length===0)return null;const n=[];for(const r of e)if(r.type!=="suggestion"){if(r.type==="agent-error"){n.push({type:"error",text:String(r.error??"Agent reported an error.")});const o=yt(r.errorCode,{...t,provider:r.errorContext?.provider,model:r.errorContext?.model});o&&n.push({type:"tool-call",toolCallId:`error-run-${r.runId}`,toolName:"link-button",args:{label:o.label,url:o.href}});continue}n.push({type:"tool-call",toolCallId:`approval-event-${r.eventId}`,toolName:"tool-approval",args:{runId:r.runId,action:r.action,proposal:r.proposal,current:r.current,fields:r.fields??null,attribution:r.attribution??null,resourceKind:r.resourceKind??null,reason:r.reason??null,status:r.status??"pending",reviewedByName:r.reviewedByName??null}})}return n.length===0?null:{id:"history-interactions",role:"assistant",parts:n}}const Jn=3e4,Zn=3*Jn,er=15e3;function ct(e){try{return JSON.parse(e.data)}catch{return{content:e.data}}}const ve=e=>`${e}-${Date.now()}-${Math.random().toString(36).slice(2,6)}`;function ut(e){const t=[],n=new Set;for(const r of e){if(!r||typeof r!="object")continue;const{title:o,message:a}=r;if(typeof o!="string"||typeof a!="string")continue;const i=o.trim(),c=a.trim();if(i.length===0||c.length===0)continue;const u=`${i}\0${c}`;n.has(u)||(n.add(u),t.push({title:i,message:c}))}return t.length>0?t:null}function Mo({agentId:e,workspaceSlug:t,thread:n="agent-panel",loadHistory:r=!0,ephemeralContext:o,onFirstUserMessage:a,children:i,initialDraft:c}){const u=Ht(),d=l.useRef(null),p=l.useRef(null),v=l.useRef(!1),g=l.useRef(o),h=l.useRef(void 0),[w,A]=l.useState(void 0),y=l.useRef(!1),_=l.useRef(null);g.current=o;const{data:k,isLoading:U}=zt(e,n,{orgSlug:t,enabled:r&&!!e&&!!n}),F=k?.messages??Gn,X=k?.interactions??Qn,{data:E}=Wt(e,{enabled:!!e}),M=!!(E?.showToolCalls??E?.settings?.showToolCalls),[J,ne]=l.useState([]),[z,q]=l.useState(!1),[K,R]=l.useState([]);l.useEffect(()=>{w&&R([])},[w]);const[S,j]=l.useState(null),O=l.useRef(!1);O.current=z;const I=l.useMemo(()=>F.map(C=>qn(C,{showToolCalls:M})).filter(C=>C!==null),[F,M]),Z=l.useRef(!1);l.useEffect(()=>{if(Z.current||U||O.current)return;Z.current=!0;const C=Yn(X,{workspaceSlug:t,agentId:e,webOrigin:typeof window>"u"?null:window.location.origin});ne(C?[...I,C]:I),j(Xn(X))},[e,U,I,X,t]);const G=l.useCallback(()=>{u.invalidateQueries({queryKey:["agent-thread-messages",t,e,n]}),u.invalidateQueries({queryKey:["agent-threads",t,e]})},[u,t,e,n]),re=l.useCallback(async()=>{if(d.current)return d.current;if(p.current)return p.current;if(!e)throw new Error("No agent selected");const C=(async()=>{const T=await tt(`${Be}/lobu/api/v1/agents`,{method:"POST",headers:{"Content-Type":"application/json",...t?{"x-lobu-org":t}:{}},credentials:"include",body:JSON.stringify({agentId:e,thread:n,...h.current?{executionTarget:h.current}:{}}),timeoutMs:2e4});if(!T.ok)throw await nt(T);const V=await T.json(),W=Kt(),B={sessionId:V.agentId,sseUrl:at(V.sseUrl,Be,W),messagesUrl:at(V.messagesUrl,Be,W),executionTarget:V.executionTarget};return h.current=V.executionTarget,A(V.executionTarget),d.current=B,B})();p.current=C;try{return await C}catch(T){throw d.current=null,T}finally{p.current=null}},[e,t,n]),se=l.useCallback(async(C,T,V)=>{const W=new AbortController;_.current=W;const B=f=>{ne(m=>m.map(b=>b.id===V?{...b,parts:f}:b))};let Q;try{Q=await re()}catch(f){B([{type:"text",text:`Error: ${f instanceof Error?f.message:"Could not start a session."}`}]);return}let H=await rt(Q.sseUrl,{throwOnFailure:!0});const ae=[];let me=null;const we=()=>{const f=me;me=null,f?.()},he=f=>{ae.push(f),we()};let ge=!1,Se=null;const ke=new Promise(f=>{Se=f});let fe=0,xe=Date.now();const pe=f=>{xe=Date.now();const m=Number(f.lastEventId);Number.isFinite(m)&&m>fe&&(fe=m)},Ie=["output","status","complete","closed","agent-error","question","suggestion","link-button","tool-approval","tool_use"],Te=f=>{f.addEventListener("open",()=>{ge=!0,Se?.()}),f.addEventListener("connected",b=>{pe(b),ge||(ge=!0,Se?.())}),f.addEventListener("ping",pe);const m=b=>P=>{pe(P);const ee=P;typeof ee.data=="string"&&he({kind:b,payload:ct(ee)})};for(const b of Ie)f.addEventListener(b,m(b));f.addEventListener("error",b=>{const P=b;if(typeof P.data=="string"&&P.data){pe(b),he({kind:"error",payload:ct(P)});return}f.readyState===EventSource.CLOSED&&he({kind:"error",payload:{error:"Connection closed"}})})};Te(H);const _e=async()=>{H.close();let f=Q.sseUrl;if(fe){const m=new URL(Q.sseUrl,window.location.origin);m.searchParams.set("since",String(fe)),f=m.toString()}H=await rt(f,{throwOnFailure:!1}),Te(H),xe=Date.now()};await Promise.race([ke,new Promise(f=>setTimeout(f,1500))]);const Oe=()=>{H.close(),we()};W.signal.addEventListener("abort",Oe,{once:!0});try{const f=g.current?.trim(),m=!!f&&!y.current;m&&(y.current=!0);let b;if(T.length>0){const x=new FormData;x.set("content",C),m&&f&&x.set("ephemeralContext",f);for(const N of T)x.append("files",N,N.name);b={method:"POST",credentials:"include",body:x,timeoutMs:12e4}}else{const x={content:C};m&&f&&(x.ephemeralContext=f),b={method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(x),timeoutMs:2e4}}const P=await tt(Q.messagesUrl,b);if(!P.ok)throw d.current=null,await nt(P);let ee="",D=Me,et=null;const be=[],ie=()=>Hn({textOut:ee,statusLine:D,errorText:et,toolCalls:be});for(B(ie());!W.signal.aborted;){if(ae.length===0){let N;const te=await Promise.race([new Promise(Ve=>{me=()=>Ve(!0)}),new Promise(Ve=>{N=setTimeout(()=>Ve(!1),er)})]);N&&clearTimeout(N),!te&&Date.now()-xe>=Zn&&(await _e(),G());continue}const x=ae.shift();if(x){if(x.kind==="output")D=null,ee+=String(x.payload.content??"");else if(x.kind==="status")D=Me;else if(x.kind==="complete"){D=null;const N=x.payload.finalText;typeof N=="string"&&N.length>0&&(ee=N);const te=x.payload.suggestions;te!==void 0&&j(Array.isArray(te)?ut(te):null),G(),B(ie());return}else if(x.kind==="closed"){d.current=null;const N=x.payload.reason;D=`Session ended${N?`: ${N}`:""}.`,G(),B(ie());return}else if(x.kind==="error"||x.kind==="agent-error"){D=null,et=typeof x.payload.error=="string"&&x.payload.error?x.payload.error:"Agent reported an error.";const N=x.payload.errorContext&&typeof x.payload.errorContext=="object"?x.payload.errorContext:void 0,te=yt(x.payload.errorCode,{workspaceSlug:t,agentId:e,webOrigin:typeof window>"u"?null:window.location.origin,provider:typeof N?.provider=="string"?N.provider:void 0,model:typeof N?.model=="string"?N.model:void 0});te&&be.push({type:"tool-call",toolCallId:ve("l"),toolName:"link-button",args:{label:te.label,url:te.href}}),G(),B(ie());return}else if(x.kind==="question")be.push({type:"tool-call",toolCallId:ve("q"),toolName:"question",args:{question:x.payload.question??"",options:x.payload.options??[]}});else if(x.kind==="tool_use"){if(D=null,wt.has(x.payload.name??"")){B(ie());continue}const N=x.payload.result_summary,te=Rt(N);if(!M&&!te){B(ie());continue}be.push({type:"tool-call",toolCallId:x.payload.toolCallId??ve("t"),toolName:M?x.payload.name??"tool":"subscription-candidate",args:M?x.payload.input??{}:null,result:N,isError:x.payload.isError})}else if(x.kind==="suggestion"){const N=x.payload.prompts;N!==void 0&&(j(Array.isArray(N)?ut(N):null),B(ie()))}else if(x.kind==="link-button")be.push({type:"tool-call",toolCallId:ve("l"),toolName:"link-button",args:{label:x.payload.label??"Open link",url:x.payload.url??""}});else if(x.kind==="tool-approval"){const N=x.payload.runId;if(typeof N!="number")continue;be.push({type:"tool-call",toolCallId:`run-${N}`,toolName:"tool-approval",args:{runId:N,action:x.payload.action??null,proposal:x.payload.proposal??null,current:x.payload.current??null,fields:x.payload.fields??null,attribution:x.payload.attribution??null,resourceKind:x.payload.resourceKind??null}})}B(ie())}}}catch(f){B([{type:"text",text:`Error: ${f instanceof Error?f.message:"Send failed."}`}])}finally{W.signal.removeEventListener("abort",Oe),H.close()}},[e,re,G,M,t]),ue=l.useCallback(C=>{const T=C.trim(),V=K.map(H=>H.file);if(!T&&V.length===0||O.current||!e)return;v.current||(v.current=!0,a?.(T||V[0]?.name||""));const W={id:ve("u"),role:"user",parts:T?[{type:"text",text:T}]:[],attachments:K.map(H=>({id:H.id,name:H.name,isImage:H.isImage,imageDataUrl:H.isImage?URL.createObjectURL(H.file):void 0})),createdAt:Date.now()},B=ve("asst"),Q={id:B,role:"assistant",parts:[{type:"reasoning"}],createdAt:Date.now()};ne(H=>[...H,W,Q]),R([]),q(!0),O.current=!0,se(T,V,B).finally(()=>{q(!1),O.current=!1,_.current=null})},[e,a,K,se]),Y=l.useCallback(()=>{_.current?.abort()},[]),le=l.useCallback(C=>{const T=Array.from(C);R(V=>[...V,...T.map(W=>({id:crypto.randomUUID(),name:W.name,file:W,isImage:W.type.startsWith("image/")}))])},[]),$=l.useCallback(C=>{R(T=>T.filter(V=>V.id!==C))},[]),de=l.useRef(!1);l.useEffect(()=>{if(de.current)return;const C=qt(n);C&&(de.current=!0,h.current=C.executionTarget,A(C.executionTarget),ue(C.text))},[n,ue]),l.useEffect(()=>{U||I.length===0||re().catch(()=>{})},[re,I.length,U]);const Ae=l.useMemo(()=>({messages:J,running:z,append:ue,cancel:Y,pendingAttachments:K,addAttachments:le,removeAttachment:$,initialDraft:c,agentId:e,conversationId:n,workspaceSlug:t,currentSuggestions:S,executionTarget:w}),[J,z,ue,Y,K,le,$,c,e,n,t,S,w]);return r&&U?s.jsx(wn,{}):s.jsx(Ye.Provider,{value:Ae,children:i})}const dt="mx-0.5 inline-flex items-center gap-1 rounded-md bg-accent px-1.5 py-0.5 align-baseline font-medium text-[0.9em] text-accent-foreground no-underline";function tr({refItem:e}){const t=En[e.kind]??Gt;return An(e.path)?s.jsxs("span",{className:dt,children:[s.jsx(t,{className:"h-3 w-3 shrink-0 opacity-70"}),e.label]}):s.jsxs(gt,{to:e.path,className:L(dt,"hover:bg-accent/80"),children:[s.jsx(t,{className:"h-3 w-3 shrink-0 opacity-70"}),e.label]})}const Je=({text:e,renderText:t})=>Cn(e)?s.jsx(s.Fragment,{children:Nn(e).map((n,r)=>n.type==="ref"?s.jsx(tr,{refItem:n.ref},`r${r}`):s.jsx("span",{children:t(n.text)},`t${r}`))}):s.jsx(s.Fragment,{children:t(e)}),nr=({label:e="Thinking"})=>s.jsx("span",{className:"aui-thinking-shimmer inline-block text-sm","aria-live":"polite","aria-busy":"true",children:e}),Tt=l.createContext(null),jt=()=>{const e=l.useContext(Tt);if(!e)throw new Error("ChainOfThought components must be used within ChainOfThought");return e},Ct=l.memo(({className:e,open:t,defaultOpen:n=!1,onOpenChange:r,children:o,...a})=>{const[i,c]=Qt({prop:t,defaultProp:n,onChange:r}),u=l.useMemo(()=>({isOpen:i,setIsOpen:c}),[i,c]);return s.jsx(Tt.Provider,{value:u,children:s.jsx("div",{className:L("not-prose max-w-prose space-y-4",e),...a,children:o})})}),Nt=l.memo(({className:e,children:t,...n})=>{const{isOpen:r,setIsOpen:o}=jt();return s.jsx(xt,{onOpenChange:o,open:r,children:s.jsxs(Xt,{className:L("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...n,children:[s.jsx(Yt,{className:"size-4"}),s.jsx("span",{className:"flex-1 text-left",children:t??"Chain of Thought"}),s.jsx(Jt,{className:L("size-4 transition-transform",r?"rotate-180":"rotate-0")})]})})}),Et=l.memo(({className:e,icon:t=en,label:n,description:r,status:o="complete",children:a,...i})=>{const c={complete:"text-muted-foreground",active:"text-foreground",pending:"text-muted-foreground/50"};return s.jsxs("div",{className:L("flex gap-2 text-sm",c[o],"fade-in-0 slide-in-from-top-2 animate-in",e),...i,children:[s.jsxs("div",{className:"relative mt-0.5",children:[s.jsx(t,{className:"size-4"}),s.jsx("div",{className:"-mx-px absolute top-7 bottom-0 left-1/2 w-px bg-border"})]}),s.jsxs("div",{className:"flex-1 space-y-2 overflow-hidden",children:[s.jsx("div",{children:n}),r&&s.jsx("div",{className:"text-muted-foreground text-xs",children:r}),a]})]})}),At=l.memo(({className:e,children:t,...n})=>{const{isOpen:r}=jt();return s.jsx(xt,{open:r,children:s.jsx(Zt,{className:L("mt-2 space-y-3","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...n,children:t})})});Ct.displayName="ChainOfThought";Nt.displayName="ChainOfThoughtHeader";Et.displayName="ChainOfThoughtStep";At.displayName="ChainOfThoughtContent";function rr(e){return{contentIds:e.filter(n=>Number.isSafeInteger(n)&&n>0),sortBy:"date",sortOrder:"asc"}}function or({ownerSlug:e,eventIds:t}){const n=t.join(","),r=l.useMemo(()=>rr(n.split(",").map(Number)),[n]);return r.contentIds.length===0?null:s.jsx(tn,{owner:e,children:({organizationId:o,ownerSlug:a})=>o?s.jsx(On,{organizationId:o,ownerSlug:a,filters:r,dense:!0,hideOriginator:!0}):null})}function sr({defaultTagName:e,props:t,render:n,state:r={},stateAttributesMapping:o}){let a=ze(lr(r,o),t);if(!n)return l.createElement(e,a);if(typeof n=="function")return n(a,r);if(!l.isValidElement(n))return null;let i=n.props,c={...ze(a,i),ref:Ee(a.ref,i.ref)};return l.cloneElement(n,c)}function ze(...e){let t={};for(let n of e){if(!n)continue;let r=n;for(let o of Object.keys(r)){let a=r[o];if(a===void 0)continue;let i=t[o];o==="className"?t[o]=[i,a].filter(Boolean).join(" "):o==="style"?t[o]={...i,...a}:o==="ref"?t[o]=Ee(i,a):ir(o)&&typeof i=="function"&&typeof a=="function"?t[o]=ar(a,i):t[o]=a}}return t}function lr(e,t){let n={};for(let r of Object.keys(e)){let o=e[r],a=t?.[r]?.(o);if(a){Object.assign(n,a);continue}if(r==="slot"){n["data-slot"]=o;continue}let i=`data-${String(r).replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`)}`;typeof o=="boolean"?n[i]=o?"":void 0:o!=null&&(n[i]=String(o))}return n}function ar(e,t){return function(n){e(n),n.defaultPrevented||t(n)}}function ir(e){return/^on[A-Z]/.test(e)}function Ee(...e){let t=e.filter(Boolean);if(t.length!==0)return n=>{for(let r of t)typeof r=="function"?r(n):r&&(r.current=n)}}var cr=8,ur=64,dr=0,Le=.5,fr=180,pr=new Set(["ArrowDown","ArrowUp","End","Home","PageDown","PageUp"," "]),kt={start:!1,end:!1},mr=[],$e={currentAnchorId:null,visibleMessageIds:mr};function hr({content:e,scrollEdgeThreshold:t,spacer:n,viewport:r}){if(!r||!e)return kt;let o=Ze({content:e,spacer:n,viewport:r});return{start:r.scrollTop>t,end:o-r.scrollTop-r.clientHeight>t}}function gr({content:e,scrollMargin:t,scrollPreviousItemPeek:n,spacer:r,viewport:o,visibleMessageIds:a}){if(!e||!o)return $e;let i=o.getBoundingClientRect(),c=i.top+t+n,u=typeof IntersectionObserver>"u",d=[],p=null;for(let v of je(e,r)){let g=v.dataset.messageId;if(!g)continue;let h=v.dataset.scrollAnchor==="true",w=h||u?v.getBoundingClientRect():null;(u&&w?w.bottom>c&&w.top<i.bottom:a.has(g))&&d.push(g),h&&w&&w.top<=c+Le&&(p=g)}return d.length===0&&p===null?$e:{currentAnchorId:p,visibleMessageIds:d}}function je(e,t){return Array.from(e.children).filter(n=>n instanceof HTMLElement&&n!==t)}function xr(e,t){for(let n=t;n<e.length;n++){let r=e[n];if(r?.dataset.scrollAnchor==="true")return r}return null}function br(e,t){for(let n of e)if(n.dataset.scrollAnchor==="true"&&!t.has(n))return n;return null}function vr(e,t){let n=0;for(let r=t;r<e.length;r++)if(e[r]?.dataset.scrollAnchor==="true"&&(n+=1,n>1))return!0;return!1}function yr(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n?.dataset.scrollAnchor==="true")return n}return null}function Rr({content:e,spacer:t,viewport:n}){let r=n.getBoundingClientRect();for(let o of je(e,t)){if(!o.dataset.messageId)continue;let a=o.getBoundingClientRect();if(a.bottom>r.top&&a.top<r.bottom)return o}return null}function wr({align:e,element:t,scrollMargin:n,spacer:r,viewport:o}){let a=It(t,o),i=t.getBoundingClientRect().height,c=jr(r);if(e==="center"){let u=Math.max(0,o.clientHeight-c.start-c.end);return a-c.start-(u-i)/2-n}if(e==="end")return a-o.clientHeight+i+c.end+n;if(e==="nearest"){let u=a+i,d=o.scrollTop+c.start,p=o.scrollTop+o.clientHeight-c.end;return a>=d&&u<=p?o.scrollTop:a<d?a-c.start-n:u-o.clientHeight+c.end+n}return a-c.start-n}function It(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top-r.top+t.scrollTop}function Pe(e,t){return e.getBoundingClientRect().top-t.getBoundingClientRect().top}function Sr({content:e,scrollTop:t,spacer:n,viewport:r}){let o=Ze({content:e,spacer:n,viewport:r});return t+r.clientHeight-o}function Ze({content:e,spacer:t,viewport:n}){let r=je(e,t),o=_t(e),a=n.getBoundingClientRect(),i=n.scrollTop,c=o.start+o.end;for(let u of r){let d=u.getBoundingClientRect();c=Math.max(c,d.bottom-a.top+i+o.end)}return c}function Tr(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function _t(e){let t=window.getComputedStyle(e);return{end:We(t.paddingBlockEnd||t.paddingBottom),start:We(t.paddingBlockStart||t.paddingTop)}}function jr(e){let t=e?.parentElement;return t?_t(t):{end:0,start:0}}function Cr(e){if(!e)return 0;let t=window.getComputedStyle(e),n=t.rowGap==="normal"?t.gap:t.rowGap;return We(n)}function We(e){if(!e)return 0;let t=Number.parseFloat(e);return Number.isFinite(t)?t:0}function Nr({refs:e,commitScrollState:t,scheduleStateCommit:n,scheduleVisibilitySync:r}){let{streamingTurnRef:o,autoScrollRef:a,autoscrollingRef:i,autoscrollingTimeoutRef:c,contentRef:u,defaultScrollPositionAppliedRef:d,itemCountRef:p,messageElementsRef:v,modeRef:g,pendingScrollToMessageRef:h,prependRestoreRef:w,scrollMarginRef:A,scrollPreviousItemPeekRef:y,spacerGapRef:_,spacerHeightRef:k,spacerRef:U,viewportRef:F}=e,X=l.useCallback(R=>{c.current!==null&&(window.clearTimeout(c.current),c.current=null),i.current!==R&&(i.current=R,t()),R&&(c.current=window.setTimeout(()=>{c.current=null,i.current=!1,t()},fr))},[t]),E=l.useCallback(R=>{let S=U.current;if(!S)return;let j=Math.max(0,Math.ceil(R));k.current!==j&&(k.current=j,S.hidden=j===0,S.style.height=`${j}px`,S.style.marginTop=j>0?`${-_.current}px`:"")},[]),M=l.useCallback((R,{behavior:S="auto",autoscrolling:j=!1}={})=>{let O=F.current;if(!O)return;let I=Math.max(0,R);if(Math.abs(O.scrollTop-I)<=Le){O.scrollTop=I,t();return}j&&X(!0),O.scrollTo({top:I,behavior:S}),n()},[t,n,X]),J=l.useCallback(({behavior:R="auto"}={})=>F.current?(E(0),o.current=null,g.current="free-scrolling",M(0,{behavior:R}),r(),!0):!1,[r,M,E]),ne=l.useCallback(({behavior:R="auto"}={})=>{let S=F.current;return S?(E(0),o.current=null,g.current=a.current?"following-bottom":"free-scrolling",M(Tr(S),{autoscrolling:!0,behavior:R}),r(),!0):!1},[r,M,E]),z=l.useCallback((R,{align:S="start",behavior:j="auto",scrollMargin:O=A.current}={},{keepPreviousPeek:I=!1}={})=>{let Z=u.current,G=F.current;if(!Z||!G||!Z.contains(R))return!1;let re=wr({align:S,element:R,scrollMargin:I?O+y.current:O,spacer:U.current,viewport:G}),se=Sr({content:Z,scrollTop:re,spacer:U.current,viewport:G});return E(se),w.current={element:R,viewportTop:Pe(R,G)},g.current=I?"anchored-to-message":"settling-jump",o.current=I?R:null,M(re,{behavior:j}),r(),!0},[r,M,E]),q=l.useCallback(()=>{let R=o.current;return!R||!R.isConnected||g.current!=="anchored-to-message"?!1:z(R,{align:"start"},{keepPreviousPeek:!0})},[z]),K=l.useCallback((R,S)=>{let j=v.current.get(R);return j?(d.current=!0,z(j,S)?(h.current=null,!0):(h.current={messageId:R,options:S},!0)):p.current===0?(h.current={messageId:R,options:S},d.current=!0,!0):!1},[z]);return{flushPendingScrollToMessage:l.useCallback(()=>{let R=h.current;if(!R)return!1;let S=v.current.get(R.messageId);return!S||!z(S,R.options)?!1:(h.current=null,d.current=!0,!0)},[z]),reanchorToAnchoredMessage:q,scrollToElement:z,scrollToEnd:ne,scrollToMessage:K,scrollToStart:J}}function Ot(e,t){let n=e,r=new Set;return{getSnapshot:()=>n,hasListeners:()=>r.size>0,setSnapshot:o=>{t(n,o)||(n=o,r.forEach(a=>a()))},subscribe:(o,a,i)=>{let c=r.size===0;return r.add(o),c&&a?.(),()=>{r.delete(o),r.size===0&&i?.()}}}}function Er(e,t){return Ot(e,t)}function Ar(){return Ot($e,Ir)}function kr(e,t){return e.start===t.start&&e.end===t.end}function Ir(e,t){return e.currentAnchorId!==t.currentAnchorId||e.visibleMessageIds.length!==t.visibleMessageIds.length?!1:e.visibleMessageIds.every((n,r)=>n===t.visibleMessageIds[r])}function _r({autoScroll:e,scrollEdgeThreshold:t,scrollMargin:n,scrollPreviousItemPeek:r}){let o=l.useRef(e),a=l.useRef(!1),i=l.useRef(null),c=l.useRef(!1),u=l.useRef(t),d=l.useRef(0),p=l.useRef(null),v=l.useRef(0),g=l.useRef(e?"following-bottom":"free-scrolling"),h=l.useRef(new Map),w=l.useRef(null),A=l.useRef(null),y=l.useRef(null),_=l.useRef(r),k=l.useRef(!0),U=l.useRef(null),F=l.useRef(n),X=l.useRef(null),E=l.useRef(0),M=l.useRef(0),J=l.useRef(null),ne=l.useRef(null),z=l.useRef(null),q=l.useRef(null),K=l.useRef(null),R=l.useRef(null),S=l.useRef(null),j=l.useRef(null),O=l.useRef(new Set),I=l.useRef(new WeakSet);return z.current===null&&(z.current=Er(kt,kr)),j.current===null&&(j.current=Ar()),o.current=e,u.current=t,F.current=n,_.current=r,{autoScrollRef:o,autoscrollingRef:a,autoscrollingTimeoutRef:q,streamingTurnRef:y,contentRef:i,defaultScrollPositionAppliedRef:c,firstItemRef:p,itemCountRef:d,lastScrollTopRef:v,messageElementsRef:h,modeRef:g,pendingScrollFrameRef:X,pendingScrollToMessageRef:w,prependRestoreRef:A,preserveScrollOnPrependRef:k,rootRef:U,scrollEdgeThresholdRef:u,scrollMarginRef:F,scrollPreviousItemPeekRef:_,spacerGapRef:E,spacerHeightRef:M,spacerRef:J,stateFrameRef:ne,stateStore:z.current,viewportRef:K,visibilityFrameRef:R,visibilityObserverRef:S,visibilityStore:j.current,visibleMessageIdsRef:O,handledScrollAnchorsRef:I}}function ft(e,t){return l.useCallback(n=>{e.current=n,n&&t()},[e,t])}function Or({autoScroll:e=!1,defaultScrollPosition:t="end",scrollEdgeThreshold:n=cr,scrollPreviousItemPeek:r=ur,scrollMargin:o=dr}){let a=_r({autoScroll:e,scrollEdgeThreshold:n,scrollMargin:o,scrollPreviousItemPeek:r}),{streamingTurnRef:i,autoScrollRef:c,autoscrollingRef:u,autoscrollingTimeoutRef:d,contentRef:p,defaultScrollPositionAppliedRef:v,firstItemRef:g,itemCountRef:h,lastScrollTopRef:w,messageElementsRef:A,modeRef:y,pendingScrollFrameRef:_,pendingScrollToMessageRef:k,prependRestoreRef:U,preserveScrollOnPrependRef:F,rootRef:X,scrollEdgeThresholdRef:E,scrollMarginRef:M,scrollPreviousItemPeekRef:J,spacerGapRef:ne,spacerHeightRef:z,spacerRef:q,stateFrameRef:K,stateStore:R,viewportRef:S,visibilityFrameRef:j,visibilityObserverRef:O,visibilityStore:I,visibleMessageIdsRef:Z,handledScrollAnchorsRef:G}=a,re=l.useRef(t);re.current!==t&&(re.current=t,v.current=!1);let se=l.useCallback(f=>{let m=X.current,b=S.current,P=[f.start&&"start",f.end&&"end"].filter(Boolean).join(" "),ee=u.current;for(let D of[m,b])D&&(P?D.setAttribute("data-scrollable",P):D.removeAttribute("data-scrollable"),D.toggleAttribute("data-autoscrolling",ee))},[]),ue=l.useCallback(f=>{let m=S.current?.scrollTop??0,b=m<w.current-Le;w.current=m,c.current&&!f.end&&y.current!=="settling-jump"&&y.current!=="anchored-to-message"?y.current="following-bottom":y.current==="following-bottom"&&f.end&&b&&!u.current&&(y.current="free-scrolling")},[]),Y=l.useCallback(()=>{let f=hr({content:p.current,scrollEdgeThreshold:E.current,spacer:q.current,viewport:S.current});ue(f);let m=y.current==="following-bottom"?{...f,end:!1}:f;se(m),R.setSnapshot(m)},[ue,R,se]),le=l.useCallback(()=>{K.current===null&&(K.current=window.requestAnimationFrame(()=>{K.current=null,Y()}))},[Y]),$=l.useCallback(()=>{I.hasListeners()&&j.current===null&&(j.current=window.requestAnimationFrame(()=>{j.current=null,I.hasListeners()&&I.setSnapshot(gr({content:p.current,scrollMargin:M.current,scrollPreviousItemPeek:J.current,spacer:q.current,viewport:S.current,visibleMessageIds:Z.current}))}))},[I]),{flushPendingScrollToMessage:de,reanchorToAnchoredMessage:Ae,scrollToElement:C,scrollToEnd:T,scrollToMessage:V,scrollToStart:W}=Nr({refs:a,commitScrollState:Y,scheduleStateCommit:le,scheduleVisibilitySync:$}),B=l.useCallback(()=>{let f=U.current,m=S.current;if(!f||!m||!f.element.isConnected)return!1;let b=Pe(f.element,m)-f.viewportTop;return Math.abs(b)<=Le?!1:(m.scrollTop+=b,f.viewportTop=Pe(f.element,m),le(),$(),!0)},[le,$]),Q=l.useCallback(()=>{let f=p.current,m=S.current;if(!f||!m){U.current=null;return}let b=Rr({content:f,spacer:q.current,viewport:m});U.current=b?{element:b,viewportTop:Pe(b,m)}:null},[]),H=l.useCallback(()=>{_.current===null&&(_.current=window.requestAnimationFrame(()=>{_.current=null,de()&&Q()}))},[Q,de]),ae=l.useCallback(()=>{if(!t||v.current||h.current===0)return!1;let f=!1;if(t==="last-anchor"){let m=p.current,b=S.current,P=m&&b?yr(je(m,q.current)):null;if(!m||!b||!P)f=T({behavior:"auto"});else{let ee=It(P,b);f=Ze({content:m,spacer:q.current,viewport:b})-ee<=b.clientHeight?T({behavior:"auto"}):C(P,{align:"start"},{keepPreviousPeek:!0})}}else f=t==="end"?T({behavior:"auto"}):W({behavior:"auto"});return f?(v.current=!0,!0):!1},[t,C,T,W]),me=l.useCallback(()=>{let f=p.current;if(!f)return;let m=je(f,q.current),b=h.current,P=g.current;h.current=m.length,g.current=m[0]??null,(()=>{if(de())return;if(b===0){if(ae()||m.length>0&&c.current&&T({behavior:"auto"}))return;Y(),$();return}let ee=P?m.indexOf(P):-1;if(F.current&&ee>0){B();return}if(m.length>b){let D=xr(m,b);if(D){if(c.current&&y.current==="following-bottom"&&vr(m,b)){T({behavior:"auto"});return}C(D,{align:"start"},{keepPreviousPeek:!0}),G.current.add(D);return}}if(m.length===b){let D=br(m,G.current);if(D){C(D,{align:"start"},{keepPreviousPeek:!0}),G.current.add(D);return}}y.current==="following-bottom"&&c.current?T({behavior:"auto"}):(Y(),$())})(),Q()},[ae,Q,Y,de,B,$,C,T]),we=l.useCallback(()=>{if(y.current==="following-bottom"&&c.current){T({behavior:"auto"});return}let f=z.current;if(Ae()){c.current&&f>0&&z.current===0&&T({behavior:"auto"});return}le(),$()},[Ae,le,$,T]),he=l.useCallback(()=>{let f=S.current;if(!(!f||!I.hasListeners())){if(typeof IntersectionObserver>"u"){$();return}O.current||(O.current=new IntersectionObserver(m=>{for(let b of m){let P=b.target.dataset.messageId;P&&(b.isIntersecting?Z.current.add(P):Z.current.delete(P))}$()},{root:f,rootMargin:`${-(M.current+J.current)}px 0px 0px 0px`,threshold:[0,.01,.5,1]})),A.current.forEach(m=>{O.current?.observe(m)}),$()}},[$,I]),ge=l.useCallback(()=>{j.current!==null&&(window.cancelAnimationFrame(j.current),j.current=null),O.current?.disconnect(),O.current=null,Z.current.clear(),I.setSnapshot($e)},[I]),Se=l.useCallback((f,m,b)=>{if(m){A.current.set(f,m),O.current?.observe(m),$(),k.current?.messageId===f&&H();return}b&&A.current.get(f)===b&&(A.current.delete(f),Z.current.delete(f),O.current?.unobserve(b),$())},[H,$]),ke=l.useCallback(()=>{(y.current==="following-bottom"||y.current==="anchored-to-message"||y.current==="settling-jump")&&(i.current=null,y.current="free-scrolling")},[]),fe=l.useCallback(()=>se(R.getSnapshot()),[R,se]),xe=ft(X,fe),pe=ft(S,fe),Ie=l.useCallback(f=>{p.current=f},[]),Te=l.useCallback(f=>{q.current=f,ne.current=Cr(f?.parentElement??null)},[]),_e=l.useCallback(()=>{Y(),$(),Q()},[Q,Y,$]),Oe=l.useMemo(()=>({handleContentChange:me,handleResize:we,observeVisibility:he,preserveScrollOnPrependRef:F,scrollToEnd:T,scrollToMessage:V,scrollToStart:W,setContentElement:Ie,setRootElement:xe,setSpacerElement:Te,setViewportElement:pe,stateStore:R,syncAfterScroll:_e,unobserveVisibility:ge,userScrollIntent:ke,viewportRef:S,visibilityStore:I}),[me,we,he,T,V,W,Ie,xe,Te,pe,R,_e,ge,ke,I]);return l.useLayoutEffect(()=>{ae()},[ae]),l.useEffect(()=>()=>{K.current!==null&&(window.cancelAnimationFrame(K.current),K.current=null),j.current!==null&&(window.cancelAnimationFrame(j.current),j.current=null),d.current!==null&&(window.clearTimeout(d.current),d.current=null),_.current!==null&&(window.cancelAnimationFrame(_.current),_.current=null),O.current?.disconnect(),O.current=null},[]),l.useLayoutEffect(()=>{if(e&&y.current==="following-bottom"&&h.current>0){T({behavior:"auto"});return}Y()},[e,Y,T]),{context:Oe,registerMessage:Se}}function Pr(e){let t=l.useRef(e);return t.current=e,t}var Pt=l.createContext(null),Mt=l.createContext(null);function ye(){let e=l.useContext(Pt);if(!e)throw new Error("useMessageScroller must be used within a MessageScroller.");return e}function Mr(){let e=l.useContext(Mt);if(!e)throw new Error("MessageScrollerItem must be used within a MessageScroller.");return e}function Lt(){let{scrollToEnd:e,scrollToMessage:t,scrollToStart:n}=ye();return l.useMemo(()=>({scrollToEnd:e,scrollToMessage:t,scrollToStart:n}),[e,t,n])}function $t(){let{observeVisibility:e,unobserveVisibility:t,visibilityStore:n}=ye(),r=l.useCallback(o=>n.subscribe(o,e,t),[e,t,n]);return l.useSyncExternalStore(r,n.getSnapshot,n.getSnapshot)}function Lr({autoScroll:e=!1,children:t,defaultScrollPosition:n="end",scrollEdgeThreshold:r,scrollPreviousItemPeek:o,scrollMargin:a}){let{context:i,registerMessage:c}=Or({autoScroll:e,defaultScrollPosition:n,scrollEdgeThreshold:r,scrollPreviousItemPeek:o,scrollMargin:a});return s.jsx(Pt.Provider,{value:i,children:s.jsx(Mt.Provider,{value:c,children:t})})}function $r({children:e,...t}){let{setRootElement:n}=ye();return s.jsx("div",{ref:n,...t,children:e})}function Dr({"aria-label":e,children:t,onKeyDown:n,onScroll:r,onTouchMove:o,onWheel:a,preserveScrollOnPrepend:i=!0,ref:c,role:u,tabIndex:d,...p}){let{handleResize:v,preserveScrollOnPrependRef:g,setViewportElement:h,syncAfterScroll:w,userScrollIntent:A,viewportRef:y}=ye();g.current=i;let _=l.useCallback(E=>{h(E),Ee(c)?.(E)},[c,h]);function k(E){w(),r?.(E)}function U(E){A(),a?.(E)}function F(E){A(),o?.(E)}function X(E){pr.has(E.key)&&A(),n?.(E)}return l.useEffect(()=>{let E=y.current;if(!E||typeof ResizeObserver>"u")return;let M=0,J=new ResizeObserver(()=>{window.cancelAnimationFrame(M),M=window.requestAnimationFrame(v)});return J.observe(E),()=>{window.cancelAnimationFrame(M),J.disconnect()}},[v,y]),s.jsx("div",{ref:_,role:u??"region","aria-label":e??"Messages",tabIndex:d??0,onKeyDown:X,onScroll:k,onTouchMove:F,onWheel:U,...p,children:t})}function Ur({"aria-relevant":e,children:t,ref:n,role:r,spacerClassName:o,...a}){let{handleContentChange:i,handleResize:c,setContentElement:u,setSpacerElement:d}=ye(),p=l.useRef(null),v=l.useCallback(g=>{p.current=g,u(g),Ee(n)?.(g)},[n,u]);return l.useLayoutEffect(()=>{let g=p.current;if(!g||(i(),typeof MutationObserver>"u"))return;let h=new MutationObserver(()=>{i()});return h.observe(g,{childList:!0}),()=>h.disconnect()},[i]),l.useEffect(()=>{let g=p.current;if(!g||typeof ResizeObserver>"u")return;let h=0,w=new ResizeObserver(()=>{window.cancelAnimationFrame(h),h=window.requestAnimationFrame(c)});return w.observe(g),()=>{window.cancelAnimationFrame(h),w.disconnect()}},[c]),s.jsxs("div",{ref:v,role:r??"log","aria-relevant":e??"additions",...a,children:[t,s.jsx("div",{ref:d,"aria-hidden":"true","data-message-scroller-spacer":"",hidden:!0,className:o})]})}function Fr({messageId:e,ref:t,scrollAnchor:n=!1,...r}){let o=Mr(),a=l.useRef(null),i=l.useCallback(c=>{let u=a.current;a.current=c,e&&o(e,c,u),Ee(t)?.(c)},[e,t,o]);return s.jsx("div",{ref:i,"data-message-id":e,"data-scroll-anchor":n?"true":"false",...r})}function Vr({behavior:e="smooth",children:t,direction:n="end",onClick:r,render:o,tabIndex:a,type:i="button",...c}){let{scrollToEnd:u,scrollToStart:d,stateStore:p}=ye(),v=Pr(r),g=l.useCallback(y=>p.subscribe(y),[p]),h=l.useCallback(()=>{let y=p.getSnapshot();return n==="start"?y.start:y.end},[n,p]),w=l.useSyncExternalStore(g,h,h),A=l.useCallback(y=>{w&&(v.current?.(y),y.defaultPrevented||(y.currentTarget.blur(),n==="start"?d({behavior:e}):u({behavior:e})))},[e,n,w,v,u,d]);return sr({defaultTagName:"button",props:ze({type:i,inert:!w,tabIndex:w?a:-1,children:t??s.jsxs("span",{children:["Scroll to ",n]}),onClick:A},c),render:o,state:{active:w,direction:n},stateAttributesMapping:{active:y=>({"data-active":y?"true":"false"})}})}var Re={Provider:Lr,Root:$r,Viewport:Dr,Content:Ur,Item:Fr,Button:Vr};const Br=Re.Provider;function Hr({className:e,...t}){return s.jsx(Re.Root,{className:L("relative flex size-full min-h-0 flex-col overflow-hidden",e),...t})}function zr({className:e,...t}){return s.jsx(Re.Viewport,{className:L("size-full min-h-0 overflow-y-auto overscroll-contain [scrollbar-gutter:stable]",e),...t})}function Wr({className:e,...t}){return s.jsx(Re.Content,{className:L("flex h-max min-h-full flex-col",e),...t})}function Kr({className:e,...t}){return s.jsx(Re.Item,{className:L("min-w-0 shrink-0",e),...t})}function qr({className:e,...t}){return s.jsx(Re.Button,{direction:"end",behavior:"smooth",render:({active:n,...r})=>n?s.jsx(ce,{...r,type:"button",variant:"outline",size:"icon",className:L("absolute right-4 bottom-4 z-20 rounded-full bg-background ",e),"aria-label":"Scroll to latest message",children:s.jsx(nn,{})}):null,...t})}function Gr(e){if(!e)return"";const t=e.startsWith("?")?e.slice(1):e,n=new URLSearchParams(t);return n.get("message_id")?.trim()||n.get("message")?.trim()||""}function Qr(e){const t=e.scrollTarget.trim();return t?e.alreadyScrolledTo===t?{scroll:!1}:e.messageIds.includes(t)?{scroll:!0,id:t}:{scroll:!1}:{scroll:!1}}const Xr="lobu-spa";function pt(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function De(e,t){return t.type==="tool-call"?`tc-${t.toolCallId}`:t.type==="reasoning"?`${e.id}-reasoning`:t.type==="bash"?`${e.id}-bash-${t.command.slice(0,24)}`:t.type==="error"?`${e.id}-error`:`${e.id}-text-${t.text.slice(0,24)}`}const Lo=({afterMessagesContent:e,readOnly:t=!1,readerPositionMode:n="messages",interactionExtension:r,onRunSelect:o})=>{const{messages:a,agentId:i,conversationId:c}=Ne(),{data:u=[]}=rn(i,{conversationId:c});return s.jsx(Mn,{extension:r,children:s.jsxs("div",{"data-agent-thread":!0,className:"flex min-h-0 flex-1 flex-col",children:[s.jsx(Yr,{messages:a,trips:u,mode:n,afterMessagesContent:e,onRunSelect:o}),t?null:s.jsx("div",{className:Sn,children:s.jsx(No,{})})]})})},Yr=({messages:e,trips:t,mode:n,afterMessagesContent:r,onRunSelect:o})=>s.jsx(Br,{autoScroll:!0,defaultScrollPosition:n==="runs"?"last-anchor":"end",scrollPreviousItemPeek:48,children:s.jsx(Zr,{messages:e,trips:t,mode:n,afterMessagesContent:r,onRunSelect:o})});function Jr(e){if(!e.startsWith("sep:"))return null;const t=Number(e.slice(4));return Number.isFinite(t)&&t>0?t:null}const Zr=({messages:e,trips:t,mode:n,afterMessagesContent:r,onRunSelect:o})=>{const{currentAnchorId:a}=$t(),{scrollToMessage:i}=Lt(),c=l.useRef(null);l.useEffect(()=>{if(e.length===0||typeof window>"u")return;const d=Qr({messageIds:e.map(p=>p.id),scrollTarget:Gr(window.location.search),alreadyScrolledTo:c.current});d.scroll&&(c.current=d.id,i(d.id,{align:"start",behavior:"smooth"}))},[e,i]);const u=d=>n==="runs"?d.id.startsWith("sep:"):d.role==="user";return s.jsxs(Hr,{children:[s.jsx(zr,{"aria-label":n==="runs"?"Automation run history":"Conversation",children:s.jsxs(Wr,{className:L(Ge,Tn),children:[e.map(d=>{const p=n==="runs"&&o?Jr(d.id):null;return s.jsx(Kr,{messageId:d.id,scrollAnchor:u(d),"aria-current":d.id===a?"location":void 0,className:L("flex flex-col",n==="runs"&&u(d)&&"border-l-2 border-transparent pl-2 transition-colors",n==="runs"&&d.id===a&&"border-primary"),children:p!=null?s.jsx(ho,{message:d,onClick:()=>o?.(p)}):s.jsx(oo,{message:d})},d.id)}),t.map(d=>s.jsx(to,{trip:d},d.id)),s.jsx(ro,{}),r?s.jsx("div",{className:"mt-auto shrink-0 py-2",children:r}):null]})}),e.length>0?s.jsx(eo,{messages:e,mode:n}):null,s.jsx(qr,{})]})},eo=({messages:e,mode:t})=>{const{scrollToMessage:n}=Lt(),{currentAnchorId:r,visibleMessageIds:o}=$t(),a=t==="runs"?e.flatMap(c=>c.parts).filter(c=>c.type==="tool-call"&&c.toolName==="tool-approval"&&c.args!==null&&typeof c.args=="object"&&c.args.status==="pending").length:0,i=e.flatMap(c=>{if(!(t==="runs"?c.id.startsWith("sep:"):c.role==="user"))return[];const d=c.parts.find(p=>p.type==="text");return[{id:c.id,label:d?.type==="text"?d.text:"Automation run"}]});return i.length===0?null:s.jsxs(cn,{children:[s.jsx(un,{asChild:!0,children:s.jsxs(ce,{type:"button",variant:"outline",size:"icon",className:L("absolute top-1/2 right-4 z-20 -translate-y-1/2 rounded-full bg-background/95 ",a>0&&"w-auto px-3"),"aria-label":a>0?`Open transcript outline, ${a} ${a===1?"approval":"approvals"} waiting`:"Open transcript outline",children:[s.jsx(dn,{}),a>0?s.jsxs("span",{className:"text-xs tabular-nums",children:[a," waiting"]}):null]})}),s.jsxs(fn,{side:"left",align:"center",className:"w-80 space-y-3 p-3",children:[s.jsxs("div",{className:"px-1",children:[s.jsx("p",{className:"text-sm font-medium",children:"Transcript outline"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:t==="runs"?"Track and jump between Automation runs.":"Track and jump between your messages."})]}),s.jsx("div",{className:"max-h-80 space-y-1 overflow-y-auto",children:i.map(c=>{const u=c.id===r,d=o.includes(c.id);return s.jsxs(ce,{type:"button",variant:u?"secondary":"ghost",className:"h-auto w-full justify-start gap-2 px-2 py-2 text-left text-xs font-normal","aria-current":u?"location":void 0,onClick:()=>n(c.id,{align:"start",behavior:"smooth"}),children:[s.jsx("span",{className:L("size-1.5 shrink-0 rounded-full bg-muted-foreground/30",d&&"bg-primary/60",u&&"bg-primary")}),s.jsx("span",{className:"line-clamp-2",children:c.label})]},c.id)})})]})]})},to=({trip:e})=>s.jsxs("div",{className:L(Ge,"flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive"),children:[s.jsx(an,{className:"mt-0.5 size-4 shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"font-medium",children:["Guardrail blocked: ",e.guardrailName," ",s.jsxs("span",{className:"font-normal opacity-70",children:["(",e.stage,")"]})]}),e.reason?s.jsx("div",{className:"mt-0.5 break-words opacity-80",children:e.reason}):null]})]}),no=({prompts:e,onPick:t,className:n})=>e.length===0?null:s.jsx("div",{className:L("flex flex-wrap gap-2",n),children:e.map(r=>s.jsx(ce,{type:"button",variant:"outline",size:"sm",className:"h-auto rounded-full whitespace-normal text-left",title:r.message,"aria-label":`${r.title}: ${r.message}`,onClick:()=>t(r.message),children:r.title},`${r.title}\0${r.message}`))}),ro=()=>{const{currentSuggestions:e,running:t,append:n}=Ne();return t||!e||e.length===0?null:s.jsx(no,{prompts:e,className:Ge,onPick:r=>n(r)})},oo=({message:e})=>e.role==="user"?s.jsx(so,{message:e}):e.role==="system"?s.jsx(go,{message:e}):s.jsx(io,{message:e}),Dt=({attachment:e})=>{const t=e.isImage?e.imageDataUrl??e.url:void 0;if(t)return s.jsx("a",{href:e.url??t,target:"_blank",rel:"noreferrer",children:s.jsx("img",{src:t,alt:e.name,className:"max-h-64 rounded-lg border object-contain"})});const n=s.jsxs(s.Fragment,{children:[s.jsx(He,{className:"h-3 w-3 shrink-0"}),s.jsx("span",{className:"max-w-[14rem] truncate",children:e.name})]});return s.jsx("div",{className:"flex items-center gap-1.5 rounded-md border bg-background px-2 py-1 text-xs",children:e.url?s.jsx("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 hover:underline",children:n}):n})},so=({message:e})=>{const t=e.parts.filter(n=>n.type==="bash");return t.length>0?s.jsx("div",{className:bt,children:s.jsx("div",{className:"space-y-2",children:t.map(n=>s.jsx(lo,{part:n},De(e,n)))})}):s.jsx("div",{className:jn,children:s.jsxs("div",{className:L(Ce,"px-3 py-2 text-sm"),children:[e.attachments&&e.attachments.length>0?s.jsx("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:e.attachments.map(n=>s.jsx(Dt,{attachment:n},n.id))}):null,e.parts.map(n=>n.type==="text"?s.jsx("div",{className:"whitespace-pre-wrap break-words",children:s.jsx(Je,{text:n.text,renderText:r=>r})},De(e,n)):null)]})})},lo=({part:e})=>{const t=e.cancelled||e.exitCode!==void 0&&e.exitCode!==0;return s.jsxs("div",{className:L(Ce,"overflow-hidden text-xs"),children:[s.jsxs("div",{className:"flex items-center gap-1.5 border-border/60 border-b px-3 py-1.5",children:[s.jsx(pn,{className:"size-3.5 shrink-0 text-muted-foreground"}),s.jsx("code",{className:"min-w-0 flex-1 truncate font-mono text-foreground/90",children:e.command}),e.cancelled?s.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 font-medium text-[10px] text-muted-foreground",children:"cancelled"}):t?s.jsxs("span",{className:"rounded bg-destructive/15 px-1.5 py-0.5 font-medium text-[10px] text-destructive",children:["exit ",e.exitCode]}):null]}),e.output.trim()?s.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words px-3 py-2 font-mono text-foreground/80",children:e.output}):null]})},Ut=new Set(["question","link-button","tool-approval"]),ao="subscription-candidate",io=({message:e})=>{const t=Qe(),{agentId:n,workspaceSlug:r}=Ne(),o=u=>u.type==="tool-call"&&(Ut.has(u.toolName)||t?.toolNames.has(u.toolName)),a=e.parts.filter(u=>u.type==="tool-call"&&!o(u)&&u.toolName!==ao),i=e.parts.filter(u=>u.type!=="tool-call"||o(u)),c=e.parts.flatMap(u=>{if(u.type!=="tool-call")return[];const d=Rt(u.result);return d?[d]:[]});return s.jsx("div",{className:bt,children:s.jsxs("div",{className:"space-y-2 text-sm",children:[a.length>0?s.jsx(fo,{tools:a,workspaceSlug:r}):null,n&&r?c.map(u=>s.jsx(co,{candidate:u,agentId:n,workspaceSlug:r},`${u.connector_key}:${u.resource_ref}`)):null,i.map(u=>s.jsx(mo,{part:u},De(e,u))),e.attachments&&e.attachments.length>0?s.jsx("div",{className:"flex flex-wrap gap-2",children:e.attachments.map(u=>s.jsx(Dt,{attachment:u},u.id))}):null]})})},co=({candidate:e,agentId:t,workspaceSlug:n})=>s.jsxs("div",{className:L(Ce,"flex items-center justify-between gap-3 p-3"),children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"truncate text-sm font-medium",children:e.label}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Run this agent when the resource changes."})]}),s.jsx(ce,{asChild:!0,size:"sm",variant:"outline",className:"shrink-0",children:s.jsxs(gt,{to:"/$owner/automations/new",params:{owner:n},search:{agent:t,platform:e.connector_key,resource_type:e.resource_type,resource:e.resource_ref,events:e.suggested_event_keys?.join(","),label:e.label},children:[s.jsx(hn,{className:"mr-1.5 h-4 w-4"}),"Add automation"]})})]});function uo(e){try{return JSON.parse(e)}catch{return null}}function Ft(e){if(Array.isArray(e)){const o=e.flatMap(a=>a?.type==="text"&&typeof a.text=="string"?Ft(a.text)??[]:[]);return o.length>0?[...new Set(o)]:null}const t=typeof e=="string"&&e.trimStart().startsWith("{")?uo(e):e;if(!t||typeof t!="object")return null;const n=t.events_persisted;if(!Array.isArray(n))return null;const r=n.flatMap(o=>{const a=o&&typeof o=="object"?o.id:null;return typeof a=="number"&&Number.isSafeInteger(a)&&a>0?[a]:[]});return r.length>0?r:null}const fo=({tools:e,workspaceSlug:t})=>s.jsxs(Ct,{defaultOpen:!1,children:[s.jsx(Nt,{children:e.length===1?e[0].toolName:`${e.length} tool calls`}),s.jsx(At,{children:e.map(n=>{const r=n.args!==void 0&&n.args!==null,o=n.result!==void 0&&n.result!==null,a=Ft(n.result);return s.jsxs(Et,{icon:mn,label:s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"font-medium",children:n.toolName}),n.isError?s.jsx("span",{className:"rounded bg-destructive/15 px-1.5 py-0.5 font-medium text-[10px] text-destructive",children:"error"}):null]}),status:n.isError?"active":"complete",children:[r?s.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-foreground/80 text-xs",children:Fe(n.args)}):null,o?s.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-foreground/80 text-xs",children:Fe(n.result)}):null,a&&t?s.jsx(or,{ownerSlug:t,eventIds:a}):null]},n.toolCallId)})})]}),po=({text:e})=>{let t=e,n=null;const r=e.match(/\{[\s\S]*\}/);if(r)try{const a=JSON.parse(r[0])?.error?.message;typeof a=="string"&&a.trim()&&(t=a,n=e)}catch{}return s.jsxs("div",{className:"flex gap-2 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2.5 text-sm",children:[s.jsx(xn,{className:"mt-0.5 size-4 shrink-0 text-destructive"}),s.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[s.jsx("p",{className:"text-foreground/80",children:t}),n&&s.jsxs("details",{className:"text-xs text-muted-foreground",children:[s.jsx("summary",{className:"cursor-pointer select-none hover:text-foreground",children:"Technical details"}),s.jsx("pre",{className:"mt-1 overflow-x-auto whitespace-pre-wrap break-all font-mono",children:n})]})]})]})},mo=({part:e})=>{const t=Qe();return e.type==="reasoning"?s.jsx(nr,{}):e.type==="error"?s.jsx(po,{text:e.text}):e.type==="text"?e.text.trim()?s.jsx(Je,{text:e.text,renderText:n=>s.jsx(gn,{text:n})}):null:e.type!=="tool-call"?null:Ut.has(e.toolName)||t?.toolNames.has(e.toolName)?s.jsx(Co,{toolName:e.toolName,args:e.args}):null},ho=({message:e,onClick:t})=>{const n=e.parts.find(r=>r.type==="text");return s.jsx("button",{type:"button",onClick:t,className:L(Ce,"block w-full cursor-pointer whitespace-pre-wrap break-words px-3 py-2 text-left text-xs text-muted-foreground transition-colors hover:bg-muted/50"),children:n?.type==="text"?n.text:"Automation run"})},go=({message:e})=>s.jsx("div",{className:"self-stretch",children:s.jsx("div",{className:L(Ce,"px-3 py-2 text-xs text-muted-foreground"),children:e.parts.map(t=>t.type==="text"?s.jsx("div",{className:"whitespace-pre-wrap break-words",children:s.jsx(Je,{text:t.text,renderText:n=>n})},De(e,t)):null)})}),xo="/mcp-apps/interaction/index.html";function mt(e){return new Promise(t=>{e({onSettled:(n,r)=>t(!!r)})})}const bo=({src:e,title:t,renderPayload:n,onToolCall:r,onOpenLink:o})=>{const a=l.useRef(null),[i,c]=l.useState(48),u=l.useRef({renderPayload:n,onToolCall:r,onOpenLink:o});return u.current={renderPayload:n,onToolCall:r,onOpenLink:o},l.useEffect(()=>{const d=a.current;if(!d?.contentWindow)return;const p=new yn(null,{name:"Lobu",version:"1.0.0"},{openLinks:{},serverTools:{}},{hostContext:{theme:document.documentElement.classList.contains("dark")?"dark":"light",displayMode:"inline",platform:"web"}});p.addEventListener("sizechange",({height:h})=>{typeof h=="number"&&c(Math.max(32,Math.ceil(h)))}),p.oncalltool=async({name:h,arguments:w})=>{const A=await u.current.onToolCall(h,w??{});return{isError:A,content:[{type:"text",text:A?"Action failed.":"Action completed."}]}},p.onopenlink=async({url:h})=>({isError:await u.current.onOpenLink(h)}),p.addEventListener("initialized",()=>{(async()=>(await p.sendToolInput({arguments:{}}),await p.sendToolResult({content:[],structuredContent:{...u.current.renderPayload,version:1,source:Xr}})))()});const v=new Rn(d.contentWindow,d.contentWindow);p.connect(v).catch(h=>{console.error("[mcp-app-host] failed to initialize",h)});const g=new MutationObserver(()=>{p.setHostContext({theme:document.documentElement.classList.contains("dark")?"dark":"light",displayMode:"inline",platform:"web"})});return g.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>{g.disconnect(),v.close()}},[]),s.jsx("iframe",{ref:a,title:t,src:e,sandbox:"allow-scripts",style:{width:"100%",height:i,border:"none",display:"block"}})},vo=new Set(["action"]),yo=["name","description","identity_md"];function oe(e){return e==null||e===""?"":typeof e=="string"?e:Fe(e)}function ht(e){return e===null?"(cleared)":e===void 0?"":typeof e=="string"?e===""?"":e:Fe(e)}function Ue(e){return e.length>0?e[0].toUpperCase()+e.slice(1):e}const Vt=new Set(["delete","disconnect","remove","remove_rule","reset","revoke"]);function Ke(e){return e&&Vt.has(e)?"warning":"default"}function qe(e,t){return e&&Vt.has(e)?{level:"high",reason:t}:{level:"normal"}}function Ro(e,t){const n=e.attribution==="automation"?"An Automation":"An agent",r=Object.keys(t),o=r.map(a=>({label:a,before:oe(e.current?.[a]),after:oe(t[a])}));return{title:`${n} proposes a change`,icon:"entity",impact:{level:"normal"},tone:"default",blocks:o.length>0?[{type:"diff",fields:o}]:[{type:"text",value:"No field changes.",muted:!0}],actions:[{id:"approve",label:"Approve",variant:"primary",icon:"check",tool:"manage_operations",args:{action:"approve"},resolvedLabel:`Approved — ${r.join(", ")} is being applied.`},{id:"reject",label:"Reject",variant:"outline",icon:"x",confirm:!0,confirmPrompt:"Reject this change?",tool:"manage_operations",args:{action:"reject"},resolvedLabel:`Rejected — ${r.join(", ")} was not applied.`}]}}function wo(e){const t=e.action??"change",n=e.proposal?.slug??e.proposal?.name??(e.proposal?.automation_id!=null?String(e.proposal.automation_id):void 0)??e.current?.slug??e.current?.name??"automation",r=[];e.action==="delete"&&r.push({type:"text",value:"This will archive the Automation.",muted:!0});const o=e.proposal??{},a=Object.keys(o).filter(i=>!vo.has(i)&&o[i]!==void 0).map(i=>({label:i,...e.action==="update"&&e.current?.[i]!==void 0?{before:ht(e.current?.[i])}:{},after:ht(o[i])}));return r.push(a.length>0?{type:"diff",fields:a}:{type:"text",value:"No field changes.",muted:!0}),{title:`${Ue(t)} Automation ${n}`,icon:"automation",impact:qe(e.action,"This archives the Automation and stops future runs."),tone:Ke(e.action),blocks:r,actions:[{id:"approve",label:"Approve",variant:"primary",icon:"check",tool:"manage_operations",args:{action:"approve"},resolvedLabel:`Approved — ${t} ${n} is being applied.`},{id:"reject",label:"Reject",variant:"outline",icon:"x",confirm:!0,confirmPrompt:"Reject this change?",tool:"manage_operations",args:{action:"reject"},resolvedLabel:`Rejected — ${t} ${n} was not applied.`}]}}function So(e){if(e.resourceKind==="automation")return wo(e);if(e.fields&&Object.keys(e.fields).length>0)return Ro(e,e.fields);const t=e.resourceKind==="entity"||e.proposal?.entity_id!==void 0||e.current?.entity_type!==void 0||e.proposal?.entity_type!==void 0;if(t&&(e.action==="link"||e.action==="unlink"))return Pn({...e,action:e.action});if(t){const a=e.proposal?.name??e.current?.name??e.proposal?.entity_id??e.current?.id??"entity",i=e.action??"change",c=[];if(e.action==="delete")c.push({type:"text",value:"This will delete the entity.",muted:!0});else{const u=Object.keys(e.proposal??{}).filter(d=>!["entity_id","id"].includes(d)&&e.proposal?.[d]!==void 0&&oe(e.proposal?.[d])!==oe(e.current?.[d])).map(d=>({label:d,...e.action==="update"?{before:oe(e.current?.[d])}:{},after:oe(e.proposal?.[d])}));c.push(u.length>0?{type:"diff",fields:u}:{type:"text",value:"No field changes.",muted:!0})}return{title:`${Ue(i)} entity ${a}`,icon:"entity",impact:qe(e.action,"This deletes the entity."),tone:Ke(e.action),blocks:c,actions:[{id:"approve",label:"Approve",variant:"primary",icon:"check",tool:"manage_operations",args:{action:"approve"},resolvedLabel:`Approved — ${i} ${a} is being applied.`},{id:"reject",label:"Reject",variant:"outline",icon:"x",confirm:!0,confirmPrompt:"Reject this change?",tool:"manage_operations",args:{action:"reject"},resolvedLabel:`Rejected — ${i} ${a} was not applied.`}]}}const n=e.proposal?.agent_id??e.current?.id??"agent",r=e.action??"change",o=[];if(e.action==="delete")o.push({type:"text",value:"This will permanently delete the agent.",muted:!0});else{const a=yo.filter(i=>e.proposal?.[i]!==void 0&&oe(e.proposal?.[i])!==oe(e.current?.[i])).map(i=>({label:i,...e.action==="update"?{before:oe(e.current?.[i])}:{},after:oe(e.proposal?.[i])}));o.push(a.length>0?{type:"diff",fields:a}:{type:"text",value:"No field changes.",muted:!0})}return{title:`${Ue(r)} agent ${n}`,icon:"agent",impact:qe(e.action,"This permanently deletes the agent and its configuration."),tone:Ke(e.action),blocks:o,actions:[{id:"approve",label:"Approve",variant:"primary",icon:"check",tool:"manage_operations",args:{action:"approve"},resolvedLabel:`Approved — ${r} ${n} is being applied.`},{id:"reject",label:"Reject",variant:"outline",icon:"x",confirm:!0,confirmPrompt:"Reject this change?",tool:"manage_operations",args:{action:"reject"},resolvedLabel:`Rejected — ${r} ${n} was not applied.`}]}}function To(e){const t=Array.isArray(e.options)?e.options.filter(o=>typeof o=="string"):[],n=[{type:"text",value:e.question||"The agent has a question."}];t.length===0&&n.push({type:"text",value:"Reply below to answer.",muted:!0});const r=t.map(o=>({id:o,label:o,variant:"outline",tool:"answer_question",args:{answer:o},resolvedLabel:`Answered: ${o}`}));return{title:"Input needed",icon:"question",tone:"default",blocks:n,actions:r}}function jo(e,t){return{tone:"bare",actions:[{id:"open",label:e.label??"Open link",variant:"outline",icon:"external",terminal:!1,href:t}]}}const Co=({toolName:e,args:t})=>{const n=bn(),r=vn(),{append:o}=Ne(),a=Qe(),i=t??{},c=a?.resolve(e,t)??null;let u=c?.view??null;const d={...c?.handlers??{}},p=new Set;if(!c){if(e==="tool-approval"&&typeof i.runId=="number"&&Number.isSafeInteger(i.runId)&&i.runId>0){const v=i.runId,g=typeof i.status=="string"?i.status:"pending",h=g==="pending",w=So(i),A=g==="confirmed"?"Approved":Ue(g);u=h?w:{...w,title:`${w.title??"Approval"} · ${A}`,tone:g==="failed"?"warning":"default",blocks:[...w.blocks??[],{type:"text",value:typeof i.reviewedByName=="string"?`${g==="rejected"?"Rejected":"Approved"} by ${i.reviewedByName}.`:`${A}.`,muted:!0}],actions:(w.actions??[]).filter(y=>y.terminal===!1)},h&&(d.manage_operations=y=>{if(y.action==="approve")return mt(_=>n.mutate({run_id:v},_));if(y.action==="reject"){const _=typeof y.reason=="string"?y.reason:void 0;return mt(k=>r.mutate({run_id:v,..._?{reason:_}:{}},k))}return Promise.resolve(!0)})}else if(e==="question"){const v=Array.isArray(i.options)?i.options.filter(g=>typeof g=="string"):[];u=To(i),d.answer_question=g=>{const h=typeof g.answer=="string"?g.answer:"";return v.includes(h)?(o(h),Promise.resolve(!1)):Promise.resolve(!0)}}else if(e==="link-button"){if(!pt(i.url))return null;const v=i.url;p.add(v),u=jo(i,v)}}return u?s.jsx(bo,{src:xo,title:u.title??"Interaction",renderPayload:u,onToolCall:(v,g)=>d[v]?d[v](g):Promise.resolve(!0),onOpenLink:v=>!p.has(v)||!pt(v)?Promise.resolve(!0):(window.open(v,"_blank","noopener,noreferrer"),Promise.resolve(!1))}):null};function Fe(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}const No=()=>{const{running:e,append:t,cancel:n,pendingAttachments:r,addAttachments:o,removeAttachment:a,initialDraft:i,currentSuggestions:c,executionTarget:u}=Ne(),d=Eo({suggestions:e?null:c}),[p,v]=l.useState(i??""),g=l.useRef(null),h=l.useRef(null),w=kn(_n),A=l.useRef(i??"");l.useEffect(()=>{const k=i??"";if(k===A.current)return;const U=A.current;A.current=k,k!==""&&v(F=>F===""||F===U?k:F)},[i]);const y=l.useRef(p);y.current=p;const _=()=>{e||(t(y.current),v(""),h.current?.clear())};return s.jsxs("div",{className:"rounded-2xl border bg-background transition-colors focus-within:ring-1 focus-within:ring-ring",children:[!u&&r.length>0?s.jsx("div",{className:"flex flex-wrap gap-1.5 px-3 pt-3",children:r.map(k=>s.jsxs("div",{className:"flex items-center gap-1.5 rounded-lg border bg-muted/50 px-2 py-1 text-xs",children:[s.jsx(He,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),s.jsx("span",{className:"max-w-[12rem] truncate",children:k.name}),s.jsx("button",{type:"button",className:"text-muted-foreground transition-colors hover:text-foreground","aria-label":"Remove attachment",onClick:()=>a(k.id),children:s.jsx(on,{className:"h-3 w-3"})})]},k.id))}):null,s.jsx(In,{value:p,onChange:v,onSubmit:_,searchRefs:w,handleRef:h,placeholder:d,className:"max-h-48 overflow-y-auto"}),s.jsxs("div",{className:"flex items-center justify-between px-3 pb-2",children:[u?s.jsx("span",{className:"px-2 text-xs text-muted-foreground",children:"Running on your device"}):s.jsxs(s.Fragment,{children:[s.jsx("input",{ref:g,type:"file",multiple:!0,className:"hidden",onChange:k=>{k.target.files&&o(k.target.files),k.target.value=""}}),s.jsxs(ce,{type:"button",size:"icon",variant:"ghost",className:"h-8 w-8 rounded-full text-muted-foreground hover:text-foreground",onClick:()=>g.current?.click(),children:[s.jsx(He,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Attach files"})]})]}),e?s.jsxs(ce,{type:"button",size:"icon",variant:"secondary",className:"h-8 w-8 rounded-full",onClick:n,children:[s.jsx(sn,{size:"lg"}),s.jsx("span",{className:"sr-only",children:"Cancel"})]}):s.jsxs(ce,{type:"button",size:"icon",className:"h-8 w-8 rounded-full",onClick:_,children:[s.jsx(ln,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Send message"})]})]})]})};function Eo({suggestions:e}){const t=e?.find(n=>n.message.trim().length>0)?.message;return t?`Recommended: ${t.trim()}`:"Chat… (@ to mention, / for commands)"}export{Lo as A,Mo as L,Po as R,Yn as h,qn as s};
6
- //# sourceMappingURL=agent-thread-C8UaUTWc.js.map
@@ -1,2 +0,0 @@
1
- import{j as t,O as o}from"./index-_oPeVpL_.js";const n=()=>t.jsx(o,{});export{n as component};
2
- //# sourceMappingURL=agents-F4mGI2oF.js.map
@@ -1,2 +0,0 @@
1
- import{j as t,gQ as $,gR as N,dv as L,P as x,gS as M,gT as S,m as b,n as I,g as j,t as k,aZ as w,r as O,O as W,gU as P,gV as D,bQ as R,gW as E,gX as F,k as y,eq as U,L as G,an as H}from"./index-_oPeVpL_.js";import{A as Q}from"./agent-editor-form-oUnIYHd7.js";import{P as T}from"./proposal-review-shell-DKKGu4Ww.js";function _({identity:e,sections:n,activeSection:s,activeItem:o,onSectionSelect:r,sectionLabel:c,highlightSection:l=!0,className:g}){const a=o??n.find(i=>i.key===s)??n[0];if(!a)return null;const d=a.icon;return t.jsx("div",{className:x("flex shrink-0 flex-col items-center px-4 lg:px-6",g),children:t.jsxs("div",{className:"flex min-w-0 max-w-full flex-wrap items-center justify-center gap-x-3 gap-y-2",children:[e,t.jsxs($,{children:[t.jsx(N,{asChild:!0,children:t.jsxs("button",{type:"button",className:x("inline-flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1 text-sm transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring",l?"bg-muted font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),"aria-label":c,children:[t.jsx(d,{className:"h-3.5 w-3.5 shrink-0"}),a.label,t.jsx(L,{className:"h-3.5 w-3.5 shrink-0 opacity-60"})]})}),t.jsx(M,{align:"center",className:"min-w-[11rem]",children:n.map(({key:i,label:u,icon:m})=>t.jsxs(S,{className:x(i===s&&"bg-accent font-medium"),onSelect:()=>r(i),children:[t.jsx(m,{className:"h-4 w-4"}),t.jsx("span",{children:u})]},i))})]})]})})}const p=[{key:"skills",label:"Skills",icon:P},{key:"guardrails",label:"Guardrails",icon:D},{key:"permissions",label:"Permissions",icon:R,adminOnly:!0},{key:"models",label:"Models",icon:E},{key:"settings",label:"Settings",icon:F}];function q(e){return p.filter(n=>!n.adminOnly||e)}function z(e,n){if(n===`${e}/conversations`||n.startsWith(`${e}/conversations/`))return null;for(const{key:s}of p)if(n===`${e}/${s}`||n.startsWith(`${e}/${s}/`))return s;return n===`${e}/identity`||n===`${e}/identity/`?"settings":null}function V(e){return e.trim().charAt(0).toUpperCase()||"?"}function X({owner:e,agentId:n,agentName:s,activeDest:o}){const r=b(),{orgContext:c}=y(),{isAdmin:l}=U(c.organizationId),g=q(!!l),a=o??"settings",d=p.find(i=>i.key===a);return t.jsx(_,{identity:t.jsxs(G,{to:"/$owner/agents/$agentId/settings",params:{owner:e,agentId:n},search:{run_id:void 0},className:"flex min-w-0 items-center gap-2 rounded-md outline-none transition-colors hover:opacity-90 focus-visible:ring-2 focus-visible:ring-ring",title:"Agent settings",children:[t.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-semibold text-foreground",children:V(s)}),t.jsx("h1",{className:"min-w-0 truncate text-base font-semibold tracking-tight",children:s})]}),sections:g,activeSection:a,activeItem:d,sectionLabel:"Agent section",highlightSection:o!==null,onSectionSelect:i=>{r({to:`/$owner/agents/$agentId/${i}`,params:{owner:e,agentId:n}})}})}function Y({owner:e,agentId:n}){const s=b(),{pathname:o}=I(),{isAuthenticated:r}=j(),{isMember:c}=k(),l=r&&c,{data:g=[],isLoading:a}=w({enabled:l}),d=g.find(C=>C.agentId===n)??null,i=!d&&!a&&l,u=`/${e}/agents/${n}`,m=`${u}/conversations`,f=o===m||o.startsWith(`${m}/`),h=z(u,o);O.useEffect(()=>{i&&s({to:"/$owner",params:{owner:e},replace:!0})},[i,s,e]);const A=d?.name??"Agent";return t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-hidden py-4 md:py-6",children:[t.jsx(X,{owner:e,agentId:n,agentName:A,activeDest:h}),t.jsx("div",{className:x("flex min-h-0 min-w-0 flex-1 flex-col px-4 lg:px-6",f?"overflow-hidden":"overflow-y-auto"),children:t.jsx(W,{})})]})}function Z({agent:e,tab:n,runId:s}){return t.jsx("div",{className:"mx-auto w-full max-w-3xl pb-6",children:t.jsx(T,{resource:{kind:"agent",agentId:e.agentId},runId:s,children:({reviewMode:o,proposal:r,controlsDisabled:c})=>t.jsx(Q,{mode:{kind:"edit",agent:e},section:n,reviewMode:o,reviewProposal:r,reviewControlsDisabled:c},e.agentId)})})}function ee({owner:e,agentId:n,tab:s,runId:o}){const{orgContext:r,hasOrgContext:c}=y(),{isLoading:l}=H(`/${e}`,r),{isAuthenticated:g}=j(),{isMember:a,isLoading:d}=k(),i=g&&a,{data:u=[],isLoading:m}=w({enabled:i}),v=i?!c||l||m||d:l||d,f=u.find(h=>h.agentId===n)??null;return v||!f?null:t.jsx(Z,{agent:f,tab:s,runId:o})}export{Y as A,ee as a};
2
- //# sourceMappingURL=agents-workbench-CMyk4PI7.js.map
@@ -1,2 +0,0 @@
1
- import{r as c,hX as b,aO as w,az as y,aU as C,aA as u,j as e,aB as k,L as i,h3 as A,hl as j,B as N,h2 as D,i8 as P,hR as v,fL as B,fM as L,fN as R,A as I,dd as M,gD as $,i9 as O,ah as _}from"./index-_oPeVpL_.js";import{C as z}from"./connections-browser-Cnv2iBbZ.js";import"./status-dot-C5KDvvm9.js";import"./connection-label-BobuYiAG.js";function E({ownerSlug:s,appId:a}){const n=c.useMemo(()=>b(s,a,w()),[s,a]),{data:r=[],isLoading:l,isError:d,refetch:g}=y(),[m,x]=c.useMemo(()=>{const t=n?.devicePlatforms;if(!t?.length)return[[],[]];const p=r.filter(o=>{const f=C(o);return f!=null&&t.includes(f)});return[p.filter(o=>u(o,s)),p.filter(o=>!u(o,s))]},[n,r,s]);if(!n)return e.jsxs(k,{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"There is no app by that name."}),e.jsx(i,{to:"/$owner/connectors",params:{owner:s},search:{},className:"text-sm text-primary hover:underline",children:"Back to connectors"})]});const h=(n.devicePlatforms?.length??0)>0;return e.jsx("div",{className:"flex flex-1 flex-col",children:e.jsxs(A,{header:e.jsx(B,{breadcrumb:e.jsx(L,{crumbs:[e.jsx(i,{to:"/$owner/connectors",params:{owner:s},search:{},className:R,children:"Connectors"},"connectors")]}),icon:e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border text-muted-foreground",children:n.icon}),title:n.name,caption:n.description}),children:[e.jsx("div",{id:"setup",className:"scroll-mt-40",children:e.jsx(j,{title:m.length>0?a==="owletto-chrome"?"Connect another profile":"Connect another device":"Set up",children:e.jsx("div",{className:"space-y-3",children:n.steps.map(t=>e.jsx(T,{step:t},t.label))})})}),h?e.jsx(z,{entries:m.map(t=>({id:t.id,name:v(t),description:P(t,s),tone:t.online?null:"muted",link:D({to:"/$owner/connectors/device/$deviceId",params:{owner:s,deviceId:t.id}})})),isLoading:l,isError:d,onRetry:()=>void g(),action:e.jsx(N,{asChild:!0,variant:"outline",size:"sm",children:e.jsx("a",{href:"#setup",children:"Add connection"})})}):null,h&&!l&&!d&&x.length>0?e.jsxs(j,{title:"Your devices in other workspaces",children:[e.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Open a device to connect its capabilities here. Moving it is confirmed first and pauses its connections where it is now."}),e.jsx("ul",{className:"divide-y border-y",children:x.map(t=>e.jsx("li",{children:e.jsxs(i,{to:"/$owner/connectors/device/$deviceId",params:{owner:s,deviceId:t.id},className:"flex items-center justify-between gap-3 py-2.5 text-sm hover:text-primary",children:[e.jsx("span",{className:"font-medium",children:v(t)}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["Attached to"," ",t.organization_name??"another workspace"]})]})},t.id))})]}):null]})})}function T({step:s}){const[a,n]=c.useState(!1);if(s.href)return e.jsxs("a",{href:s.href,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs font-medium text-primary hover:bg-accent/50",children:[s.label,e.jsx(I,{className:"h-3 w-3"})]});const r=s.command??"";return e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:s.label}),e.jsxs("div",{className:"flex items-start gap-2 rounded-lg border bg-muted/40 p-2.5",children:[e.jsx("pre",{className:"min-w-0 flex-1 overflow-x-auto font-mono text-xs leading-relaxed",children:r}),e.jsxs(N,{variant:"ghost",size:"sm",className:"h-6 shrink-0 px-1.5 text-xs",onClick:()=>{typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(r).then(()=>{n(!0),setTimeout(()=>n(!1),1500)})},children:[a?e.jsx(M,{className:"h-3.5 w-3.5"}):e.jsx($,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"sr-only",children:"Copy"})]})]})]})}function K(){const{owner:s,appId:a}=O.useParams();return e.jsx(_,{owner:s,children:({ownerSlug:n})=>e.jsx(E,{ownerSlug:n,appId:a})})}export{K as component};
2
- //# sourceMappingURL=app._appId-DH1Qutz6.js.map
@@ -1,2 +0,0 @@
1
- import{r as f,j as e,S as p,dG as y,k as A,an as _,g as b,t as C,u as k,gH as S}from"./index-_oPeVpL_.js";import{C as P,A as D}from"./create-automation-form-_4vUkrls.js";import{P as E}from"./proposal-review-shell-DKKGu4Ww.js";import{J as j}from"./json-diff-D_Ym3Uku.js";import{u as R,a as w}from"./deployments-DCQdFdwG.js";import{E as F}from"./events-feed-fucGZSJR.js";const L=20;function N({automationId:a}){const t=R({resourceKind:"automation",resourceId:a}),[d,c]=f.useState(null),s=w(d!=null?String(d):null),o=(t.data?.pages.length??0)>=L&&!!t.hasNextPage,r=!!t.isFetchNextPageError;f.useEffect(()=>{!o&&t.hasNextPage&&!t.isFetchingNextPage&&!t.isError&&!r&&t.fetchNextPage()},[o,t.fetchNextPage,t.hasNextPage,t.isFetchingNextPage,t.isError,r]);const l=f.useMemo(()=>(t.data?.pages??[]).flatMap(x=>x.items).filter(x=>x.type==="change"&&x.resourceKind==="automation"&&x.resourceId===String(a)),[t.data,a]),i=!!t.hasNextPage&&!o,m=typeof t.refetch=="function",h=typeof t.fetchNextPage=="function";return t.isLoading?e.jsx(p,{className:"h-20 w-full rounded-lg"}):t.isError&&!r?e.jsxs("section",{className:"space-y-2","aria-label":"Automation definition history","data-testid":"automation-definition-history",children:[e.jsx("h3",{className:"font-medium text-sm",children:"Definition history"}),e.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"automation-definition-history-error",children:"Definition history unavailable."}),m?e.jsx("button",{type:"button",className:"text-sm underline","data-testid":"automation-definition-history-retry",onClick:()=>void t.refetch(),children:"Retry"}):null]}):e.jsxs("section",{className:"space-y-2","aria-label":"Automation definition history","data-testid":"automation-definition-history",children:[e.jsx("h3",{className:"font-medium text-sm",children:"Definition history"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Runtime and delivery configuration changes with actor and before/after. Content versions (prompt, sources) are listed separately."}),l.length===0&&!i?e.jsx("p",{className:"py-4 text-sm text-muted-foreground","data-testid":"automation-definition-history-empty",children:"No definition changes recorded yet."}):e.jsx("ul",{className:"space-y-1","data-testid":"automation-definition-history-list",children:l.map(n=>{if(n.type!=="change")return null;const g=n.createdBy??n.agentId??n.actorSource??"unknown";return e.jsx("li",{children:e.jsxs("button",{type:"button",className:"flex w-full flex-wrap items-center justify-between gap-2 rounded-lg border border-border/60 px-3 py-2 text-left text-sm hover:bg-muted/50",onClick:()=>c(x=>x===n.id?null:n.id),"data-testid":`automation-definition-history-item-${n.id}`,children:[e.jsx("span",{className:"font-medium",children:n.action??n.op??"change"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:(n.changedFields??[]).join(", ")}),e.jsx("span",{className:"text-xs text-muted-foreground",children:g}),e.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(n.createdAt).toLocaleString()})]})},n.id)})}),i?e.jsx("p",{className:"text-xs text-muted-foreground","data-testid":"automation-definition-history-loading-more",children:"Loading more history…"}):null,o?e.jsx("p",{className:"text-xs text-muted-foreground","data-testid":"automation-definition-history-capped",children:"Showing recent definition changes"}):null,r?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground","data-testid":"automation-definition-history-page-error",children:"Couldn't load more history."}),h?e.jsx("button",{type:"button",className:"text-xs underline","data-testid":"automation-definition-history-retry-next",onClick:()=>void t.fetchNextPage(),children:"Retry"}):null]}):null,d!=null?e.jsx("div",{"data-testid":"automation-definition-history-detail",children:s.isLoading?e.jsx(p,{className:"h-24 w-full rounded-lg"}):s.isError?e.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"automation-definition-history-detail-error",children:"Change detail unavailable."}):s.data?e.jsx(j,{before:s.data.before,after:s.data.after}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"Change detail unavailable."})}):null]})}function v(a){const{orgContext:t,hasOrgContext:d}=A(),{data:c,isLoading:s}=_(`/${a}`,t),{isAuthenticated:u}=b(),{isMember:o,isLoading:r}=C(),l=u&&o,i=c?.workspace,m=l?!d||s||r:s||r;return{organizationId:i?.id??"",isLoading:m}}function K(a){return v(a)}function O({owner:a,automationId:t,organizationId:d}){const c=Number(t),s=f.useMemo(()=>({producedByAutomationId:c}),[c]),u=k(),o=y(t,void 0,d),r=o.data?.automation?.automation_name?.trim()||null,l=o.data?.automation?.managed_agent_id??null,{data:i}=S(l,t,{orgSlug:a}),m=f.useMemo(()=>(i?.runs??[]).map(n=>({runId:n.runId,status:n.status,completedAt:n.completedAt})),[i]),h=f.useCallback(n=>{u?.open({href:`/${a}/automations/${t}?run_id=${n}`,title:r!=null?`${r} · Run #${n}`:`Automation run #${n}`,runId:n})},[u,a,t,r]);return Number.isFinite(c)?e.jsx(F,{organizationId:d,ownerSlug:a,filters:s,groupByRun:!0,onRunSelect:h,runs:m,hideRunAction:!0,hideAttribution:!0,emptyState:e.jsx("p",{className:"py-6 text-sm text-muted-foreground",children:"This Automation hasn't written anything yet. Runs appear here with the events they created; clicking a run opens its conversation."})}):null}function T({agentId:a,automationId:t,runId:d,organizationId:c,onDone:s}){const[u,o]=f.useState({ready:!1,triggers:[]}),r=f.useCallback(n=>{o(g=>JSON.stringify(g)===JSON.stringify(n)?g:n)},[]),l=y(t,void 0,c,{includeVersions:!0}),i=l.data?.automation,m=e.jsx("div",{className:"flex flex-col gap-4",children:[0,1,2].map(n=>e.jsx(p,{className:"h-16 w-full rounded-lg"},n))}),h=l.isLoading?m:i?e.jsx(P,{organizationId:c,prefillAgentId:a??void 0,editingAutomation:{automation_id:i.automation_id,name:i.automation_name,slug:i.slug,description:i.description,prompt:i.prompt,sources:i.sources,reaction_script:i.reaction_script,managed_agent_id:i.managed_agent_id,device_worker_id:i.device_worker_id,agent_kind:i.agent_kind,delivery_target:i.delivery_target??void 0,execution_config:i.execution_config??void 0,keying_config:i.keying_config,reactions_guidance:i.reactions_guidance,triggers:i.triggers},createFields:{triggers:u.triggers},triggerFields:e.jsx(D,{organizationId:c,initialTriggers:i.triggers??[],onChange:r},JSON.stringify(i.triggers??[])),hideHeader:!0,hideCancel:!0,submitDisabled:!u.ready,onClose:s,onSuccess:s}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"Automation not found. It may have been removed."});return a?e.jsxs("div",{className:"space-y-6",children:[e.jsx(E,{resource:{kind:"automation",agentId:a,automationId:t},runId:d,onDone:s,children:({reviewMode:n,proposal:g})=>n==="active"?e.jsx(j,{before:g?.current??null,after:{...g?.current??{},...g?.proposedAfter??{}}}):n==="loading"?m:n==="error"?null:h}),e.jsx(N,{automationId:t})]}):e.jsxs("div",{className:"space-y-6",children:[h,e.jsx(N,{automationId:t})]})}function V({owner:a,agentId:t,automationId:d,view:c,runId:s,onDone:u}){const{organizationId:o}=v(a),r=y(d,void 0,o),l=t??r.data?.automation?.managed_agent_id??null;return s||c==="definition"?e.jsx(T,{agentId:l,automationId:d,runId:s,organizationId:o,onDone:u}):e.jsx(O,{owner:a,automationId:d,organizationId:o})}export{V as A,K as u};
2
- //# sourceMappingURL=automation-detail-content-CEDNboId.js.map
@@ -1,2 +0,0 @@
1
- import{j as t,O as o}from"./index-_oPeVpL_.js";const n=()=>t.jsx(o,{});export{n as component};
2
- //# sourceMappingURL=automations-F4mGI2oF.js.map
@@ -1,2 +0,0 @@
1
- import{m as a,g as i,r as n,j as t}from"./index-_oPeVpL_.js";function r(){const s=a(),{isReady:e}=i();return n.useEffect(()=>{e&&setTimeout(()=>{s({to:"/"})},500)},[e,s]),t.jsx("div",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center",children:t.jsx("div",{className:"text-center",children:t.jsx("p",{className:"text-muted-foreground",children:e?"Redirecting...":"Completing sign in..."})})})}export{r as component};
2
- //# sourceMappingURL=callback-CU-hb8JB.js.map
@@ -1,2 +0,0 @@
1
- function o(n){const t=new Map;for(const e of n){if(e.kind!=="mcp")continue;const i=e.title?.trim()||e.identifier||"Unknown app",l=e.registrationGroupKey||e.id,s=t.get(l);if(!s){t.set(l,{key:l,clientId:e.id,title:i,drivenBy:e.drivenBy?.trim()||null,clientIds:[e.id],connected:e.status==="connected",lastSeenAt:e.lastSeenAt??null,linkedUser:e.linkedUserName??e.linkedUserEmail??null,linkedUserEntitySlug:e.linkedUserEntitySlug??null});continue}s.clientIds.push(e.id),s.connected=s.connected||e.status==="connected",(e.lastSeenAt??0)>(s.lastSeenAt??0)&&(s.lastSeenAt=e.lastSeenAt??null,s.drivenBy=e.drivenBy?.trim()||null)}return[...t.values()].sort((e,i)=>(i.lastSeenAt??0)-(e.lastSeenAt??0))}function r(n){if(!n)return"never";const t=Date.now()-n;if(t<6e4)return"just now";const e=Math.floor(t/6e4);if(e<60)return`${e}m ago`;const i=Math.floor(e/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function c(n){const t=[n.linkedUser];return t.push(n.connected?`active ${r(n.lastSeenAt)}`:"disconnected"),n.drivenBy&&n.drivenBy!==n.title&&t.push(`via ${n.drivenBy}`),t.filter(Boolean).join(" · ")}export{c,o as g,r};
2
- //# sourceMappingURL=client-rows-EJSKR6z1.js.map
@@ -1,2 +0,0 @@
1
- import{j as t,O as o}from"./index-_oPeVpL_.js";const n=()=>t.jsx(o,{});export{n as component};
2
- //# sourceMappingURL=connect-B2YL6qIK.js.map
@@ -1,2 +0,0 @@
1
- import{ij as r,j as t,ah as a}from"./index-_oPeVpL_.js";import{a as s}from"./agent-connect-pages-B6uKvT_X.js";import"./agent-client-setup-list-B2SvH7xD.js";import"./clients-CpG676mg.js";import"./client-rows-EJSKR6z1.js";function u(){const{owner:e,clientId:o}=r.useParams();return t.jsx(a,{owner:e,children:({ownerSlug:n})=>t.jsx(s,{owner:n,clientId:o})})}export{u as component};
2
- //# sourceMappingURL=connect._clientId-B6LDmDRV.js.map
@@ -1,2 +0,0 @@
1
- import{j as t,O as n}from"./index-_oPeVpL_.js";function e(){return t.jsx(n,{})}export{e as component};
2
- //# sourceMappingURL=connected._clientId-D_HaKoI1.js.map
@@ -1,2 +0,0 @@
1
- import{j as e,ah as w,r as N,cO as y,h3 as p,fL as x,fM as h,L as r,fN as o,w as _,bi as j,aQ as L,cY as A,B as $,A as E,iy as f}from"./index-_oPeVpL_.js";import{c as k}from"./conversations-table-DfZGICl7.js";import{E as B}from"./events-feed-fucGZSJR.js";import{u as P}from"./clients-CpG676mg.js";import{g as S}from"./client-rows-EJSKR6z1.js";import"./renderer-BL6VcwQH.js";import"./card-DIF8SF9b.js";const D="flex min-h-0 flex-1 flex-col gap-3 px-4 pt-4 pb-8 lg:px-6";function O({owner:s,clientId:a,mcpActivityId:t}){return e.jsx("div",{className:D,children:e.jsx(w,{owner:s,children:({organizationId:n,ownerSlug:l})=>e.jsx(R,{ownerSlug:l,organizationId:n,clientId:a,mcpActivityId:t})})})}function R({ownerSlug:s,organizationId:a,clientId:t,mcpActivityId:n}){const{data:l=[],isLoading:g}=P(null),i=N.useMemo(()=>S(l).find(u=>u.clientIds.includes(t)),[t,l]),d=i?.clientIds??[],{data:v=[],isLoading:C}=y({enabled:!!i&&!!a,limit:100,clientIds:d,organizationId:a}),c=n?v.find(u=>u.activityId===n)??null:null,m=i?.title??"Connected agent",b=c?k(c):"Conversation";return!a||g||n&&C?e.jsx(p,{header:e.jsx(x,{breadcrumb:e.jsx(h,{crumbs:[e.jsx(r,{to:"/$owner/agents",params:{owner:s},className:o,children:"Agents"},"agents")]}),title:"Conversation"}),children:e.jsx("p",{className:"py-3 text-xs text-muted-foreground",children:"Loading…"})}):n&&(!i||!c||c.organizationId===null)?e.jsx(_,{to:"/$owner/events",params:{owner:"me"},search:{client_ids:i?d.join(","):t,mcp_activity_id:n},replace:!0}):i?n?e.jsx(p,{header:e.jsx(x,{breadcrumb:e.jsx(h,{crumbs:[e.jsx(r,{to:"/$owner/agents",params:{owner:s},className:o,children:"Agents"},"agents"),e.jsx(r,{to:"/$owner/agents/connected/$clientId",params:{owner:s,clientId:t},className:o,children:m},"app")]}),icon:e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(j,{name:c?.clientName??m})}),title:b,meta:e.jsx($,{variant:"outline",size:"sm",asChild:!0,children:e.jsxs(r,{to:"/$owner/events",params:{owner:s},search:{client_ids:d.join(","),mcp_activity_id:n},children:["See in Activity",e.jsx(E,{className:"h-3.5 w-3.5"})]})})}),children:e.jsx(B,{organizationId:a,ownerSlug:s,filters:{clientIds:d,mcpActivityId:n,sortBy:"date",sortOrder:"desc"},hideOriginator:!0,foldConsecutiveCalls:!0,emptyState:e.jsx(L,{icon:A,title:"No activity in this conversation yet",description:"Calls this app makes will appear here."})})}):e.jsx(p,{header:e.jsx(x,{breadcrumb:e.jsx(h,{crumbs:[e.jsx(r,{to:"/$owner/agents",params:{owner:s},className:o,children:"Agents"},"agents"),e.jsx(r,{to:"/$owner/agents/connected/$clientId",params:{owner:s,clientId:t},className:o,children:m},"app")]}),icon:e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(j,{name:m})}),title:"Conversation"}),children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a conversation on this app's page to see its activity."})}):e.jsx(p,{header:e.jsx(x,{breadcrumb:e.jsx(h,{crumbs:[e.jsx(r,{to:"/$owner/agents",params:{owner:s},className:o,children:"Agents"},"agents")]}),title:"Conversation"}),children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"This app isn't connected to this workspace, so its activity isn't available."})})}function Q(){const{owner:s,clientId:a}=f.useParams(),t=f.useSearch();return e.jsx(O,{owner:s,clientId:a,mcpActivityId:typeof t.mcp_activity_id=="string"?t.mcp_activity_id:null})}export{Q as component};
2
- //# sourceMappingURL=connected._clientId.activity-DQWcUqKM.js.map
@@ -1,2 +0,0 @@
1
- import{k as z,eq as E,r as c,cO as N,j as e,S as C,cf as P,L as I,hl as p,B as v,a1 as U,h3 as B,fL as D,bi as M,fM as _,fN as T,ir as G,ah as K}from"./index-_oPeVpL_.js";import{C as k}from"./conversations-table-DfZGICl7.js";import{u as S,a as O}from"./clients-CpG676mg.js";import{g as L,r as $}from"./client-rows-EJSKR6z1.js";function Q({ownerSlug:n,clientId:i}){const{orgContext:a}=z(),{isAdmin:f}=E(a.organizationId),{data:l=[],isLoading:d}=S(null),r=O(),[w,u]=c.useState(!1),s=c.useMemo(()=>L(l),[l]).find(t=>t.clientIds.includes(i)),j=s?.clientIds??[],m=N({enabled:!!s,limit:100,clientIds:j,activityKind:"conversation",organizationId:a?.organizationId??null}),x=N({enabled:!!s,limit:100,clientIds:j,activityKind:"session",organizationId:a?.organizationId??null,refetchInterval:t=>t?5e3:!1}),o=m.data??[],g=x.data??[],A=c.useMemo(()=>l.filter(t=>s?.clientIds.includes(t.id)),[l,s]);if(d)return e.jsxs("div",{className:"space-y-4",children:[e.jsx(C,{className:"h-16 w-full rounded-lg"}),e.jsx(C,{className:"h-24 w-full rounded-lg"})]});if(!s)return e.jsx("p",{className:"text-sm text-muted-foreground",children:"This app isn't connected to this workspace, so its details aren't available."});const h=A[0],b=h?.details?.redirectUris??[],y=s.linkedUserEntitySlug?P(n,[{entity_type:"$member",slug:s.linkedUserEntitySlug}]):null,R=[{label:"Registered",value:s.title},{label:s.clientIds.length===1?"Client ID":"Client IDs",value:e.jsx("div",{className:"space-y-1",children:s.clientIds.map(t=>e.jsx("code",{className:"block break-all",children:t},t))})},...s.drivenBy&&s.drivenBy!==s.title?[{label:"Driven by",value:s.drivenBy}]:[],...h?.platform?[{label:"Software",value:h.platform}]:[],...b.length>0?[{label:"Redirects",value:b.join(", ")}]:[],{label:"Granted by",value:y&&s.linkedUser?e.jsx(I,{to:y,className:"font-medium text-primary hover:underline",children:s.linkedUser}):s.linkedUser??"—"},{label:"Last active",value:s.connected?$(s.lastSeenAt):"disconnected"},{label:"Registrations",value:String(s.clientIds.length)}];return e.jsxs("div",{className:"space-y-7",children:[e.jsx(p,{title:"Settings",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"overflow-hidden rounded-lg border text-xs",children:e.jsx("dl",{className:"divide-y",children:R.map(t=>e.jsxs("div",{className:"flex gap-3 px-3 py-2",children:[e.jsx("dt",{className:"w-28 shrink-0 text-muted-foreground",children:t.label}),e.jsx("dd",{className:"min-w-0 flex-1 break-words",children:t.value})]},t.label))})}),f&&s.connected?e.jsxs("div",{className:"space-y-2 rounded-lg border p-3",children:[e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Revoking disconnects every registration this app holds",s.clientIds.length>1?` (${s.clientIds.length} of them)`:""," ","and kills its live sessions. It can reconnect by authorizing again."]}),w?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(v,{variant:"destructive",size:"sm",className:"h-7 px-2 text-xs",disabled:r.isPending,onClick:()=>r.mutate({clientId:s.clientIds[0],scope:"all"},{onSettled:()=>u(!1)}),children:r.isPending?"Revoking…":"Confirm revoke"}),e.jsx(v,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs",disabled:r.isPending,onClick:()=>u(!1),children:"Cancel"})]}):e.jsx(v,{variant:"outline",size:"sm",className:"h-7 px-2 text-xs text-destructive hover:text-destructive",onClick:()=>u(!0),children:"Revoke"})]}):null]})}),e.jsx(p,{title:"Conversations",count:o.length>0?String(o.length):void 0,children:m.isLoading||x.isLoading?e.jsxs("div",{className:"flex items-center py-4 text-xs text-muted-foreground",children:[e.jsx(U,{className:"mr-2"})," Loading client activity…"]}):m.isError||x.isError?e.jsx("p",{className:"py-3 text-xs text-destructive",children:"Could not load this app's activity."}):o.length===0?e.jsx("p",{className:"py-3 text-xs text-muted-foreground",children:"No recent conversations."}):e.jsx(k,{scopes:o,ownerSlug:n})}),g.length>0?e.jsx(p,{title:"Sessions",count:String(g.length),children:e.jsx(k,{scopes:g,ownerSlug:n})}):null]})}const q="flex min-h-0 flex-1 flex-col gap-3 px-4 pt-4 pb-8 lg:px-6";function H({owner:n,clientId:i}){const{data:a=[]}=S(null),l=c.useMemo(()=>L(a).find(d=>d.clientIds.includes(i)),[i,a])?.title??"Connected agent";return e.jsx("div",{className:q,children:e.jsx(B,{header:e.jsx(D,{breadcrumb:e.jsx(_,{crumbs:[e.jsx(I,{to:"/$owner/agents",params:{owner:n},className:T,children:"Agents"},"agents")]}),icon:e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(M,{name:l})}),title:l,caption:"An external agent connected to this workspace through Lobu. Review its Lobu conversations, activity, and access."}),children:e.jsx(Q,{ownerSlug:n,clientId:i},i)})})}function Y(){const{owner:n,clientId:i}=G.useParams();return e.jsx(K,{owner:n,children:({ownerSlug:a})=>e.jsx(H,{owner:a,clientId:i})})}export{Y as component};
2
- //# sourceMappingURL=connected._clientId.index-BC3R303A.js.map
@@ -1,2 +0,0 @@
1
- import{hB as h,h2 as g,j as e,B as u,L as m,cy as j,hl as p,r as f,hH as v,dj as N}from"./index-_oPeVpL_.js";import{S as w}from"./status-dot-C5KDvvm9.js";import{c as b}from"./connection-label-BobuYiAG.js";function C(n){return e.jsx(p,{title:"Connections",count:n.isLoading||n.isError?void 0:String(n.entries.length),children:e.jsx(x,{...n})})}function x({entries:n,action:r,isLoading:i,isError:o,onRetry:c}){const[a,d]=f.useState("");if(i)return e.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading connections…"});if(o)return e.jsxs("div",{role:"alert",className:"space-y-2",children:[e.jsx("p",{children:"Could not load connections."}),c&&e.jsx(u,{variant:"outline",size:"sm",onClick:c,children:"Retry"})]});const s=n.filter(t=>`${t.name} ${t.description??""}`.toLowerCase().includes(a.trim().toLowerCase())).sort((t,l)=>+!!l.needsAttention-+!!t.needsAttention);return e.jsxs("div",{className:"space-y-4",children:[e.jsx(v,{label:"connections",query:a,onQueryChange:d,count:s.length,action:r}),e.jsx("ul",{className:s.length>0?"overflow-hidden rounded-lg border divide-y":void 0,children:s.map(t=>e.jsx("li",{children:e.jsxs(m,{...t.link,className:"flex items-center justify-between gap-3 px-3 py-2.5 transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:[e.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-2",children:[e.jsx(w,{tone:t.tone}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block truncate text-sm font-medium",children:t.name}),t.description&&e.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:t.description})]})]}),e.jsxs("span",{className:"flex min-w-0 max-w-1/2 shrink-0 items-center gap-2",children:[t.status&&e.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:t.status}),e.jsx(N,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted-foreground"})]})]})},t.id))}),s.length===0&&e.jsx("p",{className:"py-5 text-sm text-muted-foreground",children:a.trim()?"No matches. Try another search.":"No connections yet."})]})}function y({connections:n,connector:r,connectorKey:i,ownerSlug:o,section:c=!1}){const a=n.filter(s=>s.connector_key===i).map(s=>{const t=!!r&&h(r)&&!s.device_worker_id,l=["error","revoked","pending_auth"].includes(s.status);return{id:String(s.id),name:b({...s,connector_name:s.connector_name??r?.name??null}),needsAttention:l||t,tone:s.status==="error"||s.status==="revoked"?"destructive":t||s.status!=="active"?"amber":null,status:t?"Needs a device":l?s.error_message?.trim()||(s.status==="pending_auth"?"needs reconnect":s.status):void 0,link:g({to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:o,connectorKey:i,connectionId:String(s.id)},search:{}})}}),d=c?C:x;return e.jsx(d,{entries:a,action:e.jsx(u,{asChild:!0,size:"sm",variant:"outline",children:e.jsxs(m,{to:"/$owner/connectors/create/$connectorKey",params:{owner:o,connectorKey:i},children:[e.jsx(j,{className:"size-3.5"}),"Add connection"]})})})}export{C,y as a};
2
- //# sourceMappingURL=connections-browser-Cnv2iBbZ.js.map
@@ -1,2 +0,0 @@
1
- import{ct as y,j as t,S as f,B as p,aQ as v,cw as j,L as _,cy as N,bc as $,u as b,hz as w}from"./index-_oPeVpL_.js";import{S as k}from"./status-dot-C5KDvvm9.js";function g(e){switch(e.attention){case"needs_auth":return"Needs authentication";case"setup_required":return e.attention_reason?.trim()||"Setup required";case"paused":return"Paused";case"misconfigured":return"Configuration error";case"device_offline":return`Waiting for ${e.device_label||e.device_platform||"device"}`;case"last_attempt_failed":{const r=Number(e.consecutive_failures??0);return e.last_error?.trim()||(r>0?`${r} consecutive sync ${r===1?"failure":"failures"}`:"Last sync failed")}case"overdue":return"Scheduled run overdue";case"no_trigger":return"No schedule — this feed only runs when you sync it";case"never_run":return e.execution_mode==="scheduled"?"Scheduled, not run yet":"Not synced yet";default:return null}}function C(e){switch(e.attention){case"last_attempt_failed":case"misconfigured":return"destructive";case"needs_auth":case"setup_required":case"device_offline":case"overdue":case"no_trigger":case"never_run":return e.attention==="never_run"&&e.execution_mode!=="scheduled"?"muted":"amber";case"paused":return"muted";default:return e.status==="active"?null:e.status==="error"?"destructive":"muted"}}function S(e){return Object.keys(e?.feeds_schema??{}).length>0}function F({connection:e,ownerSlug:r,connectorKey:u,connectorDef:h}){const{data:i=[],isLoading:l,isError:m,refetch:a}=y(e.id),d=S(h),c=e.facets?.chat??!1,o={owner:r,connectorKey:u,connectionId:String(e.id)};return l?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(f,{className:"h-12 w-full rounded-lg"}),t.jsx(f,{className:"h-12 w-full rounded-lg"})]}):m?t.jsxs("div",{role:"alert",className:"space-y-2",children:[t.jsx("p",{children:"Could not load feeds."}),t.jsx(p,{variant:"outline",size:"sm",onClick:()=>void a(),children:"Retry"})]}):i.length===0?t.jsx(v,{icon:j,title:c?"No channels":"No feeds",description:d?c?"Bind a channel to route conversations to this connection.":"Add a feed to start collecting data from this connection.":c?"This chat connection has no bound channels yet.":"This connector doesn't provide any feeds.",children:d?t.jsx(p,{asChild:!0,size:"sm",children:t.jsxs(_,{to:"/$owner/connectors/$connectorKey/$connectionId",params:o,search:{addFeed:!0},children:[t.jsx(N,{className:"h-3.5 w-3.5"}),c?"Add channel":"Add feed"]})}):null}):t.jsx("ul",{className:"flex flex-col gap-2",children:i.map(n=>{const s=n.display_name?.trim()||n.feed_key,x=g(n);return t.jsx("li",{children:t.jsxs(_,{to:"/$owner/connectors/$connectorKey/$connectionId",params:o,search:{feedId:n.id},className:"flex w-full items-center justify-between gap-3 rounded-lg border border-border px-3 py-2.5 text-left transition-colors hover:bg-accent/50",children:[t.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(k,{tone:C(n)}),t.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:s})]}),t.jsx("span",{className:n.attention==="last_attempt_failed"||n.attention==="misconfigured"?"max-w-[50%] shrink-0 text-right text-xs text-destructive":n.attention&&n.attention!=="healthy"?"max-w-[50%] shrink-0 text-right text-xs text-amber-600 dark:text-amber-400":"shrink-0 text-xs text-muted-foreground",title:x??void 0,children:x??(n.store==="channel_messages"?"chat channel":n.operations.includes("read")&&n.operations.includes("sync")?"synced + live":n.operations.includes("read")?"live":n.last_sync_at?`synced ${$(n.last_sync_at)}`:"not synced yet")})]})},n.id)})})}function I({connection:e,ownerSlug:r,title:u}){const h=b(),{data:i=[],isLoading:l,isError:m}=y(e.id),a=i.filter(s=>["needs_auth","setup_required","misconfigured","last_attempt_failed","device_offline","overdue"].includes(s.attention??"")),d=i.filter(s=>s.status==="paused").length,c=l?e.feed_count:i.length,o=e.facets?.chat?"channels":"feeds",n=l?`Loading ${o}…`:m?`Could not load ${o} — open to retry`:`${c} ${o}${a.length?` · ${a.length} need attention`:""}${d?` · ${d} paused`:""}`;return t.jsxs("div",{className:"space-y-2",children:[t.jsx(w,{title:u,summary:n,onOpen:()=>h?.open({href:"",title:e.facets?.chat?"Channels":"Feeds",connectorPanel:{section:"feeds",connectorKey:e.connector_key,connectionId:e.id,organizationId:e.organization_id,ownerSlug:r}})}),a.length>0&&t.jsxs("ul",{className:"space-y-1 text-xs text-destructive",children:[a.slice(0,3).map(s=>t.jsxs("li",{children:[s.display_name||s.feed_key,": ",g(s)]},s.id)),a.length>3&&t.jsxs("li",{children:[a.length-3," more sources need attention."]})]})]})}export{F as C,I as a,S as c,g as f};
2
- //# sourceMappingURL=connector-scope-lists-BKDetNDc.js.map
@@ -1,2 +0,0 @@
1
- import{j as e,O as l}from"./index-_oPeVpL_.js";function n(){return e.jsx("div",{className:"flex min-h-0 flex-1 flex-col gap-3 px-4 pt-4 pb-8 lg:px-6",children:e.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:e.jsx(l,{})})})}export{n as component};
2
- //# sourceMappingURL=connectors-BJnk1z_2.js.map
@@ -1,2 +0,0 @@
1
- import{iB as o,j as e}from"./index-_oPeVpL_.js";import{a}from"./agent-guardrails-route-BaV1VpDh.js";import"./model-selector-CB1BDvlW.js";import"./agent-subpage-shell-B3K_jPYR.js";import"./agent-loading-shells-CtZJM2Gc.js";import"./agent-card-controls-DzRs4Ix9.js";function g(){const{owner:r,agentId:t}=o.useParams();return e.jsx(a,{owner:r,agentId:t})}export{g as component};
2
- //# sourceMappingURL=create-CUqO6Kfk.js.map
@@ -1,2 +0,0 @@
1
- import{j as n,ah as t,O as c,cN as r,aB as i,fL as l,af as x,fM as m,L as d,fN as C,fO as u,ex as j}from"./index-_oPeVpL_.js";function p({owner:o,initialConnectorKey:e}){return n.jsx(t,{owner:o,children:a=>n.jsx(f,{ownerSlug:a.ownerSlug,organizationId:a.organizationId,initialConnectorKey:e})})}function f({ownerSlug:o,organizationId:e,initialConnectorKey:a}){const{data:s=[]}=r(e??"");return n.jsxs(i,{className:"flex flex-1 flex-col gap-6",children:[n.jsx(l,{breadcrumb:n.jsx(m,{crumbs:[n.jsx(d,{to:"/$owner/connectors",params:{owner:o},search:{},className:C,children:"Connectors"},"connectors")]}),icon:n.jsx(x.connectors.icon,{className:"h-6 w-6"}),title:"Add a connection",caption:"Pick a connector from the catalog or drop in an MCP URL — Lobu handles auth and brings the data into memory."}),e?n.jsx(u,{ownerSlug:o,organizationId:e,connections:s,initialConnectorKey:a}):n.jsx("div",{className:"max-w-3xl",children:n.jsx(j,{rows:4})})]})}const L=()=>n.jsx(c,{});export{p as ConnectionsCreateRouteContent,L as component};
2
- //# sourceMappingURL=create-JRFM8mMf.js.map