@lobu/runtime-server 22.0.0 → 23.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/dist/catalogs/connectors.json +1353 -181
  2. package/dist/catalogs/skills.json +1 -1
  3. package/dist/component.json +1 -1
  4. package/dist/connectors/README.md +14 -1
  5. package/dist/connectors/google_gmail.ts +1 -0
  6. package/dist/connectors/jira-helpers.ts +313 -0
  7. package/dist/connectors/jira.ts +29 -221
  8. package/dist/connectors/linkedin-browser-script.ts +13 -0
  9. package/dist/connectors/linkedin-draft-page.js +104 -0
  10. package/dist/connectors/linkedin-drafts.ts +73 -0
  11. package/dist/connectors/linkedin-identity.ts +32 -0
  12. package/dist/connectors/linkedin-inbox-adapter.js +1185 -0
  13. package/dist/connectors/linkedin-inbox.ts +156 -0
  14. package/dist/connectors/linkedin-like.ts +114 -0
  15. package/dist/connectors/linkedin-takeout.ts +577 -0
  16. package/dist/connectors/linkedin.ts +3998 -0
  17. package/dist/connectors/takeout-utils.ts +240 -0
  18. package/dist/connectors/tiktok-inbox-page.js +9 -9
  19. package/dist/connectors/tiktok-web-page.js +21 -15
  20. package/dist/connectors/tiktok_web.ts +63 -30
  21. package/dist/connectors/whatsapp-web-adapter.js +64 -564
  22. package/dist/connectors/whatsapp-web-helpers.ts +30 -444
  23. package/dist/connectors/whatsapp-web-identity.ts +20 -6
  24. package/dist/connectors/whatsapp_web.ts +45 -645
  25. package/dist/connectors/x-dm-adapter.js +556 -0
  26. package/dist/connectors/x-identity.ts +31 -2
  27. package/dist/connectors/x.ts +266 -120
  28. package/dist/db/migrations/20261017120000_drop_feeds_kind_virtual.sql +26 -0
  29. package/dist/db/migrations/20261017130000_drop_retired_dead_code_columns.sql +46 -0
  30. package/dist/dependencies.bun.lock +41 -41
  31. package/dist/guest.bundle.js +288 -148
  32. package/dist/owletto/dist/assets/_-3J-IrxWk.js +2 -0
  33. package/dist/owletto/dist/assets/{_-CEPl6gU4.js → _-DYUE3ix4.js} +3 -3
  34. package/dist/owletto/dist/assets/_agentId-Bn2IAjIy.js +2 -0
  35. package/dist/owletto/dist/assets/{_agentId-CBC_SadO.js → _agentId-Cam7Z0N7.js} +2 -2
  36. package/dist/owletto/dist/assets/{_automationId-YTTNksw6.js → _automationId-CXEiKVZJ.js} +2 -2
  37. package/dist/owletto/dist/assets/{_connectorKey._connectionId-fK0h7RAp.js → _connectorKey._connectionId-CS85l61t.js} +2 -2
  38. package/dist/owletto/dist/assets/{_connectorKey.index-C7TPS598.js → _connectorKey.index-clVDIyW0.js} +2 -2
  39. package/dist/owletto/dist/assets/{_conversationId-CEhxlTIo.js → _conversationId-Ci2k-BuN.js} +2 -2
  40. package/dist/owletto/dist/assets/{_deploymentId-BQfYN1U2.js → _deploymentId-BuUzGtVL.js} +2 -2
  41. package/dist/owletto/dist/assets/{_eventId-Cl8GSdjg.js → _eventId-B0662F8h.js} +2 -2
  42. package/dist/owletto/dist/assets/_name-CwWePlOl.js +2 -0
  43. package/dist/owletto/dist/assets/{_owner-cUtGHqSw.js → _owner-dTWkrKsK.js} +3 -3
  44. package/dist/owletto/dist/assets/_shape-BtS3y4M9.js +2 -0
  45. package/dist/owletto/dist/assets/_skillKey-Dc9m-nlR.js +2 -0
  46. package/dist/owletto/dist/assets/{_slug-CU1PuHB9.js → _slug-DQHutM41.js} +2 -2
  47. package/dist/owletto/dist/assets/_viewKey-B30ik8ma.js +2 -0
  48. package/dist/owletto/dist/assets/_viewKey-CUHypQnF.js +2 -0
  49. package/dist/owletto/dist/assets/{accept-invitation-D3OgJG4i.js → accept-invitation-w17IFTtf.js} +2 -2
  50. package/dist/owletto/dist/assets/{activity-route-view-DQglkhXU.js → activity-route-view-CMqYiiKM.js} +2 -2
  51. package/dist/owletto/dist/assets/{agent-card-controls-DzRs4Ix9.js → agent-card-controls-mnTN2AZt.js} +2 -2
  52. package/dist/owletto/dist/assets/{agent-client-setup-list-B2SvH7xD.js → agent-client-setup-list-Bg3hBfUV.js} +2 -2
  53. package/dist/owletto/dist/assets/{agent-connect-pages-B6uKvT_X.js → agent-connect-pages-B_vrqLVc.js} +2 -2
  54. package/dist/owletto/dist/assets/{agent-editor-form-oUnIYHd7.js → agent-editor-form-hTs7eO_U.js} +2 -2
  55. package/dist/owletto/dist/assets/{agent-guardrails-route-BaV1VpDh.js → agent-guardrails-route-BOrCXcAl.js} +2 -2
  56. package/dist/owletto/dist/assets/{agent-loading-shells-CtZJM2Gc.js → agent-loading-shells-Dqcvky-k.js} +2 -2
  57. package/dist/owletto/dist/assets/{agent-permissions-matrix-Ds48KFK9.js → agent-permissions-matrix-BOo_4r_4.js} +2 -2
  58. package/dist/owletto/dist/assets/{agent-skill-context-DPk5r08w.js → agent-skill-context-CCdvtlmH.js} +2 -2
  59. package/dist/owletto/dist/assets/{agent-skills-route-DYpB5H1J.js → agent-skills-route-BUxIswuq.js} +2 -2
  60. package/dist/owletto/dist/assets/{agent-subpage-shell-B3K_jPYR.js → agent-subpage-shell-D92imvSt.js} +2 -2
  61. package/dist/owletto/dist/assets/agent-thread-BJOijbT0.js +6 -0
  62. package/dist/owletto/dist/assets/agents-9XjpDj_S.js +2 -0
  63. package/dist/owletto/dist/assets/{agents-workbench-CMyk4PI7.js → agents-workbench-Bt5QCYQ7.js} +2 -2
  64. package/dist/owletto/dist/assets/{app._appId-DH1Qutz6.js → app._appId-CKv7_squ.js} +2 -2
  65. package/dist/owletto/dist/assets/{automation-detail-content-CEDNboId.js → automation-detail-content-vUwVumXf.js} +2 -2
  66. package/dist/owletto/dist/assets/automations-9XjpDj_S.js +2 -0
  67. package/dist/owletto/dist/assets/{callback-CU-hb8JB.js → callback-BRgcL8gz.js} +2 -2
  68. package/dist/owletto/dist/assets/{card-DIF8SF9b.js → card-Djgp00r_.js} +2 -2
  69. package/dist/owletto/dist/assets/{claim-DELEa-gH.js → claim-BYUZnyMp.js} +2 -2
  70. package/dist/owletto/dist/assets/{clients-CpG676mg.js → clients-D3Zbjxin.js} +2 -2
  71. package/dist/owletto/dist/assets/{code-editor-V27Z4o3P.js → code-editor-DHeyRGZI.js} +2 -2
  72. package/dist/owletto/dist/assets/connect-CfsFsy9P.js +2 -0
  73. package/dist/owletto/dist/assets/connect._clientId-DkiC8xos.js +2 -0
  74. package/dist/owletto/dist/assets/connected._clientId-CIXrGOsT.js +2 -0
  75. package/dist/owletto/dist/assets/{connected._clientId.activity-DQWcUqKM.js → connected._clientId.activity-Ckdz6I0y.js} +2 -2
  76. package/dist/owletto/dist/assets/{connected._clientId.index-BC3R303A.js → connected._clientId.index-CNxafNeo.js} +2 -2
  77. package/dist/owletto/dist/assets/{connection-DySpRE9x.js → connection-C3XXFEqh.js} +2 -2
  78. package/dist/owletto/dist/assets/{connection-feed-detail-C_D68j6d.js → connection-feed-detail-CIJJLDP8.js} +2 -2
  79. package/dist/owletto/dist/assets/{connections-browser-Cnv2iBbZ.js → connections-browser-CKZjzRz6.js} +2 -2
  80. package/dist/owletto/dist/assets/{connector-provenance-CNXtzYg5.js → connector-provenance-8-d8hl10.js} +2 -2
  81. package/dist/owletto/dist/assets/{connector-scope-lists-BKDetNDc.js → connector-scope-lists-CadPVsI3.js} +2 -2
  82. package/dist/owletto/dist/assets/{connectors-BJnk1z_2.js → connectors-lvLJ30lo.js} +2 -2
  83. package/dist/owletto/dist/assets/{consent-BVzxrAO9.js → consent-CdSvVCgx.js} +2 -2
  84. package/dist/owletto/dist/assets/{conversations-table-DfZGICl7.js → conversations-table-BdXoZAfc.js} +2 -2
  85. package/dist/owletto/dist/assets/{core.esm-DiTpULFl.js → core.esm-CYvgWCuv.js} +2 -2
  86. package/dist/owletto/dist/assets/create-0xW9eXxG.js +2 -0
  87. package/dist/owletto/dist/assets/{create-JRFM8mMf.js → create-B0qhrrX4.js} +2 -2
  88. package/dist/owletto/dist/assets/create-CAfF-yI1.js +2 -0
  89. package/dist/owletto/dist/assets/create-automation-form-CtSSeYj3.js +3 -0
  90. package/dist/owletto/dist/assets/create._connectorKey-i6xxkWKV.js +2 -0
  91. package/dist/owletto/dist/assets/{cronstrue-DPXl0qA2.js → cronstrue-n4qGUraE.js} +2 -2
  92. package/dist/owletto/dist/assets/deployments-4Itm35Xc.js +2 -0
  93. package/dist/owletto/dist/assets/{deployments-DCQdFdwG.js → deployments-RvUdVkj3.js} +2 -2
  94. package/dist/owletto/dist/assets/{deployments-body-D6TAWs_6.js → deployments-body-BMp7UsMo.js} +2 -2
  95. package/dist/owletto/dist/assets/{device-CntqYW65.js → device-CPU6CjkJ.js} +2 -2
  96. package/dist/owletto/dist/assets/{device-pin-tombstone-Bz4JHHMK.js → device-pin-tombstone-CrjG7gPo.js} +2 -2
  97. package/dist/owletto/dist/assets/{device._deviceId-D4plO3GM.js → device._deviceId-Cs3ZmXWo.js} +2 -2
  98. package/dist/owletto/dist/assets/{entity-options-UJs64GdQ.js → entity-options-uXjgT7y9.js} +2 -2
  99. package/dist/owletto/dist/assets/{entity-page-Djz6T50J.js → entity-page-Dc0LGr5U.js} +2 -2
  100. package/dist/owletto/dist/assets/{entity-type-page-OznRag6A.js → entity-type-page-CwZxa0BR.js} +2 -2
  101. package/dist/owletto/dist/assets/{event-detail-04qOUGIP.js → event-detail-ve2d6Gbb.js} +2 -2
  102. package/dist/owletto/dist/assets/{events-feed-fucGZSJR.js → events-feed-BtvhZF1f.js} +2 -2
  103. package/dist/owletto/dist/assets/{filter-editors-DCQgGLyR.js → filter-editors-Cj-v6NtH.js} +2 -2
  104. package/dist/owletto/dist/assets/{full-page-spinner-KpV2FS2u.js → full-page-spinner-DqpH99np.js} +2 -2
  105. package/dist/owletto/dist/assets/guardrails-HFo2Ut8B.js +2 -0
  106. package/dist/owletto/dist/assets/identity-BigVSBCl.js +2 -0
  107. package/dist/owletto/dist/assets/{index-BEvyBdOU.js → index-B9uPN6FC.js} +2 -2
  108. package/dist/owletto/dist/assets/{index-BNh2cidi.js → index-BQVliQW1.js} +2 -2
  109. package/dist/owletto/dist/assets/index-BfedB4Rc.js +2 -0
  110. package/dist/owletto/dist/assets/index-CUw3aKBI.js +2 -0
  111. package/dist/owletto/dist/assets/index-CXhxUkv3.js +2 -0
  112. package/dist/owletto/dist/assets/{index-_oPeVpL_.js → index-Cr5hwh-C.js} +66 -66
  113. package/dist/owletto/dist/assets/index-CzkTV4ZQ.js +2 -0
  114. package/dist/owletto/dist/assets/index-DKSx8JN_.js +2 -0
  115. package/dist/owletto/dist/assets/{index-D3s8rhG9.js → index-DVk7Ug0d.js} +2 -2
  116. package/dist/owletto/dist/assets/index-DmZuKGf8.js +2 -0
  117. package/dist/owletto/dist/assets/{index-DCdkwg9H.js → index-Hio-HRfo.js} +2 -2
  118. package/dist/owletto/dist/assets/{index-BJXkc60S.js → index-ICgKp3YK.js} +2 -2
  119. package/dist/owletto/dist/assets/index-cPcroOH0.js +2 -0
  120. package/dist/owletto/dist/assets/{index-BOzuAbvi.js → index-n7sTbNv4.js} +2 -2
  121. package/dist/owletto/dist/assets/index-xiFpcWKv.js +2 -0
  122. package/dist/owletto/dist/assets/{json-diff-D_Ym3Uku.js → json-diff-DBoag_OS.js} +2 -2
  123. package/dist/owletto/dist/assets/{list-skeleton-Bl0OS39L.js → list-skeleton-C_GuoxAH.js} +2 -2
  124. package/dist/owletto/dist/assets/{login-QHdxqX-4.js → login-Ci6ixHuL.js} +2 -2
  125. package/dist/owletto/dist/assets/{logout-DUccApuZ.js → logout-CLGgeZB7.js} +2 -2
  126. package/dist/owletto/dist/assets/{member-scope-gate-CFbrq1by.js → member-scope-gate-B44INDPY.js} +2 -2
  127. package/dist/owletto/dist/assets/{memory-browse-page-IrIXuZTF.js → memory-browse-page-DyQiRvzl.js} +2 -2
  128. package/dist/owletto/dist/assets/{model-selector-CB1BDvlW.js → model-selector-dAbDgJvx.js} +2 -2
  129. package/dist/owletto/dist/assets/models-DpVP7ZwX.js +2 -0
  130. package/dist/owletto/dist/assets/{new-BWo8_Pms.js → new-BUb7AnEW.js} +2 -2
  131. package/dist/owletto/dist/assets/{new-B5UsLiy6.js → new-BkdULx2r.js} +2 -2
  132. package/dist/owletto/dist/assets/{new-DpmDXmFI.js → new-CHOr-EcI.js} +2 -2
  133. package/dist/owletto/dist/assets/{oauth-workspace-access-PGyTnW2K.js → oauth-workspace-access-BxsjwgdH.js} +2 -2
  134. package/dist/owletto/dist/assets/{organization-BH8PYlVu.js → organization-gxGeDjIV.js} +2 -2
  135. package/dist/owletto/dist/assets/{peek-pane-content-B2AFNTzP.js → peek-pane-content-CHoQHe2H.js} +2 -2
  136. package/dist/owletto/dist/assets/{permissions-CwN_YP3u.js → permissions-aPHaKLec.js} +2 -2
  137. package/dist/owletto/dist/assets/{proposal-review-shell-DKKGu4Ww.js → proposal-review-shell-UcZr87_Q.js} +2 -2
  138. package/dist/owletto/dist/assets/public-shell-ready-DcnlADmj.js +2 -0
  139. package/dist/owletto/dist/assets/{recent-DqdZE_TI.js → recent-D-65Pgu-.js} +2 -2
  140. package/dist/owletto/dist/assets/{record-activity-CvgZyCmw.js → record-activity-CBXH6v1d.js} +2 -2
  141. package/dist/owletto/dist/assets/{renderer-BL6VcwQH.js → renderer-mEDnVW0O.js} +2 -2
  142. package/dist/owletto/dist/assets/{reset-password-DAvBYkiI.js → reset-password-uX_V6bip.js} +2 -2
  143. package/dist/owletto/dist/assets/{runs-BWtc5rmc.js → runs-C0rCgGwX.js} +2 -2
  144. package/dist/owletto/dist/assets/runs-panel-Du1JMjg5.js +2 -0
  145. package/dist/owletto/dist/assets/{runs-table-DxIiqrSk.js → runs-table-syPJ6r6T.js} +2 -2
  146. package/dist/owletto/dist/assets/{settings-Crxlwps-.js → settings-9NkNA1G1.js} +2 -2
  147. package/dist/owletto/dist/assets/settings-E-10sLQX.js +2 -0
  148. package/dist/owletto/dist/assets/skills-D2Ri9b4f.js +2 -0
  149. package/dist/owletto/dist/assets/{source-record-panels-CRIPMWfN.js → source-record-panels-CPyzlfD1.js} +2 -2
  150. package/dist/owletto/dist/assets/{status-dot-C5KDvvm9.js → status-dot-B-EWMgq6.js} +2 -2
  151. package/dist/owletto/dist/assets/{tabs-B4Er9hJj.js → tabs-DqIIkCX-.js} +2 -2
  152. package/dist/owletto/dist/assets/{use-mention-search-DqEykWl_.js → use-mention-search-By8RZyKW.js} +2 -2
  153. package/dist/owletto/dist/assets/{view-param-filters-Cylutoy1.js → view-param-filters-CqLZQrnO.js} +2 -2
  154. package/dist/owletto/dist/index.html +1 -1
  155. package/dist/server-main.bundle.mjs +11447 -10762
  156. package/npm-shrinkwrap.json +160 -160
  157. package/package.json +1 -1
  158. package/vendor/connector-sdk/dist/browser-handoff-banner.d.ts +39 -0
  159. package/vendor/connector-sdk/dist/browser-handoff-banner.js +175 -0
  160. package/vendor/connector-sdk/dist/browser-source-read.d.ts +52 -0
  161. package/vendor/connector-sdk/dist/browser-source-read.js +107 -0
  162. package/vendor/connector-sdk/dist/connector-types.d.ts +10 -0
  163. package/vendor/connector-sdk/dist/index.d.ts +3 -0
  164. package/vendor/connector-sdk/dist/index.js +2 -0
  165. package/vendor/connector-sdk/package.json +9 -1
  166. package/vendor/core/dist/capabilities.d.ts +1 -1
  167. package/vendor/core/dist/capabilities.js +0 -1
  168. package/vendor/core/dist/connector-query-errors.d.ts +32 -0
  169. package/vendor/core/dist/connector-query-errors.js +41 -1
  170. package/vendor/core/dist/contracts/tools/manage-conversations.js +2 -2
  171. package/vendor/core/dist/contracts/tools/manage-feeds.d.ts +14 -0
  172. package/vendor/core/dist/contracts/tools/manage-feeds.js +17 -0
  173. package/vendor/core/dist/contracts/worker/protocol.d.ts +8 -131
  174. package/vendor/core/dist/contracts/worker/protocol.js +9 -61
  175. package/vendor/core/dist/device-pin-tombstones.d.ts +44 -0
  176. package/vendor/core/dist/device-pin-tombstones.js +57 -0
  177. package/vendor/core/dist/index.d.ts +2 -1
  178. package/vendor/core/dist/index.js +1 -0
  179. package/vendor/core/dist/logger.js +10 -25
  180. package/vendor/core/dist/utils/diagnostic-scrubber.js +258 -21
  181. package/vendor/core/dist/worker/wire.d.ts +0 -10
  182. package/vendor/core/package.json +6 -6
  183. package/vendor/views/package.json +1 -1
  184. package/dist/owletto/dist/assets/_-C_zNZben.js +0 -2
  185. package/dist/owletto/dist/assets/_agentId-QQW91cHX.js +0 -2
  186. package/dist/owletto/dist/assets/_name-t3oBJ6Zf.js +0 -2
  187. package/dist/owletto/dist/assets/_shape-bo2lMVCu.js +0 -2
  188. package/dist/owletto/dist/assets/_skillKey-Dwm4Q4wI.js +0 -2
  189. package/dist/owletto/dist/assets/_viewKey-Bh6E_NxA.js +0 -2
  190. package/dist/owletto/dist/assets/_viewKey-D4jKl-Zf.js +0 -2
  191. package/dist/owletto/dist/assets/agent-thread-C8UaUTWc.js +0 -6
  192. package/dist/owletto/dist/assets/agents-F4mGI2oF.js +0 -2
  193. package/dist/owletto/dist/assets/automations-F4mGI2oF.js +0 -2
  194. package/dist/owletto/dist/assets/connect-B2YL6qIK.js +0 -2
  195. package/dist/owletto/dist/assets/connect._clientId-B6LDmDRV.js +0 -2
  196. package/dist/owletto/dist/assets/connected._clientId-D_HaKoI1.js +0 -2
  197. package/dist/owletto/dist/assets/create-CUqO6Kfk.js +0 -2
  198. package/dist/owletto/dist/assets/create-automation-form-_4vUkrls.js +0 -3
  199. package/dist/owletto/dist/assets/create-iHcxV0xd.js +0 -2
  200. package/dist/owletto/dist/assets/create._connectorKey-CCYLEicg.js +0 -2
  201. package/dist/owletto/dist/assets/deployments-ihkhK1zV.js +0 -2
  202. package/dist/owletto/dist/assets/guardrails-molekzAF.js +0 -2
  203. package/dist/owletto/dist/assets/identity-BJcaG66g.js +0 -2
  204. package/dist/owletto/dist/assets/index-B04ON9Jv.js +0 -2
  205. package/dist/owletto/dist/assets/index-BOsK-K-2.js +0 -2
  206. package/dist/owletto/dist/assets/index-Bk1x7A67.js +0 -2
  207. package/dist/owletto/dist/assets/index-CFnx5huL.js +0 -2
  208. package/dist/owletto/dist/assets/index-Dbd1jusf.js +0 -2
  209. package/dist/owletto/dist/assets/index-DqZuqC08.js +0 -2
  210. package/dist/owletto/dist/assets/index-Dr-Xg_xO.js +0 -2
  211. package/dist/owletto/dist/assets/index-KPOvMVa-.js +0 -2
  212. package/dist/owletto/dist/assets/models-DnMb3n-Z.js +0 -2
  213. package/dist/owletto/dist/assets/public-shell-ready-7KYnww6e.js +0 -2
  214. package/dist/owletto/dist/assets/runs-panel-BO3h5RkS.js +0 -2
  215. package/dist/owletto/dist/assets/settings-4Ev-0iNL.js +0 -2
  216. package/dist/owletto/dist/assets/skills-D0X430X8.js +0 -2
  217. package/vendor/core/dist/contracts/worker/device-chat.d.ts +0 -4
  218. package/vendor/core/dist/contracts/worker/device-chat.js +0 -26
@@ -1,2 +1,2 @@
1
- import{d4 as T,j as e,B as f,P as g,r as m,d5 as C,X as O,d6 as k,d7 as S,cy as z,C as B,d8 as D,d9 as E,da as F,db as L,cj as $,ck as R,Q as I,dc as j,dd as Q,de as _,df as N,dg as b,I as y,dh as A}from"./index-_oPeVpL_.js";function w(s,t,n){return T(s,-t,n)}const P="w-72";function M({editor:s,close:t,header:n,footer:o}){const[r,a]=m.useState("");return e.jsxs(e.Fragment,{children:[n,s.kind==="list"?e.jsxs(D,{shouldFilter:!s.onQueryChange,children:[e.jsx(E,{autoFocus:!0,placeholder:s.searchPlaceholder,value:r,onValueChange:u=>{a(u),s.onQueryChange?.(u)}}),e.jsxs(F,{children:[e.jsx(L,{children:s.emptyText}),e.jsx($,{children:s.items(t,r)})]})]}):s.render(t),o]})}function H({chip:s,editor:t}){const[n,o]=m.useState(!1),r=s.onRemove!=null,a=[s.label,s.op,s.value].filter(Boolean).join(" "),u=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-muted-foreground",children:s.label}),s.op?e.jsx("span",{className:"text-muted-foreground",children:s.op}):null,e.jsx("span",{className:"min-w-0 truncate font-medium",children:s.value})]}),l=t?e.jsx(S,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":`Edit filter: ${a}`,className:"flex min-w-0 items-center gap-1.5 pl-2.5 pr-1 focus-visible:outline-none",children:u})}):e.jsx("span",{className:"flex min-w-0 items-center gap-1.5 pl-2.5 pr-1",children:u});return e.jsxs(C,{open:n,onOpenChange:o,children:[e.jsxs("div",{"data-filter-chip":s.id,title:s.title,className:g("inline-flex h-8 max-w-full items-stretch rounded-md border text-sm",s.tone==="warning"?"border-amber-500/60 bg-amber-500/10":r?"bg-muted":"border-dashed bg-transparent",n&&"ring-1 ring-ring",!r&&"pr-1.5"),children:[l,r?e.jsx("button",{type:"button","aria-label":`Remove filter: ${a}`,onClick:s.onRemove,className:"flex w-7 shrink-0 items-center justify-center text-muted-foreground transition-colors hover:text-foreground",children:e.jsx(O,{className:"h-3.5 w-3.5"})}):null]}),t?e.jsx(k,{align:"start",className:g("p-0",P,t.className),children:e.jsx(M,{editor:t,close:()=>o(!1),footer:r?e.jsx("div",{className:"border-t p-1",children:e.jsx(f,{variant:"ghost",size:"sm",className:"w-full justify-start text-destructive hover:text-destructive",onClick:()=>{o(!1),s.onRemove?.()},children:"Remove filter"})}):null})}):null]})}function U({fields:s}){const[t,n]=m.useState(!1),[o,r]=m.useState(),a=s.find(i=>i.key===o),u=[...new Set(s.map(i=>i.group??""))],l=()=>{n(!1),r(void 0)};return e.jsxs(C,{open:t,onOpenChange:i=>{n(i),i||r(void 0)},children:[e.jsx(S,{asChild:!0,children:e.jsxs(f,{variant:"outline",size:"sm",className:"h-8 border-dashed font-normal text-muted-foreground",children:[e.jsx(z,{className:"mr-1 h-3.5 w-3.5"}),"Filter"]})}),e.jsx(k,{align:"start",className:g("p-0",P,a?.editor.className),children:a?e.jsx(M,{editor:a.editor,close:l,header:e.jsxs("div",{className:"flex items-center gap-1 border-b px-1 py-1 text-sm font-medium",children:[e.jsx(f,{variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":"Back to filters",onClick:()=>r(void 0),children:e.jsx(B,{className:"h-4 w-4"})}),a.label]})},a.key):e.jsxs(D,{children:[e.jsx(E,{autoFocus:!0,placeholder:"Filter by…"}),e.jsxs(F,{children:[e.jsx(L,{children:"No matching filter"}),u.map(i=>e.jsx($,{heading:i||void 0,children:s.filter(d=>(d.group??"")===i).map(d=>e.jsxs(R,{value:`${d.label} ${d.key}`,onSelect:()=>r(d.key),className:"gap-2",children:[d.icon?e.jsx("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",children:d.icon}):null,d.label]},d.key))},i))]})]})})]})}function K({fields:s,chips:t,meta:n,trailing:o,onClearAll:r,hasClearableState:a=!1,className:u,label:l="Filters"}){const i=s.filter(c=>c.inMenu!==!1),d=t.filter(c=>c.onRemove).length;return e.jsxs("div",{role:"search","aria-label":l,className:g("flex min-w-0 flex-wrap items-center gap-2",u),children:[t.map(c=>e.jsx(H,{chip:c,editor:c.editor??s.find(x=>x.key===(c.field??c.id))?.editor},c.id)),i.length>0?e.jsx(U,{fields:i}):null,e.jsxs("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[n?e.jsx("span",{className:"text-sm text-muted-foreground",children:n}):null,r&&(d>0||a)?e.jsx(f,{variant:"ghost",size:"sm",className:"h-8 text-muted-foreground",onClick:r,children:"Clear all"}):null,o]})]})}function V({selected:s}){return e.jsx(Q,{className:g("h-4 w-4 shrink-0",s?"opacity-100":"opacity-0")})}function Y({searchPlaceholder:s,emptyText:t="No options",options:n,selected:o,multiple:r=!1,onSelect:a}){return{kind:"list",searchPlaceholder:s,emptyText:t,items:u=>n.map(l=>{const i=o.includes(l.value);return e.jsxs(R,{value:`${l.label} ${l.keywords??l.value}`,onSelect:()=>{a(l.value),r||u()},className:"gap-2",children:[r?e.jsx(I,{checked:i,className:"mr-1"}):e.jsx(V,{selected:i}),l.icon,e.jsx("span",{className:"min-w-0 flex-1 truncate",children:l.label}),l.count!=null?e.jsx("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:l.count.toLocaleString()}):null]},l.value)})}}function Z([s,t],n,o){return s<=n?`≤ ${t}`:t>=o?`≥ ${s}`:`${s}–${t}`}function q({value:s,min:t,max:n,onApply:o,close:r}){const[a,u]=m.useState(String(s?.[0]??t)),[l,i]=m.useState(String(s?.[1]??n)),[d,c]=m.useState(),x=h=>{h.preventDefault();const v=Number(a),p=Number(l);if(!Number.isFinite(v)||!Number.isFinite(p)){c("Enter a number.");return}if(v<t||p>n){c(`Use values between ${t} and ${n}.`);return}if(v>p){c("The lower bound must not exceed the upper bound.");return}o([v,p]),r()};return e.jsxs("form",{className:"space-y-3 p-3",onSubmit:x,children:[e.jsxs("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center gap-2",children:[e.jsx(y,{"aria-label":"From",type:"number",min:t,max:n,value:a,onChange:h=>u(h.target.value)}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"to"}),e.jsx(y,{"aria-label":"To",type:"number",min:t,max:n,value:l,onChange:h=>i(h.target.value)})]}),d?e.jsx("p",{role:"alert",className:"text-xs text-destructive",children:d}):null,e.jsx(f,{type:"submit",size:"sm",className:"w-full",children:"Apply"})]})}function ee(s){return{kind:"custom",render:t=>e.jsx(q,{...s,close:t})}}const G=[{label:"Today",range:()=>[N(new Date),b(new Date)]},{label:"Last 7 days",range:()=>[N(w(new Date,6)),b(new Date)]},{label:"Last 30 days",range:()=>[N(w(new Date,29)),b(new Date)]},{label:"This month",range:()=>[A(new Date),b(new Date)]}];function se([s,t]){return j(s,"yyyy-MM-dd")===j(t,"yyyy-MM-dd")?j(s,"LLL d, y"):`${j(s,"LLL d")} – ${j(t,"LLL d, y")}`}function W({value:s,onApply:t,close:n}){const[o,r]=m.useState(s?{from:s[0],to:s[1]}:void 0);return e.jsxs("div",{className:"flex flex-col sm:flex-row",children:[e.jsx("div",{className:"flex flex-col gap-0.5 border-b p-2 sm:w-36 sm:border-b-0 sm:border-r",children:G.map(a=>e.jsx(f,{variant:"ghost",size:"sm",className:"justify-start font-normal",onClick:()=>{t(a.range()),n()},children:a.label},a.label))}),e.jsx(_,{mode:"range",defaultMonth:o?.from,selected:o,onSelect:a=>{r(a),a?.from&&a.to&&a.from!==a.to&&(t([N(a.from),b(a.to)]),n())},numberOfMonths:1})]})}function te(s){return{kind:"custom",className:"w-auto",render:t=>e.jsx(W,{...s,close:t})}}function X({type:s,label:t,value:n,onApply:o,close:r}){const[a,u]=m.useState(n==null?"":String(n)),[l,i]=m.useState(),d=c=>{if(c.preventDefault(),s==="number"){const x=Number(a);if(a.trim()===""||!Number.isFinite(x)){i("Enter a number.");return}o(x)}else o(a);r()};return e.jsxs("form",{className:"space-y-3 p-3",onSubmit:d,children:[e.jsx(y,{autoFocus:!0,"aria-label":t,type:s,step:s==="number"?"any":void 0,value:a,onChange:c=>u(c.target.value),placeholder:"Enter a value…"}),l?e.jsx("p",{role:"alert",className:"text-xs text-destructive",children:l}):null,e.jsx(f,{type:"submit",size:"sm",className:"w-full",children:"Apply"})]})}function ae(s){return{kind:"custom",render:t=>e.jsx(X,{...s,close:t})}}export{K as F,V as S,Z as a,te as d,se as f,Y as o,ee as r,ae as v};
2
- //# sourceMappingURL=filter-editors-DCQgGLyR.js.map
1
+ import{d4 as T,j as e,B as f,P as g,r as m,d5 as C,X as O,d6 as k,d7 as S,cy as z,C as B,d8 as D,d9 as E,da as F,db as L,cj as $,ck as R,Q as I,dc as j,dd as Q,de as _,df as N,dg as b,I as y,dh as A}from"./index-Cr5hwh-C.js";function w(s,t,n){return T(s,-t,n)}const P="w-72";function M({editor:s,close:t,header:n,footer:o}){const[r,a]=m.useState("");return e.jsxs(e.Fragment,{children:[n,s.kind==="list"?e.jsxs(D,{shouldFilter:!s.onQueryChange,children:[e.jsx(E,{autoFocus:!0,placeholder:s.searchPlaceholder,value:r,onValueChange:u=>{a(u),s.onQueryChange?.(u)}}),e.jsxs(F,{children:[e.jsx(L,{children:s.emptyText}),e.jsx($,{children:s.items(t,r)})]})]}):s.render(t),o]})}function H({chip:s,editor:t}){const[n,o]=m.useState(!1),r=s.onRemove!=null,a=[s.label,s.op,s.value].filter(Boolean).join(" "),u=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-muted-foreground",children:s.label}),s.op?e.jsx("span",{className:"text-muted-foreground",children:s.op}):null,e.jsx("span",{className:"min-w-0 truncate font-medium",children:s.value})]}),l=t?e.jsx(S,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":`Edit filter: ${a}`,className:"flex min-w-0 items-center gap-1.5 pl-2.5 pr-1 focus-visible:outline-none",children:u})}):e.jsx("span",{className:"flex min-w-0 items-center gap-1.5 pl-2.5 pr-1",children:u});return e.jsxs(C,{open:n,onOpenChange:o,children:[e.jsxs("div",{"data-filter-chip":s.id,title:s.title,className:g("inline-flex h-8 max-w-full items-stretch rounded-md border text-sm",s.tone==="warning"?"border-amber-500/60 bg-amber-500/10":r?"bg-muted":"border-dashed bg-transparent",n&&"ring-1 ring-ring",!r&&"pr-1.5"),children:[l,r?e.jsx("button",{type:"button","aria-label":`Remove filter: ${a}`,onClick:s.onRemove,className:"flex w-7 shrink-0 items-center justify-center text-muted-foreground transition-colors hover:text-foreground",children:e.jsx(O,{className:"h-3.5 w-3.5"})}):null]}),t?e.jsx(k,{align:"start",className:g("p-0",P,t.className),children:e.jsx(M,{editor:t,close:()=>o(!1),footer:r?e.jsx("div",{className:"border-t p-1",children:e.jsx(f,{variant:"ghost",size:"sm",className:"w-full justify-start text-destructive hover:text-destructive",onClick:()=>{o(!1),s.onRemove?.()},children:"Remove filter"})}):null})}):null]})}function U({fields:s}){const[t,n]=m.useState(!1),[o,r]=m.useState(),a=s.find(i=>i.key===o),u=[...new Set(s.map(i=>i.group??""))],l=()=>{n(!1),r(void 0)};return e.jsxs(C,{open:t,onOpenChange:i=>{n(i),i||r(void 0)},children:[e.jsx(S,{asChild:!0,children:e.jsxs(f,{variant:"outline",size:"sm",className:"h-8 border-dashed font-normal text-muted-foreground",children:[e.jsx(z,{className:"mr-1 h-3.5 w-3.5"}),"Filter"]})}),e.jsx(k,{align:"start",className:g("p-0",P,a?.editor.className),children:a?e.jsx(M,{editor:a.editor,close:l,header:e.jsxs("div",{className:"flex items-center gap-1 border-b px-1 py-1 text-sm font-medium",children:[e.jsx(f,{variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":"Back to filters",onClick:()=>r(void 0),children:e.jsx(B,{className:"h-4 w-4"})}),a.label]})},a.key):e.jsxs(D,{children:[e.jsx(E,{autoFocus:!0,placeholder:"Filter by…"}),e.jsxs(F,{children:[e.jsx(L,{children:"No matching filter"}),u.map(i=>e.jsx($,{heading:i||void 0,children:s.filter(d=>(d.group??"")===i).map(d=>e.jsxs(R,{value:`${d.label} ${d.key}`,onSelect:()=>r(d.key),className:"gap-2",children:[d.icon?e.jsx("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",children:d.icon}):null,d.label]},d.key))},i))]})]})})]})}function K({fields:s,chips:t,meta:n,trailing:o,onClearAll:r,hasClearableState:a=!1,className:u,label:l="Filters"}){const i=s.filter(c=>c.inMenu!==!1),d=t.filter(c=>c.onRemove).length;return e.jsxs("div",{role:"search","aria-label":l,className:g("flex min-w-0 flex-wrap items-center gap-2",u),children:[t.map(c=>e.jsx(H,{chip:c,editor:c.editor??s.find(x=>x.key===(c.field??c.id))?.editor},c.id)),i.length>0?e.jsx(U,{fields:i}):null,e.jsxs("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[n?e.jsx("span",{className:"text-sm text-muted-foreground",children:n}):null,r&&(d>0||a)?e.jsx(f,{variant:"ghost",size:"sm",className:"h-8 text-muted-foreground",onClick:r,children:"Clear all"}):null,o]})]})}function V({selected:s}){return e.jsx(Q,{className:g("h-4 w-4 shrink-0",s?"opacity-100":"opacity-0")})}function Y({searchPlaceholder:s,emptyText:t="No options",options:n,selected:o,multiple:r=!1,onSelect:a}){return{kind:"list",searchPlaceholder:s,emptyText:t,items:u=>n.map(l=>{const i=o.includes(l.value);return e.jsxs(R,{value:`${l.label} ${l.keywords??l.value}`,onSelect:()=>{a(l.value),r||u()},className:"gap-2",children:[r?e.jsx(I,{checked:i,className:"mr-1"}):e.jsx(V,{selected:i}),l.icon,e.jsx("span",{className:"min-w-0 flex-1 truncate",children:l.label}),l.count!=null?e.jsx("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:l.count.toLocaleString()}):null]},l.value)})}}function Z([s,t],n,o){return s<=n?`≤ ${t}`:t>=o?`≥ ${s}`:`${s}–${t}`}function q({value:s,min:t,max:n,onApply:o,close:r}){const[a,u]=m.useState(String(s?.[0]??t)),[l,i]=m.useState(String(s?.[1]??n)),[d,c]=m.useState(),x=h=>{h.preventDefault();const v=Number(a),p=Number(l);if(!Number.isFinite(v)||!Number.isFinite(p)){c("Enter a number.");return}if(v<t||p>n){c(`Use values between ${t} and ${n}.`);return}if(v>p){c("The lower bound must not exceed the upper bound.");return}o([v,p]),r()};return e.jsxs("form",{className:"space-y-3 p-3",onSubmit:x,children:[e.jsxs("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center gap-2",children:[e.jsx(y,{"aria-label":"From",type:"number",min:t,max:n,value:a,onChange:h=>u(h.target.value)}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"to"}),e.jsx(y,{"aria-label":"To",type:"number",min:t,max:n,value:l,onChange:h=>i(h.target.value)})]}),d?e.jsx("p",{role:"alert",className:"text-xs text-destructive",children:d}):null,e.jsx(f,{type:"submit",size:"sm",className:"w-full",children:"Apply"})]})}function ee(s){return{kind:"custom",render:t=>e.jsx(q,{...s,close:t})}}const G=[{label:"Today",range:()=>[N(new Date),b(new Date)]},{label:"Last 7 days",range:()=>[N(w(new Date,6)),b(new Date)]},{label:"Last 30 days",range:()=>[N(w(new Date,29)),b(new Date)]},{label:"This month",range:()=>[A(new Date),b(new Date)]}];function se([s,t]){return j(s,"yyyy-MM-dd")===j(t,"yyyy-MM-dd")?j(s,"LLL d, y"):`${j(s,"LLL d")} – ${j(t,"LLL d, y")}`}function W({value:s,onApply:t,close:n}){const[o,r]=m.useState(s?{from:s[0],to:s[1]}:void 0);return e.jsxs("div",{className:"flex flex-col sm:flex-row",children:[e.jsx("div",{className:"flex flex-col gap-0.5 border-b p-2 sm:w-36 sm:border-b-0 sm:border-r",children:G.map(a=>e.jsx(f,{variant:"ghost",size:"sm",className:"justify-start font-normal",onClick:()=>{t(a.range()),n()},children:a.label},a.label))}),e.jsx(_,{mode:"range",defaultMonth:o?.from,selected:o,onSelect:a=>{r(a),a?.from&&a.to&&a.from!==a.to&&(t([N(a.from),b(a.to)]),n())},numberOfMonths:1})]})}function te(s){return{kind:"custom",className:"w-auto",render:t=>e.jsx(W,{...s,close:t})}}function X({type:s,label:t,value:n,onApply:o,close:r}){const[a,u]=m.useState(n==null?"":String(n)),[l,i]=m.useState(),d=c=>{if(c.preventDefault(),s==="number"){const x=Number(a);if(a.trim()===""||!Number.isFinite(x)){i("Enter a number.");return}o(x)}else o(a);r()};return e.jsxs("form",{className:"space-y-3 p-3",onSubmit:d,children:[e.jsx(y,{autoFocus:!0,"aria-label":t,type:s,step:s==="number"?"any":void 0,value:a,onChange:c=>u(c.target.value),placeholder:"Enter a value…"}),l?e.jsx("p",{role:"alert",className:"text-xs text-destructive",children:l}):null,e.jsx(f,{type:"submit",size:"sm",className:"w-full",children:"Apply"})]})}function ae(s){return{kind:"custom",render:t=>e.jsx(X,{...s,close:t})}}export{K as F,V as S,Z as a,te as d,se as f,Y as o,ee as r,ae as v};
2
+ //# sourceMappingURL=filter-editors-Cj-v6NtH.js.map
@@ -1,2 +1,2 @@
1
- import{r,j as t,P as u}from"./index-_oPeVpL_.js";function l({className:i,delayMs:e=500}){const[s,n]=r.useState(e<=0);return r.useEffect(()=>{if(e<=0)return;const a=setTimeout(()=>n(!0),e);return()=>clearTimeout(a)},[e]),s?t.jsx("div",{className:u("flex min-h-[50vh] items-center justify-center",i),role:"status","aria-label":"Loading",children:t.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})}):null}export{l as F};
2
- //# sourceMappingURL=full-page-spinner-KpV2FS2u.js.map
1
+ import{r,j as t,P as u}from"./index-Cr5hwh-C.js";function l({className:i,delayMs:e=500}){const[s,n]=r.useState(e<=0);return r.useEffect(()=>{if(e<=0)return;const a=setTimeout(()=>n(!0),e);return()=>clearTimeout(a)},[e]),s?t.jsx("div",{className:u("flex min-h-[50vh] items-center justify-center",i),role:"status","aria-label":"Loading",children:t.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})}):null}export{l as F};
2
+ //# sourceMappingURL=full-page-spinner-DqpH99np.js.map
@@ -0,0 +1,2 @@
1
+ import{j as t,O as o}from"./index-Cr5hwh-C.js";function n(){return t.jsx(o,{})}export{n as component};
2
+ //# sourceMappingURL=guardrails-HFo2Ut8B.js.map
@@ -0,0 +1,2 @@
1
+ import{il as t,j as n}from"./index-Cr5hwh-C.js";import{a as i}from"./agents-workbench-Bt5QCYQ7.js";import"./agent-editor-form-hTs7eO_U.js";import"./model-selector-dAbDgJvx.js";import"./proposal-review-shell-UcZr87_Q.js";import"./runs-C0rCgGwX.js";function d(){const{owner:o,agentId:r}=t.useParams(),e=t.useSearch();return n.jsx(i,{owner:o,agentId:r,tab:"identity",runId:e.run_id})}export{d as component};
2
+ //# sourceMappingURL=identity-BigVSBCl.js.map
@@ -1,2 +1,2 @@
1
- import{as as z,j as n,ah as V,at as Y,au as H,av as J,aw as Q,ax as Z,ay as ee,az as ne,r as D,aA as se,aB as G,B as W,m as oe,aC as ae,aD as te,aE as re,aF as ie,aG as ce,aH as de,aI as le,aJ as ue,aK as me,aL as pe,aM as U,aN as he,aO as fe,S as T,L,aP as xe,aQ as X,af as q,aR as ve,aS as ge,aT as ye,aU as _e,aV as Ne,aW as je,M as be,aX as ke}from"./index-_oPeVpL_.js";function Le(){const{owner:a}=z.useParams(),{filter:c}=z.useSearch();return n.jsx(V,{owner:a,children:r=>n.jsx(Ce,{ownerSlug:r.ownerSlug,organizationId:r.organizationId,isWorkspaceLoading:r.isWorkspaceLoading,requestedFilter:c})})}function Ce({ownerSlug:a,organizationId:c,isWorkspaceLoading:r,requestedFilter:p}){const{data:h=[],isLoading:d,isError:E,refetch:j}=Y(c??""),{data:y=[],isLoading:S,isError:K,refetch:R}=H(c??""),{data:b=[]}=J(c,{}),{data:k=[],isLoading:f,isError:C,refetch:O}=Q(),{data:I=[]}=Z(),{data:P,isLoading:M,isError:s,refetch:t}=ee(),{data:x=[],isLoading:m,isError:w,refetch:v}=ne(),e=r||d||S||f||M||m,o=P?.sandboxes??[],i=D.useMemo(()=>x.filter(l=>se(l,a)),[x,a]);return E||K||C||s||w?n.jsx(G,{children:n.jsxs("div",{role:"alert",className:"space-y-2",children:[n.jsx("p",{children:"Could not load the connector inventory."}),n.jsx(W,{variant:"outline",size:"sm",onClick:()=>{Promise.all([j(),R(),O(),t(),v()])},children:"Retry"})]})}):n.jsx(G,{className:"flex flex-1 flex-col gap-6",children:n.jsx(Ie,{ownerSlug:a,isContentLoading:e,groups:h,installedDefs:y,authProfiles:b,inferenceProviders:k,inferenceCatalog:I,sandboxes:o,devices:i,requestedFilter:p})})}function Ie({ownerSlug:a,isContentLoading:c,groups:r,installedDefs:p,authProfiles:h,inferenceProviders:d,inferenceCatalog:E,sandboxes:j,devices:y,requestedFilter:S}){const K=oe(),R=S??"all",b=D.useMemo(()=>{const s=new Map(r.map(e=>[e.connector_key,e])),t=new Map;for(const e of p)t.set(e.key,e);for(const e of r)t.has(e.connector_key)||t.set(e.connector_key,{key:e.connector_key,name:e.connector_name??e.connector_key,description:null,version:"",auth_schema:null,feeds_schema:null,actions_schema:null,options_schema:null,status:"active",login_enabled:!1,favicon_domain:e.favicon_domain,facets:e.facets});const x=ae(d).filter((e,o,i)=>i.findIndex(l=>l.provider.kind===e.provider.kind)===o).map(e=>({connector:{...e.connector,key:`${te}${e.provider.kind}`,name:E.find(o=>o.slug===e.provider.kind)?.displayName??e.provider.kind},group:void 0,profileCounts:{env:0,oauth_app:0,oauth_account:0,browser_session:0},facets:e.facets,needsSetup:!1,provider:e.provider,sandbox:void 0,device:void 0,deviceFamily:void 0})),m=re(j).filter((e,o,i)=>i.findIndex(l=>l.sandbox.providerKind===e.sandbox.providerKind)===o).map(e=>({connector:{...e.connector,key:`${ie}${e.sandbox.providerKind}`,name:ce(e.sandbox.providerKind)},group:void 0,profileCounts:{env:0,oauth_app:0,oauth_account:0,browser_session:0},facets:e.facets,needsSetup:j.some(o=>o.providerKind===e.sandbox.providerKind&&!o.connected),provider:void 0,sandbox:e.sandbox,device:void 0,deviceFamily:void 0})),w=de(y,r,a).map(e=>({connector:e.connector,group:void 0,profileCounts:{env:0,oauth_app:0,oauth_account:0,browser_session:0},facets:e.facets,needsSetup:!1,isDevice:!0,provider:void 0,sandbox:void 0,device:e.device,deviceFamily:e}));return[...Array.from(t.values()).filter(e=>e.installed||(s.get(e.key)?.connection_count??0)>0).filter(e=>!le(e)).map(e=>{const o=s.get(e.key),i=ue(e.auth_schema),l=h.reduce((g,N)=>(N.connector_key!==e.key||(g[N.profile_kind]+=1),g),{env:0,oauth_app:0,oauth_account:0,browser_session:0}),A=me(e,o),_=y.some(g=>g.connectors.some(N=>N.organization_slug===a&&N.connector_key===e.key)),$=we(e,o,i,l);return{connector:e,group:o,profileCounts:l,facets:A,needsSetup:$,isDevice:_,provider:void 0,sandbox:void 0,device:void 0,deviceFamily:void 0}}),...x,...m,...w].sort((e,o)=>e.needsSetup&&!o.needsSetup?-1:!e.needsSetup&&o.needsSetup?1:e.connector.name.localeCompare(o.connector.name))},[a,h,y,r,p,d,E,j]),k=D.useMemo(()=>{const s=pe.filter(t=>t!=="all"&&b.some(x=>U(x,t)));return s.length>1?["all",...s]:[]},[b]),f=k.includes(R)?R:"all",C=D.useMemo(()=>b.filter(s=>U(s,f)),[b,f]),O=C.length,I=D.useMemo(()=>f==="all"?he(a,y,fe()):[],[f,a,y]),P=n.jsx(W,{asChild:!0,size:"sm",className:"h-8 shrink-0 text-xs",children:n.jsxs(L,{to:"/$owner/connectors/create",params:{owner:a},children:[n.jsx(ke,{className:"mr-1.5 h-3.5 w-3.5"}),"Add connector"]})});if(c)return n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"flex justify-end",children:P}),n.jsx("div",{className:"overflow-hidden rounded-lg border",role:"status","aria-label":"Loading connectors",children:Array.from({length:6}).map((s,t)=>n.jsxs("div",{className:`flex items-center gap-3 px-3 py-2.5 ${t===5?"":"border-b"}`,children:[n.jsx(T,{className:"h-7 w-7 shrink-0 rounded-md"}),n.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[n.jsx(T,{className:"h-4 w-40"}),n.jsx(T,{className:"h-3 w-24"})]})]},t))})]});const M=s=>{K({to:"/$owner/connectors",params:{owner:a},search:t=>({...t,filter:s==="all"?void 0:s}),replace:!0})};return n.jsxs("div",{className:"space-y-4",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:"What your agents can reach — data, tools, models, and runtimes."}),I.length>0?n.jsx("div",{className:"grid grid-cols-2 gap-px overflow-hidden rounded-lg border border-dashed bg-border sm:grid-cols-[repeat(auto-fit,minmax(10rem,1fr))]",children:I.map(s=>n.jsxs(L,{to:"/$owner/connectors/app/$appId",params:{owner:a,appId:s.id},title:s.tagline,className:"flex min-w-0 items-center gap-2 bg-background px-3 py-2.5 text-muted-foreground transition-colors last:odd:col-span-2 hover:bg-accent/50 hover:text-foreground sm:last:odd:col-span-1",children:[n.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center text-muted-foreground",children:s.icon}),n.jsx("span",{className:"truncate text-sm font-medium",children:s.name})]},s.id))}):null,n.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[n.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1.5",children:[k.map(s=>n.jsx(W,{type:"button",variant:f===s?"secondary":"ghost","aria-pressed":f===s,size:"sm",className:"h-7 px-2 text-xs",onClick:()=>M(s),children:xe[s]},s)),k.length===0&&C.length===0&&I.length>0?n.jsx("p",{className:"text-sm text-muted-foreground",children:"Nothing connected yet — set up one of the apps above."}):null]}),n.jsx("div",{className:"ml-auto shrink-0",children:P})]}),C.length===0?k.length>0?n.jsx(X,{icon:q.connectors.icon,title:"No connectors match this filter",description:"Try another capability.",secondaryActionLabel:"Show all",secondaryOnAction:()=>M("all")}):I.length>0?null:n.jsx(X,{icon:q.connectors.icon,title:"No connectors yet",description:"Connect your first connector to this workspace."}):n.jsx("div",{className:"overflow-hidden rounded-lg border",children:C.map(({connector:s,group:t,facets:x,profileCounts:m,needsSetup:w,provider:v,sandbox:e,device:o,deviceFamily:i},l)=>{const A=new Map(p.map(u=>[u.key,u])),_=ve(s.key,A,{name:s.name,iconUrl:v?E.find(u=>u.slug===v.kind)?.iconUrl:void 0,faviconDomain:s.favicon_domain??t?.favicon_domain??(e?ge(e.providerKind):void 0)}),$=m.oauth_account+m.browser_session,g=t?.connection_count??0,N=o?`${i?.devices.length??1} ${o.platform==="chrome-extension"?i?.devices.length===1?"profile":"profiles":i?.devices.length===1?"device":"devices"} · ${i?.devices.filter(u=>u.online).length??0} online`:v?`${d.filter(u=>u.kind===v.kind).length} configured accounts`:e?`${j.filter(u=>u.providerKind===e.providerKind).length} instances`:[`${g} ${g===1?"connection":"connections"}`,$>0?`${$} ${$===1?"saved authorization":"saved authorizations"}`:null,m.oauth_app>0?`${m.oauth_app} OAuth app${m.oauth_app===1?"":"s"}`:null].filter(Boolean).join(" · "),F=Ee(l,O),B=n.jsxs(n.Fragment,{children:[o?n.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:n.jsx(ye,{platform:_e(o)})}):n.jsx(Ne,{icon:_.icon,iconUrl:_.iconUrl,name:_.name,faviconDomain:_.faviconDomain,className:"h-7 w-7 shrink-0 rounded-md text-[10px]"}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx("span",{className:"truncate text-sm font-medium",children:_.name}),n.jsx(je,{facets:x})]}),n.jsx("p",{className:"truncate text-xs text-muted-foreground",children:N})]}),w?n.jsx(be,{variant:"secondary",className:"shrink-0 text-[10px]",children:"Needs setup"}):null]});return i?.appId?n.jsx(L,{to:"/$owner/connectors/app/$appId",params:{owner:a,appId:i.appId},className:F,children:B},s.key):o?n.jsx(L,{to:"/$owner/connectors/device/$deviceId",params:{owner:a,deviceId:o.id},className:F,children:B},s.key):n.jsx(L,{to:"/$owner/connectors/$connectorKey",params:{owner:a,connectorKey:s.key},search:v||e?{instances:!0}:{},className:F,children:B},s.key)})})]})}function Ee(a,c){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 ${a===c-1?"":"border-b"}`}function we(a,c,r,p){if((c?.connection_count??0)>0)return!1;const h=r.some(d=>d.type==="none");return!!(!h&&r.some(d=>d.type==="oauth")&&p.oauth_app===0||!h&&r.some(d=>d.type==="env_keys")&&p.env===0||!h&&r.some(d=>d.type==="app_installation")&&!c||a.required_capability&&!c)}export{Le as component};
2
- //# sourceMappingURL=index-BEvyBdOU.js.map
1
+ import{as as z,j as n,ah as V,at as Y,au as H,av as J,aw as Q,ax as Z,ay as ee,az as ne,r as D,aA as se,aB as G,B as W,m as oe,aC as ae,aD as te,aE as re,aF as ie,aG as ce,aH as de,aI as le,aJ as ue,aK as me,aL as pe,aM as U,aN as he,aO as fe,S as T,L,aP as xe,aQ as X,af as q,aR as ve,aS as ge,aT as ye,aU as _e,aV as Ne,aW as je,M as be,aX as ke}from"./index-Cr5hwh-C.js";function Le(){const{owner:a}=z.useParams(),{filter:c}=z.useSearch();return n.jsx(V,{owner:a,children:r=>n.jsx(Ce,{ownerSlug:r.ownerSlug,organizationId:r.organizationId,isWorkspaceLoading:r.isWorkspaceLoading,requestedFilter:c})})}function Ce({ownerSlug:a,organizationId:c,isWorkspaceLoading:r,requestedFilter:p}){const{data:h=[],isLoading:d,isError:E,refetch:j}=Y(c??""),{data:y=[],isLoading:S,isError:K,refetch:R}=H(c??""),{data:b=[]}=J(c,{}),{data:k=[],isLoading:f,isError:C,refetch:O}=Q(),{data:I=[]}=Z(),{data:P,isLoading:M,isError:s,refetch:t}=ee(),{data:x=[],isLoading:m,isError:w,refetch:v}=ne(),e=r||d||S||f||M||m,o=P?.sandboxes??[],i=D.useMemo(()=>x.filter(l=>se(l,a)),[x,a]);return E||K||C||s||w?n.jsx(G,{children:n.jsxs("div",{role:"alert",className:"space-y-2",children:[n.jsx("p",{children:"Could not load the connector inventory."}),n.jsx(W,{variant:"outline",size:"sm",onClick:()=>{Promise.all([j(),R(),O(),t(),v()])},children:"Retry"})]})}):n.jsx(G,{className:"flex flex-1 flex-col gap-6",children:n.jsx(Ie,{ownerSlug:a,isContentLoading:e,groups:h,installedDefs:y,authProfiles:b,inferenceProviders:k,inferenceCatalog:I,sandboxes:o,devices:i,requestedFilter:p})})}function Ie({ownerSlug:a,isContentLoading:c,groups:r,installedDefs:p,authProfiles:h,inferenceProviders:d,inferenceCatalog:E,sandboxes:j,devices:y,requestedFilter:S}){const K=oe(),R=S??"all",b=D.useMemo(()=>{const s=new Map(r.map(e=>[e.connector_key,e])),t=new Map;for(const e of p)t.set(e.key,e);for(const e of r)t.has(e.connector_key)||t.set(e.connector_key,{key:e.connector_key,name:e.connector_name??e.connector_key,description:null,version:"",auth_schema:null,feeds_schema:null,actions_schema:null,options_schema:null,status:"active",login_enabled:!1,favicon_domain:e.favicon_domain,facets:e.facets});const x=ae(d).filter((e,o,i)=>i.findIndex(l=>l.provider.kind===e.provider.kind)===o).map(e=>({connector:{...e.connector,key:`${te}${e.provider.kind}`,name:E.find(o=>o.slug===e.provider.kind)?.displayName??e.provider.kind},group:void 0,profileCounts:{env:0,oauth_app:0,oauth_account:0,browser_session:0},facets:e.facets,needsSetup:!1,provider:e.provider,sandbox:void 0,device:void 0,deviceFamily:void 0})),m=re(j).filter((e,o,i)=>i.findIndex(l=>l.sandbox.providerKind===e.sandbox.providerKind)===o).map(e=>({connector:{...e.connector,key:`${ie}${e.sandbox.providerKind}`,name:ce(e.sandbox.providerKind)},group:void 0,profileCounts:{env:0,oauth_app:0,oauth_account:0,browser_session:0},facets:e.facets,needsSetup:j.some(o=>o.providerKind===e.sandbox.providerKind&&!o.connected),provider:void 0,sandbox:e.sandbox,device:void 0,deviceFamily:void 0})),w=de(y,r,a).map(e=>({connector:e.connector,group:void 0,profileCounts:{env:0,oauth_app:0,oauth_account:0,browser_session:0},facets:e.facets,needsSetup:!1,isDevice:!0,provider:void 0,sandbox:void 0,device:e.device,deviceFamily:e}));return[...Array.from(t.values()).filter(e=>e.installed||(s.get(e.key)?.connection_count??0)>0).filter(e=>!le(e)).map(e=>{const o=s.get(e.key),i=ue(e.auth_schema),l=h.reduce((g,N)=>(N.connector_key!==e.key||(g[N.profile_kind]+=1),g),{env:0,oauth_app:0,oauth_account:0,browser_session:0}),A=me(e,o),_=y.some(g=>g.connectors.some(N=>N.organization_slug===a&&N.connector_key===e.key)),$=we(e,o,i,l);return{connector:e,group:o,profileCounts:l,facets:A,needsSetup:$,isDevice:_,provider:void 0,sandbox:void 0,device:void 0,deviceFamily:void 0}}),...x,...m,...w].sort((e,o)=>e.needsSetup&&!o.needsSetup?-1:!e.needsSetup&&o.needsSetup?1:e.connector.name.localeCompare(o.connector.name))},[a,h,y,r,p,d,E,j]),k=D.useMemo(()=>{const s=pe.filter(t=>t!=="all"&&b.some(x=>U(x,t)));return s.length>1?["all",...s]:[]},[b]),f=k.includes(R)?R:"all",C=D.useMemo(()=>b.filter(s=>U(s,f)),[b,f]),O=C.length,I=D.useMemo(()=>f==="all"?he(a,y,fe()):[],[f,a,y]),P=n.jsx(W,{asChild:!0,size:"sm",className:"h-8 shrink-0 text-xs",children:n.jsxs(L,{to:"/$owner/connectors/create",params:{owner:a},children:[n.jsx(ke,{className:"mr-1.5 h-3.5 w-3.5"}),"Add connector"]})});if(c)return n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"flex justify-end",children:P}),n.jsx("div",{className:"overflow-hidden rounded-lg border",role:"status","aria-label":"Loading connectors",children:Array.from({length:6}).map((s,t)=>n.jsxs("div",{className:`flex items-center gap-3 px-3 py-2.5 ${t===5?"":"border-b"}`,children:[n.jsx(T,{className:"h-7 w-7 shrink-0 rounded-md"}),n.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[n.jsx(T,{className:"h-4 w-40"}),n.jsx(T,{className:"h-3 w-24"})]})]},t))})]});const M=s=>{K({to:"/$owner/connectors",params:{owner:a},search:t=>({...t,filter:s==="all"?void 0:s}),replace:!0})};return n.jsxs("div",{className:"space-y-4",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:"What your agents can reach — data, tools, models, and runtimes."}),I.length>0?n.jsx("div",{className:"grid grid-cols-2 gap-px overflow-hidden rounded-lg border border-dashed bg-border sm:grid-cols-[repeat(auto-fit,minmax(10rem,1fr))]",children:I.map(s=>n.jsxs(L,{to:"/$owner/connectors/app/$appId",params:{owner:a,appId:s.id},title:s.tagline,className:"flex min-w-0 items-center gap-2 bg-background px-3 py-2.5 text-muted-foreground transition-colors last:odd:col-span-2 hover:bg-accent/50 hover:text-foreground sm:last:odd:col-span-1",children:[n.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center text-muted-foreground",children:s.icon}),n.jsx("span",{className:"truncate text-sm font-medium",children:s.name})]},s.id))}):null,n.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[n.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1.5",children:[k.map(s=>n.jsx(W,{type:"button",variant:f===s?"secondary":"ghost","aria-pressed":f===s,size:"sm",className:"h-7 px-2 text-xs",onClick:()=>M(s),children:xe[s]},s)),k.length===0&&C.length===0&&I.length>0?n.jsx("p",{className:"text-sm text-muted-foreground",children:"Nothing connected yet — set up one of the apps above."}):null]}),n.jsx("div",{className:"ml-auto shrink-0",children:P})]}),C.length===0?k.length>0?n.jsx(X,{icon:q.connectors.icon,title:"No connectors match this filter",description:"Try another capability.",secondaryActionLabel:"Show all",secondaryOnAction:()=>M("all")}):I.length>0?null:n.jsx(X,{icon:q.connectors.icon,title:"No connectors yet",description:"Connect your first connector to this workspace."}):n.jsx("div",{className:"overflow-hidden rounded-lg border",children:C.map(({connector:s,group:t,facets:x,profileCounts:m,needsSetup:w,provider:v,sandbox:e,device:o,deviceFamily:i},l)=>{const A=new Map(p.map(u=>[u.key,u])),_=ve(s.key,A,{name:s.name,iconUrl:v?E.find(u=>u.slug===v.kind)?.iconUrl:void 0,faviconDomain:s.favicon_domain??t?.favicon_domain??(e?ge(e.providerKind):void 0)}),$=m.oauth_account+m.browser_session,g=t?.connection_count??0,N=o?`${i?.devices.length??1} ${o.platform==="chrome-extension"?i?.devices.length===1?"profile":"profiles":i?.devices.length===1?"device":"devices"} · ${i?.devices.filter(u=>u.online).length??0} online`:v?`${d.filter(u=>u.kind===v.kind).length} configured accounts`:e?`${j.filter(u=>u.providerKind===e.providerKind).length} instances`:[`${g} ${g===1?"connection":"connections"}`,$>0?`${$} ${$===1?"saved authorization":"saved authorizations"}`:null,m.oauth_app>0?`${m.oauth_app} OAuth app${m.oauth_app===1?"":"s"}`:null].filter(Boolean).join(" · "),F=Ee(l,O),B=n.jsxs(n.Fragment,{children:[o?n.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:n.jsx(ye,{platform:_e(o)})}):n.jsx(Ne,{icon:_.icon,iconUrl:_.iconUrl,name:_.name,faviconDomain:_.faviconDomain,className:"h-7 w-7 shrink-0 rounded-md text-[10px]"}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx("span",{className:"truncate text-sm font-medium",children:_.name}),n.jsx(je,{facets:x})]}),n.jsx("p",{className:"truncate text-xs text-muted-foreground",children:N})]}),w?n.jsx(be,{variant:"secondary",className:"shrink-0 text-[10px]",children:"Needs setup"}):null]});return i?.appId?n.jsx(L,{to:"/$owner/connectors/app/$appId",params:{owner:a,appId:i.appId},className:F,children:B},s.key):o?n.jsx(L,{to:"/$owner/connectors/device/$deviceId",params:{owner:a,deviceId:o.id},className:F,children:B},s.key):n.jsx(L,{to:"/$owner/connectors/$connectorKey",params:{owner:a,connectorKey:s.key},search:v||e?{instances:!0}:{},className:F,children:B},s.key)})})]})}function Ee(a,c){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 ${a===c-1?"":"border-b"}`}function we(a,c,r,p){if((c?.connection_count??0)>0)return!1;const h=r.some(d=>d.type==="none");return!!(!h&&r.some(d=>d.type==="oauth")&&p.oauth_app===0||!h&&r.some(d=>d.type==="env_keys")&&p.env===0||!h&&r.some(d=>d.type==="app_installation")&&!c||a.required_capability&&!c)}export{Le as component};
2
+ //# sourceMappingURL=index-B9uPN6FC.js.map
@@ -1,2 +1,2 @@
1
- import{r as x,j as n,B as p,a_ as T,a$ as C,b0 as L,aZ as S,az as E,au as M,b1 as R,aQ as N,b2 as I,af as D,aR as P,L as j,b3 as B,b4 as O,b5 as W,b6 as z,aV as U,M as v,b7 as F,b8 as K,b9 as H,ba as G,bb as Q,bc as A,bd as Z,be as V,bf as q,ah as J}from"./index-_oPeVpL_.js";import{L as X}from"./list-skeleton-Bl0OS39L.js";import{c as Y}from"./cronstrue-DPXl0qA2.js";const ee=[{value:"all",label:"All"},{value:"event",label:"Event"},{value:"schedule",label:"Schedule"},{value:"manual",label:"Manual"}];function te({pending:e,onConfirm:t}){const[s,o]=x.useState(!1);return s?n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(p,{type:"button",variant:"destructive",size:"sm",disabled:e,onClick:t,children:"Delete"}),n.jsx(p,{type:"button",variant:"ghost",size:"sm",onClick:()=>o(!1),children:"Cancel"})]}):n.jsx(p,{type:"button",variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-destructive","aria-label":"Delete",onClick:()=>o(!0),children:n.jsx(T,{className:"h-4 w-4"})})}function ne(e){try{return Y.toString(e.trim(),{throwExceptionOnParseError:!0})}catch{return`On schedule ${e.trim()}`}}function se(e){return e.toLowerCase()==="github"?"GitHub":C(e)}function ae(e){return C(e.replace(/^\$/,""))}function oe(e){if(!e||typeof e!="object"||Array.isArray(e))return"";const t=e;return typeof t.repository=="string"?` in ${t.repository}`:typeof t.channel_id=="string"?` in #${t.channel_id}`:typeof t.resource_ref=="string"?` for ${t.resource_ref}`:""}function re(e){return Array.isArray(e.triggers)?e.triggers.filter(t=>!!t&&typeof t=="object"):[]}function ie(e){if(e.kind==="schedule"&&typeof e.cron=="string")return ne(e.cron);if(e.kind==="event"&&e.source!=="workspace"&&typeof e.connector_key=="string"){const t=Array.isArray(e.event_types)?e.event_types.filter(o=>typeof o=="string"):[],s=t.length>0?t.join(" or "):"an event";return`${se(e.connector_key)} sends ${s}${oe(e.match)}`}if(e.kind==="event"&&e.source==="workspace"){const t=Array.isArray(e.event_types)?e.event_types.filter(l=>typeof l=="string"):[],s=t.length>0?t.join(" or "):"an event",o=typeof e.entity_type=="string"?` on ${ae(e.entity_type)}`:"";return`another Automation writes ${s}${o}`}return null}function le(e){return e.health==="degraded"?"error":"enabled"}function ce(e){const t=re(e),s=e.name?.trim()||"Untitled automation",o=t.some(r=>r.kind==="event"),l=t.some(r=>r.kind==="schedule"),m=o?"event":l?"schedule":"manual",u=t.map(ie).filter(r=>!!r);let d="When started manually";u.length===1?d=`When ${u[0]}`:u.length>1&&(d=`When ${u[0]}${u.slice(1).map(r=>`, or when ${r}`).join("")}`);const i=t.some(r=>r.kind==="event"&&r.output==="reply_to_source")?"source":"silent";return{key:`automation:${e.automation_id}`,kind:m,when:d,does:s,output:{destination:i},state:le(e),sortTime:e.next_run_at?Date.parse(e.next_run_at):null,automation:e}}const y={event:0,schedule:1,manual:2};function ue(e){return e.map(ce).sort((t,s)=>t.state!==s.state?t.state==="enabled"?-1:1:y[t.kind]!==y[s.kind]?y[t.kind]-y[s.kind]:t.sortTime!==s.sortTime?t.sortTime===null?1:s.sortTime===null?-1:t.sortTime-s.sortTime:t.when.localeCompare(s.when)||t.key.localeCompare(s.key))}const de={kind:"all",output:"any",state:"any"};function me(e,t){return e.filter(s=>(t.kind==="all"||s.kind===t.kind)&&(t.output==="any"||(t.output==="reply"?s.output.destination==="source":s.output.destination==="silent"))&&(t.state==="any"||(t.state==="active"?s.state==="enabled":s.state==="error")))}const w="bg-muted text-muted-foreground",fe={event:{label:"Event",icon:z},schedule:{label:"Schedule",icon:W},manual:{label:"Manual",icon:O}};function he({agentName:e,deviceLabel:t}){const s=t?{label:t,icon:H}:e?{label:e,icon:G}:{label:"Manual · any client",icon:Q},{label:o,icon:l}=s;return n.jsxs(v,{variant:"secondary",className:w,children:[n.jsx(l,{className:"h-3 w-3"}),o]})}function xe({lastRunAt:e,nextRunAt:t}){const s=e?`Ran ${A(e)}`:t?`Next run ${A(t)}`:"Never run";return n.jsxs(v,{variant:"secondary",className:w,children:[n.jsx(Z,{className:"h-3 w-3"}),s]})}function pe({count:e}){return e<=0?null:n.jsxs(v,{variant:"secondary",className:w,children:[n.jsx(V,{className:"h-3 w-3"}),e," ",e===1?"client":"clients"]})}function ye(e){const t=Array.isArray(e.triggers)?e.triggers:[];for(const s of t)if(s&&typeof s=="object"&&s.kind==="event"&&s.source!=="workspace"&&typeof s.connector_key=="string")return s.connector_key;return null}function ve(e,t){return`flex items-center gap-3 px-3 py-2.5 text-left transition-colors hover:bg-accent/50 ${e===t-1?"":"border-b"}`}function ge({automation:e,agentName:t,deviceLabel:s,connectorDisplay:o,owner:l,onRemove:m,removing:u,rowClass:d}){const i=e.automation,r=i.automation_id,g=fe[e.kind],b=i.entity_name&&i.entity_type?`${i.entity_name} · ${i.entity_type}`:null,f=[e.when,b].filter(Boolean).join(" — "),h=i.health==="degraded"?i.health_reasons?.[0]||"Needs attention":null;return n.jsxs("div",{className:d,children:[n.jsxs(j,{to:"/$owner/automations/$automationId",params:{owner:l,automationId:r},search:{view:"activity",run_id:void 0},className:"flex min-w-0 flex-1 items-center gap-3",children:[o?n.jsx(U,{icon:o.icon,iconUrl:o.iconUrl,name:o.name,faviconDomain:o.faviconDomain,className:"h-7 w-7 shrink-0 rounded-md text-[10px]"}):n.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:n.jsx(g.icon,{className:"h-3.5 w-3.5 text-muted-foreground"})}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx("span",{className:"truncate text-sm font-medium",children:e.does}),n.jsx(he,{agentName:t,deviceLabel:s}),n.jsx(xe,{lastRunAt:i.last_run_completed_at??i.last_fired_at??null,nextRunAt:i.next_run_at??null}),n.jsx(pe,{count:i.processing_client_count??0}),h?n.jsxs(v,{variant:"secondary",className:"max-w-full whitespace-normal bg-amber-500/10 text-left text-amber-700 dark:text-amber-400",children:[n.jsx(F,{className:"h-3 w-3 shrink-0"}),h]}):null]}),f?n.jsx("p",{className:"truncate text-xs text-muted-foreground",children:f}):null]})]}),n.jsx(j,{to:"/$owner/automations/$automationId",params:{owner:l,automationId:r},search:{view:"definition",run_id:void 0},className:"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground","aria-label":"Edit",children:n.jsx(K,{className:"h-3.5 w-3.5"})}),n.jsx(te,{pending:u,onConfirm:m})]})}function be({owner:e,organizationId:t,isWorkspaceLoading:s}){const[o,l]=x.useState(de),m=L(t??void 0),{data:u=[]}=S({enabled:!!t}),{data:d=[]}=E(),{data:i=[]}=M(t),r=R(),g=x.useMemo(()=>{const a=new Map;for(const c of u)a.set(c.agentId,c.name);return a},[u]),b=x.useMemo(()=>{const a=new Map;for(const c of d)a.set(c.id,c.label||c.platform||c.id);return a},[d]),f=x.useMemo(()=>ue(m.data??[]),[m.data]),h=x.useMemo(()=>me(f,o),[f,o]),$=s||m.isLoading,_=n.jsx(p,{asChild:!0,size:"sm",className:"h-8 shrink-0 text-xs",children:n.jsxs(j,{to:"/$owner/automations/new",params:{owner:e},children:[n.jsx(B,{className:"mr-1.5 h-3.5 w-3.5"}),"New automation"]})});return $?n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"flex justify-end",children:_}),n.jsx(X,{label:"Loading automations",actions:!0})]}):n.jsxs("div",{className:"space-y-4",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:"What runs on its own — on a schedule, on an event, or when you ask."}),n.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[n.jsx("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1.5",children:ee.map(a=>n.jsx(p,{type:"button",variant:o.kind===a.value?"secondary":"ghost","aria-pressed":o.kind===a.value,size:"sm",className:"h-7 px-2 text-xs",onClick:()=>l(c=>({...c,kind:a.value})),children:a.label},a.value))}),n.jsx("div",{className:"ml-auto shrink-0",children:_})]}),f.length===0?n.jsx(N,{icon:I,title:"No automations yet",description:"Automations act on their own — reply to a message, run a nightly summary, react to a ticket. Use New automation to create one."}):h.length===0?n.jsx(N,{icon:D.automations.icon,title:"No automations match this filter",description:"Try another trigger type.",secondaryActionLabel:"Show all",secondaryOnAction:()=>l(a=>({...a,kind:"all"}))}):n.jsx("div",{className:"overflow-hidden rounded-lg border",children:h.map((a,c)=>n.jsx(ge,{automation:a,agentName:a.automation.managed_agent_id?g.get(a.automation.managed_agent_id)??a.automation.managed_agent_id:null,deviceLabel:a.automation.device_worker_id?b.get(a.automation.device_worker_id)??a.automation.device_worker_id:null,connectorDisplay:(()=>{const k=ye(a.automation);return k?P(k,i):null})(),owner:e,rowClass:ve(c,h.length),removing:r.isPending,onRemove:()=>r.mutate(a.automation.automation_id)},a.key))})]})}function ke(){const{owner:e}=q.useParams();return n.jsx("div",{className:"flex min-h-0 flex-1 flex-col gap-3 px-4 pt-4 pb-8 lg:px-6",children:n.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:n.jsx(J,{owner:e,children:t=>n.jsx("div",{className:"mx-auto flex min-h-0 w-full min-w-0 max-w-3xl flex-1 flex-col",children:n.jsx(be,{owner:t.ownerSlug,organizationId:t.organizationId,isWorkspaceLoading:t.isWorkspaceLoading})})})})})}export{ke as component};
2
- //# sourceMappingURL=index-BNh2cidi.js.map
1
+ import{r as x,j as n,B as p,a_ as T,a$ as C,b0 as L,aZ as S,az as E,au as M,b1 as R,aQ as N,b2 as I,af as D,aR as P,L as j,b3 as B,b4 as O,b5 as W,b6 as z,aV as U,M as v,b7 as F,b8 as K,b9 as H,ba as G,bb as Q,bc as A,bd as Z,be as V,bf as q,ah as J}from"./index-Cr5hwh-C.js";import{L as X}from"./list-skeleton-C_GuoxAH.js";import{c as Y}from"./cronstrue-n4qGUraE.js";const ee=[{value:"all",label:"All"},{value:"event",label:"Event"},{value:"schedule",label:"Schedule"},{value:"manual",label:"Manual"}];function te({pending:e,onConfirm:t}){const[s,o]=x.useState(!1);return s?n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(p,{type:"button",variant:"destructive",size:"sm",disabled:e,onClick:t,children:"Delete"}),n.jsx(p,{type:"button",variant:"ghost",size:"sm",onClick:()=>o(!1),children:"Cancel"})]}):n.jsx(p,{type:"button",variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-destructive","aria-label":"Delete",onClick:()=>o(!0),children:n.jsx(T,{className:"h-4 w-4"})})}function ne(e){try{return Y.toString(e.trim(),{throwExceptionOnParseError:!0})}catch{return`On schedule ${e.trim()}`}}function se(e){return e.toLowerCase()==="github"?"GitHub":C(e)}function ae(e){return C(e.replace(/^\$/,""))}function oe(e){if(!e||typeof e!="object"||Array.isArray(e))return"";const t=e;return typeof t.repository=="string"?` in ${t.repository}`:typeof t.channel_id=="string"?` in #${t.channel_id}`:typeof t.resource_ref=="string"?` for ${t.resource_ref}`:""}function re(e){return Array.isArray(e.triggers)?e.triggers.filter(t=>!!t&&typeof t=="object"):[]}function ie(e){if(e.kind==="schedule"&&typeof e.cron=="string")return ne(e.cron);if(e.kind==="event"&&e.source!=="workspace"&&typeof e.connector_key=="string"){const t=Array.isArray(e.event_types)?e.event_types.filter(o=>typeof o=="string"):[],s=t.length>0?t.join(" or "):"an event";return`${se(e.connector_key)} sends ${s}${oe(e.match)}`}if(e.kind==="event"&&e.source==="workspace"){const t=Array.isArray(e.event_types)?e.event_types.filter(l=>typeof l=="string"):[],s=t.length>0?t.join(" or "):"an event",o=typeof e.entity_type=="string"?` on ${ae(e.entity_type)}`:"";return`another Automation writes ${s}${o}`}return null}function le(e){return e.health==="degraded"?"error":"enabled"}function ce(e){const t=re(e),s=e.name?.trim()||"Untitled automation",o=t.some(r=>r.kind==="event"),l=t.some(r=>r.kind==="schedule"),m=o?"event":l?"schedule":"manual",u=t.map(ie).filter(r=>!!r);let d="When started manually";u.length===1?d=`When ${u[0]}`:u.length>1&&(d=`When ${u[0]}${u.slice(1).map(r=>`, or when ${r}`).join("")}`);const i=t.some(r=>r.kind==="event"&&r.output==="reply_to_source")?"source":"silent";return{key:`automation:${e.automation_id}`,kind:m,when:d,does:s,output:{destination:i},state:le(e),sortTime:e.next_run_at?Date.parse(e.next_run_at):null,automation:e}}const y={event:0,schedule:1,manual:2};function ue(e){return e.map(ce).sort((t,s)=>t.state!==s.state?t.state==="enabled"?-1:1:y[t.kind]!==y[s.kind]?y[t.kind]-y[s.kind]:t.sortTime!==s.sortTime?t.sortTime===null?1:s.sortTime===null?-1:t.sortTime-s.sortTime:t.when.localeCompare(s.when)||t.key.localeCompare(s.key))}const de={kind:"all",output:"any",state:"any"};function me(e,t){return e.filter(s=>(t.kind==="all"||s.kind===t.kind)&&(t.output==="any"||(t.output==="reply"?s.output.destination==="source":s.output.destination==="silent"))&&(t.state==="any"||(t.state==="active"?s.state==="enabled":s.state==="error")))}const w="bg-muted text-muted-foreground",fe={event:{label:"Event",icon:z},schedule:{label:"Schedule",icon:W},manual:{label:"Manual",icon:O}};function he({agentName:e,deviceLabel:t}){const s=t?{label:t,icon:H}:e?{label:e,icon:G}:{label:"Manual · any client",icon:Q},{label:o,icon:l}=s;return n.jsxs(v,{variant:"secondary",className:w,children:[n.jsx(l,{className:"h-3 w-3"}),o]})}function xe({lastRunAt:e,nextRunAt:t}){const s=e?`Ran ${A(e)}`:t?`Next run ${A(t)}`:"Never run";return n.jsxs(v,{variant:"secondary",className:w,children:[n.jsx(Z,{className:"h-3 w-3"}),s]})}function pe({count:e}){return e<=0?null:n.jsxs(v,{variant:"secondary",className:w,children:[n.jsx(V,{className:"h-3 w-3"}),e," ",e===1?"client":"clients"]})}function ye(e){const t=Array.isArray(e.triggers)?e.triggers:[];for(const s of t)if(s&&typeof s=="object"&&s.kind==="event"&&s.source!=="workspace"&&typeof s.connector_key=="string")return s.connector_key;return null}function ve(e,t){return`flex items-center gap-3 px-3 py-2.5 text-left transition-colors hover:bg-accent/50 ${e===t-1?"":"border-b"}`}function ge({automation:e,agentName:t,deviceLabel:s,connectorDisplay:o,owner:l,onRemove:m,removing:u,rowClass:d}){const i=e.automation,r=i.automation_id,g=fe[e.kind],b=i.entity_name&&i.entity_type?`${i.entity_name} · ${i.entity_type}`:null,f=[e.when,b].filter(Boolean).join(" — "),h=i.health==="degraded"?i.health_reasons?.[0]||"Needs attention":null;return n.jsxs("div",{className:d,children:[n.jsxs(j,{to:"/$owner/automations/$automationId",params:{owner:l,automationId:r},search:{view:"activity",run_id:void 0},className:"flex min-w-0 flex-1 items-center gap-3",children:[o?n.jsx(U,{icon:o.icon,iconUrl:o.iconUrl,name:o.name,faviconDomain:o.faviconDomain,className:"h-7 w-7 shrink-0 rounded-md text-[10px]"}):n.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:n.jsx(g.icon,{className:"h-3.5 w-3.5 text-muted-foreground"})}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx("span",{className:"truncate text-sm font-medium",children:e.does}),n.jsx(he,{agentName:t,deviceLabel:s}),n.jsx(xe,{lastRunAt:i.last_run_completed_at??i.last_fired_at??null,nextRunAt:i.next_run_at??null}),n.jsx(pe,{count:i.processing_client_count??0}),h?n.jsxs(v,{variant:"secondary",className:"max-w-full whitespace-normal bg-amber-500/10 text-left text-amber-700 dark:text-amber-400",children:[n.jsx(F,{className:"h-3 w-3 shrink-0"}),h]}):null]}),f?n.jsx("p",{className:"truncate text-xs text-muted-foreground",children:f}):null]})]}),n.jsx(j,{to:"/$owner/automations/$automationId",params:{owner:l,automationId:r},search:{view:"definition",run_id:void 0},className:"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground","aria-label":"Edit",children:n.jsx(K,{className:"h-3.5 w-3.5"})}),n.jsx(te,{pending:u,onConfirm:m})]})}function be({owner:e,organizationId:t,isWorkspaceLoading:s}){const[o,l]=x.useState(de),m=L(t??void 0),{data:u=[]}=S({enabled:!!t}),{data:d=[]}=E(),{data:i=[]}=M(t),r=R(),g=x.useMemo(()=>{const a=new Map;for(const c of u)a.set(c.agentId,c.name);return a},[u]),b=x.useMemo(()=>{const a=new Map;for(const c of d)a.set(c.id,c.label||c.platform||c.id);return a},[d]),f=x.useMemo(()=>ue(m.data??[]),[m.data]),h=x.useMemo(()=>me(f,o),[f,o]),$=s||m.isLoading,_=n.jsx(p,{asChild:!0,size:"sm",className:"h-8 shrink-0 text-xs",children:n.jsxs(j,{to:"/$owner/automations/new",params:{owner:e},children:[n.jsx(B,{className:"mr-1.5 h-3.5 w-3.5"}),"New automation"]})});return $?n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"flex justify-end",children:_}),n.jsx(X,{label:"Loading automations",actions:!0})]}):n.jsxs("div",{className:"space-y-4",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:"What runs on its own — on a schedule, on an event, or when you ask."}),n.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[n.jsx("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1.5",children:ee.map(a=>n.jsx(p,{type:"button",variant:o.kind===a.value?"secondary":"ghost","aria-pressed":o.kind===a.value,size:"sm",className:"h-7 px-2 text-xs",onClick:()=>l(c=>({...c,kind:a.value})),children:a.label},a.value))}),n.jsx("div",{className:"ml-auto shrink-0",children:_})]}),f.length===0?n.jsx(N,{icon:I,title:"No automations yet",description:"Automations act on their own — reply to a message, run a nightly summary, react to a ticket. Use New automation to create one."}):h.length===0?n.jsx(N,{icon:D.automations.icon,title:"No automations match this filter",description:"Try another trigger type.",secondaryActionLabel:"Show all",secondaryOnAction:()=>l(a=>({...a,kind:"all"}))}):n.jsx("div",{className:"overflow-hidden rounded-lg border",children:h.map((a,c)=>n.jsx(ge,{automation:a,agentName:a.automation.managed_agent_id?g.get(a.automation.managed_agent_id)??a.automation.managed_agent_id:null,deviceLabel:a.automation.device_worker_id?b.get(a.automation.device_worker_id)??a.automation.device_worker_id:null,connectorDisplay:(()=>{const k=ye(a.automation);return k?P(k,i):null})(),owner:e,rowClass:ve(c,h.length),removing:r.isPending,onRemove:()=>r.mutate(a.automation.automation_id)},a.key))})]})}function ke(){const{owner:e}=q.useParams();return n.jsx("div",{className:"flex min-h-0 flex-1 flex-col gap-3 px-4 pt-4 pb-8 lg:px-6",children:n.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:n.jsx(J,{owner:e,children:t=>n.jsx("div",{className:"mx-auto flex min-h-0 w-full min-w-0 max-w-3xl flex-1 flex-col",children:n.jsx(be,{owner:t.ownerSlug,organizationId:t.organizationId,isWorkspaceLoading:t.isWorkspaceLoading})})})})})}export{ke as component};
2
+ //# sourceMappingURL=index-BQVliQW1.js.map
@@ -0,0 +1,2 @@
1
+ import{ip as r,j as e}from"./index-Cr5hwh-C.js";import{A as i}from"./agent-skills-route-BUxIswuq.js";import"./agent-subpage-shell-D92imvSt.js";import"./agent-skill-context-CCdvtlmH.js";import"./core.esm-CYvgWCuv.js";import"./skill-editor-D_W3QlRz.js";import"./agent-loading-shells-Dqcvky-k.js";import"./agent-card-controls-mnTN2AZt.js";function l(){const{owner:t,agentId:o}=r.useParams();return e.jsx(i,{owner:t,agentId:o})}export{l as component};
2
+ //# sourceMappingURL=index-BfedB4Rc.js.map
@@ -0,0 +1,2 @@
1
+ import{ap as s,aq as n,j as e}from"./index-Cr5hwh-C.js";import{A as m}from"./activity-route-view-CMqYiiKM.js";import{E as a}from"./events-feed-BtvhZF1f.js";import"./record-activity-CBXH6v1d.js";import"./filter-editors-Cj-v6NtH.js";import"./connection-label-BobuYiAG.js";import"./runs-C0rCgGwX.js";import"./source-record-panels-CPyzlfD1.js";import"./clients-D3Zbjxin.js";import"./client-rows-EJSKR6z1.js";import"./renderer-mEDnVW0O.js";import"./card-Djgp00r_.js";import"./agent-loading-shells-Dqcvky-k.js";import"./member-scope-gate-B44INDPY.js";import"./public-shell-ready-DcnlADmj.js";import"./conversations-table-BdXoZAfc.js";function F(){const{owner:o}=s.useParams(),r=s.useSearch();if(o==="me"){const t=n(r),i={sortBy:"date",sortOrder:"desc",...t.contentIds?.length?{contentIds:t.contentIds}:{clientIds:t.clientIds,mcpActivityId:t.mcpActivityId}};return e.jsxs("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-6 px-4 py-6 lg:px-6",children:[e.jsx("h1",{className:"text-lg font-semibold",children:"Your MCP activity"}),e.jsx(a,{organizationId:null,ownerSlug:"me",filters:i})]})}return e.jsx(m,{owner:o,search:r,attentionLens:!1})}export{F as component};
2
+ //# sourceMappingURL=index-CUw3aKBI.js.map
@@ -0,0 +1,2 @@
1
+ import{bk as t,j as p,bl as m}from"./index-Cr5hwh-C.js";import{M as i}from"./memory-browse-page-DyQiRvzl.js";import"./public-shell-ready-DcnlADmj.js";import"./entity-type-page-CwZxa0BR.js";import"./json-diff-DBoag_OS.js";import"./index-CDz3-ieP.js";import"./index-Vcq4gwWv.js";import"./code-editor-DHeyRGZI.js";import"./tabs-DqIIkCX-.js";import"./filter-editors-Cj-v6NtH.js";import"./renderer-mEDnVW0O.js";import"./card-Djgp00r_.js";import"./core.esm-CYvgWCuv.js";import"./view-param-filters-CqLZQrnO.js";import"./app-bridge-BCm4muqj.js";import"./member-scope-gate-B44INDPY.js";function b(){const{owner:o,entityType:r}=t.useParams(),{create:e}=t.useSearch();return p.jsx(i,{ownerSlug:o,typeScope:m(r),create:e??!1})}export{b as component};
2
+ //# sourceMappingURL=index-CXhxUkv3.js.map