@lobu/runtime-server 24.4.0 → 24.5.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 (279) hide show
  1. package/dist/catalogs/skills.json +2 -2
  2. package/dist/component.json +1 -1
  3. package/dist/connectors/postgres.ts +77 -48
  4. package/dist/dependencies.bun.lock +86 -117
  5. package/dist/owletto/dist/assets/_-CCWuGXtQ.js +2 -0
  6. package/dist/owletto/dist/assets/_-DOJW1D-I.js +3 -0
  7. package/dist/owletto/dist/assets/_agentId-CJhQbi6k.js +2 -0
  8. package/dist/owletto/dist/assets/_agentId-DD4K1i6V.js +2 -0
  9. package/dist/owletto/dist/assets/_automationId-Cbd7B0mP.js +2 -0
  10. package/dist/owletto/dist/assets/_connectorKey._connectionId-DFpPep9B.js +2 -0
  11. package/dist/owletto/dist/assets/_connectorKey.index-n3iSDT74.js +2 -0
  12. package/dist/owletto/dist/assets/_conversationId-B1yGIGA9.js +2 -0
  13. package/dist/owletto/dist/assets/_eventId-B1H0-vD7.js +2 -0
  14. package/dist/owletto/dist/assets/_name-D30_V03t.js +2 -0
  15. package/dist/owletto/dist/assets/_owner-Be8O41u8.js +3 -0
  16. package/dist/owletto/dist/assets/_shape-C6YbloRh.js +2 -0
  17. package/dist/owletto/dist/assets/_skillKey-BMPvvoOI.js +2 -0
  18. package/dist/owletto/dist/assets/_slug-Bc4YIEA2.js +2 -0
  19. package/dist/owletto/dist/assets/_view-aoFDwEld.js +2 -0
  20. package/dist/owletto/dist/assets/_viewKey-DuNHc3cc.js +2 -0
  21. package/dist/owletto/dist/assets/_viewKey-rJ7A1zNx.js +2 -0
  22. package/dist/owletto/dist/assets/accept-invitation-pUl-c1KQ.js +2 -0
  23. package/dist/owletto/dist/assets/activity-route-view-DN0ZEAzr.js +2 -0
  24. package/dist/owletto/dist/assets/{agent-card-controls-99mG6H5k.js → agent-card-controls-C5jNWgfq.js} +2 -2
  25. package/dist/owletto/dist/assets/{agent-client-setup-list-kMmqQSrf.js → agent-client-setup-list-DbXtJTsO.js} +2 -2
  26. package/dist/owletto/dist/assets/agent-connect-pages-DcTuiSt9.js +2 -0
  27. package/dist/owletto/dist/assets/agent-editor-form-CdA5vLr8.js +2 -0
  28. package/dist/owletto/dist/assets/agent-guardrails-route-BJyfalBY.js +2 -0
  29. package/dist/owletto/dist/assets/agent-list-row-rF5LH-3k.js +2 -0
  30. package/dist/owletto/dist/assets/{agent-loading-shells-Dnmb6W5Y.js → agent-loading-shells-ClY_O6lb.js} +2 -2
  31. package/dist/owletto/dist/assets/{agent-permissions-matrix-CbhXlbgY.js → agent-permissions-matrix-bP1Qihv7.js} +2 -2
  32. package/dist/owletto/dist/assets/{agent-skill-context-V__2i6Vl.js → agent-skill-context-BAaGpvfS.js} +2 -2
  33. package/dist/owletto/dist/assets/agent-skills-route-Bv5luNdw.js +2 -0
  34. package/dist/owletto/dist/assets/agent-tab-intro-ednTs4WF.js +2 -0
  35. package/dist/owletto/dist/assets/agent-thread-WNk2HapT.js +6 -0
  36. package/dist/owletto/dist/assets/agent-thread-storage-U6htL3ad.js +2 -0
  37. package/dist/owletto/dist/assets/agents-DY2S2SGE.js +2 -0
  38. package/dist/owletto/dist/assets/agents-workbench-bPTjdVS1.js +2 -0
  39. package/dist/owletto/dist/assets/app._appId-DrL5H5lB.js +2 -0
  40. package/dist/owletto/dist/assets/assist-composer-ClfFEVx7.js +2 -0
  41. package/dist/owletto/dist/assets/automation-detail-content-dFy1Huas.js +2 -0
  42. package/dist/owletto/dist/assets/automation-row-DCHM--aD.js +2 -0
  43. package/dist/owletto/dist/assets/automations-DY2S2SGE.js +2 -0
  44. package/dist/owletto/dist/assets/{calendar-DMq3Dtqy.js → calendar-Ck0yOLYu.js} +2 -2
  45. package/dist/owletto/dist/assets/{callback-B-CAz-bK.js → callback-DRABUOha.js} +2 -2
  46. package/dist/owletto/dist/assets/{card-SFtxv9f2.js → card-Bdi7VEwo.js} +2 -2
  47. package/dist/owletto/dist/assets/change-summary-PBoM6Asb.js +2 -0
  48. package/dist/owletto/dist/assets/{claim-DrxIRWKt.js → claim-CUIG1Oc-.js} +2 -2
  49. package/dist/owletto/dist/assets/{client-activity-scopes-boZOHuPW.js → client-activity-scopes-CXOWB5co.js} +2 -2
  50. package/dist/owletto/dist/assets/{client-rows-BJ2PxM4J.js → client-rows-36VnmgMK.js} +2 -2
  51. package/dist/owletto/dist/assets/{clients-C7Lnuc3S.js → clients-BJRcMk1A.js} +2 -2
  52. package/dist/owletto/dist/assets/code-editor-DNuRKde1.js +16 -0
  53. package/dist/owletto/dist/assets/connect-CMcEQWls.js +2 -0
  54. package/dist/owletto/dist/assets/connect-menu-C-B-1xGR.js +2 -0
  55. package/dist/owletto/dist/assets/connect._clientId-tGipxP5a.js +2 -0
  56. package/dist/owletto/dist/assets/connected._clientId-DSGU78eV.js +2 -0
  57. package/dist/owletto/dist/assets/connected._clientId.activity-CPLbry8R.js +2 -0
  58. package/dist/owletto/dist/assets/connected._clientId.index-jSnGvzYs.js +2 -0
  59. package/dist/owletto/dist/assets/{connection-feed-detail-D7pnWaFB.js → connection-feed-detail-BIlkK0Pd.js} +2 -2
  60. package/dist/owletto/dist/assets/connection-q1bdnxCN.js +2 -0
  61. package/dist/owletto/dist/assets/{connections-browser-DDJQh8Na.js → connections-browser-V-3td9DB.js} +2 -2
  62. package/dist/owletto/dist/assets/{connector-boxes-DDX7Ebc4.js → connector-boxes-lFc-WP83.js} +2 -2
  63. package/dist/owletto/dist/assets/connector-page-shell-Cs1SjrYB.js +2 -0
  64. package/dist/owletto/dist/assets/connector-provenance-aJFeeRIC.js +2 -0
  65. package/dist/owletto/dist/assets/{connector-scope-lists-BibdzKl1.js → connector-scope-lists--vNdbOn0.js} +2 -2
  66. package/dist/owletto/dist/assets/connectors-BsvDMdsQ.js +2 -0
  67. package/dist/owletto/dist/assets/consent-DJV78pnz.js +2 -0
  68. package/dist/owletto/dist/assets/copy-button-DjMWgrBf.js +2 -0
  69. package/dist/owletto/dist/assets/{core.esm-CHnfRiEM.js → core.esm-CQzL3ObT.js} +3 -3
  70. package/dist/owletto/dist/assets/create-BmKx5vq3.js +2 -0
  71. package/dist/owletto/dist/assets/create-Rt0RbiD4.js +2 -0
  72. package/dist/owletto/dist/assets/create-automation-form-PEmSLMD6.js +3 -0
  73. package/dist/owletto/dist/assets/create-jBEuveV1.js +2 -0
  74. package/dist/owletto/dist/assets/create._connectorKey-DcxhYIYC.js +2 -0
  75. package/dist/owletto/dist/assets/device-Ba3RsIgb.js +2 -0
  76. package/dist/owletto/dist/assets/device-pin-tombstone-C79KIAIK.js +2 -0
  77. package/dist/owletto/dist/assets/device._deviceId-CIaoq9co.js +2 -0
  78. package/dist/owletto/dist/assets/{entity-avatar-HloBoalJ.js → entity-avatar-TVKjZxWQ.js} +2 -2
  79. package/dist/owletto/dist/assets/entity-options-daOOQo7O.js +2 -0
  80. package/dist/owletto/dist/assets/entity-page-BfJXvbxn.js +2 -0
  81. package/dist/owletto/dist/assets/entity-type-page-BLwH6qa7.js +2 -0
  82. package/dist/owletto/dist/assets/event-card-DVUB8my6.js +2 -0
  83. package/dist/owletto/dist/assets/event-detail-DkY95e5b.js +2 -0
  84. package/dist/owletto/dist/assets/{events-feed-BysC9HgU.js → events-feed-B9CZHI_P.js} +2 -2
  85. package/dist/owletto/dist/assets/filter-bar-wPaR12SS.js +2 -0
  86. package/dist/owletto/dist/assets/{full-page-spinner-BMiXl54z.js → full-page-spinner-BqmckkOf.js} +2 -2
  87. package/dist/owletto/dist/assets/guardrails-Csusrok2.js +2 -0
  88. package/dist/owletto/dist/assets/identity-Dmg3STO8.js +2 -0
  89. package/dist/owletto/dist/assets/index--ZWegctR.js +2 -0
  90. package/dist/owletto/dist/assets/{index-CzoK57xp.js → index-B0kw2lFL.js} +2 -2
  91. package/dist/owletto/dist/assets/index-BKrdVwW9.js +2 -0
  92. package/dist/owletto/dist/assets/index-BUBcNNUY.js +2 -0
  93. package/dist/owletto/dist/assets/index-BUDr4-Yv.js +2 -0
  94. package/dist/owletto/dist/assets/index-BYPQWVwD.js +2 -0
  95. package/dist/owletto/dist/assets/index-BfpaPJPj.js +2 -0
  96. package/dist/owletto/dist/assets/index-BicNFLBW.js +2 -0
  97. package/dist/owletto/dist/assets/index-Bsdv5aks.js +2 -0
  98. package/dist/owletto/dist/assets/index-C186T2Rw.js +53 -0
  99. package/dist/owletto/dist/assets/index-CX0pJ9j9.js +2 -0
  100. package/dist/owletto/dist/assets/{index-B4wXJwQY.js → index-CsrT07TJ.js} +2 -2
  101. package/dist/owletto/dist/assets/index-DdBTTN3y.js +7899 -0
  102. package/dist/owletto/dist/assets/index-DdYWarql.css +1 -0
  103. package/dist/owletto/dist/assets/index-JYEIN8nM.js +2 -0
  104. package/dist/owletto/dist/assets/index-Vcq4gwWv.js +2 -0
  105. package/dist/owletto/dist/assets/{index-C-WaHj1Y.js → index-ijqrJaRB.js} +2 -2
  106. package/dist/owletto/dist/assets/{index-D4-uel59.js → index-ikp_mTsf.js} +2 -2
  107. package/dist/owletto/dist/assets/json-diff-BaLL4Fsu.js +14 -0
  108. package/dist/owletto/dist/assets/{list-skeleton-Bp4HNgJ9.js → list-skeleton-CXDLkYTg.js} +2 -2
  109. package/dist/owletto/dist/assets/login-u6LCgDYG.js +2 -0
  110. package/dist/owletto/dist/assets/{logout-DxmfsVKD.js → logout-JhmuWJEH.js} +2 -2
  111. package/dist/owletto/dist/assets/manage-gear-D8LMhehh.js +2 -0
  112. package/dist/owletto/dist/assets/{member-scope-gate-vp3FihBD.js → member-scope-gate-4FQ0aanZ.js} +2 -2
  113. package/dist/owletto/dist/assets/memory-browse-page-CNZJbCJC.js +74 -0
  114. package/dist/owletto/dist/assets/model-jL871x2J.js +2 -0
  115. package/dist/owletto/dist/assets/model-selector-CgU8SJMF.js +2 -0
  116. package/dist/owletto/dist/assets/models-jdemgIZk.js +2 -0
  117. package/dist/owletto/dist/assets/nav-pill-DrFkuyUQ.js +2 -0
  118. package/dist/owletto/dist/assets/new-CcJOd5aH.js +2 -0
  119. package/dist/owletto/dist/assets/{new-CvX8_gIb.js → new-DgE1pVV0.js} +2 -2
  120. package/dist/owletto/dist/assets/new-OWwrYckd.js +2 -0
  121. package/dist/owletto/dist/assets/organization-CKM_oFX3.js +2 -0
  122. package/dist/owletto/dist/assets/peek-pane-content-D68BjguQ.js +2 -0
  123. package/dist/owletto/dist/assets/pending-seed-sml8Uf6e.js +2 -0
  124. package/dist/owletto/dist/assets/permissions-BvA9SATv.js +2 -0
  125. package/dist/owletto/dist/assets/{proposal-review-shell-B4CSiyLB.js → proposal-review-shell-D6KABxah.js} +2 -2
  126. package/dist/owletto/dist/assets/public-shell-ready-BIVCHQHe.js +2 -0
  127. package/dist/owletto/dist/assets/record-activity-C9gVBbF0.js +2 -0
  128. package/dist/owletto/dist/assets/{record-session-CWXnCVln.js → record-session-R-uHNuby.js} +2 -2
  129. package/dist/owletto/dist/assets/{renderer-7EGgTVX0.js → renderer-DXfJaCCa.js} +23 -23
  130. package/dist/owletto/dist/assets/{reset-password-CFUzxH7m.js → reset-password-Mx3baeNc.js} +2 -2
  131. package/dist/owletto/dist/assets/run-activity-link-CaIBSRQj.js +2 -0
  132. package/dist/owletto/dist/assets/run-initiator-BvzQJYW9.js +2 -0
  133. package/dist/owletto/dist/assets/{runs-BPtQBTRN.js → runs-fFJ1lPnw.js} +2 -2
  134. package/dist/owletto/dist/assets/runs-panel-DEnZHTa5.js +2 -0
  135. package/dist/owletto/dist/assets/runs-table-XGnxJl7S.js +2 -0
  136. package/dist/owletto/dist/assets/{schema-type-editor-panel-CAhOB648.js → schema-type-editor-panel-C0_9VcSs.js} +2 -2
  137. package/dist/owletto/dist/assets/settings-CP4PjMQA.js +2 -0
  138. package/dist/owletto/dist/assets/settings-CgaUJMHH.js +2 -0
  139. package/dist/owletto/dist/assets/skills-D-e_h3a9.js +2 -0
  140. package/dist/owletto/dist/assets/{source-record-panels-Bh5F4C5K.js → source-record-panels-Bh0n4gGw.js} +2 -2
  141. package/dist/owletto/dist/assets/{status-dot-D3FoDRcc.js → status-dot-Cpq63I7p.js} +2 -2
  142. package/dist/owletto/dist/assets/{table-DFcJRNk7.js → table-BUqshjxa.js} +2 -2
  143. package/dist/owletto/dist/assets/{use-automations-BHoV0dLs.js → use-automations-BLNjxq2K.js} +2 -2
  144. package/dist/owletto/dist/assets/use-login-redirect-CmyQW7GT.js +2 -0
  145. package/dist/owletto/dist/assets/{use-mention-search-C3rWLuKm.js → use-mention-search-dn3ws1WB.js} +3 -3
  146. package/dist/owletto/dist/assets/use-scroll-sentinel-DRyBMueA.js +2 -0
  147. package/dist/owletto/dist/assets/view-param-filters-CER47Tlz.js +2 -0
  148. package/dist/owletto/dist/assets/{views-access-required-DHrDO333.js → views-access-required-C_b9itZ2.js} +2 -2
  149. package/dist/owletto/dist/index.html +2 -2
  150. package/dist/server-main.bundle.mjs +53989 -51632
  151. package/dist/server.bundle.mjs +5 -5
  152. package/dist/verify.mjs +1 -1
  153. package/npm-shrinkwrap.json +183 -217
  154. package/package.json +3 -4
  155. package/vendor/connector-sdk/dist/reaction-client-types.d.ts +8 -2
  156. package/vendor/connector-sdk/dist/reaction-sdk.d.ts +5 -1
  157. package/vendor/connector-sdk/package.json +1 -1
  158. package/vendor/core/dist/contracts/agent-settings.d.ts +61 -6
  159. package/vendor/core/dist/contracts/agent-settings.js +10 -7
  160. package/vendor/core/dist/contracts/tools/manage-agents.d.ts +473 -98
  161. package/vendor/core/dist/contracts/tools/manage-agents.js +111 -2
  162. package/vendor/core/dist/contracts/tools/manage-automations.d.ts +21 -18
  163. package/vendor/core/dist/contracts/tools/manage-automations.js +15 -15
  164. package/vendor/core/dist/contracts/tools/manage-entity-schema.js +2 -2
  165. package/vendor/core/dist/contracts/tools/manage-inference-providers.d.ts +445 -0
  166. package/vendor/core/dist/contracts/tools/manage-inference-providers.js +133 -0
  167. package/vendor/core/dist/contracts/tools/manage-views.d.ts +4 -4
  168. package/vendor/core/dist/contracts/tools/manage-views.js +5 -3
  169. package/vendor/core/dist/contracts/worker/device-automation.js +4 -2
  170. package/vendor/core/dist/error-report.d.ts +73 -0
  171. package/vendor/core/dist/error-report.js +346 -0
  172. package/vendor/core/dist/index.d.ts +3 -1
  173. package/vendor/core/dist/index.js +4 -1
  174. package/vendor/core/dist/logger.js +7 -4
  175. package/vendor/core/dist/otel-fetch.d.ts +19 -0
  176. package/vendor/core/dist/otel-fetch.js +96 -0
  177. package/vendor/core/dist/otel.d.ts +9 -0
  178. package/vendor/core/dist/otel.js +28 -7
  179. package/vendor/core/dist/reserved.d.ts +1 -1
  180. package/vendor/core/dist/reserved.js +6 -4
  181. package/vendor/core/dist/tool-result.d.ts +8 -0
  182. package/vendor/core/dist/tool-result.js +61 -0
  183. package/vendor/core/dist/utils/diagnostic-scrubber.js +1 -1
  184. package/vendor/core/dist/worker/auth.js +4 -0
  185. package/vendor/core/package.json +6 -1
  186. package/vendor/views/package.json +1 -1
  187. package/dist/owletto/dist/assets/_-DIK0ae_S.js +0 -2
  188. package/dist/owletto/dist/assets/_-gTbcArpS.js +0 -3
  189. package/dist/owletto/dist/assets/_agentId-DOmcJZfk.js +0 -2
  190. package/dist/owletto/dist/assets/_agentId-DW6wRCVC.js +0 -2
  191. package/dist/owletto/dist/assets/_automationId-B9IcDYBu.js +0 -2
  192. package/dist/owletto/dist/assets/_connectorKey._connectionId-C6PmMPTA.js +0 -2
  193. package/dist/owletto/dist/assets/_connectorKey.index-BrJ8Pzze.js +0 -2
  194. package/dist/owletto/dist/assets/_conversationId-BpJAeYYW.js +0 -2
  195. package/dist/owletto/dist/assets/_eventId-DarQJo0G.js +0 -2
  196. package/dist/owletto/dist/assets/_name-DtmNTcUm.js +0 -2
  197. package/dist/owletto/dist/assets/_owner-Db8at3hk.js +0 -3
  198. package/dist/owletto/dist/assets/_shape-6iFA8A86.js +0 -2
  199. package/dist/owletto/dist/assets/_skillKey-CXkHn3Nl.js +0 -2
  200. package/dist/owletto/dist/assets/_slug-DBOuBLoX.js +0 -2
  201. package/dist/owletto/dist/assets/_viewKey-DC27aIN9.js +0 -2
  202. package/dist/owletto/dist/assets/_viewKey-DuYDieln.js +0 -2
  203. package/dist/owletto/dist/assets/accept-invitation-BbDCVvur.js +0 -2
  204. package/dist/owletto/dist/assets/activity-route-view-V4ftmSN7.js +0 -2
  205. package/dist/owletto/dist/assets/agent-connect-pages-B-NPTFs6.js +0 -2
  206. package/dist/owletto/dist/assets/agent-editor-form-DfMTSIvj.js +0 -2
  207. package/dist/owletto/dist/assets/agent-guardrails-route-BvGgfd-h.js +0 -2
  208. package/dist/owletto/dist/assets/agent-skills-route-DFXr_bHp.js +0 -2
  209. package/dist/owletto/dist/assets/agent-subpage-shell-DWzljvFb.js +0 -2
  210. package/dist/owletto/dist/assets/agent-thread-DQIr20H-.js +0 -6
  211. package/dist/owletto/dist/assets/agents-CLbeiqTR.js +0 -2
  212. package/dist/owletto/dist/assets/agents-workbench-C8bTa2rv.js +0 -2
  213. package/dist/owletto/dist/assets/app._appId-Bsq40nak.js +0 -2
  214. package/dist/owletto/dist/assets/automation-detail-content-C9Cgr5Zj.js +0 -2
  215. package/dist/owletto/dist/assets/automations-CLbeiqTR.js +0 -2
  216. package/dist/owletto/dist/assets/code-editor-rX0t1g5C.js +0 -16
  217. package/dist/owletto/dist/assets/connect-BcwgytDV.js +0 -2
  218. package/dist/owletto/dist/assets/connect-menu-BF-AlunU.js +0 -2
  219. package/dist/owletto/dist/assets/connect._clientId-sDypRDeN.js +0 -2
  220. package/dist/owletto/dist/assets/connected._clientId-C9OkW1tv.js +0 -2
  221. package/dist/owletto/dist/assets/connected._clientId.activity-Dc6HYr55.js +0 -2
  222. package/dist/owletto/dist/assets/connected._clientId.index-C6qbqgwF.js +0 -2
  223. package/dist/owletto/dist/assets/connection-88YzIBK9.js +0 -2
  224. package/dist/owletto/dist/assets/connector-provenance-Th8ymGec.js +0 -2
  225. package/dist/owletto/dist/assets/connectors-BqwgLUUK.js +0 -2
  226. package/dist/owletto/dist/assets/consent-BR5U7dwb.js +0 -2
  227. package/dist/owletto/dist/assets/copy-button-2swYh4jb.js +0 -2
  228. package/dist/owletto/dist/assets/create-BsPVnRpG.js +0 -2
  229. package/dist/owletto/dist/assets/create-CVPYVOR5.js +0 -2
  230. package/dist/owletto/dist/assets/create-QFjmhOEU.js +0 -2
  231. package/dist/owletto/dist/assets/create-automation-form-DmCOFbRT.js +0 -3
  232. package/dist/owletto/dist/assets/create._connectorKey-DLDDVtLS.js +0 -2
  233. package/dist/owletto/dist/assets/cronstrue-CKwjNYgj.js +0 -2
  234. package/dist/owletto/dist/assets/device-CKup7kvB.js +0 -2
  235. package/dist/owletto/dist/assets/device-pin-tombstone-xGhCTU5_.js +0 -2
  236. package/dist/owletto/dist/assets/device._deviceId-B1H_ivDT.js +0 -2
  237. package/dist/owletto/dist/assets/entity-options-BSW_EG0W.js +0 -2
  238. package/dist/owletto/dist/assets/entity-page-D-WDWrAe.js +0 -2
  239. package/dist/owletto/dist/assets/entity-type-page-BCBdFndu.js +0 -2
  240. package/dist/owletto/dist/assets/event-card-Mcxv56DG.js +0 -2
  241. package/dist/owletto/dist/assets/event-detail-DXifj49J.js +0 -2
  242. package/dist/owletto/dist/assets/filter-bar-BQm-ubB1.js +0 -2
  243. package/dist/owletto/dist/assets/guardrails-D7W80sJO.js +0 -2
  244. package/dist/owletto/dist/assets/identity-N0cAO9BR.js +0 -2
  245. package/dist/owletto/dist/assets/index-4gCDI7m4.js +0 -7950
  246. package/dist/owletto/dist/assets/index-BNaI5GpS.js +0 -2
  247. package/dist/owletto/dist/assets/index-BUUrHuJJ.js +0 -2
  248. package/dist/owletto/dist/assets/index-BqrvJmLh.js +0 -2
  249. package/dist/owletto/dist/assets/index-CnvQEA5V.js +0 -2
  250. package/dist/owletto/dist/assets/index-Cq7P2c_E.js +0 -2
  251. package/dist/owletto/dist/assets/index-D3omC3Us.js +0 -2
  252. package/dist/owletto/dist/assets/index-DDGdlQrt.css +0 -1
  253. package/dist/owletto/dist/assets/index-DFEW7hMg.js +0 -2
  254. package/dist/owletto/dist/assets/index-DVV-WWuT.js +0 -2
  255. package/dist/owletto/dist/assets/index-DduQ_e9q.js +0 -2
  256. package/dist/owletto/dist/assets/index-DutlI1d-.js +0 -2
  257. package/dist/owletto/dist/assets/index-wHFQv1aT.js +0 -12
  258. package/dist/owletto/dist/assets/json-diff-E5D-NGYT.js +0 -4
  259. package/dist/owletto/dist/assets/login-7F48UJGx.js +0 -2
  260. package/dist/owletto/dist/assets/memory-browse-page-CfDmjhDl.js +0 -74
  261. package/dist/owletto/dist/assets/model-Dn40BUzs.js +0 -2
  262. package/dist/owletto/dist/assets/model-selector-88PJnyTq.js +0 -2
  263. package/dist/owletto/dist/assets/models-BBK_n2RP.js +0 -2
  264. package/dist/owletto/dist/assets/new-4ruWHLR5.js +0 -2
  265. package/dist/owletto/dist/assets/new-gMD1PHTL.js +0 -2
  266. package/dist/owletto/dist/assets/oauth-workspace-access-D9BNmyMY.js +0 -2
  267. package/dist/owletto/dist/assets/organization-BHcp5Pzg.js +0 -2
  268. package/dist/owletto/dist/assets/peek-pane-content-0sa10jER.js +0 -2
  269. package/dist/owletto/dist/assets/permissions-hhxosugv.js +0 -2
  270. package/dist/owletto/dist/assets/public-shell-ready-CsenJeXa.js +0 -2
  271. package/dist/owletto/dist/assets/record-activity-D7bRaMk2.js +0 -2
  272. package/dist/owletto/dist/assets/runs-panel-Bj63_hb9.js +0 -2
  273. package/dist/owletto/dist/assets/settings-Dg6nxKyw.js +0 -2
  274. package/dist/owletto/dist/assets/settings-KJJ6WihO.js +0 -2
  275. package/dist/owletto/dist/assets/skills-ayt06_o2.js +0 -2
  276. package/dist/owletto/dist/assets/use-scroll-sentinel-Ct-jt7O0.js +0 -2
  277. package/dist/owletto/dist/assets/view-param-filters-mKoqDsaD.js +0 -2
  278. /package/vendor/@better-auth-kysely-adapter/{.bun-tag-abf95749a412716 → .bun-tag-654b3a002b271269} +0 -0
  279. /package/vendor/postgres/{.bun-tag-22d644c2873790db → .bun-tag-c81dacd34e959a7a} +0 -0
@@ -1,2 +1,2 @@
1
- import{a1 as v,r as a,j as e,L as h,a2 as j,Q as y,a3 as N}from"./index-4gCDI7m4.js";import{C as k,a as C,b as S,c as L}from"./card-SFtxv9f2.js";function R(){const{token:n,error:x}=v.useSearch(),[o,p]=a.useState(""),[i,f]=a.useState(""),[d,s]=a.useState(null),[l,c]=a.useState(!1),[u,g]=a.useState(!1),w=async t=>{if(t.preventDefault(),!n){s("This reset link is invalid or expired.");return}if(o.length<8){s("Password must be at least 8 characters.");return}if(o!==i){s("Passwords do not match.");return}c(!0),s(null);try{const r=await j(`${y}/api/auth/reset-password`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({token:n,newPassword:o})});if(!r.ok)throw await N(r);g(!0)}catch(r){s(r instanceof Error?r.message:"Failed to reset password")}finally{c(!1)}},b=!n||x==="INVALID_TOKEN",m={callbackUrl:void 0,mode:void 0,error:void 0,errorDescription:void 0,loginHint:void 0,invitationOrg:void 0,intent:void 0};return e.jsx("div",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center",children:e.jsxs("div",{className:"w-full max-w-md p-8",children:[e.jsx("img",{src:"/lobu-logo.svg",alt:"Lobu",className:"mx-auto mb-6 h-8 w-auto"}),e.jsxs(k,{children:[e.jsx(C,{children:e.jsx(S,{asChild:!0,children:e.jsx("h1",{className:"text-center text-2xl",children:"Reset your password"})})}),e.jsx(L,{children:b&&!u?e.jsxs("div",{className:"mt-6 space-y-4 text-center",children:[e.jsx("p",{className:"text-sm text-destructive",children:"This reset link is invalid or expired."}),e.jsx(h,{to:"/auth/login",search:m,className:"text-sm text-primary hover:underline",children:"Back to sign in"})]}):u?e.jsxs("div",{className:"mt-6 space-y-4 text-center",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your password has been reset successfully."}),e.jsx(h,{to:"/auth/login",search:m,className:"text-sm text-primary hover:underline",children:"Continue to sign in"})]}):e.jsxs("form",{onSubmit:w,className:"mt-6 space-y-4",children:[d&&e.jsx("div",{className:"p-3 text-sm text-destructive bg-destructive/10 rounded-lg",children:d}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"new-password",className:"block text-sm font-medium",children:"New password"}),e.jsx("input",{id:"new-password",type:"password",value:o,onChange:t=>p(t.target.value),minLength:8,required:!0,className:"mt-1 block h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"confirm-password",className:"block text-sm font-medium",children:"Confirm new password"}),e.jsx("input",{id:"confirm-password",type:"password",value:i,onChange:t=>f(t.target.value),minLength:8,required:!0,className:"mt-1 block h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})]}),e.jsx("button",{type:"submit",disabled:l,className:"flex h-10 w-full items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 disabled:opacity-50",children:l?"Resetting password...":"Reset password"})]})})]})]})})}export{R as component};
2
- //# sourceMappingURL=reset-password-CFUzxH7m.js.map
1
+ import{a2 as v,r as a,j as e,L as h,a3 as j,Q as y,a4 as N}from"./index-DdBTTN3y.js";import{C as k,a as C,b as S,c as L}from"./card-Bdi7VEwo.js";function R(){const{token:n,error:x}=v.useSearch(),[o,p]=a.useState(""),[i,f]=a.useState(""),[d,s]=a.useState(null),[l,c]=a.useState(!1),[u,g]=a.useState(!1),w=async t=>{if(t.preventDefault(),!n){s("This reset link is invalid or expired.");return}if(o.length<8){s("Password must be at least 8 characters.");return}if(o!==i){s("Passwords do not match.");return}c(!0),s(null);try{const r=await j(`${y}/api/auth/reset-password`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({token:n,newPassword:o})});if(!r.ok)throw await N(r);g(!0)}catch(r){s(r instanceof Error?r.message:"Failed to reset password")}finally{c(!1)}},b=!n||x==="INVALID_TOKEN",m={callbackUrl:void 0,mode:void 0,error:void 0,errorDescription:void 0,loginHint:void 0,invitationOrg:void 0,intent:void 0};return e.jsx("div",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center",children:e.jsxs("div",{className:"w-full max-w-md p-8",children:[e.jsx("img",{src:"/lobu-logo.svg",alt:"Lobu",className:"mx-auto mb-6 h-8 w-auto"}),e.jsxs(k,{children:[e.jsx(C,{children:e.jsx(S,{asChild:!0,children:e.jsx("h1",{className:"text-center text-2xl",children:"Reset your password"})})}),e.jsx(L,{children:b&&!u?e.jsxs("div",{className:"mt-6 space-y-4 text-center",children:[e.jsx("p",{className:"text-sm text-destructive",children:"This reset link is invalid or expired."}),e.jsx(h,{to:"/auth/login",search:m,className:"text-sm text-primary hover:underline",children:"Back to sign in"})]}):u?e.jsxs("div",{className:"mt-6 space-y-4 text-center",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your password has been reset successfully."}),e.jsx(h,{to:"/auth/login",search:m,className:"text-sm text-primary hover:underline",children:"Continue to sign in"})]}):e.jsxs("form",{onSubmit:w,className:"mt-6 space-y-4",children:[d&&e.jsx("div",{className:"p-3 text-sm text-destructive bg-destructive/10 rounded-lg",children:d}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"new-password",className:"block text-sm font-medium",children:"New password"}),e.jsx("input",{id:"new-password",type:"password",value:o,onChange:t=>p(t.target.value),minLength:8,required:!0,className:"mt-1 block h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"confirm-password",className:"block text-sm font-medium",children:"Confirm new password"}),e.jsx("input",{id:"confirm-password",type:"password",value:i,onChange:t=>f(t.target.value),minLength:8,required:!0,className:"mt-1 block h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})]}),e.jsx("button",{type:"submit",disabled:l,className:"flex h-10 w-full items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 disabled:opacity-50",children:l?"Resetting password...":"Reset password"})]})})]})]})})}export{R as component};
2
+ //# sourceMappingURL=reset-password-Mx3baeNc.js.map
@@ -0,0 +1,2 @@
1
+ import{u as o,j as t,B as n,L as c,cG as u,gx as h,dP as y}from"./index-DdBTTN3y.js";function f({owner:i,filters:a,name:e}){const r=o();return t.jsx(n,{asChild:!0,variant:"ghost",size:"sm",className:"h-8 shrink-0 gap-1.5",children:t.jsxs(c,{title:`View activity for ${e}`,to:"/$owner",params:{owner:i},search:y(a),onClick:s=>{!r||s.button!==0||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||(s.preventDefault(),r.open({href:h(i,a),title:"Runs history"}))},children:[t.jsx(u,{className:"h-3.5 w-3.5"}),"View activity"]})})}export{f as R};
2
+ //# sourceMappingURL=run-activity-link-CaIBSRQj.js.map
@@ -0,0 +1,2 @@
1
+ import{v as k,eP as I,j as d,L as u,d_ as h}from"./index-DdBTTN3y.js";import{u as j}from"./use-automations-BLNjxq2K.js";import{u as b}from"./clients-BJRcMk1A.js";function C(n,e,o){return n?.kind==="agent_session"&&n.agent_id?n.client_id?`${n.agent_id} via ${n.client_id}`:n.agent_id:n?.kind==="user"?"a person":e==="agent"?"an agent":o?`Automation ${o}`:"an Automation"}function B({ownerSlug:n,initiator:e,clientName:o,fallback:_}){const t=e?.client_id??o,{allOrgs:m,isAuthenticated:p}=k(),r=p&&m?.some(s=>s.slug===n),c=b(void 0,{ownerSlug:n,enabled:!!(t&&r)}).data?.find(s=>s.id===t)?.title,l=r?m.find(s=>s.slug===n)?.id:void 0,f=e?.kind==="automation"&&e.automation_id?String(e.automation_id):void 0,v=j(f?l:void 0,void 0,{includeDetails:!1}).data?.find(s=>s.automation_id===f)?.name,{members:x}=I(e?.kind==="user"&&e.user_id?l:void 0),$=x.find(s=>s.userId===e?.user_id)?.user.name,a=e&&e.kind!=="user"?v??C(e,void 0,e.automation_id===void 0?void 0:String(e.automation_id)):$??_,g="font-medium text-foreground",i=`${g} underline-offset-4 hover:underline`;return e?.kind==="automation"&&e.automation_id?d.jsx(u,{to:"/$owner/automations/$automationId",params:{owner:n,automationId:String(e.automation_id)},search:{view:"definition",run_id:void 0},className:i,children:a}):e?.kind==="agent_session"&&e.agent_id?d.jsx(u,{to:"/$owner/agents/$agentId",params:{owner:n,agentId:String(e.agent_id)},className:i,children:a}):t?d.jsxs(u,{to:"/$owner/agents/connected/$clientId",params:{owner:n,clientId:t},className:`${i} inline-flex items-center gap-1 align-middle`,children:[d.jsx(h,{name:c??o??t}),c??a]}):d.jsx("span",{className:g,children:a})}export{B as R,C as p};
2
+ //# sourceMappingURL=run-initiator-BvzQJYW9.js.map
@@ -1,2 +1,2 @@
1
- import{eW as r,cJ as s,cH as c,cI as l,a2 as g,eX as I}from"./index-4gCDI7m4.js";const f=30,_=new Set(["running","pending","claimed"]);function m(n){return"workspace"in n?["workspace"]:"connectionId"in n?["connection",n.connectionId]:"deviceId"in n?["device",n.deviceId]:"connectorKey"in n?["connector",n.connectorKey]:["feed",n.feedId]}function y(n){return"workspace"in n?{}:"connectionId"in n?{connection_ids:[n.connectionId]}:"deviceId"in n?{device_worker_id:n.deviceId}:"connectorKey"in n?{connector_key:n.connectorKey}:{feed_ids:[n.feedId]}}function v(n,e,i){return r({queryKey:["runs-infinite",i??null,n?m(n):null,e.runTypes??null,e.status??null,e.automationIds??null,e.connectionIds??null,e.feedIds??null],queryFn:async({pageParam:t})=>{const a=t;return s("manage_operations",{action:"list_runs",...y(n),...e.runTypes&&e.runTypes.length>0?{run_types:e.runTypes}:{},...e.status?{status:e.status}:{},...e.automationIds?.length?{automation_ids:e.automationIds}:{},...e.connectionIds?.length?{connection_ids:e.connectionIds}:{},...e.feedIds?.length?{feed_ids:e.feedIds}:{},...a?{before_id:a.before_id,before_created_at:a.before_created_at}:{},limit:f},i?{slug:i}:void 0)},initialPageParam:null,getNextPageParam:t=>{if(!t.has_more)return;const a=t.runs[t.runs.length-1];if(a)return{before_id:a.id,before_created_at:a.created_at}},refetchInterval:t=>(t.state.data?.pages??[]).some(d=>d.runs.some(u=>_.has(u.status)))?5e3:!1,enabled:!!n,staleTime:15e3})}function p(n,e){return n.kind==="agent"?n.agentId?`/${n.agentId}/config/pending/${e}`:null:n.agentId&&n.automationId?`/${n.agentId}/automations/${n.automationId}/pending/${e}`:null}function T(n,e){const{slug:i}=c(),t=e!=null?p(n,e):null,a=n.kind==="agent"?["agent",n.agentId]:["automation",n.agentId,n.automationId];return l({queryKey:["pending-proposal",i,...a,e],queryFn:async()=>{const o=await g(I(i,t),{credentials:"include"});if(o.status===404)return{status:"gone"};if(!o.ok)throw new Error(`Failed to fetch pending proposal: ${o.status}`);return{status:"pending",proposal:await o.json()}},enabled:!!i&&!!t&&!!e,staleTime:0,retry:!1})}export{T as a,v as u};
2
- //# sourceMappingURL=runs-BPtQBTRN.js.map
1
+ import{el as r,cO as s,cP as c,cQ as l,a3 as g,em as I}from"./index-DdBTTN3y.js";const f=30,m=new Set(["running","pending","claimed"]);function _(n){return"workspace"in n?["workspace"]:"connectionId"in n?["connection",n.connectionId]:"deviceId"in n?["device",n.deviceId]:"connectorKey"in n?["connector",n.connectorKey]:["feed",n.feedId]}function y(n){return"workspace"in n?{}:"connectionId"in n?{connection_ids:[n.connectionId]}:"deviceId"in n?{device_worker_id:n.deviceId}:"connectorKey"in n?{connector_key:n.connectorKey}:{feed_ids:[n.feedId]}}function v(n,e,i){return r({queryKey:["runs-infinite",i??null,n?_(n):null,e.runTypes??null,e.status??null,e.automationIds??null,e.connectionIds??null,e.feedIds??null],queryFn:async({pageParam:t})=>{const a=t;return l("manage_operations",{action:"list_runs",...y(n),...e.runTypes&&e.runTypes.length>0?{run_types:e.runTypes}:{},...e.status?{status:e.status}:{},...e.automationIds?.length?{automation_ids:e.automationIds}:{},...e.connectionIds?.length?{connection_ids:e.connectionIds}:{},...e.feedIds?.length?{feed_ids:e.feedIds}:{},...a?{before_id:a.before_id,before_created_at:a.before_created_at}:{},limit:f},i?{slug:i}:void 0)},initialPageParam:null,getNextPageParam:t=>{if(!t.has_more)return;const a=t.runs[t.runs.length-1];if(a)return{before_id:a.id,before_created_at:a.created_at}},refetchInterval:t=>(t.state.data?.pages??[]).some(d=>d.runs.some(u=>m.has(u.status)))?5e3:!1,enabled:!!n,staleTime:15e3})}function p(n,e){return n.kind==="agent"?n.agentId?`/${n.agentId}/config/pending/${e}`:null:n.agentId&&n.automationId?`/${n.agentId}/automations/${n.automationId}/pending/${e}`:null}function P(n,e){const{slug:i}=s(),t=e!=null?p(n,e):null,a=n.kind==="agent"?["agent",n.agentId]:["automation",n.agentId,n.automationId];return c({queryKey:["pending-proposal",i,...a,e],queryFn:async()=>{const o=await g(I(i,t),{credentials:"include"});if(o.status===404)return{status:"gone"};if(!o.ok)throw new Error(`Failed to fetch pending proposal: ${o.status}`);return{status:"pending",proposal:await o.json()}},enabled:!!i&&!!t&&!!e,staleTime:0,retry:!1})}export{P as a,v as u};
2
+ //# sourceMappingURL=runs-fFJ1lPnw.js.map
@@ -0,0 +1,2 @@
1
+ import{at as T,aH as M,cD as w,j as o,ct as k,cU as g,dM as B,i as E,dN as C,cT as _,cS as O,cz as U,c as z,w as H,dO as W,dP as D,r as x,B as R,ab as G}from"./index-DdBTTN3y.js";import{u as q}from"./use-scroll-sentinel-DRyBMueA.js";import{u as J}from"./runs-fFJ1lPnw.js";import{o as K,F as Q,S as V}from"./filter-bar-wPaR12SS.js";import{M as p,c as X,u as Y,a as Z}from"./manage-gear-D8LMhehh.js";import{R as ee,a as ne}from"./runs-table-XGnxJl7S.js";function te(t){const{org:l}=T(t?.ownerSlug),h=M(t?l?.id:null),u=w(t?l?.id:null);if(!t)return{fields:[],chips:[]};const s=(h.data??[]).map(n=>({id:n.id,label:n.display_name||`Connection #${n.id}`,connectorKey:n.connector_key}));for(const n of t.connectionIds)s.some(a=>a.id===n)||s.unshift({id:n,label:`Connection #${n}`,connectorKey:t.connectorKey});const r=(u.data??[]).map(n=>({key:n.key,label:n.name}));t.connectorKey&&!r.some(n=>n.key===t.connectorKey)&&r.unshift({key:t.connectorKey,label:t.connectorKey});const i=n=>{const a=n==="connection"?h:u,d=K({searchPlaceholder:`Search ${n}s...`,emptyText:a.isLoading?"Loading...":`No ${n}s`,multiple:n==="connection",selected:n==="connection"?t.connectionIds.map(String):[t.connectorKey],options:n==="connection"?s.map(e=>({value:String(e.id),label:e.label,action:e.connectorKey?o.jsx(p,{...X(t.ownerSlug,{id:e.id,connector_key:e.connectorKey}),label:e.label}):null})):r.map(e=>({value:e.key,label:e.label,action:o.jsx(p,{to:"/$owner/connectors/$connectorKey",params:{owner:t.ownerSlug,connectorKey:e.key},label:e.label})})),onSelect:e=>n==="connection"?t.onChange({connectionIds:t.connectionIds.includes(Number(e))?t.connectionIds.filter(c=>c!==Number(e)):[...t.connectionIds,Number(e)]}):t.onChange({connectorKey:e})});return{...d,items:e=>o.jsxs(o.Fragment,{children:[d.items(e,""),a.isError?o.jsxs(g,{forceMount:!0,onSelect:()=>void a.refetch(),children:["Could not load ",n,"s. Retry"]}):null]})}};return{fields:[{key:"connection",label:"Connection",icon:o.jsx(k,{className:"h-4 w-4"}),editor:i("connection")},{key:"connector",label:"Connector",icon:o.jsx(k,{className:"h-4 w-4"}),editor:i("connector")}],chips:[...t.connectionIds.length?[{id:"connection",field:"connection",label:"Connection",op:"is",value:t.connectionIds.map(n=>s.find(a=>a.id===n)?.label??`#${n}`).join(", "),onRemove:()=>t.onChange({connectionIds:[]})}]:[],...t.connectorKey?[{id:"connector",field:"connector",label:"Connector",op:"is",value:r.find(n=>n.key===t.connectorKey)?.label??t.connectorKey,onRemove:()=>t.onChange({connectorKey:""})}]:[]]}}function oe({bucket:t,status:l,onBucketChange:h,onStatusChange:u,automation:s,source:r}){const i=te(r),n=Y(s?.ownerSlug??"",!!s),a=(n.data??[]).map(e=>({value:e.automation_id,label:`${e.name}${e.status==="archived"?" (archived)":""}`}));for(const e of s?.ids??[])a.some(c=>c.value===String(e))||a.unshift({value:String(e),label:`Automation #${e}`});const d=e=>a.find(c=>c.value===String(e))?.label??`#${e}`;return o.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-2",children:[o.jsx("div",{className:"inline-flex max-w-full flex-wrap rounded-md border bg-muted/30 p-0.5 text-sm",children:B.map(e=>o.jsx("button",{type:"button",onClick:()=>h(e.value),className:E("rounded px-3 py-1 transition-colors",t===e.value?"bg-background text-foreground ":"text-muted-foreground hover:text-foreground"),children:e.label},e.value))}),o.jsx(Q,{label:"Run filters",className:"w-full min-w-0",fields:[...i.fields,...s?[{key:"automation",label:"Automation",icon:o.jsx(O,{className:"h-4 w-4"}),editor:{kind:"list",searchPlaceholder:"Search Automations...",emptyText:n.isLoading?"Loading Automations...":"No Automations",items:()=>o.jsxs(o.Fragment,{children:[o.jsx(_,{children:a.map(e=>{const c=Number(e.value);return o.jsxs(g,{value:`${e.label} ${c}`,"aria-label":e.label,className:"group",onSelect:()=>s.onChange(s.ids.includes(c)?s.ids.filter(f=>f!==c):[...s.ids,c]),children:[o.jsx(V,{selected:s.ids.includes(c)}),o.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.label}),o.jsx(p,{...Z(s.ownerSlug,e.value),label:e.label})]},e.value)})}),n.isError?o.jsx(g,{forceMount:!0,onSelect:()=>void n.refetch(),children:"Could not load Automations. Retry"}):null]})}}]:[],{key:"status",label:"Status",icon:o.jsx(U,{className:"h-4 w-4"}),editor:K({searchPlaceholder:"Search statuses...",options:C,selected:l==="all"?[]:[l],onSelect:u})}],chips:[...i.chips,...l==="all"?[]:[{id:"status",label:"Status",op:"is",value:C.find(e=>e.value===l)?.label??l,onRemove:()=>u("all")}],...s?.ids.length?[{id:"automation",field:"automation",label:"Automation",op:"is",value:s.ids.map(d).join(", "),onRemove:()=>s.onChange([])}]:[]]})]})}function ue({ownerSlug:t}){const l=z(),{search:h}=H(),u=W(h);return o.jsx(se,{scope:{workspace:!0},ownerSlug:t,filterState:u,onFilterChange:s=>{l({search:(r=>({...r,...D(s)}))})}})}function se({scope:t,ownerSlug:l,filterState:h,onFilterChange:u}){const[s,r]=x.useState({bucket:"all",status:"all",automationIds:[],connectionIds:[],connectorKey:""}),i=h??s,{bucket:n,status:a,automationIds:d,connectionIds:e,connectorKey:c}=i,f=u??r,I=x.useMemo(()=>({runTypes:n==="all"?void 0:[n],status:a==="all"?void 0:a,...d.length?{automationIds:d}:{},...e.length?{connectionIds:e}:{}}),[n,a,d,e]),{data:y,isLoading:F,isError:b,hasNextPage:v,isFetching:j,isFetchingNextPage:$,fetchNextPage:S,refetch:A}=J(c?{connectorKey:c}:t,I,l),N=x.useMemo(()=>y?.pages.flatMap(m=>m.runs)??[],[y]),L={runType:n==="all",feed:!("workspace"in t)||n==="sync",connection:"deviceId"in t||"connectorKey"in t||"workspace"in t&&n!=="automation",startedBy:!0},P=q({onIntersect:()=>void S(),enabled:!!v&&!j&&!b,rootMargin:"200px"});return o.jsxs("div",{className:"space-y-3",children:[o.jsx(oe,{bucket:n,status:a,onBucketChange:m=>f({...i,bucket:m}),onStatusChange:m=>f({...i,status:m}),automation:"workspace"in t?{ownerSlug:l,ids:d,onChange:m=>f({...i,automationIds:m})}:void 0,source:"workspace"in t?{ownerSlug:l,connectionIds:e,connectorKey:c,onChange:m=>f({...i,...m})}:void 0}),F?o.jsx(ee,{}):b?o.jsxs("p",{className:"rounded-lg border bg-destructive/5 px-3 py-6 text-center text-xs text-destructive",children:["Failed to load runs."," ",o.jsx(R,{variant:"ghost",size:"sm",onClick:()=>void A(),children:"Retry"})]}):N.length===0?o.jsx("p",{className:"rounded-lg border bg-muted/20 px-3 py-6 text-center text-xs text-muted-foreground",children:n==="all"&&a==="all"&&!d.length&&!e.length&&!c?"No runs yet.":"No runs match these filters."}):o.jsxs(o.Fragment,{children:[o.jsx(ne,{runs:N,ownerSlug:l,columns:L}),o.jsx("div",{ref:P,className:"h-1"}),v&&o.jsx(R,{variant:"ghost",size:"sm",disabled:j,onClick:()=>void S(),children:"Load more runs"}),$&&o.jsx("div",{className:"flex justify-center py-3",children:o.jsx(G,{size:"lg",className:"text-muted-foreground"})})]})]})}export{se as R,ue as W};
2
+ //# sourceMappingURL=runs-panel-DEnZHTa5.js.map
@@ -0,0 +1,2 @@
1
+ import{j as e,i as p,S as c,bG as h,B as k,L as f,da as w,a$ as v,b0 as _,b1 as C,en as S,eo as T,u as R,e5 as L,dZ as V,V as B,ep as D,dW as $,aj as A,ab as E,eq as I,r as j,dE as g,dG as y,dF as N}from"./index-DdBTTN3y.js";import{R as K}from"./run-initiator-BvzQJYW9.js";import{T as P,a as F,b as m,c as i,d as M,e as d}from"./table-BUqshjxa.js";function O({labels:t,className:r}){return e.jsx("div",{className:p("inline-flex rounded-md border bg-muted/30 p-0.5 text-sm",r),children:t.map((a,n)=>e.jsx("span",{className:n===0?"rounded bg-background px-3 py-1 text-foreground ":"px-3 py-1 text-muted-foreground",children:a},a))})}function q({rows:t=6}){return e.jsxs("div",{className:"rounded-lg border",role:"status","aria-label":"Loading runs",children:[e.jsx("div",{className:"border-b px-3 py-2",children:e.jsx(c,{className:"h-3 w-1/4"})}),e.jsx("div",{className:"divide-y",children:Array.from({length:t}).map((r,a)=>e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5",children:[e.jsx(c,{className:"h-3.5 w-3.5 rounded-full shrink-0"}),e.jsx(c,{className:"h-3 w-20"}),e.jsx(c,{className:"h-3 w-16"}),e.jsx(c,{className:"ml-auto h-3 w-12 shrink-0"}),e.jsx(c,{className:"h-7 w-7 rounded-md shrink-0"})]},a))})]})}function ie({rows:t=6}){return e.jsxs("div",{className:"space-y-4",role:"status","aria-label":"Loading runs",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(O,{labels:["All","Sync","Action","Auth"]}),e.jsx("div",{className:"h-9 w-[150px] rounded-md border border-input"})]}),e.jsx(q,{rows:t})]})}const G=h("inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{status:{active:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",paused:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400",error:"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400",pending:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",rejected:"bg-gray-100 text-gray-700 dark:bg-gray-900/30 dark:text-gray-400",default:"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300"}},defaultVariants:{status:"default"}}),H=h("h-1.5 w-1.5 rounded-full",{variants:{status:{active:"bg-green-500",paused:"bg-yellow-500",error:"bg-red-500",pending:"bg-blue-500",rejected:"bg-gray-500",default:"bg-gray-500"}},defaultVariants:{status:"default"}});function W({className:t,status:r,showDot:a=!0,children:n,...o}){return e.jsxs("span",{className:p(G({status:r}),t),...o,children:[a&&e.jsx("span",{className:H({status:r})}),n]})}function z(t,r){switch(r.kind){case"connection":return T(t,r.id);case"feed":return S(t,r.id);case"run":return{to:"/$owner/events",params:{owner:t},search:{run_ids:String(r.id)}}}}function J({ownerSlug:t,scope:r,variant:a="outline",iconOnly:n=!1,label:o,className:s,title:x}){const l=z(t,r),b=x??o??"View in memory",u=e.jsx(k,{asChild:!0,variant:a,size:n?"icon":"sm",className:p(n&&"h-7 w-7",s),children:e.jsxs(f,{to:l.to,params:l.params,search:l.search,children:[e.jsx(w,{className:p("h-3.5 w-3.5",!n&&"mr-1.5")}),!n&&(o??"View in memory")]})});return n?e.jsxs(v,{children:[e.jsx(_,{asChild:!0,children:u}),e.jsx(C,{children:b})]}):u}const U=new Set(["error","failed","revoked"]);function X(t){return t==="active"?"active":t==="paused"?"paused":t==="pending"||t==="pending_auth"?"pending":U.has(t)?"error":"default"}function Z({status:t}){return t==="completed"?e.jsx($,{className:"h-3.5 w-3.5 text-green-500"}):t==="failed"?e.jsx(A,{className:"h-3.5 w-3.5 text-destructive"}):t==="running"?e.jsx(E,{className:"text-blue-500"}):e.jsx(I,{className:"h-3.5 w-3.5 text-muted-foreground"})}function Q({error:t}){const[r,a]=j.useState(!1);return t.length>80?e.jsxs(g,{open:r,onOpenChange:a,children:[e.jsx(y,{asChild:!0,children:e.jsx("button",{type:"button",className:"text-left text-destructive truncate max-w-[200px] hover:underline",children:t})}),e.jsx(N,{className:"w-96 max-h-64 overflow-auto",children:e.jsx("pre",{className:"text-xs whitespace-pre-wrap break-words text-destructive",children:t})})]}):e.jsx("span",{className:"text-destructive",children:t})}function Y({checkpoint:t}){const[r,a]=j.useState(!1);return e.jsxs(g,{open:r,onOpenChange:a,children:[e.jsx(y,{asChild:!0,children:e.jsx("button",{type:"button",className:"text-left text-muted-foreground hover:underline",children:"view"})}),e.jsx(N,{className:"w-80 max-h-64 overflow-auto",children:e.jsx("pre",{className:"text-xs whitespace-pre-wrap break-words",children:JSON.stringify(t,null,2)})})]})}function ee(t){if(t.initiator_kind)return{kind:t.initiator_kind,...t.initiator_ref};if(t.automation_id)return{kind:"automation",automation_id:t.automation_id};if(t.created_by_user_id)return{kind:"user",user_id:t.created_by_user_id}}function te({run:t,ownerSlug:r}){const a=ee(t);return a?a.kind==="system"?e.jsx("span",{className:"text-muted-foreground",children:"System"}):e.jsx(K,{ownerSlug:r,initiator:a,clientName:void 0,fallback:"A person"}):e.jsx("span",{className:"text-muted-foreground",children:"—"})}function se(t){return t.feed_display_name??t.feed_key??"—"}function de({runs:t,ownerSlug:r,columns:a={}}){const n=R(),o=t.some(s=>s.checkpoint);return e.jsx("div",{className:"rounded-lg border",children:e.jsxs(P,{children:[e.jsx(F,{children:e.jsxs(m,{children:[e.jsx(i,{className:"text-xs py-1.5 px-3 w-8"}),e.jsx(i,{className:"text-xs py-1.5 px-3",children:"When"}),a.runType&&e.jsx(i,{className:"text-xs py-1.5 px-3",children:"Type"}),a.connection&&e.jsx(i,{className:"text-xs py-1.5 px-3",children:"Connection"}),a.feed&&e.jsx(i,{className:"text-xs py-1.5 px-3",children:"Feed"}),a.startedBy&&e.jsx(i,{className:"text-xs py-1.5 px-3",children:"Started by"}),e.jsx(i,{className:"text-xs py-1.5 px-3",children:"Status"}),e.jsx(i,{className:"text-xs py-1.5 px-3",children:"Items"}),e.jsx(i,{className:"text-xs py-1.5 px-3",children:"Duration"}),e.jsx(i,{className:"text-xs py-1.5 px-3",children:"Version"}),o&&e.jsx(i,{className:"text-xs py-1.5 px-3",children:"Checkpoint"}),e.jsx(i,{className:"text-xs py-1.5 px-3",children:"Error"}),e.jsx(i,{className:"text-xs py-1.5 px-3 w-8"})]})}),e.jsx(M,{children:t.map(s=>{const x=s.completed_at?Math.round((new Date(s.completed_at).getTime()-new Date(s.created_at).getTime())/1e3):null;return e.jsxs(m,{children:[e.jsx(d,{className:"py-1.5 px-3",children:e.jsx(Z,{status:s.status})}),e.jsxs(d,{className:"py-1.5 px-3 text-xs text-muted-foreground",title:V(s.created_at),children:[e.jsxs(f,{to:"/$owner/events",params:{owner:r},search:{run_ids:String(s.id)},className:"block text-foreground hover:underline",onClick:l=>{!n||l.button!==0||l.metaKey||l.ctrlKey||l.shiftKey||l.altKey||(l.preventDefault(),n.open({href:s.run_type==="automation"&&s.automation_id!=null?`/${r}/automations/${s.automation_id}?view=activity&run_id=${s.id}`:`/${r}/events?run_ids=${s.id}`,title:`Run #${s.id}`,runId:s.id}))},children:["Run #",s.id]}),L(s.created_at)]}),a.runType&&e.jsx(d,{className:"py-1.5 px-3 text-xs",children:e.jsx(B,{variant:"secondary",className:"font-mono text-[10px]",children:s.run_type??"—"})}),a.connection&&e.jsx(d,{className:"py-1.5 px-3 text-xs text-muted-foreground",children:s.connection_display_name??"—"}),a.feed&&e.jsx(d,{className:"py-1.5 px-3 text-xs text-muted-foreground",children:se(s)}),a.startedBy&&e.jsx(d,{className:"py-1.5 px-3 text-xs",children:e.jsx(te,{run:s,ownerSlug:r})}),e.jsx(d,{className:"py-1.5 px-3 text-xs",children:e.jsx(W,{status:X(s.status),children:s.status})}),e.jsx(d,{className:"py-1.5 px-3 text-xs font-mono text-muted-foreground",children:s.items_collected??"—"}),e.jsx(d,{className:"py-1.5 px-3 text-xs text-muted-foreground",children:x!=null?D(x):"—"}),e.jsx(d,{className:"py-1.5 px-3 text-xs font-mono text-muted-foreground",children:s.connector_version??"—"}),o&&e.jsx(d,{className:"py-1.5 px-3 text-xs",children:s.checkpoint?e.jsx(Y,{checkpoint:s.checkpoint}):e.jsx("span",{className:"text-muted-foreground",children:"—"})}),e.jsx(d,{className:"py-1.5 px-3 text-xs",children:s.error_message?e.jsx(Q,{error:s.error_message}):""}),e.jsx(d,{className:"py-1.5 px-3 text-right",children:e.jsx(J,{ownerSlug:r,scope:{kind:"run",id:s.id},variant:"ghost",iconOnly:!0,title:"View events from this run"})})]},s.id)})})]})})}export{q as R,W as S,J as V,de as a,ie as b,X as g};
2
+ //# sourceMappingURL=runs-table-XGnxJl7S.js.map
@@ -1,2 +1,2 @@
1
- import{t as u,fL as l,j as t,bJ as m,bW as f,f1 as x}from"./index-4gCDI7m4.js";import{E as i}from"./entity-type-page-BCBdFndu.js";function E({slug:r,onClose:a}){const{orgContext:e}=u(),{data:s=[],isLoading:o,isError:y}=l(e);if(r===null)return t.jsx(i,{entityType:null,orgContext:e,onClose:a,compact:!0});if(o)return t.jsx(m,{label:"entity type",variant:"panel"});if(y)return t.jsx(f,{label:"entity type"});const n=s.find(p=>p.slug===r)??null;return n?t.jsx(i,{entityType:n,orgContext:e,hideDelete:x(n),onClose:a,compact:!0}):t.jsx("p",{className:"text-sm text-muted-foreground",children:"Entity type not found."})}export{E as S};
2
- //# sourceMappingURL=schema-type-editor-panel-CAhOB648.js.map
1
+ import{v as u,gf as l,j as t,bO as m,b_ as f,fw as x}from"./index-DdBTTN3y.js";import{E as i}from"./entity-type-page-BLwH6qa7.js";function E({slug:r,onClose:a}){const{orgContext:e}=u(),{data:s=[],isLoading:o,isError:y}=l(e);if(r===null)return t.jsx(i,{entityType:null,orgContext:e,onClose:a,compact:!0});if(o)return t.jsx(m,{label:"entity type",variant:"panel"});if(y)return t.jsx(f,{label:"entity type"});const n=s.find(p=>p.slug===r)??null;return n?t.jsx(i,{entityType:n,orgContext:e,hideDelete:x(n),onClose:a,compact:!0}):t.jsx("p",{className:"text-sm text-muted-foreground",children:"Entity type not found."})}export{E as S};
2
+ //# sourceMappingURL=schema-type-editor-panel-C0_9VcSs.js.map
@@ -0,0 +1,2 @@
1
+ import{q as l,j as e,B as i,L as t,y as c,ak as o,al as d}from"./index-DdBTTN3y.js";import{F as m}from"./full-page-spinner-BqmckkOf.js";function h(){const{session:a,isReady:n}=l();if(!n)return e.jsx(m,{});if(!a?.user)return e.jsxs("div",{className:"mx-auto w-full max-w-md space-y-4 px-4 py-8 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Account settings"}),e.jsx("p",{className:"text-muted-foreground",children:"Sign in to view your profile and account details."}),e.jsx(i,{asChild:!0,children:e.jsx(t,{to:"/auth/login",search:c({intent:"sign-in",callbackUrl:"/account/settings"}),children:"Sign in"})})]});const{user:s}=a,r=s.name?.trim()||"User";return e.jsx(o,{className:"py-8",children:e.jsxs(d,{className:"space-y-8",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h1",{className:"text-3xl font-semibold leading-tight",children:"Account settings"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your personal profile and sign-in details."})]}),e.jsxs("section",{"aria-labelledby":"account-profile-heading",className:"space-y-5 border-b border-border pb-8",children:[e.jsx("h2",{id:"account-profile-heading",className:"text-sm font-medium",children:"Profile"}),e.jsxs("div",{className:"flex min-w-0 items-center gap-4",children:[s.image?e.jsx("img",{src:s.image,alt:"",referrerPolicy:"no-referrer",className:"h-12 w-12 shrink-0 rounded-full object-cover"}):e.jsx("div",{"aria-hidden":"true",className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-muted text-lg font-medium",children:(s.name?.trim()||s.email||"U").charAt(0).toUpperCase()}),e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx("p",{className:"break-words font-medium",children:r}),e.jsx("p",{className:"break-all text-sm text-muted-foreground",children:s.email})]})]}),e.jsxs("details",{className:"space-y-3",children:[e.jsx("summary",{className:"w-fit cursor-pointer rounded-sm text-sm text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:"Account details"}),e.jsxs("dl",{className:"space-y-1 text-sm",children:[e.jsx("dt",{className:"text-muted-foreground",children:"User ID"}),e.jsx("dd",{className:"break-all font-mono text-xs",children:s.id})]})]})]}),e.jsxs("section",{"aria-labelledby":"account-session-heading",className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{id:"account-session-heading",className:"text-sm font-medium",children:"Session"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Sign out of your account on this device."})]}),e.jsx(i,{variant:"outline",asChild:!0,children:e.jsx(t,{to:"/auth/logout",children:"Sign out"})})]})]})})}export{h as component};
2
+ //# sourceMappingURL=settings-CP4PjMQA.js.map
@@ -0,0 +1,2 @@
1
+ import{j1 as t,j as n}from"./index-DdBTTN3y.js";import{a as s}from"./agents-workbench-bPTjdVS1.js";import"./agent-editor-form-CdA5vLr8.js";import"./model-selector-CgU8SJMF.js";import"./proposal-review-shell-D6KABxah.js";import"./runs-fFJ1lPnw.js";import"./nav-pill-DrFkuyUQ.js";function f(){const{owner:o,agentId:r}=t.useParams(),e=t.useSearch();return n.jsx(s,{owner:o,agentId:r,tab:"settings",runId:e.run_id})}export{f as component};
2
+ //# sourceMappingURL=settings-CgaUJMHH.js.map
@@ -0,0 +1,2 @@
1
+ import{j0 as r,j as t,O as s}from"./index-DdBTTN3y.js";import{A as e}from"./agent-skill-context-BAaGpvfS.js";import"./core.esm-CQzL3ObT.js";import"./skill-editor-D_W3QlRz.js";function p(){const{agentId:o}=r.useParams();return t.jsx(e,{agentId:o,children:t.jsx(s,{})})}export{p as component};
2
+ //# sourceMappingURL=skills-D-e_h3a9.js.map
@@ -1,2 +1,2 @@
1
- import{t as f,cI as b,eS as R,j as e,B as j,eT as v,S as _,bI as C,L,dG as F,x as E}from"./index-4gCDI7m4.js";import{a as S,R as $,b as P}from"./event-card-Mcxv56DG.js";import{b as A}from"./events-feed-BysC9HgU.js";function y({failures:o,onRetry:c,isError:l=!1,isFetching:d=!1}){return o.length===0&&!l?null:e.jsxs("div",{role:"alert",className:"flex items-center justify-between gap-3 rounded-md border border-destructive/40 px-3 py-2 text-xs",children:[e.jsxs("span",{children:[o.length<=1?"A source":`${o.length} sources`," could not be read, so some items may be missing."]}),e.jsx(j,{size:"sm",variant:"outline",className:"h-7",onClick:c,disabled:d,children:"Retry"})]})}function z({record:o,orgContext:c,filters:l}){const{orgContext:d}=f(),t=c??d,{data:p}=b({queryKey:["connector-definitions","source-record",t.organizationId,t.slug],queryFn:()=>E(t),enabled:!!(t.organizationId||t.slug),staleTime:6e4}),{data:i,isLoading:u,isError:n,refetch:g,fetchNextPage:a,hasNextPage:h,isFetching:x,isFetchingNextPage:s}=R(o,t,l),N=i?.pages.flatMap(r=>r.events)??[],m=i?.pages.flatMap(r=>r.failures)??[];return e.jsxs("div",{className:"space-y-4 p-4",children:[e.jsx(y,{failures:m,isError:n,isFetching:x,onRetry:()=>void g()}),e.jsx(A,{isLoading:u,hasNextPage:!!h&&!n,autoLoadMore:m.length===0,isFetching:x,isFetchingNextPage:s,onLoadMore:()=>void a(),emptyState:n||m.length>0||h?null:e.jsx("p",{className:"text-xs text-muted-foreground",children:"No activity for this record in its connected sources."}),items:N.map(r=>({key:`${r.feed_id}:${r.origin_id}`,occurredAt:r.occurred_at,content:e.jsx("div",{className:"p-3",children:e.jsx(S,{ownerSlug:t.slug,connectorDefinitions:p,content:{...r,title:r.title||r.origin_type||r.origin_id,text_content:r.payload_text??""}})})}))})]})}function B({record:o,ownerSlug:c,orgContext:l}){const{orgContext:d}=f(),{data:t,isLoading:p,isError:i,refetch:u,hasNextPage:n,fetchNextPage:g,isFetching:a,isFetchNextPageError:h,error:x}=v(o,l??d);return p?e.jsx(_,{className:"h-12 w-full rounded-lg"}):t?e.jsxs("div",{className:"space-y-2",children:[e.jsx($,{count:t.relationshipFailures?.length??0,onRetry:()=>void u()}),e.jsx(y,{failures:t.failures,isError:i,isFetching:a,onRetry:()=>{if(a)return;const s=x instanceof C&&x.status===400;h&&!s||!i&&n?g():u()}}),t.links.length===0&&(t.relationships?.length??0)===0&&t.failures.length===0&&(t.relationshipFailures?.length??0)===0&&!n&&!i&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"No relationships for this record in its connected sources."}),t.links.length===0&&(t.relationships?.length??0)===0&&n&&!i&&t.failures.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"More source records remain to check for relationships."}),e.jsxs("ul",{className:"space-y-1",children:[(t.relationships??[]).map(s=>e.jsx("li",{className:"rounded-lg border px-3 py-2",children:e.jsx(P,{row:s,entityId:o.key,entityType:o.type,ownerSlug:c,orgContext:l??d})},`authored:${s.id}`)),t.links.map(s=>e.jsx("li",{children:e.jsx(L,{to:F(c,[{entity_type:s.entity_type,slug:s.key}]),className:"flex items-center justify-between rounded-lg border px-3 py-2 text-sm hover:bg-muted/50",children:e.jsxs("span",{children:[e.jsxs("span",{className:"text-xs text-muted-foreground",children:[s.relationship_type.replaceAll("_"," "),s.direction==="incoming"?" (from)":""," ·"," ",s.entity_type," ·"," "]}),s.name]})})},`${s.relationship_type}:${s.direction}:${s.entity_type}:${s.key}`))]}),n&&!i&&t.failures.length===0&&e.jsx(j,{variant:"outline",size:"sm",disabled:a,onClick:()=>void g(),children:a?"Loading…":"Load more"})]}):e.jsx(y,{failures:[],isError:!0,isFetching:a,onRetry:()=>void u()})}export{z as S,B as a};
2
- //# sourceMappingURL=source-record-panels-Bh5F4C5K.js.map
1
+ import{v as y,cP as b,fk as R,j as e,B as j,fl as v,S as _,bN as C,L,dR as F,x as E}from"./index-DdBTTN3y.js";import{a as P,R as S,b as $}from"./event-card-DVUB8my6.js";import{b as k}from"./events-feed-B9CZHI_P.js";function f({failures:o,onRetry:c,isError:l=!1,isFetching:d=!1}){return o.length===0&&!l?null:e.jsxs("div",{role:"alert",className:"flex items-center justify-between gap-3 rounded-md border border-destructive/40 px-3 py-2 text-xs",children:[e.jsxs("span",{children:[o.length<=1?"A source":`${o.length} sources`," could not be read, so some items may be missing."]}),e.jsx(j,{size:"sm",variant:"outline",className:"h-7",onClick:c,disabled:d,children:"Retry"})]})}function I({record:o,orgContext:c,filters:l}){const{orgContext:d}=y(),t=c??d,{data:p}=b({queryKey:["connector-definitions","source-record",t.organizationId,t.slug],queryFn:()=>E(t),enabled:!!(t.organizationId||t.slug),staleTime:6e4}),{data:i,isLoading:u,isError:n,refetch:g,fetchNextPage:a,hasNextPage:h,isFetching:x,isFetchingNextPage:s}=R(o,t,l),N=i?.pages.flatMap(r=>r.events)??[],m=i?.pages.flatMap(r=>r.failures)??[];return e.jsxs("div",{className:"space-y-4 p-4",children:[e.jsx(f,{failures:m,isError:n,isFetching:x,onRetry:()=>void g()}),e.jsx(k,{isLoading:u,hasNextPage:!!h&&!n,autoLoadMore:m.length===0,isFetching:x,isFetchingNextPage:s,onLoadMore:()=>void a(),emptyState:n||m.length>0||h?null:e.jsx("p",{className:"text-xs text-muted-foreground",children:"No activity for this record in its connected sources."}),items:N.map(r=>({key:`${r.feed_id}:${r.origin_id}`,occurredAt:r.occurred_at,content:e.jsx("div",{className:"p-3",children:e.jsx(P,{ownerSlug:t.slug,connectorDefinitions:p,content:{...r,title:r.title||r.origin_type||r.origin_id,text_content:r.payload_text??""}})})}))})]})}function B({record:o,ownerSlug:c,orgContext:l}){const{orgContext:d}=y(),{data:t,isLoading:p,isError:i,refetch:u,hasNextPage:n,fetchNextPage:g,isFetching:a,isFetchNextPageError:h,error:x}=v(o,l??d);return p?e.jsx(_,{className:"h-12 w-full rounded-lg"}):t?e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{count:t.relationshipFailures?.length??0,onRetry:()=>void u()}),e.jsx(f,{failures:t.failures,isError:i,isFetching:a,onRetry:()=>{if(a)return;const s=x instanceof C&&x.status===400;h&&!s||!i&&n?g():u()}}),t.links.length===0&&(t.relationships?.length??0)===0&&t.failures.length===0&&(t.relationshipFailures?.length??0)===0&&!n&&!i&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"No relationships for this record in its connected sources."}),t.links.length===0&&(t.relationships?.length??0)===0&&n&&!i&&t.failures.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"More source records remain to check for relationships."}),e.jsxs("ul",{className:"space-y-1",children:[(t.relationships??[]).map(s=>e.jsx("li",{className:"rounded-lg border px-3 py-2",children:e.jsx($,{row:s,entityId:o.key,entityType:o.type,ownerSlug:c,orgContext:l??d})},`authored:${s.id}`)),t.links.map(s=>e.jsx("li",{children:e.jsx(L,{to:F(c,[{entity_type:s.entity_type,slug:s.key}]),className:"flex items-center justify-between rounded-lg border px-3 py-2 text-sm hover:bg-muted/50",children:e.jsxs("span",{children:[e.jsxs("span",{className:"text-xs text-muted-foreground",children:[s.relationship_type.replaceAll("_"," "),s.direction==="incoming"?" (from)":""," ·"," ",s.entity_type," ·"," "]}),s.name]})})},`${s.relationship_type}:${s.direction}:${s.entity_type}:${s.key}`))]}),n&&!i&&t.failures.length===0&&e.jsx(j,{variant:"outline",size:"sm",disabled:a,onClick:()=>void g(),children:a?"Loading…":"Load more"})]}):e.jsx(f,{failures:[],isError:!0,isFetching:a,onRetry:()=>void u()})}export{I as S,B as a};
2
+ //# sourceMappingURL=source-record-panels-Bh0n4gGw.js.map
@@ -1,2 +1,2 @@
1
- import{j as e,h as t}from"./index-4gCDI7m4.js";const s={live:"bg-green-500",amber:"bg-amber-500",muted:"bg-muted-foreground/40",destructive:"bg-destructive"};function a({tone:r}){return e.jsx("span",{"aria-hidden":r===null,className:t("h-1.5 w-1.5 shrink-0 rounded-full",r===null?"bg-transparent":s[r])})}export{a as S};
2
- //# sourceMappingURL=status-dot-D3FoDRcc.js.map
1
+ import{j as e,i as t}from"./index-DdBTTN3y.js";const s={live:"bg-green-500",amber:"bg-amber-500",muted:"bg-muted-foreground/40",destructive:"bg-destructive"};function a({tone:r}){return e.jsx("span",{"aria-hidden":r===null,className:t("h-1.5 w-1.5 shrink-0 rounded-full",r===null?"bg-transparent":s[r])})}export{a as S};
2
+ //# sourceMappingURL=status-dot-Cpq63I7p.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,j as l,h as o}from"./index-4gCDI7m4.js";const r=t.forwardRef(({className:e,...a},s)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:s,className:o("w-full caption-bottom text-sm",e),...a})}));r.displayName="Table";const d=t.forwardRef(({className:e,...a},s)=>l.jsx("thead",{ref:s,className:o("[&_tr]:border-b",e),...a}));d.displayName="TableHeader";const c=t.forwardRef(({className:e,...a},s)=>l.jsx("tbody",{ref:s,className:o("[&_tr:last-child]:border-0",e),...a}));c.displayName="TableBody";const b=t.forwardRef(({className:e,...a},s)=>l.jsx("tr",{ref:s,className:o("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...a}));b.displayName="TableRow";const m=t.forwardRef(({className:e,...a},s)=>l.jsx("th",{ref:s,className:o("h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));m.displayName="TableHead";const x=t.forwardRef(({className:e,...a},s)=>l.jsx("td",{ref:s,className:o("p-4 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));x.displayName="TableCell";export{r as T,d as a,b,m as c,c as d,x as e};
2
- //# sourceMappingURL=table-DFcJRNk7.js.map
1
+ import{r as t,j as l,i as o}from"./index-DdBTTN3y.js";const r=t.forwardRef(({className:e,...a},s)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:s,className:o("w-full caption-bottom text-sm",e),...a})}));r.displayName="Table";const d=t.forwardRef(({className:e,...a},s)=>l.jsx("thead",{ref:s,className:o("[&_tr]:border-b",e),...a}));d.displayName="TableHeader";const c=t.forwardRef(({className:e,...a},s)=>l.jsx("tbody",{ref:s,className:o("[&_tr:last-child]:border-0",e),...a}));c.displayName="TableBody";const b=t.forwardRef(({className:e,...a},s)=>l.jsx("tr",{ref:s,className:o("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...a}));b.displayName="TableRow";const m=t.forwardRef(({className:e,...a},s)=>l.jsx("th",{ref:s,className:o("h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));m.displayName="TableHead";const i=t.forwardRef(({className:e,...a},s)=>l.jsx("td",{ref:s,className:o("p-4 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));i.displayName="TableCell";export{r as T,d as a,b,m as c,c as d,i as e};
2
+ //# sourceMappingURL=table-BUqshjxa.js.map
@@ -1,2 +1,2 @@
1
- import{eU as c,cI as o,eV as u,a5 as r,bS as l,cJ as s}from"./index-4gCDI7m4.js";function y(){return o({queryKey:["automation-catalog"],queryFn:async()=>(await s("manage_catalog",{action:"list_catalog",kinds:["automations"]})).catalogs?.automations?.entries??[],staleTime:6e4})}function g(e,a,i){return o({queryKey:["automations-list",e,a,i?.includeDetails??!0],queryFn:async()=>(await s("manage_automations",{action:"list",entity_id:a,status:"active",include_details:i?.includeDetails??!0})).automations||[],enabled:!!e,staleTime:3e4})}function _(e,a,i,t={}){const n=c(t.ownerSlug);return o({queryKey:["automation-detail",n,e,a,t.since,t.until,t.templateVersion,t.includeVersions??!1],queryFn:async()=>await s("get_automation",{automation_id:e,entity_id:a,content_since:t.since,content_until:t.until,template_version:t.templateVersion,page_size:100,include_classification:"summary",include_versions:t.includeVersions??!1},{slug:n},{timeoutMs:3e4}),enabled:!!n&&!!e&&!!(t.ownerSlug||i),staleTime:3e4})}const q=u({tool:"manage_automations",body:e=>({action:"update",...e}),invalidateKeys:["automations-list","automation-detail","automations"],checkError:!1,successMessage:"Automation updated",errorMessage:"Failed to update Automation"}),v=u({tool:"manage_automations",body:e=>({action:"delete",automation_ids:[e]}),invalidateKeys:["automations-list","automation-detail","automations","agent-threads"],checkError:!1,successMessage:"Automation deleted",errorMessage:"Failed to delete Automation"}),A=u({tool:"manage_automations",body:e=>({action:"create",...e}),invalidateKeys:["automations-list","automations"],successMessage:"Automation created",errorMessage:"Failed to create Automation"});function f(){const e=r();return l({mutationFn:async a=>s("manage_automations",{action:"create_version",...a}),onSuccess:()=>{e.invalidateQueries({queryKey:["automations-list"]}),e.invalidateQueries({queryKey:["automation-detail"]}),e.invalidateQueries({queryKey:["automations"]})}})}function K(){const e=r();return l({mutationFn:async a=>s("manage_automations",{action:"set_reaction_script",...a}),onSuccess:()=>{e.invalidateQueries({queryKey:["automations-list"]}),e.invalidateQueries({queryKey:["automation-detail"]}),e.invalidateQueries({queryKey:["automations"]})}})}export{v as a,_ as b,A as c,f as d,K as e,q as f,y as g,g as u};
2
- //# sourceMappingURL=use-automations-BHoV0dLs.js.map
1
+ import{cP as o,fm as c,fn as u,a6 as r,bX as l,cQ as s}from"./index-DdBTTN3y.js";function y(){return o({queryKey:["automation-catalog"],queryFn:async()=>(await s("manage_catalog",{action:"list_catalog",kinds:["automations"]})).catalogs?.automations?.entries??[],staleTime:6e4})}function g(e,a,i){return o({queryKey:["automations-list",e,a,i?.includeDetails??!0],queryFn:async()=>(await s("manage_automations",{action:"list",entity_id:a,status:"active",include_details:i?.includeDetails??!0})).automations||[],enabled:!!e,staleTime:3e4})}function _(e,a,i,t={}){const n=c(t.ownerSlug);return o({queryKey:["automation-detail",n,e,a,t.since,t.until,t.templateVersion,t.includeVersions??!1],queryFn:async()=>await s("get_automation",{automation_id:e,entity_id:a,content_since:t.since,content_until:t.until,template_version:t.templateVersion,page_size:100,include_classification:"summary",include_versions:t.includeVersions??!1},{slug:n},{timeoutMs:3e4}),enabled:!!n&&!!e&&!!(t.ownerSlug||i),staleTime:3e4})}const f=u({tool:"manage_automations",body:e=>({action:"update",...e}),invalidateKeys:["automations-list","automation-detail","automations"],checkError:!1,successMessage:"Automation updated",errorMessage:"Failed to update Automation"}),q=u({tool:"manage_automations",body:e=>({action:"delete",automation_ids:[e]}),invalidateKeys:["automations-list","automation-detail","automations","agent-threads"],checkError:!1,successMessage:"Automation deleted",errorMessage:"Failed to delete Automation"}),v=u({tool:"manage_automations",body:e=>({action:"create",...e}),invalidateKeys:["automations-list","automations"],successMessage:"Automation created",errorMessage:"Failed to create Automation"});function A(){const e=r();return l({mutationFn:async a=>s("manage_automations",{action:"create_version",...a}),onSuccess:()=>{e.invalidateQueries({queryKey:["automations-list"]}),e.invalidateQueries({queryKey:["automation-detail"]}),e.invalidateQueries({queryKey:["automations"]})}})}function K(){const e=r();return l({mutationFn:async a=>s("manage_automations",{action:"set_reaction_script",...a}),onSuccess:()=>{e.invalidateQueries({queryKey:["automations-list"]}),e.invalidateQueries({queryKey:["automation-detail"]}),e.invalidateQueries({queryKey:["automations"]})}})}export{q as a,_ as b,v as c,A as d,K as e,f,y as g,g as u};
2
+ //# sourceMappingURL=use-automations-BLNjxq2K.js.map
@@ -0,0 +1,2 @@
1
+ import{r as d,j as e,V as U,i as R,W as D,B as W,Y as B,Z as I,$ as T,a0 as V,K,a1 as q}from"./index-DdBTTN3y.js";import{C as G,a as Y,b as Z,d as J,c as Q}from"./card-Bdi7VEwo.js";function z(s){if(!s)return null;try{const t=new URL(s);return t.protocol==="https:"&&t.hostname?t.toString():null}catch{return null}}function _(s){const t=z(s);if(!t)return null;const a=new URL(t).hostname.toLowerCase();return a.length>0&&a.length<=253&&/^[a-z0-9.-]+$/.test(a)?a:null}function X({clientName:s,logoUri:t=null,clientUri:a=null}){const[r,i]=d.useState(!1),[o,p]=d.useState(!1),g=r?null:z(t),j=o?null:_(a)??_(t);return g?e.jsx("img",{src:g,alt:"",referrerPolicy:"no-referrer",onError:()=>i(!0),className:"h-10 w-10 shrink-0 rounded-md object-contain"}):j?e.jsx("img",{src:`https://www.google.com/s2/favicons?domain=${encodeURIComponent(j)}&sz=64`,alt:"",referrerPolicy:"no-referrer",onError:()=>p(!0),className:"h-10 w-10 shrink-0 rounded-md bg-secondary object-contain"}):e.jsx("div",{"aria-hidden":"true",className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-secondary text-base font-bold text-secondary-foreground",children:(s??"?").charAt(0).toUpperCase()||"?"})}const H=["mcp:read","mcp:write","mcp:admin"],ee=[{value:"read",title:"Read only",description:"Search and view authorized workspace data."},{value:"write",title:"Read and make changes",description:"Includes read access. Create and update authorized workspace data."},{value:"admin",title:"Administer workspaces",description:"Includes read and write access. Manage administrator-only settings.",risk:"high"}],L={read:0,write:1,admin:2};function F(s){return s.includes("mcp:admin")?"admin":s.includes("mcp:write")?"write":s.includes("mcp:read")?"read":null}function se(s,t){const a=s.filter(i=>!H.includes(i));if(!t)return a;const r=F(s);return!r||L[t]>L[r]?a:["mcp:read",...t==="write"||t==="admin"?["mcp:write"]:[],...t==="admin"?["mcp:admin"]:[],...a]}function ie({idPrefix:s,clientName:t,clientNote:a,requestedScopes:r,accessLevel:i,onAccessLevelChange:o,allowNoAccess:p=!1,disabled:g=!1,resource:j=null,logoUri:w=null,clientUri:h=null}){const y=F(r),x=r.includes("profile:read"),m=r.filter(c=>!H.includes(c)&&c!=="profile:read"&&c!=="device_worker:run"&&c!=="connections:token");return e.jsxs("div",{className:"space-y-5",children:[e.jsx("section",{"aria-label":"Application",className:"space-y-2",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(X,{clientName:t,logoUri:w,clientUri:h}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:t||"Unnamed application"}),a?e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:a}):null,j&&e.jsxs("div",{className:"mt-2 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1.5",children:[e.jsx("p",{children:"Requesting access to"}),r.length>0&&e.jsx("p",{className:"flex flex-wrap gap-1.5",children:r.map(c=>e.jsx("span",{className:"px-1 py-0.5 font-mono text-[11px] text-foreground",children:c},c))})]}),e.jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:e.jsxs("p",{children:["on"," ",e.jsx("code",{className:"break-all rounded bg-muted px-1.5 py-0.5 font-mono text-xs text-foreground",children:j})]})})]})]})]})}),x&&e.jsxs("section",{"aria-labelledby":`${s}-profile`,className:"space-y-2",children:[e.jsx("p",{id:`${s}-profile`,className:"text-sm font-medium",children:"Account information"}),e.jsxs("div",{className:"rounded-md border p-3",children:[e.jsxs("p",{className:"flex flex-wrap items-center gap-2 text-sm font-medium text-foreground",children:["Basic profile",e.jsx(U,{variant:"secondary",children:"Always included"})]}),e.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground",children:"See your basic Lobu identity and the names and slugs of workspaces you belong to. This is separate from the workspace data access below."})]})]}),y&&e.jsxs("fieldset",{className:"space-y-2",disabled:g,children:[e.jsx("legend",{className:"text-sm font-medium",children:"What should this client have access to?"}),e.jsxs("div",{className:"space-y-2",children:[p?e.jsxs("label",{htmlFor:`${s}-access-none`,className:R("flex cursor-pointer items-start gap-3 rounded-md border p-3 transition-colors",i===null&&"border-primary bg-primary/5"),children:[e.jsx("input",{id:`${s}-access-none`,type:"radio",name:`${s}-access-level`,value:"none",checked:i===null,onChange:()=>o(null),className:"mt-1 h-4 w-4 accent-primary"}),e.jsxs("span",{className:"min-w-0 space-y-0.5",children:[e.jsx("span",{className:"block text-sm font-medium text-foreground",children:"No workspace data access"}),e.jsx("span",{className:"block text-sm text-muted-foreground",children:"Pair the device only. It won't read or write workspace data."})]})]}):null,ee.filter(c=>L[c.value]<=L[y]).map(c=>{const f=`${s}-access-${c.value}`,b=i===c.value;return e.jsxs("label",{htmlFor:f,className:R("flex cursor-pointer items-start gap-3 rounded-md border p-3 transition-colors",b&&"border-primary bg-primary/5"),children:[e.jsx("input",{id:f,type:"radio",name:`${s}-access-level`,value:c.value,checked:b,onChange:()=>o(c.value),className:"mt-1 h-4 w-4 accent-primary"}),e.jsxs("span",{className:"min-w-0 space-y-0.5",children:[e.jsxs("span",{className:"flex flex-wrap items-center gap-2 text-sm font-medium text-foreground",children:[c.title,c.risk==="high"&&e.jsx(D,{"aria-label":"High risk",className:"h-3.5 w-3.5 shrink-0 text-destructive",children:e.jsx("title",{children:"High risk"})})]}),e.jsx("span",{className:"block text-sm text-muted-foreground",children:c.description})]})]},c.value)})]})]}),m.length>0&&e.jsxs("section",{"aria-labelledby":`${s}-additional`,className:"space-y-2",children:[e.jsx("p",{id:`${s}-additional`,className:"text-sm font-medium",children:"Additional permissions"}),e.jsx("ul",{className:"space-y-2",children:m.map(c=>e.jsx("li",{className:"rounded-md border p-3 font-mono text-xs text-foreground",children:c},c))})]})]})}function oe({summary:s,children:t,className:a}){return e.jsxs("div",{className:R("flex flex-wrap items-center gap-3 border-t pt-4",s?"justify-between":"justify-end",a),children:[s?e.jsx("p",{className:"text-sm text-muted-foreground",children:s}):null,e.jsx("div",{className:"ml-auto flex items-center gap-3",children:t})]})}function de({busy:s,approveLabel:t="Approve",approveDisabled:a=!1,denyDisabled:r=!1,onApprove:i,onDeny:o}){return e.jsxs(e.Fragment,{children:[e.jsx(W,{type:"button",variant:"outline",onClick:o,disabled:r,children:s==="deny"?"Denying...":"Deny"}),e.jsx(W,{type:"button",onClick:i,disabled:a,children:s==="approve"?"Approving...":t})]})}function me({title:s,description:t,busy:a=!1,error:r=null,review:i,aside:o,below:p,notice:g,footer:j,live:w=!1}){return e.jsx("main",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center p-4",children:e.jsxs(G,{className:R("w-full",o?"max-w-4xl":"max-w-lg"),role:w?"status":void 0,"aria-live":w?"polite":void 0,children:[e.jsxs(Y,{children:[e.jsx(Z,{asChild:!0,children:e.jsx("h1",{children:s})}),t?e.jsx(J,{children:t}):null]}),e.jsxs(Q,{className:"space-y-5","aria-busy":a,children:[o?e.jsxs("div",{className:"grid gap-6 md:grid-cols-[minmax(0,1fr)_300px]",children:[e.jsx("div",{className:"min-w-0",children:i}),e.jsx("div",{className:"min-w-0",children:o})]}):i,p,g,r?e.jsx("p",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:r}):null,j]})]})})}function ue({resourceOrg:s,accessLevel:t}){return e.jsxs("section",{className:"rounded-md border border-primary/20 bg-primary/5 p-3 text-sm space-y-2",children:[e.jsxs("p",{className:"font-medium text-foreground",children:["Workspace access: only ",s]}),e.jsxs("ul",{className:"space-y-1 text-muted-foreground",children:[e.jsx("li",{children:"If this workspace is public, the app can read public data immediately after approval."}),t==="write"?e.jsx("li",{children:"If you are not already a member, this connection will stay read-only. Ask an organization admin to grant write access, then reconnect the MCP client."}):null,t==="admin"?e.jsx("li",{children:"If you are not already an admin or owner, elevated actions will stay blocked. Ask an organization owner to grant the required role, then reconnect the MCP client."}):null,t==="read"?e.jsx("li",{children:"Public read access does not require membership."}):null]})]})}function te(s){const t=K(s);return t.kind==="cross-host"?t.href:t.to}function pe({idPrefix:s,heading:t,orgList:a,selectedOrgIds:r,onWorkspaceAccessChange:i,onSelectedOrgChange:o,orgsLoading:p,orgsError:g,onRetry:j,disabled:w=!1,includedOrgId:h=null,allowMultiple:y}){const x=`${s}-workspace-access-legend`,m=`${s}-workspace-search`,[c,f]=d.useState(""),b=t??"Workspace access",N=h?a.find(n=>n.id===h)??null:null,k=a.filter(n=>n.id!==h),$=r.filter(n=>n!==h).length,A=h?$:r.length,E=k.length>0&&k.every(n=>r.includes(n.id));if(p)return e.jsxs("section",{"aria-labelledby":x,className:"space-y-2",children:[e.jsx("p",{id:x,className:"text-sm font-medium",children:b}),e.jsx("p",{role:"status","aria-live":"polite",className:"text-sm text-muted-foreground",children:"Loading your workspaces..."})]});if(g)return e.jsxs("section",{"aria-labelledby":x,className:"space-y-2",children:[e.jsx("p",{id:x,className:"text-sm font-medium",children:b}),e.jsxs("div",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:[e.jsx("p",{children:"Workspaces could not be loaded. Approval is unavailable until they load."}),e.jsx(W,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:j,children:"Retry"})]})]});if(a.length===0)return e.jsxs("section",{"aria-labelledby":x,className:"space-y-2",children:[e.jsx("p",{id:x,className:"text-sm font-medium",children:b}),e.jsx("p",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:"No member workspaces are available for this connection."})]});const M=()=>{if(E)for(const n of k)o(n.id,!1);else i("all_current")},S=c.trim().toLowerCase(),l=S?k.filter(n=>n.name.toLowerCase().includes(S)||n.slug.toLowerCase().includes(S)):k;return e.jsxs("fieldset",{className:"min-w-0 space-y-3",disabled:w,children:[e.jsx("legend",{id:x,className:"sr-only",children:b}),e.jsxs("p",{className:"text-sm font-medium",children:[b," ",e.jsxs("span",{className:"font-normal text-muted-foreground",children:["· ",A," selected"]})]}),e.jsxs("div",{className:"flex min-w-0 flex-col overflow-hidden rounded-md border bg-card",children:[e.jsxs("div",{className:"border-b bg-card p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Workspaces"}),y&&k.length>0&&e.jsx("button",{type:"button",onClick:M,className:"shrink-0 cursor-pointer bg-none p-0 text-xs font-semibold text-foreground underline underline-offset-4",children:E?"Clear all":`Select all ${k.length}`})]}),!h&&e.jsx("p",{className:"mt-0.5 whitespace-nowrap text-sm text-muted-foreground",children:y?"Choose workspaces for this app.":"Choose one workspace this application can access."}),e.jsx("input",{id:m,type:"search",value:c,onChange:n=>f(n.target.value),placeholder:"Filter workspaces…","aria-label":"Filter workspaces",className:"mt-2 flex h-9 w-full rounded-md border border-input bg-background px-3 text-sm focus:outline-none focus:ring-1 focus:ring-ring"})]}),e.jsxs("div",{className:"max-h-80 space-y-1.5 overflow-auto p-2",children:[N?e.jsxs("div",{className:"flex items-center gap-2.5 rounded-md bg-muted px-2.5 py-2",children:[e.jsx(B,{"aria-hidden":"true",className:"h-4 w-4 shrink-0 text-primary"}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"min-w-0 truncate",children:N.name}),N.isPersonal&&e.jsx(I,{"aria-label":"Personal workspace",className:"h-3.5 w-3.5 shrink-0 text-muted-foreground",children:e.jsx("title",{children:"Personal workspace"})}),e.jsx(U,{variant:"secondary",className:"shrink-0",children:"Device home"})]})}),e.jsx("span",{className:"sr-only",children:"Included"})]}):null,l.map(n=>{const u=`${s}-workspace-${n.id}`,v=r.includes(n.id);return e.jsxs("div",{className:R("flex items-center gap-2.5 rounded-md px-2.5 py-2 transition-colors hover:bg-muted/60",v&&"bg-primary/5 hover:bg-primary/5"),children:[e.jsx(T,{id:u,checked:v,disabled:w,onCheckedChange:C=>o(n.id,C===!0)}),e.jsx("label",{htmlFor:u,className:"min-w-0 flex-1 cursor-pointer truncate text-sm font-medium text-foreground",children:e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"min-w-0 truncate",children:n.name}),n.isPersonal&&e.jsx(I,{"aria-label":"Personal workspace",className:"h-3.5 w-3.5 shrink-0 text-muted-foreground",children:e.jsx("title",{children:"Personal workspace"})})]})}),e.jsx("a",{href:te(n.slug),target:"_blank",rel:"noopener noreferrer",onClick:C=>C.stopPropagation(),"aria-label":`Open ${n.name} workspace`,title:`Open ${n.name} workspace`,className:"shrink-0 rounded p-0.5 text-muted-foreground transition-colors hover:text-foreground",children:e.jsx(V,{className:"h-3.5 w-3.5"})})]},n.id)}),l.length===0&&!N&&e.jsx("p",{className:"px-2 py-3 text-[13px] text-muted-foreground",children:"No workspaces match."})]}),e.jsx("div",{className:"border-t bg-card px-3 py-2 text-xs text-muted-foreground",children:e.jsx("p",{"aria-live":"polite",children:h?`${$} additional workspace${$===1?"":"s"} selected.`:`${r.length} of ${a.length} workspaces selected.`})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Workspaces you join later are not added automatically."}),r.length===0&&e.jsx("p",{role:"alert",className:"text-xs text-destructive",children:"Choose at least one workspace."})]})}function ne(s,t){return s.length===t.length&&s.every((a,r)=>a===t[r])}function re(s={}){const{requireDeviceHome:t=!1,deviceHomeOrgId:a=null,allowMultiple:r=!0}=s,{data:i,error:o,isPending:p,refetch:g}=q(),[j,w]=d.useState("selected"),[h,y]=d.useState([]),x=d.useRef(!1),m=d.useMemo(()=>i?i.filter(l=>l.is_member).map(l=>({id:l.id,name:l.name,slug:l.slug,isPersonal:l.is_personal===!0})):[],[i]),c=m.find(l=>l.isPersonal)?.id??null,f=t?a&&m.some(l=>l.id===a)?a:c:null,b=d.useRef(m);b.current=m;const N=o instanceof Error?o.message:o?"Unable to load workspaces":null;d.useEffect(()=>{if(p||N)return;const l=m.map(u=>u.id),n=new Set(l);y(u=>{const v=x.current?u.filter(C=>n.has(C)):[c??l[0]].filter(C=>!!C);return x.current=!0,ne(u,v)?u:v})},[m,N,p,c]);const k=d.useCallback(l=>{if(l==="all_current"){if(!r)return;y(b.current.map(n=>n.id))}w(l)},[r]),$=d.useCallback((l,n)=>{b.current.some(u=>u.id===l)&&(t&&(l===f||!r)||(w("selected"),y(u=>n?r?u.includes(l)?u:[...u,l]:[l]:u.filter(v=>v!==l))))},[r,f,t]),A=d.useMemo(()=>{if(t&&f&&!r)return[f];const l=new Set(h);return t&&f&&l.add(f),m.filter(n=>l.has(n.id)).map(n=>n.id)},[r,h,f,m,t]),E=d.useCallback(()=>{const l=b.current,n=l.find(u=>u.isPersonal)?.id??l[0]?.id;x.current=l.length>0,w("selected"),y(n?[n]:[])},[]),M=!p&&!N&&m.length>0&&A.length>0&&(r||A.length===1)&&(!t||f!==null&&A.includes(f)),S=d.useCallback(()=>{g()},[g]);return{orgList:m,workspaceAccess:j,setWorkspaceAccess:k,selectedOrgIds:A,toggleSelectedOrgId:$,resetWorkspaceSelection:E,personalOrgId:c,deviceHomeOrgId:f,orgsLoading:p,orgsError:N,retryOrgs:S,workspaceSelectionReady:M}}function ae(s){if(!s)return null;try{return new URL(s).pathname.match(/^\/mcp\/([^/]+)$/)?.[1]?.trim()||null}catch{return null}}function he({requestedScopes:s,resource:t=null,allowMultiple:a,requireDeviceHome:r=!1,deviceHomeOrgId:i=null}){const o=F(s),[p,g]=d.useState(o);d.useEffect(()=>{g(F(s))},[s]);const j=d.useMemo(()=>se(s,p),[s,p]),w=d.useMemo(()=>ae(t),[t]),h=j.some(m=>m.startsWith("mcp:")),y=h&&!w,x=re({allowMultiple:a,requireDeviceHome:r,deviceHomeOrgId:i});return{accessLevel:p,setAccessLevel:g,selectedScopes:j,resourceOrg:w,hasMcpScopes:h,requiresWorkspaceAccess:y,...x}}function P(s){return typeof s=="string"&&s.length>0?s:null}function xe(s,t){return P(s?.error_description)??P(s?.message)??P(s?.error)??t}function O(s=window.location.href){const t=new URL("/auth/login",window.location.origin);return t.searchParams.set("callbackUrl",s),t.toString()}function fe(){window.location.href=O()}function ge(s,t){d.useEffect(()=>{t||s||(window.location.href=O())},[s,t])}export{ie as A,me as C,ue as R,pe as W,ge as a,oe as b,de as c,F as g,xe as o,fe as r,he as u};
2
+ //# sourceMappingURL=use-login-redirect-CmyQW7GT.js.map