@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{j as t,gQ as $,gR as N,dv as L,P as x,gS as M,gT as S,m as b,n as I,g as j,t as k,aZ as w,r as O,O as W,gU as P,gV as D,bQ as R,gW as E,gX as F,k as y,eq as U,L as G,an as H}from"./index-_oPeVpL_.js";import{A as Q}from"./agent-editor-form-oUnIYHd7.js";import{P as T}from"./proposal-review-shell-DKKGu4Ww.js";function _({identity:e,sections:n,activeSection:s,activeItem:o,onSectionSelect:r,sectionLabel:c,highlightSection:l=!0,className:g}){const a=o??n.find(i=>i.key===s)??n[0];if(!a)return null;const d=a.icon;return t.jsx("div",{className:x("flex shrink-0 flex-col items-center px-4 lg:px-6",g),children:t.jsxs("div",{className:"flex min-w-0 max-w-full flex-wrap items-center justify-center gap-x-3 gap-y-2",children:[e,t.jsxs($,{children:[t.jsx(N,{asChild:!0,children:t.jsxs("button",{type:"button",className:x("inline-flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1 text-sm transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring",l?"bg-muted font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),"aria-label":c,children:[t.jsx(d,{className:"h-3.5 w-3.5 shrink-0"}),a.label,t.jsx(L,{className:"h-3.5 w-3.5 shrink-0 opacity-60"})]})}),t.jsx(M,{align:"center",className:"min-w-[11rem]",children:n.map(({key:i,label:u,icon:m})=>t.jsxs(S,{className:x(i===s&&"bg-accent font-medium"),onSelect:()=>r(i),children:[t.jsx(m,{className:"h-4 w-4"}),t.jsx("span",{children:u})]},i))})]})]})})}const p=[{key:"skills",label:"Skills",icon:P},{key:"guardrails",label:"Guardrails",icon:D},{key:"permissions",label:"Permissions",icon:R,adminOnly:!0},{key:"models",label:"Models",icon:E},{key:"settings",label:"Settings",icon:F}];function q(e){return p.filter(n=>!n.adminOnly||e)}function z(e,n){if(n===`${e}/conversations`||n.startsWith(`${e}/conversations/`))return null;for(const{key:s}of p)if(n===`${e}/${s}`||n.startsWith(`${e}/${s}/`))return s;return n===`${e}/identity`||n===`${e}/identity/`?"settings":null}function V(e){return e.trim().charAt(0).toUpperCase()||"?"}function X({owner:e,agentId:n,agentName:s,activeDest:o}){const r=b(),{orgContext:c}=y(),{isAdmin:l}=U(c.organizationId),g=q(!!l),a=o??"settings",d=p.find(i=>i.key===a);return t.jsx(_,{identity:t.jsxs(G,{to:"/$owner/agents/$agentId/settings",params:{owner:e,agentId:n},search:{run_id:void 0},className:"flex min-w-0 items-center gap-2 rounded-md outline-none transition-colors hover:opacity-90 focus-visible:ring-2 focus-visible:ring-ring",title:"Agent settings",children:[t.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-semibold text-foreground",children:V(s)}),t.jsx("h1",{className:"min-w-0 truncate text-base font-semibold tracking-tight",children:s})]}),sections:g,activeSection:a,activeItem:d,sectionLabel:"Agent section",highlightSection:o!==null,onSectionSelect:i=>{r({to:`/$owner/agents/$agentId/${i}`,params:{owner:e,agentId:n}})}})}function Y({owner:e,agentId:n}){const s=b(),{pathname:o}=I(),{isAuthenticated:r}=j(),{isMember:c}=k(),l=r&&c,{data:g=[],isLoading:a}=w({enabled:l}),d=g.find(C=>C.agentId===n)??null,i=!d&&!a&&l,u=`/${e}/agents/${n}`,m=`${u}/conversations`,f=o===m||o.startsWith(`${m}/`),h=z(u,o);O.useEffect(()=>{i&&s({to:"/$owner",params:{owner:e},replace:!0})},[i,s,e]);const A=d?.name??"Agent";return t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-hidden py-4 md:py-6",children:[t.jsx(X,{owner:e,agentId:n,agentName:A,activeDest:h}),t.jsx("div",{className:x("flex min-h-0 min-w-0 flex-1 flex-col px-4 lg:px-6",f?"overflow-hidden":"overflow-y-auto"),children:t.jsx(W,{})})]})}function Z({agent:e,tab:n,runId:s}){return t.jsx("div",{className:"mx-auto w-full max-w-3xl pb-6",children:t.jsx(T,{resource:{kind:"agent",agentId:e.agentId},runId:s,children:({reviewMode:o,proposal:r,controlsDisabled:c})=>t.jsx(Q,{mode:{kind:"edit",agent:e},section:n,reviewMode:o,reviewProposal:r,reviewControlsDisabled:c},e.agentId)})})}function ee({owner:e,agentId:n,tab:s,runId:o}){const{orgContext:r,hasOrgContext:c}=y(),{isLoading:l}=H(`/${e}`,r),{isAuthenticated:g}=j(),{isMember:a,isLoading:d}=k(),i=g&&a,{data:u=[],isLoading:m}=w({enabled:i}),v=i?!c||l||m||d:l||d,f=u.find(h=>h.agentId===n)??null;return v||!f?null:t.jsx(Z,{agent:f,tab:s,runId:o})}export{Y as A,ee as a};
2
- //# sourceMappingURL=agents-workbench-CMyk4PI7.js.map
1
+ import{j as t,gN as N,gO as $,dv as L,P as x,gP as M,gQ as S,m as b,n as I,g as j,t as k,aZ as w,r as O,O as P,gR as W,gS as D,bQ as R,gT as E,gU as F,k as y,eq as U,L as G,an as H}from"./index-Cr5hwh-C.js";import{A as Q}from"./agent-editor-form-hTs7eO_U.js";import{P as T}from"./proposal-review-shell-UcZr87_Q.js";function _({identity:e,sections:n,activeSection:s,activeItem:o,onSectionSelect:r,sectionLabel:c,highlightSection:l=!0,className:g}){const a=o??n.find(i=>i.key===s)??n[0];if(!a)return null;const d=a.icon;return t.jsx("div",{className:x("flex shrink-0 flex-col items-center px-4 lg:px-6",g),children:t.jsxs("div",{className:"flex min-w-0 max-w-full flex-wrap items-center justify-center gap-x-3 gap-y-2",children:[e,t.jsxs(N,{children:[t.jsx($,{asChild:!0,children:t.jsxs("button",{type:"button",className:x("inline-flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1 text-sm transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring",l?"bg-muted font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),"aria-label":c,children:[t.jsx(d,{className:"h-3.5 w-3.5 shrink-0"}),a.label,t.jsx(L,{className:"h-3.5 w-3.5 shrink-0 opacity-60"})]})}),t.jsx(M,{align:"center",className:"min-w-[11rem]",children:n.map(({key:i,label:u,icon:m})=>t.jsxs(S,{className:x(i===s&&"bg-accent font-medium"),onSelect:()=>r(i),children:[t.jsx(m,{className:"h-4 w-4"}),t.jsx("span",{children:u})]},i))})]})]})})}const p=[{key:"skills",label:"Skills",icon:W},{key:"guardrails",label:"Guardrails",icon:D},{key:"permissions",label:"Permissions",icon:R,adminOnly:!0},{key:"models",label:"Models",icon:E},{key:"settings",label:"Settings",icon:F}];function q(e){return p.filter(n=>!n.adminOnly||e)}function z(e,n){if(n===`${e}/conversations`||n.startsWith(`${e}/conversations/`))return null;for(const{key:s}of p)if(n===`${e}/${s}`||n.startsWith(`${e}/${s}/`))return s;return n===`${e}/identity`||n===`${e}/identity/`?"settings":null}function Z(e){return e.trim().charAt(0).toUpperCase()||"?"}function B({owner:e,agentId:n,agentName:s,activeDest:o}){const r=b(),{orgContext:c}=y(),{isAdmin:l}=U(c.organizationId),g=q(!!l),a=o??"settings",d=p.find(i=>i.key===a);return t.jsx(_,{identity:t.jsxs(G,{to:"/$owner/agents/$agentId/settings",params:{owner:e,agentId:n},search:{run_id:void 0},className:"flex min-w-0 items-center gap-2 rounded-md outline-none transition-colors hover:opacity-90 focus-visible:ring-2 focus-visible:ring-ring",title:"Agent settings",children:[t.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-semibold text-foreground",children:Z(s)}),t.jsx("h1",{className:"min-w-0 truncate text-base font-semibold tracking-tight",children:s})]}),sections:g,activeSection:a,activeItem:d,sectionLabel:"Agent section",highlightSection:o!==null,onSectionSelect:i=>{r({to:`/$owner/agents/$agentId/${i}`,params:{owner:e,agentId:n}})}})}function Y({owner:e,agentId:n}){const s=b(),{pathname:o}=I(),{isAuthenticated:r}=j(),{isMember:c}=k(),l=r&&c,{data:g=[],isLoading:a}=w({enabled:l}),d=g.find(C=>C.agentId===n)??null,i=!d&&!a&&l,u=`/${e}/agents/${n}`,m=`${u}/conversations`,f=o===m||o.startsWith(`${m}/`),h=z(u,o);O.useEffect(()=>{i&&s({to:"/$owner",params:{owner:e},replace:!0})},[i,s,e]);const A=d?.name??"Agent";return t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-hidden py-4 md:py-6",children:[t.jsx(B,{owner:e,agentId:n,agentName:A,activeDest:h}),t.jsx("div",{className:x("flex min-h-0 min-w-0 flex-1 flex-col px-4 lg:px-6",f?"overflow-hidden":"overflow-y-auto"),children:t.jsx(P,{})})]})}function J({agent:e,tab:n,runId:s}){return t.jsx("div",{className:"mx-auto w-full max-w-3xl pb-6",children:t.jsx(T,{resource:{kind:"agent",agentId:e.agentId},runId:s,children:({reviewMode:o,proposal:r,controlsDisabled:c})=>t.jsx(Q,{mode:{kind:"edit",agent:e},section:n,reviewMode:o,reviewProposal:r,reviewControlsDisabled:c},e.agentId)})})}function ee({owner:e,agentId:n,tab:s,runId:o}){const{orgContext:r,hasOrgContext:c}=y(),{isLoading:l}=H(`/${e}`,r),{isAuthenticated:g}=j(),{isMember:a,isLoading:d}=k(),i=g&&a,{data:u=[],isLoading:m}=w({enabled:i}),v=i?!c||l||m||d:l||d,f=u.find(h=>h.agentId===n)??null;return v||!f?null:t.jsx(J,{agent:f,tab:s,runId:o})}export{Y as A,ee as a};
2
+ //# sourceMappingURL=agents-workbench-Bt5QCYQ7.js.map
@@ -1,2 +1,2 @@
1
- import{r as c,hX as b,aO as w,az as y,aU as C,aA as u,j as e,aB as k,L as i,h3 as A,hl as j,B as N,h2 as D,i8 as P,hR as v,fL as B,fM as L,fN as R,A as I,dd as M,gD as $,i9 as O,ah as _}from"./index-_oPeVpL_.js";import{C as z}from"./connections-browser-Cnv2iBbZ.js";import"./status-dot-C5KDvvm9.js";import"./connection-label-BobuYiAG.js";function E({ownerSlug:s,appId:a}){const n=c.useMemo(()=>b(s,a,w()),[s,a]),{data:r=[],isLoading:l,isError:d,refetch:g}=y(),[m,x]=c.useMemo(()=>{const t=n?.devicePlatforms;if(!t?.length)return[[],[]];const p=r.filter(o=>{const f=C(o);return f!=null&&t.includes(f)});return[p.filter(o=>u(o,s)),p.filter(o=>!u(o,s))]},[n,r,s]);if(!n)return e.jsxs(k,{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"There is no app by that name."}),e.jsx(i,{to:"/$owner/connectors",params:{owner:s},search:{},className:"text-sm text-primary hover:underline",children:"Back to connectors"})]});const h=(n.devicePlatforms?.length??0)>0;return e.jsx("div",{className:"flex flex-1 flex-col",children:e.jsxs(A,{header:e.jsx(B,{breadcrumb:e.jsx(L,{crumbs:[e.jsx(i,{to:"/$owner/connectors",params:{owner:s},search:{},className:R,children:"Connectors"},"connectors")]}),icon:e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border text-muted-foreground",children:n.icon}),title:n.name,caption:n.description}),children:[e.jsx("div",{id:"setup",className:"scroll-mt-40",children:e.jsx(j,{title:m.length>0?a==="owletto-chrome"?"Connect another profile":"Connect another device":"Set up",children:e.jsx("div",{className:"space-y-3",children:n.steps.map(t=>e.jsx(T,{step:t},t.label))})})}),h?e.jsx(z,{entries:m.map(t=>({id:t.id,name:v(t),description:P(t,s),tone:t.online?null:"muted",link:D({to:"/$owner/connectors/device/$deviceId",params:{owner:s,deviceId:t.id}})})),isLoading:l,isError:d,onRetry:()=>void g(),action:e.jsx(N,{asChild:!0,variant:"outline",size:"sm",children:e.jsx("a",{href:"#setup",children:"Add connection"})})}):null,h&&!l&&!d&&x.length>0?e.jsxs(j,{title:"Your devices in other workspaces",children:[e.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Open a device to connect its capabilities here. Moving it is confirmed first and pauses its connections where it is now."}),e.jsx("ul",{className:"divide-y border-y",children:x.map(t=>e.jsx("li",{children:e.jsxs(i,{to:"/$owner/connectors/device/$deviceId",params:{owner:s,deviceId:t.id},className:"flex items-center justify-between gap-3 py-2.5 text-sm hover:text-primary",children:[e.jsx("span",{className:"font-medium",children:v(t)}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["Attached to"," ",t.organization_name??"another workspace"]})]})},t.id))})]}):null]})})}function T({step:s}){const[a,n]=c.useState(!1);if(s.href)return e.jsxs("a",{href:s.href,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs font-medium text-primary hover:bg-accent/50",children:[s.label,e.jsx(I,{className:"h-3 w-3"})]});const r=s.command??"";return e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:s.label}),e.jsxs("div",{className:"flex items-start gap-2 rounded-lg border bg-muted/40 p-2.5",children:[e.jsx("pre",{className:"min-w-0 flex-1 overflow-x-auto font-mono text-xs leading-relaxed",children:r}),e.jsxs(N,{variant:"ghost",size:"sm",className:"h-6 shrink-0 px-1.5 text-xs",onClick:()=>{typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(r).then(()=>{n(!0),setTimeout(()=>n(!1),1500)})},children:[a?e.jsx(M,{className:"h-3.5 w-3.5"}):e.jsx($,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"sr-only",children:"Copy"})]})]})]})}function K(){const{owner:s,appId:a}=O.useParams();return e.jsx(_,{owner:s,children:({ownerSlug:n})=>e.jsx(E,{ownerSlug:n,appId:a})})}export{K as component};
2
- //# sourceMappingURL=app._appId-DH1Qutz6.js.map
1
+ import{r as c,hU as b,aO as w,az as y,aU as C,aA as u,j as e,aB as k,L as i,h0 as A,hi as j,B as N,g$ as D,i5 as P,hO as v,fL as B,fM as L,fN as $,A as I,dd as M,gA as O,i6 as R,ah as _}from"./index-Cr5hwh-C.js";import{C as z}from"./connections-browser-CKZjzRz6.js";import"./status-dot-B-EWMgq6.js";import"./connection-label-BobuYiAG.js";function E({ownerSlug:s,appId:a}){const n=c.useMemo(()=>b(s,a,w()),[s,a]),{data:r=[],isLoading:l,isError:d,refetch:g}=y(),[m,x]=c.useMemo(()=>{const t=n?.devicePlatforms;if(!t?.length)return[[],[]];const p=r.filter(o=>{const f=C(o);return f!=null&&t.includes(f)});return[p.filter(o=>u(o,s)),p.filter(o=>!u(o,s))]},[n,r,s]);if(!n)return e.jsxs(k,{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"There is no app by that name."}),e.jsx(i,{to:"/$owner/connectors",params:{owner:s},search:{},className:"text-sm text-primary hover:underline",children:"Back to connectors"})]});const h=(n.devicePlatforms?.length??0)>0;return e.jsx("div",{className:"flex flex-1 flex-col",children:e.jsxs(A,{header:e.jsx(B,{breadcrumb:e.jsx(L,{crumbs:[e.jsx(i,{to:"/$owner/connectors",params:{owner:s},search:{},className:$,children:"Connectors"},"connectors")]}),icon:e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border text-muted-foreground",children:n.icon}),title:n.name,caption:n.description}),children:[e.jsx("div",{id:"setup",className:"scroll-mt-40",children:e.jsx(j,{title:m.length>0?a==="owletto-chrome"?"Connect another profile":"Connect another device":"Set up",children:e.jsx("div",{className:"space-y-3",children:n.steps.map(t=>e.jsx(T,{step:t},t.label))})})}),h?e.jsx(z,{entries:m.map(t=>({id:t.id,name:v(t),description:P(t,s),tone:t.online?null:"muted",link:D({to:"/$owner/connectors/device/$deviceId",params:{owner:s,deviceId:t.id}})})),isLoading:l,isError:d,onRetry:()=>void g(),action:e.jsx(N,{asChild:!0,variant:"outline",size:"sm",children:e.jsx("a",{href:"#setup",children:"Add connection"})})}):null,h&&!l&&!d&&x.length>0?e.jsxs(j,{title:"Your devices in other workspaces",children:[e.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Open a device to connect its capabilities here. Moving it is confirmed first and pauses its connections where it is now."}),e.jsx("ul",{className:"divide-y border-y",children:x.map(t=>e.jsx("li",{children:e.jsxs(i,{to:"/$owner/connectors/device/$deviceId",params:{owner:s,deviceId:t.id},className:"flex items-center justify-between gap-3 py-2.5 text-sm hover:text-primary",children:[e.jsx("span",{className:"font-medium",children:v(t)}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["Attached to"," ",t.organization_name??"another workspace"]})]})},t.id))})]}):null]})})}function T({step:s}){const[a,n]=c.useState(!1);if(s.href)return e.jsxs("a",{href:s.href,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs font-medium text-primary hover:bg-accent/50",children:[s.label,e.jsx(I,{className:"h-3 w-3"})]});const r=s.command??"";return e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:s.label}),e.jsxs("div",{className:"flex items-start gap-2 rounded-lg border bg-muted/40 p-2.5",children:[e.jsx("pre",{className:"min-w-0 flex-1 overflow-x-auto font-mono text-xs leading-relaxed",children:r}),e.jsxs(N,{variant:"ghost",size:"sm",className:"h-6 shrink-0 px-1.5 text-xs",onClick:()=>{typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(r).then(()=>{n(!0),setTimeout(()=>n(!1),1500)})},children:[a?e.jsx(M,{className:"h-3.5 w-3.5"}):e.jsx(O,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"sr-only",children:"Copy"})]})]})]})}function K(){const{owner:s,appId:a}=R.useParams();return e.jsx(_,{owner:s,children:({ownerSlug:n})=>e.jsx(E,{ownerSlug:n,appId:a})})}export{K as component};
2
+ //# sourceMappingURL=app._appId-CKv7_squ.js.map
@@ -1,2 +1,2 @@
1
- import{r as f,j as e,S as p,dG as y,k as A,an as _,g as b,t as C,u as k,gH as S}from"./index-_oPeVpL_.js";import{C as P,A as D}from"./create-automation-form-_4vUkrls.js";import{P as E}from"./proposal-review-shell-DKKGu4Ww.js";import{J as j}from"./json-diff-D_Ym3Uku.js";import{u as R,a as w}from"./deployments-DCQdFdwG.js";import{E as F}from"./events-feed-fucGZSJR.js";const L=20;function N({automationId:a}){const t=R({resourceKind:"automation",resourceId:a}),[d,c]=f.useState(null),s=w(d!=null?String(d):null),o=(t.data?.pages.length??0)>=L&&!!t.hasNextPage,r=!!t.isFetchNextPageError;f.useEffect(()=>{!o&&t.hasNextPage&&!t.isFetchingNextPage&&!t.isError&&!r&&t.fetchNextPage()},[o,t.fetchNextPage,t.hasNextPage,t.isFetchingNextPage,t.isError,r]);const l=f.useMemo(()=>(t.data?.pages??[]).flatMap(x=>x.items).filter(x=>x.type==="change"&&x.resourceKind==="automation"&&x.resourceId===String(a)),[t.data,a]),i=!!t.hasNextPage&&!o,m=typeof t.refetch=="function",h=typeof t.fetchNextPage=="function";return t.isLoading?e.jsx(p,{className:"h-20 w-full rounded-lg"}):t.isError&&!r?e.jsxs("section",{className:"space-y-2","aria-label":"Automation definition history","data-testid":"automation-definition-history",children:[e.jsx("h3",{className:"font-medium text-sm",children:"Definition history"}),e.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"automation-definition-history-error",children:"Definition history unavailable."}),m?e.jsx("button",{type:"button",className:"text-sm underline","data-testid":"automation-definition-history-retry",onClick:()=>void t.refetch(),children:"Retry"}):null]}):e.jsxs("section",{className:"space-y-2","aria-label":"Automation definition history","data-testid":"automation-definition-history",children:[e.jsx("h3",{className:"font-medium text-sm",children:"Definition history"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Runtime and delivery configuration changes with actor and before/after. Content versions (prompt, sources) are listed separately."}),l.length===0&&!i?e.jsx("p",{className:"py-4 text-sm text-muted-foreground","data-testid":"automation-definition-history-empty",children:"No definition changes recorded yet."}):e.jsx("ul",{className:"space-y-1","data-testid":"automation-definition-history-list",children:l.map(n=>{if(n.type!=="change")return null;const g=n.createdBy??n.agentId??n.actorSource??"unknown";return e.jsx("li",{children:e.jsxs("button",{type:"button",className:"flex w-full flex-wrap items-center justify-between gap-2 rounded-lg border border-border/60 px-3 py-2 text-left text-sm hover:bg-muted/50",onClick:()=>c(x=>x===n.id?null:n.id),"data-testid":`automation-definition-history-item-${n.id}`,children:[e.jsx("span",{className:"font-medium",children:n.action??n.op??"change"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:(n.changedFields??[]).join(", ")}),e.jsx("span",{className:"text-xs text-muted-foreground",children:g}),e.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(n.createdAt).toLocaleString()})]})},n.id)})}),i?e.jsx("p",{className:"text-xs text-muted-foreground","data-testid":"automation-definition-history-loading-more",children:"Loading more history…"}):null,o?e.jsx("p",{className:"text-xs text-muted-foreground","data-testid":"automation-definition-history-capped",children:"Showing recent definition changes"}):null,r?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground","data-testid":"automation-definition-history-page-error",children:"Couldn't load more history."}),h?e.jsx("button",{type:"button",className:"text-xs underline","data-testid":"automation-definition-history-retry-next",onClick:()=>void t.fetchNextPage(),children:"Retry"}):null]}):null,d!=null?e.jsx("div",{"data-testid":"automation-definition-history-detail",children:s.isLoading?e.jsx(p,{className:"h-24 w-full rounded-lg"}):s.isError?e.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"automation-definition-history-detail-error",children:"Change detail unavailable."}):s.data?e.jsx(j,{before:s.data.before,after:s.data.after}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"Change detail unavailable."})}):null]})}function v(a){const{orgContext:t,hasOrgContext:d}=A(),{data:c,isLoading:s}=_(`/${a}`,t),{isAuthenticated:u}=b(),{isMember:o,isLoading:r}=C(),l=u&&o,i=c?.workspace,m=l?!d||s||r:s||r;return{organizationId:i?.id??"",isLoading:m}}function K(a){return v(a)}function O({owner:a,automationId:t,organizationId:d}){const c=Number(t),s=f.useMemo(()=>({producedByAutomationId:c}),[c]),u=k(),o=y(t,void 0,d),r=o.data?.automation?.automation_name?.trim()||null,l=o.data?.automation?.managed_agent_id??null,{data:i}=S(l,t,{orgSlug:a}),m=f.useMemo(()=>(i?.runs??[]).map(n=>({runId:n.runId,status:n.status,completedAt:n.completedAt})),[i]),h=f.useCallback(n=>{u?.open({href:`/${a}/automations/${t}?run_id=${n}`,title:r!=null?`${r} · Run #${n}`:`Automation run #${n}`,runId:n})},[u,a,t,r]);return Number.isFinite(c)?e.jsx(F,{organizationId:d,ownerSlug:a,filters:s,groupByRun:!0,onRunSelect:h,runs:m,hideRunAction:!0,hideAttribution:!0,emptyState:e.jsx("p",{className:"py-6 text-sm text-muted-foreground",children:"This Automation hasn't written anything yet. Runs appear here with the events they created; clicking a run opens its conversation."})}):null}function T({agentId:a,automationId:t,runId:d,organizationId:c,onDone:s}){const[u,o]=f.useState({ready:!1,triggers:[]}),r=f.useCallback(n=>{o(g=>JSON.stringify(g)===JSON.stringify(n)?g:n)},[]),l=y(t,void 0,c,{includeVersions:!0}),i=l.data?.automation,m=e.jsx("div",{className:"flex flex-col gap-4",children:[0,1,2].map(n=>e.jsx(p,{className:"h-16 w-full rounded-lg"},n))}),h=l.isLoading?m:i?e.jsx(P,{organizationId:c,prefillAgentId:a??void 0,editingAutomation:{automation_id:i.automation_id,name:i.automation_name,slug:i.slug,description:i.description,prompt:i.prompt,sources:i.sources,reaction_script:i.reaction_script,managed_agent_id:i.managed_agent_id,device_worker_id:i.device_worker_id,agent_kind:i.agent_kind,delivery_target:i.delivery_target??void 0,execution_config:i.execution_config??void 0,keying_config:i.keying_config,reactions_guidance:i.reactions_guidance,triggers:i.triggers},createFields:{triggers:u.triggers},triggerFields:e.jsx(D,{organizationId:c,initialTriggers:i.triggers??[],onChange:r},JSON.stringify(i.triggers??[])),hideHeader:!0,hideCancel:!0,submitDisabled:!u.ready,onClose:s,onSuccess:s}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"Automation not found. It may have been removed."});return a?e.jsxs("div",{className:"space-y-6",children:[e.jsx(E,{resource:{kind:"automation",agentId:a,automationId:t},runId:d,onDone:s,children:({reviewMode:n,proposal:g})=>n==="active"?e.jsx(j,{before:g?.current??null,after:{...g?.current??{},...g?.proposedAfter??{}}}):n==="loading"?m:n==="error"?null:h}),e.jsx(N,{automationId:t})]}):e.jsxs("div",{className:"space-y-6",children:[h,e.jsx(N,{automationId:t})]})}function V({owner:a,agentId:t,automationId:d,view:c,runId:s,onDone:u}){const{organizationId:o}=v(a),r=y(d,void 0,o),l=t??r.data?.automation?.managed_agent_id??null;return s||c==="definition"?e.jsx(T,{agentId:l,automationId:d,runId:s,organizationId:o,onDone:u}):e.jsx(O,{owner:a,automationId:d,organizationId:o})}export{V as A,K as u};
2
- //# sourceMappingURL=automation-detail-content-CEDNboId.js.map
1
+ import{r as f,j as e,S as p,dG as y,k as A,an as _,g as b,t as C,u as k,gE as S}from"./index-Cr5hwh-C.js";import{C as P,A as E}from"./create-automation-form-CtSSeYj3.js";import{P as D}from"./proposal-review-shell-UcZr87_Q.js";import{J as j}from"./json-diff-DBoag_OS.js";import{u as R,a as w}from"./deployments-RvUdVkj3.js";import{E as F}from"./events-feed-BtvhZF1f.js";const L=20;function N({automationId:a}){const t=R({resourceKind:"automation",resourceId:a}),[d,c]=f.useState(null),s=w(d!=null?String(d):null),o=(t.data?.pages.length??0)>=L&&!!t.hasNextPage,r=!!t.isFetchNextPageError;f.useEffect(()=>{!o&&t.hasNextPage&&!t.isFetchingNextPage&&!t.isError&&!r&&t.fetchNextPage()},[o,t.fetchNextPage,t.hasNextPage,t.isFetchingNextPage,t.isError,r]);const l=f.useMemo(()=>(t.data?.pages??[]).flatMap(x=>x.items).filter(x=>x.type==="change"&&x.resourceKind==="automation"&&x.resourceId===String(a)),[t.data,a]),i=!!t.hasNextPage&&!o,m=typeof t.refetch=="function",h=typeof t.fetchNextPage=="function";return t.isLoading?e.jsx(p,{className:"h-20 w-full rounded-lg"}):t.isError&&!r?e.jsxs("section",{className:"space-y-2","aria-label":"Automation definition history","data-testid":"automation-definition-history",children:[e.jsx("h3",{className:"font-medium text-sm",children:"Definition history"}),e.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"automation-definition-history-error",children:"Definition history unavailable."}),m?e.jsx("button",{type:"button",className:"text-sm underline","data-testid":"automation-definition-history-retry",onClick:()=>void t.refetch(),children:"Retry"}):null]}):e.jsxs("section",{className:"space-y-2","aria-label":"Automation definition history","data-testid":"automation-definition-history",children:[e.jsx("h3",{className:"font-medium text-sm",children:"Definition history"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Runtime and delivery configuration changes with actor and before/after. Content versions (prompt, sources) are listed separately."}),l.length===0&&!i?e.jsx("p",{className:"py-4 text-sm text-muted-foreground","data-testid":"automation-definition-history-empty",children:"No definition changes recorded yet."}):e.jsx("ul",{className:"space-y-1","data-testid":"automation-definition-history-list",children:l.map(n=>{if(n.type!=="change")return null;const g=n.createdBy??n.agentId??n.actorSource??"unknown";return e.jsx("li",{children:e.jsxs("button",{type:"button",className:"flex w-full flex-wrap items-center justify-between gap-2 rounded-lg border border-border/60 px-3 py-2 text-left text-sm hover:bg-muted/50",onClick:()=>c(x=>x===n.id?null:n.id),"data-testid":`automation-definition-history-item-${n.id}`,children:[e.jsx("span",{className:"font-medium",children:n.action??n.op??"change"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:(n.changedFields??[]).join(", ")}),e.jsx("span",{className:"text-xs text-muted-foreground",children:g}),e.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(n.createdAt).toLocaleString()})]})},n.id)})}),i?e.jsx("p",{className:"text-xs text-muted-foreground","data-testid":"automation-definition-history-loading-more",children:"Loading more history…"}):null,o?e.jsx("p",{className:"text-xs text-muted-foreground","data-testid":"automation-definition-history-capped",children:"Showing recent definition changes"}):null,r?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground","data-testid":"automation-definition-history-page-error",children:"Couldn't load more history."}),h?e.jsx("button",{type:"button",className:"text-xs underline","data-testid":"automation-definition-history-retry-next",onClick:()=>void t.fetchNextPage(),children:"Retry"}):null]}):null,d!=null?e.jsx("div",{"data-testid":"automation-definition-history-detail",children:s.isLoading?e.jsx(p,{className:"h-24 w-full rounded-lg"}):s.isError?e.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"automation-definition-history-detail-error",children:"Change detail unavailable."}):s.data?e.jsx(j,{before:s.data.before,after:s.data.after}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"Change detail unavailable."})}):null]})}function v(a){const{orgContext:t,hasOrgContext:d}=A(),{data:c,isLoading:s}=_(`/${a}`,t),{isAuthenticated:u}=b(),{isMember:o,isLoading:r}=C(),l=u&&o,i=c?.workspace,m=l?!d||s||r:s||r;return{organizationId:i?.id??"",isLoading:m}}function K(a){return v(a)}function O({owner:a,automationId:t,organizationId:d}){const c=Number(t),s=f.useMemo(()=>({producedByAutomationId:c}),[c]),u=k(),o=y(t,void 0,d),r=o.data?.automation?.automation_name?.trim()||null,l=o.data?.automation?.managed_agent_id??null,{data:i}=S(l,t,{orgSlug:a}),m=f.useMemo(()=>(i?.runs??[]).map(n=>({runId:n.runId,status:n.status,completedAt:n.completedAt})),[i]),h=f.useCallback(n=>{u?.open({href:`/${a}/automations/${t}?run_id=${n}`,title:r!=null?`${r} · Run #${n}`:`Automation run #${n}`,runId:n})},[u,a,t,r]);return Number.isFinite(c)?e.jsx(F,{organizationId:d,ownerSlug:a,filters:s,groupByRun:!0,onRunSelect:h,runs:m,hideRunAction:!0,hideAttribution:!0,emptyState:e.jsx("p",{className:"py-6 text-sm text-muted-foreground",children:"This Automation hasn't written anything yet. Runs appear here with the events they created; clicking a run opens its conversation."})}):null}function T({agentId:a,automationId:t,runId:d,organizationId:c,onDone:s}){const[u,o]=f.useState({ready:!1,triggers:[]}),r=f.useCallback(n=>{o(g=>JSON.stringify(g)===JSON.stringify(n)?g:n)},[]),l=y(t,void 0,c,{includeVersions:!0}),i=l.data?.automation,m=e.jsx("div",{className:"flex flex-col gap-4",children:[0,1,2].map(n=>e.jsx(p,{className:"h-16 w-full rounded-lg"},n))}),h=l.isLoading?m:i?e.jsx(P,{organizationId:c,prefillAgentId:a??void 0,editingAutomation:{automation_id:i.automation_id,name:i.automation_name,slug:i.slug,description:i.description,prompt:i.prompt,sources:i.sources,reaction_script:i.reaction_script,managed_agent_id:i.managed_agent_id,device_worker_id:i.device_worker_id,agent_kind:i.agent_kind,delivery_target:i.delivery_target??void 0,execution_config:i.execution_config??void 0,keying_config:i.keying_config,reactions_guidance:i.reactions_guidance,triggers:i.triggers},createFields:{triggers:u.triggers},triggerFields:e.jsx(E,{organizationId:c,initialTriggers:i.triggers??[],onChange:r},JSON.stringify(i.triggers??[])),hideHeader:!0,hideCancel:!0,submitDisabled:!u.ready,onClose:s,onSuccess:s}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"Automation not found. It may have been removed."});return a?e.jsxs("div",{className:"space-y-6",children:[e.jsx(D,{resource:{kind:"automation",agentId:a,automationId:t},runId:d,onDone:s,children:({reviewMode:n,proposal:g})=>n==="active"?e.jsx(j,{before:g?.current??null,after:{...g?.current??{},...g?.proposedAfter??{}}}):n==="loading"?m:n==="error"?null:h}),e.jsx(N,{automationId:t})]}):e.jsxs("div",{className:"space-y-6",children:[h,e.jsx(N,{automationId:t})]})}function V({owner:a,agentId:t,automationId:d,view:c,runId:s,onDone:u}){const{organizationId:o}=v(a),r=y(d,void 0,o),l=t??r.data?.automation?.managed_agent_id??null;return s||c==="definition"?e.jsx(T,{agentId:l,automationId:d,runId:s,organizationId:o,onDone:u}):e.jsx(O,{owner:a,automationId:d,organizationId:o})}export{V as A,K as u};
2
+ //# sourceMappingURL=automation-detail-content-vUwVumXf.js.map
@@ -0,0 +1,2 @@
1
+ import{j as t,O as o}from"./index-Cr5hwh-C.js";const n=()=>t.jsx(o,{});export{n as component};
2
+ //# sourceMappingURL=automations-9XjpDj_S.js.map
@@ -1,2 +1,2 @@
1
- import{m as a,g as i,r as n,j as t}from"./index-_oPeVpL_.js";function r(){const s=a(),{isReady:e}=i();return n.useEffect(()=>{e&&setTimeout(()=>{s({to:"/"})},500)},[e,s]),t.jsx("div",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center",children:t.jsx("div",{className:"text-center",children:t.jsx("p",{className:"text-muted-foreground",children:e?"Redirecting...":"Completing sign in..."})})})}export{r as component};
2
- //# sourceMappingURL=callback-CU-hb8JB.js.map
1
+ import{m as a,g as i,r as n,j as t}from"./index-Cr5hwh-C.js";function r(){const s=a(),{isReady:e}=i();return n.useEffect(()=>{e&&setTimeout(()=>{s({to:"/"})},500)},[e,s]),t.jsx("div",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center",children:t.jsx("div",{className:"text-center",children:t.jsx("p",{className:"text-muted-foreground",children:e?"Redirecting...":"Completing sign in..."})})})}export{r as component};
2
+ //# sourceMappingURL=callback-BRgcL8gz.js.map
@@ -1,2 +1,2 @@
1
- import{j as r,ea as d}from"./index-_oPeVpL_.js";function n({className:a,...t}){return r.jsx("div",{"data-slot":"card",className:`bg-card text-card-foreground flex flex-col gap-6 rounded-2xl border py-6 ${a||""}`,...t})}function i({className:a,...t}){return r.jsx("div",{"data-slot":"card-header",className:`grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] ${a||""}`,...t})}function c({className:a,asChild:t=!1,...s}){const o=t?d:"div";return r.jsx(o,{"data-slot":"card-title",className:`leading-none font-semibold ${a||""}`,...s})}function l({className:a,...t}){return r.jsx("div",{"data-slot":"card-description",className:`mt-1 first:mt-0 text-muted-foreground text-sm ${a||""}`,...t})}function u({className:a,...t}){return r.jsx("div",{"data-slot":"card-content",className:`px-6 ${a||""}`,...t})}export{n as C,i as a,c as b,u as c,l as d};
2
- //# sourceMappingURL=card-DIF8SF9b.js.map
1
+ import{j as r,ea as d}from"./index-Cr5hwh-C.js";function n({className:a,...t}){return r.jsx("div",{"data-slot":"card",className:`bg-card text-card-foreground flex flex-col gap-6 rounded-2xl border py-6 ${a||""}`,...t})}function i({className:a,...t}){return r.jsx("div",{"data-slot":"card-header",className:`grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] ${a||""}`,...t})}function c({className:a,asChild:t=!1,...s}){const o=t?d:"div";return r.jsx(o,{"data-slot":"card-title",className:`leading-none font-semibold ${a||""}`,...s})}function l({className:a,...t}){return r.jsx("div",{"data-slot":"card-description",className:`mt-1 first:mt-0 text-muted-foreground text-sm ${a||""}`,...t})}function u({className:a,...t}){return r.jsx("div",{"data-slot":"card-content",className:`px-6 ${a||""}`,...t})}export{n as C,i as a,c as b,u as c,l as d};
2
+ //# sourceMappingURL=card-Djgp00r_.js.map
@@ -1,2 +1,2 @@
1
- import{v as e,j as c,w as r}from"./index-_oPeVpL_.js";function n(){const{team:a}=e({from:"/slack/claim"});return c.jsx(r,{to:"/connector/$name/connection",params:{name:"slack"},search:{ref:a},replace:!0})}export{n as component};
2
- //# sourceMappingURL=claim-DELEa-gH.js.map
1
+ import{v as e,j as c,w as r}from"./index-Cr5hwh-C.js";function n(){const{team:a}=e({from:"/slack/claim"});return c.jsx(r,{to:"/connector/$name/connection",params:{name:"slack"},search:{ref:a},replace:!0})}export{n as component};
2
+ //# sourceMappingURL=claim-BYUZnyMp.js.map
@@ -1,2 +1,2 @@
1
- import{cb as c,cc as u,Z as d,bG as p,bH as r,V as o,di as i,H as w}from"./index-_oPeVpL_.js";function l(t,a="",e){const n=`${w}/api/${t}/clients${a}`,s=e?.toString();return s?`${n}?${s}`:n}function h(t,a){const e=a?.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 s=await o(l(e,"",n),{credentials:"include"});return await i(s,"Failed to load connected clients"),(await s.json()).clients??[]},enabled:!!e&&(a?.enabled??!0),staleTime:15e3,refetchInterval:a?.refetchInterval})}function y(){const{slug:t}=c(),a=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 s=await o(l(t,`/mcp/${encodeURIComponent(e.clientId)}`,n),{method:"DELETE",credentials:"include"});return await i(s,"Failed to revoke client"),await s.json()},onSuccess:()=>{a.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-CpG676mg.js.map
1
+ import{cb as c,cc as u,Z as d,bG as p,bH as r,V as o,di as i,H as w}from"./index-Cr5hwh-C.js";function l(t,a="",e){const n=`${w}/api/${t}/clients${a}`,s=e?.toString();return s?`${n}?${s}`:n}function h(t,a){const e=a?.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 s=await o(l(e,"",n),{credentials:"include"});return await i(s,"Failed to load connected clients"),(await s.json()).clients??[]},enabled:!!e&&(a?.enabled??!0),staleTime:15e3,refetchInterval:a?.refetchInterval})}function y(){const{slug:t}=c(),a=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 s=await o(l(t,`/mcp/${encodeURIComponent(e.clientId)}`,n),{method:"DELETE",credentials:"include"});return await i(s,"Failed to revoke client"),await s.json()},onSuccess:()=>{a.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-D3Zbjxin.js.map