@lobu/runtime-server 24.11.0 → 24.12.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 (275) hide show
  1. package/dist/catalogs/connectors.json +1113 -107
  2. package/dist/catalogs/skills.json +2 -2
  3. package/dist/component.json +1 -1
  4. package/dist/connectors/README.md +2 -2
  5. package/dist/connectors/chat-transport-actions.ts +50 -0
  6. package/dist/connectors/discord.ts +2 -0
  7. package/dist/connectors/gchat.ts +2 -0
  8. package/dist/connectors/github.ts +4 -4
  9. package/dist/connectors/google_drive.ts +20 -0
  10. package/dist/connectors/google_gmail.ts +49 -8
  11. package/dist/connectors/herdr.ts +1 -1
  12. package/dist/connectors/imessage.ts +1 -0
  13. package/dist/connectors/linkedin-browser-script.ts +11 -0
  14. package/dist/connectors/linkedin-draft-page.js +24 -8
  15. package/dist/connectors/linkedin-inbox-adapter.js +209 -19
  16. package/dist/connectors/linkedin-inbox.ts +152 -4
  17. package/dist/connectors/linkedin-network.ts +788 -0
  18. package/dist/connectors/linkedin-search.ts +1284 -0
  19. package/dist/connectors/linkedin.ts +892 -27
  20. package/dist/connectors/microsoft_outlook.ts +57 -19
  21. package/dist/connectors/rss.ts +179 -33
  22. package/dist/connectors/slack.ts +2 -0
  23. package/dist/connectors/source-file-attachment.ts +46 -0
  24. package/dist/connectors/teams.ts +2 -0
  25. package/dist/connectors/telegram.ts +2 -0
  26. package/dist/connectors/tiktok_web.ts +1 -1
  27. package/dist/connectors/whatsapp.ts +2 -0
  28. package/dist/connectors/whatsapp_web.ts +3 -3
  29. package/dist/connectors/x-dm-adapter.js +8 -10
  30. package/dist/connectors/x.ts +8 -9
  31. package/dist/db/migrations/20261115040000_account_two_factor.sql +20 -0
  32. package/dist/db/migrations/20261115120000_events_unbound_tool_audit_without_bridge.sql +40 -0
  33. package/dist/db/migrations/20261115120001_events_unbound_tool_audit_validate.sql +19 -0
  34. package/dist/db/migrations/20261115120002_drop_events_linked_org_ids.sql +119 -0
  35. package/dist/db/migrations/20261115130000_entities_retired_type_idx.sql +34 -0
  36. package/dist/db/migrations/20261115140000_entity_identities_personal_owner_idx.sql +34 -0
  37. package/dist/db/migrations/20261117090000_write_policy_kind_note.sql +65 -0
  38. package/dist/db/migrations/20261117120000_app_policy_principal.sql +48 -0
  39. package/dist/db/migrations/20261117170000_personal_org_connector_auto_policy_backfill.sql +57 -0
  40. package/dist/db/migrations/20261117190000_org_slug_reserved_paths.sql +29 -0
  41. package/dist/db/migrations/20261118120000_workspace_view_top_level_paths.sql +69 -0
  42. package/dist/db/migrations/preconditions/20261117190000_org_slug_reserved_paths.sql +14 -0
  43. package/dist/db/migrations/preconditions/20261118120000_workspace_view_top_level_paths.sql +21 -0
  44. package/dist/dependencies.bun.lock +51 -46
  45. package/dist/guest.bundle.js +11 -2
  46. package/dist/owletto/dist/assets/_-BC9j6MkU.js +2 -0
  47. package/dist/owletto/dist/assets/_-Z1u1cIe6.js +3 -0
  48. package/dist/owletto/dist/assets/_agentId-B-TFq9TP.js +2 -0
  49. package/dist/owletto/dist/assets/{_agentId-CGScf8z_.js → _agentId-BGatZWsd.js} +2 -2
  50. package/dist/owletto/dist/assets/_automationId-CMUrWPvr.js +2 -0
  51. package/dist/owletto/dist/assets/_connectorKey._connectionId-CUoAoP0_.js +2 -0
  52. package/dist/owletto/dist/assets/_connectorKey.index-Bs49QGGH.js +2 -0
  53. package/dist/owletto/dist/assets/_conversationId-CszP1den.js +2 -0
  54. package/dist/owletto/dist/assets/_eventId-C0AZUBnD.js +2 -0
  55. package/dist/owletto/dist/assets/_owner-B4ydA75k.js +3 -0
  56. package/dist/owletto/dist/assets/_shape-C4-ikE70.js +2 -0
  57. package/dist/owletto/dist/assets/_slug-DE5J3KVu.js +2 -0
  58. package/dist/owletto/dist/assets/_viewKey-Dkcd8JQC.js +2 -0
  59. package/dist/owletto/dist/assets/{accept-invitation-BKeIzZXE.js → accept-invitation-DmrQQu_W.js} +2 -2
  60. package/dist/owletto/dist/assets/{activity-route-location-sLvKaSCa.js → activity-route-location-Bec6fW-t.js} +2 -2
  61. package/dist/owletto/dist/assets/activity-route-view-DCSNBKZU.js +2 -0
  62. package/dist/owletto/dist/assets/agent-client-connections-xvabPpi6.js +4 -0
  63. package/dist/owletto/dist/assets/agent-connect-pages-DDPtkcmq.js +6 -0
  64. package/dist/owletto/dist/assets/{agent-editor-form-DVFyyMyd.js → agent-editor-form-BrhQbHZg.js} +2 -2
  65. package/dist/owletto/dist/assets/{agent-loading-shells-BLNHIy-r.js → agent-loading-shells-D3y98xuO.js} +2 -2
  66. package/dist/owletto/dist/assets/{agent-permissions-matrix-UBKRR5vs.js → agent-permissions-matrix-jQJjSa9i.js} +2 -2
  67. package/dist/owletto/dist/assets/{agent-skill-context-fqedKd0D.js → agent-skill-context-CCcknBYE.js} +2 -2
  68. package/dist/owletto/dist/assets/{agent-subpage-shell-BUCoY2Nf.js → agent-subpage-shell-6f_53cSf.js} +2 -2
  69. package/dist/owletto/dist/assets/agent-thread-v_lSSnJi.js +6 -0
  70. package/dist/owletto/dist/assets/{app._appId-ByIypCL9.js → app._appId-CKWzZ2ic.js} +2 -2
  71. package/dist/owletto/dist/assets/assist-composer-Q9ZJjAta.js +2 -0
  72. package/dist/owletto/dist/assets/automation-run-now-Dl0MKx3N.js +2 -0
  73. package/dist/owletto/dist/assets/{callback-Pz5uS-k7.js → callback-Bentv78L.js} +2 -2
  74. package/dist/owletto/dist/assets/{card-CAPpY9P5.js → card-C4oPCVh6.js} +2 -2
  75. package/dist/owletto/dist/assets/{claim-DgWWK0KI.js → claim-B3C4qIi2.js} +2 -2
  76. package/dist/owletto/dist/assets/client-activity-scopes-DqaFEyir.js +2 -0
  77. package/dist/owletto/dist/assets/{client-rows-Dd5YV8vn.js → client-rows-rse9thnk.js} +2 -2
  78. package/dist/owletto/dist/assets/{clients-Bf7ZgGro.js → clients-BhPMbxHi.js} +2 -2
  79. package/dist/owletto/dist/assets/{code-editor-z1Sy_hiX.js → code-editor-CTdKUDPY.js} +2 -2
  80. package/dist/owletto/dist/assets/connect-D8o7HBlo.js +2 -0
  81. package/dist/owletto/dist/assets/connect-menu-D5EZvSHb.js +2 -0
  82. package/dist/owletto/dist/assets/connect._clientId-Dbagcg9L.js +2 -0
  83. package/dist/owletto/dist/assets/connected._clientId-DALW9S2K.js +2 -0
  84. package/dist/owletto/dist/assets/connection-DyxzSqVE.js +2 -0
  85. package/dist/owletto/dist/assets/connection-feed-detail-LqpxUCdy.js +2 -0
  86. package/dist/owletto/dist/assets/{connector-page-shell-an3SYLim.js → connector-page-shell-DZjKv9zQ.js} +2 -2
  87. package/dist/owletto/dist/assets/{connector-provenance-mSZCOud-.js → connector-provenance-DtTJn1Nk.js} +2 -2
  88. package/dist/owletto/dist/assets/connectors-BVl-AR33.js +2 -0
  89. package/dist/owletto/dist/assets/{consent-1ulwyJ3k.js → consent-XCqsHLxS.js} +2 -2
  90. package/dist/owletto/dist/assets/{core.esm-Ctg_pXLe.js → core.esm-B1du4Zwy.js} +3 -3
  91. package/dist/owletto/dist/assets/create-BYKCtGL4.js +2 -0
  92. package/dist/owletto/dist/assets/create-D6Mmuxcq.js +2 -0
  93. package/dist/owletto/dist/assets/{create-CGuoqPh8.js → create-GHTb6wKX.js} +2 -2
  94. package/dist/owletto/dist/assets/{create-automation-form-CD6jSlWL.js → create-automation-form-CTiy_S9G.js} +3 -3
  95. package/dist/owletto/dist/assets/create._connectorKey-DMH97KkK.js +2 -0
  96. package/dist/owletto/dist/assets/custom-guardrail-edits-DZy66ucV.js +2 -0
  97. package/dist/owletto/dist/assets/definition-comparison-C2mPfIMD.js +2 -0
  98. package/dist/owletto/dist/assets/detail-page-skeleton-DNBL7nyk.js +2 -0
  99. package/dist/owletto/dist/assets/device-CwP1PY8q.js +2 -0
  100. package/dist/owletto/dist/assets/{device-pin-tombstone-Dkj7hrBE.js → device-pin-tombstone-DYTt7kU5.js} +2 -2
  101. package/dist/owletto/dist/assets/device._deviceId-DZ2kqI4Y.js +2 -0
  102. package/dist/owletto/dist/assets/{entity-options-D4t-NAcg.js → entity-options-D9K_5Lcs.js} +2 -2
  103. package/dist/owletto/dist/assets/entity-page-DggKXrcE.js +2 -0
  104. package/dist/owletto/dist/assets/entity-pages-C6M6yKFf.js +2 -0
  105. package/dist/owletto/dist/assets/{entity-schema-graph-Cq96SJ3c.js → entity-schema-graph-B255NKjF.js} +2 -2
  106. package/dist/owletto/dist/assets/entity-type-page-CGBAP2wt.js +2 -0
  107. package/dist/owletto/dist/assets/event-attachments-D8Z8uwv9.js +2 -0
  108. package/dist/owletto/dist/assets/event-detail-CgG3pDLA.js +2 -0
  109. package/dist/owletto/dist/assets/events-feed-ClhEywwV.js +2 -0
  110. package/dist/owletto/dist/assets/{filter-editors-DGVl9U4D.js → filter-editors-D_Sfn0dv.js} +3 -3
  111. package/dist/owletto/dist/assets/{full-page-spinner-CtVlF8GQ.js → full-page-spinner-C1clibUY.js} +2 -2
  112. package/dist/owletto/dist/assets/{index-CK5GDX4B.js → index-04B26s6E.js} +2 -2
  113. package/dist/owletto/dist/assets/index-2HrEO-nl.js +2 -0
  114. package/dist/owletto/dist/assets/index-BU3k9wpw.js +2 -0
  115. package/dist/owletto/dist/assets/{index-DvuJ_S_o.js → index-BXHqp23o.js} +2 -2
  116. package/dist/owletto/dist/assets/index-BdLRUDIR.js +2 -0
  117. package/dist/owletto/dist/assets/index-C2FrGwYN.js +2 -0
  118. package/dist/owletto/dist/assets/index-CB9wGfUm.js +2 -0
  119. package/dist/owletto/dist/assets/index-Caihaftb.js +2 -0
  120. package/dist/owletto/dist/assets/index-CwH59DJV.js +2 -0
  121. package/dist/owletto/dist/assets/index-DB2lVKuV.js +7908 -0
  122. package/dist/owletto/dist/assets/{index-DbjbHlDe.js → index-DTvJRjrM.js} +2 -2
  123. package/dist/owletto/dist/assets/index-SF2ni1Rs.css +1 -0
  124. package/dist/owletto/dist/assets/{index-BifR-LE9.js → index-mSrdbx3C.js} +9 -9
  125. package/dist/owletto/dist/assets/index-uFn-Ilrx.js +2 -0
  126. package/dist/owletto/dist/assets/{json-diff-OjtREegr.js → json-diff-Ce6YAXzY.js} +2 -2
  127. package/dist/owletto/dist/assets/{list-skeleton-CH0qQBYk.js → list-skeleton-DLPBTnbR.js} +2 -2
  128. package/dist/owletto/dist/assets/login-DeWlvogD.js +2 -0
  129. package/dist/owletto/dist/assets/{logout-DfdgOLoM.js → logout-CJY0ceN9.js} +2 -2
  130. package/dist/owletto/dist/assets/{member-scope-gate-Cxg2zGQT.js → member-scope-gate-CBPMprXu.js} +2 -2
  131. package/dist/owletto/dist/assets/memory-browse-page-D5kj1RaR.js +74 -0
  132. package/dist/owletto/dist/assets/{model-selector-D2OpDkwH.js → model-selector-CjkBPpjN.js} +2 -2
  133. package/dist/owletto/dist/assets/new-BKrNkOQD.js +2 -0
  134. package/dist/owletto/dist/assets/new-BetiMuDq.js +2 -0
  135. package/dist/owletto/dist/assets/new-dk_-eXqU.js +2 -0
  136. package/dist/owletto/dist/assets/new-efN--4Wx.js +2 -0
  137. package/dist/owletto/dist/assets/organization-C3rpwx_d.js +2 -0
  138. package/dist/owletto/dist/assets/pdf-document--AN-oCKj.css +1 -0
  139. package/dist/owletto/dist/assets/pdf-document-2W1q0sRA.js +56 -0
  140. package/dist/owletto/dist/assets/pdf.worker.min-CIqJB0yW.mjs +28 -0
  141. package/dist/owletto/dist/assets/peek-pane-content-ChsBWO0P.js +3 -0
  142. package/dist/owletto/dist/assets/{pending-seed-BBACroge.js → pending-seed-CTKYdA4X.js} +2 -2
  143. package/dist/owletto/dist/assets/proposal-review-shell-EyGWEYwQ.js +2 -0
  144. package/dist/owletto/dist/assets/public-shell-ready-_KWdfzEM.js +2 -0
  145. package/dist/owletto/dist/assets/record-session-D27VNxP_.js +2 -0
  146. package/dist/owletto/dist/assets/{renderer-CTKNMcXP.js → renderer-B8yZ5lql.js} +34 -33
  147. package/dist/owletto/dist/assets/{reset-password-DKBEneyR.js → reset-password-BGVJIh2I.js} +2 -2
  148. package/dist/owletto/dist/assets/run-initiator-C0sur8lU.js +2 -0
  149. package/dist/owletto/dist/assets/runs-list-CJOFMgpk.js +2 -0
  150. package/dist/owletto/dist/assets/schema-value-DDNHANGs.js +3 -0
  151. package/dist/owletto/dist/assets/{scoped-feed-bar-DNFL0sYX.js → scoped-feed-bar-BTv9mPcR.js} +2 -2
  152. package/dist/owletto/dist/assets/settings-Ponr5XbS.js +3 -0
  153. package/dist/owletto/dist/assets/{status-variants-SzXYYedJ.js → status-variants-mLqVhg5O.js} +2 -2
  154. package/dist/owletto/dist/assets/subDays-BGA_fkig.js +2 -0
  155. package/dist/owletto/dist/assets/two-factor-pqoxGSgL.js +2 -0
  156. package/dist/owletto/dist/assets/{use-automations-DfBtVzGa.js → use-automations-DcdlmVuX.js} +2 -2
  157. package/dist/owletto/dist/assets/{use-login-redirect-BDiS3eyl.js → use-login-redirect-D7HW5Ed6.js} +2 -2
  158. package/dist/owletto/dist/assets/{use-mention-search-khySpz_V.js → use-mention-search-BniE-K2d.js} +3 -3
  159. package/dist/owletto/dist/assets/view-card-Cg6PeEiV.js +2 -0
  160. package/dist/owletto/dist/assets/view-param-filters-CvrKw0mZ.js +2 -0
  161. package/dist/owletto/dist/index.html +2 -2
  162. package/dist/server-main.bundle.mjs +5766 -2999
  163. package/npm-shrinkwrap.json +195 -172
  164. package/package.json +2 -1
  165. package/vendor/connector-sdk/dist/connector-types.d.ts +20 -0
  166. package/vendor/connector-sdk/dist/define-connector.js +2 -0
  167. package/vendor/connector-sdk/dist/extension-dom-scrape.d.ts +2 -0
  168. package/vendor/connector-sdk/dist/extension-dom-scrape.js +5 -0
  169. package/vendor/connector-sdk/dist/reaction-client-types.d.ts +20 -0
  170. package/vendor/connector-sdk/package.json +1 -1
  171. package/vendor/core/dist/contracts/entity-reference.d.ts +2 -0
  172. package/vendor/core/dist/contracts/entity-reference.js +4 -3
  173. package/vendor/core/dist/contracts/tools/entity-list-sort.d.ts +18 -0
  174. package/vendor/core/dist/contracts/tools/entity-list-sort.js +64 -0
  175. package/vendor/core/dist/contracts/tools/manage-agents.d.ts +1 -1
  176. package/vendor/core/dist/contracts/tools/manage-agents.js +3 -3
  177. package/vendor/core/dist/contracts/tools/manage-entity-schema.d.ts +4 -0
  178. package/vendor/core/dist/contracts/tools/manage-entity-schema.js +4 -0
  179. package/vendor/core/dist/contracts/tools/manage-entity.d.ts +4 -0
  180. package/vendor/core/dist/contracts/tools/manage-entity.js +11 -1
  181. package/vendor/core/dist/contracts/tools/manage-operations.d.ts +29 -3
  182. package/vendor/core/dist/contracts/tools/manage-operations.js +24 -2
  183. package/vendor/core/dist/contracts/tools/manage-views.d.ts +36 -0
  184. package/vendor/core/dist/contracts/tools/manage-views.js +15 -2
  185. package/vendor/core/dist/contracts/tools/view-definition.js +7 -2
  186. package/vendor/core/dist/contracts/tools/view-host.js +5 -0
  187. package/vendor/core/dist/contracts/tools/view-path.d.ts +8 -1
  188. package/vendor/core/dist/contracts/tools/view-path.js +11 -1
  189. package/vendor/core/dist/reserved.d.ts +7 -1
  190. package/vendor/core/dist/reserved.js +17 -0
  191. package/vendor/core/package.json +6 -1
  192. package/vendor/views/dist/api.d.ts +19 -3
  193. package/vendor/views/dist/api.js +53 -5
  194. package/vendor/views/dist/components.d.ts +7 -0
  195. package/vendor/views/dist/components.js +223 -2
  196. package/vendor/views/dist/embed.js +13 -2
  197. package/vendor/views/dist/live-gate.d.ts +34 -0
  198. package/vendor/views/dist/live-gate.js +100 -0
  199. package/vendor/views/dist/native.d.ts +43 -1
  200. package/vendor/views/dist/native.js +1 -0
  201. package/vendor/views/package.json +1 -1
  202. package/dist/owletto/dist/assets/_-BDMUN9XZ.js +0 -2
  203. package/dist/owletto/dist/assets/_-CF5X4ANe.js +0 -3
  204. package/dist/owletto/dist/assets/_agentId-EQU2aUP0.js +0 -2
  205. package/dist/owletto/dist/assets/_automationId-PXZ33jsF.js +0 -2
  206. package/dist/owletto/dist/assets/_connectorKey._connectionId-DcI29kGy.js +0 -2
  207. package/dist/owletto/dist/assets/_connectorKey.index-Cr2NDJWX.js +0 -2
  208. package/dist/owletto/dist/assets/_conversationId-CnmLYlVS.js +0 -2
  209. package/dist/owletto/dist/assets/_eventId-w5sDz5oa.js +0 -2
  210. package/dist/owletto/dist/assets/_owner-CkOZR4n0.js +0 -3
  211. package/dist/owletto/dist/assets/_shape-C_FmSf9G.js +0 -2
  212. package/dist/owletto/dist/assets/_slug-COPpRXLt.js +0 -2
  213. package/dist/owletto/dist/assets/_viewKey-BVdJiilV.js +0 -2
  214. package/dist/owletto/dist/assets/_viewKey-mxxpqjtC.js +0 -2
  215. package/dist/owletto/dist/assets/activity-route-view-msesKUwn.js +0 -2
  216. package/dist/owletto/dist/assets/agent-connect-pages-DVq9nAR7.js +0 -4
  217. package/dist/owletto/dist/assets/agent-thread-Cqf9ITrT.js +0 -6
  218. package/dist/owletto/dist/assets/assist-composer-kG_heHXo.js +0 -2
  219. package/dist/owletto/dist/assets/automation-run-now-C5XTS00o.js +0 -2
  220. package/dist/owletto/dist/assets/client-activity-scopes-Aqdo6Pdr.js +0 -2
  221. package/dist/owletto/dist/assets/connect-BFNp1y_s.js +0 -2
  222. package/dist/owletto/dist/assets/connect-menu-BWrAhMqO.js +0 -2
  223. package/dist/owletto/dist/assets/connect._clientId-CSPfwYIN.js +0 -2
  224. package/dist/owletto/dist/assets/connected._clientId-CuOeHafK.js +0 -2
  225. package/dist/owletto/dist/assets/connection-CVeHmDLs.js +0 -2
  226. package/dist/owletto/dist/assets/connection-feed-detail-BYo7zdVD.js +0 -2
  227. package/dist/owletto/dist/assets/connectors-DBEM9QQz.js +0 -2
  228. package/dist/owletto/dist/assets/copy-button-Xhh7ZnjO.js +0 -2
  229. package/dist/owletto/dist/assets/create-Ccb5R-S4.js +0 -2
  230. package/dist/owletto/dist/assets/create-DmhbacIa.js +0 -2
  231. package/dist/owletto/dist/assets/create._connectorKey-CZsAqj1p.js +0 -2
  232. package/dist/owletto/dist/assets/custom-guardrail-edits-Ce_BwiwD.js +0 -2
  233. package/dist/owletto/dist/assets/definition-comparison-D_qP25jR.js +0 -2
  234. package/dist/owletto/dist/assets/detail-page-skeleton-CPAfZLG0.js +0 -2
  235. package/dist/owletto/dist/assets/device-DDl5XKvt.js +0 -2
  236. package/dist/owletto/dist/assets/device._deviceId-bNhTcops.js +0 -2
  237. package/dist/owletto/dist/assets/dynamic-schema-form-CRyUchXo.js +0 -2
  238. package/dist/owletto/dist/assets/entity-page-BOOL_vy3.js +0 -2
  239. package/dist/owletto/dist/assets/entity-pages-_nuesgnp.js +0 -2
  240. package/dist/owletto/dist/assets/entity-type-page-CkCSbkBx.js +0 -2
  241. package/dist/owletto/dist/assets/event-detail-DUvlqn9b.js +0 -2
  242. package/dist/owletto/dist/assets/events-feed-DcKTkJVe.js +0 -2
  243. package/dist/owletto/dist/assets/index-BUlkNJzX.js +0 -2
  244. package/dist/owletto/dist/assets/index-BoqrvLHQ.js +0 -7906
  245. package/dist/owletto/dist/assets/index-CA9mW_ZM.js +0 -2
  246. package/dist/owletto/dist/assets/index-CH0GzG4i.js +0 -2
  247. package/dist/owletto/dist/assets/index-CtI5Eomq.js +0 -2
  248. package/dist/owletto/dist/assets/index-DmtQ0bds.js +0 -2
  249. package/dist/owletto/dist/assets/index-Du_J8hnx.js +0 -2
  250. package/dist/owletto/dist/assets/index-Pae_f9LM.css +0 -1
  251. package/dist/owletto/dist/assets/index-XETZnN7L.js +0 -2
  252. package/dist/owletto/dist/assets/login-DG0b9uSC.js +0 -2
  253. package/dist/owletto/dist/assets/memory-browse-page-qEDQ9Z18.js +0 -74
  254. package/dist/owletto/dist/assets/missing-view-xT0B-f5z.js +0 -2
  255. package/dist/owletto/dist/assets/needs-you-list-3uMsWcDv.js +0 -2
  256. package/dist/owletto/dist/assets/new-AdGV6a8R.js +0 -2
  257. package/dist/owletto/dist/assets/new-BdtIhBpo.js +0 -2
  258. package/dist/owletto/dist/assets/new-BjGwX6s6.js +0 -2
  259. package/dist/owletto/dist/assets/new-D-iMjV74.js +0 -2
  260. package/dist/owletto/dist/assets/organization-qaIpEiQg.js +0 -2
  261. package/dist/owletto/dist/assets/peek-pane-content-CEsDVScl.js +0 -2
  262. package/dist/owletto/dist/assets/proposal-review-shell-C8ZfIAYn.js +0 -2
  263. package/dist/owletto/dist/assets/public-shell-ready-K2R8iXSI.js +0 -2
  264. package/dist/owletto/dist/assets/record-session-BrM9cdXu.js +0 -2
  265. package/dist/owletto/dist/assets/run-initiator-BKSgI1o0.js +0 -2
  266. package/dist/owletto/dist/assets/runs-k2NpbZm8.js +0 -2
  267. package/dist/owletto/dist/assets/runs-list-DUXRMkWN.js +0 -2
  268. package/dist/owletto/dist/assets/schema-value-wjqGxXhv.js +0 -3
  269. package/dist/owletto/dist/assets/settings-V0m5Om5j.js +0 -2
  270. package/dist/owletto/dist/assets/source-record-panels-BMut9YIA.js +0 -2
  271. package/dist/owletto/dist/assets/subDays-9s9OEl5t.js +0 -2
  272. package/dist/owletto/dist/assets/table-ZuYMOjVR.js +0 -2
  273. package/dist/owletto/dist/assets/view-card-DiHWlypr.js +0 -2
  274. package/dist/owletto/dist/assets/view-param-filters-DGKxSr7r.js +0 -2
  275. package/dist/owletto/dist/assets/views-access-required-HA-PiOwA.js +0 -2
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/pdf-document-2W1q0sRA.js","assets/index-DB2lVKuV.js","assets/index-SF2ni1Rs.css","assets/pdf-document--AN-oCKj.css"])))=>i.map(i=>d[i]);
2
+ import{j as e,ew as ge,k9 as M,ka as je,kb as re,kc as ye,kd as ve,r as f,ke as Ne,u as I,b0 as ke,cU as we,n as A,iQ as be,jG as Ae,B as w,kf as Ce,kg as U,kh as Se,e8 as Ie,ki as Pe,G as R,an as L,aF as q,cA as W,P as ie,dG as $e,bZ as Te,c9 as Re,d0 as Le,cT as _e,x as Ee,hC as ze,Q as De,L as Z,kj as Oe,cY as Fe,d1 as Me,dz as Be,kk as Ke,hK as J,g3 as He,fg as Ue,fd as Ve,m as qe,_ as We,a_ as Ge,kl as Qe,y as Ye,eD as ae,ec as Ze,km as Je,o as Xe,w as et,e_ as tt,eT as st,eN as nt,g1 as rt,g4 as it,ga as D,p as at,kn as ot,ko as ct,eL as lt,kp as dt,fC as ut,ad as mt,kq as pt,kr as xt}from"./index-DB2lVKuV.js";import{c as ht}from"./agent-client-connections-xvabPpi6.js";import{b as oe,u as ft,a as gt,A as jt}from"./automation-run-now-Dl0MKx3N.js";import{A as yt}from"./agent-loading-shells-D3y98xuO.js";import{s as vt,h as Nt,R as kt,A as wt}from"./agent-thread-v_lSSnJi.js";import{C as bt,a as At,c as Ct,A as St}from"./connection-feed-detail-LqpxUCdy.js";import{O as It}from"./connect-menu-D5EZvSHb.js";import{E as _,u as Pt,f as $t,c as ce,R as Tt,b as Rt,s as X,p as ee,g as Lt,h as _t}from"./events-feed-ClhEywwV.js";import{S as Et}from"./view-card-Cg6PeEiV.js";import{E as te}from"./entity-type-page-CGBAP2wt.js";import{c as zt,s as Dt}from"./renderer-B8yZ5lql.js";import{a as Ot}from"./event-attachments-D8Z8uwv9.js";import{E as Ft}from"./event-detail-CgG3pDLA.js";import{E as Mt,V as Bt,R as Kt}from"./index-Caihaftb.js";import{V as Ht,a as Ut}from"./view-param-filters-CvrKw0mZ.js";import{S as Vt,g as qt}from"./status-variants-mLqVhg5O.js";import{a as le}from"./use-automations-DcdlmVuX.js";import"./clients-BhPMbxHi.js";import"./client-rows-rse9thnk.js";import"./scoped-feed-bar-BTv9mPcR.js";import"./event-kind-options-fHAIXu24.js";import"./filter-editors-D_Sfn0dv.js";import"./subDays-BGA_fkig.js";import"./create-automation-form-CTiy_S9G.js";import"./entity-options-D9K_5Lcs.js";import"./device-automation-Dp3faMvp.js";import"./model-selector-CjkBPpjN.js";import"./skill-editor-D_W3QlRz.js";import"./code-editor-CTdKUDPY.js";import"./index-Vcq4gwWv.js";import"./json-diff-Ce6YAXzY.js";import"./use-mention-search-BniE-K2d.js";import"./proposal-review-shell-EyGWEYwQ.js";import"./definition-comparison-C2mPfIMD.js";import"./schema-value-DDNHANGs.js";import"./runs-list-CJOFMgpk.js";import"./run-initiator-C0sur8lU.js";import"./list-skeleton-DLPBTnbR.js";import"./app-bridge-B-L0rGz9.js";import"./pending-seed-CTKYdA4X.js";import"./feed-event-kinds-BYuZCoU4.js";import"./activity-route-location-Bec6fW-t.js";import"./client-activity-scopes-DqaFEyir.js";import"./member-scope-gate-CBPMprXu.js";import"./card-C4oPCVh6.js";import"./entity-pages-C6M6yKFf.js";import"./record-session-D27VNxP_.js";function Wt(t){if(!t||typeof t!="object")return[];const s=t.properties;if(!s)return[];const i=Array.isArray(t.required)?new Set(t.required.map(String)):new Set;return Object.entries(s).map(([r,n])=>({name:r,type:String(n.type??"any"),required:i.has(r),description:typeof n.description=="string"?n.description:void 0}))}function Gt({fields:t}){return t.length===0?e.jsx("p",{className:"text-xs text-muted-foreground",children:"No fields."}):e.jsx("ul",{className:"space-y-2",children:t.map(s=>e.jsxs("li",{className:"space-y-0.5",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-2",children:[e.jsx("code",{className:"text-xs font-medium text-foreground",children:s.name}),e.jsx("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground/70",children:s.type}),s.required?e.jsx("span",{className:"text-[10px] font-medium text-amber-600 dark:text-amber-400",children:"required"}):null]}),s.description?e.jsx("p",{className:"text-xs text-muted-foreground",children:s.description}):null]},s.name))})}function B({item:t,hideHeading:s=!1}){const i=t.schemaSections;return i?e.jsxs("article",{className:s?"space-y-4":"space-y-4 px-5 py-5",children:[!s&&e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ge,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[e.jsx("h2",{className:"text-base font-medium text-foreground",children:t.title}),i.description?e.jsx("p",{className:"text-xs text-muted-foreground",children:i.description}):null]})]}),i.sections.map(r=>{const n=Wt(r.schema);return e.jsxs("section",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:r.title}),r.description?e.jsx("span",{className:"truncate text-xs text-muted-foreground",children:r.description}):null]}),e.jsx(Gt,{fields:n})]},r.title)})]}):null}function Qt({actions:t}){const s=Object.entries(t).map(([i,r])=>{const n=r;return{id:i,name:n.name??i,description:n.description,action:n}});return e.jsx(M,{entries:s,label:"actions",renderDetail:({name:i,action:r})=>e.jsx(B,{hideHeading:!0,item:{href:"",title:i,schemaSections:re(r)}})})}function Yt({feeds:t}){const s=Object.entries(t).map(([i,r])=>{const n=r;return{id:i,name:n.name??i,description:n.description,feed:n}});return e.jsx(M,{entries:s,label:"feed types",renderDetail:({name:i,feed:r})=>e.jsx(B,{hideHeading:!0,item:{href:"",title:i,schemaSections:je(r)}})})}function Zt(t){const s=[];return t.forEach((i,r)=>{s.push({id:`sep:${i.runId}`,role:"system",parts:[{type:"text",text:Jt(i,r)}],createdAt:i.completedAt?new Date(i.completedAt).getTime():void 0});for(const n of i.messages)s.push({...n,id:`r${i.runId}:${n.id}`})}),s}function Jt(t,s){const i=(t.pendingActionCount??0)>0?`Waiting for you (${t.pendingActionCount})`:t.status==="completed"?"Completed":t.status??"Completed",r=(t.autoAppliedCount??0)>0?` · ${t.autoAppliedCount} applied automatically`:"",n=t.completedAt?new Date(t.completedAt).toLocaleString():null;return n?`Run ${s+1} · ${i}${r} · ${n}`:`Run ${s+1} · ${i}${r}`}const de=Symbol("trusted-automation-interaction");function Xt(t){return Object.defineProperty(t,de,{value:!0}),t}function es(t){return{title:`${t} items waiting for you`,icon:"entity",impact:{level:"normal"},tone:"default",blocks:[{type:"text",value:"Review the individual proposals below, or decide the whole run at once.",muted:!0}],actions:[{id:"approve-all",label:"Approve all",variant:"primary",icon:"check",confirm:!0,confirmPrompt:`Approve all ${t} proposals?`,tool:"manage_operations",args:{action:"approve"},resolvedLabel:`Approved all ${t} proposals.`},{id:"reject-all",label:"Reject all",variant:"outline",icon:"x",confirm:!0,confirmPrompt:`Reject all ${t} proposals?`,tool:"manage_operations",args:{action:"reject"},resolvedLabel:`Rejected all ${t} proposals.`}]}}const ts=new Set(["automation-approval-batch"]);function ss(t){return new Promise(s=>{t({onSettled:(i,r)=>s(!!r)})})}function ns(){const t=ye(),s=ve();return f.useMemo(()=>({toolNames:ts,resolve:(i,r)=>{if(!r||typeof r!="object"||r[de]!==!0)return null;const n=r;if(i==="automation-approval-batch"){const a=typeof n.runId=="number"&&Number.isSafeInteger(n.runId)&&n.runId>0?n.runId:null,c=typeof n.count=="number"&&Number.isSafeInteger(n.count)&&n.count>1?n.count:null,o=Array.isArray(n.runIds)?n.runIds.filter(d=>typeof d=="number"&&Number.isSafeInteger(d)&&d>0):[];return a===null||c===null||o.length!==c||new Set(o).size!==c?null:{view:es(c),handlers:{manage_operations:d=>d.action!=="approve"&&d.action!=="reject"?Promise.resolve(!0):ss(p=>d.action==="approve"?t.mutate({run_id:a,run_ids:o},p):s.mutate({run_id:a,run_ids:o},p))}}}return null}}),[t,s])}const rs=/(?:^|\n)Run this Automation now/;function is(t){return t.role==="user"&&t.parts.some(s=>s.type==="text"&&rs.test(s.text))}function as(t){return`history-interaction:${t.runId}:${t.eventId??"error"}`}function os({agentId:t,automationId:s,ownerSlug:i,runId:r}){const{data:n,isLoading:a}=Ne(t,s,{orgSlug:i,...r!=null?{runId:r}:{}}),c=ns(),o=I(),d=f.useCallback(u=>{o?.open({href:`/${i}/automations/${s}?view=activity&run_id=${u}`,title:`Automation run #${u}`,runId:u})},[o,i,s]),p=f.useMemo(()=>{const u=n?.runs??[],N=(r!=null?u.filter(h=>h.runId===r):u).slice().reverse();return Zt(N.map(h=>{const y=h.messages.map(m=>vt(m,{showToolCalls:!0})).filter(m=>m!==null&&!is(m));h.task?.trim()&&y.unshift({id:"task",role:"user",parts:[{type:"text",text:h.task.trim()}]});const k=h.actions??[],v=k.filter(m=>m.status==="pending");if(v.length>1){const m=v.map(g=>g.runId).sort((g,S)=>g-S);y.push({id:"approval-batch",role:"assistant",parts:[{type:"tool-call",toolCallId:`approval-batch-${h.runId}`,toolName:"automation-approval-batch",args:Xt({runId:h.runId,count:v.length,runIds:m})}]})}for(const m of k){const g=Nt([m],{workspaceSlug:i,agentId:t,webOrigin:typeof window>"u"?null:window.location.origin});g&&y.push({...g,id:as(m)})}return{runId:h.runId,completedAt:h.completedAt,status:h.status,pendingActionCount:h.pendingActionCount,autoAppliedCount:h.autoAppliedCount,messages:y}}))},[t,n,i,r]);return a?e.jsx(yt,{readOnly:!0}):p.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No run transcripts yet. Recent runs will show here when the Automation fires (failed runs appear with their prompt even without a full transcript)."}):e.jsx("div",{className:"flex h-[calc(100dvh-12rem)] min-h-[24rem] min-w-0 flex-1 flex-col",children:e.jsx(kt,{messages:p,workspaceSlug:i,children:e.jsx(wt,{readOnly:!0,readerPositionMode:"runs",interactionExtension:c,onRunSelect:r==null&&o?d:void 0})})})}function cs({panel:t}){const s=ke(t.organizationId),i=t.section==="connections"||!!t.connectionId,r=we(t.organizationId,{connectorKey:t.connectorKey,connectionIds:t.connectionId?[t.connectionId]:void 0,enabled:i}),n=s.data?.find(c=>c.key===t.connectorKey),a=r.data?.find(c=>c.id===t.connectionId&&c.connector_key===t.connectorKey);return s.isLoading||i&&r.isLoading?e.jsx("div",{className:"p-5",children:e.jsx(A,{className:"h-28 w-full"})}):s.isError||i&&r.isError?e.jsx("p",{role:"alert",className:"p-5 text-sm",children:"Could not load this connector. Close the pane and try again."}):t.connectionId&&!a||!n&&!a&&t.section!=="connections"?e.jsx("p",{className:"p-5 text-sm",children:"This connection is no longer available."}):e.jsx("div",{className:"p-5",children:t.section==="connections"?e.jsx(be,{connections:r.data??[],connector:n,connectorKey:t.connectorKey,ownerSlug:t.ownerSlug}):a&&t.section==="data"?e.jsx(bt,{connection:a,ownerSlug:t.ownerSlug}):a?e.jsx(us,{connection:a,connector:n,panel:t}):n?t.section==="oauth-apps"?e.jsx(It,{connector:n,organizationId:t.organizationId,newApp:!!t.newApp}):t.section==="feeds"?e.jsx(ls,{connector:n}):n.installed===!1?e.jsx(ds,{connector:n,ownerSlug:t.ownerSlug}):e.jsx(ps,{connector:n,ownerSlug:t.ownerSlug}):null},`${t.connectorKey}:${t.connectionId??"connector"}:${t.section}`)}function ls({connector:t}){return e.jsx(Yt,{feeds:t.feeds_schema??{}})}function ds({connector:t,ownerSlug:s}){return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Policy depends on connection."," ",e.jsx(U,{ownerSlug:s,connectorKey:t.key})]}),e.jsx(Qt,{actions:t.actions_schema??{}})]})}function us({connection:t,connector:s,panel:i}){const[r,n]=f.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx("div",{hidden:r,children:i.section==="feeds"?e.jsx(ms,{connection:t,connector:s,ownerSlug:i.ownerSlug}):e.jsx(Ae,{connection:t,ownerSlug:i.ownerSlug,inPeek:!0,onReviewPermissions:s?()=>n(!0):void 0})}),r&&s&&e.jsxs("div",{className:"space-y-4",children:[e.jsx(w,{variant:"ghost",size:"sm",onClick:()=>n(!1),children:"Back to actions"}),e.jsx("h2",{className:"text-base font-semibold",children:"Provider permissions"}),e.jsx(Ce,{connection:t,connectorDef:s})]})]})}function ms({connection:t,connector:s,ownerSlug:i}){const{data:r=[],isLoading:n,isError:a}=Ie(t.id),[c,o]=f.useState(!1),d=t.facets?.chat??!1;if(n)return e.jsx(A,{className:"h-28 w-full"});if(a)return e.jsx("p",{role:"alert",children:"Could not load sources. Close the pane and try again."});const p=r.map(u=>({id:String(u.id),name:u.display_name||u.feed_key,status:Pe(u)??(u.operations.includes("sync")?"Sync enabled":"Live access"),feed:u}));return e.jsxs(e.Fragment,{children:[e.jsx("div",{hidden:c,children:e.jsx(M,{entries:p,label:d?"channels":"feeds",action:Object.keys(s?.feeds_schema??{}).length>0?e.jsx(w,{size:"sm",variant:"outline",onClick:()=>o(!0),children:d?"Add channel":"Add feed"}):void 0,renderDetail:({feed:u})=>u.store==="channel_messages"?e.jsx(At,{feed:u,hideHeader:!0}):e.jsx(Ct,{feed:u,connectorDef:s,ownerSlug:i})})}),c&&s&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-base font-semibold",children:d?"Add channel":"Add feed"}),e.jsx(St,{organizationId:t.organization_id,connections:[t],connectorDefinitions:[s],onClose:()=>o(!1)})]})]})}function ps({connector:t,ownerSlug:s}){const{data:i=[],isLoading:r,isError:n}=Se(t.key);if(r)return e.jsx(A,{className:"h-28 w-full"});if(n)return e.jsx("p",{role:"alert",children:"Could not load actions. Close the pane and try again."});const a=t.actions_schema??{},c=i.map(o=>({id:o.operation_key,name:o.name??o.operation_key,description:o.description,operation:o}));return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Policy depends on connection. Click an action to inspect its inputs."," ",e.jsx(U,{ownerSlug:s,connectorKey:t.key})]}),e.jsx(M,{entries:c,label:"actions",renderControl:()=>e.jsx(U,{ownerSlug:s,connectorKey:t.key}),renderDetail:({operation:o,name:d})=>a[o.operation_key]?e.jsx(B,{hideHeading:!0,item:{href:"",title:d,schemaSections:re(a[o.operation_key])}}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"No input fields."})})]})}function xs({owner:t,name:s,agentId:i,clientIds:r}){const{data:n,isLoading:a}=R(t==="me"?null:t,{slug:t}),c=n?.workspace,o=t!=="me"&&c?.type==="organization"?c.id:null,d=r?.join(",")??"",p=f.useMemo(()=>({sortBy:"date",sortOrder:"desc",...i?{agentId:i}:{clientIds:d.split(",").filter(Boolean)}}),[i,d]);return t!=="me"&&a?e.jsxs("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:[e.jsx(L,{className:"mr-2"})," Loading…"]}):e.jsx("div",{className:"space-y-3 px-4 py-4",children:e.jsx(_,{organizationId:o,ownerSlug:t,filters:p,hideOriginator:!0,groupStretches:!0,emptyState:e.jsxs("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:["No activity from ",s," yet."]})})})}function hs({owner:t,path:s}){const{data:i,isLoading:r}=R(t,{slug:t}),n=i?.workspace,a=n?.type==="organization"?n.id:null,c=a?{slug:t}:void 0,{data:o,isLoading:d}=q(`/${t}/${W(s)}`,c),p=o?.entity,u=p?.id;return r||d?e.jsxs("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:[e.jsx(L,{className:"mr-2"})," Loading…"]}):a?u==null?e.jsx("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"Couldn't find this record. It may have been deleted, or it may live in a workspace you can't access."}):p?.is_derived?e.jsx(Et,{record:{type:p.entity_type,key:p.slug},orgContext:c}):e.jsx("div",{className:"px-4 py-4",children:e.jsx(_,{organizationId:a,ownerSlug:t,entityId:typeof u=="number"?u:void 0,filters:{sortBy:"date",sortOrder:"desc"},emptyState:e.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"Nothing has happened to this record yet."})})}):e.jsx("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"Couldn't resolve this workspace."})}function fs({slug:t,onClose:s}){const{orgContext:i}=ie(),{data:r=[],isLoading:n,isError:a}=$e(i);if(t===null)return e.jsx(te,{entityType:null,orgContext:i,onClose:s,compact:!0});if(n)return e.jsx(Te,{label:"entity type",variant:"panel"});if(a)return e.jsx(Re,{label:"entity type"});const c=r.find(o=>o.slug===t)??null;return c?e.jsx(te,{entityType:c,orgContext:i,hideDelete:Le(c),onClose:s,compact:!0}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"Entity type not found."})}function gs(t){if(Array.isArray(t.enum))return`One of ${t.enum.length}`;if(t.format==="date"||t.format==="date-time")return"Date";if(t.format==="uri")return"Link";if(t.format==="email")return"Email";const s=Array.isArray(t.type)?t.type[0]:t.type;return s==="array"?"List":s==="object"?"Group":s==="integer"||s==="number"?"Number":s==="boolean"?"Yes / no":"Text"}function js({owner:t,typeSlug:s,view:i}){const{data:r,isLoading:n}=R(t,{slug:t}),a=r?.workspace,c=a?.type==="organization"?a.id:null,{isAdmin:o}=_e(c??void 0),{orgContext:d}=ie(),{data:p,isSuccess:u}=Ee(d),x=(p??[]).find(C=>C.slug===s),N=u&&!x,h=`/${t}/${ze(s)}`,{pathname:y}=De(),k=y===h||y===`${h}/`||y.startsWith(`${h}/-/`),v=f.useMemo(()=>zt(x?.metadata_schema),[x?.metadata_schema]),m=I(),g=m?.close;f.useEffect(()=>{N&&g?.()},[N,g]);const S=f.useMemo(()=>({entityTypes:[s],sortBy:"date",sortOrder:"desc"}),[s]);if(n)return e.jsxs("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:[e.jsx(L,{className:"mr-2"})," Loading…"]});if(N)return e.jsx("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"This entity type no longer exists."});if(!c)return e.jsx("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"Couldn't resolve this workspace."});const E=x?.name??s;return e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-4 py-2.5",children:[k?null:e.jsx(w,{asChild:!0,variant:"outline",size:"sm",className:"h-8 text-xs",children:e.jsxs(Z,{...Fe(t,s),children:[e.jsx(Oe,{className:"mr-1.5 h-3.5 w-3.5"}),"Browse records"]})}),x&&!k&&!Me(x)&&x.entity_count!==0?e.jsx(w,{asChild:!0,variant:"outline",size:"sm",className:"h-8 text-xs",children:e.jsxs(Z,{to:"/$owner/$entityType/-/$shape",params:{owner:t,entityType:s,shape:"graph"},search:Ke(J(t,s)),children:[e.jsx(Be,{className:"mr-1.5 h-3.5 w-3.5"}),"Graph"]})}):null,i!=="activity"&&m?e.jsxs(w,{type:"button",variant:"ghost",size:"sm",className:"ml-auto h-8 gap-1.5 text-xs text-muted-foreground hover:text-foreground",onClick:()=>m.open({href:J(t,s,"activity"),title:`${E} activity`}),children:[e.jsx(He,{className:"h-3.5 w-3.5"}),"Activity"]}):null]}),i==="activity"?e.jsx("div",{className:"px-4 py-4",children:e.jsx(_,{organizationId:c,ownerSlug:t,filters:S,showEntityLinks:!0,emptyState:e.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"Nothing has happened to these records yet."})})}):o?e.jsx("div",{className:"p-4",children:e.jsx(fs,{slug:s,onClose:()=>g?.()})}):v.length>0?e.jsxs("section",{"aria-labelledby":"entity-type-peek-fields",className:"px-4 py-4",children:[e.jsx("h3",{id:"entity-type-peek-fields",className:"mb-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Fields"}),e.jsx("dl",{className:"divide-y divide-border/60 text-sm",children:v.map(C=>e.jsxs("div",{className:"flex items-baseline justify-between gap-3 py-1.5",title:C.prop.description,children:[e.jsx("dt",{className:"min-w-0 truncate",children:Dt(C)}),e.jsx("dd",{className:"shrink-0 text-xs text-muted-foreground",children:gs(C.prop)})]},C.key))})]}):e.jsx("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"This type has no fields yet."})]})}const ys=qe(async()=>({default:(await We(async()=>{const{PdfDocument:t}=await import("./pdf-document-2W1q0sRA.js");return{PdfDocument:t}},__vite__mapDeps([0,1,2,3]))).PdfDocument}));function vs({owner:t,eventId:s,fileKey:i,page:r}){const n=Ot(t,s,i);if(n.status==="loading")return e.jsx(O,{});if(n.status!=="ready")return e.jsx(T,{children:n.status==="failed"?"This event could not be loaded.":"This file is no longer attached to this event."});const a={owner:t,eventId:s,fileKey:i,page:r};return n.attachment.open?e.jsx(Ns,{...a,attachment:n.attachment,connectionId:n.connectionId}):e.jsx(ue,{...a,attachment:n.attachment})}function O({label:t}){return e.jsxs("div",{className:"space-y-3 p-4",children:[t?e.jsx("p",{className:"text-sm text-muted-foreground",children:t}):e.jsx(A,{className:"h-4 w-1/3"}),e.jsx(A,{className:"h-[60vh] w-full rounded-md"})]})}function T({children:t}){return e.jsx("div",{role:"alert",className:"space-y-3 px-5 py-5 text-sm text-muted-foreground",children:t})}function Ns({owner:t,eventId:s,fileKey:i,page:r,attachment:n,connectionId:a}){const c=I(),o=Pt(t,a),d=n.open,p=d?o.find(d.operation):void 0,u=p?.policy?.effect==="deny",x=$t(t,s,i,d&&p&&!u&&a!==null?{connectionId:a,open:d}:null),N=e.jsx(ce,{name:n.name,size:n.size});if(o.isPending)return e.jsx(O,{});if(!p)return e.jsxs(T,{children:[e.jsx("p",{children:o.isError?"This file's connection could not be reached.":"This file cannot be opened from its source."}),N]});if(u)return e.jsxs(T,{children:[e.jsx("p",{children:"Your workspace blocks opening files from this connection."}),N]});switch(x.status){case"idle":case"loading":return e.jsx(O,{label:`Fetching ${n.name} from its source…`});case"waiting":return x.approval?e.jsxs(T,{children:[e.jsx("p",{children:"Opening this file is waiting for approval."}),e.jsx(w,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>c?.open({href:`/${t}/events?run_ids=${x.runId}`,title:`Run #${x.runId}`,runId:x.runId}),children:"Review request"})]}):e.jsx(O,{label:`Fetching ${n.name} from its source…`});case"declined":return e.jsxs(T,{children:[e.jsx("p",{children:"The request to open this file was declined."}),N]});case"failed":return e.jsxs(T,{children:[e.jsx("p",{children:"The source could not return this file."}),e.jsx("p",{className:"text-xs",children:x.message}),N]});case"ready":return e.jsx(ue,{owner:t,eventId:s,fileKey:i,page:r,attachment:{...x.file,name:n.name,size:n.size??x.file.size,isPdf:n.isPdf||x.file.isPdf,isImage:n.isImage||x.file.isImage}})}}function ue({owner:t,eventId:s,fileKey:i,page:r,attachment:n}){const a=I(),c=f.useRef(null);n.url&&c.current?.fileKey!==i&&(c.current={fileKey:i,url:n.url});const o=a?.retarget,d=f.useCallback(x=>o?.(Ue(t,s,i,x)),[o,t,s,i]),p=(n.isPdf||n.isImage)&&c.current?.fileKey===i?c.current.url:null;if(!p)return e.jsxs("div",{className:"space-y-3 px-5 py-5",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"This file cannot be shown here."}),e.jsx(ce,{name:n.name,url:n.url,size:n.size})]});const u=n.isPdf?"PDF":"Image";return e.jsxs("div",{className:"flex min-h-full flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 border-b border-border px-4 py-2",children:[e.jsx("p",{className:"min-w-0 flex-1 truncate text-xs text-muted-foreground",children:n.size?`${u} · ${n.size}`:u}),n.url?e.jsx(w,{variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs",asChild:!0,children:e.jsxs("a",{href:n.url,target:"_blank",rel:"noreferrer",children:[e.jsx(Ve,{className:"h-3.5 w-3.5"}),"Download"]})}):null]}),e.jsx("div",{className:"flex-1 bg-muted/40",children:n.isPdf?e.jsx(f.Suspense,{fallback:e.jsx("div",{"data-testid":"pdf-loading",className:"p-4",children:e.jsx(A,{className:"h-[60vh] w-full rounded-md"})}),children:e.jsx(ys,{url:p,initialPage:r,onPageChange:d},i)}):e.jsx("img",{src:p,alt:n.name,className:"mx-auto block max-w-full object-contain p-4"})})]})}function ks({owner:t,eventId:s,viewKey:i}){const r=I(),n=(a,c)=>e.jsx(Ft,{owner:c,organizationId:a,eventId:s,viewKey:i,dense:!0,onSelectView:r?o=>r.retarget(o):void 0},`${c}/${s}/${i??""}`);return e.jsx("div",{className:"px-4 py-4",children:t==="me"?n(null,t):e.jsx(Ge,{owner:t,children:({organizationId:a,ownerSlug:c})=>a?n(a,c):e.jsx("div",{className:"h-40 animate-pulse rounded-md bg-muted/40"})})})}function ws({owner:t,feedId:s,semanticTypes:i}){const{data:r,isLoading:n}=R(t==="me"?null:t,{slug:t}),a=r?.workspace,c=t!=="me"&&a?.type==="organization"?a.id:null,o=f.useMemo(()=>({feedIds:[s],...i?.length?{semanticTypes:i}:{},sortBy:"date",sortOrder:"desc"}),[s,i]);return t!=="me"&&n?e.jsxs("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:[e.jsx(L,{className:"mr-2"})," Loading…"]}):c==null?e.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"Couldn't resolve this workspace."}):e.jsx("div",{className:"px-4 py-4",children:e.jsx(_,{organizationId:c,ownerSlug:t,filters:o,showEntityLinks:!0,hideOriginator:!0,emptyState:e.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:i?.length===1?`No ${i[0]} events from this feed yet.`:"No matching events from this feed yet."})})})}function F({owner:t,runId:s,runIds:i,contentIds:r}){const{data:n,isLoading:a}=R(t==="me"?null:t,{slug:t}),c=n?.workspace,o=t!=="me"&&c?.type==="organization"?c.id:null,d=f.useMemo(()=>{if(t==="me")return r?.length?{contentIds:r,sortBy:"date",sortOrder:"desc"}:void 0;const u=i??(s!=null?[s]:void 0);if(!(!u?.length&&!r?.length))return{...u?.length?{runIds:u}:{},...r?.length?{contentIds:r}:{}}},[t,r,s,i]),p=d!=null;return t!=="me"&&a?e.jsxs("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:[e.jsx(L,{className:"mr-2"})," Loading…"]}):t!=="me"&&o==null?e.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"Couldn't resolve this workspace."}):p?e.jsx("div",{className:"px-4 py-4",children:e.jsx(_,{presentation:"detail",organizationId:o,ownerSlug:t,filters:d,emptyState:e.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:s!=null||i?.length?"No matching events from this run yet.":"No matching events yet."})})}):e.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"Nothing to preview."})}const K=25;function bs({target:t}){const[s,i]=f.useState(0),{data:r,isLoading:n,isError:a,refetch:c}=Qe(t.entityId,t.orgContext,{relationshipType:t.relationshipType,limit:K,offset:s}),o=r?.total;return e.jsxs("div",{className:"space-y-3 px-5 py-4",children:[e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.label," · ",t.entityName,o!==void 0?` · ${o} current ${o===1?"link":"links"}`:r?` · ${r.rows.length} shown`:""]}),e.jsx(Tt,{count:r?.failures?.length??0,onRetry:()=>void c()}),n?e.jsxs("div",{className:"space-y-2",children:[e.jsx(A,{className:"h-6 w-full"}),e.jsx(A,{className:"h-6 w-full"})]}):a||!r?e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Could not load these links."," ",e.jsx("button",{type:"button",className:"underline",onClick:()=>void c(),children:"Retry"})]}):r.rows.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No links on this page."}):e.jsx("ul",{className:"divide-y divide-border",children:r.rows.map(d=>e.jsx("li",{className:"flex items-center justify-between gap-3 py-1.5",children:e.jsx(Rt,{row:d,entityId:t.entityId,ownerSlug:t.ownerSlug})},d.id))}),r&&(s>0||r.hasMore)?e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(w,{type:"button",variant:"outline",size:"sm",disabled:s===0,onClick:()=>i(Math.max(0,s-K)),children:"Previous"}),e.jsxs("span",{className:"text-xs tabular-nums text-muted-foreground",children:[r.rows.length," shown",o===void 0?"":` of ${o}`]}),e.jsx(w,{type:"button",variant:"outline",size:"sm",disabled:!r.hasMore,onClick:()=>i(s+K),children:"Next"})]}):null]})}function me(){return e.jsxs("div",{className:"space-y-3 px-4 py-4",children:[e.jsx(A,{className:"h-5 w-2/3"}),e.jsx(A,{className:"h-4 w-full"}),e.jsx(A,{className:"h-24 w-full rounded-lg"})]})}function pe(){return e.jsx("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"This record is not available. It may have been deleted, or you may not have access to it."})}function xe({owner:t,path:s}){const i=I(),{data:r,isLoading:n,error:a}=q(`/${t}/${W(s)}`,{slug:t});if(n)return e.jsx(me,{});if(a||!r?.entity)return e.jsx(pe,{});const c=ae(r.workspace.slug,r.path.map(({entity_type:o,slug:d})=>({entity_type:o,slug:d})));return e.jsx("div",{className:"px-4 py-4",children:e.jsx(Mt,{pane:!0,namespace:r.workspace,entity:r.entity,recordUrl:c,onDeleted:()=>void i?.close()},c)})}function As({owner:t,entityId:s}){const i=I()?.retarget,{data:r,isError:n}=Ye({queryKey:["entity-path-segments",t,s],queryFn:()=>Je(s,{slug:t})}),a=r?ae(t,r):null;return f.useEffect(()=>{a&&i?.(a)},[a,i]),n?e.jsx(pe,{}):r?e.jsx(xe,{owner:t,path:Ze(r)}):e.jsx(me,{})}function Cs({owner:t,path:s,viewKey:i}){const[r,n]=f.useState({}),{data:a,isLoading:c}=R(t,{slug:t}),o=a?.workspace,d=o?.type==="organization"?o.id:null,p=d?{slug:t,organizationId:d}:void 0,{data:u,isLoading:x}=q(`/${t}/${W(s)}`,p),{isMember:N,isPublic:h,isLoading:y}=Xe(t),k=N||h,v=et({slug:t,organizationId:N?d:null}),m=u?.entity;if(c||x||y||k&&v.isLoading)return e.jsxs("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:[e.jsx(L,{className:"mr-2"})," Loading…"]});if(!k)return e.jsx(Bt,{});if(v.isError)return e.jsx(Ht,{onRetry:()=>void v.refetch()});const g=m?tt(v.data??[],{type:m.entity_type,id:m.id??m.slug}).find(S=>S.key===i):void 0;return!d||!m||!g?e.jsx("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"This view isn't attached to this record any more."}):e.jsx("div",{className:"px-4 py-4",children:e.jsx(Ut,{orgSlug:t,viewKey:g.key,scope:{type:m.entity_type,entity:m.is_derived?m.slug:m.id??m.slug},params:r,onParamsChange:n,paramDecls:g.params,contentHash:g.content_hash,title:g.name,minHeight:320})})}function he({owner:t,runId:s}){const i=st(t,s);if(t==="me")return null;if(i.isLoading)return e.jsx("p",{role:"status",className:"px-4 pt-4 text-xs text-muted-foreground",children:"Loading run…"});if(!i.data)return e.jsx("p",{role:"alert",className:"px-4 pt-4 text-sm text-destructive",children:"Could not load this run."});const r=i.data;return e.jsxs("section",{"aria-label":"Run outcome",className:"space-y-2 border-b px-4 py-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(Vt,{status:qt(r.status),children:r.status}),e.jsx("time",{dateTime:r.created_at,className:"text-xs text-muted-foreground",children:nt(r.created_at)})]}),r.connection_display_name?e.jsx("p",{className:"text-sm",children:r.connection_display_name}):null,r.error_message?e.jsx("p",{className:"whitespace-pre-wrap break-words text-sm text-destructive",children:r.error_message}):null,i.isError?e.jsx("p",{role:"alert",className:"text-xs text-destructive",children:"Could not refresh this run. Showing its last known outcome."}):null]})}const se=30;function $({label:t,children:s}){return e.jsxs("section",{className:"border-t px-4 py-3 first:border-t-0",children:[e.jsx("h3",{className:"mb-1.5 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:t}),s]})}function H({label:t,detail:s}){return e.jsxs("div",{className:"flex items-baseline gap-3 py-0.5 text-sm",children:[e.jsx("span",{className:"min-w-0 flex-1 truncate",children:t}),e.jsx("span",{className:"shrink-0 truncate text-xs text-muted-foreground",children:s})]})}function Ss({stretch:t,ownerSlug:s,connectorDefinitions:i,connectionName:r,sourceConnection:n,showEntity:a}){const c=I(),o=f.useMemo(()=>rt(t),[t]),d=f.useMemo(()=>it(t),[t]),[p,u]=f.useState(!1),[x,N]=f.useState(new Set),h=l=>e.jsx("li",{children:e.jsx(_t,{content:l,ownerSlug:s,connectorDefinitions:i,connectionName:r,showEntity:a})},l.id),y=l=>e.jsx("ul",{className:"-mx-1 divide-y overflow-hidden rounded-lg border",children:l.map(h)}),k=[...o.failedCalls.map(l=>l.content),...o.failedOperations.flatMap(l=>D(l)??[])],v=t.changes.flatMap(l=>D(l)??[]),m=[...t.calls.map(l=>l.content),...t.operations.flatMap(l=>D(l)??[])].sort((l,j)=>new Date(j.occurred_at).getTime()-new Date(l.occurred_at).getTime()),g=p?m:m.slice(0,se),S=(l,j)=>e.jsxs(w,{variant:"ghost",size:"sm",className:"mt-2",onClick:j,children:["Show all ",l]});if(t.source){const{source:l}=t,j=t.flagged.flatMap(b=>D(b)??[]),fe=d.reduce((b,Q)=>b+Q.items.length,0),z=n?.(l.connectionId)??null;return e.jsxs("div",{className:"pb-4",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-2 px-4 pt-3 pb-1 text-xs text-muted-foreground",children:[e.jsx("span",{children:l.name}),e.jsxs("span",{children:["· ",X(t)]}),e.jsxs("span",{children:["· ",ee(fe,"item")]}),j.length>0?e.jsxs("span",{children:["· ",j.length," failed"]}):null,z&&c?e.jsxs(w,{variant:"link",size:"sm",className:"h-auto p-0 text-xs",onClick:()=>c.open({href:`/${s}/connectors/${encodeURIComponent(z.connectorKey)}/${l.connectionId}`,key:`connection:${l.connectionId}`,title:l.name,connectorPanel:{section:"data",connectorKey:z.connectorKey,connectionId:l.connectionId,organizationId:z.organizationId,ownerSlug:s}}),children:["All data from ",l.name]}):null]}),j.length>0?e.jsx($,{label:`Failed · ${j.length}`,children:y(j)}):null,d.map(b=>{const Y=x.has(b.type)?b.items:b.items.slice(0,se);return e.jsxs($,{label:b.label,children:[y(Y),b.items.length>Y.length?S(b.items.length,()=>N(new Set([...x,b.type]))):null]},b.type)})]})}const E=o.did.reduce((l,j)=>l+j.count,0),C=o.lookedAt.reduce((l,j)=>l+j.count,0),P=t.apps.length===1?t.apps[0]:null,G=P?.key.startsWith("client:")?`/${s}/events?client_ids=${encodeURIComponent(P.key.slice(7))}`:P?.key.startsWith("agent:")?`/${s}/events?agent=${encodeURIComponent(P.key.slice(6))}`:null;return e.jsxs("div",{className:"pb-4",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-2 px-4 pt-3 pb-1 text-xs text-muted-foreground",children:[e.jsx("span",{children:Lt(t)}),e.jsxs("span",{children:["· ",X(t)]}),e.jsxs("span",{children:["· ",ee(t.calls.length,"call")]}),e.jsxs("span",{children:["· ",k.length," failed"]}),G&&P&&c?e.jsxs(w,{variant:"link",size:"sm",className:"h-auto p-0 text-xs",onClick:()=>c.open({href:G,title:P.name}),children:["All activity from ",P.name]}):null]}),k.length>0?e.jsx($,{label:`Failed · ${k.length}`,children:y(k)}):null,t.kind==="background"?null:e.jsxs($,{label:`Changed · ${v.length||o.changeSteps.reduce((l,j)=>l+j.count,0)}`,children:[v.length>0?y(v):null,o.changeSteps.map(l=>e.jsx(H,{label:l.title,detail:`${l.methods.join(" · ")} · ${l.count}`},l.title)),v.length===0&&o.changeSteps.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"Nothing changed."}):null]}),E>0?e.jsx($,{label:`Did · ${E}`,children:o.did.map(l=>e.jsx(H,{label:l.group,detail:l.items.length>0?l.items.slice(0,5).map(j=>`${j.item} ${j.count}`).join(" · ")+(l.items.length>5?` · ${l.items.length-5} more`:""):String(l.count)},l.group))}):null,C>0?e.jsx($,{label:`Looked at · ${C}`,children:o.lookedAt.map(l=>e.jsx(H,{label:l.title,detail:`${l.methods.join(" · ")} · ${l.count}`},l.title))}):null,e.jsxs($,{label:`Raw calls · ${m.length}`,children:[y(g),m.length>g.length?S(m.length,()=>u(!0)):null]})]})}function bn({item:t}){if(t.agentClients)return e.jsx(ht,{...t.agentClients});if(t.connectorPanel)return e.jsx(cs,{panel:t.connectorPanel});if(t.schemaSections)return e.jsx(B,{item:t});if(t.recordField)return e.jsx(Kt,{target:t.recordField});if(t.recordRef&&!t.href)return e.jsx(As,{...t.recordRef});if(t.recordLinks)return e.jsx(bs,{target:t.recordLinks});if(t.workStretch)return e.jsx(Ss,{...t.workStretch});if(typeof t.browserUrl=="string"&&t.browserUrl.length>0)return e.jsx(ne,{item:t});const s=t.href?at(t.href):null;return s?s.kind==="memory"?"runId"in s?e.jsxs(e.Fragment,{children:[e.jsx(he,{owner:s.owner,runId:s.runId}),e.jsx(V,{title:"What it produced",children:e.jsx(F,{owner:s.owner,runId:s.runId})})]}):"runIds"in s?e.jsx(F,{owner:s.owner,runIds:s.runIds}):e.jsx(F,{owner:s.owner,contentIds:s.contentIds}):s.kind==="entity"?e.jsx(xe,{owner:s.owner,path:s.path}):s.kind==="record-activity"?e.jsx(hs,{owner:s.owner,path:s.path}):s.kind==="entity-type"?e.jsx(js,{owner:s.owner,typeSlug:s.typeSlug,view:s.view}):s.kind==="record-view"?e.jsx(Cs,{owner:s.owner,path:s.path,viewKey:s.viewKey}):s.kind==="event"?e.jsx(ks,{owner:s.owner,eventId:s.eventId,viewKey:s.viewKey}):s.kind==="event-file"?e.jsx(vs,{owner:s.owner,eventId:s.eventId,fileKey:s.fileKey,page:s.page}):s.kind==="feed"?e.jsx(ws,{owner:s.owner,feedId:s.feedId,semanticTypes:s.semanticTypes}):s.kind==="agent"?e.jsx(xs,{owner:s.owner,name:t.title,agentId:s.agentId,clientIds:s.clientIds}):t.runId?e.jsx(Is,{owner:s.owner,automationId:s.automationId,runId:t.runId}):e.jsx(Ps,{owner:s.owner,automationId:s.automationId}):e.jsx(ne,{item:t})}function ne({item:t}){const s=t.body,i=t.notificationType??"generic",r=t.createdAt,n=t.browserUrl??null,a=t.browserHandoff??null;return e.jsxs("article",{className:"space-y-4 px-5 py-5",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ot,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 pt-0.5 text-xs text-muted-foreground",children:[e.jsx("span",{children:ct(i)}),r?e.jsx("span",{children:lt(r)}):null]})]}),s?e.jsx("div",{className:"text-sm leading-6 text-foreground/90",children:e.jsx(dt,{text:s,linkPolicy:i==="action_approval_needed"?"app-links":"strip"})}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"No additional details were provided."}),t.owner&&t.sourceAttribution?e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground/80",children:"Generated from"}),e.jsx(ut,{owner:t.owner,source:t.sourceAttribution,className:"text-xs"})]}):null,n?e.jsx("div",{className:"space-y-2",children:a?.state==="expired"?e.jsx("p",{className:"text-sm text-amber-700 dark:text-amber-300",children:a.error_message??"This draft expired before the page was opened."}):a?.state==="completed"||a?.state==="preparing"?e.jsx("p",{className:"text-sm text-muted-foreground",children:a.state==="preparing"?"Preparing draft — keep your browser tab open.":"Draft prepared — review and post in your browser."}):e.jsxs(w,{type:"button",size:"sm",className:"h-8 text-sm",onClick:()=>{pt(n)},children:[e.jsx(mt,{className:"mr-1.5 h-3.5 w-3.5"}),"Open post"]})}):null]})}function V({title:t,children:s}){return e.jsxs("section",{"aria-label":t,className:"border-b",children:[e.jsx("h2",{className:"px-4 pt-4 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:t}),s]})}function Is({owner:t,automationId:s,runId:i}){const{organizationId:r}=oe(t),n=le(s,void 0,r),a=xt(n.data?.automation);return e.jsxs(e.Fragment,{children:[e.jsx(he,{owner:t,runId:i}),e.jsx(V,{title:"What it produced",children:e.jsx(F,{owner:t,runId:i})}),a?e.jsx(V,{title:"How it ran",children:e.jsx(os,{agentId:a,automationId:s,ownerSlug:t,runId:i})}):n.isLoading?e.jsx(A,{className:"m-4 h-24 rounded-lg"}):null]})}function Ps({owner:t,automationId:s}){const{organizationId:i}=oe(t),r=le(s,void 0,i),n=ft(t,s,r.data?.automation);return e.jsxs("div",{className:"flex flex-col gap-4 px-4 py-4",children:[e.jsx(gt,{runNow:n}),e.jsx(jt,{owner:t,agentId:null,automationId:s,view:"activity",onDone:()=>{}})]})}export{bn as PeekPaneContent};
3
+ //# sourceMappingURL=peek-pane-content-ChsBWO0P.js.map
@@ -1,2 +1,2 @@
1
- import{j as a,B as l,i as u}from"./index-BoqrvLHQ.js";const c=({prompts:e,onPick:s,className:n})=>e.length===0?null:a.jsx("div",{className:u("flex flex-wrap gap-2",n),children:e.map(t=>a.jsx(l,{type:"button",variant:"outline",size:"sm",className:"h-auto rounded-full whitespace-normal px-3.5 py-1.5 text-left",title:t.message,"aria-label":`${t.title}: ${t.message}`,onClick:()=>s(t.message),children:t.title},`${t.title}\0${t.message}`))}),i=new Map;function d(e,s){const n=s.trim();n&&i.set(e,n)}function o(e){const s=i.get(e);return s===void 0?null:(i.delete(e),s)}export{c as P,d as s,o as t};
2
- //# sourceMappingURL=pending-seed-BBACroge.js.map
1
+ import{j as a,B as l,i as u}from"./index-DB2lVKuV.js";const c=({prompts:e,onPick:s,className:n})=>e.length===0?null:a.jsx("div",{className:u("flex flex-wrap gap-2",n),children:e.map(t=>a.jsx(l,{type:"button",variant:"outline",size:"sm",className:"h-auto rounded-full whitespace-normal px-3.5 py-1.5 text-left",title:t.message,"aria-label":`${t.title}: ${t.message}`,onClick:()=>s(t.message),children:t.title},`${t.title}\0${t.message}`))}),i=new Map;function d(e,s){const n=s.trim();n&&i.set(e,n)}function o(e){const s=i.get(e);return s===void 0?null:(i.delete(e),s)}export{c as P,d as s,o as t};
2
+ //# sourceMappingURL=pending-seed-CTKYdA4X.js.map
@@ -0,0 +1,2 @@
1
+ import{h7 as f,h8 as w,h9 as y,ha as C,r as N,j as e,a9 as P,B as d,$ as k,fO as A}from"./index-DB2lVKuV.js";function T({resource:g,runId:r,children:h,onDone:l}){const c=!!r,{data:a,isLoading:E,isError:u,refetch:v}=f(g,c?r:void 0),s=w({isReview:c,isError:u,status:a?.status}),m=a?.status==="pending"?a.proposal:null,n=y(),i=C(),[p,x]=N.useState(""),o=n.isPending||i.isPending,j=s==="active"||s==="loading"||s==="error",b=()=>{r&&n.mutate({run_id:r},{onSuccess:()=>l?.()})},R=()=>{if(!r)return;const t=p.trim();i.mutate({run_id:r,...t?{reason:t}:{}},{onSuccess:()=>l?.()})};return e.jsxs("div",{className:"grid content-start gap-4",children:[s==="active"?e.jsx("div",{className:"rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-950 dark:border-amber-900/60 dark:bg-amber-950/30 dark:text-amber-100",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(P,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsxs("p",{children:["Review the change the builder agent proposed. Compare Current and Proposed, then ",e.jsx("strong",{children:"Approve"})," to apply, or"," ",e.jsx("strong",{children:"Reject"}),"."]})]})}):null,s==="gone"?e.jsx("div",{className:"rounded-lg border bg-muted/30 p-3 text-sm text-muted-foreground",children:"This change is no longer pending (it may have been approved or rejected already)."}):null,s==="error"?e.jsx("div",{className:"rounded-lg border border-destructive/40 bg-destructive/5 p-3 text-sm",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsx("p",{className:"text-destructive",children:"Couldn't load the proposed change to review. Editing is disabled until it loads — retry, or reopen the link."}),e.jsx(d,{type:"button",variant:"outline",size:"sm",onClick:()=>void v(),children:"Retry"})]})}):null,h({reviewMode:s,proposal:m,controlsDisabled:j}),s==="active"?e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:"review-reject-reason",children:"Reason (optional)"}),e.jsx(A,{id:"review-reject-reason",rows:2,value:p,onChange:t=>x(t.target.value),placeholder:"Why you're rejecting — shared back to the requester.",disabled:o})]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:justify-end",children:[e.jsx(d,{type:"button",variant:"outline",onClick:R,disabled:o,children:i.isPending?"Rejecting...":"Reject"}),e.jsx(d,{type:"button",onClick:b,disabled:o,children:n.isPending?"Approving...":"Approve"})]})]}):null]})}export{T as P};
2
+ //# sourceMappingURL=proposal-review-shell-EyGWEYwQ.js.map
@@ -0,0 +1,2 @@
1
+ import{r as e,eE as l}from"./index-DB2lVKuV.js";function a(){return e.useEffect(()=>{l()},[]),null}export{a as P};
2
+ //# sourceMappingURL=public-shell-ready-_KWdfzEM.js.map
@@ -0,0 +1,2 @@
1
+ import{r as n,j as u}from"./index-DB2lVKuV.js";function i(){const t=new Map,o=new Set,s=()=>{for(const e of o)e()};return{get:e=>t.get(e),set:e=>{t.get(e.entity.id)!==e&&(t.set(e.entity.id,e),s())},remove:e=>{t.delete(e)&&s()},subscribe:e=>(o.add(e),()=>o.delete(e))}}const r=n.createContext(null);function f({children:t}){const[o]=n.useState(i);return u.jsx(r.Provider,{value:o,children:t})}function x(t,o=!0){const s=n.useContext(r),e=o?s:null;n.useLayoutEffect(()=>{e?.set(t)});const c=t.entity.id;n.useEffect(()=>()=>e?.remove(c),[e,c])}const a=()=>()=>{};function S(t){const o=n.useContext(r);return n.useSyncExternalStore(o?.subscribe??a,()=>o?.get(t),()=>o?.get(t))}export{f as R,x as a,S as u};
2
+ //# sourceMappingURL=record-session-D27VNxP_.js.map