@xopcai/xopc 0.0.331 → 0.0.333

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 (388) hide show
  1. package/dist/browser-ext/manifest.json +1 -1
  2. package/dist/extensions/telegram/xopc.extension.json +1 -1
  3. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-B0BtF24E.js → agent-avatar-dicebear-DiI2O7lC.js} +1 -1
  4. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CVp3J969.js +1 -0
  5. package/dist/gateway/static/root/assets/{agent-plugin-dialog-DbvLXQO2.js → agent-plugin-dialog-CacyndrS.js} +1 -1
  6. package/dist/gateway/static/root/assets/agents-DXYZSuUV.js +70 -0
  7. package/dist/gateway/static/root/assets/{app-management-settings-panel-fwzTRJfP.js → app-management-settings-panel-BcszTlqr.js} +1 -1
  8. package/dist/gateway/static/root/assets/{appearance-settings-v_GGe8UZ.js → appearance-settings-B1XPe8qz.js} +1 -1
  9. package/dist/gateway/static/root/assets/{apps-page-C9ZMEuuA.js → apps-page-ZqANbUZv.js} +1 -1
  10. package/dist/gateway/static/root/assets/{archive-plugin-B6EgADeH.js → archive-plugin-MjUsJcNb.js} +1 -1
  11. package/dist/gateway/static/root/assets/{attachment-load-B4H_IFeX.js → attachment-load-DHa-BI9a.js} +1 -1
  12. package/dist/gateway/static/root/assets/{automations-page-UlVCvg4r.js → automations-page-Dsjivdxs.js} +1 -1
  13. package/dist/gateway/static/root/assets/automations-workspace-B37vs5tk.js +7 -0
  14. package/dist/gateway/static/root/assets/{binary-plugins-BxTSx30f.js → binary-plugins-DQYcuBHP.js} +1 -1
  15. package/dist/gateway/static/root/assets/{block-editor-CVzdrpjl.js → block-editor-Bx0uXbJP.js} +3 -3
  16. package/dist/gateway/static/root/assets/{browser-automation-inputs-C5s1yHOu.js → browser-automation-inputs-1ZIPGDeq.js} +1 -1
  17. package/dist/gateway/static/root/assets/{browser-automations-page-CBVD8k6O.js → browser-automations-page-CCjYipHc.js} +2 -2
  18. package/dist/gateway/static/root/assets/browser-settings-page-CSv4rvmx.js +3 -0
  19. package/dist/gateway/static/root/assets/capabilities-BnO9LV7U.js +1 -0
  20. package/dist/gateway/static/root/assets/{capabilities-page-BAT7Vvb8.js → capabilities-page-BfvDvIY1.js} +2 -2
  21. package/dist/gateway/static/root/assets/capabilities-settings-panel-CoW7-ESq.js +8 -0
  22. package/dist/gateway/static/root/assets/{capability-header-actions-EETjXmkG.js → capability-header-actions-D_hbWRRF.js} +1 -1
  23. package/dist/gateway/static/root/assets/channels-BhMaRh1x.js +1 -0
  24. package/dist/gateway/static/root/assets/{chat-terminal-dock-DCqm9j9W.js → chat-terminal-dock-Fnum_IEm.js} +1 -1
  25. package/dist/gateway/static/root/assets/{computer-settings-page-CxFWdovV.js → computer-settings-page-DI1zfCTA.js} +1 -1
  26. package/dist/gateway/static/root/assets/{connector-service-page-wxsEhmlU.js → connector-service-page-CiGDAubm.js} +1 -1
  27. package/dist/gateway/static/root/assets/connectors-page-Ono0Pha1.js +2 -0
  28. package/dist/gateway/static/root/assets/{date-picker-h_OS6uBR.js → date-picker-D-JhzZyW.js} +1 -1
  29. package/dist/gateway/static/root/assets/{dependency-picker-DNgSSH3z.js → dependency-picker-DpD3xaEB.js} +1 -1
  30. package/dist/gateway/static/root/assets/{desktop-pet-CflvPnB-.js → desktop-pet-CCoDxKqh.js} +1 -1
  31. package/dist/gateway/static/root/assets/{desktop-pet-settings-CXy0X5Js.js → desktop-pet-settings-GxndKfCx.js} +1 -1
  32. package/dist/gateway/static/root/assets/{device-pairing-wizard-BDMiJcsK.js → device-pairing-wizard-B71w3ptm.js} +1 -1
  33. package/dist/gateway/static/root/assets/{directory-picker-path-field-BqkOh13m.js → directory-picker-path-field-CUzjJvjs.js} +1 -1
  34. package/dist/gateway/static/root/assets/{extension-debug-page-VT4s-9pK.js → extension-debug-page-BtDY8ntX.js} +1 -1
  35. package/dist/gateway/static/root/assets/{extension-page-CBSeGhGA.js → extension-page-D9_XF-XC.js} +1 -1
  36. package/dist/gateway/static/root/assets/{extension-settings-page-DRB6uOo8.js → extension-settings-page-CjhUFAaC.js} +1 -1
  37. package/dist/gateway/static/root/assets/{gateway-config-swr-cR-tz7-Q.js → gateway-config-swr-CgIjCxM8.js} +1 -1
  38. package/dist/gateway/static/root/assets/{gateway-settings-lF-FpnZy.js → gateway-settings-BWaCnwT1.js} +1 -1
  39. package/dist/gateway/static/root/assets/{gateway-startup-retry-6jLRcQsu.js → gateway-startup-retry-i-1lTrwY.js} +1 -1
  40. package/dist/gateway/static/root/assets/home-page-BTjGLngn.js +1 -0
  41. package/dist/gateway/static/root/assets/{image-generation-api-CSSkwsyC.js → image-generation-api-gilc-u7M.js} +1 -1
  42. package/dist/gateway/static/root/assets/{imports-page-DGkOijwE.js → imports-page-BEtq5BRU.js} +1 -1
  43. package/dist/gateway/static/root/assets/index-DHL16aYZ.js +121 -0
  44. package/dist/gateway/static/root/assets/index-N1e6PDwx.css +1 -0
  45. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-iU6c2zg1.js → keyboard-shortcuts-settings-JUYY_18v.js} +1 -1
  46. package/dist/gateway/static/root/assets/local-app-workbench-page-uI7mtoVz.js +1 -0
  47. package/dist/gateway/static/root/assets/{local-apps-page-C0BWC8D2.js → local-apps-page-BlYESNqz.js} +1 -1
  48. package/dist/gateway/static/root/assets/{locale-store-wNXWkWu5.js → locale-store-BY30D6tg.js} +1 -1
  49. package/dist/gateway/static/root/assets/{logs-page-Dpoi-r-_.js → logs-page-BbLQreeN.js} +2 -2
  50. package/dist/gateway/static/root/assets/management-settings-c4krhYU7.js +1 -0
  51. package/dist/gateway/static/root/assets/{markdown-view-DlT9KqwF.js → markdown-view-BEeXMfDw.js} +1 -1
  52. package/dist/gateway/static/root/assets/{media-plugins-C8E_F2F_.js → media-plugins-DEFN1I73.js} +1 -1
  53. package/dist/gateway/static/root/assets/messages-_6IXbP2u.js +3 -0
  54. package/dist/gateway/static/root/assets/note-detail-panel--09xGxyE.js +5 -0
  55. package/dist/gateway/static/root/assets/notes-page-DsxcVBXF.js +8 -0
  56. package/dist/gateway/static/root/assets/{page-context-capture-button-qqWG_gs_.js → page-context-capture-button-D43aVpCj.js} +1 -1
  57. package/dist/gateway/static/root/assets/{page-tabs-b3lheKy4.js → page-tabs-BhYBCqls.js} +1 -1
  58. package/dist/gateway/static/root/assets/{preview-open-alternatives-0Q4rTfGX.js → preview-open-alternatives-CP8agNlc.js} +1 -1
  59. package/dist/gateway/static/root/assets/{product-open-page-jnJZCrKQ.js → product-open-page-CU7fRhfT.js} +1 -1
  60. package/dist/gateway/static/root/assets/project-detail-page-U-EdDfAW.js +1 -0
  61. package/dist/gateway/static/root/assets/{projects-page-r96k_2wB.js → projects-page-DUOKZLt7.js} +1 -1
  62. package/dist/gateway/static/root/assets/{registry-api-BIpltJ47.js → registry-api-BvVx0G1o.js} +1 -1
  63. package/dist/gateway/static/root/assets/{remote-access-hub-B1d8pB_y.js → remote-access-hub-fVPQe5YS.js} +1 -1
  64. package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-Do_iF13W.js → runtime-tools-settings-panel-Czvzsuj_.js} +2 -2
  65. package/dist/gateway/static/root/assets/scenes-page-C0-WHOY3.js +2 -0
  66. package/dist/gateway/static/root/assets/{schema-form-Cfft26Je.js → schema-form-B9Ni5O93.js} +1 -1
  67. package/dist/gateway/static/root/assets/sessions-page-DdXvW09N.js +1 -0
  68. package/dist/gateway/static/root/assets/settings-advanced-gate-BtF83fBY.js +1 -0
  69. package/dist/gateway/static/root/assets/{settings-form-section-iI0MTyuU.js → settings-form-section-jquf1P7n.js} +1 -1
  70. package/dist/gateway/static/root/assets/{settings-page-C2Ka9oJm.js → settings-page-DPomsvba.js} +1 -1
  71. package/dist/gateway/static/root/assets/{setup-status-panel-nnmS_p5h.js → setup-status-panel-BvVlqpHf.js} +1 -1
  72. package/dist/gateway/static/root/assets/{share-preview-page-D0Knvtlp.js → share-preview-page-b9DI0N1J.js} +1 -1
  73. package/dist/gateway/static/root/assets/shares-settings-R_qwc4DN.js +1 -0
  74. package/dist/gateway/static/root/assets/{skill-api-BuZKcy9b.js → skill-api-Bu7-3w-L.js} +1 -1
  75. package/dist/gateway/static/root/assets/skill-reload-api-CNJAQ_e-.js +1 -0
  76. package/dist/gateway/static/root/assets/{skills-page-DcxWxIrR.js → skills-page-D7XPEQu_.js} +1 -1
  77. package/dist/gateway/static/root/assets/{system-settings-panel-CMG0ZAsd.js → system-settings-panel-BwFR0Uci.js} +1 -1
  78. package/dist/gateway/static/root/assets/task-detail-page-PFjGW2g1.js +1 -0
  79. package/dist/gateway/static/root/assets/{tunnel-api-DGYA6GyO.js → tunnel-api-PfucxMP3.js} +1 -1
  80. package/dist/gateway/static/root/assets/usage-page-t_zdQHcy.js +1 -0
  81. package/dist/gateway/static/root/assets/{use-autosave-CDemMoSX.js → use-autosave-DLyy2wHz.js} +1 -1
  82. package/dist/gateway/static/root/assets/user-model-page-OyfPVfB9.js +2 -0
  83. package/dist/gateway/static/root/assets/{voice-api-key-field-CXArY4t5.js → voice-api-key-field-CQDY5EBK.js} +1 -1
  84. package/dist/gateway/static/root/assets/{voice-config-api-ujEySjyc.js → voice-config-api-Bwy3Al3J.js} +1 -1
  85. package/dist/gateway/static/root/assets/{work-discovery-overlay-Dk5KsKOm.js → work-discovery-overlay-CJzqJ47I.js} +1 -1
  86. package/dist/gateway/static/root/assets/{workflow-run-setup-panel-DNpdaI-2.js → workflow-run-setup-panel-sCOk-esV.js} +2 -2
  87. package/dist/gateway/static/root/assets/workflows-page-DYBGjN7C.js +6 -0
  88. package/dist/gateway/static/root/index.html +9 -9
  89. package/dist/package.js +1 -1
  90. package/dist/packages/gateway-contract/src/automations.js +59 -14
  91. package/dist/packages/gateway-contract/src/capabilities.js +106 -8
  92. package/dist/packages/gateway-contract/src/index.js +2 -0
  93. package/dist/packages/gateway-contract/src/scenes.js +7 -6
  94. package/dist/packages/gateway-contract/src/sessions.js +2 -1
  95. package/dist/packages/gateway-contract/src/usage.js +6 -0
  96. package/dist/src/agent/agent-manager.js +13 -7
  97. package/dist/src/agent/background-review/run-background-review.js +7 -2
  98. package/dist/src/agent/bootstrap/filter-bootstrap-files.js +1 -1
  99. package/dist/src/agent/embedded/run-turn.js +7 -1
  100. package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
  101. package/dist/src/agent/external-tools/gateway-tools.d.ts +2 -1
  102. package/dist/src/agent/external-tools/gateway-tools.js +44 -11
  103. package/dist/src/agent/external-tools/index.js +1 -1
  104. package/dist/src/agent/image/tool-model-config.js +1 -1
  105. package/dist/src/agent/image/understanding/pi-ai-provider.js +1 -1
  106. package/dist/src/agent/memory/compaction.js +4 -0
  107. package/dist/src/agent/orchestration/agent-orchestrator.js +0 -21
  108. package/dist/src/agent/service/btw-query.js +8 -2
  109. package/dist/src/agent/service.js +3 -3
  110. package/dist/src/agent/skills/filesystem-watcher.js +1 -1
  111. package/dist/src/agent/skills/hub-pull.js +2 -2
  112. package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +1 -1
  113. package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +1 -1
  114. package/dist/src/agent/tasks/task-judge-service.js +4 -0
  115. package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
  116. package/dist/src/agent/tool-manuals/xopc-use.js +5 -4
  117. package/dist/src/agent/tools/automation-tool.d.ts +4 -1
  118. package/dist/src/agent/tools/automation-tool.js +42 -4
  119. package/dist/src/agent/tools/session-search-tool.js +1 -1
  120. package/dist/src/agent/tools/web-extract.js +1 -1
  121. package/dist/src/agent/tools/xopc-use-tool.js +50 -9
  122. package/dist/src/agent-catalog/capabilities.js +2 -2
  123. package/dist/src/ai-assist/text-assist.js +5 -1
  124. package/dist/src/auth/credentials.js +1 -1
  125. package/dist/src/auth/oauth-provider-lock.js +1 -1
  126. package/dist/src/auth/sync-provider-auth.js +1 -1
  127. package/dist/src/automations/api/routes.js +65 -0
  128. package/dist/src/automations/capabilities/drafts.js +1 -1
  129. package/dist/src/automations/capabilities/read.js +24 -0
  130. package/dist/src/automations/capabilities/write.d.ts +69 -14
  131. package/dist/src/automations/capabilities/write.js +78 -5
  132. package/dist/src/automations/delivery/delivery-router.d.ts +50 -0
  133. package/dist/src/automations/delivery/delivery-router.js +318 -0
  134. package/dist/src/automations/delivery/index.d.ts +1 -0
  135. package/dist/src/automations/delivery/index.js +2 -0
  136. package/dist/src/automations/domain/defaults.d.ts +0 -1
  137. package/dist/src/automations/domain/defaults.js +2 -2
  138. package/dist/src/automations/domain/index.js +2 -2
  139. package/dist/src/automations/domain/types.d.ts +180 -7
  140. package/dist/src/automations/domain/validation.d.ts +172 -22
  141. package/dist/src/automations/domain/validation.js +82 -13
  142. package/dist/src/automations/draft/automation-draft-prompt.js +3 -4
  143. package/dist/src/automations/draft/automation-draft-service.js +6 -0
  144. package/dist/src/automations/draft/automation-draft-validator.d.ts +31 -3
  145. package/dist/src/automations/draft/automation-draft-validator.js +5 -4
  146. package/dist/src/automations/events/event-catalog.d.ts +14 -0
  147. package/dist/src/automations/events/event-catalog.js +117 -0
  148. package/dist/src/automations/events/event-dispatcher.d.ts +27 -0
  149. package/dist/src/automations/events/event-dispatcher.js +140 -0
  150. package/dist/src/automations/events/event-repository.d.ts +59 -0
  151. package/dist/src/automations/events/event-repository.js +361 -0
  152. package/dist/src/automations/events/index.d.ts +3 -0
  153. package/dist/src/automations/events/index.js +4 -0
  154. package/dist/src/automations/index.d.ts +3 -1
  155. package/dist/src/automations/index.js +9 -3
  156. package/dist/src/automations/service/action-executor.d.ts +20 -1
  157. package/dist/src/automations/service/action-executor.js +80 -24
  158. package/dist/src/automations/service/automation-service.d.ts +21 -4
  159. package/dist/src/automations/service/automation-service.js +150 -100
  160. package/dist/src/automations/storage/automation-repository.js +7 -7
  161. package/dist/src/automations/storage/automation-run-repository.d.ts +1 -0
  162. package/dist/src/automations/storage/automation-run-repository.js +26 -1
  163. package/dist/src/automations/storage/index.js +2 -2
  164. package/dist/src/automations/webhook-secrets.d.ts +1 -0
  165. package/dist/src/automations/webhook-secrets.js +16 -0
  166. package/dist/src/bootstrap/application-state.js +1 -1
  167. package/dist/src/capabilities/runtime/dispatcher.js +1 -1
  168. package/dist/src/capabilities/runtime/product.js +1 -1
  169. package/dist/src/capabilities/store-connector.d.ts +17 -1
  170. package/dist/src/capabilities/store-connector.js +69 -3
  171. package/dist/src/chat-commands/agent-edit.js +1 -1
  172. package/dist/src/chat-commands/builtins/config.js +1 -1
  173. package/dist/src/cli/commands/agent.js +1 -1
  174. package/dist/src/cli/commands/agents.js +1 -1
  175. package/dist/src/cli/commands/connectors.js +4 -3
  176. package/dist/src/cli/commands/doctor/checks/automation-integrity.d.ts +2 -0
  177. package/dist/src/cli/commands/doctor/checks/automation-integrity.js +55 -0
  178. package/dist/src/cli/commands/doctor/checks/database-relations.d.ts +2 -0
  179. package/dist/src/cli/commands/doctor/checks/database-relations.js +81 -0
  180. package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
  181. package/dist/src/cli/commands/doctor/flow.js +5 -1
  182. package/dist/src/cli/commands/extension-marketplace.js +1 -1
  183. package/dist/src/cli/commands/models.js +1 -1
  184. package/dist/src/cli/commands/onboard/model.js +2 -2
  185. package/dist/src/cli/commands/skills.js +1 -1
  186. package/dist/src/cli/utils/init-workspace-core.js +1 -1
  187. package/dist/src/config/index.js +4 -4
  188. package/dist/src/config/loader.js +2 -2
  189. package/dist/src/config/models-json.js +1 -1
  190. package/dist/src/config/schema.d.ts +4 -0
  191. package/dist/src/config/schema.js +5 -1
  192. package/dist/src/connectors/approval-resume.js +1 -1
  193. package/dist/src/connectors/cli/store.js +1 -1
  194. package/dist/src/connectors/composio-backends.js +14 -4
  195. package/dist/src/connectors/composio-managed-events.d.ts +5 -2
  196. package/dist/src/connectors/composio-managed-events.js +4 -1
  197. package/dist/src/connectors/connection-recovery-service.d.ts +2 -1
  198. package/dist/src/connectors/connection-recovery-service.js +89 -4
  199. package/dist/src/discussions/analyzer.js +4 -4
  200. package/dist/src/extensions/agent-plugins/validation.js +1 -1
  201. package/dist/src/extensions/update.js +1 -1
  202. package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
  203. package/dist/src/gateway/agents-admin.js +2 -2
  204. package/dist/src/gateway/file-path-classifier.js +1 -1
  205. package/dist/src/gateway/home-intelligence-automation-reconciler.d.ts +3 -0
  206. package/dist/src/gateway/home-intelligence-automation-reconciler.js +52 -0
  207. package/dist/src/gateway/hono/lib/config-payload.js +1 -1
  208. package/dist/src/gateway/hono/routes/capabilities.js +1 -1
  209. package/dist/src/gateway/hono/routes/config-patch/misc.js +18 -4
  210. package/dist/src/gateway/hono/routes/connection-waits.js +3 -2
  211. package/dist/src/gateway/hono/routes/home.js +0 -1
  212. package/dist/src/gateway/hono/routes/lazy-bundles.js +14 -1
  213. package/dist/src/gateway/hono/routes/notes.js +2 -2
  214. package/dist/src/gateway/hono/routes/projects.js +2 -2
  215. package/dist/src/gateway/hono/routes/public-gateway.js +93 -3
  216. package/dist/src/gateway/hono/routes/scenes.js +57 -41
  217. package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
  218. package/dist/src/gateway/hono/routes/sessions.js +15 -0
  219. package/dist/src/gateway/hono/routes/tasks.js +1 -1
  220. package/dist/src/gateway/hono/routes/update.js +6 -1
  221. package/dist/src/gateway/hono/routes/usage.d.ts +3 -0
  222. package/dist/src/gateway/hono/routes/usage.js +61 -0
  223. package/dist/src/gateway/hono/routes/voice.js +1 -1
  224. package/dist/src/gateway/image-generation-setup.js +2 -2
  225. package/dist/src/gateway/lock.js +1 -1
  226. package/dist/src/gateway/memory-maintenance-automation-reconciler.js +21 -15
  227. package/dist/src/gateway/scenes/host.js +27 -14
  228. package/dist/src/gateway/scenes/slackThreadSource.d.ts +2 -2
  229. package/dist/src/gateway/security/gateway-scopes.js +1 -0
  230. package/dist/src/gateway/service/active-execution.d.ts +19 -0
  231. package/dist/src/gateway/service/active-execution.js +16 -0
  232. package/dist/src/gateway/service/agent-runner.d.ts +4 -0
  233. package/dist/src/gateway/service/agent-runner.js +19 -1
  234. package/dist/src/gateway/service/marketplace-service.js +2 -2
  235. package/dist/src/gateway/service/run-gateway-agent.d.ts +2 -0
  236. package/dist/src/gateway/service/run-gateway-agent.js +9 -1
  237. package/dist/src/gateway/service/sessions-api.d.ts +13 -0
  238. package/dist/src/gateway/service/sessions-api.js +23 -0
  239. package/dist/src/gateway/service.d.ts +7 -3
  240. package/dist/src/gateway/service.js +108 -89
  241. package/dist/src/gateway/side-chat/run-service.js +10 -7
  242. package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
  243. package/dist/src/home-intelligence/generator.js +4 -1
  244. package/dist/src/home-intelligence/host.d.ts +1 -1
  245. package/dist/src/home-intelligence/host.js +2 -10
  246. package/dist/src/home-intelligence/notification.js +1 -1
  247. package/dist/src/home-intelligence/repository.d.ts +1 -1
  248. package/dist/src/infra/domain-outbox-dispatcher.d.ts +0 -3
  249. package/dist/src/infra/domain-outbox-dispatcher.js +15 -7
  250. package/dist/src/infra/update-check.d.ts +8 -4
  251. package/dist/src/infra/update-check.js +43 -41
  252. package/dist/src/infra/update-startup.d.ts +7 -1
  253. package/dist/src/infra/update-startup.js +15 -6
  254. package/dist/src/local-apps/service.js +2 -2
  255. package/dist/src/memory-maintenance/index.js +2 -2
  256. package/dist/src/memory-maintenance/schedule.d.ts +0 -3
  257. package/dist/src/memory-maintenance/schedule.js +1 -8
  258. package/dist/src/notes/service.js +2 -3
  259. package/dist/src/projects/project-service.js +1 -2
  260. package/dist/src/projects/project-skill-service.js +2 -2
  261. package/dist/src/providers/model-call.d.ts +3 -2
  262. package/dist/src/providers/model-call.js +30 -5
  263. package/dist/src/providers/model-catalog-persistence.js +1 -1
  264. package/dist/src/scenes/activationAdapter.d.ts +19 -0
  265. package/dist/src/scenes/activationAdapter.js +1 -0
  266. package/dist/src/scenes/agentExecutor.js +3 -10
  267. package/dist/src/scenes/contracts.d.ts +3 -9
  268. package/dist/src/scenes/contracts.js +1 -0
  269. package/dist/src/scenes/execution.d.ts +9 -3
  270. package/dist/src/scenes/execution.js +12 -11
  271. package/dist/src/scenes/httpServices.d.ts +5 -2
  272. package/dist/src/scenes/mailContext.d.ts +4 -0
  273. package/dist/src/scenes/mailContext.js +9 -0
  274. package/dist/src/scenes/maintenance.js +1 -5
  275. package/dist/src/scenes/metrics.d.ts +0 -6
  276. package/dist/src/scenes/metrics.js +0 -11
  277. package/dist/src/scenes/registry.d.ts +11 -0
  278. package/dist/src/scenes/registry.js +28 -0
  279. package/dist/src/scenes/repository.d.ts +6 -3
  280. package/dist/src/scenes/repository.js +43 -5
  281. package/dist/src/scenes/service.d.ts +2 -1
  282. package/dist/src/scenes/service.js +9 -7
  283. package/dist/src/scenes/taskFollowUp/contracts.d.ts +37 -7
  284. package/dist/src/scenes/taskFollowUp/contracts.js +36 -17
  285. package/dist/src/scenes/taskFollowUp/service.d.ts +35 -7
  286. package/dist/src/scenes/taskFollowUp/service.js +86 -28
  287. package/dist/src/scenes/templates.d.ts +2 -2
  288. package/dist/src/scenes/userNotes.d.ts +3 -0
  289. package/dist/src/scenes/userNotes.js +6 -0
  290. package/dist/src/session/client-history.d.ts +3 -0
  291. package/dist/src/session/client-history.js +10 -5
  292. package/dist/src/session/manager.d.ts +1 -0
  293. package/dist/src/session/resolve-session.js +4 -3
  294. package/dist/src/session/session-title.js +1 -1
  295. package/dist/src/session/store.d.ts +1 -0
  296. package/dist/src/session/store.js +3 -2
  297. package/dist/src/storage/sqlite/ai-usage-repository.d.ts +137 -0
  298. package/dist/src/storage/sqlite/ai-usage-repository.js +175 -0
  299. package/dist/src/storage/sqlite/connector-account-repository.js +7 -5
  300. package/dist/src/storage/sqlite/connector-repository.js +36 -34
  301. package/dist/src/storage/sqlite/index.d.ts +2 -2
  302. package/dist/src/storage/sqlite/index.js +3 -3
  303. package/dist/src/storage/sqlite/migrations/208_automation_management.sql +2 -0
  304. package/dist/src/storage/sqlite/migrations/209_automation_event_hub.sql +48 -0
  305. package/dist/src/storage/sqlite/migrations/210_remove_legacy_automation_timeout.sql +14 -0
  306. package/dist/src/storage/sqlite/migrations/211_automation_result_deliveries.sql +16 -0
  307. package/dist/src/storage/sqlite/migrations/212_automation_delivery_policy.sql +30 -0
  308. package/dist/src/storage/sqlite/migrations/213_automation_reliability_contract.sql +188 -0
  309. package/dist/src/storage/sqlite/migrations/214_ai_usage_ledger.sql +41 -0
  310. package/dist/src/storage/sqlite/migrations/215_scene_execution_adapters.sql +6 -0
  311. package/dist/src/storage/sqlite/migrations/216_remove_scene_model_usage.sql +1 -0
  312. package/dist/src/storage/sqlite/migrations/217_remove_legacy_memory_tables.sql +4 -0
  313. package/dist/src/storage/sqlite/migrations/218_core_relation_indexes.sql +26 -0
  314. package/dist/src/storage/sqlite/migrations/219_json_contracts.sql +123 -0
  315. package/dist/src/storage/sqlite/migrations/220_normalize_timestamps.sql +339 -0
  316. package/dist/src/storage/sqlite/migrations/221_ai_usage_retention_index.sql +2 -0
  317. package/dist/src/storage/sqlite/migrations/222_session_config_authority.sql +13 -0
  318. package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
  319. package/dist/src/storage/sqlite/migrations/runner.js +4 -4
  320. package/dist/src/storage/sqlite/row-mappers.d.ts +3 -7
  321. package/dist/src/storage/sqlite/row-mappers.js +6 -6
  322. package/dist/src/storage/sqlite/scenes-schema.d.ts +1 -1
  323. package/dist/src/storage/sqlite/scenes-schema.js +0 -1
  324. package/dist/src/storage/sqlite/schema.js +1 -1
  325. package/dist/src/storage/sqlite/schema.sql +0 -52
  326. package/dist/src/storage/sqlite/schemas/scenes.sql +0 -7
  327. package/dist/src/storage/sqlite/session-input-repository.d.ts +8 -0
  328. package/dist/src/storage/sqlite/session-input-repository.js +18 -1
  329. package/dist/src/storage/sqlite/session-read-repository.d.ts +1 -1
  330. package/dist/src/storage/sqlite/session-read-repository.js +0 -1
  331. package/dist/src/storage/sqlite/session-repository.d.ts +0 -4
  332. package/dist/src/storage/sqlite/session-repository.js +8 -18
  333. package/dist/src/storage/sqlite/timestamps.d.ts +4 -0
  334. package/dist/src/storage/sqlite/timestamps.js +20 -0
  335. package/dist/src/storage/sqlite/transcript-repository.d.ts +1 -0
  336. package/dist/src/storage/sqlite/transcript-repository.js +23 -15
  337. package/dist/src/storage/sqlite/user-trust-repository.js +4 -2
  338. package/dist/src/tasks/capabilities/read.js +2 -2
  339. package/dist/src/tasks/capabilities/write.d.ts +1 -1
  340. package/dist/src/tasks/home-query-service.js +4 -3
  341. package/dist/src/tasks/task-contract-planner.js +1 -1
  342. package/dist/src/tui/backends/embedded-backend.js +2 -2
  343. package/dist/src/tui/tui-commands.js +1 -1
  344. package/dist/src/tui/tui-startup-resources.js +1 -1
  345. package/dist/src/tui/tui.js +1 -1
  346. package/dist/src/usage/cost.d.ts +4 -0
  347. package/dist/src/usage/cost.js +28 -0
  348. package/dist/src/usage/recorder.d.ts +13 -0
  349. package/dist/src/usage/recorder.js +117 -0
  350. package/dist/src/usage/scenario-registry.d.ts +8 -0
  351. package/dist/src/usage/scenario-registry.js +117 -0
  352. package/dist/src/usage/types.d.ts +55 -0
  353. package/dist/src/usage/types.js +1 -0
  354. package/dist/src/user-context/config.d.ts +9 -0
  355. package/dist/src/user-context/config.js +13 -4
  356. package/dist/src/voice/realtime/persona-context.js +1 -1
  357. package/dist/src/voice/tts/summarize.js +1 -1
  358. package/dist/src/work-discovery/analyzer.js +2 -2
  359. package/dist/src/work-discovery/investigator.js +1 -1
  360. package/dist/src/workflows/service/workflow-run-service.js +15 -2
  361. package/package.json +6 -6
  362. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DgP5DEJF.js +0 -1
  363. package/dist/gateway/static/root/assets/agents-Bh4XNLyk.js +0 -70
  364. package/dist/gateway/static/root/assets/automations-workspace-C7VS-yb7.js +0 -7
  365. package/dist/gateway/static/root/assets/browser-settings-page-CC43CC43.js +0 -3
  366. package/dist/gateway/static/root/assets/capabilities-sAZT4brT.js +0 -1
  367. package/dist/gateway/static/root/assets/capabilities-settings-panel-DPETQOfF.js +0 -8
  368. package/dist/gateway/static/root/assets/channels-CwA619os.js +0 -1
  369. package/dist/gateway/static/root/assets/connectors-page-l7goF6QS.js +0 -2
  370. package/dist/gateway/static/root/assets/home-page-DSaXXoLm.js +0 -1
  371. package/dist/gateway/static/root/assets/index-BEw0xrde.css +0 -1
  372. package/dist/gateway/static/root/assets/index-D99vN3es.js +0 -121
  373. package/dist/gateway/static/root/assets/local-app-workbench-page-rH33N8I9.js +0 -1
  374. package/dist/gateway/static/root/assets/management-settings-RFDLaquR.js +0 -1
  375. package/dist/gateway/static/root/assets/messages-fmf0dnr4.js +0 -3
  376. package/dist/gateway/static/root/assets/note-detail-panel-DI7CIjmM.js +0 -5
  377. package/dist/gateway/static/root/assets/notes-page-BkqnU-Jh.js +0 -8
  378. package/dist/gateway/static/root/assets/project-detail-page-BvvcTH2F.js +0 -1
  379. package/dist/gateway/static/root/assets/scenes-page-DK316w9a.js +0 -2
  380. package/dist/gateway/static/root/assets/sessions-page-EIk8iJTK.js +0 -1
  381. package/dist/gateway/static/root/assets/settings-advanced-gate-DcOsdz78.js +0 -1
  382. package/dist/gateway/static/root/assets/shares-settings-BcaxGQLC.js +0 -1
  383. package/dist/gateway/static/root/assets/skill-reload-api-Cb_CUL-U.js +0 -1
  384. package/dist/gateway/static/root/assets/task-detail-page-Cvr1qUTW.js +0 -1
  385. package/dist/gateway/static/root/assets/user-model-page-VXfz3rE7.js +0 -2
  386. package/dist/gateway/static/root/assets/workflows-page-DDNDLdId.js +0 -6
  387. package/dist/src/automations/product-events.d.ts +0 -5
  388. package/dist/src/automations/product-events.js +0 -19
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{g as i,t as a}from"./chunk-KS7C4IRE-BMYIfy9x.js";import{t as o}from"./check-DUBLcKHA.js";import{t as s}from"./ellipsis-0k4rZLoy.js";import{t as c}from"./external-link-DjqjBmc3.js";import{t as l}from"./markdown-view-DlT9KqwF.js";import{t as u}from"./loader-circle-CifKLtgG.js";import{t as d}from"./plus-Q2yW6OE7.js";import{t as f}from"./x-B_N4OPjy.js";import{t as p}from"./messages-fmf0dnr4.js";import{t as m}from"./cn-JdwAhgNB.js";import{c as h,i as g,n as _,r as v}from"./locale-store-wNXWkWu5.js";import{a as y,i as b,o as x,r as S,s as C,t as w}from"./dist-BGTk37IG.js";import{a as T,i as E}from"./vendor-swr-BIWyz7Rc.js";import{t as D}from"./button-CS04eWY9.js";import{t as O}from"./skeleton-BwbyijEw.js";import{$s as k,Bo as A,Cd as ee,Fo as j,Gn as M,Hn as N,Ho as P,Io as F,Lc as te,Lo as I,Ma as L,No as R,Po as z,Rc as ne,Un as B,Wn as V,al as H,fd as U,kl as W,nd as G,qn as K,rl as re}from"./index-D99vN3es.js";import{n as q,t as J}from"./capability-header-actions-EETjXmkG.js";import{t as Y}from"./page-tabs-b3lheKy4.js";import{t as ie}from"./agent-plugin-dialog-DbvLXQO2.js";import{t as X}from"./capability-icon-BYm2-nS-.js";var Z=e(t(),1),ae=n();function Q(e){return e===`builtin`||e===`user`?e:`marketplace`}async function oe(e=``){let t=await g(v(`/api/marketplace${e.trim()?`?q=${encodeURIComponent(e.trim())}`:``}`),{cache:`no-store`});if(!t.ok)throw Error(await se(t));let n=await t.json();if(!n.ok||!Array.isArray(n.extensions))throw Error(n.error??`Invalid response`);return n.extensions}async function se(e){try{let t=await e.json();if(typeof t.error==`string`)return t.error;if(t.error&&typeof t.error==`object`&&typeof t.error.message==`string`)return t.error.message;if(typeof t.message==`string`)return t.message}catch{}return e.statusText||`HTTP ${e.status}`}async function ce(e){let t=await g(v(`/api/marketplace/packages/${encodeURIComponent(e.trim())}`),{cache:`no-store`});if(!t.ok)throw Error(await se(t));let n=await t.json();if(!n.ok||!n.payload?.id)throw Error(n.error??`Invalid response`);return n.payload}async function le(e){let t=await g(v(`/api/marketplace/install`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await se(t));let n=await t.json();if(!n.ok||!n.payload?.extensionId)throw Error(n.error??`Invalid response`);return n.payload}async function ue(e){let t=await g(v(`/api/extensions/${encodeURIComponent(e.extensionId.trim())}/activation`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:e.enabled})});if(!t.ok)throw Error(await se(t));let n=await t.json();if(!n.ok||!n.payload)throw Error(n.error?.message??`Invalid response`);return n.payload}async function de(e){let t=await g(v(`/api/marketplace/uninstall`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({extensionId:e})});if(!t.ok)throw Error(await se(t));let n=await t.json();if(!n.ok||!n.payload)throw Error(n.error??`Invalid response`);return n.payload}var $=r();function fe(e,t){let n=e.find(e=>e.id===t);return n?n.source===`bundled`?`bundled`:`user`:`absent`}var pe={debounced:``,detailPkg:null,rowBusy:null,actionError:null,restartHint:null};function me({className:e,query:t}){let n=p(_(e=>e.language)).extensionsPage,r=h(e=>!!e.conversationId),i=z(),{mutate:a}=T(),[o,s]=(0,Z.useReducer)(L,pe),{debounced:c,detailPkg:l,rowBusy:d,actionError:f,restartHint:g}=o,v=r?`marketplace-${c}`:null;(0,Z.useEffect)(()=>{let e=window.setTimeout(()=>s({type:`patch`,patch:{debounced:t.trim()}}),300);return()=>window.clearTimeout(e)},[t]);let{data:y,isLoading:b,error:x}=E(v,()=>oe(c),{revalidateOnFocus:!1}),S=(0,Z.useCallback)(()=>{a(`gateway-extensions-list`),A()},[a]),C=(0,Z.useCallback)(async(e,t)=>{s({type:`patch`,patch:{actionError:null,restartHint:null,rowBusy:e}});try{let r=await le({name:e,overwrite:t});S(),r.requiresGatewayRestart&&s({type:`patch`,patch:{restartHint:n.marketplaceRestartHint}})}catch(e){throw s({type:`patch`,patch:{actionError:e instanceof Error?e.message:n.marketplaceInstallFailed}}),e}finally{s({type:`patch`,patch:{rowBusy:null}})}},[n.marketplaceInstallFailed,n.marketplaceRestartHint,S]),w=(0,Z.useCallback)(async e=>{s({type:`patch`,patch:{actionError:null,restartHint:null,rowBusy:e}});try{let t=await de(e);S(),t.requiresGatewayRestart&&s({type:`patch`,patch:{restartHint:n.marketplaceRestartHint}})}catch(e){throw s({type:`patch`,patch:{actionError:e instanceof Error?e.message:n.marketplaceUninstallFailed}}),e}finally{s({type:`patch`,patch:{rowBusy:null}})}},[n.marketplaceRestartHint,n.marketplaceUninstallFailed,S]),D=y??[];return(0,$.jsxs)(`div`,{className:m(`flex flex-col gap-4`,e),children:[x?(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:x instanceof Error?x.message:n.marketplaceLoadFailed}):null,f?(0,$.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:f}):null,g?(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:g}):null,b&&!y?(0,$.jsx)(`ul`,{className:`flex flex-col gap-3`,"aria-label":n.marketplaceLoading,children:[0,1,2].map(e=>(0,$.jsx)(`li`,{className:`rounded-xl bg-surface-panel p-4 shadow-surface`,children:(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2.5`,children:[(0,$.jsx)(O,{className:`h-5 w-40`}),(0,$.jsx)(O,{className:`h-4 w-full max-w-xl`}),(0,$.jsx)(O,{className:`h-4 w-2/3 max-w-md`})]}),(0,$.jsx)(O,{className:`h-8 w-20`})]})},e))}):(0,$.jsx)(`ul`,{className:`flex flex-col gap-3`,children:D.length===0?(0,$.jsx)(`li`,{className:`text-sm text-fg-muted`,children:n.marketplaceEmpty}):D.map(e=>{let t=fe(i,e.id),r=d===e.id;return(0,$.jsx)(`li`,{className:`list-none`,children:(0,$.jsxs)(`div`,{role:`button`,tabIndex:0,"aria-label":`${e.name}, ${n.marketplaceDetailTitle}`,onClick:()=>s({type:`patch`,patch:{detailPkg:e.id}}),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),s({type:`patch`,patch:{detailPkg:e.id}}))},className:m(`flex w-full cursor-pointer flex-wrap items-start gap-3 rounded-xl bg-surface-panel p-4 text-left shadow-surface`,`transition-[transform,background-color,box-shadow] duration-150 ease-out`,`hover:bg-surface-hover/40`,`active:scale-[0.992] active:bg-surface-hover/55`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-surface-panel`,`dark:hover:bg-surface-hover/25 dark:active:bg-surface-hover/35`),children:[(0,$.jsx)(X,{iconUrl:e.branding?.iconUrl,fallback:W}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsx)(`h3`,{className:`font-semibold text-fg`,children:e.name}),e.verified?(0,$.jsx)(G,{className:`size-4 shrink-0 text-emerald-600 dark:text-emerald-400`,strokeWidth:1.75,"aria-label":`Verified`}):null,e.version?(0,$.jsx)(`span`,{className:`text-xs text-fg-muted`,children:e.version}):null]}),e.description?(0,$.jsx)(`p`,{className:`mt-1 line-clamp-2 text-sm text-fg-muted`,children:e.description}):null,(0,$.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:(e.categories??[]).map(e=>(0,$.jsx)(`span`,{className:`rounded-md border border-edge bg-surface-panel px-2 py-0.5 text-[11px] text-fg-muted`,children:e},e))}),(0,$.jsxs)(`p`,{className:`mt-2 flex items-center gap-1.5 text-xs text-fg-muted`,children:[(0,$.jsx)(W,{className:`size-3.5 shrink-0`,strokeWidth:1.75,"aria-hidden":!0}),(0,$.jsx)(`code`,{className:`rounded bg-surface-panel px-1 py-0.5`,children:e.npmPackage})]})]}),(0,$.jsx)(`div`,{role:`group`,className:`flex shrink-0 flex-col items-end gap-2 sm:min-w-[9rem]`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:t===`bundled`?(0,$.jsx)(`span`,{className:`rounded-md bg-surface-hover px-2 py-1 text-[11px] font-medium text-fg-muted`,children:n.marketplaceBuiltin}):t===`user`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{className:`text-[11px] font-medium text-fg-muted`,children:n.marketplaceInstalled}),(0,$.jsxs)(`button`,{type:`button`,disabled:r,onClick:()=>{window.confirm(n.marketplaceUninstallConfirm)&&w(e.id).catch(()=>{})},className:m(`inline-flex items-center justify-center gap-1.5 rounded-lg border border-edge px-3 py-2 text-xs font-medium text-fg`,`transition-colors active:scale-[0.98] active:bg-surface-hover/80`,`hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,`disabled:pointer-events-none disabled:opacity-50`),children:[r?(0,$.jsx)(u,{className:`size-3.5 animate-spin`,"aria-hidden":!0}):(0,$.jsx)(ne,{className:`size-3.5`,strokeWidth:2,"aria-hidden":!0}),n.marketplaceUninstall]})]}):(0,$.jsx)(`button`,{type:`button`,onClick:()=>s({type:`patch`,patch:{detailPkg:e.id}}),className:m(`inline-flex w-full items-center justify-center rounded-lg border border-edge px-3 py-2 text-xs font-medium text-fg`,`transition-[transform,background-color] active:scale-[0.98]`,`hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`),children:n.marketplaceReview})})]})},e.id)})}),l?(0,$.jsx)(he,{packageName:l,copy:n,extensions:i,onClose:()=>s({type:`patch`,patch:{detailPkg:null}}),onInstall:C,onUninstall:w}):null]})}function he(e){let t=(0,ae.c)(93),{packageName:n,copy:r,extensions:i,onClose:o,onInstall:s,onUninstall:c}=e,[d,p]=(0,Z.useState)(!1),[g,_]=(0,Z.useState)(!1),v=h(be)?`ext-mp-detail-${n}`:null,b;t[0]===n?b=t[1]:(b=async()=>ce(n),t[0]=n,t[1]=b);let T;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(T={revalidateOnFocus:!1},t[2]=T):T=t[2];let{data:D,error:k,isLoading:A}=E(v,b,T),j;t[3]!==i||t[4]!==n?(j=fe(i,n),t[3]=i,t[4]=n,t[5]=j):j=t[5];let M=j,N=M===`user`,P=D?.manifest?.permissions,F,I,L,R,z,B,V,H,U,W,G,K;if(t[6]!==r||t[7]!==D||t[8]!==k||t[9]!==i||t[10]!==M||t[11]!==A||t[12]!==o||t[13]!==n||t[14]!==P||t[15]!==g){B=Symbol.for(`react.early_return_sentinel`);bb0:{let e=P&&typeof P==`object`&&!Array.isArray(P)?Object.entries(P):[],a;t[28]!==r||t[29]!==D?(a=D?.readme?.trim()||(D?.description?.trim()?`### ${D.name}\n\n${D.description}`:`*${r.marketplaceNoReadme}*`),t[28]=r,t[29]=D,t[30]=a):a=t[30];let s=a;if(D?.format===`agent-plugin`){let e;if(t[31]!==D||t[32]!==i){let n;t[34]===D?n=t[35]:(n=e=>e.pluginId===D.manifest?.name,t[34]=D,t[35]=n),e=i.find(n),t[31]=D,t[32]=i,t[33]=e}else e=t[33];let r=`store:${n}`,a;t[36]!==o||t[37]!==e||t[38]!==r?(a=(0,$.jsx)(ie,{extension:e,initialSource:r,onClose:o}),t[36]=o,t[37]=e,t[38]=r,t[39]=a):a=t[39],B=a;break bb0}L=w,R=!0,t[40]===o?z=t[41]:(z=e=>!e&&o(),t[40]=o,t[41]=z),I=x,t[42]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,$.jsx)(y,{className:`xopc-dialog-overlay fixed inset-0 z-[130] bg-scrim`}),t[42]=K):K=t[42],F=S,U=`xopc-dialog-content fixed left-1/2 top-1/2 z-[131] flex h-[min(44rem,calc(100vh-1.5rem))] w-[min(42rem,calc(100vw-1.5rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay`,W=ye;let c;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(ee,{className:`size-5`}),t[43]=c):c=t[43];let u;t[44]!==r.detailBack||t[45]!==o?(u=(0,$.jsx)(`button`,{type:`button`,onClick:o,className:`inline-flex size-9 items-center justify-center rounded-lg text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":r.detailBack,children:c}),t[44]=r.detailBack,t[45]=o,t[46]=u):u=t[46];let d;t[47]===r.marketplaceDetailTitle?d=t[48]:(d=(0,$.jsx)(C,{className:`min-w-0 flex-1 truncate text-center text-sm font-semibold text-fg`,children:r.marketplaceDetailTitle}),t[47]=r.marketplaceDetailTitle,t[48]=d);let p;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(f,{className:`size-5`}),t[49]=p):p=t[49];let m;t[50]!==r.detailClose||t[51]!==o?(m=(0,$.jsx)(`button`,{type:`button`,onClick:o,className:`inline-flex size-9 items-center justify-center rounded-lg text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":r.detailClose,children:p}),t[50]=r.detailClose,t[51]=o,t[52]=m):m=t[52],t[53]!==u||t[54]!==d||t[55]!==m?(G=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 border-b border-edge px-4 py-3`,children:[u,d,m]}),t[53]=u,t[54]=d,t[55]=m,t[56]=G):G=t[56],V=`min-h-0 flex-1 overflow-y-auto p-5`,H=A&&!D?(0,$.jsxs)(`div`,{className:`space-y-4`,"aria-label":r.marketplaceLoading,children:[(0,$.jsx)(O,{className:`h-6 w-48`}),(0,$.jsx)(O,{className:`h-4 w-28`}),(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,$.jsx)(O,{className:`h-12`}),(0,$.jsx)(O,{className:`h-12`})]}),(0,$.jsx)(O,{className:`h-28 w-full`}),(0,$.jsx)(O,{className:`h-36 w-full`})]}):k?(0,$.jsxs)(`div`,{className:`rounded-lg border border-red-300/70 bg-red-50 p-4 text-sm dark:border-red-900 dark:bg-red-950/30`,children:[(0,$.jsx)(`p`,{className:`font-medium text-red-700 dark:text-red-300`,children:r.marketplaceDetailLoadFailed}),(0,$.jsx)(`p`,{className:`mt-1 break-words text-red-600 dark:text-red-400`,children:k instanceof Error?k.message:r.marketplaceLoadFailed})]}):D?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`h3`,{className:`text-lg font-semibold text-fg`,children:D.name}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:(0,$.jsx)(`code`,{className:`rounded bg-surface-panel px-1 py-0.5`,children:D.id})}),(0,$.jsxs)(`dl`,{className:`mt-3 grid gap-2 text-xs text-fg-muted sm:grid-cols-2`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`dt`,{className:`font-medium text-fg`,children:r.marketplaceAuthor}),(0,$.jsx)(`dd`,{children:D.author.username})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`dt`,{className:`font-medium text-fg`,children:r.marketplaceVersion}),(0,$.jsx)(`dd`,{children:D.latestVersion.version})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`dt`,{className:`font-medium text-fg`,children:r.marketplaceDownloads}),(0,$.jsx)(`dd`,{children:D.downloads})]})]}),M===`bundled`?null:(0,$.jsxs)(`section`,{className:`mt-5 space-y-3 rounded-lg border border-edge bg-surface-base p-4`,children:[(0,$.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[D.installability.available?(0,$.jsx)(re,{className:`mt-0.5 size-5 shrink-0 text-emerald-600 dark:text-emerald-400`,"aria-hidden":!0}):(0,$.jsx)(te,{className:`mt-0.5 size-5 shrink-0 text-amber-600 dark:text-amber-400`,"aria-hidden":!0}),(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`h4`,{className:`text-sm font-semibold text-fg`,children:D.installability.available?r.marketplaceRiskTitle:r.marketplaceUnavailableTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-fg-muted`,children:D.installability.available?r.marketplaceCodeRisk:D.installability.reason??r.marketplaceUnavailableBody})]})]}),D.installability.available?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`dl`,{className:`grid gap-2 text-xs text-fg-muted sm:grid-cols-2`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`dt`,{className:`font-medium text-fg`,children:r.marketplaceIntegrity}),(0,$.jsx)(`dd`,{children:r.marketplaceIntegrityVerified})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`dt`,{className:`font-medium text-fg`,children:r.marketplaceDependencies}),(0,$.jsx)(`dd`,{children:D.packageSummary?.dependencyCount??0})]})]}),(0,$.jsxs)(`div`,{className:`text-xs text-fg-muted`,children:[(0,$.jsx)(`p`,{className:`font-medium text-fg`,children:r.marketplacePermissions}),e.length>0?(0,$.jsx)(`ul`,{className:`mt-1 space-y-1`,children:e.map(ve)}):(0,$.jsx)(`p`,{className:`mt-1`,children:r.marketplacePermissionsNone})]}),(D.packageSummary?.lifecycleScripts.length??0)>0?(0,$.jsxs)(`p`,{className:`text-xs leading-relaxed text-amber-700 dark:text-amber-300`,children:[r.marketplaceLifecycleScripts,`: `,D.packageSummary?.lifecycleScripts.join(`, `)]}):null,(0,$.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-2 text-sm text-fg`,children:[(0,$.jsx)(`input`,{type:`checkbox`,checked:g,onChange:e=>_(e.target.checked),className:`mt-0.5 size-4 rounded border-edge accent-[var(--color-accent)]`}),(0,$.jsx)(`span`,{children:r.marketplaceRiskConfirm})]})]}):null]}),D.readme?.trim()?(0,$.jsx)(`h4`,{className:`mb-2 mt-6 text-sm font-semibold text-fg`,children:r.marketplaceDetailReadmeHeading}):null,(0,$.jsx)(`div`,{className:`markdown-content min-w-0 break-words text-sm`,children:(0,$.jsx)(l,{content:s})})]}):null}t[6]=r,t[7]=D,t[8]=k,t[9]=i,t[10]=M,t[11]=A,t[12]=o,t[13]=n,t[14]=P,t[15]=g,t[16]=F,t[17]=I,t[18]=L,t[19]=R,t[20]=z,t[21]=B,t[22]=V,t[23]=H,t[24]=U,t[25]=W,t[26]=G,t[27]=K}else F=t[16],I=t[17],L=t[18],R=t[19],z=t[20],B=t[21],V=t[22],H=t[23],U=t[24],W=t[25],G=t[26],K=t[27];if(B!==Symbol.for(`react.early_return_sentinel`))return B;let q;t[57]!==V||t[58]!==H?(q=(0,$.jsx)(`div`,{className:V,children:H}),t[57]=V,t[58]=H,t[59]=q):q=t[59];let J;t[60]!==d||t[61]!==r.marketplaceBuiltinGoBuiltin||t[62]!==r.marketplaceBuiltinManageHint||t[63]!==r.marketplaceInstall||t[64]!==r.marketplaceReinstall||t[65]!==r.marketplaceReinstallConfirm||t[66]!==r.marketplaceUninstall||t[67]!==r.marketplaceUninstallConfirm||t[68]!==D||t[69]!==M||t[70]!==o||t[71]!==s||t[72]!==c||t[73]!==n||t[74]!==g||t[75]!==N?(J=D?(0,$.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center justify-end gap-2 border-t border-edge-subtle px-5 py-4`,children:M===`bundled`?(0,$.jsxs)(`div`,{className:`flex w-full flex-col items-stretch gap-2`,children:[(0,$.jsx)(`p`,{className:`text-sm leading-relaxed text-fg-muted`,children:r.marketplaceBuiltinManageHint}),(0,$.jsx)(a,{to:`/capabilities/extensions?tab=builtin`,onClick:o,className:`inline-flex w-fit items-center justify-center rounded-lg border border-edge px-3 py-2 text-sm font-medium text-fg hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:r.marketplaceBuiltinGoBuiltin})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`button`,{type:`button`,disabled:d||!D.installability.available||!g,onClick:()=>{N&&!window.confirm(r.marketplaceReinstallConfirm)||(p(!0),s(n,N).catch(_e).finally(()=>p(!1)))},className:m(`inline-flex items-center justify-center gap-1.5 rounded-lg px-3 py-2 text-sm font-medium`,`bg-accent text-on-accent shadow-surface hover:bg-accent-hover`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-surface-panel`,`disabled:pointer-events-none disabled:opacity-50`),children:[d?(0,$.jsx)(u,{className:`size-4 animate-spin`,"aria-hidden":!0}):null,N?r.marketplaceReinstall:r.marketplaceInstall]}),N?(0,$.jsxs)(`button`,{type:`button`,disabled:d,onClick:()=>{window.confirm(r.marketplaceUninstallConfirm)&&(p(!0),c(n).then(()=>o()).catch(ge).finally(()=>p(!1)))},className:m(`inline-flex items-center justify-center gap-1.5 rounded-lg border border-edge px-3 py-2 text-sm font-medium text-fg`,`hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,`disabled:pointer-events-none disabled:opacity-50`),children:[(0,$.jsx)(ne,{className:`size-4 shrink-0`,"aria-hidden":!0}),r.marketplaceUninstall]}):null]})}):null,t[60]=d,t[61]=r.marketplaceBuiltinGoBuiltin,t[62]=r.marketplaceBuiltinManageHint,t[63]=r.marketplaceInstall,t[64]=r.marketplaceReinstall,t[65]=r.marketplaceReinstallConfirm,t[66]=r.marketplaceUninstall,t[67]=r.marketplaceUninstallConfirm,t[68]=D,t[69]=M,t[70]=o,t[71]=s,t[72]=c,t[73]=n,t[74]=g,t[75]=N,t[76]=J):J=t[76];let Y;t[77]!==F||t[78]!==q||t[79]!==J||t[80]!==U||t[81]!==W||t[82]!==G?(Y=(0,$.jsxs)(F,{className:U,onOpenAutoFocus:W,children:[G,q,J]}),t[77]=F,t[78]=q,t[79]=J,t[80]=U,t[81]=W,t[82]=G,t[83]=Y):Y=t[83];let X;t[84]!==I||t[85]!==Y||t[86]!==K?(X=(0,$.jsxs)(I,{children:[K,Y]}),t[84]=I,t[85]=Y,t[86]=K,t[87]=X):X=t[87];let Q;return t[88]!==L||t[89]!==R||t[90]!==z||t[91]!==X?(Q=(0,$.jsx)(L,{defaultOpen:R,onOpenChange:z,children:X}),t[88]=L,t[89]=R,t[90]=z,t[91]=X,t[92]=Q):Q=t[92],Q}function ge(){}function _e(){}function ve(e){let[t,n]=e;return(0,$.jsxs)(`li`,{className:`break-words`,children:[(0,$.jsx)(`code`,{children:t}),`: `,Array.isArray(n)?n.join(`, `):String(n)]},t)}function ye(e){return e.preventDefault()}function be(e){return!!e.conversationId}function xe({embedded:e=!1,onHeaderActionChange:t}){let n=_(e=>e.language),r=p(n),o=P(e=>e.setPageHeader),c=P(e=>e.clearPageHeader),l=z(),u=j(),[f,h]=i(),g=Q(f.get(`tab`)),v=f.get(`q`)??``,[y,b]=(0,Z.useState)(g),[x,S]=(0,Z.useState)(v),[C,w]=(0,Z.useState)(null),[T,E]=(0,Z.useState)(!1),O=f.toString(),A=(0,Z.useRef)(O);if(A.current!==O){A.current=O;let e=Q(f.get(`tab`)),t=f.get(`q`)??``;b(t=>t===e?t:e),S(e=>e===t?e:t)}(0,Z.useEffect)(()=>{h(e=>{let t=new URLSearchParams(e),n=x.trim();return n?t.set(`q`,n):t.delete(`q`),y===`marketplace`?t.delete(`tab`):t.set(`tab`,y),t.toString()===e.toString()?e:t},{replace:!0})},[y,x,h]);let ee=(0,Z.useMemo)(()=>l.filter(e=>e.source===`bundled`),[l]),F=(0,Z.useMemo)(()=>l.filter(e=>e.source!==`bundled`),[l]),te=y===`builtin`?ee:F,I=(0,Z.useMemo)(()=>{let e=x.trim().toLowerCase(),t=te;return e&&(t=t.filter(t=>(t.name??``).toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||(t.description??``).toLowerCase().includes(e))),t.toSorted((e,t)=>e.hasUi===t.hasUi?(e.name||e.id).localeCompare(t.name||t.id,n):e.hasUi?-1:1)},[te,x,n]);(0,Z.useEffect)(()=>{w(e=>{if(!e)return e;let t=l.find(t=>t.id===e.id);return t?Se(e)===Se(t)&&e.active===t.active&&JSON.stringify(e)===JSON.stringify(t)?e:t:null})},[l]);let L=(0,Z.useMemo)(()=>({searchLabel:y===`marketplace`?r.extensionsPage.marketplaceSearchPlaceholder:r.extensionsPage.searchPlaceholder,search:(0,$.jsx)(q,{value:x,onChange:S,placeholder:y===`marketplace`?r.extensionsPage.marketplaceSearchPlaceholder:r.extensionsPage.searchPlaceholder}),overflow:(0,$.jsxs)(M,{children:[(0,$.jsx)(K,{asChild:!0,children:(0,$.jsx)(D,{variant:`secondary`,className:`size-9 shrink-0 p-0`,"aria-label":r.capabilitiesHub.moreActions,title:r.capabilitiesHub.moreActions,children:(0,$.jsx)(s,{className:`size-4`,"aria-hidden":!0})})}),(0,$.jsx)(V,{children:(0,$.jsxs)(N,{align:`end`,sideOffset:6,className:`z-50 min-w-48 rounded-xl border border-edge bg-surface-panel p-1 shadow-popover`,children:[(0,$.jsxs)(B,{className:m(`touch-target flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm text-fg outline-none data-[highlighted]:bg-surface-hover`,k.transition),onSelect:()=>E(!0),children:[(0,$.jsx)(d,{className:`size-4 text-fg-muted`,"aria-hidden":!0}),n.startsWith(`zh`)?`安装插件`:`Install plugin`]}),(0,$.jsx)(B,{asChild:!0,children:(0,$.jsxs)(a,{to:`/local-apps`,className:m(`touch-target flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm text-fg outline-none data-[highlighted]:bg-surface-hover`,k.transition),children:[(0,$.jsx)(U,{className:`size-4 text-fg-muted`,"aria-hidden":!0}),r.extensionsPage.openLocalApps]})})]})})]}),primary:(0,$.jsx)(D,{asChild:!0,variant:`primary`,className:`h-9 shrink-0`,children:(0,$.jsxs)(a,{to:`/local-apps/new`,"aria-label":r.extensionsPage.createLocalApp,children:[(0,$.jsx)(d,{className:`size-4`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:r.extensionsPage.createLocalApp})]})})}),[n,r.capabilitiesHub.moreActions,r.extensionsPage,y,x]);if((0,Z.useLayoutEffect)(()=>e?(t?.(L),()=>t?.(null)):(o({startExtra:null,main:(0,$.jsx)(`div`,{className:`min-w-0`,children:(0,$.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:r.extensionsPage.title})}),end:(0,$.jsx)(J,{contribution:L})}),()=>c()),[c,e,L,r.extensionsPage.title,t,o]),u&&y!==`marketplace`)return(0,$.jsx)(ke,{});let R=[{id:`marketplace`,label:r.extensionsPage.tabMarketplace},{id:`builtin`,label:r.extensionsPage.tabBuiltin,count:ee.length},{id:`user`,label:r.extensionsPage.tabUser,count:F.length}];return(0,$.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col bg-surface-panel`,children:[(0,$.jsxs)(`div`,{className:m(`mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8`,e?`pb-7 pt-3 lg:pb-9 lg:pt-4`:`py-7 lg:py-9`),children:[(0,$.jsx)(`div`,{className:`mb-6 border-b border-edge-subtle pb-3`,children:(0,$.jsx)(Y,{items:R,activeTab:y,onChange:b,ariaLabel:r.extensionsPage.extensionsNavAria,tabIdPrefix:`extensions-tab`,panelIdPrefix:`extensions-panel`,className:`flex-wrap`})}),y===`marketplace`?(0,$.jsx)(me,{query:x}):y===`builtin`&&ee.length===0?(0,$.jsx)(je,{message:r.extensionsPage.emptyBuiltin}):y===`user`&&F.length===0?(0,$.jsx)(je,{message:r.extensionsPage.emptyUser}):I.length===0?(0,$.jsx)(`p`,{className:`px-3 py-14 text-center text-sm text-fg-muted sm:px-5 xl:px-6`,children:r.extensionsPage.noSearchResults}):(0,$.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,children:I.map(e=>(0,$.jsx)(Ee,{extension:e,copy:r.extensionsPage,showSourceBadge:y===`user`,onOpen:()=>w(e)},e.id))})]}),C?C.format===`agent-plugin`?(0,$.jsx)(ie,{extension:C,onClose:()=>w(null)},C.id):(0,$.jsx)(De,{extension:C,copy:r.extensionsPage,onClose:()=>w(null)},C.id):null,T?(0,$.jsx)(ie,{onClose:()=>E(!1)}):null]})}function Se(e){return e.activationEligible??e.active}function Ce(e,t){return e.source===`bundled`?t.providerBundled:e.source===`global`?t.providerGlobal:e.source===`workspace`?t.providerWorkspace:t.providerOther}function we(e,t){return e.source===`global`?t.badgeSourceGlobal:e.source===`workspace`?t.badgeSourceWorkspace:t.badgeSourceOther}function Te(e,t){let n=Se(e);return n&&e.active?t.runStateLive:n&&!e.active?t.runStatePendingOn:!n&&e.active?t.runStatePendingOff:t.runStateOff}function Ee(e){let t=(0,ae.c)(45),{extension:n,copy:r,showSourceBadge:i,onOpen:a}=e,s;t[0]===n?s=t[1]:(s=Se(n),t[0]=n,t[1]=s);let c=s,l=n.hasUi?r.cardTooltipHasUi:r.cardTooltipNoUi,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=m(`group flex w-full flex-col rounded-xl border border-edge-subtle bg-surface-base p-4 text-left shadow-surface transition-colors`,`hover:bg-surface-hover/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,`dark:hover:bg-surface-hover/25`),t[2]=u):u=t[2];let f=n.name||n.id,p;t[3]===f?p=t[4]:(p=f.charAt(0).toUpperCase(),t[3]=f,t[4]=p);let h;t[5]===p?h=t[6]:(h=(0,$.jsx)(`div`,{className:`flex size-12 shrink-0 items-center justify-center rounded-xl bg-accent-soft text-base font-semibold text-accent-fg`,"aria-hidden":!0,children:p}),t[5]=p,t[6]=h);let g;t[7]===n.name?g=t[8]:(g=(0,$.jsx)(`h2`,{className:`truncate text-sm font-semibold text-fg`,children:n.name}),t[7]=n.name,t[8]=g);let _;t[9]===n.version?_=t[10]:(_=n.version?(0,$.jsxs)(`span`,{className:`text-[11px] text-fg-muted`,children:[`v`,n.version]}):null,t[9]=n.version,t[10]=_);let v;t[11]!==g||t[12]!==_?(v=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[g,_]}),t[11]=g,t[12]=_,t[13]=v):v=t[13];let y;t[14]!==r.statusEnabled||t[15]!==c?(y=c?(0,$.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 rounded-full bg-surface-hover px-2 py-0.5 text-[11px] font-medium text-fg-muted`,children:[(0,$.jsx)(o,{className:`size-3`,strokeWidth:2.5,"aria-hidden":!0}),r.statusEnabled]}):(0,$.jsx)(`span`,{className:`flex size-8 shrink-0 items-center justify-center rounded-full border-2 border-accent text-accent`,"aria-hidden":!0,children:(0,$.jsx)(d,{className:`size-4`,strokeWidth:2.5})}),t[14]=r.statusEnabled,t[15]=c,t[16]=y):y=t[16];let b;t[17]!==v||t[18]!==y?(b=(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[v,y]}),t[17]=v,t[18]=y,t[19]=b):b=t[19];let x;t[20]!==r.cardNoDescription||t[21]!==n.description?(x=n.description?.trim()||r.cardNoDescription,t[20]=r.cardNoDescription,t[21]=n.description,t[22]=x):x=t[22];let S;t[23]===x?S=t[24]:(S=(0,$.jsx)(`p`,{className:`mt-2 line-clamp-2 text-xs leading-relaxed text-fg-muted`,children:x}),t[23]=x,t[24]=S);let C=n.format===`agent-plugin`?`Agent Plugin`:n.hasUi?r.badgeKindUi:r.badgeKindBackend,w;t[25]!==C||t[26]!==l?(w=(0,$.jsx)(`span`,{title:l,className:`rounded-md bg-surface-hover px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-fg-muted`,children:C}),t[25]=C,t[26]=l,t[27]=w):w=t[27];let T;t[28]!==r||t[29]!==n||t[30]!==i?(T=n.source===`bundled`?(0,$.jsx)(`span`,{className:`rounded-md bg-surface-hover px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-fg-muted`,children:r.badgeBundled}):i?(0,$.jsx)(`span`,{title:Ce(n,r),className:`rounded-md bg-surface-hover px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-fg-muted`,children:we(n,r)}):null,t[28]=r,t[29]=n,t[30]=i,t[31]=T):T=t[31];let E;t[32]!==w||t[33]!==T?(E=(0,$.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[w,T]}),t[32]=w,t[33]=T,t[34]=E):E=t[34];let D;t[35]!==b||t[36]!==S||t[37]!==E?(D=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[b,S,E]}),t[35]=b,t[36]=S,t[37]=E,t[38]=D):D=t[38];let O;t[39]!==D||t[40]!==h?(O=(0,$.jsxs)(`div`,{className:`flex gap-3`,children:[h,D]}),t[39]=D,t[40]=h,t[41]=O):O=t[41];let k;return t[42]!==a||t[43]!==O?(k=(0,$.jsx)(`button`,{type:`button`,onClick:a,className:u,children:O}),t[42]=a,t[43]=O,t[44]=k):k=t[44],k}function De({extension:e,copy:t,onClose:n}){let{mutate:r}=T(),[i,o]=(0,Z.useState)(null),[s,l]=(0,Z.useState)(null),[d,p]=(0,Z.useState)(!1),h=e.activationEligible===!0,g=(0,Z.useCallback)(async()=>{l(null),p(!1),o(`toggle`);try{let{requiresGatewayRestart:t}=await ue({extensionId:e.id,enabled:!h});await r(`gateway-extensions-list`),A(),p(t)}catch(e){l(e instanceof Error?e.message:t.extensionToggleFailed)}finally{o(null)}},[h,t.extensionToggleFailed,e.id,r]),_=(0,Z.useCallback)(async()=>{if(!(e.source===`bundled`||!window.confirm(t.extensionUninstallConfirm))){l(null),p(!1),o(`uninstall`);try{await de(e.id),await r(`gateway-extensions-list`),A(),n()}catch(e){l(e instanceof Error?e.message:t.marketplaceUninstallFailed),o(null)}}},[t.extensionUninstallConfirm,t.marketplaceUninstallFailed,e.id,e.source,r,n]),v=e.ui?.contributions?.pages??[],E=e.ui?.contributions?.settingsPanels??[],O=e.ui?.contributions?.chatWidgets??[],k=v.find(e=>e.showInNav)??v[0],j=E[0],M=k?R(e.id,k):null,N=j?`/settings/ext/${e.id}/${j.id}`:e.hasConfigSchema||F(e)?`/settings/ext/${e.id}`:null;return(0,$.jsx)(w,{defaultOpen:!0,onOpenChange:e=>!e&&n(),children:(0,$.jsxs)(x,{children:[(0,$.jsx)(y,{className:`xopc-dialog-overlay fixed inset-0 z-[130] bg-scrim`}),(0,$.jsxs)(S,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[131] flex max-h-[min(90vh,44rem)] w-[min(42rem,calc(100vw-1.5rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay`,onOpenAutoFocus:e=>e.preventDefault(),children:[(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 border-b border-edge px-4 py-3`,children:[(0,$.jsx)(`button`,{type:`button`,onClick:n,className:`inline-flex size-9 items-center justify-center rounded-lg text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":t.detailBack,children:(0,$.jsx)(ee,{className:`size-5`})}),(0,$.jsx)(C,{className:`min-w-0 flex-1 truncate text-center text-sm font-semibold text-fg`,children:t.detailTitle}),(0,$.jsxs)(b,{className:`sr-only`,children:[e.name,` (`,e.id,`)`]}),(0,$.jsx)(`button`,{type:`button`,onClick:n,className:`inline-flex size-9 items-center justify-center rounded-lg text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":t.detailClose,children:(0,$.jsx)(f,{className:`size-5`})})]}),(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-5`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-start gap-4`,children:[(0,$.jsx)(`div`,{className:`flex size-16 shrink-0 items-center justify-center rounded-2xl bg-accent-soft text-xl font-semibold text-accent-fg`,"aria-hidden":!0,children:(e.name||e.id).charAt(0).toUpperCase()}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`h3`,{className:`text-lg font-semibold text-fg`,children:e.name}),(0,$.jsxs)(`p`,{className:`mt-0.5 text-sm text-fg-muted`,children:[t.detailProviderPrefix,` `,Ce(e,t)]}),e.version?(0,$.jsxs)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:[`v`,e.version]}):null]})]}),(0,$.jsx)(`p`,{className:`mt-5 text-sm leading-relaxed text-fg`,children:e.description?.trim()||t.detailNoDescription}),e.hasUi?null:(0,$.jsx)(`p`,{className:`mt-3 text-xs text-fg-muted`,children:t.backendOnlyHint}),(0,$.jsx)(`p`,{className:`mt-2 text-xs text-fg-muted`,children:Te(e,t)}),e.source===`bundled`?(0,$.jsx)(`p`,{className:`mt-4 rounded-lg bg-surface-hover/40 px-3 py-2 text-xs text-fg-muted shadow-surface dark:bg-surface-hover/20`,children:t.builtinConfigHint}):null,(0,$.jsxs)(`div`,{className:`mt-3 rounded-lg bg-surface-hover/40 p-3 shadow-surface dark:bg-surface-hover/20`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-fg`,children:t.builtinRuntimeToggle}),(0,$.jsx)(D,{type:`button`,variant:`secondary`,disabled:i!==null,onClick:()=>void g(),className:`shrink-0 py-1.5 text-xs`,children:i===`toggle`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(u,{className:`mr-1.5 size-3.5 shrink-0 animate-spin`,"aria-hidden":!0}),t.builtinToggleBusy]}):h?t.builtinToggleDisable:t.builtinToggleEnable})]}),s?(0,$.jsx)(`p`,{className:`mt-2 text-xs text-rose-600 dark:text-rose-400`,children:s}):null,d?(0,$.jsx)(`p`,{className:`mt-2 text-xs text-fg-muted`,children:t.builtinToggleRestartHint}):null,e.source===`bundled`?null:(0,$.jsx)(`div`,{className:`mt-3 flex justify-end border-t border-edge-subtle pt-3`,children:(0,$.jsxs)(D,{type:`button`,variant:`ghost`,disabled:i!==null,onClick:()=>void _(),className:`text-danger hover:bg-danger-soft hover:text-danger`,children:[i===`uninstall`?(0,$.jsx)(u,{className:`size-3.5 animate-spin`,"aria-hidden":!0}):(0,$.jsx)(ne,{className:`size-3.5`,"aria-hidden":!0}),t.marketplaceUninstall]})})]}),e.hasUi&&(v.length>0||E.length>0||O.length>0)?(0,$.jsxs)(`section`,{className:`mt-8`,children:[(0,$.jsx)(`h4`,{className:`mb-3 text-sm font-semibold text-fg`,children:t.detailSectionFeatures}),(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-1.5`,children:[(0,$.jsx)(Oe,{template:t.badgePages,count:v.length,hidden:v.length===0}),(0,$.jsx)(Oe,{template:t.badgeSettings,count:E.length,hidden:E.length===0}),(0,$.jsx)(Oe,{template:t.badgeWidgets,count:O.length,hidden:O.length===0})]})]}):null,I(e)&&(M||N)?(0,$.jsxs)(`div`,{className:`mt-6 flex flex-wrap gap-2 border-t border-edge-subtle pt-4`,children:[M?(0,$.jsxs)(a,{to:M,onClick:n,className:m(`inline-flex items-center gap-1.5 rounded-lg border border-edge px-3 py-2 text-sm font-medium text-fg`,`hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`),children:[(0,$.jsx)(c,{className:`size-4 shrink-0 opacity-80`,"aria-hidden":!0}),t.open]}):null,N?(0,$.jsxs)(a,{to:N,onClick:n,className:m(`inline-flex items-center gap-1.5 rounded-lg border border-edge px-3 py-2 text-sm font-medium text-fg`,`hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`),children:[(0,$.jsx)(H,{className:`size-4 shrink-0 opacity-80`,"aria-hidden":!0}),t.openSettings]}):null]}):null,(0,$.jsx)(`p`,{className:`mt-6 text-[11px] leading-relaxed text-fg-muted`,children:t.restartNote})]})]})]})})}function Oe(e){let t=(0,ae.c)(6),{template:n,count:r,hidden:i}=e;if(i||r===0)return null;let a;if(t[0]!==r||t[1]!==n){let e;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=/\{\{count\}\}/g,t[3]=e):e=t[3],a=n.replace(e,String(r)),t[0]=r,t[1]=n,t[2]=a}else a=t[2];let o;return t[4]===a?o=t[5]:(o=(0,$.jsx)(`span`,{className:`inline-flex items-center rounded-md bg-surface-hover px-2 py-0.5 text-[11px] font-medium text-fg-muted`,children:a}),t[4]=a,t[5]=o),o}function ke(){let e=(0,ae.c)(5),t,n,r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(`div`,{className:`mb-6 h-8 w-40 max-w-full animate-pulse rounded-md bg-surface-hover`}),n=(0,$.jsx)(`div`,{className:`mb-2 h-4 w-full max-w-md animate-pulse rounded bg-surface-hover`}),r=(0,$.jsx)(`div`,{className:`mb-5 h-9 w-full max-w-lg animate-pulse rounded-full bg-surface-hover`}),e[0]=t,e[1]=n,e[2]=r):(t=e[0],n=e[1],r=e[2]);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=[`ap0`,`ap1`,`ap2`,`ap3`,`ap4`,`ap5`],e[3]=i):i=e[3];let a;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col bg-surface-panel`,children:(0,$.jsxs)(`div`,{className:`w-full px-3 py-8 sm:px-5 xl:px-6`,children:[t,n,r,(0,$.jsx)(`div`,{className:`mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,children:i.map(Ae)})]})}),e[4]=a):a=e[4],a}function Ae(e){return(0,$.jsx)(`div`,{className:`h-36 animate-pulse rounded-xl border border-edge-subtle bg-surface-base shadow-surface`},e)}function je(e){let t=(0,ae.c)(2),{message:n}=e,r;return t[0]===n?r=t[1]:(r=(0,$.jsx)(`div`,{className:`flex min-h-[min(40vh,16rem)] flex-col items-center justify-center rounded-xl border border-edge-subtle bg-surface-base px-4 py-12 text-center shadow-surface`,children:(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:n})}),t[0]=n,t[1]=r),r}export{xe as ExtensionsPage};
1
+ import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{g as i,t as a}from"./chunk-KS7C4IRE-BMYIfy9x.js";import{t as o}from"./check-DUBLcKHA.js";import{t as s}from"./ellipsis-0k4rZLoy.js";import{t as c}from"./external-link-DjqjBmc3.js";import{t as l}from"./markdown-view-BEeXMfDw.js";import{t as u}from"./loader-circle-CifKLtgG.js";import{t as d}from"./plus-Q2yW6OE7.js";import{t as f}from"./x-B_N4OPjy.js";import{t as p}from"./messages-_6IXbP2u.js";import{t as m}from"./cn-JdwAhgNB.js";import{c as h,i as g,n as _,r as v}from"./locale-store-BY30D6tg.js";import{a as y,i as b,o as x,r as S,s as C,t as w}from"./dist-BGTk37IG.js";import{a as T,i as E}from"./vendor-swr-BIWyz7Rc.js";import{t as D}from"./button-CS04eWY9.js";import{t as O}from"./skeleton-BwbyijEw.js";import{$s as k,Al as A,Bo as j,Fo as M,Gn as N,Hn as P,Ho as F,Io as I,Lc as ee,Lo as L,Ma as R,No as z,Po as B,Rc as te,Td as ne,Un as V,Wn as H,id as U,il as re,md as W,ol as G,qn as K}from"./index-DHL16aYZ.js";import{n as q,t as J}from"./capability-header-actions-D_hbWRRF.js";import{t as Y}from"./page-tabs-BhYBCqls.js";import{t as ie}from"./agent-plugin-dialog-CacyndrS.js";import{t as X}from"./capability-icon-BYm2-nS-.js";var Z=e(t(),1),ae=n();function Q(e){return e===`builtin`||e===`user`?e:`marketplace`}async function oe(e=``){let t=await g(v(`/api/marketplace${e.trim()?`?q=${encodeURIComponent(e.trim())}`:``}`),{cache:`no-store`});if(!t.ok)throw Error(await se(t));let n=await t.json();if(!n.ok||!Array.isArray(n.extensions))throw Error(n.error??`Invalid response`);return n.extensions}async function se(e){try{let t=await e.json();if(typeof t.error==`string`)return t.error;if(t.error&&typeof t.error==`object`&&typeof t.error.message==`string`)return t.error.message;if(typeof t.message==`string`)return t.message}catch{}return e.statusText||`HTTP ${e.status}`}async function ce(e){let t=await g(v(`/api/marketplace/packages/${encodeURIComponent(e.trim())}`),{cache:`no-store`});if(!t.ok)throw Error(await se(t));let n=await t.json();if(!n.ok||!n.payload?.id)throw Error(n.error??`Invalid response`);return n.payload}async function le(e){let t=await g(v(`/api/marketplace/install`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await se(t));let n=await t.json();if(!n.ok||!n.payload?.extensionId)throw Error(n.error??`Invalid response`);return n.payload}async function ue(e){let t=await g(v(`/api/extensions/${encodeURIComponent(e.extensionId.trim())}/activation`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:e.enabled})});if(!t.ok)throw Error(await se(t));let n=await t.json();if(!n.ok||!n.payload)throw Error(n.error?.message??`Invalid response`);return n.payload}async function de(e){let t=await g(v(`/api/marketplace/uninstall`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({extensionId:e})});if(!t.ok)throw Error(await se(t));let n=await t.json();if(!n.ok||!n.payload)throw Error(n.error??`Invalid response`);return n.payload}var $=r();function fe(e,t){let n=e.find(e=>e.id===t);return n?n.source===`bundled`?`bundled`:`user`:`absent`}var pe={debounced:``,detailPkg:null,rowBusy:null,actionError:null,restartHint:null};function me({className:e,query:t}){let n=p(_(e=>e.language)).extensionsPage,r=h(e=>!!e.conversationId),i=B(),{mutate:a}=T(),[o,s]=(0,Z.useReducer)(R,pe),{debounced:c,detailPkg:l,rowBusy:d,actionError:f,restartHint:g}=o,v=r?`marketplace-${c}`:null;(0,Z.useEffect)(()=>{let e=window.setTimeout(()=>s({type:`patch`,patch:{debounced:t.trim()}}),300);return()=>window.clearTimeout(e)},[t]);let{data:y,isLoading:b,error:x}=E(v,()=>oe(c),{revalidateOnFocus:!1}),S=(0,Z.useCallback)(()=>{a(`gateway-extensions-list`),j()},[a]),C=(0,Z.useCallback)(async(e,t)=>{s({type:`patch`,patch:{actionError:null,restartHint:null,rowBusy:e}});try{let r=await le({name:e,overwrite:t});S(),r.requiresGatewayRestart&&s({type:`patch`,patch:{restartHint:n.marketplaceRestartHint}})}catch(e){throw s({type:`patch`,patch:{actionError:e instanceof Error?e.message:n.marketplaceInstallFailed}}),e}finally{s({type:`patch`,patch:{rowBusy:null}})}},[n.marketplaceInstallFailed,n.marketplaceRestartHint,S]),w=(0,Z.useCallback)(async e=>{s({type:`patch`,patch:{actionError:null,restartHint:null,rowBusy:e}});try{let t=await de(e);S(),t.requiresGatewayRestart&&s({type:`patch`,patch:{restartHint:n.marketplaceRestartHint}})}catch(e){throw s({type:`patch`,patch:{actionError:e instanceof Error?e.message:n.marketplaceUninstallFailed}}),e}finally{s({type:`patch`,patch:{rowBusy:null}})}},[n.marketplaceRestartHint,n.marketplaceUninstallFailed,S]),D=y??[];return(0,$.jsxs)(`div`,{className:m(`flex flex-col gap-4`,e),children:[x?(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:x instanceof Error?x.message:n.marketplaceLoadFailed}):null,f?(0,$.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:f}):null,g?(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:g}):null,b&&!y?(0,$.jsx)(`ul`,{className:`flex flex-col gap-3`,"aria-label":n.marketplaceLoading,children:[0,1,2].map(e=>(0,$.jsx)(`li`,{className:`rounded-xl bg-surface-panel p-4 shadow-surface`,children:(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2.5`,children:[(0,$.jsx)(O,{className:`h-5 w-40`}),(0,$.jsx)(O,{className:`h-4 w-full max-w-xl`}),(0,$.jsx)(O,{className:`h-4 w-2/3 max-w-md`})]}),(0,$.jsx)(O,{className:`h-8 w-20`})]})},e))}):(0,$.jsx)(`ul`,{className:`flex flex-col gap-3`,children:D.length===0?(0,$.jsx)(`li`,{className:`text-sm text-fg-muted`,children:n.marketplaceEmpty}):D.map(e=>{let t=fe(i,e.id),r=d===e.id;return(0,$.jsx)(`li`,{className:`list-none`,children:(0,$.jsxs)(`div`,{role:`button`,tabIndex:0,"aria-label":`${e.name}, ${n.marketplaceDetailTitle}`,onClick:()=>s({type:`patch`,patch:{detailPkg:e.id}}),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),s({type:`patch`,patch:{detailPkg:e.id}}))},className:m(`flex w-full cursor-pointer flex-wrap items-start gap-3 rounded-xl bg-surface-panel p-4 text-left shadow-surface`,`transition-[transform,background-color,box-shadow] duration-150 ease-out`,`hover:bg-surface-hover/40`,`active:scale-[0.992] active:bg-surface-hover/55`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-surface-panel`,`dark:hover:bg-surface-hover/25 dark:active:bg-surface-hover/35`),children:[(0,$.jsx)(X,{iconUrl:e.branding?.iconUrl,fallback:A}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsx)(`h3`,{className:`font-semibold text-fg`,children:e.name}),e.verified?(0,$.jsx)(U,{className:`size-4 shrink-0 text-emerald-600 dark:text-emerald-400`,strokeWidth:1.75,"aria-label":`Verified`}):null,e.version?(0,$.jsx)(`span`,{className:`text-xs text-fg-muted`,children:e.version}):null]}),e.description?(0,$.jsx)(`p`,{className:`mt-1 line-clamp-2 text-sm text-fg-muted`,children:e.description}):null,(0,$.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:(e.categories??[]).map(e=>(0,$.jsx)(`span`,{className:`rounded-md border border-edge bg-surface-panel px-2 py-0.5 text-[11px] text-fg-muted`,children:e},e))}),(0,$.jsxs)(`p`,{className:`mt-2 flex items-center gap-1.5 text-xs text-fg-muted`,children:[(0,$.jsx)(A,{className:`size-3.5 shrink-0`,strokeWidth:1.75,"aria-hidden":!0}),(0,$.jsx)(`code`,{className:`rounded bg-surface-panel px-1 py-0.5`,children:e.npmPackage})]})]}),(0,$.jsx)(`div`,{role:`group`,className:`flex shrink-0 flex-col items-end gap-2 sm:min-w-[9rem]`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:t===`bundled`?(0,$.jsx)(`span`,{className:`rounded-md bg-surface-hover px-2 py-1 text-[11px] font-medium text-fg-muted`,children:n.marketplaceBuiltin}):t===`user`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{className:`text-[11px] font-medium text-fg-muted`,children:n.marketplaceInstalled}),(0,$.jsxs)(`button`,{type:`button`,disabled:r,onClick:()=>{window.confirm(n.marketplaceUninstallConfirm)&&w(e.id).catch(()=>{})},className:m(`inline-flex items-center justify-center gap-1.5 rounded-lg border border-edge px-3 py-2 text-xs font-medium text-fg`,`transition-colors active:scale-[0.98] active:bg-surface-hover/80`,`hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,`disabled:pointer-events-none disabled:opacity-50`),children:[r?(0,$.jsx)(u,{className:`size-3.5 animate-spin`,"aria-hidden":!0}):(0,$.jsx)(te,{className:`size-3.5`,strokeWidth:2,"aria-hidden":!0}),n.marketplaceUninstall]})]}):(0,$.jsx)(`button`,{type:`button`,onClick:()=>s({type:`patch`,patch:{detailPkg:e.id}}),className:m(`inline-flex w-full items-center justify-center rounded-lg border border-edge px-3 py-2 text-xs font-medium text-fg`,`transition-[transform,background-color] active:scale-[0.98]`,`hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`),children:n.marketplaceReview})})]})},e.id)})}),l?(0,$.jsx)(he,{packageName:l,copy:n,extensions:i,onClose:()=>s({type:`patch`,patch:{detailPkg:null}}),onInstall:C,onUninstall:w}):null]})}function he(e){let t=(0,ae.c)(93),{packageName:n,copy:r,extensions:i,onClose:o,onInstall:s,onUninstall:c}=e,[d,p]=(0,Z.useState)(!1),[g,_]=(0,Z.useState)(!1),v=h(be)?`ext-mp-detail-${n}`:null,b;t[0]===n?b=t[1]:(b=async()=>ce(n),t[0]=n,t[1]=b);let T;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(T={revalidateOnFocus:!1},t[2]=T):T=t[2];let{data:D,error:k,isLoading:A}=E(v,b,T),j;t[3]!==i||t[4]!==n?(j=fe(i,n),t[3]=i,t[4]=n,t[5]=j):j=t[5];let M=j,N=M===`user`,P=D?.manifest?.permissions,F,I,L,R,z,B,V,H,U,W,G,K;if(t[6]!==r||t[7]!==D||t[8]!==k||t[9]!==i||t[10]!==M||t[11]!==A||t[12]!==o||t[13]!==n||t[14]!==P||t[15]!==g){B=Symbol.for(`react.early_return_sentinel`);bb0:{let e=P&&typeof P==`object`&&!Array.isArray(P)?Object.entries(P):[],a;t[28]!==r||t[29]!==D?(a=D?.readme?.trim()||(D?.description?.trim()?`### ${D.name}\n\n${D.description}`:`*${r.marketplaceNoReadme}*`),t[28]=r,t[29]=D,t[30]=a):a=t[30];let s=a;if(D?.format===`agent-plugin`){let e;if(t[31]!==D||t[32]!==i){let n;t[34]===D?n=t[35]:(n=e=>e.pluginId===D.manifest?.name,t[34]=D,t[35]=n),e=i.find(n),t[31]=D,t[32]=i,t[33]=e}else e=t[33];let r=`store:${n}`,a;t[36]!==o||t[37]!==e||t[38]!==r?(a=(0,$.jsx)(ie,{extension:e,initialSource:r,onClose:o}),t[36]=o,t[37]=e,t[38]=r,t[39]=a):a=t[39],B=a;break bb0}L=w,R=!0,t[40]===o?z=t[41]:(z=e=>!e&&o(),t[40]=o,t[41]=z),I=x,t[42]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,$.jsx)(y,{className:`xopc-dialog-overlay fixed inset-0 z-[130] bg-scrim`}),t[42]=K):K=t[42],F=S,U=`xopc-dialog-content fixed left-1/2 top-1/2 z-[131] flex h-[min(44rem,calc(100vh-1.5rem))] w-[min(42rem,calc(100vw-1.5rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay`,W=ye;let c;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(ne,{className:`size-5`}),t[43]=c):c=t[43];let u;t[44]!==r.detailBack||t[45]!==o?(u=(0,$.jsx)(`button`,{type:`button`,onClick:o,className:`inline-flex size-9 items-center justify-center rounded-lg text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":r.detailBack,children:c}),t[44]=r.detailBack,t[45]=o,t[46]=u):u=t[46];let d;t[47]===r.marketplaceDetailTitle?d=t[48]:(d=(0,$.jsx)(C,{className:`min-w-0 flex-1 truncate text-center text-sm font-semibold text-fg`,children:r.marketplaceDetailTitle}),t[47]=r.marketplaceDetailTitle,t[48]=d);let p;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(f,{className:`size-5`}),t[49]=p):p=t[49];let m;t[50]!==r.detailClose||t[51]!==o?(m=(0,$.jsx)(`button`,{type:`button`,onClick:o,className:`inline-flex size-9 items-center justify-center rounded-lg text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":r.detailClose,children:p}),t[50]=r.detailClose,t[51]=o,t[52]=m):m=t[52],t[53]!==u||t[54]!==d||t[55]!==m?(G=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 border-b border-edge px-4 py-3`,children:[u,d,m]}),t[53]=u,t[54]=d,t[55]=m,t[56]=G):G=t[56],V=`min-h-0 flex-1 overflow-y-auto p-5`,H=A&&!D?(0,$.jsxs)(`div`,{className:`space-y-4`,"aria-label":r.marketplaceLoading,children:[(0,$.jsx)(O,{className:`h-6 w-48`}),(0,$.jsx)(O,{className:`h-4 w-28`}),(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,$.jsx)(O,{className:`h-12`}),(0,$.jsx)(O,{className:`h-12`})]}),(0,$.jsx)(O,{className:`h-28 w-full`}),(0,$.jsx)(O,{className:`h-36 w-full`})]}):k?(0,$.jsxs)(`div`,{className:`rounded-lg border border-red-300/70 bg-red-50 p-4 text-sm dark:border-red-900 dark:bg-red-950/30`,children:[(0,$.jsx)(`p`,{className:`font-medium text-red-700 dark:text-red-300`,children:r.marketplaceDetailLoadFailed}),(0,$.jsx)(`p`,{className:`mt-1 break-words text-red-600 dark:text-red-400`,children:k instanceof Error?k.message:r.marketplaceLoadFailed})]}):D?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`h3`,{className:`text-lg font-semibold text-fg`,children:D.name}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:(0,$.jsx)(`code`,{className:`rounded bg-surface-panel px-1 py-0.5`,children:D.id})}),(0,$.jsxs)(`dl`,{className:`mt-3 grid gap-2 text-xs text-fg-muted sm:grid-cols-2`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`dt`,{className:`font-medium text-fg`,children:r.marketplaceAuthor}),(0,$.jsx)(`dd`,{children:D.author.username})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`dt`,{className:`font-medium text-fg`,children:r.marketplaceVersion}),(0,$.jsx)(`dd`,{children:D.latestVersion.version})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`dt`,{className:`font-medium text-fg`,children:r.marketplaceDownloads}),(0,$.jsx)(`dd`,{children:D.downloads})]})]}),M===`bundled`?null:(0,$.jsxs)(`section`,{className:`mt-5 space-y-3 rounded-lg border border-edge bg-surface-base p-4`,children:[(0,$.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[D.installability.available?(0,$.jsx)(re,{className:`mt-0.5 size-5 shrink-0 text-emerald-600 dark:text-emerald-400`,"aria-hidden":!0}):(0,$.jsx)(ee,{className:`mt-0.5 size-5 shrink-0 text-amber-600 dark:text-amber-400`,"aria-hidden":!0}),(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`h4`,{className:`text-sm font-semibold text-fg`,children:D.installability.available?r.marketplaceRiskTitle:r.marketplaceUnavailableTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-fg-muted`,children:D.installability.available?r.marketplaceCodeRisk:D.installability.reason??r.marketplaceUnavailableBody})]})]}),D.installability.available?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`dl`,{className:`grid gap-2 text-xs text-fg-muted sm:grid-cols-2`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`dt`,{className:`font-medium text-fg`,children:r.marketplaceIntegrity}),(0,$.jsx)(`dd`,{children:r.marketplaceIntegrityVerified})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`dt`,{className:`font-medium text-fg`,children:r.marketplaceDependencies}),(0,$.jsx)(`dd`,{children:D.packageSummary?.dependencyCount??0})]})]}),(0,$.jsxs)(`div`,{className:`text-xs text-fg-muted`,children:[(0,$.jsx)(`p`,{className:`font-medium text-fg`,children:r.marketplacePermissions}),e.length>0?(0,$.jsx)(`ul`,{className:`mt-1 space-y-1`,children:e.map(ve)}):(0,$.jsx)(`p`,{className:`mt-1`,children:r.marketplacePermissionsNone})]}),(D.packageSummary?.lifecycleScripts.length??0)>0?(0,$.jsxs)(`p`,{className:`text-xs leading-relaxed text-amber-700 dark:text-amber-300`,children:[r.marketplaceLifecycleScripts,`: `,D.packageSummary?.lifecycleScripts.join(`, `)]}):null,(0,$.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-2 text-sm text-fg`,children:[(0,$.jsx)(`input`,{type:`checkbox`,checked:g,onChange:e=>_(e.target.checked),className:`mt-0.5 size-4 rounded border-edge accent-[var(--color-accent)]`}),(0,$.jsx)(`span`,{children:r.marketplaceRiskConfirm})]})]}):null]}),D.readme?.trim()?(0,$.jsx)(`h4`,{className:`mb-2 mt-6 text-sm font-semibold text-fg`,children:r.marketplaceDetailReadmeHeading}):null,(0,$.jsx)(`div`,{className:`markdown-content min-w-0 break-words text-sm`,children:(0,$.jsx)(l,{content:s})})]}):null}t[6]=r,t[7]=D,t[8]=k,t[9]=i,t[10]=M,t[11]=A,t[12]=o,t[13]=n,t[14]=P,t[15]=g,t[16]=F,t[17]=I,t[18]=L,t[19]=R,t[20]=z,t[21]=B,t[22]=V,t[23]=H,t[24]=U,t[25]=W,t[26]=G,t[27]=K}else F=t[16],I=t[17],L=t[18],R=t[19],z=t[20],B=t[21],V=t[22],H=t[23],U=t[24],W=t[25],G=t[26],K=t[27];if(B!==Symbol.for(`react.early_return_sentinel`))return B;let q;t[57]!==V||t[58]!==H?(q=(0,$.jsx)(`div`,{className:V,children:H}),t[57]=V,t[58]=H,t[59]=q):q=t[59];let J;t[60]!==d||t[61]!==r.marketplaceBuiltinGoBuiltin||t[62]!==r.marketplaceBuiltinManageHint||t[63]!==r.marketplaceInstall||t[64]!==r.marketplaceReinstall||t[65]!==r.marketplaceReinstallConfirm||t[66]!==r.marketplaceUninstall||t[67]!==r.marketplaceUninstallConfirm||t[68]!==D||t[69]!==M||t[70]!==o||t[71]!==s||t[72]!==c||t[73]!==n||t[74]!==g||t[75]!==N?(J=D?(0,$.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center justify-end gap-2 border-t border-edge-subtle px-5 py-4`,children:M===`bundled`?(0,$.jsxs)(`div`,{className:`flex w-full flex-col items-stretch gap-2`,children:[(0,$.jsx)(`p`,{className:`text-sm leading-relaxed text-fg-muted`,children:r.marketplaceBuiltinManageHint}),(0,$.jsx)(a,{to:`/capabilities/extensions?tab=builtin`,onClick:o,className:`inline-flex w-fit items-center justify-center rounded-lg border border-edge px-3 py-2 text-sm font-medium text-fg hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:r.marketplaceBuiltinGoBuiltin})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`button`,{type:`button`,disabled:d||!D.installability.available||!g,onClick:()=>{N&&!window.confirm(r.marketplaceReinstallConfirm)||(p(!0),s(n,N).catch(_e).finally(()=>p(!1)))},className:m(`inline-flex items-center justify-center gap-1.5 rounded-lg px-3 py-2 text-sm font-medium`,`bg-accent text-on-accent shadow-surface hover:bg-accent-hover`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-surface-panel`,`disabled:pointer-events-none disabled:opacity-50`),children:[d?(0,$.jsx)(u,{className:`size-4 animate-spin`,"aria-hidden":!0}):null,N?r.marketplaceReinstall:r.marketplaceInstall]}),N?(0,$.jsxs)(`button`,{type:`button`,disabled:d,onClick:()=>{window.confirm(r.marketplaceUninstallConfirm)&&(p(!0),c(n).then(()=>o()).catch(ge).finally(()=>p(!1)))},className:m(`inline-flex items-center justify-center gap-1.5 rounded-lg border border-edge px-3 py-2 text-sm font-medium text-fg`,`hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,`disabled:pointer-events-none disabled:opacity-50`),children:[(0,$.jsx)(te,{className:`size-4 shrink-0`,"aria-hidden":!0}),r.marketplaceUninstall]}):null]})}):null,t[60]=d,t[61]=r.marketplaceBuiltinGoBuiltin,t[62]=r.marketplaceBuiltinManageHint,t[63]=r.marketplaceInstall,t[64]=r.marketplaceReinstall,t[65]=r.marketplaceReinstallConfirm,t[66]=r.marketplaceUninstall,t[67]=r.marketplaceUninstallConfirm,t[68]=D,t[69]=M,t[70]=o,t[71]=s,t[72]=c,t[73]=n,t[74]=g,t[75]=N,t[76]=J):J=t[76];let Y;t[77]!==F||t[78]!==q||t[79]!==J||t[80]!==U||t[81]!==W||t[82]!==G?(Y=(0,$.jsxs)(F,{className:U,onOpenAutoFocus:W,children:[G,q,J]}),t[77]=F,t[78]=q,t[79]=J,t[80]=U,t[81]=W,t[82]=G,t[83]=Y):Y=t[83];let X;t[84]!==I||t[85]!==Y||t[86]!==K?(X=(0,$.jsxs)(I,{children:[K,Y]}),t[84]=I,t[85]=Y,t[86]=K,t[87]=X):X=t[87];let Q;return t[88]!==L||t[89]!==R||t[90]!==z||t[91]!==X?(Q=(0,$.jsx)(L,{defaultOpen:R,onOpenChange:z,children:X}),t[88]=L,t[89]=R,t[90]=z,t[91]=X,t[92]=Q):Q=t[92],Q}function ge(){}function _e(){}function ve(e){let[t,n]=e;return(0,$.jsxs)(`li`,{className:`break-words`,children:[(0,$.jsx)(`code`,{children:t}),`: `,Array.isArray(n)?n.join(`, `):String(n)]},t)}function ye(e){return e.preventDefault()}function be(e){return!!e.conversationId}function xe({embedded:e=!1,onHeaderActionChange:t}){let n=_(e=>e.language),r=p(n),o=F(e=>e.setPageHeader),c=F(e=>e.clearPageHeader),l=B(),u=M(),[f,h]=i(),g=Q(f.get(`tab`)),v=f.get(`q`)??``,[y,b]=(0,Z.useState)(g),[x,S]=(0,Z.useState)(v),[C,w]=(0,Z.useState)(null),[T,E]=(0,Z.useState)(!1),O=f.toString(),A=(0,Z.useRef)(O);if(A.current!==O){A.current=O;let e=Q(f.get(`tab`)),t=f.get(`q`)??``;b(t=>t===e?t:e),S(e=>e===t?e:t)}(0,Z.useEffect)(()=>{h(e=>{let t=new URLSearchParams(e),n=x.trim();return n?t.set(`q`,n):t.delete(`q`),y===`marketplace`?t.delete(`tab`):t.set(`tab`,y),t.toString()===e.toString()?e:t},{replace:!0})},[y,x,h]);let j=(0,Z.useMemo)(()=>l.filter(e=>e.source===`bundled`),[l]),I=(0,Z.useMemo)(()=>l.filter(e=>e.source!==`bundled`),[l]),ee=y===`builtin`?j:I,L=(0,Z.useMemo)(()=>{let e=x.trim().toLowerCase(),t=ee;return e&&(t=t.filter(t=>(t.name??``).toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||(t.description??``).toLowerCase().includes(e))),t.toSorted((e,t)=>e.hasUi===t.hasUi?(e.name||e.id).localeCompare(t.name||t.id,n):e.hasUi?-1:1)},[ee,x,n]);(0,Z.useEffect)(()=>{w(e=>{if(!e)return e;let t=l.find(t=>t.id===e.id);return t?Se(e)===Se(t)&&e.active===t.active&&JSON.stringify(e)===JSON.stringify(t)?e:t:null})},[l]);let R=(0,Z.useMemo)(()=>({searchLabel:y===`marketplace`?r.extensionsPage.marketplaceSearchPlaceholder:r.extensionsPage.searchPlaceholder,search:(0,$.jsx)(q,{value:x,onChange:S,placeholder:y===`marketplace`?r.extensionsPage.marketplaceSearchPlaceholder:r.extensionsPage.searchPlaceholder}),overflow:(0,$.jsxs)(N,{children:[(0,$.jsx)(K,{asChild:!0,children:(0,$.jsx)(D,{variant:`secondary`,className:`size-9 shrink-0 p-0`,"aria-label":r.capabilitiesHub.moreActions,title:r.capabilitiesHub.moreActions,children:(0,$.jsx)(s,{className:`size-4`,"aria-hidden":!0})})}),(0,$.jsx)(H,{children:(0,$.jsxs)(P,{align:`end`,sideOffset:6,className:`z-50 min-w-48 rounded-xl border border-edge bg-surface-panel p-1 shadow-popover`,children:[(0,$.jsxs)(V,{className:m(`touch-target flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm text-fg outline-none data-[highlighted]:bg-surface-hover`,k.transition),onSelect:()=>E(!0),children:[(0,$.jsx)(d,{className:`size-4 text-fg-muted`,"aria-hidden":!0}),n.startsWith(`zh`)?`安装插件`:`Install plugin`]}),(0,$.jsx)(V,{asChild:!0,children:(0,$.jsxs)(a,{to:`/local-apps`,className:m(`touch-target flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm text-fg outline-none data-[highlighted]:bg-surface-hover`,k.transition),children:[(0,$.jsx)(W,{className:`size-4 text-fg-muted`,"aria-hidden":!0}),r.extensionsPage.openLocalApps]})})]})})]}),primary:(0,$.jsx)(D,{asChild:!0,variant:`primary`,className:`h-9 shrink-0`,children:(0,$.jsxs)(a,{to:`/local-apps/new`,"aria-label":r.extensionsPage.createLocalApp,children:[(0,$.jsx)(d,{className:`size-4`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:r.extensionsPage.createLocalApp})]})})}),[n,r.capabilitiesHub.moreActions,r.extensionsPage,y,x]);if((0,Z.useLayoutEffect)(()=>e?(t?.(R),()=>t?.(null)):(o({startExtra:null,main:(0,$.jsx)(`div`,{className:`min-w-0`,children:(0,$.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:r.extensionsPage.title})}),end:(0,$.jsx)(J,{contribution:R})}),()=>c()),[c,e,R,r.extensionsPage.title,t,o]),u&&y!==`marketplace`)return(0,$.jsx)(ke,{});let z=[{id:`marketplace`,label:r.extensionsPage.tabMarketplace},{id:`builtin`,label:r.extensionsPage.tabBuiltin,count:j.length},{id:`user`,label:r.extensionsPage.tabUser,count:I.length}];return(0,$.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col bg-surface-panel`,children:[(0,$.jsxs)(`div`,{className:m(`mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8`,e?`pb-7 pt-3 lg:pb-9 lg:pt-4`:`py-7 lg:py-9`),children:[(0,$.jsx)(`div`,{className:`mb-6 border-b border-edge-subtle pb-3`,children:(0,$.jsx)(Y,{items:z,activeTab:y,onChange:b,ariaLabel:r.extensionsPage.extensionsNavAria,tabIdPrefix:`extensions-tab`,panelIdPrefix:`extensions-panel`,className:`flex-wrap`})}),y===`marketplace`?(0,$.jsx)(me,{query:x}):y===`builtin`&&j.length===0?(0,$.jsx)(je,{message:r.extensionsPage.emptyBuiltin}):y===`user`&&I.length===0?(0,$.jsx)(je,{message:r.extensionsPage.emptyUser}):L.length===0?(0,$.jsx)(`p`,{className:`px-3 py-14 text-center text-sm text-fg-muted sm:px-5 xl:px-6`,children:r.extensionsPage.noSearchResults}):(0,$.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,children:L.map(e=>(0,$.jsx)(Ee,{extension:e,copy:r.extensionsPage,showSourceBadge:y===`user`,onOpen:()=>w(e)},e.id))})]}),C?C.format===`agent-plugin`?(0,$.jsx)(ie,{extension:C,onClose:()=>w(null)},C.id):(0,$.jsx)(De,{extension:C,copy:r.extensionsPage,onClose:()=>w(null)},C.id):null,T?(0,$.jsx)(ie,{onClose:()=>E(!1)}):null]})}function Se(e){return e.activationEligible??e.active}function Ce(e,t){return e.source===`bundled`?t.providerBundled:e.source===`global`?t.providerGlobal:e.source===`workspace`?t.providerWorkspace:t.providerOther}function we(e,t){return e.source===`global`?t.badgeSourceGlobal:e.source===`workspace`?t.badgeSourceWorkspace:t.badgeSourceOther}function Te(e,t){let n=Se(e);return n&&e.active?t.runStateLive:n&&!e.active?t.runStatePendingOn:!n&&e.active?t.runStatePendingOff:t.runStateOff}function Ee(e){let t=(0,ae.c)(45),{extension:n,copy:r,showSourceBadge:i,onOpen:a}=e,s;t[0]===n?s=t[1]:(s=Se(n),t[0]=n,t[1]=s);let c=s,l=n.hasUi?r.cardTooltipHasUi:r.cardTooltipNoUi,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=m(`group flex w-full flex-col rounded-xl border border-edge-subtle bg-surface-base p-4 text-left shadow-surface transition-colors`,`hover:bg-surface-hover/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,`dark:hover:bg-surface-hover/25`),t[2]=u):u=t[2];let f=n.name||n.id,p;t[3]===f?p=t[4]:(p=f.charAt(0).toUpperCase(),t[3]=f,t[4]=p);let h;t[5]===p?h=t[6]:(h=(0,$.jsx)(`div`,{className:`flex size-12 shrink-0 items-center justify-center rounded-xl bg-accent-soft text-base font-semibold text-accent-fg`,"aria-hidden":!0,children:p}),t[5]=p,t[6]=h);let g;t[7]===n.name?g=t[8]:(g=(0,$.jsx)(`h2`,{className:`truncate text-sm font-semibold text-fg`,children:n.name}),t[7]=n.name,t[8]=g);let _;t[9]===n.version?_=t[10]:(_=n.version?(0,$.jsxs)(`span`,{className:`text-[11px] text-fg-muted`,children:[`v`,n.version]}):null,t[9]=n.version,t[10]=_);let v;t[11]!==g||t[12]!==_?(v=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[g,_]}),t[11]=g,t[12]=_,t[13]=v):v=t[13];let y;t[14]!==r.statusEnabled||t[15]!==c?(y=c?(0,$.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 rounded-full bg-surface-hover px-2 py-0.5 text-[11px] font-medium text-fg-muted`,children:[(0,$.jsx)(o,{className:`size-3`,strokeWidth:2.5,"aria-hidden":!0}),r.statusEnabled]}):(0,$.jsx)(`span`,{className:`flex size-8 shrink-0 items-center justify-center rounded-full border-2 border-accent text-accent`,"aria-hidden":!0,children:(0,$.jsx)(d,{className:`size-4`,strokeWidth:2.5})}),t[14]=r.statusEnabled,t[15]=c,t[16]=y):y=t[16];let b;t[17]!==v||t[18]!==y?(b=(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[v,y]}),t[17]=v,t[18]=y,t[19]=b):b=t[19];let x;t[20]!==r.cardNoDescription||t[21]!==n.description?(x=n.description?.trim()||r.cardNoDescription,t[20]=r.cardNoDescription,t[21]=n.description,t[22]=x):x=t[22];let S;t[23]===x?S=t[24]:(S=(0,$.jsx)(`p`,{className:`mt-2 line-clamp-2 text-xs leading-relaxed text-fg-muted`,children:x}),t[23]=x,t[24]=S);let C=n.format===`agent-plugin`?`Agent Plugin`:n.hasUi?r.badgeKindUi:r.badgeKindBackend,w;t[25]!==C||t[26]!==l?(w=(0,$.jsx)(`span`,{title:l,className:`rounded-md bg-surface-hover px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-fg-muted`,children:C}),t[25]=C,t[26]=l,t[27]=w):w=t[27];let T;t[28]!==r||t[29]!==n||t[30]!==i?(T=n.source===`bundled`?(0,$.jsx)(`span`,{className:`rounded-md bg-surface-hover px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-fg-muted`,children:r.badgeBundled}):i?(0,$.jsx)(`span`,{title:Ce(n,r),className:`rounded-md bg-surface-hover px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-fg-muted`,children:we(n,r)}):null,t[28]=r,t[29]=n,t[30]=i,t[31]=T):T=t[31];let E;t[32]!==w||t[33]!==T?(E=(0,$.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[w,T]}),t[32]=w,t[33]=T,t[34]=E):E=t[34];let D;t[35]!==b||t[36]!==S||t[37]!==E?(D=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[b,S,E]}),t[35]=b,t[36]=S,t[37]=E,t[38]=D):D=t[38];let O;t[39]!==D||t[40]!==h?(O=(0,$.jsxs)(`div`,{className:`flex gap-3`,children:[h,D]}),t[39]=D,t[40]=h,t[41]=O):O=t[41];let k;return t[42]!==a||t[43]!==O?(k=(0,$.jsx)(`button`,{type:`button`,onClick:a,className:u,children:O}),t[42]=a,t[43]=O,t[44]=k):k=t[44],k}function De({extension:e,copy:t,onClose:n}){let{mutate:r}=T(),[i,o]=(0,Z.useState)(null),[s,l]=(0,Z.useState)(null),[d,p]=(0,Z.useState)(!1),h=e.activationEligible===!0,g=(0,Z.useCallback)(async()=>{l(null),p(!1),o(`toggle`);try{let{requiresGatewayRestart:t}=await ue({extensionId:e.id,enabled:!h});await r(`gateway-extensions-list`),j(),p(t)}catch(e){l(e instanceof Error?e.message:t.extensionToggleFailed)}finally{o(null)}},[h,t.extensionToggleFailed,e.id,r]),_=(0,Z.useCallback)(async()=>{if(!(e.source===`bundled`||!window.confirm(t.extensionUninstallConfirm))){l(null),p(!1),o(`uninstall`);try{await de(e.id),await r(`gateway-extensions-list`),j(),n()}catch(e){l(e instanceof Error?e.message:t.marketplaceUninstallFailed),o(null)}}},[t.extensionUninstallConfirm,t.marketplaceUninstallFailed,e.id,e.source,r,n]),v=e.ui?.contributions?.pages??[],E=e.ui?.contributions?.settingsPanels??[],O=e.ui?.contributions?.chatWidgets??[],k=v.find(e=>e.showInNav)??v[0],A=E[0],M=k?z(e.id,k):null,N=A?`/settings/ext/${e.id}/${A.id}`:e.hasConfigSchema||I(e)?`/settings/ext/${e.id}`:null;return(0,$.jsx)(w,{defaultOpen:!0,onOpenChange:e=>!e&&n(),children:(0,$.jsxs)(x,{children:[(0,$.jsx)(y,{className:`xopc-dialog-overlay fixed inset-0 z-[130] bg-scrim`}),(0,$.jsxs)(S,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[131] flex max-h-[min(90vh,44rem)] w-[min(42rem,calc(100vw-1.5rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay`,onOpenAutoFocus:e=>e.preventDefault(),children:[(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 border-b border-edge px-4 py-3`,children:[(0,$.jsx)(`button`,{type:`button`,onClick:n,className:`inline-flex size-9 items-center justify-center rounded-lg text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":t.detailBack,children:(0,$.jsx)(ne,{className:`size-5`})}),(0,$.jsx)(C,{className:`min-w-0 flex-1 truncate text-center text-sm font-semibold text-fg`,children:t.detailTitle}),(0,$.jsxs)(b,{className:`sr-only`,children:[e.name,` (`,e.id,`)`]}),(0,$.jsx)(`button`,{type:`button`,onClick:n,className:`inline-flex size-9 items-center justify-center rounded-lg text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":t.detailClose,children:(0,$.jsx)(f,{className:`size-5`})})]}),(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-5`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-start gap-4`,children:[(0,$.jsx)(`div`,{className:`flex size-16 shrink-0 items-center justify-center rounded-2xl bg-accent-soft text-xl font-semibold text-accent-fg`,"aria-hidden":!0,children:(e.name||e.id).charAt(0).toUpperCase()}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`h3`,{className:`text-lg font-semibold text-fg`,children:e.name}),(0,$.jsxs)(`p`,{className:`mt-0.5 text-sm text-fg-muted`,children:[t.detailProviderPrefix,` `,Ce(e,t)]}),e.version?(0,$.jsxs)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:[`v`,e.version]}):null]})]}),(0,$.jsx)(`p`,{className:`mt-5 text-sm leading-relaxed text-fg`,children:e.description?.trim()||t.detailNoDescription}),e.hasUi?null:(0,$.jsx)(`p`,{className:`mt-3 text-xs text-fg-muted`,children:t.backendOnlyHint}),(0,$.jsx)(`p`,{className:`mt-2 text-xs text-fg-muted`,children:Te(e,t)}),e.source===`bundled`?(0,$.jsx)(`p`,{className:`mt-4 rounded-lg bg-surface-hover/40 px-3 py-2 text-xs text-fg-muted shadow-surface dark:bg-surface-hover/20`,children:t.builtinConfigHint}):null,(0,$.jsxs)(`div`,{className:`mt-3 rounded-lg bg-surface-hover/40 p-3 shadow-surface dark:bg-surface-hover/20`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-fg`,children:t.builtinRuntimeToggle}),(0,$.jsx)(D,{type:`button`,variant:`secondary`,disabled:i!==null,onClick:()=>void g(),className:`shrink-0 py-1.5 text-xs`,children:i===`toggle`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(u,{className:`mr-1.5 size-3.5 shrink-0 animate-spin`,"aria-hidden":!0}),t.builtinToggleBusy]}):h?t.builtinToggleDisable:t.builtinToggleEnable})]}),s?(0,$.jsx)(`p`,{className:`mt-2 text-xs text-rose-600 dark:text-rose-400`,children:s}):null,d?(0,$.jsx)(`p`,{className:`mt-2 text-xs text-fg-muted`,children:t.builtinToggleRestartHint}):null,e.source===`bundled`?null:(0,$.jsx)(`div`,{className:`mt-3 flex justify-end border-t border-edge-subtle pt-3`,children:(0,$.jsxs)(D,{type:`button`,variant:`ghost`,disabled:i!==null,onClick:()=>void _(),className:`text-danger hover:bg-danger-soft hover:text-danger`,children:[i===`uninstall`?(0,$.jsx)(u,{className:`size-3.5 animate-spin`,"aria-hidden":!0}):(0,$.jsx)(te,{className:`size-3.5`,"aria-hidden":!0}),t.marketplaceUninstall]})})]}),e.hasUi&&(v.length>0||E.length>0||O.length>0)?(0,$.jsxs)(`section`,{className:`mt-8`,children:[(0,$.jsx)(`h4`,{className:`mb-3 text-sm font-semibold text-fg`,children:t.detailSectionFeatures}),(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-1.5`,children:[(0,$.jsx)(Oe,{template:t.badgePages,count:v.length,hidden:v.length===0}),(0,$.jsx)(Oe,{template:t.badgeSettings,count:E.length,hidden:E.length===0}),(0,$.jsx)(Oe,{template:t.badgeWidgets,count:O.length,hidden:O.length===0})]})]}):null,L(e)&&(M||N)?(0,$.jsxs)(`div`,{className:`mt-6 flex flex-wrap gap-2 border-t border-edge-subtle pt-4`,children:[M?(0,$.jsxs)(a,{to:M,onClick:n,className:m(`inline-flex items-center gap-1.5 rounded-lg border border-edge px-3 py-2 text-sm font-medium text-fg`,`hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`),children:[(0,$.jsx)(c,{className:`size-4 shrink-0 opacity-80`,"aria-hidden":!0}),t.open]}):null,N?(0,$.jsxs)(a,{to:N,onClick:n,className:m(`inline-flex items-center gap-1.5 rounded-lg border border-edge px-3 py-2 text-sm font-medium text-fg`,`hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`),children:[(0,$.jsx)(G,{className:`size-4 shrink-0 opacity-80`,"aria-hidden":!0}),t.openSettings]}):null]}):null,(0,$.jsx)(`p`,{className:`mt-6 text-[11px] leading-relaxed text-fg-muted`,children:t.restartNote})]})]})]})})}function Oe(e){let t=(0,ae.c)(6),{template:n,count:r,hidden:i}=e;if(i||r===0)return null;let a;if(t[0]!==r||t[1]!==n){let e;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=/\{\{count\}\}/g,t[3]=e):e=t[3],a=n.replace(e,String(r)),t[0]=r,t[1]=n,t[2]=a}else a=t[2];let o;return t[4]===a?o=t[5]:(o=(0,$.jsx)(`span`,{className:`inline-flex items-center rounded-md bg-surface-hover px-2 py-0.5 text-[11px] font-medium text-fg-muted`,children:a}),t[4]=a,t[5]=o),o}function ke(){let e=(0,ae.c)(5),t,n,r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(`div`,{className:`mb-6 h-8 w-40 max-w-full animate-pulse rounded-md bg-surface-hover`}),n=(0,$.jsx)(`div`,{className:`mb-2 h-4 w-full max-w-md animate-pulse rounded bg-surface-hover`}),r=(0,$.jsx)(`div`,{className:`mb-5 h-9 w-full max-w-lg animate-pulse rounded-full bg-surface-hover`}),e[0]=t,e[1]=n,e[2]=r):(t=e[0],n=e[1],r=e[2]);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=[`ap0`,`ap1`,`ap2`,`ap3`,`ap4`,`ap5`],e[3]=i):i=e[3];let a;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col bg-surface-panel`,children:(0,$.jsxs)(`div`,{className:`w-full px-3 py-8 sm:px-5 xl:px-6`,children:[t,n,r,(0,$.jsx)(`div`,{className:`mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,children:i.map(Ae)})]})}),e[4]=a):a=e[4],a}function Ae(e){return(0,$.jsx)(`div`,{className:`h-36 animate-pulse rounded-xl border border-edge-subtle bg-surface-base shadow-surface`},e)}function je(e){let t=(0,ae.c)(2),{message:n}=e,r;return t[0]===n?r=t[1]:(r=(0,$.jsx)(`div`,{className:`flex min-h-[min(40vh,16rem)] flex-col items-center justify-center rounded-xl border border-edge-subtle bg-surface-base px-4 py-12 text-center shadow-surface`,children:(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:n})}),t[0]=n,t[1]=r),r}export{xe as ExtensionsPage};
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i}from"./messages-fmf0dnr4.js";import{t as a}from"./jszip.min-DT31yWkU.js";import{t as o}from"./preview-open-alternatives-0Q4rTfGX.js";var s=n(),c=e(a(),1),l=e(t(),1),u=r();function d(e){let t=(0,s.c)(17),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],t[0]=n):n=t[0];let[r,a]=(0,l.useState)(n),[d,m]=(0,l.useState)(null),h,g;if(t[1]===e.binaryBuffer?(h=t[2],g=t[3]):(h=()=>{if(!e.binaryBuffer)return;let t=!1;return c.default.loadAsync(e.binaryBuffer).then(e=>{t||a(Object.values(e.files).slice(0,500).map(p))}).catch(e=>{t||m(e instanceof Error?e.message:String(e))}),()=>{t=!0}},g=[e.binaryBuffer],t[1]=e.binaryBuffer,t[2]=h,t[3]=g),(0,l.useEffect)(h,g),d){let n;t[4]===e.language?n=t[5]:(n=i(e.language),t[4]=e.language,t[5]=n);let r=n,a;t[6]!==r.chat.attachmentPreviewDownloadFull||t[7]!==r.chat.attachmentPreviewOpenElsewhereHint||t[8]!==e.actions.onDownload?(a=(0,u.jsx)(o,{message:r.chat.attachmentPreviewOpenElsewhereHint,downloadLabel:r.chat.attachmentPreviewDownloadFull,onDownload:e.actions.onDownload}),t[6]=r.chat.attachmentPreviewDownloadFull,t[7]=r.chat.attachmentPreviewOpenElsewhereHint,t[8]=e.actions.onDownload,t[9]=a):a=t[9];let s;t[10]===d?s=t[11]:(s=(0,u.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:d}),t[10]=d,t[11]=s);let c;return t[12]!==a||t[13]!==s?(c=(0,u.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 overflow-auto p-4`,children:[a,s]}),t[12]=a,t[13]=s,t[14]=c):c=t[14],c}let _;return t[15]===r?_=t[16]:(_=(0,u.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto p-4`,children:(0,u.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-edge bg-surface-panel`,children:r.length===0?(0,u.jsx)(`p`,{className:`p-4 text-sm text-fg-muted`,children:`Loading archive...`}):(0,u.jsx)(`table`,{className:`w-full text-left text-xs`,children:(0,u.jsx)(`tbody`,{children:r.map(f)})})})}),t[15]=r,t[16]=_),_}function f(e){return(0,u.jsxs)(`tr`,{className:`border-b border-edge-subtle last:border-b-0 dark:border-edge`,children:[(0,u.jsx)(`td`,{className:`max-w-0 truncate px-3 py-2 font-mono text-fg`,title:e.name,children:e.dir?`${e.name}/`:e.name}),(0,u.jsx)(`td`,{className:`w-24 px-3 py-2 text-right text-fg-muted`,children:e.dir?``:m(e.size)})]},e.name)}function p(e){return{name:e.name,dir:e.dir,size:e.dir?0:e._data?.uncompressedSize??0}}function m(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}export{d as ArchivePreviewPluginView};
1
+ import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i}from"./messages-_6IXbP2u.js";import{t as a}from"./jszip.min-DT31yWkU.js";import{t as o}from"./preview-open-alternatives-CP8agNlc.js";var s=n(),c=e(a(),1),l=e(t(),1),u=r();function d(e){let t=(0,s.c)(17),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],t[0]=n):n=t[0];let[r,a]=(0,l.useState)(n),[d,m]=(0,l.useState)(null),h,g;if(t[1]===e.binaryBuffer?(h=t[2],g=t[3]):(h=()=>{if(!e.binaryBuffer)return;let t=!1;return c.default.loadAsync(e.binaryBuffer).then(e=>{t||a(Object.values(e.files).slice(0,500).map(p))}).catch(e=>{t||m(e instanceof Error?e.message:String(e))}),()=>{t=!0}},g=[e.binaryBuffer],t[1]=e.binaryBuffer,t[2]=h,t[3]=g),(0,l.useEffect)(h,g),d){let n;t[4]===e.language?n=t[5]:(n=i(e.language),t[4]=e.language,t[5]=n);let r=n,a;t[6]!==r.chat.attachmentPreviewDownloadFull||t[7]!==r.chat.attachmentPreviewOpenElsewhereHint||t[8]!==e.actions.onDownload?(a=(0,u.jsx)(o,{message:r.chat.attachmentPreviewOpenElsewhereHint,downloadLabel:r.chat.attachmentPreviewDownloadFull,onDownload:e.actions.onDownload}),t[6]=r.chat.attachmentPreviewDownloadFull,t[7]=r.chat.attachmentPreviewOpenElsewhereHint,t[8]=e.actions.onDownload,t[9]=a):a=t[9];let s;t[10]===d?s=t[11]:(s=(0,u.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:d}),t[10]=d,t[11]=s);let c;return t[12]!==a||t[13]!==s?(c=(0,u.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 overflow-auto p-4`,children:[a,s]}),t[12]=a,t[13]=s,t[14]=c):c=t[14],c}let _;return t[15]===r?_=t[16]:(_=(0,u.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto p-4`,children:(0,u.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-edge bg-surface-panel`,children:r.length===0?(0,u.jsx)(`p`,{className:`p-4 text-sm text-fg-muted`,children:`Loading archive...`}):(0,u.jsx)(`table`,{className:`w-full text-left text-xs`,children:(0,u.jsx)(`tbody`,{children:r.map(f)})})})}),t[15]=r,t[16]=_),_}function f(e){return(0,u.jsxs)(`tr`,{className:`border-b border-edge-subtle last:border-b-0 dark:border-edge`,children:[(0,u.jsx)(`td`,{className:`max-w-0 truncate px-3 py-2 font-mono text-fg`,title:e.name,children:e.dir?`${e.name}/`:e.name}),(0,u.jsx)(`td`,{className:`w-24 px-3 py-2 text-right text-fg-muted`,children:e.dir?``:m(e.size)})]},e.name)}function p(e){return{name:e.name,dir:e.dir,size:e.dir?0:e._data?.uncompressedSize??0}}function m(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}export{d as ArchivePreviewPluginView};
@@ -1 +1 @@
1
- import{Ia as e,La as t}from"./index-D99vN3es.js";async function n(n,r){let i,a=r||`unnamed`,o=`application/octet-stream`,s=0;if(typeof n==`string`){let e=await fetch(n);if(!e.ok)throw Error(`Failed to fetch file`);if(i=await e.arrayBuffer(),s=i.byteLength,o=e.headers.get(`content-type`)||o,!r){let e=n.split(`/`);a=e[e.length-1]||`document`}}else if(n instanceof File)i=await n.arrayBuffer(),s=n.size,o=n.type||o,a=r||n.name;else if(n instanceof Blob)i=await n.arrayBuffer(),s=n.size,o=n.type||o;else if(n instanceof ArrayBuffer)i=n,s=n.byteLength;else throw Error(`Invalid source type`);let c=new Uint8Array(i),l=``,u=32768;for(let e=0;e<c.length;e+=u){let t=c.slice(e,e+u);l+=String.fromCharCode(...t)}let d=btoa(l),f=`${a}_${Date.now()}_${Math.random()}`;if((o===`application/octet-stream`||/\.(csv|tsv)$/i.test(a))&&(o=e(a)??o),o?.startsWith(`image/`))return{id:f,type:`image`,name:a,mimeType:o,size:s,content:d,preview:d};if(o?.startsWith(`audio/`))return{id:f,type:`voice`,name:a,mimeType:o,size:s,content:d};if(t(a,o??``)){let e=new TextDecoder().decode(i);return{id:f,type:`document`,name:a,mimeType:o?.startsWith(`text/`)?o:`text/plain`,size:s,content:d,extractedText:e}}return{id:f,type:`document`,name:a,mimeType:o,size:s,content:d}}export{n as loadAttachment};
1
+ import{Ia as e,La as t}from"./index-DHL16aYZ.js";async function n(n,r){let i,a=r||`unnamed`,o=`application/octet-stream`,s=0;if(typeof n==`string`){let e=await fetch(n);if(!e.ok)throw Error(`Failed to fetch file`);if(i=await e.arrayBuffer(),s=i.byteLength,o=e.headers.get(`content-type`)||o,!r){let e=n.split(`/`);a=e[e.length-1]||`document`}}else if(n instanceof File)i=await n.arrayBuffer(),s=n.size,o=n.type||o,a=r||n.name;else if(n instanceof Blob)i=await n.arrayBuffer(),s=n.size,o=n.type||o;else if(n instanceof ArrayBuffer)i=n,s=n.byteLength;else throw Error(`Invalid source type`);let c=new Uint8Array(i),l=``,u=32768;for(let e=0;e<c.length;e+=u){let t=c.slice(e,e+u);l+=String.fromCharCode(...t)}let d=btoa(l),f=`${a}_${Date.now()}_${Math.random()}`;if((o===`application/octet-stream`||/\.(csv|tsv)$/i.test(a))&&(o=e(a)??o),o?.startsWith(`image/`))return{id:f,type:`image`,name:a,mimeType:o,size:s,content:d,preview:d};if(o?.startsWith(`audio/`))return{id:f,type:`voice`,name:a,mimeType:o,size:s,content:d};if(t(a,o??``)){let e=new TextDecoder().decode(i);return{id:f,type:`document`,name:a,mimeType:o?.startsWith(`text/`)?o:`text/plain`,size:s,content:d,extractedText:e}}return{id:f,type:`document`,name:a,mimeType:o,size:s,content:d}}export{n as loadAttachment};
@@ -1 +1 @@
1
- import{n as e,t}from"./vendor-react-BOUWij0V.js";import{t as n}from"./automations-workspace-C7VS-yb7.js";var r=e(),i=t();function a(){let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(n,{}),e[0]=t):t=e[0],t}export{a as AutomationsPage};
1
+ import{n as e,t}from"./vendor-react-BOUWij0V.js";import{t as n}from"./automations-workspace-B37vs5tk.js";var r=e(),i=t();function a(){let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(n,{}),e[0]=t):t=e[0],t}export{a as AutomationsPage};