@lobu/runtime-server 24.6.0 → 24.8.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 (261) hide show
  1. package/dist/catalogs/connectors.json +199 -316
  2. package/dist/component.json +1 -1
  3. package/dist/connectors/imessage.ts +953 -0
  4. package/dist/connectors/linkedin.ts +20 -377
  5. package/dist/dependencies.bun.lock +124 -92
  6. package/dist/embeddings-server.mjs +14 -2
  7. package/dist/owletto/dist/assets/_-B0tmXZ86.js +2 -0
  8. package/dist/owletto/dist/assets/_-DwXULq4r.js +3 -0
  9. package/dist/owletto/dist/assets/_agentId-B1dNkhnr.js +2 -0
  10. package/dist/owletto/dist/assets/_agentId-sYjvnBaB.js +2 -0
  11. package/dist/owletto/dist/assets/_automationId-Bnw_CnT_.js +2 -0
  12. package/dist/owletto/dist/assets/_connectorKey._connectionId-D7Z8DQ-B.js +2 -0
  13. package/dist/owletto/dist/assets/_connectorKey.index-DM5MTO8c.js +2 -0
  14. package/dist/owletto/dist/assets/_conversationId-OJrZjd0o.js +2 -0
  15. package/dist/owletto/dist/assets/_eventId-CfB0_2zK.js +2 -0
  16. package/dist/owletto/dist/assets/_owner-BDvTUY0a.js +3 -0
  17. package/dist/owletto/dist/assets/_shape-BZidoJMB.js +2 -0
  18. package/dist/owletto/dist/assets/_slug-R989vOiM.js +2 -0
  19. package/dist/owletto/dist/assets/_viewKey-BDUSrpe5.js +2 -0
  20. package/dist/owletto/dist/assets/_viewKey-BnFqh5-t.js +2 -0
  21. package/dist/owletto/dist/assets/{accept-invitation-CQZQ0wwC.js → accept-invitation-BC-ZIsrf.js} +2 -2
  22. package/dist/owletto/dist/assets/activity-route-view-CN2dOiCD.js +2 -0
  23. package/dist/owletto/dist/assets/agent-connect-pages-CdDjrHjn.js +4 -0
  24. package/dist/owletto/dist/assets/agent-editor-form-CDAHRNWl.js +2 -0
  25. package/dist/owletto/dist/assets/{agent-loading-shells-_18OREnx.js → agent-loading-shells-BupiSjR-.js} +2 -2
  26. package/dist/owletto/dist/assets/agent-permissions-matrix-ju7L2M0l.js +2 -0
  27. package/dist/owletto/dist/assets/{agent-skill-context-1DBn7Xc_.js → agent-skill-context-B0ZYVE3n.js} +2 -2
  28. package/dist/owletto/dist/assets/agent-subpage-shell-ByU0xhXn.js +2 -0
  29. package/dist/owletto/dist/assets/{agent-thread-FyEO-y44.js → agent-thread-DiVKn1WX.js} +4 -4
  30. package/dist/owletto/dist/assets/agent-thread-storage-Bx2-WBHQ.js +2 -0
  31. package/dist/owletto/dist/assets/app._appId-BQWElSoP.js +2 -0
  32. package/dist/owletto/dist/assets/assist-composer-igTXq3DL.js +2 -0
  33. package/dist/owletto/dist/assets/automation-detail-content-BJwRU6qT.js +2 -0
  34. package/dist/owletto/dist/assets/{callback-9xSHyA12.js → callback-Dmaio9CX.js} +2 -2
  35. package/dist/owletto/dist/assets/{card-g4yxo4Hr.js → card-rE4Ctuy6.js} +2 -2
  36. package/dist/owletto/dist/assets/{claim-B98IhDra.js → claim-BN17CPYh.js} +2 -2
  37. package/dist/owletto/dist/assets/{client-activity-scopes-BD2HBo-_.js → client-activity-scopes-B7xVaUA-.js} +2 -2
  38. package/dist/owletto/dist/assets/{client-rows-x_CxeWkP.js → client-rows-B3LULJxW.js} +2 -2
  39. package/dist/owletto/dist/assets/clients-CydgUHrc.js +2 -0
  40. package/dist/owletto/dist/assets/code-editor-UppEMWpt.js +26 -0
  41. package/dist/owletto/dist/assets/connect-OdHpIVV9.js +2 -0
  42. package/dist/owletto/dist/assets/connect-menu-B9u86bb2.js +2 -0
  43. package/dist/owletto/dist/assets/connect._clientId-EI1tcdSE.js +2 -0
  44. package/dist/owletto/dist/assets/connected._clientId-CaF-ZWlZ.js +2 -0
  45. package/dist/owletto/dist/assets/{connection-B6fM2KHN.js → connection-D8ZAMHBT.js} +2 -2
  46. package/dist/owletto/dist/assets/connection-feed-detail-CJYqryAV.js +2 -0
  47. package/dist/owletto/dist/assets/connector-boxes-BWPXijAk.js +2 -0
  48. package/dist/owletto/dist/assets/connector-page-shell-C23dWdKz.js +2 -0
  49. package/dist/owletto/dist/assets/connector-provenance-CW4CXtCz.js +2 -0
  50. package/dist/owletto/dist/assets/{connectors-DnOUxX_U.js → connectors-Bp08_KPq.js} +2 -2
  51. package/dist/owletto/dist/assets/consent-_PpYI1cT.js +2 -0
  52. package/dist/owletto/dist/assets/copy-button-1ALlvZU1.js +2 -0
  53. package/dist/owletto/dist/assets/{core.esm-BsXtvNoI.js → core.esm-6koO33th.js} +3 -3
  54. package/dist/owletto/dist/assets/create-DULVO0HS.js +2 -0
  55. package/dist/owletto/dist/assets/create-Drx9tcnG.js +2 -0
  56. package/dist/owletto/dist/assets/create-automation-form-BhujNbRr.js +3 -0
  57. package/dist/owletto/dist/assets/create-kUevP9Xx.js +2 -0
  58. package/dist/owletto/dist/assets/create._connectorKey-N6fhcIPy.js +2 -0
  59. package/dist/owletto/dist/assets/custom-guardrail-edits-B_aCgvoZ.js +2 -0
  60. package/dist/owletto/dist/assets/definition-comparison-3zKUSTt8.js +2 -0
  61. package/dist/owletto/dist/assets/detail-page-skeleton-BmxqqIsH.js +2 -0
  62. package/dist/owletto/dist/assets/{device-DdCoCj-Q.js → device-D2eUt_nr.js} +2 -2
  63. package/dist/owletto/dist/assets/device-automation-Dp3faMvp.js +2 -0
  64. package/dist/owletto/dist/assets/device-pin-tombstone-BFPbTM_o.js +2 -0
  65. package/dist/owletto/dist/assets/device._deviceId-Dqtmb1Xp.js +2 -0
  66. package/dist/owletto/dist/assets/dynamic-schema-form-D3KnzCsW.js +2 -0
  67. package/dist/owletto/dist/assets/entity-options-IUdQ-64R.js +2 -0
  68. package/dist/owletto/dist/assets/entity-page-B3Im65EI.js +2 -0
  69. package/dist/owletto/dist/assets/entity-pages-DJNSQrfB.js +2 -0
  70. package/dist/owletto/dist/assets/entity-type-page-CouHZbc9.js +2 -0
  71. package/dist/owletto/dist/assets/event-detail-CvaRN1qB.js +2 -0
  72. package/dist/owletto/dist/assets/event-kind-options-fHAIXu24.js +2 -0
  73. package/dist/owletto/dist/assets/events-feed-DwOkLk6A.js +2 -0
  74. package/dist/owletto/dist/assets/filter-editors-DQ5V4Cvh.js +2 -0
  75. package/dist/owletto/dist/assets/{full-page-spinner-B5xXnKtV.js → full-page-spinner-B7A6Ycyi.js} +2 -2
  76. package/dist/owletto/dist/assets/home-stream-Bg97PUBJ.js +2 -0
  77. package/dist/owletto/dist/assets/home-toolbar-CpCcHA6z.js +2 -0
  78. package/dist/owletto/dist/assets/index-9PGnv4-5.js +2 -0
  79. package/dist/owletto/dist/assets/{index-TkPy_P_u.js → index-B-dZruj6.js} +2 -2
  80. package/dist/owletto/dist/assets/index-BztXeLBN.js +2 -0
  81. package/dist/owletto/dist/assets/index-C2TCKJDP.js +7901 -0
  82. package/dist/owletto/dist/assets/index-C7QM3aqU.js +2 -0
  83. package/dist/owletto/dist/assets/index-CWn46a4y.js +2 -0
  84. package/dist/owletto/dist/assets/index-CxJONizf.js +2 -0
  85. package/dist/owletto/dist/assets/index-DJhb3li3.js +2 -0
  86. package/dist/owletto/dist/assets/{index-BDl1_w6U.js → index-DXfYVs5m.js} +2 -2
  87. package/dist/owletto/dist/assets/{index-BdNR51Ua.js → index-DY-YGnCe.js} +2 -2
  88. package/dist/owletto/dist/assets/index-j3v7ITPb.js +2 -0
  89. package/dist/owletto/dist/assets/index-oiy6ygaI.js +2 -0
  90. package/dist/owletto/dist/assets/index-pEgtAY1t.js +2 -0
  91. package/dist/owletto/dist/assets/index-xAvK3IyQ.css +1 -0
  92. package/dist/owletto/dist/assets/json-diff-CJK-gzCt.js +4 -0
  93. package/dist/owletto/dist/assets/list-skeleton-bQAZ0hQp.js +2 -0
  94. package/dist/owletto/dist/assets/{login-TWR0vF4_.js → login-DLqL54Rk.js} +2 -2
  95. package/dist/owletto/dist/assets/{logout-BA5kojS0.js → logout-H0F3IfiO.js} +2 -2
  96. package/dist/owletto/dist/assets/member-scope-gate-Doic_6qX.js +2 -0
  97. package/dist/owletto/dist/assets/memory-browse-page-CUea2Llz.js +74 -0
  98. package/dist/owletto/dist/assets/model-selector-BrfaDwIg.js +2 -0
  99. package/dist/owletto/dist/assets/new-5GkxlOuQ.js +2 -0
  100. package/dist/owletto/dist/assets/{new-Dc5Bbotb.js → new-BiA4DGoN.js} +2 -2
  101. package/dist/owletto/dist/assets/new-M-MX_T5C.js +2 -0
  102. package/dist/owletto/dist/assets/organization-CLrcmgNK.js +2 -0
  103. package/dist/owletto/dist/assets/peek-pane-content-B29OcHwm.js +2 -0
  104. package/dist/owletto/dist/assets/{pending-seed-BP3xHM2d.js → pending-seed-DYYOoCvj.js} +2 -2
  105. package/dist/owletto/dist/assets/proposal-review-shell-BVwOMoq9.js +2 -0
  106. package/dist/owletto/dist/assets/public-shell-ready-BbjPgh3k.js +2 -0
  107. package/dist/owletto/dist/assets/record-activity-BCpNKaUo.js +2 -0
  108. package/dist/owletto/dist/assets/{record-session-DOFgdd43.js → record-session-KuEDuF3S.js} +2 -2
  109. package/dist/owletto/dist/assets/{renderer-CHPS-1vD.js → renderer-ucwCQmBk.js} +26 -26
  110. package/dist/owletto/dist/assets/{reset-password-BmNM-apc.js → reset-password-BkiAmXZW.js} +2 -2
  111. package/dist/owletto/dist/assets/run-initiator-8vdkq-3o.js +2 -0
  112. package/dist/owletto/dist/assets/{runs-BntGAKQG.js → runs-B_iywKWb.js} +2 -2
  113. package/dist/owletto/dist/assets/runs-list-CJJFRhTl.js +2 -0
  114. package/dist/owletto/dist/assets/schema-type-editor-panel-C4e8pq1A.js +2 -0
  115. package/dist/owletto/dist/assets/{schema-value-BFb7jCBo.js → schema-value-CefbtPIY.js} +3 -3
  116. package/dist/owletto/dist/assets/scoped-feed-bar-CapleZvS.js +2 -0
  117. package/dist/owletto/dist/assets/{settings-DubSpJfg.js → settings-DvzkRYQy.js} +2 -2
  118. package/dist/owletto/dist/assets/skill-route-key-sF006xiz.js +2 -0
  119. package/dist/owletto/dist/assets/source-record-panels-LJIWGtHb.js +2 -0
  120. package/dist/owletto/dist/assets/status-variants-BxHtpMOj.js +2 -0
  121. package/dist/owletto/dist/assets/subDays-DwIOMzYC.js +2 -0
  122. package/dist/owletto/dist/assets/{table-DALHuXPE.js → table-1O-ik4_O.js} +2 -2
  123. package/dist/owletto/dist/assets/{use-automations-D9hKpufo.js → use-automations-lV8PuE8L.js} +2 -2
  124. package/dist/owletto/dist/assets/use-login-redirect-CfCbEeJR.js +2 -0
  125. package/dist/owletto/dist/assets/use-mention-search-CA-evCDf.js +91 -0
  126. package/dist/owletto/dist/assets/view-param-filters-Bp84PUMd.js +2 -0
  127. package/dist/owletto/dist/assets/{views-access-required-CZ1fvAks.js → views-access-required-BerT4Z1d.js} +2 -2
  128. package/dist/owletto/dist/index.html +2 -2
  129. package/dist/server-main.bundle.mjs +358 -141
  130. package/npm-shrinkwrap.json +540 -447
  131. package/package.json +4 -2
  132. package/vendor/connector-sdk/package.json +1 -1
  133. package/vendor/core/dist/connector-query-errors.d.ts +6 -0
  134. package/vendor/core/dist/connector-query-errors.js +4 -0
  135. package/vendor/core/dist/contracts/tools/manage-entity.d.ts +2 -0
  136. package/vendor/core/dist/contracts/tools/manage-entity.js +7 -0
  137. package/vendor/core/dist/contracts/tools/manage-feeds.d.ts +2 -0
  138. package/vendor/core/dist/contracts/tools/manage-feeds.js +3 -0
  139. package/vendor/core/dist/contracts/tools/view-host.js +2 -0
  140. package/vendor/core/dist/error-report.js +1 -0
  141. package/vendor/core/package.json +1 -1
  142. package/vendor/views/package.json +1 -1
  143. package/dist/connectors/linkedin-takeout.ts +0 -577
  144. package/dist/connectors/takeout-utils.ts +0 -240
  145. package/dist/owletto/dist/assets/_-DT3E3BmS.js +0 -3
  146. package/dist/owletto/dist/assets/_-DtqBFgK5.js +0 -2
  147. package/dist/owletto/dist/assets/_-c1xy7bLu.js +0 -2
  148. package/dist/owletto/dist/assets/_agentId-CTfoi0-7.js +0 -2
  149. package/dist/owletto/dist/assets/_agentId-DV8utajn.js +0 -2
  150. package/dist/owletto/dist/assets/_automationId-DvP3qyYL.js +0 -2
  151. package/dist/owletto/dist/assets/_connectorKey._connectionId-CL5SivCn.js +0 -2
  152. package/dist/owletto/dist/assets/_connectorKey.index-tnMwC67b.js +0 -2
  153. package/dist/owletto/dist/assets/_conversationId-DXN_8m88.js +0 -2
  154. package/dist/owletto/dist/assets/_eventId-SdpFT7jB.js +0 -2
  155. package/dist/owletto/dist/assets/_name-CM1AMywz.js +0 -2
  156. package/dist/owletto/dist/assets/_owner-CaGsXXBW.js +0 -3
  157. package/dist/owletto/dist/assets/_shape-DGAkETDp.js +0 -2
  158. package/dist/owletto/dist/assets/_skillKey-Dd4ZHPY8.js +0 -2
  159. package/dist/owletto/dist/assets/_slug-cRvJQtNo.js +0 -2
  160. package/dist/owletto/dist/assets/_view-B5I7mmkl.js +0 -2
  161. package/dist/owletto/dist/assets/_viewKey-Bwn0dyLo.js +0 -2
  162. package/dist/owletto/dist/assets/_viewKey-YjSYD0wc.js +0 -2
  163. package/dist/owletto/dist/assets/activity-route-view-CZykJXQp.js +0 -2
  164. package/dist/owletto/dist/assets/agent-card-controls-DuQJhtqp.js +0 -2
  165. package/dist/owletto/dist/assets/agent-client-setup-list-CpUTAjXf.js +0 -4
  166. package/dist/owletto/dist/assets/agent-connect-pages-Br_ycC0z.js +0 -2
  167. package/dist/owletto/dist/assets/agent-editor-form-BXQBFHSv.js +0 -2
  168. package/dist/owletto/dist/assets/agent-guardrails-route-CN7vpC0X.js +0 -2
  169. package/dist/owletto/dist/assets/agent-list-row-BnP6r4pm.js +0 -2
  170. package/dist/owletto/dist/assets/agent-permissions-matrix-DSjidWHL.js +0 -2
  171. package/dist/owletto/dist/assets/agent-skills-route-d5jh3oBR.js +0 -2
  172. package/dist/owletto/dist/assets/agent-tab-intro-DKrC3SQt.js +0 -2
  173. package/dist/owletto/dist/assets/agent-thread-storage-U6htL3ad.js +0 -2
  174. package/dist/owletto/dist/assets/agents-kXojozTU.js +0 -2
  175. package/dist/owletto/dist/assets/agents-workbench-CDpJmUVN.js +0 -2
  176. package/dist/owletto/dist/assets/app._appId-DwNeXRJp.js +0 -2
  177. package/dist/owletto/dist/assets/assist-composer-Mn9EfX4X.js +0 -2
  178. package/dist/owletto/dist/assets/automation-detail-content-Bs3vwAPd.js +0 -2
  179. package/dist/owletto/dist/assets/automation-row-B5Q1B10y.js +0 -2
  180. package/dist/owletto/dist/assets/automation-source-list-Dhucq1sI.js +0 -2
  181. package/dist/owletto/dist/assets/automations-kXojozTU.js +0 -2
  182. package/dist/owletto/dist/assets/change-summary-DeuXQEpb.js +0 -2
  183. package/dist/owletto/dist/assets/clients-Cmp0LmOp.js +0 -2
  184. package/dist/owletto/dist/assets/connect-menu-CezOH3s7.js +0 -2
  185. package/dist/owletto/dist/assets/connect-zUot_0kG.js +0 -2
  186. package/dist/owletto/dist/assets/connect._clientId-nsGxe6yO.js +0 -2
  187. package/dist/owletto/dist/assets/connected._clientId-DnclRRXk.js +0 -2
  188. package/dist/owletto/dist/assets/connected._clientId.activity-CDB8atTX.js +0 -2
  189. package/dist/owletto/dist/assets/connected._clientId.index-DBNP2mZo.js +0 -2
  190. package/dist/owletto/dist/assets/connection-feed-detail-Ckq-qEbD.js +0 -2
  191. package/dist/owletto/dist/assets/connection-label-BobuYiAG.js +0 -2
  192. package/dist/owletto/dist/assets/connections-browser-BXsJqieG.js +0 -2
  193. package/dist/owletto/dist/assets/connector-boxes-CbqSFeVm.js +0 -2
  194. package/dist/owletto/dist/assets/connector-page-shell-Di6XzkVo.js +0 -2
  195. package/dist/owletto/dist/assets/connector-provenance-BrnasBW4.js +0 -2
  196. package/dist/owletto/dist/assets/connector-scope-lists-dQnZARCD.js +0 -2
  197. package/dist/owletto/dist/assets/consent-Byli4yMs.js +0 -2
  198. package/dist/owletto/dist/assets/copy-button-Ddf7lBjZ.js +0 -2
  199. package/dist/owletto/dist/assets/create-B34eskZ_.js +0 -2
  200. package/dist/owletto/dist/assets/create-DLB9sXgU.js +0 -2
  201. package/dist/owletto/dist/assets/create-YdAnh3ml.js +0 -2
  202. package/dist/owletto/dist/assets/create-automation-form-C9PMX7N8.js +0 -3
  203. package/dist/owletto/dist/assets/create._connectorKey-Bz4OYRiC.js +0 -2
  204. package/dist/owletto/dist/assets/definition-comparison-B5WgZILB.js +0 -2
  205. package/dist/owletto/dist/assets/device-pin-tombstone-B06J7Af1.js +0 -2
  206. package/dist/owletto/dist/assets/device._deviceId-Bh9S4bFp.js +0 -2
  207. package/dist/owletto/dist/assets/dynamic-schema-form-qWSRtOAv.js +0 -2
  208. package/dist/owletto/dist/assets/entity-options-BkU_En_f.js +0 -2
  209. package/dist/owletto/dist/assets/entity-page-BPFDHY8q.js +0 -2
  210. package/dist/owletto/dist/assets/entity-pages-DxgbjLMt.js +0 -2
  211. package/dist/owletto/dist/assets/entity-type-page-D0ghgRgq.js +0 -2
  212. package/dist/owletto/dist/assets/event-card-CjA_dLzq.js +0 -2
  213. package/dist/owletto/dist/assets/event-detail-CmC-DVrK.js +0 -2
  214. package/dist/owletto/dist/assets/events-feed-CGzA1w3R.js +0 -2
  215. package/dist/owletto/dist/assets/filter-bar-CQ_oE7a9.js +0 -2
  216. package/dist/owletto/dist/assets/guardrails-DkXatmea.js +0 -2
  217. package/dist/owletto/dist/assets/identity-BwJy3ixB.js +0 -2
  218. package/dist/owletto/dist/assets/index-35ehGReZ.js +0 -2
  219. package/dist/owletto/dist/assets/index-B9hYiwBw.js +0 -2
  220. package/dist/owletto/dist/assets/index-BjcZVe7n.js +0 -7899
  221. package/dist/owletto/dist/assets/index-BqAVebvY.js +0 -2
  222. package/dist/owletto/dist/assets/index-BvK1fS1J.js +0 -2
  223. package/dist/owletto/dist/assets/index-CNEpTkgw.css +0 -1
  224. package/dist/owletto/dist/assets/index-CRc73k1t.js +0 -2
  225. package/dist/owletto/dist/assets/index-CYGaSD3y.js +0 -2
  226. package/dist/owletto/dist/assets/index-CfZGe-zn.js +0 -2
  227. package/dist/owletto/dist/assets/index-CkiyxW4w.js +0 -2
  228. package/dist/owletto/dist/assets/index-CzLDNB2E.js +0 -2
  229. package/dist/owletto/dist/assets/index-D-o5iOVd.js +0 -2
  230. package/dist/owletto/dist/assets/index-DjYVV1Ml.js +0 -2
  231. package/dist/owletto/dist/assets/index-VyAX-asP.js +0 -2
  232. package/dist/owletto/dist/assets/json-diff-DtZtra_g.js +0 -28
  233. package/dist/owletto/dist/assets/list-skeleton-CIHWCi2a.js +0 -2
  234. package/dist/owletto/dist/assets/manage-gear-C-0BAMbC.js +0 -2
  235. package/dist/owletto/dist/assets/member-scope-gate-BQiRAqtx.js +0 -2
  236. package/dist/owletto/dist/assets/memory-browse-page-Ba32-vVL.js +0 -74
  237. package/dist/owletto/dist/assets/model-C2q7WDcS.js +0 -2
  238. package/dist/owletto/dist/assets/model-selector-B2cjCn0V.js +0 -2
  239. package/dist/owletto/dist/assets/models-CZkH5gtj.js +0 -2
  240. package/dist/owletto/dist/assets/nav-pill-Bam6s3jj.js +0 -2
  241. package/dist/owletto/dist/assets/new-BJst6K0b.js +0 -2
  242. package/dist/owletto/dist/assets/new-DgbivfDe.js +0 -2
  243. package/dist/owletto/dist/assets/organization-B9U1L-56.js +0 -2
  244. package/dist/owletto/dist/assets/peek-pane-content-Cq8P38s3.js +0 -2
  245. package/dist/owletto/dist/assets/permissions-BVlbeY4u.js +0 -2
  246. package/dist/owletto/dist/assets/proposal-review-shell-BED-DO9C.js +0 -2
  247. package/dist/owletto/dist/assets/public-shell-ready-Diq15_QW.js +0 -2
  248. package/dist/owletto/dist/assets/record-activity-CTLwq8s1.js +0 -2
  249. package/dist/owletto/dist/assets/run-activity-link-Dh1YyCfk.js +0 -2
  250. package/dist/owletto/dist/assets/run-initiator-CCxNv0rK.js +0 -2
  251. package/dist/owletto/dist/assets/runs-panel-BwTVaRsE.js +0 -2
  252. package/dist/owletto/dist/assets/runs-table-CYS1jDdL.js +0 -2
  253. package/dist/owletto/dist/assets/schema-type-editor-panel-v3nR2Oa2.js +0 -2
  254. package/dist/owletto/dist/assets/settings-DBgT60nY.js +0 -2
  255. package/dist/owletto/dist/assets/skills-DDoeRGhJ.js +0 -2
  256. package/dist/owletto/dist/assets/source-record-panels-m8gECt82.js +0 -2
  257. package/dist/owletto/dist/assets/status-dot-BnQPFrcU.js +0 -2
  258. package/dist/owletto/dist/assets/use-login-redirect-ciwfc-7A.js +0 -2
  259. package/dist/owletto/dist/assets/use-mention-search-CJGCatFS.js +0 -96
  260. package/dist/owletto/dist/assets/use-scroll-sentinel-BWCrmNIB.js +0 -2
  261. package/dist/owletto/dist/assets/view-param-filters-CDvwie_f.js +0 -2
@@ -1,2 +0,0 @@
1
- import{Q as k,j as e,ak as h,al as v,gS as A,b3 as L,gT as S,L as p,gU as P,o as R,r as _,gl as o,B as b,A as N,ed as C}from"./index-BjcZVe7n.js";import{A as I,f as M,b as T,F as y}from"./agent-client-setup-list-CpUTAjXf.js";import{C as $}from"./connector-page-shell-Di6XzkVo.js";import{C as x}from"./copy-button-Ddf7lBjZ.js";import{u as B}from"./clients-Cmp0LmOp.js";import{g as U,a as E}from"./client-rows-x_CxeWkP.js";const O="app.lobu.ai";function F(s,n){const a=n?`/mcp/${n}`:"/mcp";if(!s)return`http://localhost:8787${a}`;try{const r=new URL(s);return r.hostname===O&&(r.hostname="lobu.ai"),r.pathname=a,r.toString()}catch{return`${s}${a}`}}function D(s){return F(k,s)}const u="gap-3 pt-2.5 pb-8";function H(s,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 ${s===n-1?"":"border-b"}`}function w({owner:s}){return e.jsx(S,{crumbs:[e.jsx(p,{to:"/$owner/agents",params:{owner:s},className:P,children:"Agents"},"agents")]})}function J({owner:s}){return e.jsx(h,{className:u,children:e.jsxs(v,{className:"flex flex-1 flex-col gap-6",children:[e.jsx(A,{breadcrumb:e.jsx(w,{owner:s}),icon:e.jsx(L.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(I,{owner:s})]})})}function V({owner:s,clientId:n}){const a=M(n),{data:r}=R(s,{slug:s}),{data:g=[]}=B(null,{refetchInterval:2500}),l=_.useMemo(()=>U(g).filter(t=>t.connected),[g]);if(!a)return e.jsx(h,{className:u,children:e.jsxs(v,{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:s},className:"text-sm text-primary hover:underline",children:"Back to agent clients"})]})});const c=D(s),d=T({workspaceName:r?.workspace?.name??s,owner:s,mcpUrl:c,clientLabel:a.id==="other"?void 0:a.label,terminalLogin:a.terminalLogin}),m=a.setupMode==="agent-prompt",f=m?d:a.installText?.(c)??d;return e.jsx(h,{className:u,children:e.jsxs($,{header:e.jsx(A,{breadcrumb:e.jsx(w,{owner:s}),icon:e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(C,{name:a.label})}),title:a.label,caption:a.description}),children:[e.jsx(o,{title:"Set up",children:e.jsxs("div",{className:"space-y-4",children:[(()=>{const t=a.installLink?.(c);return t?e.jsx("div",{children:e.jsx(b,{asChild:!0,children:e.jsxs("a",{href:t.href,target:"_blank",rel:"noreferrer",children:[t.label,e.jsx(N,{className:"ml-1.5 h-3.5 w-3.5"})]})})}):null})(),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:a.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:f}),e.jsx(x,{text:f,label:m?"Copy setup prompt":"Copy"})]})]}),e.jsx("ol",{className:"space-y-1 text-xs text-muted-foreground",children:a.steps(c).map((t,i)=>e.jsxs("li",{children:[i+1,". ",t]},t))}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[m?null:e.jsx(x,{text:d,label:"Copy setup prompt"}),a.guideLinks.map(t=>e.jsx(b,{asChild:!0,variant:"ghost",size:"sm",className:"h-8 text-xs",children:e.jsxs("a",{href:t.href,target:"_blank",rel:"noreferrer",children:[t.label,e.jsx(N,{className:"ml-1.5 h-3.5 w-3.5"})]})},t.href))]})]})}),e.jsx(o,{title:"First prompts",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"After setup, start a new chat with Lobu enabled and try one of these."}),e.jsx("div",{className:"overflow-hidden rounded-lg border",children:y.map((t,i)=>{const j=a.promptUrl?.(t);return e.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 ${i===y.length-1?"":"border-b"}`,children:[j?e.jsx("a",{href:j,target:"_blank",rel:"noreferrer",className:"min-w-0 flex-1 text-sm hover:underline",children:t}):e.jsx("p",{className:"min-w-0 flex-1 text-sm",children:t}),e.jsx(x,{text:t,label:"prompt",iconOnly:!0})]},t)})})]})}),e.jsx(o,{title:"Connected agents",count:l.length>0?String(l.length):void 0,children:l.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:l.map((t,i)=>e.jsxs(p,{to:"/$owner/agents/connected/$clientId",params:{owner:s,clientId:t.clientId},className:H(i,l.length),children:[e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(C,{name:t.title})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:E(t)})]})]},t.key))})}),e.jsx(o,{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:c})]})})]})})}export{J as A,V as a};
2
- //# sourceMappingURL=agent-connect-pages-Br_ycC0z.js.map
@@ -1,2 +0,0 @@
1
- import{aD as ae,aE as ie,j as e,B as p,db as re,e$ as oe,bc as le,i as de,gu as ce,cU as O,Y as G,d6 as me,hD as ue,hE as ge,hF as fe,hG as xe,g_ as pe,hH as he,c2 as be,c3 as ve,aF as je,r as V,bt as F,f5 as ye,er as we,c7 as Ce}from"./index-BjcZVe7n.js";import{D as Ne,A as Ae,e as Se}from"./definition-comparison-B5WgZILB.js";import{b as Me,s as Pe}from"./model-selector-B2cjCn0V.js";function ke(t){const n=t.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,"-");return(n?/^[a-z]/.test(n)&&n.length>=3?n:`agent-${n}`:"agent").slice(0,60).replace(/-+$/g,"")||"agent"}function De(t,n){const i=new Set(n),g=ke(t);let x=g,m=2;for(;i.has(x);){const l=`-${m}`;x=`${g.slice(0,Math.max(1,60-l.length)).replace(/-+$/g,"")||"agent"}${l}`,m+=1}return x}const Ie="__unresolved__";function H(t){return t.endsWith(`/${Ie}`)}function W(t){const n=t.indexOf("/");return n===-1?{slug:t,model:""}:{slug:t.slice(0,n),model:t.slice(n+1)}}function Ee(t,n){const{slug:i,model:g}=W(t);return{provider:n.find(l=>l.value===t)?.provider??n.find(l=>W(l.value).slug===i)?.provider??i,model:g}}function Fe({value:t,onChange:n,disabled:i}){const{data:g=[]}=ae(),{data:x=[]}=ie(),m=Me(g,x),l=(s,d)=>{const a=s+d;if(a<0||a>=t.length)return;const c=[...t];[c[s],c[a]]=[c[a],c[s]],n(c)},S=s=>{n(t.filter((d,a)=>a!==s))},v=s=>{t.includes(s)||n([...t,s])},u=m.filter(s=>!t.includes(s.value)&&!H(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,d)=>{const a=H(s),{provider:c,model:o}=Ee(s,m);return e.jsxs("li",{className:de("flex items-center gap-2 rounded-lg border bg-muted/20 px-3 py-2",a&&"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}),d===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:a?"no model selected":o})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-0.5",children:[e.jsx(p,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":"Move up",disabled:i||d===0,onClick:()=>l(d,-1),children:e.jsx(re,{className:"h-4 w-4"})}),e.jsx(p,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":"Move down",disabled:i||d===t.length-1,onClick:()=>l(d,1),children:e.jsx(oe,{className:"h-4 w-4"})}),e.jsx(p,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive","aria-label":"Remove model",disabled:i,onClick:()=>S(d),children:e.jsx(le,{className:"h-4 w-4"})})]})]},s)})}),e.jsx(ce,{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(p,{type:"button",variant:"outline",role:"combobox","aria-expanded":s,disabled:i,className:"w-full justify-start font-normal text-muted-foreground",children:[e.jsx(me,{className:"mr-2 h-4 w-4 shrink-0"}),"Add model"]}),children:(s,d)=>{const a=d.trim(),c=Pe(a,m)&&!t.includes(a);return e.jsxs(e.Fragment,{children:[u.map(o=>e.jsxs(O,{value:`${o.provider} ${o.model} ${o.value}`,onSelect:()=>{v(o.value),s()},className:"cursor-pointer",children:[e.jsx(G,{className:"mr-2 h-4 w-4 opacity-0"}),e.jsxs("span",{className:"truncate",children:[o.provider," ",e.jsx("span",{className:"text-muted-foreground text-xs",children:o.model}),o.isDefault?e.jsx("span",{className:"ml-1.5 text-muted-foreground text-xs",children:"· org default"}):null]})]},o.value)),c?e.jsxs(O,{value:`__custom__ ${a}`,onSelect:()=>{v(a),s()},className:"cursor-pointer",children:[e.jsx(G,{className:"mr-2 h-4 w-4 opacity-0"}),e.jsxs("span",{children:["Use ",e.jsx("span",{className:"font-mono text-xs",children:a})]})]}):null]})}})]})}const _e=3;function Y(t){return Array.from({length:_e},(n,i)=>t?.[i]??{title:"",message:""})}function q(t){return t.map(({title:n,message:i})=>({title:n.trim(),message:i.trim()})).filter(({title:n,message:i})=>n&&i)}function Le({mode:t,section:n="identity",existingAgentIds:i=[],onCreated:g,onCancel:x,onDone:m,reviewMode:l="none",reviewProposal:S=null,reviewControlsDisabled:v=!1}){const u=t.kind==="create",s=t.kind==="edit"?t.agent:null,d=!u&&n!=="platforms"&&n!=="skills"&&!!s,a=ue(),c=ge(s?.agentId??""),o=fe(s?.agentId??""),M=xe(s?.agentId??""),{data:f,isLoading:L}=pe(s?.agentId,{enabled:d}),U=!u&&l==="active",y=U?S:null,_=y?he(y.proposal):void 0,j=f,z=s?.agentId??"create",r=be(z,{name:_?.name??s?.name??"",description:_?.description??s?.description??"",identityMd:_?.identityMd??f?.identityMd??"",soulMd:f?.soulMd??"",userMd:f?.userMd??"",models:j?.models??j?.settings?.models??[],showToolCalls:j?.showToolCalls??j?.settings?.showToolCalls??!1,sandboxId:j?.sandboxId??j?.settings?.sandboxId??"builtin",starters:Y(f?.starters)}),[b]=r.field("name"),[w]=r.field("description"),[P]=r.field("identityMd"),[k]=r.field("soulMd"),[D]=r.field("userMd"),[C,J]=r.field("models"),[I]=r.field("showToolCalls"),[N]=r.field("sandboxId"),[A]=r.field("starters"),[K,E]=ve(z,!1),{data:Q}=je({enabled:n==="models"&&!u}),X=V.useCallback(async R=>{if(R.preventDefault(),!(v||l==="active"||l==="loading"||l==="error"||!r.canSubmit)){if(u){const h=await a.mutateAsync({agentId:De(b,i),name:b.trim(),description:w.trim()||void 0});g?await g(h.agentId):m?.();return}if(s){if(!f){F.error("Still loading agent settings — try again in a moment");return}if(A.some(({title:h,message:T})=>!!h.trim()!=!!T.trim())){F.error("Add both a title and a message for each conversation starter");return}try{await Promise.all([c.mutateAsync({name:b.trim()||s.name,description:w.trim()||void 0}),M.mutateAsync({identityMd:P.trim(),soulMd:k.trim(),userMd:D.trim(),models:C,authProfiles:f.authProfiles??[],skillsConfig:f.skillsConfig,showToolCalls:I,sandboxId:N==="builtin"?void 0:N,starters:q(A)})]),r.accept(r.values,{name:b.trim()||s.name,description:w.trim()||s.description||"",identityMd:P.trim(),soulMd:k.trim(),userMd:D.trim(),models:C,showToolCalls:I,sandboxId:N,starters:Y(q(A))}),F.success("Agent saved"),m?.()}catch(h){F.error(h instanceof Error?h.message:"Failed to save agent")}}}},[f,a,w,r.accept,r.values,r.canSubmit,v,l,N,i,P,u,C,b,g,m,s,I,k,A,c,M,D]),Z=V.useCallback(async()=>{s&&(await o.mutateAsync(),E(!1),m?.())},[o,m,s,E]),$=a.isPending||c.isPending||o.isPending||M.isPending,ee=u||!!f;if(d&&L)return e.jsx(ye,{rows:6});const B=$||v,se=l==="none"||l==="gone",te=b.trim().length>0&&ee,ne=!u&&n==="settings";if(U&&y){const{current:R,proposed:h}=we(y);return e.jsx(Ne,{current:R,proposed:h,render:T=>e.jsx(Ae,{value:T})},y.runId)}return e.jsxs("form",{onSubmit:X,className:"flex min-h-0 flex-col",children:[e.jsx(Ce,{visible:r.hasConflict,onReload:r.reset}),e.jsx(Se,{value:{name:b,description:w,identityMd:P,soulMd:k,userMd:D,models:C,showToolCalls:I,sandboxId:N,starters:A},onChange:r.setValues,section:n,create:u,disabled:B,loading:L,sandboxes:Q?.sandboxes,modelsEditor:e.jsx(Fe,{value:C,onChange:J,disabled:B})}),se?e.jsxs("div",{className:"mt-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[ne?K?e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx(p,{type:"button",variant:"destructive",onClick:()=>void Z(),disabled:o.isPending,children:o.isPending?"Deleting...":"Delete agent"}),e.jsx(p,{type:"button",variant:"outline",onClick:()=>E(!1),disabled:o.isPending,children:"Cancel"})]}):e.jsx(p,{type:"button",variant:"outline",className:"text-destructive hover:text-destructive",onClick:()=>E(!0),disabled:o.isPending,children:"Delete agent"}):e.jsx("span",{}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[x?e.jsx(p,{type:"button",variant:"outline",onClick:x,disabled:$,children:"Cancel"}):null,e.jsx(p,{type:"submit",disabled:!r.canSubmit||!te||$,children:u?a.isPending?"Creating...":"Create agent":c.isPending||M.isPending?"Saving...":"Save changes"})]})]}):null]})}export{Le as A};
2
- //# sourceMappingURL=agent-editor-form-BXQBFHSv.js.map
@@ -1,2 +0,0 @@
1
- import{r as y,j as e,H as w,I as k,bl as K,bm as X,bn as Y,bo as ee,bp as ae,eL as te,B as S,c as P,g_ as G,jb as L,jc as M,hG as B,f5 as se,bt as j,h3 as U,bO as ne,b_ as re,b2 as D,h5 as ie,V as oe,iI as le,bQ as q,d6 as de,i as E,j9 as ue}from"./index-BjcZVe7n.js";import{M as ce}from"./model-selector-B2cjCn0V.js";import{b as me,a as ge,A as J}from"./agent-tab-intro-DKrC3SQt.js";import{T as he,a as pe,b as O,c as R,d as xe,e as $}from"./table-DALHuXPE.js";import{f as be}from"./agent-loading-shells-_18OREnx.js";import{A as je}from"./agent-card-controls-DuQJhtqp.js";const fe=[{value:"input",label:"Input",hint:"the user message, before the agent runs"},{value:"output",label:"Output",hint:"the agent's reply, before the user sees it"},{value:"pre-tool",label:"Pre-tool",hint:"a tool call, before it executes"},{value:"egress",label:"Egress",hint:"an outbound request to a judged domain"}];function H({initial:a,judgeModelDefault:t,submitLabel:n,submitting:s,onSubmit:o,onCancel:r}){const[i,d]=y.useState(a?.name??""),[h,f]=y.useState(a?.stage??"input"),[p,N]=y.useState(a?.policy??""),[x,C]=y.useState(a?.model??""),[b,u]=y.useState((a?.tools??[]).join(", ")),[l,m]=y.useState((a?.domains??[]).join(", ")),g=a?.kind,v=g==="require-tool",Q=c=>{c.preventDefault();const _=b.split(",").map(T=>T.trim()).filter(Boolean);o({name:i,stage:h,...g?{kind:g}:{},policy:p,model:x.trim()||void 0,tools:(v||h==="pre-tool")&&_.length>0?_:void 0,domains:h==="egress"&&l.trim()?l.split(",").map(T=>T.trim()).filter(Boolean):void 0,enabled:a?.enabled??!0})};return e.jsxs("form",{onSubmit:Q,className:"space-y-5",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(w,{htmlFor:"guardrail-name",children:["Name ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(k,{id:"guardrail-name",value:i,onChange:c=>d(c.target.value),placeholder:"no-competitor-mentions",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Shown in the list and on every trip. Must be unique."})]}),v?null:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"guardrail-stage",children:"Stage"}),e.jsxs(K,{value:h,onValueChange:c=>f(c),disabled:s,children:[e.jsx(X,{id:"guardrail-stage",children:e.jsx(Y,{})}),e.jsx(ee,{children:fe.map(c=>e.jsxs(ae,{value:c.value,children:[c.label," — ",c.hint]},c.value))})]})]}),v?e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(w,{htmlFor:"guardrail-required-tools",children:["Required tools ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(k,{id:"guardrail-required-tools",value:b,onChange:c=>u(c.target.value),placeholder:"suggest_actions",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Comma-separated. The turn trips if the agent finishes without calling every one of these. No judge model runs — this is a lookup against the tools the turn actually used."})]}):null,v?null:e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(w,{htmlFor:"guardrail-policy",children:["Policy ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(te,{id:"guardrail-policy",rows:5,value:p,onChange:c=>N(c.target.value),placeholder:"Deny any response that names a competitor (Acme, Globex) or quotes their pricing.",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"A judge model reads this and the text at the chosen stage, then allows or denies. Write it as an instruction to a reviewer."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(w,{htmlFor:"guardrail-model",children:["Judge model",t?null:e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(ce,{value:x,onChange:C,placeholder:t?`Default (${t})`:"Select a model",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:t?"Optional. Leave blank to use the gateway's default judge model.":"Required: the gateway has no default judge model (EGRESS_JUDGE_MODEL is unset)."})]})]}),!v&&h==="pre-tool"?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"guardrail-tools",children:"Tool scope"}),e.jsx(k,{id:"guardrail-tools",value:b,onChange:c=>u(c.target.value),placeholder:"github.delete_repo, fs.delete",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Optional, comma-separated. Leave blank to judge every tool call."})]}):null,h==="egress"?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"guardrail-domains",children:"Domains"}),e.jsx(k,{id:"guardrail-domains",value:l,onChange:c=>m(c.target.value),placeholder:"api.github.com, .slack.com",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Comma-separated hostnames this judge gates — exact (api.github.com) or wildcard (.slack.com). Leave blank to route nothing."})]}):null,e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:justify-end",children:[r?e.jsx(S,{type:"button",variant:"outline",onClick:r,disabled:s,children:"Cancel"}):null,e.jsx(S,{type:"submit",disabled:s,children:s?"Saving…":n})]})]})}function z(a){return a.kind==="require-tool"}function V(a,t,n,s,o){const r=a.name.trim();return r?/^[a-zA-Z0-9][a-zA-Z0-9 _-]*$/.test(r)?n.includes(r)?`"${r}" is a built-in guardrail name — pick another.`:t.some(d=>d.name===r&&d.name!==o)?`A custom guardrail named "${r}" already exists.`:z(a)?a.stage!=="output"?"A required-tool guardrail only runs at the output stage.":a.tools?.some(d=>d.trim())?null:"List at least one tool that must be used.":a.policy.trim()?!s&&!a.model?.trim()?"Judge model is required — the gateway has no default (EGRESS_JUDGE_MODEL is unset).":null:"Policy is required.":"Name may use letters, numbers, spaces, hyphens, and underscores.":"Name is required."}function W(a){const t=z(a),s=(t||a.stage==="pre-tool")&&a.tools&&a.tools.length>0?a.tools.map(d=>d.trim()).filter(Boolean):void 0,o=a.stage==="egress"&&a.domains&&a.domains.length>0?a.domains.map(d=>d.trim()).filter(Boolean):void 0,r=a.model?.trim()||void 0,i=a.policy.trim();return{name:a.name.trim(),enabled:a.enabled,stage:a.stage,...t?{kind:"require-tool"}:{},...t?i?{policy:i}:{}:{policy:i},...r?{model:r}:{},...s&&s.length>0?{tools:s}:{},...o&&o.length>0?{domains:o}:{}}}function ve(a,t){return[...a,W(t)]}function ye(a,t,n){return a.map(s=>s.name===t?W(n):s)}function Ne(a,t){return a.filter(n=>n.name!==t)}function Ce(a,t,n){return a.map(s=>s.name===t?{...s,enabled:n}:s)}function we({owner:a,agentId:t}){const n=P(),{data:s,isLoading:o}=G(t),{data:r,isLoading:i}=L(t),{data:d=null,isLoading:h}=M(t),f=o||i||h,p=B(t),N=s?.guardrailsInline??[],x=(r??[]).map(u=>u.name),C=async u=>{if(!s){j.error("Still loading agent settings — try again in a moment");return}const l=V(u,N,x,d);if(l){j.error(l);return}try{await p.mutateAsync({guardrailsInline:ve(N,u)}),j.success("Guardrail created"),n({to:"/$owner/agents/$agentId/guardrails",params:{owner:a,agentId:t}})}catch(m){j.error(m instanceof Error?m.message:"Failed to create guardrail")}},b=()=>void n({to:"/$owner/agents/$agentId/guardrails",params:{owner:a,agentId:t}});return e.jsxs("div",{className:"space-y-6",children:[e.jsx(me,{title:"New custom guardrail",description:"A custom guardrail judges text at one stage against a policy you write."}),f?e.jsx(se,{rows:4}):e.jsx(H,{judgeModelDefault:d,submitLabel:"Create guardrail",submitting:p.isPending,onSubmit:C,onCancel:b})]})}function F(a,t){const n=new Set(a?.guardrails??[]),s=new Set(t.map(i=>i.name)),o=t.map(i=>({name:i.name,stages:i.stages,description:i.description,enabled:n.has(i.name),unknown:!1})),r=(a?.guardrails??[]).filter(i=>!s.has(i)).map(i=>({name:i,stages:[],enabled:!0,unknown:!0}));return[...o,...r]}function Se(a){return a.filter(t=>t.enabled||t.unknown).map(t=>t.name)}function ke(a,t,n){return Se(a.map(s=>s.name===t&&!s.unknown?{...s,enabled:n}:s))}const A={input:"Input",output:"Output","pre-tool":"Pre-tool",egress:"Egress"};function Ae(a){const t=new Date(a);return Number.isNaN(t.getTime())?a:le(t,{addSuffix:!0})}function Ge({owner:a,agentId:t,name:n}){const{data:s}=G(t),{data:o}=L(t),r=y.useMemo(()=>F(s,o??[]).find(d=>d.name===n)??null,[s,o,n]),i=(s?.guardrailsInline??[]).find(d=>d.name===n);return i?e.jsx(Te,{owner:a,agentId:t,guardrail:i}):r?e.jsx(Le,{agentId:t,name:n,row:r}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"Guardrail not found."})}function Le({agentId:a,name:t,row:n}){return e.jsxs("div",{className:"space-y-8",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:n.description??(n.stages.length>0?`Built-in. Short-circuits this agent's ${n.stages.map(s=>A[s].toLowerCase()).join(", ")} stage${n.stages.length>1?"s":""} when it matches.`:"Configured out of band — toggling is managed via lobu apply.")}),e.jsx(Z,{agentId:a,guardrail:t})]})}function Te({owner:a,agentId:t,guardrail:n}){const s=P(),{data:o}=G(t),{data:r}=L(t),{data:i=null}=M(t),d=B(t),[h,f]=y.useState(!1),p=o?.guardrailsInline??[],N=(r??[]).map(u=>u.name),x=async(u,l)=>{if(!o)return j.error("Still loading agent settings — try again in a moment"),!1;try{return await d.mutateAsync({guardrailsInline:u}),j.success(l),!0}catch(m){return j.error(m instanceof Error?m.message:"Failed to save guardrail"),!1}},C=async u=>{const l=V(u,p,N,i,n.name);if(l){j.error(l);return}await x(ye(p,n.name,u),"Guardrail saved")&&u.name.trim()!==n.name&&s({to:"/$owner/agents/$agentId/guardrails/$name",params:{owner:a,agentId:t,name:encodeURIComponent(u.name.trim())}})},b=async()=>{await x(Ne(p,n.name),"Guardrail deleted")&&s({to:"/$owner/agents/$agentId/guardrails",params:{owner:a,agentId:t}})};return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium",children:n.kind==="require-tool"?"Required tools":"Policy"}),e.jsx(H,{initial:n,judgeModelDefault:i,submitLabel:"Save changes",submitting:d.isPending,onSubmit:C})]}),e.jsx("div",{className:"flex justify-end",children:h?e.jsxs("div",{className:"flex gap-2",children:[e.jsx(S,{type:"button",variant:"destructive",onClick:()=>void b(),disabled:d.isPending,children:"Delete guardrail"}),e.jsx(S,{type:"button",variant:"outline",onClick:()=>f(!1),disabled:d.isPending,children:"Cancel"})]}):e.jsxs(S,{type:"button",variant:"outline",className:"text-destructive hover:text-destructive",onClick:()=>f(!0),children:["Delete ",n.name]})}),e.jsx(Z,{agentId:t,guardrail:n.name})]})}function Z({agentId:a,guardrail:t}){const{data:n=[],isLoading:s,isError:o}=U(a,{guardrail:t});return e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium",children:"Recent catches"}),s?e.jsx(ne,{label:"catches",variant:"table",rows:4}):o?e.jsx(re,{label:"catches"}):n.length===0?e.jsx(D,{icon:ie,title:"No catches yet",description:"This guardrail hasn't short-circuited anything on this agent."}):e.jsx("div",{className:"overflow-hidden rounded-lg border",children:e.jsxs(he,{children:[e.jsx(pe,{children:e.jsxs(O,{children:[e.jsx(R,{className:"w-[180px]",children:"When"}),e.jsx(R,{className:"w-[120px]",children:"Stage"}),e.jsx(R,{children:"Reason"})]})}),e.jsx(xe,{children:n.map(r=>e.jsxs(O,{children:[e.jsx($,{className:"text-xs text-muted-foreground",title:r.occurredAt,children:Ae(r.occurredAt)}),e.jsx($,{children:e.jsx(oe,{variant:"outline",className:"text-[10px]",children:A[r.stage]})}),e.jsx($,{className:"text-sm text-muted-foreground",children:r.reason??e.jsx("span",{className:"italic",children:"no reason recorded"})})]},r.id))})]})})]})}function I(a,t){return a.get(t)??0}function Ee(a,t,n){const s=a.map(r=>{const i=r.stages.map(d=>A[d]);return r.unknown&&i.push("Unknown"),{id:r.name,name:r.name,kind:"builtin",description:r.description,stages:r.stages,enabled:r.enabled,unknown:r.unknown,badges:i,tripCount:I(n,r.name)}}),o=t.map(r=>{const i=[A[r.stage],"Custom"];return{id:r.name,name:r.name,kind:"custom",description:r.policy,stages:[r.stage],enabled:r.enabled,unknown:!1,badges:i,tripCount:I(n,r.name)}});return[...s,...o]}function Re({owner:a,agentId:t,expandedName:n}){const s=P(),{data:o,isLoading:r}=G(t),{data:i,isLoading:d}=L(t),{data:h=[]}=U(t),f=B(t),p=async(l,m)=>{if(!o){j.error("Still loading agent settings — try again in a moment");return}try{if(l.kind==="custom")await f.mutateAsync({guardrailsInline:Ce(o.guardrailsInline??[],l.name,m)});else{const g=F(o,i??[]);await f.mutateAsync({guardrails:ke(g,l.name,m)})}j.success(m?"Guardrail enabled":"Guardrail disabled")}catch(g){j.error(g instanceof Error?g.message:"Failed to save guardrail")}},N=i===null,x=y.useMemo(()=>{const l=F(o,i??[]),m=o?.guardrailsInline??[],g=new Map;for(const v of h)g.set(v.guardrailName,(g.get(v.guardrailName)??0)+1);return Ee(l,m,g)},[o,i,h]),C=l=>{if(l===n){s({to:"/$owner/agents/$agentId/guardrails",params:{owner:a,agentId:t}});return}s({to:"/$owner/agents/$agentId/guardrails/$name",params:{owner:a,agentId:t,name:encodeURIComponent(l)}})},b=()=>{s({to:"/$owner/agents/$agentId/guardrails/create",params:{owner:a,agentId:t}})},u=r||d;return!u&&x.length===0?e.jsx("div",{className:"space-y-6",children:N?e.jsx(D,{icon:q,title:"Guardrails catalog unavailable",description:"Guardrails will appear here once the gateway publishes its catalog.",actionLabel:"New guardrail",onAction:b}):e.jsx(D,{icon:q,title:"No guardrails yet",description:"Enable a built-in in lobu.toml or write a custom policy guardrail.",actionLabel:"New guardrail",onAction:b})}):e.jsxs("div",{className:"space-y-6",children:[e.jsx(ge,{description:"Each guardrail short-circuits this agent's input, output, or tool-call stages. Built-ins are toggle-only; add a custom guardrail to judge messages against a policy you write.",action:u?void 0:e.jsxs(S,{type:"button",onClick:b,children:[e.jsx(de,{className:"mr-1.5 h-4 w-4"}),"New guardrail"]})}),u?e.jsx(be,{rows:3}):e.jsx("div",{className:"overflow-hidden rounded-lg border",children:x.map((l,m)=>{const g=l.name===n;return e.jsx($e,{card:l,expanded:g,isLast:m===x.length-1,onToggle:()=>C(l.name),onToggleEnabled:v=>void p(l,v),toggleDisabled:l.unknown||f.isPending,children:g?e.jsx(Ge,{owner:a,agentId:t,name:l.name}):null},l.id)})})]})}function $e({card:a,expanded:t,isLast:n,onToggle:s,onToggleEnabled:o,toggleDisabled:r,children:i}){return e.jsxs("div",{className:E("bg-background",!n||t?"border-b":""),children:[e.jsxs("div",{className:"flex items-stretch gap-1 pr-3",children:[e.jsxs("button",{type:"button",onClick:s,"aria-expanded":t,className:E("flex min-w-0 flex-1 items-center gap-3 py-2.5 text-left text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",!a.enabled&&!a.unknown&&!t&&"opacity-70"),children:[e.jsx(q,{className:"ml-2 h-4 w-4 shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[e.jsx("span",{className:E("truncate text-sm text-foreground",a.unknown&&"font-mono text-xs"),children:a.name}),a.kind==="custom"&&a.description?e.jsx("p",{className:"line-clamp-1 text-xs text-muted-foreground",children:a.description}):e.jsx("p",{className:"text-xs text-muted-foreground",children:a.tripCount>0?`${a.tripCount} recent ${a.tripCount===1?"catch":"catches"}`:"No recent catches"}),e.jsx(ue,{badges:a.badges})]})]}),e.jsx(je,{enabled:a.enabled,name:a.name,expanded:t,onToggleEnabled:o,toggleDisabled:r,onToggle:s})]}),t&&i?e.jsx("div",{className:"border-t border-border px-4 py-4",children:i}):null]})}function De({owner:a,agentId:t,expandedName:n}){return e.jsx(J,{children:e.jsx(Re,{owner:a,agentId:t,expandedName:n})})}function Ie({owner:a,agentId:t}){return e.jsx(J,{children:e.jsx(we,{owner:a,agentId:t})})}function Me({owner:a,agentId:t,name:n}){return e.jsx(De,{owner:a,agentId:t,expandedName:decodeURIComponent(n)})}export{De as A,Ie as a,Me as b};
2
- //# sourceMappingURL=agent-guardrails-route-CN7vpC0X.js.map
@@ -1,2 +0,0 @@
1
- import{j as n,L as i,cu as l,ed as d}from"./index-BjcZVe7n.js";import{a as u}from"./client-rows-x_CxeWkP.js";function g({owner:s,item:t,last:c,appearance:r="row"}){const a=r==="inline"?"inline-flex items-center gap-1.5 rounded-md bg-accent px-1.5 py-0.5 text-sm font-medium":`flex items-center gap-3 px-3 py-2.5 text-left text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground ${c?"":"border-b"}`;if(t.kind==="managed"){const e=t.agent,o=[e.status===void 0?null:e.status==="active"?"Working":"Idle",e.connectionCount===void 0?null:`${e.connectionCount} ${e.connectionCount===1?"connection":"connections"}`,e.userCount===void 0?null:`${e.userCount} ${e.userCount===1?"user":"users"}`].filter(Boolean).join(" · ");return n.jsxs(i,{to:"/$owner/agents/$agentId/settings",params:{owner:s,agentId:e.agentId},search:{run_id:void 0},className:a,children:[n.jsx("span",{"aria-hidden":"true",className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground",children:n.jsx(l,{className:"h-4 w-4"})}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm font-medium",children:e.name}),r==="row"&&(o||e.description)?n.jsx("p",{className:"truncate text-xs",children:o||e.description}):null]}),e.status==="active"?n.jsx("span",{role:"img","aria-label":"Working",className:"h-2 w-2 shrink-0 rounded-full bg-emerald-500"}):null]})}if(t.kind==="connected"){const e=t.group;return n.jsxs(i,{to:"/$owner/agents/connected/$clientId",params:{owner:s,clientId:e.clientId},className:a,children:[n.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border text-muted-foreground",children:n.jsx(d,{name:e.title})}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("p",{className:"truncate text-sm font-medium",children:e.title}),n.jsxs("p",{className:"truncate text-xs",children:["Connected · ",u(e)]})]}),n.jsx("span",{role:"img","aria-label":"Connected",className:"h-2 w-2 shrink-0 rounded-full bg-emerald-500"})]})}}export{g as A};
2
- //# sourceMappingURL=agent-list-row-BnP6r4pm.js.map
@@ -1,2 +0,0 @@
1
- import{j as e,bR as B,i as S,a$ as D,b0 as K,b1 as R,gz as X,a6 as G,bK as Y,bJ as Z,bW as V,gA as ee,bX as P,bt as F,bY as se,bS as ne,bZ as te,bT as re,r as A,gB as ae,gC as ie,bO as le,b_ as oe,L as w,gD as de,gE as ce,d5 as W,gF as ue,gG as me,gH as ge,gI as k,cU as L,X as fe,gJ as q,gK as z,gu as xe,d6 as he,gL as be,gM as ye,c1 as pe,gN as je}from"./index-BjcZVe7n.js";const ve={auto:"bg-emerald-500/15 text-emerald-600 dark:text-emerald-400",approval:"bg-amber-500/15 text-amber-600 dark:text-amber-400",deny:"bg-red-500/15 text-red-600 dark:text-red-400"};function Ne({options:n,value:t,floor:o,onChange:a,disabled:i,ariaLabel:m,compact:u}){return e.jsx("div",{role:"radiogroup","aria-label":m,className:S("inline-flex shrink-0 items-stretch gap-0.5 rounded-lg border border-border bg-muted/40 p-0.5"),children:n.map(l=>{const b=X({option:l,floor:o}),h=l===t,g=b.disabled&&!h,y=B[l],f=e.jsx("button",{type:"button",role:"radio","aria-checked":h,disabled:i||g,onClick:()=>{!h&&!g&&!i&&a(l)},className:S("inline-flex shrink-0 items-center justify-center whitespace-nowrap font-medium transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",u?"min-w-[3rem] rounded-md px-2.5 py-1.5 text-xs leading-none":"min-w-[3.25rem] rounded-md px-3 py-1.5 text-sm leading-none",h?S(ve[l],""):"text-muted-foreground hover:bg-background/60 hover:text-foreground",g&&"cursor-not-allowed opacity-40",i&&!g&&"cursor-not-allowed opacity-60"),children:y},l);return g&&b.reason?e.jsxs(D,{children:[e.jsx(K,{asChild:!0,children:e.jsx("span",{className:"inline-flex shrink-0",children:f})}),e.jsx(R,{children:b.reason})]},l):f})})}function M({children:n,controls:t}){return e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-2 px-3 py-2",children:[e.jsx("div",{className:"min-w-40 flex-1 text-sm",children:n}),e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:t})]})}const _e=[{resourceClass:"entity",title:"Entities",sub:"Defaults for every entity type."},{resourceClass:"agent_config",title:"Agents",sub:"Defaults for reading and managing agents."}];function Ae(n,t,o,a,i=null){const m=q(n.floor,t,o,a,i),u=z(n.floor,t,o,a,i)?m:"auto";return(a!==null||i!==null)&&be(n.agent,t,o)?ye(u,k(n,t,o,null)):u}function Se({label:n,response:t,resourceClass:o,action:a,entityTypeSlug:i,targetAgentId:m=null,dimmed:u,pending:l,onSave:b}){const h=q(t.floor,o,a,i,m),g=z(t.floor,o,a,i,m),y=k(t,o,a,i,m),f=Ae(t,o,a,i,m),j=pe(o,a),p=e.jsx("div",{className:S("inline-flex shrink-0",u&&"opacity-45"),children:e.jsx(Ne,{options:j,value:y,floor:f,disabled:l,compact:!0,ariaLabel:n,onChange:b})});return g?e.jsxs(D,{children:[e.jsx(K,{asChild:!0,children:e.jsx("span",{className:"inline-flex shrink-0",children:p})}),e.jsxs(R,{children:["Org floor ",B[h]," — can only go stricter"]})]}):p}function ke(n,t){const o=i=>i.resource_class===t.resource_class&&(i.entity_type_slug??null)===(t.entity_type_slug??null)&&(i.operation_key??null)===(t.operation_key??null)&&(i.target_agent_id??null)===(t.target_agent_id??null),a=n.map(i=>o(i)?t:i);return a.some(o)?a:[...a,t]}function Ce(n,t,o,a,i,m){const u=je(n,t,o,a);return u[i]=m,u}const $="font-medium text-foreground hover:text-primary hover:underline";function Ee({type:n}){return e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(W,{icon:n.icon,className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"font-medium",children:n.name}),e.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:n.slug})]})}function Q({label:n,disabled:t,hint:o,searchPlaceholder:a,emptyText:i,children:m}){return t?e.jsxs("div",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:[n,o?` ${o}`:""]}):e.jsx(xe,{contentClassName:"w-[min(100vw-2rem,22rem)]",searchPlaceholder:a,emptyText:i,trigger:u=>e.jsxs("button",{type:"button","aria-expanded":u,className:"flex w-full items-center gap-1.5 px-3 py-1.5 text-left text-xs text-primary hover:bg-muted/50",children:[e.jsx(he,{className:"h-3 w-3"}),n]}),children:u=>m(u)})}function Te({pending:n,onClick:t,label:o}){return e.jsx("button",{type:"button",disabled:n,onClick:t,"aria-label":o,className:"rounded p-0.5 text-muted-foreground hover:bg-red-500/10 hover:text-red-600 disabled:opacity-50 dark:hover:text-red-400",children:e.jsx(fe,{className:"h-3 w-3"})})}function $e({owner:n,agentId:t,variant:o="agent"}){const a=o==="org-floor",i=G(),m=Y(n,t??"",{enabled:!a&&!!t}),u=Z(n,{enabled:a}),{data:l,isLoading:b,isError:h,error:g}=a?u:m,y=a?V(n):ee(n,t??""),f=P({mutationFn:r=>a?se(n,r):ne(n,t??"",r),onSuccess:r=>{i.setQueryData(y,c=>c&&{...c,agent:ke(c.agent,r)}),i.invalidateQueries({queryKey:y}),a&&i.invalidateQueries({queryKey:["agent-permissions"]})},onError:r=>{F.error(r instanceof Error?r.message:"Failed to save permission")}}),j=P({mutationFn:r=>a?te(n,r):re(n,t??"",r),onSuccess:()=>{i.invalidateQueries({queryKey:y}),a&&i.invalidateQueries({queryKey:["agent-permissions"]})},onError:r=>{F.error(r instanceof Error?r.message:"Failed to remove override")}}),p=f.isPending||j.isPending,C=A.useMemo(()=>l?ae(l):[],[l]),E=A.useMemo(()=>{if(!l)return[];const r=new Set(C.map(c=>c.slug));return l.entity_types.filter(c=>!r.has(c.slug))},[l,C]),v=A.useMemo(()=>l?ie(l):[],[l]),N=A.useMemo(()=>{if(!l)return[];const r=new Set(v.map(c=>c.id));return l.agents.filter(c=>(a||c.id!==t)&&!r.has(c.id))},[l,v,t,a]);if(b)return e.jsx(le,{label:"permissions",variant:"cards",cards:2});if(h||!l)return e.jsx(oe,{label:g instanceof Error?g.message:"permissions"});const x=l,H=(r,c,T,_,s=null)=>{const d=Ce(x,r,c,s,T,_);f.mutate({resource_class:r,effects:d,entity_type_slug:c,target_agent_id:s})},I=x.entity_types.length===0?"— none yet":E.length===0?"— all covered":null,J=N.length===0&&v.length===0?"— no other agents":N.length===0?"— all covered":null;return e.jsxs("div",{className:"space-y-4",children:[a?null:e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Manage connector rules and agent restrictions in"," ",e.jsx(w,{to:"/$owner/settings/organization",params:{owner:n},search:{agent:t},hash:"policies",className:$,children:"Organization policies"}),"."]}),_e.map(r=>{const c=r.resourceClass==="entity",T=r.resourceClass==="agent_config",_=[{key:"default",label:"Default",name:"Default",entityTypeSlug:null,targetAgentId:null,owned:!1,diffs:0},...c?C.map(s=>({key:`entity:${s.slug}`,name:s.name,label:e.jsx(w,{to:"/$owner/entity-types/$slug",params:{owner:n,slug:s.slug},className:$,title:`Open ${s.name}`,children:e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(W,{icon:s.icon,className:"h-3.5 w-3.5 shrink-0"}),s.name]})}),entityTypeSlug:s.slug,targetAgentId:null,owned:ce(x,s.slug),diffs:de(x,s.slug)})):v.map(s=>({key:`agent:${s.id}`,name:s.name,label:e.jsx(w,{to:"/$owner/agents/$agentId/settings",params:{owner:n,agentId:s.id},search:{run_id:void 0},className:$,title:`Open ${s.name}`,children:s.name}),entityTypeSlug:null,targetAgentId:s.id,owned:me(x,s.id),diffs:ue(x,s.id)}))];return e.jsxs("section",{className:"space-y-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:"text-sm font-medium",children:r.title}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r.sub})]}),e.jsxs("div",{className:"divide-y overflow-hidden rounded-lg border",children:[_.map(s=>e.jsxs("div",{className:"divide-y",children:[_.length>1&&e.jsx("div",{className:"bg-muted/30",children:e.jsx(M,{controls:s.owned?e.jsx(Te,{pending:p,label:`Remove ${s.name} exception`,onClick:()=>j.mutate({resource_class:r.resourceClass,entity_type_slug:s.entityTypeSlug,target_agent_id:s.targetAgentId})}):null,children:e.jsxs("div",{className:"flex items-center gap-2",children:[s.label,s.key!=="default"&&!s.owned?e.jsx("span",{className:"text-xs text-muted-foreground",children:"Organization minimum"}):s.diffs>0?e.jsxs("span",{className:"text-xs text-muted-foreground",children:[s.diffs," ",s.diffs===1?"change":"changes"]}):null]})})}),e.jsx("div",{className:"divide-y",children:ge[r.resourceClass].filter(d=>!s.targetAgentId||d!=="create").map(d=>{const O=`${d.charAt(0).toUpperCase()+d.slice(1)} ${c?"entities":"agents"}`;return e.jsx(M,{controls:e.jsx(Se,{label:`${s.name}: ${O}`,response:x,resourceClass:r.resourceClass,action:d,entityTypeSlug:s.entityTypeSlug,targetAgentId:s.targetAgentId,dimmed:s.key!=="default"&&k(x,r.resourceClass,d,s.entityTypeSlug,s.targetAgentId)===k(x,r.resourceClass,d,null),pending:p,onSave:U=>H(r.resourceClass,s.entityTypeSlug,d,U,s.targetAgentId)}),children:O},d)})})]},s.key)),e.jsxs("div",{className:"border-t",children:[c?e.jsx(Q,{label:"Add type",disabled:p||E.length===0,hint:I,searchPlaceholder:"Search types…",emptyText:"No matching types.",children:s=>E.map(d=>e.jsx(L,{value:`${d.name} ${d.slug}`,onSelect:()=>{f.mutate({resource_class:"entity",effects:{},entity_type_slug:d.slug}),s()},className:"cursor-pointer",children:e.jsx(Ee,{type:d})},d.slug))}):null,T?e.jsx(Q,{label:"Add agent",disabled:p||N.length===0,hint:J,searchPlaceholder:"Search agents…",emptyText:"No matching agents.",children:s=>N.map(d=>e.jsxs(L,{value:`${d.name} ${d.id}`,onSelect:()=>{f.mutate({resource_class:"agent_config",effects:{},target_agent_id:d.id}),s()},className:"cursor-pointer",children:[e.jsx("span",{className:"font-medium",children:d.name}),e.jsx("span",{className:"ml-1.5 font-mono text-[10px] text-muted-foreground",children:d.id})]},d.id))}):null]})]})]},r.resourceClass)})]})}export{$e as A,Ne as P,M as a};
2
- //# sourceMappingURL=agent-permissions-matrix-DSjidWHL.js.map
@@ -1,2 +0,0 @@
1
- import{c as D,r as g,j as e,d6 as F,H as N,I as K,eL as P,bP as O,B as C,i as R,dh as _,hx as H,hy as z,b2 as G,hJ as Q,fP as Y,j9 as J}from"./index-BjcZVe7n.js";import{u as w,b as V,f as X,s as q,a as U,S as W,v as Z,c as ee}from"./agent-skill-context-1DBn7Xc_.js";import{b as se,a as te,A as E}from"./agent-tab-intro-DKrC3SQt.js";import{u as ae,a as L,m as ne,P as le,D as ie,n as oe,C as re}from"./core.esm-BsXtvNoI.js";import{f as ce}from"./agent-loading-shells-_18OREnx.js";import{A as de}from"./agent-card-controls-DuQJhtqp.js";const T=":";function A(s){const t=s.indexOf("/");return t<0?s:`${s.slice(0,t)}${T}${s.slice(t+1)}`}function B(s){const t=s.indexOf(T);return t<0?s:`${s.slice(0,t)}/${s.slice(t+1)}`}function me({owner:s,agentId:t}){const a=D(),[n,i]=g.useState(""),[o,d]=g.useState(!1),[x,k]=g.useState(""),[r,b]=g.useState(""),{skillRows:m,catalog:p,isLoading:u,addSkillFromCatalog:h,addCustomSkill:S}=w(),v=g.useMemo(()=>new Set(m.map(c=>c.repo)),[m]),f=g.useMemo(()=>V(p?.catalog??[],v),[p?.catalog,v]),l=g.useMemo(()=>X(f,n),[f,n]),y=c=>{h(c),a({to:"/$owner/agents/$agentId/skills/$skillKey",params:{owner:s,agentId:t,skillKey:A(c)}})},j=()=>{const c=S({name:x,instructions:r});c&&a({to:"/$owner/agents/$agentId/skills/$skillKey",params:{owner:s,agentId:t,skillKey:A(c)}})},$=e.jsx(se,{title:"Add a skill",description:"Skills bundle instructions, tools, and knowledge an agent can reuse. Pick one from the catalog or create your own."});return e.jsxs("div",{className:"space-y-6",children:[$,e.jsx("div",{className:R(_,"w-full"),children:o?e.jsxs("div",{className:"space-y-3 p-3",children:[e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(N,{htmlFor:"custom-skill-name",children:"Name"}),e.jsx(K,{id:"custom-skill-name",value:x,onChange:c=>k(c.target.value),placeholder:"my-skill"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(N,{htmlFor:"custom-skill-instructions",children:"Instructions"}),e.jsx(P,{id:"custom-skill-instructions",value:r,onChange:c=>b(c.target.value),placeholder:"Instructions for the agent when this skill is active...",rows:3})]})]}),e.jsx(O,{onCancel:()=>d(!1),children:e.jsx(C,{type:"button",size:"sm",onClick:j,disabled:!x.trim(),children:"Add custom skill"})})]}):e.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-3 text-left text-muted-foreground transition-colors hover:text-foreground",onClick:()=>d(!0),children:[e.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted",children:e.jsx(F,{className:"h-4 w-4"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Create custom skill"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Define instructions and packages"})]})]})}),u?e.jsx(H,{}):e.jsx(z,{items:l,searchQuery:n,onSearchChange:i,onSelect:c=>y(c.key),searchPlaceholder:"Search skills...",searchAriaLabel:"Search skills",emptyMessage:n.trim()?`No skills match "${n}"`:f.length===0?"All catalog skills are already configured":"No skills available"})]})}function ue({row:s}){const{isSaving:t,updateSkillRow:a}=w(),n=s.system===!0;return e.jsx("div",{className:"space-y-6",children:n?e.jsx("p",{className:"text-sm text-muted-foreground",children:"System skill metadata is managed by Lobu. You can enable or disable it and change its position in the skill list."}):e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(N,{htmlFor:"skill-name",children:"Name"}),e.jsx(K,{id:"skill-name",value:s.name,onChange:i=>a(s.repo,{name:i.target.value}),disabled:t})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(N,{htmlFor:"skill-instructions",children:"Instructions"}),e.jsx(P,{id:"skill-instructions",value:s.instructions??"",onChange:i=>{const o=i.target.value;a(s.repo,{instructions:o,content:o.trim()||s.name})},rows:4,disabled:t})]})]})})}function ge({owner:s,agentId:t,skillKey:a}){const n=D(),[i,o]=g.useState(!1),d=B(a),{skillRows:x,catalog:k,isSaving:r,saveSkills:b,removeSkillAndSave:m,addSkillFromCatalog:p}=w(),u=x.find(f=>f.repo===d)??null,h=k?.catalog.find(f=>f.repo===d);g.useEffect(()=>{!u&&h&&p(d)},[p,h,d,u]);const S=async()=>{await m(d)&&(o(!1),n({to:"/$owner/agents/$agentId/skills",params:{owner:s,agentId:t}}))};if(!u)return h?null:e.jsx("p",{className:"text-sm text-muted-foreground",children:"Skill not found."});const v=!u.system;return e.jsxs("div",{className:"space-y-6",children:[e.jsx(ue,{row:u}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-end",children:[v?i?e.jsxs(e.Fragment,{children:[e.jsx(C,{type:"button",variant:"destructive",onClick:()=>void S(),disabled:r,children:r?"Removing...":"Remove skill"}),e.jsx(C,{type:"button",variant:"outline",onClick:()=>o(!1),disabled:r,children:"Cancel"})]}):e.jsxs(C,{type:"button",variant:"outline",className:"text-destructive hover:text-destructive",onClick:()=>o(!0),disabled:r,children:["Remove ",u.name]}):null,e.jsx(C,{type:"button",onClick:()=>void b(),disabled:r||i,children:r?"Saving...":"Save changes"})]})]})}function xe(s){return s.map(t=>{const a=q(t).map(String);return{id:t.repo,repo:t.repo,name:t.name,description:t.description,badges:a,enabled:t.enabled}})}const I="Skills bundle instructions, tools, and knowledge an agent can reuse. Add one from the catalog or write your own; drag to set which the agent reaches for first.";function M({owner:s,agentId:t,expandedRepo:a}){const n=D(),{skillRows:i,catalog:o,isLoading:d,isSaving:x,reorderSkills:k,setSkillEnabledAndSave:r,addSkillFromCatalog:b}=w();g.useEffect(()=>{a&&(i.some(l=>l.repo===a)||o?.catalog.some(l=>l.repo===a)&&b(a))},[a,i,o,b]);const m=g.useMemo(()=>xe(i),[i]),p=g.useMemo(()=>m.map(l=>l.repo),[m]),u=ae(L(le,{activationConstraint:{distance:8}}),L(ne,{coordinateGetter:U})),h=()=>{n({to:"/$owner/agents/$agentId/skills/create",params:{owner:s,agentId:t}})},S=e.jsxs(C,{type:"button",onClick:h,children:[e.jsx(F,{className:"mr-1.5 h-4 w-4"}),"Add skill"]}),v=l=>{if(l===a){n({to:"/$owner/agents/$agentId/skills",params:{owner:s,agentId:t}});return}n({to:"/$owner/agents/$agentId/skills/$skillKey",params:{owner:s,agentId:t,skillKey:A(l)}})},f=l=>{const{active:y,over:j}=l;!j||y.id===j.id||k(String(y.id),String(j.id))};return d?e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:I}),e.jsx(ce,{rows:2})]}):m.length===0?e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:I}),e.jsx(G,{icon:Q,title:"No skills yet",description:"Add a system skill from the catalog or create a custom skill for this agent.",actionLabel:"Add skill",onAction:h})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsx(te,{description:I,action:S}),e.jsx(ie,{sensors:u,collisionDetection:oe,onDragEnd:f,children:e.jsx(W,{items:p,strategy:Z,children:e.jsx("div",{className:"overflow-hidden rounded-lg border",children:m.map((l,y)=>{const j=l.repo===a;return e.jsx(he,{card:l,rank:y+1,disabled:x,expanded:j,isLast:y===m.length-1,onToggle:()=>v(l.repo),onToggleEnabled:$=>void r(l.repo,$),toggleDisabled:x,children:j?e.jsx(ge,{owner:s,agentId:t,skillKey:A(l.repo)}):null},l.id)})})})})]})}function he({card:s,rank:t,disabled:a,expanded:n,isLast:i,onToggle:o,onToggleEnabled:d,toggleDisabled:x,children:k}){const r=a||n,{attributes:b,listeners:m,setNodeRef:p,transform:u,transition:h,isDragging:S}=ee({id:s.repo,disabled:r}),v={transform:re.Transform.toString(u),transition:h};return e.jsxs("div",{ref:p,style:v,className:R("bg-background",!i||n?"border-b":"",S&&"z-10 bg-card opacity-80 "),children:[e.jsxs("div",{className:"flex items-stretch gap-1 pr-3",children:[e.jsx("button",{type:"button",className:"flex shrink-0 cursor-grab touch-none items-center px-2 text-muted-foreground hover:text-foreground active:cursor-grabbing disabled:cursor-not-allowed disabled:opacity-50","aria-label":`Reorder ${s.name}`,disabled:r,...b,...m,children:e.jsx(Y,{className:"h-4 w-4"})}),e.jsxs("button",{type:"button",className:R("flex min-w-0 flex-1 items-center gap-3 py-2.5 text-left text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",!s.enabled&&!n&&"opacity-70"),onClick:o,"aria-expanded":n,children:[e.jsx("span",{className:"w-4 shrink-0 text-center text-xs tabular-nums text-muted-foreground",children:t}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[e.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:s.name}),s.description?e.jsx("p",{className:"line-clamp-1 text-xs text-muted-foreground",children:s.description}):null,e.jsx(J,{badges:s.badges})]})]}),e.jsx(de,{enabled:s.enabled,name:s.name,expanded:n,onToggleEnabled:d,toggleDisabled:x,onToggle:o})]}),n&&k?e.jsx("div",{className:"border-t border-border px-4 py-4",children:k}):null]})}function Se({owner:s,agentId:t}){return e.jsx(E,{children:e.jsx(M,{owner:s,agentId:t})})}function ye({owner:s,agentId:t}){return e.jsx(E,{children:e.jsx(me,{owner:s,agentId:t})})}function Ce({owner:s,agentId:t,skillKey:a}){return e.jsx(E,{children:e.jsx(M,{owner:s,agentId:t,expandedRepo:B(a)})})}export{Se as A,ye as a,Ce as b};
2
- //# sourceMappingURL=agent-skills-route-d5jh3oBR.js.map
@@ -1,2 +0,0 @@
1
- import{j as e,al as n,i as a}from"./index-BjcZVe7n.js";function l({children:t,className:s}){return e.jsx(n,{className:a("pb-8",s),children:t})}function x({title:t,description:s}){return e.jsxs("div",{className:"mb-2 space-y-1",children:[e.jsx("h1",{className:"text-center text-xl font-semibold",children:t}),e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:s})]})}function c({description:t,action:s}){return e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsx("p",{className:"min-w-0 flex-1 text-sm text-muted-foreground",children:t}),s?e.jsx("div",{className:"shrink-0",children:s}):null]})}export{l as A,c as a,x as b};
2
- //# sourceMappingURL=agent-tab-intro-DKrC3SQt.js.map
@@ -1,2 +0,0 @@
1
- function r(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID().replace(/-/g,"").slice(0,12):Math.random().toString(36).slice(2,14)}export{r as n};
2
- //# sourceMappingURL=agent-thread-storage-U6htL3ad.js.map
@@ -1,2 +0,0 @@
1
- import{j as t,O as o}from"./index-BjcZVe7n.js";const n=()=>t.jsx(o,{});export{n as component};
2
- //# sourceMappingURL=agents-kXojozTU.js.map
@@ -1,2 +0,0 @@
1
- import{c as M,w as I,q as L,at as N,bb as w,r as O,hJ as R,hK as W,c5 as E,hL as _,hM as D,j as t,ak as U,al as y,gT as B,L as f,gU as k,O as F,i as G,v as P,eI as q,aq as K}from"./index-BjcZVe7n.js";import{A as z}from"./agent-editor-form-BXQBFHSv.js";import{P as H}from"./proposal-review-shell-BED-DO9C.js";import{n as J}from"./nav-pill-Bam6s3jj.js";const b=[{key:"skills",label:"Skills",icon:R},{key:"guardrails",label:"Guardrails",icon:W},{key:"permissions",label:"Permissions",icon:E,adminOnly:!0},{key:"models",label:"Models",icon:_},{key:"settings",label:"Settings",icon:D}];function T(s){return b.filter(e=>!e.adminOnly||s)}function Q(s,e){if(e===`${s}/conversations`||e.startsWith(`${s}/conversations/`))return null;for(const{key:n}of b)if(e===`${s}/${n}`||e.startsWith(`${s}/${n}/`))return n;return e===`${s}/identity`||e===`${s}/identity/`?"settings":null}function V(s){return s.trim().charAt(0).toUpperCase()||"?"}function X({owner:s,agentId:e,agentName:n,activeDest:a}){const{orgContext:r}=P(),{isAdmin:l}=q(r.organizationId),c=T(!!l);return t.jsxs("div",{className:"flex shrink-0 flex-col items-center gap-2",children:[t.jsxs(f,{to:"/$owner/agents/$agentId/settings",params:{owner:s,agentId:e},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(n)}),t.jsx("h1",{className:"min-w-0 truncate text-base font-semibold tracking-tight",children:n})]}),t.jsx("nav",{"aria-label":"Agent sections",className:"flex min-w-0 max-w-full flex-wrap items-center justify-center gap-1",children:c.map(({key:d,label:u,icon:g})=>{const o=d===a;return t.jsxs(f,{to:`/$owner/agents/$agentId/${d}`,params:{owner:s,agentId:e},"aria-current":o?"page":void 0,className:J(o,"shrink-0 gap-1.5 px-2.5 py-1 text-sm"),children:[t.jsx(g,{className:"h-3.5 w-3.5 shrink-0"}),u]},d)})})]})}function ns({owner:s,agentId:e}){const n=M(),{pathname:a}=I(),{isAuthenticated:r}=L(),{isMember:l}=N(),c=r&&l,{data:d=[],isLoading:u}=w({enabled:c}),g=d.find(A=>A.agentId===e)??null,o=!g&&!u&&c,m=`/${s}/agents/${e}`,x=`${m}/conversations`,h=a===x||a.startsWith(`${x}/`),i=Q(m,a);O.useEffect(()=>{o&&n({to:"/$owner",params:{owner:s},replace:!0})},[o,n,s]);const v=g?.name??"Agent",j=b.find(A=>A.key===i)?.label??"Conversations",p=a.slice(m.length+1).split("/")[1],C=i==="settings"&&!p,S=C?v:p?p==="create"?i==="skills"?"Add a skill":"New custom guardrail":i==="skills"?"Skill details":i==="guardrails"?"Guardrail details":"Conversation":j;return t.jsxs(U,{className:"gap-3 overflow-hidden pt-2.5 pb-8",children:[t.jsx(y,{children:t.jsx(B,{crumbs:[t.jsx(f,{to:"/$owner/agents",params:{owner:s},className:k,children:"Agents"},"agents"),...C?[]:[t.jsx(f,{to:"/$owner/agents/$agentId/settings",params:{owner:s,agentId:e},search:{run_id:void 0},className:k,children:v},"agent")],...p&&i?[t.jsx(f,{to:`/$owner/agents/$agentId/${i}`,params:{owner:s,agentId:e},className:k,children:j},"section")]:[]],current:S})}),t.jsx(X,{owner:s,agentId:e,agentName:v,activeDest:i}),t.jsx("div",{className:G("flex min-h-0 min-w-0 flex-1 flex-col",h?"overflow-hidden":"overflow-y-auto"),children:t.jsx(F,{})})]})}function Y({agent:s,tab:e,runId:n}){return t.jsx(y,{className:"pb-6",children:t.jsx(H,{resource:{kind:"agent",agentId:s.agentId},runId:n,children:({reviewMode:a,proposal:r,controlsDisabled:l})=>t.jsx(z,{mode:{kind:"edit",agent:s},section:e,reviewMode:a,reviewProposal:r,reviewControlsDisabled:l},s.agentId)})})}function as({owner:s,agentId:e,tab:n,runId:a}){const{orgContext:r,hasOrgContext:l}=P(),{isLoading:c}=K(`/${s}`,r),{isAuthenticated:d}=L(),{isMember:u,isLoading:g}=N(),o=d&&u,{data:m=[],isLoading:x}=w({enabled:o}),$=o?!l||c||x||g:c||g,h=m.find(i=>i.agentId===e)??null;return $||!h?null:t.jsx(Y,{agent:h,tab:n,runId:a})}export{ns as A,as as a};
2
- //# sourceMappingURL=agents-workbench-CDpJmUVN.js.map
@@ -1,2 +0,0 @@
1
- import{r as c,iF as b,aW as w,aG as y,b7 as C,aJ as u,j as e,al as k,L as o,gl as j,B as v,gk as A,iR as P,gi as g,gS as R,gT as B,gU as D,A as $,Y as I,fg as L,iS as M,az as z}from"./index-BjcZVe7n.js";import{C as E}from"./connector-page-shell-Di6XzkVo.js";import{C as O}from"./connections-browser-BXsJqieG.js";import"./connection-label-BobuYiAG.js";import"./status-dot-BnQPFrcU.js";function T({ownerSlug:s,appId:a}){const n=c.useMemo(()=>b(s,a,w()),[s,a]),{data:r=[],isLoading:l,isError:d,refetch:N}=y(),[m,x]=c.useMemo(()=>{const t=n?.devicePlatforms;if(!t?.length)return[[],[]];const h=r.filter(i=>{const f=C(i);return f!=null&&t.includes(f)});return[h.filter(i=>u(i,s)),h.filter(i=>!u(i,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(o,{to:"/$owner/connectors",params:{owner:s},search:{},className:"text-sm text-primary hover:underline",children:"Back to connectors"})]});const p=(n.devicePlatforms?.length??0)>0;return e.jsx("div",{className:"flex flex-1 flex-col",children:e.jsxs(E,{header:e.jsx(R,{breadcrumb:e.jsx(B,{crumbs:[e.jsx(o,{to:"/$owner/connectors",params:{owner:s},search:{},className:D,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(_,{step:t},t.label))})})}),p?e.jsx(O,{entries:m.map(t=>({id:t.id,name:g(t),description:P(t,s),tone:t.online?null:"muted",link:A({to:"/$owner/connectors/device/$deviceId",params:{owner:s,deviceId:t.id}})})),isLoading:l,isError:d,onRetry:()=>void N(),action:e.jsx(v,{asChild:!0,variant:"outline",size:"sm",children:e.jsx("a",{href:"#setup",children:"Add connection"})})}):null,p&&!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(o,{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:g(t)}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["Attached to"," ",t.organization_name??"another workspace"]})]})},t.id))})]}):null]})})}function _({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($,{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(v,{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(I,{className:"h-3.5 w-3.5"}):e.jsx(L,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"sr-only",children:"Copy"})]})]})]})}function H(){const{owner:s,appId:a}=M.useParams();return e.jsx(z,{owner:s,children:({ownerSlug:n})=>e.jsx(T,{ownerSlug:n,appId:a})})}export{H as component};
2
- //# sourceMappingURL=app._appId-DwNeXRJp.js.map
@@ -1,2 +0,0 @@
1
- import{c as b,bb as k,r as o,jq as v,j as e,L as x,B as M,jr as P,cx as S}from"./index-BjcZVe7n.js";import{u as y,a as R,M as C}from"./use-mention-search-CJGCatFS.js";import{P as I,s as A}from"./pending-seed-BP3xHM2d.js";import{n as E}from"./agent-thread-storage-U6htL3ad.js";import"./index-Vcq4gwWv.js";import"./use-automations-D9hKpufo.js";function $({ownerSlug:i,starters:m,preferredMentionKinds:u,onSent:f}){const g=b(),{data:j=[]}=k(),l=y(C),n=o.useMemo(()=>new Set(u??[]),[u]),N=o.useCallback(async d=>{const t=await l(d);return n.size===0?t:[...t].sort((a,w)=>Number(n.has(w.kind))-Number(n.has(a.kind)))},[n,l]),r=v(j),[s,h]=o.useState(""),p=o.useRef(s);p.current=s;const c=d=>{const t=d.trim();if(!t||!r)return;const a=E();A(a,t),h(""),g(S(i,r.agentId,a)),f?.()};return e.jsxs("div",{className:"rounded-lg border bg-background p-4 transition-colors focus-within:ring-1 focus-within:ring-ring",children:[r?e.jsx(R,{value:s,onChange:h,onSubmit:()=>c(p.current),searchRefs:N,placeholder:"Ask Lobu…",className:"[&_.ProseMirror]:max-h-40 [&_.ProseMirror]:min-h-24 [&_.ProseMirror]:overflow-y-auto"}):e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Bring your"," ",e.jsx(x,{to:"/$owner/agents/connect",params:{owner:i},className:"text-foreground hover:underline",children:"agent"})," ","or"," ",e.jsx(x,{to:"/$owner/agents/new",params:{owner:i},search:{},className:"text-foreground hover:underline",children:"create a new agent"})," ","to get started."]}),e.jsxs("div",{className:"flex items-end justify-between gap-3 pt-2",children:[r&&m&&!s.trim()?e.jsx(I,{prompts:m,onPick:c}):e.jsx("span",{}),e.jsxs(M,{type:"button",size:"icon",className:"h-10 w-10 shrink-0 rounded-full",disabled:!r||!s.trim(),onClick:()=>c(s),children:[e.jsx(P,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Send message"})]})]})]})}export{$ as AssistComposer};
2
- //# sourceMappingURL=assist-composer-Mn9EfX4X.js.map
@@ -1,2 +0,0 @@
1
- import{v,j as n,L as N,cp as b,aq as S,q as w,at as D,r as h,cP as R,u as O,hA as T,S as $,cQ as E,bN as F}from"./index-BjcZVe7n.js";import{C as L,A as P}from"./create-automation-form-C9PMX7N8.js";import{P as q}from"./proposal-review-shell-BED-DO9C.js";import{E as J}from"./events-feed-CGzA1w3R.js";import{D as M,a as B}from"./definition-comparison-B5WgZILB.js";import{b as A}from"./use-automations-D9hKpufo.js";import{b as H}from"./model-C2q7WDcS.js";function C({automationId:i}){const{currentOwner:t}=v();return t?n.jsx(N,{to:"/$owner/events",params:{owner:t},search:b({semanticTypes:["change"],eventCategory:"config",resourceKind:"automation",resourceId:i}),className:"text-sm text-primary underline underline-offset-4",children:"View definition history in Events"}):null}function k(i){const{orgContext:t,hasOrgContext:r}=v(),{data:o,isLoading:a}=S(`/${i}`,t),{isAuthenticated:d}=w(),{isMember:u,isLoading:c}=D(),g=d&&u,s=o?.workspace,f=g?!r||a||c:a||c;return{organizationId:s?.id??"",isLoading:f}}function z(i){return k(i)}function K({owner:i,automationId:t,organizationId:r}){const o=Number(t),a=h.useMemo(()=>({producedByAutomationId:o}),[o]),d=O(),u=A(t,void 0,r),c=u.data?.automation?.automation_name?.trim()||null,g=H(u.data?.automation),{data:s}=T(g,t,{orgSlug:i}),f=h.useMemo(()=>(s?.runs??[]).map(e=>({runId:e.runId,status:e.status,completedAt:e.completedAt})),[s]),p=h.useCallback(e=>{d?.open({href:`/${i}/automations/${t}?view=activity&run_id=${e}`,title:c!=null?`${c} · Run #${e}`:`Automation run #${e}`,runId:e})},[d,i,t,c]);return Number.isFinite(o)?n.jsx(J,{organizationId:r,ownerSlug:i,filters:a,groupByRun:!0,onRunSelect:p,runs:f,hideRunAction:!0,hideAttribution:!0,emptyState:n.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 Q({agentId:i,automationId:t,runId:r,organizationId:o,onDone:a}){const[d,u]=h.useState({ready:!1,triggers:[]}),c=h.useCallback(l=>{u(m=>JSON.stringify(m)===JSON.stringify(l)?m:l)},[]),g=A(t,void 0,o,{includeVersions:!0}),s=g.data?.automation,{currentOwner:f}=v(),p=R({queryKey:["automations-list",f,"editor",t,s?.status],enabled:!!f&&!!o&&!!s,queryFn:async()=>{const m=(await E("manage_automations",{action:"list",automation_id:t,status:s?.status,include_details:!0,limit:1},{slug:f})).automations.find(y=>y.automation_id===t);if(!m)throw new F("Automation not found",404);return m},staleTime:3e4}),e=p.data,x=h.useMemo(()=>s&&e?{automation_id:s.automation_id,name:e.name,slug:e.slug,description:e.description,prompt:e.prompt,sources:e.sources,reaction_script:s.reaction_script,managed_agent_id:e.managed_agent_id,device_worker_id:e.device_worker_id,agent_kind:e.agent_kind,delivery_target:e.delivery_target??void 0,execution_config:e.execution_config??void 0,model_config:e.model_config,tags:e.tags,keying_config:s.keying_config,reactions_guidance:e.reactions_guidance,triggers:e.triggers}:void 0,[s,e]),_=n.jsx("div",{className:"flex flex-col gap-4",children:[0,1,2].map(l=>n.jsx($,{className:"h-16 w-full rounded-lg"},l))}),j=p.isError?n.jsxs("div",{role:"alert",className:"space-y-2 text-sm",children:[n.jsx("p",{children:"Could not load the saved Automation definition."}),n.jsx("button",{type:"button",className:"text-primary underline underline-offset-4",onClick:()=>void p.refetch(),children:"Retry"})]}):g.isLoading||s&&p.isPending?_:x?n.jsx(L,{organizationId:o,prefillAgentId:i??void 0,editingAutomation:x,createFields:{triggers:d.triggers},triggerFields:n.jsx(P,{organizationId:o,initialTriggers:x.triggers??[],onChange:c},JSON.stringify(x.triggers??[])),hideHeader:!0,hideCancel:!0,submitDisabled:!d.ready,onClose:a}):n.jsx("p",{className:"text-sm text-muted-foreground",children:"Automation not found. It may have been removed."});return i?n.jsxs("div",{className:"space-y-6",children:[n.jsx(q,{resource:{kind:"automation",agentId:i,automationId:t},runId:r,onDone:a,children:({reviewMode:l,proposal:m})=>l==="active"?n.jsx(M,{current:m?.current??null,proposed:{...m?.current??{},...m?.proposedAfter??{}},render:y=>n.jsx(B,{value:y})}):l==="loading"?_:l==="error"?null:j}),n.jsx(C,{automationId:t})]}):n.jsxs("div",{className:"space-y-6",children:[j,n.jsx(C,{automationId:t})]})}function I({owner:i,agentId:t,automationId:r,view:o,runId:a,onDone:d}){const{organizationId:u}=k(i),c=A(r,void 0,u),g=t??c.data?.automation?.managed_agent_id??null;return a||o==="definition"?n.jsx(Q,{agentId:g,automationId:r,runId:a,organizationId:u,onDone:d},`${i}/${r}`):n.jsx(K,{owner:i,automationId:r,organizationId:u})}export{I as A,z as u};
2
- //# sourceMappingURL=automation-detail-content-Bs3vwAPd.js.map
@@ -1,2 +0,0 @@
1
- import{fh as b,fi as g,cL as k,j as e,L as j,V as r,b8 as y,W as C,fj as d,fk as A,d1 as $,ek as p,eq as M,ct as I}from"./index-BjcZVe7n.js";const m="bg-muted text-muted-foreground",R={event:{label:"Event",icon:k},schedule:{label:"Schedule",icon:g},manual:{label:"Manual",icon:b}};function S({agentName:n,deviceLabel:s,executorKind:i}){const t=i==="script"?{label:"Script",icon:d}:i==="external"?{label:"External executor",icon:d}:s?{label:s,icon:A}:n?{label:n,icon:$}:{label:"Manual · any client",icon:d},{label:l,icon:c}=t;return e.jsxs(r,{variant:"secondary",className:m,children:[e.jsx(c,{className:"h-3 w-3"}),l]})}function E({lastRunAt:n,nextRunAt:s,repliesToSource:i}){const t=n?`Ran ${p(n)}`:s?`Next run ${p(s)}`:i?"Replies to incoming messages":"Never run";return e.jsxs(r,{variant:"secondary",className:m,children:[e.jsx(M,{className:"h-3 w-3"}),t]})}function L({count:n}){return n<=0?null:e.jsxs(r,{variant:"secondary",className:m,children:[e.jsx(I,{className:"h-3 w-3"}),n," ",n===1?"client":"clients"]})}function B({automation:n,agentName:s,deviceLabel:i,connectorDisplay:t,owner:l,actions:c,rowClass:v,appearance:N="row"}){const a=n.automation,o=a.execution_config?.executor,_=o&&typeof o=="object"?o.kind:void 0,u=a.automation_id,x=R[n.kind],w=a.entity_name&&a.entity_type?`${a.entity_name} · ${a.entity_type}`:null,h=[n.when,w].filter(Boolean).join(" — "),f=a.health==="degraded"?a.health_reasons?.[0]||"Needs attention":null;return N==="inline"?e.jsxs(j,{to:"/$owner/automations/$automationId",params:{owner:l,automationId:u},search:{view:"definition",run_id:void 0},className:"inline-flex items-center gap-1.5 rounded-md bg-accent px-1.5 py-0.5 text-sm font-medium",children:[e.jsx(x.icon,{className:"h-3.5 w-3.5 shrink-0"}),n.does,a.status==="archived"?e.jsx(r,{variant:"outline",children:"Archived"}):null]}):e.jsxs("div",{className:v,children:[e.jsxs(j,{to:"/$owner/automations/$automationId",params:{owner:l,automationId:u},search:{view:"definition",run_id:void 0},className:"flex min-w-0 flex-1 items-center gap-3",children:[t?e.jsx(y,{icon:t.icon,iconUrl:t.iconUrl,name:t.name,faviconDomain:t.faviconDomain,className:"h-7 w-7 shrink-0 rounded-md text-[10px]"}):e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(x.icon,{className:"h-3.5 w-3.5 text-muted-foreground"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:n.does}),a.status==="archived"?e.jsx(r,{variant:"outline",children:"Archived"}):null,e.jsx(S,{agentName:s,deviceLabel:i,executorKind:_}),e.jsx(E,{lastRunAt:a.last_run_completed_at??a.last_fired_at??null,nextRunAt:a.next_run_at??null,repliesToSource:n.output.destination==="source"}),e.jsx(L,{count:a.processing_client_count??0}),f?e.jsxs(r,{variant:"secondary",className:"max-w-full whitespace-normal bg-amber-500/10 text-left text-amber-700 dark:text-amber-400",children:[e.jsx(C,{className:"h-3 w-3 shrink-0"}),f]}):null]}),h?e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:h}):null]})]}),c]})}export{B as A};
2
- //# sourceMappingURL=automation-row-B5Q1B10y.js.map
@@ -1,2 +0,0 @@
1
- import{j as e,B as l,X as i}from"./index-BjcZVe7n.js";function x({sources:a,onRemove:s,disabled:n,wrap:r=!1}){return e.jsx(e.Fragment,{children:a.length>0?e.jsx("ul",{className:"space-y-2",children:a.map(t=>e.jsxs("li",{className:"flex items-start gap-2 rounded-lg border bg-background p-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"truncate font-mono text-xs font-medium",children:t.name}),e.jsx("div",{className:r?"whitespace-pre-wrap break-words text-xs text-muted-foreground":"truncate text-xs text-muted-foreground",children:t.query})]}),s?e.jsx(l,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0","aria-label":`Remove source ${t.name}`,disabled:n,onClick:()=>s?.(t),children:e.jsx(i,{className:"h-3.5 w-3.5"})}):null]},t.query))}):null})}export{x as A};
2
- //# sourceMappingURL=automation-source-list-Dhucq1sI.js.map
@@ -1,2 +0,0 @@
1
- import{j as t,O as o}from"./index-BjcZVe7n.js";const n=()=>t.jsx(o,{});export{n as component};
2
- //# sourceMappingURL=automations-kXojozTU.js.map
@@ -1,2 +0,0 @@
1
- import{j as e,ek as i,V as t}from"./index-BjcZVe7n.js";function c({operation:a}){switch(a){case"create":case"created":return e.jsx(t,{variant:"default",children:"Created"});case"update":case"updated":return e.jsx(t,{variant:"secondary",children:"Updated"});case"delete":case"deleted":return e.jsx(t,{variant:"destructive",children:"Deleted"});default:return e.jsx(t,{variant:"outline",children:a||"Change"})}}function x({operation:a,actor:l,createdAt:s,resource:r,changedFields:n,showAttribution:d=!0}){return e.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r?e.jsx("span",{className:"break-words text-sm font-medium",children:r}):null,e.jsx(c,{operation:a}),d?e.jsx("time",{dateTime:s,title:s,className:"ml-auto text-xs text-muted-foreground",children:i(s)}):null]}),d?e.jsxs("p",{className:"break-words text-xs text-muted-foreground",children:["by ",l||"unknown"]}):null,n?.length?e.jsxs("p",{className:"break-words text-xs text-muted-foreground",children:["Changed: ",n.join(", ")]}):null]})}export{x as C};
2
- //# sourceMappingURL=change-summary-DeuXQEpb.js.map
@@ -1,2 +0,0 @@
1
- import{cO as c,cP as u,a6 as d,bX as p,bt as r,a3 as o,e3 as i,Q as w}from"./index-BjcZVe7n.js";function l(t,s="",e){const n=`${w}/api/${t}/clients${s}`,a=e?.toString();return a?`${n}?${a}`:n}function h(t,s){const e=s?.ownerSlug??c().slug;return u({queryKey:["connected-clients",e,t??null],queryFn:async()=>{if(!e)throw new Error("Workspace required");const n=new URLSearchParams;t&&n.set("agentId",t);const a=await o(l(e,"",n),{credentials:"include"});return await i(a,"Failed to load connected clients"),(await a.json()).clients??[]},enabled:!!e&&(s?.enabled??!0),staleTime:15e3,refetchInterval:s?.refetchInterval})}function y(){const{slug:t}=c(),s=d();return p({mutationFn:async e=>{if(!t)throw new Error("Workspace required");const n=new URLSearchParams;e.scope==="all"&&n.set("scope","all");const a=await o(l(t,`/mcp/${encodeURIComponent(e.clientId)}`,n),{method:"DELETE",credentials:"include"});return await i(a,"Failed to revoke client"),await a.json()},onSuccess:()=>{s.invalidateQueries({queryKey:["connected-clients",t]}),r.success("App access revoked")},onError:e=>{r.error(e.message||"Failed to revoke app access")}})}export{y as a,h as u};
2
- //# sourceMappingURL=clients-Cmp0LmOp.js.map
@@ -1,2 +0,0 @@
1
- import{q as fe,eI as ie,i8 as ge,i9 as oe,ia as ke,aC as ce,ib as je,ic as ve,id as be,ie as ye,r as j,u as re,ig as Ae,j as s,ih as Ce,ii as _e,V as ue,ij as w,ik as Ne,d6 as X,il as Se,B as f,cI as Oe,i as E,im as ne,hq as De,hr as Le,hs as we,ht as Me,hu as Pe,io as Fe,ip as ae,iq as $e,L as Re,ir as Ue,is as ze,it as Ie,c3 as I,iu as Be,iv as Ee,c2 as qe,eQ as Ke,H as W,fg as Te,dh as Ve,I as le,eR as He,c7 as Qe,ab as We,eS as Xe}from"./index-BjcZVe7n.js";function es({connector:t,organizationId:l,ownerSlug:n,connections:r,openNewApp:g=!1,onNewAppHandled:c}){const{session:v}=fe(),{isAdmin:u,isLoading:C}=ie(l),M=ge(t.auth_schema),o=oe(t.auth_schema),_=ke(t.auth_schema),N=ce(l,{connectorKey:t.key,provider:o?.provider}),m=je(l,t.key),S=ve(),P=be(),p=ye(),[O,D]=j.useState(null),[b,y]=j.useState(null),[x,F]=j.useState([]),$=re(),k=j.useCallback(e=>$?.open({href:"",key:`oauth-apps:${t.key}`,title:"OAuth apps",connectorPanel:{section:"oauth-apps",connectorKey:t.key,organizationId:l,ownerSlug:n,newApp:e}}),[$,t.key,l,n]);j.useEffect(()=>{!g||!u||(k(!0),c?.())},[g,u,k,c]);const R=v?.user?.id;if(!R||C||N.isLoading||m.isPending)return null;const a=(N.data??[]).filter(e=>e.profile_kind==="oauth_app"),A=a.filter(e=>e.status==="active"),Y=e=>B(e,t.key),U=A.find(Y),de=new Set(r.map(e=>e.auth_profile_slug)),pe=(N.data??[]).filter(e=>e.profile_kind==="oauth_account"&&e.created_by===R&&!de.has(e.slug)),he=(m.data?.options??[]).filter(e=>e.kind!=="local"&&e.configured&&!!e.url),q=m.data?.options.find(e=>e.kind==="local"),K=m.isError||m.data?.cloud_status==="unavailable",d=[],G=e=>({key:`app:${e.slug}`,kind:"app",slug:e.slug,button:"Connect account",label:e.display_name,hint:"Your OAuth app",badge:Y(e)?"Default":void 0,canLead:!!U||A.length===1}),T=u?A:U?[U]:[],V=U??(T.length===1?T[0]:void 0);V&&d.push(G(V));for(const e of he)d.push({key:`offer:${e.kind}:${e.managed_by_org??e.url}`,kind:"link",href:e.url,external:!0,note:e.instructions,button:e.label,label:e.label,hint:e.execution==="cloud"?"Runs in Lobu Cloud":"The cloud holds the grant; data syncs here",canLead:!0});_&&q?.configured&&q.url&&d.push({key:"install",kind:"link",href:Ae(q.url,{installShape:_.installShape}),external:!1,button:`Install ${t.name} app`,label:`Install ${t.name} app`,hint:"Installs on your provider account",canLead:!0});for(const e of T)e!==V&&d.push(G(e));for(const e of pe){const i=e.status==="active";d.push({key:`account:${e.slug}`,kind:"account",profile:e,button:i?"Use this account":"Reconnect",label:`${i?"Use":"Reconnect"} ${e.display_name}`,canLead:!1})}(!o||M.some(e=>e.type!=="oauth"))&&d.push({key:"create",kind:"create",button:"Add connection",label:_?"Use your own app":"Add connection",canLead:!0});const me=u&&o?{key:"new-app",kind:"new-app",button:"New OAuth app",label:"New OAuth app…",canLead:!0}:void 0,h=d.find(e=>e.canLead)??(d.length?void 0:me),J=e=>p.begin(()=>S.mutateAsync({connector_key:t.key,app_auth_profile_slug:e,requested_scopes:o?Ue(o,x):[]})),H=e=>{if(D(null),e.kind==="app")o&&ae(o).length?y(e.slug):J(e.slug);else if(e.kind==="account"){const{profile:i}=e;p.begin(()=>i.status==="active"?S.mutateAsync({connector_key:t.key,auth_profile_slug:i.slug}):P.mutateAsync({auth_profile_slug:i.slug}))}else e.kind==="new-app"?k(!0):e.kind==="link"&&D(e.note??null)},Z=(e,i)=>e.kind==="link"?s.jsx("a",{href:e.href,...e.external?{target:"_blank",rel:"noopener noreferrer"}:{},onClick:()=>H(e),children:i}):e.kind==="create"?s.jsx(Re,{to:"/$owner/connectors/create/$connectorKey",params:{owner:n,connectorKey:t.key},children:i}):null,z=d.length===1&&d[0]===h?[]:d,ee=!!(u&&o),Q=z.length>0||K||ee&&(d.length>0||a.length>0),se=s.jsxs(Ce,{align:"end",className:"w-72",children:[z.length?s.jsx(_e,{children:"Connect with"}):null,z.map(e=>{const i=s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate",children:e.label}),e.hint?s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.hint}):null]}),e.badge?s.jsx(ue,{variant:"secondary",className:"text-[10px]",children:e.badge}):null]}),L=Z(e,i);return L?s.jsx(w,{asChild:!0,children:L},e.key):s.jsx(w,{onSelect:()=>H(e),children:i},e.key)}),K?s.jsx(w,{onSelect:e=>{e.preventDefault(),m.refetch()},children:s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block",children:"Retry cloud options"}),s.jsx("span",{className:"block text-xs text-muted-foreground",children:"Cloud connection options could not be checked"})]})}):null,ee?s.jsxs(s.Fragment,{children:[z.length||K?s.jsx(Ne,{}):null,s.jsxs(w,{onSelect:()=>k(!0),children:[s.jsx(X,{}),"New OAuth app…"]}),a.length?s.jsx(w,{onSelect:()=>k(!1),children:"Manage OAuth apps…"}):null]}):null]}),te=s.jsx(Se,{asChild:!0,children:s.jsxs(f,{size:"sm",variant:h?"default":"outline",className:E(h&&"rounded-l-none border-l border-primary-foreground/25 px-2"),"aria-label":h?"More ways to connect":void 0,children:[h?null:"Connect",s.jsx(Oe,{className:"size-3.5"})]})});return s.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-1.5",children:[h?s.jsxs(ne,{children:[s.jsxs("div",{className:"inline-flex",children:[(()=>{const e=s.jsxs(s.Fragment,{children:[h.kind==="new-app"||h.kind==="create"?s.jsx(X,{className:"size-3.5"}):null,h.button]}),i=Z(h,e);return s.jsx(f,{size:"sm",disabled:p.pending,className:E(Q&&"rounded-r-none"),asChild:!!i,onClick:i?void 0:()=>H(h),children:i??e})})(),Q?te:null]}),se]}):Q?s.jsxs(ne,{children:[te,se]}):s.jsxs(s.Fragment,{children:[s.jsx(f,{size:"sm",disabled:!0,children:"Connect account"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Ask an administrator to set the workspace-default OAuth app."})]}),O?s.jsx("p",{className:"max-w-sm text-xs text-muted-foreground",children:O}):null,p.error?s.jsx("p",{role:"alert",className:"max-w-sm text-xs text-destructive",children:p.error}):null,p.continueUrl?s.jsx("a",{href:p.continueUrl,target:"_blank",rel:"noreferrer",className:"text-xs underline",children:"Continue authorization in your browser"}):null,o?s.jsx(De,{open:b!==null,onOpenChange:e=>!e&&y(null),children:s.jsxs(Le,{className:"max-w-md",children:[s.jsxs(we,{children:[s.jsx(Me,{children:"Permissions"}),s.jsxs(Pe,{children:["Choose what ",t.name," may access."]})]}),s.jsx(Fe,{requiredScopes:$e(o),optionalScopes:ae(o),selectedOptionalScopes:x,onToggleOptionalScope:(e,i)=>F(L=>i?[...new Set([...L,e])]:L.filter(xe=>xe!==e))}),s.jsx("div",{className:"flex justify-end",children:s.jsx(f,{size:"sm",disabled:p.pending,onClick:()=>{const e=b;y(null),e&&J(e)},children:"Continue"})})]})}):null]})}function ss({connector:t,organizationId:l,newApp:n}){const r=re(),{isAdmin:g}=ie(l),c=oe(t.auth_schema),v=ce(l,{connectorKey:t.key,provider:c?.provider});return c?s.jsx(Ye,{connector:t,oauthMethod:c,appProfiles:(v.data??[]).filter(u=>u.profile_kind==="oauth_app"),isAdmin:g,initialOpen:n,onClose:n?()=>r?.close():void 0,refetchProfiles:()=>void v.refetch()}):null}function Ye({initialOpen:t=!1,onClose:l,connector:n,oauthMethod:r,appProfiles:g,isAdmin:c,refetchProfiles:v}){const u=ze(),C=Ie(),[M,o]=I(n.key,t&&c),[_,N]=j.useState(!1);j.useEffect(()=>{t&&c&&o(!0)},[t,c,o]);const m=`${Be()}/connect/oauth/callback`,[S,P]=I(n.key,`${n.name} OAuth App`),[p,O]=I(n.key,""),[D,b]=I(n.key,null),y=Ee(r),x=qe(`${n.key}:${M}`,Ke(y),y),{values:F,setValues:$}=x,k=g.find(a=>B(a,n.key)),R=()=>{x.canSubmit&&(b(null),u.mutate({connector_key:n.key,profile_kind:"oauth_app",display_name:S.trim()||`${n.name} OAuth App`,slug:p.trim()||void 0,credentials:Je(Xe(F))},{onSuccess:a=>{const A=a.auth_profile?.slug;A&&!k&&C.mutate({connector_key:n.key,auth_profile_slug:A}),o(!1),l?.(),P(`${n.name} OAuth App`),O(""),v()},onError:a=>{b(a instanceof Error?a.message:"Failed to add OAuth app")}}))};return s.jsxs("div",{className:"min-w-0 space-y-4",children:[c&&s.jsxs("div",{className:"space-y-2",children:[s.jsx(W,{children:"OAuth callback URL"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("code",{className:"min-w-0 flex-1 break-all text-xs",children:m}),s.jsxs(f,{variant:"outline",size:"sm",onClick:()=>{navigator.clipboard.writeText(m).then(()=>N(!0)).catch(()=>b("Could not copy the callback URL. Select and copy it above."))},children:[s.jsx(Te,{className:"mr-1.5 h-3.5 w-3.5"}),_?"Copied":"Copy callback URL"]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Register this exact URL in your provider’s app settings before saving the client configuration."})]}),g.length>0?s.jsx("div",{className:"space-y-2",children:g.map(a=>s.jsxs("div",{className:E(Ve,"flex flex-wrap items-center gap-3 p-3"),children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("span",{className:"truncate text-sm font-medium",children:a.display_name}),B(a,n.key)?s.jsx(ue,{variant:"secondary",className:"text-[10px]",children:"Default"}):null,s.jsx(Ge,{status:a.status})]}),s.jsx("p",{className:"truncate text-xs text-muted-foreground",children:a.slug})]}),c&&!B(a,n.key)&&a.connector_key===n.key&&a.status==="active"?s.jsx(f,{variant:"outline",size:"sm",disabled:C.isPending,onClick:()=>C.mutate({connector_key:n.key,auth_profile_slug:a.slug}),children:"Set default"}):null]},a.slug))}):null,c?M?s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(W,{htmlFor:"oauth-app-name",children:"Display name"}),s.jsx(le,{id:"oauth-app-name",value:S,onChange:a=>P(a.target.value)})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(W,{htmlFor:"oauth-app-slug",children:"Slug"}),s.jsx(le,{id:"oauth-app-slug",placeholder:"optional",value:p,onChange:a=>O(a.target.value)})]}),s.jsx(He,{schema:x.revision??void 0,values:F,onValuesChange:$,fieldIdPrefix:"oauth-app-"}),s.jsx(Qe,{visible:x.hasConflict,onReload:x.reset}),D?s.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:D}):null,s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(f,{variant:"outline",size:"sm",disabled:u.isPending,onClick:()=>{o(!1),l?.()},children:"Cancel"}),s.jsxs(f,{size:"sm",disabled:u.isPending||!x.canSubmit,onClick:R,children:[u.isPending?s.jsx(We,{size:"md",className:"mr-1.5"}):null,"Save OAuth app"]})]})]}):s.jsxs(f,{variant:"outline",size:"sm",onClick:()=>o(!0),children:[s.jsx(X,{className:"size-3.5"}),"Add OAuth app"]}):null]})}function B(t,l){return!!t.is_default_for_connector&&t.connector_key===l}function Ge({status:t}){const l=t==="active"?"text-green-500":t==="error"||t==="revoked"?"text-destructive":"text-amber-500";return s.jsxs("span",{className:E("text-xs",l),children:["· ",t]})}function Je(t){const l={};for(const[n,r]of Object.entries(t))typeof r=="string"&&r.trim()?l[n]=r.trim():(typeof r=="number"||typeof r=="boolean")&&(l[n]=String(r));return l}export{Ge as A,es as C,ss as O};
2
- //# sourceMappingURL=connect-menu-CezOH3s7.js.map
@@ -1,2 +0,0 @@
1
- import{j as t,O as o}from"./index-BjcZVe7n.js";const n=()=>t.jsx(o,{});export{n as component};
2
- //# sourceMappingURL=connect-zUot_0kG.js.map
@@ -1,2 +0,0 @@
1
- import{j0 as n,j as t,az as a}from"./index-BjcZVe7n.js";import{a as i}from"./agent-connect-pages-Br_ycC0z.js";import"./agent-client-setup-list-CpUTAjXf.js";import"./connector-page-shell-Di6XzkVo.js";import"./copy-button-Ddf7lBjZ.js";import"./clients-Cmp0LmOp.js";import"./client-rows-x_CxeWkP.js";function l(){const{owner:o,clientId:e}=n.useParams();return t.jsx(a,{owner:o,children:({ownerSlug:r})=>t.jsx(i,{owner:r,clientId:e})})}export{l as component};
2
- //# sourceMappingURL=connect._clientId-nsGxe6yO.js.map
@@ -1,2 +0,0 @@
1
- import{j as t,O as n}from"./index-BjcZVe7n.js";function e(){return t.jsx(n,{})}export{e as component};
2
- //# sourceMappingURL=connected._clientId-DnclRRXk.js.map
@@ -1,2 +0,0 @@
1
- import{j as e,ak as w,az as N,r as y,gS as p,gT as x,L as r,gU as o,F as _,ed as j,b2 as L,dw as A,B as $,A as k,je as g}from"./index-BjcZVe7n.js";import{C as u}from"./connector-page-shell-Di6XzkVo.js";import{E as B}from"./events-feed-CGzA1w3R.js";import{u as E}from"./client-activity-scopes-BD2HBo-_.js";import{u as P}from"./clients-Cmp0LmOp.js";import{g as S,c as R}from"./client-rows-x_CxeWkP.js";import"./event-card-CjA_dLzq.js";import"./definition-comparison-B5WgZILB.js";import"./automation-source-list-Dhucq1sI.js";import"./schema-value-BFb7jCBo.js";import"./json-diff-DtZtra_g.js";import"./index-Vcq4gwWv.js";import"./run-initiator-CCxNv0rK.js";import"./use-automations-D9hKpufo.js";import"./renderer-CHPS-1vD.js";import"./card-g4yxo4Hr.js";import"./table-DALHuXPE.js";import"./change-summary-DeuXQEpb.js";import"./copy-button-Ddf7lBjZ.js";import"./agent-list-row-BnP6r4pm.js";import"./automation-row-B5Q1B10y.js";import"./model-C2q7WDcS.js";import"./connection-label-BobuYiAG.js";import"./use-scroll-sentinel-BWCrmNIB.js";const T="gap-3 pt-2.5 pb-8";function D({owner:s,clientId:a,mcpActivityId:t}){return e.jsx(w,{className:T,children:e.jsx(N,{owner:s,children:({organizationId:n,ownerSlug:m})=>e.jsx(O,{ownerSlug:m,organizationId:n,clientId:a,mcpActivityId:t})})})}function O({ownerSlug:s,organizationId:a,clientId:t,mcpActivityId:n}){const{data:m=[],isLoading:f}=P(null),i=y.useMemo(()=>S(m).find(h=>h.clientIds.includes(t)),[t,m]),l=i?.clientIds??[],{data:C=[],isLoading:b}=E({enabled:!!i&&!!a,limit:100,clientIds:l,organizationId:a}),c=n?C.find(h=>h.activityId===n)??null:null,d=i?.title??"Connected agent",v=c?R(c):"Conversation";return!a||f||n&&b?e.jsx(u,{header:e.jsx(p,{breadcrumb:e.jsx(x,{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?l.join(","):t,mcp_activity_id:n},replace:!0}):i?n?e.jsx(u,{header:e.jsx(p,{breadcrumb:e.jsx(x,{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:d},"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??d})}),title:v,meta:e.jsx($,{variant:"outline",size:"sm",asChild:!0,children:e.jsxs(r,{to:"/$owner/events",params:{owner:s},search:{client_ids:l.join(","),mcp_activity_id:n},children:["See in Activity",e.jsx(k,{className:"h-3.5 w-3.5"})]})})}),children:e.jsx(B,{organizationId:a,ownerSlug:s,filters:{clientIds:l,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(u,{header:e.jsx(p,{breadcrumb:e.jsx(x,{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:d},"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:d})}),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(u,{header:e.jsx(p,{breadcrumb:e.jsx(x,{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 ce(){const{owner:s,clientId:a}=g.useParams(),t=g.useSearch();return e.jsx(D,{owner:s,clientId:a,mcpActivityId:typeof t.mcp_activity_id=="string"?t.mcp_activity_id:null})}export{ce as component};
2
- //# sourceMappingURL=connected._clientId.activity-CDB8atTX.js.map
@@ -1,2 +0,0 @@
1
- import{j as e,V as R,c as $,L as N,ek as E,A as M,v as _,eI as D,r as u,S as I,cR as H,cH as K,gl as y,B as f,ab as G,ak as O,gS as Q,ed as V,gT as W,gU as q,j7 as F,az as J}from"./index-BjcZVe7n.js";import{T as X,a as Y,b as S,c as d,d as Z,e as x}from"./table-DALHuXPE.js";import{c as w,g as P}from"./client-rows-x_CxeWkP.js";import{u as A}from"./client-activity-scopes-BD2HBo-_.js";import{u as T,a as ee}from"./clients-Cmp0LmOp.js";import{C as se}from"./connector-page-shell-Di6XzkVo.js";function te({isLive:n}){return e.jsx(R,{variant:n?"default":"secondary",className:`shrink-0 text-[10px] ${n?"":"text-muted-foreground"}`,title:n?"Live MCP transport":"No live MCP transport; activity history is retained",children:n?"Active":"Ended"})}function L({scopes:n,ownerSlug:i}){const l=$(),o=s=>s.organizationId===null?{to:"/$owner/events",params:{owner:"me"},search:{client_ids:s.clientId,mcp_activity_id:s.activityId}}:{to:"/$owner/agents/connected/$clientId/activity",params:{owner:i,clientId:s.clientId},search:{mcp_activity_id:s.activityId}},r=s=>{l(o(s))};return e.jsx("div",{className:"rounded-lg border",children:e.jsxs(X,{children:[e.jsx(Y,{children:e.jsxs(S,{children:[e.jsx(d,{className:"px-3 py-1.5 text-xs",children:"Conversation"}),e.jsx(d,{className:"px-3 py-1.5 text-xs",children:"Calls"}),e.jsx(d,{className:"px-3 py-1.5 text-xs",children:"Last action"}),e.jsx(d,{className:"px-3 py-1.5 text-xs",children:"Last active"}),e.jsx(d,{className:"w-8 px-3 py-1.5"})]})}),e.jsx(Z,{children:n.map(s=>e.jsxs(S,{className:"cursor-pointer transition-colors hover:bg-accent/50",onClick:()=>r(s),children:[e.jsx(x,{className:"max-w-0 px-3 py-2 text-xs font-medium",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(N,{...o(s),onClick:c=>c.stopPropagation(),className:"truncate hover:underline",children:w(s)}),s.activityKind==="session"?e.jsx(te,{isLive:s.isLive}):null,s.unreadNotificationCount>0?e.jsxs(R,{variant:"secondary",className:"shrink-0 text-[10px]",children:[s.unreadNotificationCount," unread"]}):null]})}),e.jsx(x,{className:"px-3 py-2 font-mono text-xs text-muted-foreground",children:s.callCount}),e.jsx(x,{className:"max-w-0 truncate px-3 py-2 text-xs text-muted-foreground",children:s.lastAction||"—"}),e.jsx(x,{className:"px-3 py-2 text-xs text-muted-foreground",children:E(s.lastCallAt)}),e.jsx(x,{className:"px-3 py-2 text-right",children:e.jsx("button",{type:"button","aria-label":`View ${w(s)} activity`,className:"text-muted-foreground hover:text-foreground",tabIndex:-1,children:e.jsx(M,{className:"h-3.5 w-3.5"})})})]},`${s.clientId}:${s.activityId}`))})]})})}function ne({ownerSlug:n,clientId:i}){const{orgContext:l}=_(),{isAdmin:o}=D(l.organizationId),{data:r=[],isLoading:s}=T(null),c=ee(),[z,h]=u.useState(!1),t=u.useMemo(()=>P(r),[r]).find(a=>a.clientIds.includes(i)),b=t?.clientIds??[],g=A({enabled:!!t,limit:100,clientIds:b,activityKind:"conversation",organizationId:l?.organizationId??null}),p=A({enabled:!!t,limit:100,clientIds:b,activityKind:"session",organizationId:l?.organizationId??null,refetchInterval:a=>a?5e3:!1}),m=g.data??[],v=p.data??[],B=u.useMemo(()=>r.filter(a=>t?.clientIds.includes(a.id)),[r,t]);if(s)return e.jsxs("div",{className:"space-y-4",children:[e.jsx(I,{className:"h-16 w-full rounded-lg"}),e.jsx(I,{className:"h-24 w-full rounded-lg"})]});if(!t)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 j=B[0],C=j?.details?.redirectUris??[],k=t.linkedUserEntitySlug?H(n,[{entity_type:"$member",slug:t.linkedUserEntitySlug}]):null,U=[{label:"Registered",value:t.title},{label:t.clientIds.length===1?"Client ID":"Client IDs",value:e.jsx("div",{className:"space-y-1",children:t.clientIds.map(a=>e.jsx("code",{className:"block break-all",children:a},a))})},...t.drivenBy&&t.drivenBy!==t.title?[{label:"Driven by",value:t.drivenBy}]:[],...j?.platform?[{label:"Software",value:j.platform}]:[],...C.length>0?[{label:"Redirects",value:C.join(", ")}]:[],{label:"Granted by",value:k&&t.linkedUser?e.jsx(N,{to:k,className:"font-medium text-primary hover:underline",children:t.linkedUser}):t.linkedUser??"—"},{label:"Last active",value:t.connected?K(t.lastSeenAt):"disconnected"},{label:"Registrations",value:String(t.clientIds.length)}];return e.jsxs("div",{className:"space-y-7",children:[e.jsx(y,{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:U.map(a=>e.jsxs("div",{className:"flex gap-3 px-3 py-2",children:[e.jsx("dt",{className:"w-28 shrink-0 text-muted-foreground",children:a.label}),e.jsx("dd",{className:"min-w-0 flex-1 break-words",children:a.value})]},a.label))})}),o&&t.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",t.clientIds.length>1?` (${t.clientIds.length} of them)`:""," ","and kills its live sessions. It can reconnect by authorizing again."]}),z?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{variant:"destructive",size:"sm",className:"h-7 px-2 text-xs",disabled:c.isPending,onClick:()=>c.mutate({clientId:t.clientIds[0],scope:"all"},{onSettled:()=>h(!1)}),children:c.isPending?"Revoking…":"Confirm revoke"}),e.jsx(f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs",disabled:c.isPending,onClick:()=>h(!1),children:"Cancel"})]}):e.jsx(f,{variant:"outline",size:"sm",className:"h-7 px-2 text-xs text-destructive hover:text-destructive",onClick:()=>h(!0),children:"Revoke"})]}):null]})}),e.jsx(y,{title:"Conversations",count:m.length>0?String(m.length):void 0,children:g.isLoading||p.isLoading?e.jsxs("div",{className:"flex items-center py-4 text-xs text-muted-foreground",children:[e.jsx(G,{className:"mr-2"})," Loading client activity…"]}):g.isError||p.isError?e.jsx("p",{className:"py-3 text-xs text-destructive",children:"Could not load this app's activity."}):m.length===0?e.jsx("p",{className:"py-3 text-xs text-muted-foreground",children:"No recent conversations."}):e.jsx(L,{scopes:m,ownerSlug:n})}),v.length>0?e.jsx(y,{title:"Sessions",count:String(v.length),children:e.jsx(L,{scopes:v,ownerSlug:n})}):null]})}function ae({owner:n,clientId:i}){const{data:l=[]}=T(null),r=u.useMemo(()=>P(l).find(s=>s.clientIds.includes(i)),[i,l])?.title??"Connected agent";return e.jsx(O,{className:"gap-3 pt-2.5 pb-8",children:e.jsx(se,{header:e.jsx(Q,{breadcrumb:e.jsx(W,{crumbs:[e.jsx(N,{to:"/$owner/agents",params:{owner:n},className:q,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(V,{name:r})}),title:r,caption:"An external agent connected to this workspace through Lobu. Review its Lobu conversations, activity, and access."}),children:e.jsx(ne,{ownerSlug:n,clientId:i},i)})})}function me(){const{owner:n,clientId:i}=F.useParams();return e.jsx(J,{owner:n,children:({ownerSlug:l})=>e.jsx(ae,{owner:l,clientId:i})})}export{me as component};
2
- //# sourceMappingURL=connected._clientId.index-DBNP2mZo.js.map
@@ -1,2 +0,0 @@
1
- import{hl as H,r,j as e,gu as X,cU as Y,Y as Q,i as F,B as N,gw as Z,iU as G,c2 as R,eQ as E,hp as V,bl as J,bm as ee,bn as se,bo as te,bp as ne,eR as O,c7 as B,bP as ae,ab as $,iV as ce,cA as ie,a0 as le,iW as re,dh as oe,iX as de,iY as me,iZ as ue,i_ as xe,cC as he,i$ as ge,cy as pe,L as z,gl as D,V as K,ek as T}from"./index-BjcZVe7n.js";import{f as fe,C as je}from"./entity-options-BkU_En_f.js";import{s as L}from"./event-card-CjA_dLzq.js";import{V as ve,a as ye,S as M,g as P}from"./runs-table-CYS1jDdL.js";import{f as Ne}from"./feed-event-kinds-BYuZCoU4.js";function be({organizationId:s,value:t,onChange:i,entities:a,className:d}){const{data:c=[]}=H(a?void 0:s),o=r.useMemo(()=>a??fe(c),[a,c]),x=new Set(t),l=o.filter(n=>x.has(n.id)),g=n=>{const u=new Set(x);u.has(n)?u.delete(n):u.add(n),i(Array.from(u).sort((v,y)=>v-y))},j=l.length===0?"All entities":l.length===1?l[0].name:`${l.length} entities selected`;return e.jsx(X,{contentClassName:"w-[320px]",searchPlaceholder:"Filter entities...",emptyText:"No entities found.",trigger:n=>e.jsxs(N,{variant:"outline",role:"combobox","aria-expanded":n,className:F("justify-between",d),children:[j,e.jsx(Z,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]}),children:()=>o.map(n=>{const u=x.has(n.id);return e.jsxs(Y,{value:`${n.name} ${n.entityType}`,onSelect:()=>g(n.id),className:"cursor-pointer",children:[e.jsx(Q,{className:F("mr-2 h-4 w-4",u?"opacity-100":"opacity-0")}),e.jsxs("span",{children:[n.name," ",e.jsxs("span",{className:"text-muted-foreground text-xs",children:["(",n.entityType,")"]})]})]},n.id)})})}function _e(s){return s?.feeds_schema?Object.entries(s.feeds_schema).map(([t,i])=>({key:t,name:i.name??t,description:i.description,configSchema:i.configSchema})):[]}const $e="Feeds are optional scheduled sync targets for an existing connection.";function De({organizationId:s,connections:t,connectorDefinitions:i,entityId:a,onClose:d}){const c=t.length===1,[o,x]=r.useState(c?String(t[0].id):""),[l,g]=r.useState(""),[j,n]=r.useState(a?[a]:[]),[u,v]=r.useState(null),y=G(),w=r.useMemo(()=>new Map(i.map(m=>[m.key,m])),[i]),p=r.useMemo(()=>t.find(m=>String(m.id)===o),[t,o]),b=r.useMemo(()=>p?_e(w.get(p.connector_key)):[],[p,w]),_=r.useMemo(()=>b.find(m=>m.key===l)??null,[b,l]),h=R(`${o}:${l}`,E(_?.configSchema),_?.configSchema),{values:S,setValues:C}=h,f=r.useCallback(()=>{x(c?String(t[0].id):""),g(""),n(a?[a]:[]),v(null)},[a,c,t]),k=r.useCallback(()=>{f(),d()},[d,f]),U=r.useCallback(async()=>{if(!h.canSubmit||!p||!l)return;v(null);const m=V(S);try{await y.mutateAsync({connection_id:p.id,feed_key:l,config:Object.keys(m).length>0?m:void 0,entity_ids:a?[a]:j.length>0?j:void 0}),k()}catch(A){v(A instanceof Error?A.message:"Failed to create feed")}},[S,h.canSubmit,y,a,k,p,j,l]),W=e.jsxs("div",{className:"flex-1 space-y-4 overflow-y-auto py-6 pr-1",children:[!c&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Connection"}),e.jsx(je,{connections:t,value:o,onValueChange:m=>{x(m),g(""),v(null)},placeholder:"Select a connection"})]}),p&&b.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Feed Type"}),e.jsxs(J,{value:l,onValueChange:g,children:[e.jsx(ee,{children:e.jsx(se,{placeholder:"Select feed type"})}),e.jsx(te,{children:b.map(m=>e.jsx(ne,{value:m.key,children:e.jsxs("div",{children:[e.jsx("span",{children:m.name}),m.description&&e.jsxs("span",{className:"text-muted-foreground ml-1 text-xs",children:["— ",m.description]})]})},m.key))})]})]}),a?e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Target Entity"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"This feed will be attached to the current entity."})]}):e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Target Entities"}),e.jsx(be,{organizationId:s,value:j,onChange:n,className:"w-full"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional. Leave empty to create an unscoped feed."})]}),h.revision&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Feed Configuration"}),e.jsx(O,{schema:h.revision,values:S,onValuesChange:C})]}),p&&b.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"This connector has no configurable feed types."}),e.jsx(B,{visible:h.hasConflict,onReload:h.reset}),u&&e.jsx("p",{className:"text-sm text-destructive",children:u})]}),q=e.jsx(ae,{onCancel:k,className:"mt-2",children:e.jsxs(N,{disabled:!h.canSubmit||!l||y.isPending,onClick:()=>void U(),children:[y.isPending&&e.jsx($,{size:"lg",className:"mr-2"}),"Create Feed"]})});return e.jsxs("div",{className:"flex flex-col",children:[W,q]})}function Ae({feed:s,onClose:t,hideHeader:i=!1}){const a=s.display_name?.trim()||s.feed_key,d=s.feed_key.includes(":")?s.feed_key.slice(s.feed_key.indexOf(":")+1):s.feed_key,c=s.external_tenant_id,o=s.connector_key==="slack"&&c?`https://app.slack.com/client/${c}/${d}`:void 0;return e.jsxs("div",{className:"flex max-w-xl flex-col gap-4",children:[i?null:e.jsxs(e.Fragment,{children:[t?e.jsxs("button",{type:"button",onClick:t,className:"inline-flex w-fit items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[e.jsx(ce,{className:"h-3 w-3"}),"Back to connection"]}):null,e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ie,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("h2",{className:"text-lg font-semibold leading-tight",children:a}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"chat channel"})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Messages captured for this channel are available to Lobu Automations. Open Slack to read the channel history."}),o?e.jsx(N,{asChild:!0,variant:"outline",className:"w-full justify-center",children:e.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(le,{className:"mr-2 h-4 w-4"}),"Open in Slack"]})}):null,e.jsxs("div",{className:F(oe,"flex flex-col gap-3 p-4"),children:[e.jsx("div",{className:"text-xs font-medium uppercase text-muted-foreground",children:"Channel"}),e.jsxs("div",{className:"flex items-center gap-1.5 text-sm",children:[e.jsx(re,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsx("span",{className:"break-all",children:a})]}),c?e.jsxs("div",{className:"flex items-baseline justify-between gap-2 text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Workspace"}),e.jsx("span",{className:"break-all font-mono text-xs",children:c})]}):null,e.jsx("p",{className:"text-xs text-muted-foreground",children:"Messages the bot sees here are captured as they arrive. Open the channel in Slack to read the full history."})]})]})}function Te(s,t){return s.display_name?s.display_name:t?.feeds_schema?.[s.feed_key]?.name??s.feed_key}function Se(s,t){const i=s?.feeds_schema;if(!i)return;if(i[t])return i[t];const a=Object.values(i);return a.find(d=>d?.key===t)??(a.length===1?a[0]:void 0)}const I=8;function Ce({kinds:s}){const[t,i]=r.useState(!1),a=t?s:s.slice(0,I);return e.jsxs(D,{title:"Event types",count:`${s.length} ${s.length===1?"kind":"kinds"}`,children:[e.jsx("ul",{className:"divide-y",children:a.map(({kind:d,description:c,targets:o})=>e.jsxs("li",{className:"flex flex-col gap-1 py-2 sm:flex-row sm:items-start sm:gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex min-w-0 items-baseline gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:L(d)}),e.jsx("code",{className:"truncate font-mono text-[11px] text-muted-foreground",children:d})]}),c?e.jsx("p",{className:"line-clamp-2 text-xs text-muted-foreground",title:c,children:c}):null]}),o.length>0?e.jsx("div",{className:"flex flex-wrap gap-1 sm:max-w-[40%] sm:justify-end",children:o.map(({entityType:x,creates:l})=>e.jsx(K,{variant:"secondary",className:"font-normal",title:l?`Creates ${x} records`:`Links to existing ${x} records`,children:L(x)},x))}):null]},d))}),s.length>I?e.jsx(N,{variant:"ghost",size:"sm",className:"mt-1 h-7 px-2 text-xs text-muted-foreground",onClick:()=>i(d=>!d),children:t?"Show fewer":`Show all ${s.length}`}):null]})}function Le({feed:s,ownerSlug:t}){return e.jsxs(e.Fragment,{children:[e.jsx(M,{status:P(s.status),showDot:!0,children:s.status}),s.connection_status&&s.connection_status!==s.status&&e.jsxs(M,{status:P(s.connection_status),showDot:!0,children:["Connection: ",s.connection_status]}),s.device_worker_id?e.jsx(z,{to:"/$owner/connectors/device/$deviceId",params:{owner:t,deviceId:s.device_worker_id},children:e.jsx(K,{variant:s.device_status==="offline"?"secondary":"outline",className:"text-xs hover:bg-accent",children:s.device_status==="offline"?`Waiting for ${s.device_label||s.device_platform||"device"}`:`On ${s.device_label||s.device_platform||"device"}`})}):null]})}function Me({feed:s}){return s.operations.includes("sync")?e.jsxs(e.Fragment,{children:[e.jsxs("span",{children:["Last sync: ",s.last_sync_at?T(s.last_sync_at):"—"]}),e.jsxs("span",{children:["Next: ",s.next_run_at?T(s.next_run_at):"—"]}),e.jsxs("span",{className:"font-mono",children:[(s.event_count??0).toLocaleString()," events"]})]}):e.jsx("span",{children:"Read live when queried"})}function Pe({feed:s,connectorDef:t,ownerSlug:i}){const{data:a,refetch:d}=de(s.id),c=me(),o=ue(),x=a?.recent_runs?.some(f=>["running","pending","claimed"].includes(f.status));r.useEffect(()=>{if(!x)return;const f=setInterval(()=>d(),5e3);return()=>clearInterval(f)},[x,d]);const l=r.useMemo(()=>Se(t,s.feed_key),[t,s.feed_key]),g=l?.configSchema,j=r.useMemo(()=>Ne(l).sort((f,k)=>f.kind.localeCompare(k.kind)),[l]),n=R(s.id,E(g,s.config??{}),g),{values:u,setValues:v,dirty:y}=n,w=r.useCallback(async()=>{n.canSubmit&&(await c.mutateAsync({feed_id:s.id,config:V(u)}),n.accept(u,E(g,V(u))))},[c,s.id,u,g,n.canSubmit,n.accept]),p=r.useCallback(async()=>{const f=s.status==="active"?"paused":"active";await c.mutateAsync({feed_id:s.id,status:f})},[c,s.id,s.status]),b=r.useCallback(async()=>{await o.mutateAsync(s.id)},[o,s.id]),_=s.status==="active",h=s.operations.includes("sync"),S=s.auth_profile_status&&s.auth_profile_status!=="active",C=c.isPending||o.isPending;return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(N,{variant:"outline",size:"sm",disabled:C,onClick:()=>void p(),children:[_?e.jsx(xe,{className:"h-3.5 w-3.5 mr-1.5"}):e.jsx(he,{className:"h-3.5 w-3.5 mr-1.5"}),_?"Pause":"Resume"]}),h?e.jsxs(N,{variant:"outline",size:"sm",disabled:C||!_,onClick:()=>void b(),children:[o.isPending?e.jsx($,{size:"md",className:"mr-1.5"}):e.jsx(ge,{className:"h-3.5 w-3.5 mr-1.5"}),"Sync now"]}):null,e.jsx(ve,{ownerSlug:i,scope:{kind:"feed",id:s.id},variant:"ghost",label:"View in memory"})]}),S&&e.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-amber-50 dark:bg-amber-950/20 px-3 py-2 text-sm",children:[e.jsx(pe,{className:"h-4 w-4 text-amber-500 shrink-0"}),e.jsxs("span",{className:"text-amber-700 dark:text-amber-400",children:["Authentication issue: ",s.auth_profile_status]}),e.jsx(N,{asChild:!0,variant:"outline",size:"sm",className:"ml-auto h-7 text-xs",children:e.jsx(z,{to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:i,connectorKey:s.connector_key,connectionId:String(s.connection_id)},search:{settings:!0},children:"Fix auth"})})]}),n.revision?e.jsx(D,{title:"Settings",children:e.jsxs("div",{className:"max-w-xl space-y-4",children:[e.jsx(O,{schema:n.revision,values:u,onValuesChange:v}),e.jsx(B,{visible:n.hasConflict,onReload:n.reset}),y&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(N,{size:"sm",disabled:C||!n.canSubmit,onClick:()=>void w(),children:[c.isPending?e.jsx($,{size:"md",className:"mr-1.5"}):null,"Save"]})})]})}):null,j.length>0?e.jsx(Ce,{kinds:j}):null,h?e.jsx(D,{title:"Recent syncs",children:a?.recent_runs&&a.recent_runs.length>0?e.jsx(ye,{runs:a.recent_runs,ownerSlug:i}):e.jsx("p",{className:"rounded-lg border bg-muted/20 px-3 py-6 text-center text-xs text-muted-foreground",children:"No syncs yet."})}):null]})}export{De as A,Ae as C,Le as F,Me as a,Pe as b,$e as c,Te as f};
2
- //# sourceMappingURL=connection-feed-detail-Ckq-qEbD.js.map
@@ -1,2 +0,0 @@
1
- function t(n){if(n.display_name?.trim())return n.display_name.trim();const e=n.connector_name??n.connector_key,o=n.auth_profile_name??n.auth_profile_slug;return o?`${e} · ${o}`:e}export{t as c};
2
- //# sourceMappingURL=connection-label-BobuYiAG.js.map
@@ -1,2 +0,0 @@
1
- import{gj as h,j as e,B as u,L as m,d6 as g,gk as f,gl as j,r as p,gm as v,C as N}from"./index-BjcZVe7n.js";import{c as w}from"./connection-label-BobuYiAG.js";import{S as C}from"./status-dot-BnQPFrcU.js";function b(t){return e.jsx(j,{title:"Connections",count:t.isLoading||t.isError?void 0:String(t.entries.length),children:e.jsx(x,{...t})})}function x({entries:t,action:n,isLoading:r,isError:i,onRetry:l}){const[o,d]=p.useState("");if(r)return e.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading connections…"});if(i)return e.jsxs("div",{role:"alert",className:"space-y-2",children:[e.jsx("p",{children:"Could not load connections."}),l&&e.jsx(u,{variant:"outline",size:"sm",onClick:l,children:"Retry"})]});const a=t.filter(s=>`${s.name} ${s.description??""}`.toLowerCase().includes(o.trim().toLowerCase())).sort((s,c)=>+!!c.needsAttention-+!!s.needsAttention);return e.jsxs("div",{className:"space-y-4",children:[e.jsx(v,{label:"connections",query:o,onQueryChange:d,count:a.length,action:n}),e.jsx("ul",{className:a.length>0?"overflow-hidden rounded-lg border divide-y":void 0,children:a.map(s=>e.jsx("li",{children:e.jsxs(m,{...s.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(C,{tone:s.tone}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block truncate text-sm font-medium",children:s.name}),s.description&&e.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:s.description})]})]}),e.jsxs("span",{className:"flex min-w-0 max-w-1/2 shrink-0 items-center gap-2",children:[s.status&&e.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:s.status}),e.jsx(N,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted-foreground"})]})]})},s.id))}),a.length===0&&e.jsx("p",{className:"py-5 text-sm text-muted-foreground",children:o.trim()?"No matches. Try another search.":"No connections yet."})]})}function k(t,n){const r=!!n&&h(n)&&!t.device_worker_id,i=["error","revoked","pending_auth"].includes(t.status);return{needsAttention:i||r,tone:t.status==="error"||t.status==="revoked"?"destructive":r||t.status!=="active"?"amber":null,status:r?"Needs a device":i?t.error_message?.trim()||(t.status==="pending_auth"?"needs reconnect":t.status):void 0}}function A({ownerSlug:t,connectorKey:n}){return e.jsx(u,{asChild:!0,size:"sm",variant:"outline",children:e.jsxs(m,{to:"/$owner/connectors/create/$connectorKey",params:{owner:t,connectorKey:n},children:[e.jsx(g,{className:"size-3.5"}),"Add connection"]})})}function L({connections:t,connector:n,connectorKey:r,ownerSlug:i,section:l=!1,action:o}){const d=t.filter(s=>s.connector_key===r).map(s=>{const c=k(s,n);return{id:String(s.id),name:w({...s,connector_name:s.connector_name??n?.name??null}),needsAttention:c.needsAttention,tone:c.tone,status:c.status,link:f({to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:i,connectorKey:r,connectionId:String(s.id)},search:{}})}}),a=l?b:x;return e.jsx(a,{entries:d,action:o??e.jsx(A,{ownerSlug:i,connectorKey:r})})}export{A,b as C,L as a,k as c};
2
- //# sourceMappingURL=connections-browser-BXsJqieG.js.map
@@ -1,2 +0,0 @@
1
- import{c as L,r as p,aQ as T,j as e,dT as B,dV as S,B as M,aZ as U,dU as K,dX as O,dY as F,dZ as P,d_ as z,cT as _,b4 as b,cU as w,b8 as k,fQ as E,gi as y,L as u,b6 as R,b7 as Z,V as Q,ek as C,i as $,C as V,d6 as q,cL as G}from"./index-BjcZVe7n.js";import{c as g}from"./connection-label-BobuYiAG.js";import{c as N}from"./connections-browser-BXsJqieG.js";import{f as H,a as X}from"./connector-scope-lists-dQnZARCD.js";import{S as A}from"./status-dot-BnQPFrcU.js";const Y={trigger:"runs on arrival",delivery:"delivers here"};function le(n){const s=new Map,o=(a,t,i,c)=>{const d=Number(a);if(!Number.isInteger(d)||d<=0)return;const m=s.get(d)??[],r=m.find(l=>l.automation.automation_id===t.automation_id);if(r){if(r.reason===i)for(const l of c)r.eventTypes.includes(l)||r.eventTypes.push(l);return}m.push({automation:t,reason:i,eventTypes:[...c]}),s.set(d,m)};for(const a of n){for(const t of a.triggers??[]){const i=Array.isArray(t.event_types)?t.event_types.map(String):[];o(t.connection_id,a,"trigger",i)}o(a.delivery_target?.connection_id,a,"delivery",[])}return s}function de(n){const s=new Map;for(const o of n){const a=s.get(o.connection_id)??[];a.push(o),s.set(o.connection_id,a)}return s}function J(n){const s=(o,a,t)=>`${o} ${o===1?a:t}`;return[s(n.feeds,"feed","feeds"),n.actions>0?s(n.actions,"action","actions"):null,n.automations>0?s(n.automations,"Automation","Automations"):null].filter(Boolean).join(" · ")}function W({header:n,action:s,children:o,dashed:a=!1}){return e.jsxs("section",{className:$("overflow-hidden rounded-lg border bg-card",a&&"border-dashed bg-transparent"),children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"min-w-0 flex-1",children:n}),s?e.jsx("div",{className:"shrink-0 pr-3",children:s}):null]}),o]})}function ee(n){const s=p.useMemo(()=>[...n.connections].sort((t,i)=>Number(N(i,n.connectorDefs.get(i.connector_key)).needsAttention)-Number(N(t,n.connectorDefs.get(t.connector_key)).needsAttention)||g(t).localeCompare(g(i))),[n.connections,n.connectorDefs]),[o,a]=p.useState(()=>new Set(s.length<=2?s.map(t=>t.id):[]));return s.length===0?null:e.jsx("ul",{className:"divide-y border-t",children:s.map(t=>e.jsx("li",{children:e.jsx(ne,{...n,connection:t,open:o.has(t.id),onToggle:()=>a(i=>{const c=new Set(i);return c.delete(t.id)||c.add(t.id),c})})},t.id))})}function ne({connection:n,connectorDefs:s,feeds:o,automations:a,ownerSlug:t,showConnector:i,open:c,onToggle:d}){const m=s.get(n.connector_key),r=N(n,m),l=o.get(n.id)??[],j=a.get(n.id)??[],h=n.operations_summary?.total??0,I=l.length||n.feed_count,v={owner:t,connectorKey:n.connector_key,connectionId:String(n.id)},D=J({feeds:I,actions:h,automations:j.length}),f=b(n.connector_key,s,{name:n.connector_name??n.connector_key});return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 py-2 pr-3 pl-4 text-sm",children:[e.jsx("button",{type:"button",onClick:d,"aria-expanded":c,"aria-label":`${c?"Collapse":"Expand"} ${g(n)}`,className:"flex size-5 shrink-0 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground",children:e.jsx(V,{className:$("size-3.5 transition-transform",c&&"rotate-90")})}),e.jsx(A,{tone:r.tone??"live"}),i?e.jsx(k,{icon:f.icon,iconUrl:f.iconUrl,name:f.name,faviconDomain:f.faviconDomain,className:"h-5 w-5 shrink-0 rounded text-[9px]"}):null,e.jsx(u,{to:"/$owner/connectors/$connectorKey/$connectionId",params:v,search:{},className:"min-w-0 truncate font-medium hover:underline",children:g(n)}),!i&&n.device_worker_id?e.jsxs("span",{className:"shrink-0 rounded border px-1.5 text-[11px] text-muted-foreground",children:[n.device_label||n.device_platform||"Device",n.device_online===!1?" · offline":""]}):null,r.status?e.jsx("span",{className:"min-w-0 truncate text-xs text-amber-600 dark:text-amber-400",children:r.status}):null,e.jsx("span",{className:"ml-auto shrink-0 text-xs text-muted-foreground",children:D})]}),c?e.jsxs("div",{className:"grid grid-cols-[4.5rem_1fr] items-start gap-x-2 gap-y-2 pr-3 pb-3 pl-11 text-xs",children:[e.jsx("span",{className:"pt-1 text-[10.5px] tracking-wide text-muted-foreground uppercase",children:"Feeds"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[l.map(x=>e.jsx(se,{feed:x,params:v},x.id)),l.length===0&&n.feed_count>0?e.jsx("span",{className:"text-muted-foreground",children:"Loading feeds…"}):null,e.jsxs(u,{to:"/$owner/connectors/$connectorKey/$connectionId",params:v,search:{addFeed:!0},className:"inline-flex items-center gap-1 rounded-full border border-dashed px-2 py-0.5 text-muted-foreground hover:bg-accent hover:text-foreground",children:[e.jsx(q,{className:"size-3"}),"Feed"]})]}),h>0?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"pt-1 text-[10.5px] tracking-wide text-muted-foreground uppercase",children:"Actions"}),e.jsx("div",{className:"flex flex-wrap items-center gap-1.5 pt-0.5",children:e.jsxs(u,{to:"/$owner/connectors/$connectorKey",params:{owner:t,connectorKey:n.connector_key},className:"text-muted-foreground hover:text-foreground hover:underline",children:[h," ",h===1?"action":"actions",n.operations_summary?` · ${n.operations_summary.reads} read, ${n.operations_summary.writes} write`:""]})})]}):null,e.jsx("span",{className:"pt-1 text-[10.5px] tracking-wide text-muted-foreground uppercase",children:"Automations"}),e.jsxs("div",{className:"flex flex-col gap-1 pt-0.5",children:[j.map(x=>e.jsx(te,{link:x,ownerSlug:t},x.automation.automation_id)),j.length===0?e.jsx("span",{className:"text-muted-foreground",children:"No Automation is triggered by or delivers to this connection."}):null]})]}):null]})}function te({link:n,ownerSlug:s}){const{automation:o,reason:a,eventTypes:t}=n;return e.jsxs(u,{to:"/$owner/automations/$automationId",params:{owner:s,automationId:o.automation_id},search:{view:"definition",run_id:void 0},title:t.length>0?`On ${t.join(", ")}`:void 0,className:"flex min-w-0 items-center gap-1.5 hover:underline",children:[e.jsx(G,{className:"size-3 shrink-0 text-muted-foreground"}),e.jsx("span",{className:"truncate",children:o.name}),e.jsx("span",{className:"shrink-0 text-muted-foreground",children:Y[a]})]})}function se({feed:n,params:s}){const o=H(n),a=X(n),t=n.display_name?.trim()||n.feed_key;return e.jsxs(u,{to:"/$owner/connectors/$connectorKey/$connectionId",params:s,search:{feedId:n.id},title:o??void 0,className:"inline-flex max-w-full items-center gap-1.5 rounded-full border bg-background px-2 py-0.5 hover:bg-accent",children:[e.jsx(A,{tone:a??"live"}),e.jsx("span",{className:"truncate",children:t}),n.last_sync_at?e.jsx("span",{className:"shrink-0 text-muted-foreground",children:C(n.last_sync_at)}):null]})}function me({devices:n,connections:s,...o}){const a=[...n].sort((t,i)=>Number(i.online)-Number(t.online)||y(t).localeCompare(y(i)));return e.jsx("div",{className:"space-y-3",children:a.map(t=>{const i=s.filter(c=>c.device_worker_id===t.id);return e.jsx(W,{dashed:i.length===0,header:e.jsxs(u,{to:"/$owner/connectors/device/$deviceId",params:{owner:o.ownerSlug,deviceId:t.id},className:"flex items-center gap-3 px-3 py-2.5 text-left transition-colors hover:bg-accent/50",children:[e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(R,{platform:Z(t)})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:y(t)}),t.update_required.length>0?e.jsx(Q,{variant:"secondary",className:"text-[10px]",children:"Update needed"}):null]}),e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:[t.online?"Online":`Last seen ${C(t.last_seen_at)}`,t.app_version?`v${t.app_version}`:null,i.length===0?"nothing runs here yet":`${i.length} ${i.length===1?"connection":"connections"}`].filter(Boolean).join(" · ")})]})]}),children:e.jsx(ee,{...o,connections:i,showConnector:!0})},t.id)})})}function ue({ownerSlug:n,catalog:s,trigger:o}){const a=L(),[t,i]=p.useState(!1),c=p.useMemo(()=>new Map(s.map(r=>[r.key,r])),[s]),d=p.useMemo(()=>s.filter(r=>!T(r)).sort((r,l)=>r.name.localeCompare(l.name)),[s]),m=r=>{i(!1),a(r?{to:"/$owner/connectors/create/$connectorKey",params:{owner:n,connectorKey:r}}:{to:"/$owner/connectors/create",params:{owner:n}})};return e.jsxs(B,{open:t,onOpenChange:i,children:[e.jsx(S,{asChild:!0,children:o??e.jsxs(M,{size:"sm",className:"h-8 shrink-0 justify-start text-xs",children:[e.jsx(U,{className:"mr-1.5 h-3.5 w-3.5"}),"Add connector"]})}),e.jsx(K,{align:"end",className:"w-72 p-0",children:e.jsxs(O,{children:[e.jsx(F,{placeholder:"Search connectors…"}),e.jsxs(P,{children:[e.jsx(z,{children:"No connector matches."}),e.jsx(_,{children:d.map(r=>{const l=b(r.key,c,{name:r.name});return e.jsxs(w,{value:`${r.name} ${r.key}`,onSelect:()=>m(r.key),className:"gap-2",children:[e.jsx(k,{icon:l.icon,iconUrl:l.iconUrl,name:l.name,faviconDomain:l.faviconDomain,className:"h-5 w-5 shrink-0 rounded text-[9px]"}),e.jsx("span",{className:"truncate",children:r.name}),r.installed?e.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:"Added"}):null]},r.key)})}),e.jsx(E,{}),e.jsx(_,{children:e.jsx(w,{value:"browse all connectors",onSelect:()=>m(),children:"Browse all connectors…"})})]})]})})]})}export{ue as A,W as C,me as D,le as a,ee as b,Y as c,J as d,de as f};
2
- //# sourceMappingURL=connector-boxes-CbqSFeVm.js.map
@@ -1,2 +0,0 @@
1
- import{j as e,al as l}from"./index-BjcZVe7n.js";function c({header:s,children:a}){return e.jsxs(l,{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[e.jsx("div",{className:"sticky top-0 z-10 space-y-4 bg-background pb-1",children:s}),e.jsx("div",{className:"mt-4 min-w-0 flex-1 space-y-7",children:a})]})}export{c as C};
2
- //# sourceMappingURL=connector-page-shell-Di6XzkVo.js.map
@@ -1,2 +0,0 @@
1
- import{j as e,dT as m,dV as u,dU as h,a0 as v,V as x,L as c}from"./index-BjcZVe7n.js";function N({connectorDef:s,connectorKey:t,ownerSlug:n,deviceWorkerId:i,deviceLabel:o}){return s?e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1.5 text-[11.5px] text-muted-foreground",children:[e.jsx("span",{children:"Runs on"}),e.jsx(c,{to:"/$owner/connectors/$connectorKey",params:{owner:n,connectorKey:t},className:"underline underline-offset-2 hover:text-foreground",children:s.name}),e.jsx(f,{deviceWorkerId:i,deviceLabel:o,connectorDef:s,ownerSlug:n})]}):null}function f({connectorDef:s,ownerSlug:t,deviceWorkerId:n,deviceLabel:i}){return e.jsxs(m,{children:[e.jsxs(u,{className:"rounded border px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground transition-colors hover:border-muted-foreground hover:text-foreground",children:["v",s.version||"unknown"]}),e.jsx(h,{align:"start",className:"w-80 p-0",children:e.jsx(j,{connectorDef:s,ownerSlug:t,deviceWorkerId:n,deviceLabel:i})})]})}function j({connectorDef:s,ownerSlug:t,deviceWorkerId:n,deviceLabel:i}){const o=s.runtime?.platforms??[],d=s.runtime?.scopes??[],r=s.source_uri?.trim()||null,p=!!r&&(r.startsWith("http://")||r.startsWith("https://")),l=[{label:"Key",value:e.jsx("span",{className:"font-mono",children:s.key})},{label:"Version",value:e.jsx("span",{className:"font-mono",children:s.version?`v${s.version}`:"unknown"})}];return s.catalog_origin&&l.push({label:"Origin",value:s.catalog_origin==="org"?e.jsx("span",{className:"text-amber-600 dark:text-amber-500",children:"Built in this workspace"}):e.jsx("span",{children:"Lobu catalog"})}),r&&l.push({label:"Source",value:p?e.jsxs("a",{href:r,target:"_blank",rel:"noreferrer",className:"inline-flex max-w-full items-start gap-1 break-all font-mono text-primary hover:underline",children:[r,e.jsx(v,{className:"mt-0.5 h-3 w-3 shrink-0"})]}):e.jsx("span",{className:"break-all font-mono",children:r})}),o.length>0&&l.push({label:"Platforms",value:e.jsx("span",{className:"flex flex-wrap gap-1",children:o.map(a=>e.jsx(x,{variant:"secondary",className:"h-4 px-1 py-0 font-mono text-[10px]",children:a},a))})}),s.required_capability&&l.push({label:"Capability",value:e.jsx("span",{className:"font-mono",children:s.required_capability})}),d.length>0&&l.push({label:"Scopes",value:e.jsx("span",{className:"flex flex-wrap gap-1",children:d.map(a=>e.jsx(x,{variant:"secondary",className:"h-4 px-1 py-0 font-mono text-[10px]",children:a},a))})}),e.jsxs("div",{className:"text-xs",children:[e.jsx("dl",{className:"divide-y",children:l.map(a=>e.jsxs("div",{className:"flex gap-3 px-3 py-2",children:[e.jsx("dt",{className:"w-20 shrink-0 text-muted-foreground",children:a.label}),e.jsx("dd",{className:"min-w-0 flex-1",children:a.value})]},a.label))}),o.length>0?e.jsx("div",{className:"border-t px-3 py-2 text-muted-foreground",children:n?e.jsxs(e.Fragment,{children:["Runs on"," ",e.jsx(c,{to:"/$owner/connectors/device/$deviceId",params:{owner:t,deviceId:n},className:"text-primary hover:underline",children:i||"this device"}),"."]}):"Runs on a linked device."}):null]})}export{f as C,N as a};
2
- //# sourceMappingURL=connector-provenance-BrnasBW4.js.map
@@ -1,2 +0,0 @@
1
- import{d3 as g,j as t,S as f,B as p,b2 as v,cB as j,L as _,d6 as N,ek as b,u as $,gn as w}from"./index-BjcZVe7n.js";import{S as k}from"./status-dot-BnQPFrcU.js";function y(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}=g(e.id),d=S(h),o=e.facets?.chat??!1,c={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:o?"No channels":"No feeds",description:d?o?"Bind a channel to route conversations to this connection.":"Add a feed to start collecting data from this connection.":o?"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:c,search:{addFeed:!0},children:[t.jsx(N,{className:"h-3.5 w-3.5"}),o?"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=y(n);return t.jsx("li",{children:t.jsxs(_,{to:"/$owner/connectors/$connectorKey/$connectionId",params:c,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 ${b(n.last_sync_at)}`:"not synced yet")})]})},n.id)})})}function I({connection:e,ownerSlug:r,title:u}){const h=$(),{data:i=[],isLoading:l,isError:m}=g(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,o=l?e.feed_count:i.length,c=e.facets?.chat?"channels":"feeds",n=l?`Loading ${c}…`:m?`Could not load ${c} — open to retry`:`${o} ${c}${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,": ",y(s)]},s.id)),a.length>3&&t.jsxs("li",{children:[a.length-3," more sources need attention."]})]})]})}export{F as C,C as a,I as b,S as c,y as f};
2
- //# sourceMappingURL=connector-scope-lists-dQnZARCD.js.map
@@ -1,2 +0,0 @@
1
- import{T as $,q as z,r as i,j as t,Q as D,U as F}from"./index-BjcZVe7n.js";import{a as I,u as T,C as G,b as Q,c as B,R as J,W as H,A as K,r as V,o as X}from"./use-login-redirect-ciwfc-7A.js";import{F as Y}from"./full-page-spinner-B5xXnKtV.js";import"./card-g4yxo4Hr.js";const Z=["client_id","redirect_uri","scope","code_challenge","code_challenge_method"];function re(){const e=$.useSearch(),d=e.workspace_grants==="1",{session:g,isReady:k}=z(),m=!k,[r,_]=i.useState(null),[v,l]=i.useState(null);I(!!g,m);const p=i.useMemo(()=>Z.filter(s=>!e[s]||e[s]?.length===0),[e]),a=p.length===0,C=e.client_name?.trim()||null,f=i.useMemo(()=>Array.from(new Set((e.scope||"").split(" ").map(s=>s.trim()).filter(Boolean))),[e.scope]),{accessLevel:w,setAccessLevel:O,selectedScopes:A,resourceOrg:S,hasMcpScopes:E,requiresWorkspaceAccess:n,orgList:h,workspaceAccess:L,setWorkspaceAccess:M,selectedOrgIds:o,toggleSelectedOrgId:P,orgsLoading:q,orgsError:b,retryOrgs:N,workspaceSelectionReady:y}=T({requestedScopes:f,resource:e.resource,allowMultiple:d}),u=i.useMemo(()=>h.filter(s=>o.includes(s.id)).map(s=>s.name),[h,o]),U=n?u.length===0?"Nothing will be granted access.":`${u.length<=2?u.join(", "):`${u.length} workspaces`} will be granted access.`:null,W=n&&d&&o.length>0?`Approve ${o.length} ${o.length===1?"workspace":"workspaces"}`:"Approve",R=async s=>{if(!a){l(`Missing required query params: ${p.join(", ")}`);return}if(s&&n&&!y){l(b?"Workspaces could not be loaded. Retry before approving.":"Choose at least one workspace before approving.");return}_(s?"approve":"deny"),l(null);try{const c=await fetch(`${D}/oauth/authorize/consent`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({client_id:e.client_id,redirect_uri:e.redirect_uri,scope:s?A.join(" "):e.scope,state:e.state??"",code_challenge:e.code_challenge,code_challenge_method:e.code_challenge_method,client_name:e.client_name,resource:e.resource,authorization_intent:e.authorization_intent,approved:s,...s&&n?{workspace_access:L,organization_ids:o}:{}})}),x=await c.json().catch(()=>null);if(c.status===401){V();return}if(!c.ok)throw new Error(X(x,`Failed to ${s?"approve":"deny"} OAuth consent`));const j=F(x?.redirect_url);if(!j)throw new Error("Consent response did not include a valid redirect URL");window.location.href=j}catch(c){_(null),l(c instanceof Error?c.message:"Unexpected error while submitting consent")}};return m||!g?t.jsx(Y,{className:"min-h-[calc(100vh-3.5rem)]"}):t.jsx(G,{title:"Authorize application",busy:r!==null,error:v,review:t.jsx(K,{idPrefix:"oauth-consent",clientName:C,requestedScopes:f,accessLevel:w,onAccessLevelChange:O,disabled:r!==null,resource:e.resource,logoUri:e.logo_uri,clientUri:e.client_uri}),aside:n?t.jsx(H,{idPrefix:"oauth-consent",allowMultiple:d,orgList:h,selectedOrgIds:o,onWorkspaceAccessChange:M,onSelectedOrgChange:P,orgsLoading:q,orgsError:b,onRetry:N,disabled:r!==null||!a}):void 0,below:E&&S?t.jsx(J,{resourceOrg:S,accessLevel:w}):null,notice:a?null:t.jsxs("p",{role:"alert",className:"text-sm text-destructive",children:["Missing required query params: ",p.join(", ")]}),footer:t.jsx(Q,{summary:U,children:t.jsx(B,{busy:r,approveLabel:W,approveDisabled:r!==null||!a||A.length===0||n&&!y,denyDisabled:r!==null||!a,onApprove:()=>R(!0),onDeny:()=>R(!1)})})})}export{re as component};
2
- //# sourceMappingURL=consent-Byli4yMs.js.map
@@ -1,2 +0,0 @@
1
- import{r as s,j as a,B as p,Y as n,fg as l,bt as i}from"./index-BjcZVe7n.js";function m({text:u,label:o,iconOnly:t=!1}){const[r,c]=s.useState(!1),e=s.useRef(void 0);return s.useEffect(()=>()=>clearTimeout(e.current),[]),a.jsxs(p,{type:"button",variant:t?"ghost":"outline",size:t?"icon":"sm",className:t?"h-6 w-6 shrink-0":"h-8 text-xs","aria-label":t?`Copy ${o}`:void 0,onClick:async()=>{try{await navigator.clipboard.writeText(u),c(!0),i.success("Copied to clipboard"),clearTimeout(e.current),e.current=setTimeout(()=>c(!1),1500)}catch{i.error("Could not copy. Please select and copy the text.")}},children:[r?a.jsx(n,{className:"h-3.5 w-3.5"}):a.jsx(l,{className:"h-3.5 w-3.5"}),!t&&(r?"Copied":o)]})}export{m as C};
2
- //# sourceMappingURL=copy-button-Ddf7lBjZ.js.map
@@ -1,2 +0,0 @@
1
- import{jf as r,j as e}from"./index-BjcZVe7n.js";import{a as m}from"./agent-skills-route-d5jh3oBR.js";import"./agent-skill-context-1DBn7Xc_.js";import"./core.esm-BsXtvNoI.js";import"./skill-editor-D_W3QlRz.js";import"./agent-tab-intro-DKrC3SQt.js";import"./agent-loading-shells-_18OREnx.js";import"./agent-card-controls-DuQJhtqp.js";function j(){const{owner:t,agentId:o}=r.useParams();return e.jsx(m,{owner:t,agentId:o})}export{j as component};
2
- //# sourceMappingURL=create-B34eskZ_.js.map
@@ -1,2 +0,0 @@
1
- import{jh as o,j as e}from"./index-BjcZVe7n.js";import{a}from"./agent-guardrails-route-CN7vpC0X.js";import"./model-selector-B2cjCn0V.js";import"./agent-tab-intro-DKrC3SQt.js";import"./table-DALHuXPE.js";import"./agent-loading-shells-_18OREnx.js";import"./agent-card-controls-DuQJhtqp.js";function j(){const{owner:r,agentId:t}=o.useParams();return e.jsx(a,{owner:r,agentId:t})}export{j as component};
2
- //# sourceMappingURL=create-DLB9sXgU.js.map
@@ -1,2 +0,0 @@
1
- import{j as n,az as t,O as c,aH as r,al as i,gS as l,b3 as m,gT as x,L as d,gU as u,gV as C,f5 as j}from"./index-BjcZVe7n.js";function p({owner:o,initialConnectorKey:e}){return n.jsx(t,{owner:o,children:a=>n.jsx(g,{ownerSlug:a.ownerSlug,organizationId:a.organizationId,initialConnectorKey:e})})}function g({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(x,{crumbs:[n.jsx(d,{to:"/$owner/connectors",params:{owner:o},search:{},className:u,children:"Connectors"},"connectors")]}),icon:n.jsx(m.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(C,{ownerSlug:o,organizationId:e,connections:s,initialConnectorKey:a},a??"catalog"):n.jsx("div",{className:"max-w-3xl",children:n.jsx(j,{rows:4})})]})}const f=()=>n.jsx(c,{});export{p as ConnectionsCreateRouteContent,f as component};
2
- //# sourceMappingURL=create-YdAnh3ml.js.map