@xopcai/xopc 0.0.350 → 0.0.352

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 (406) hide show
  1. package/README.md +2 -2
  2. package/README.zh-CN.md +2 -2
  3. package/dist/browser-ext/dist/sidepanel.js +1 -1
  4. package/dist/browser-ext/manifest.json +1 -1
  5. package/dist/extensions/feishu/src/adapters/cli-login.js +3 -3
  6. package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
  7. package/dist/extensions/telegram/src/inbound-processor.js +2 -2
  8. package/dist/extensions/telegram/src/outbound-sender.js +1 -1
  9. package/dist/extensions/telegram/src/plugin.js +2 -2
  10. package/dist/extensions/telegram/xopc.extension.json +1 -1
  11. package/dist/extensions/weixin/src/api/api.js +2 -2
  12. package/dist/extensions/weixin/src/auth/accounts.js +12 -12
  13. package/dist/extensions/weixin/src/messaging/debug-mode.js +5 -5
  14. package/dist/extensions/weixin/src/messaging/inbound.js +11 -11
  15. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-GAs9LrbD.js → agent-avatar-dicebear-ChlaFmiD.js} +1 -1
  16. package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-q6mFje6y.js → agent-defaults-settings-panel-CgNagNMG.js} +1 -1
  17. package/dist/gateway/static/root/assets/{agent-plugin-dialog-vR-3YU8w.js → agent-plugin-dialog-CDhtsMpV.js} +1 -1
  18. package/dist/gateway/static/root/assets/{agents-DZXa_QVc.js → agents-BLP0zRru.js} +3 -3
  19. package/dist/gateway/static/root/assets/{agents-admin-api-yUALtmym.js → agents-admin-api-C_3ucZGI.js} +1 -1
  20. package/dist/gateway/static/root/assets/{app-management-settings-panel-5GU28Q-V.js → app-management-settings-panel-DqC-oj5_.js} +1 -1
  21. package/dist/gateway/static/root/assets/{appearance-settings-uxEo59iJ.js → appearance-settings-Cfhepf6U.js} +1 -1
  22. package/dist/gateway/static/root/assets/{apps-page-06LrJSYf.js → apps-page-C6n5r8AP.js} +1 -1
  23. package/dist/gateway/static/root/assets/{archive-plugin-B4z8_4sq.js → archive-plugin-D4EiLLyl.js} +1 -1
  24. package/dist/gateway/static/root/assets/{automations-page-Cap0FMSp.js → automations-page-CMxBpT5v.js} +1 -1
  25. package/dist/gateway/static/root/assets/{automations-workspace-DEsdkcup.js → automations-workspace-DJ_-_kGh.js} +1 -1
  26. package/dist/gateway/static/root/assets/{binary-plugins-PKMXJixJ.js → binary-plugins-DQc_BlYP.js} +1 -1
  27. package/dist/gateway/static/root/assets/{block-editor-Dv83e7vb.js → block-editor-C3S6gqnS.js} +1 -1
  28. package/dist/gateway/static/root/assets/{browser-automation-inputs-B0TlAcoB.js → browser-automation-inputs-D2SwaQ2F.js} +1 -1
  29. package/dist/gateway/static/root/assets/{browser-automations-page-C1mBYS2x.js → browser-automations-page-CGG1740U.js} +1 -1
  30. package/dist/gateway/static/root/assets/{browser-settings-page-Co2D8mug.js → browser-settings-page-COTo7btH.js} +1 -1
  31. package/dist/gateway/static/root/assets/{capabilities-e-fO70DK.js → capabilities-D4qdO980.js} +1 -1
  32. package/dist/gateway/static/root/assets/{capabilities-page-nIIqZJuL.js → capabilities-page-BsC346Ym.js} +2 -2
  33. package/dist/gateway/static/root/assets/{capabilities-settings-panel-BrXWQIs7.js → capabilities-settings-panel-CRL4gfk5.js} +1 -1
  34. package/dist/gateway/static/root/assets/{capability-header-actions-C6d_GsqD.js → capability-header-actions-B_60-buR.js} +1 -1
  35. package/dist/gateway/static/root/assets/{channels-EUbBfvHY.js → channels-DNxr72oD.js} +1 -1
  36. package/dist/gateway/static/root/assets/{chat-terminal-dock-CZTrJ5Do.js → chat-terminal-dock-DfTUgrey.js} +1 -1
  37. package/dist/gateway/static/root/assets/{computer-settings-page-CWBZwtYT.js → computer-settings-page-Bk84TKyF.js} +1 -1
  38. package/dist/gateway/static/root/assets/{connector-service-page-B5pF87fY.js → connector-service-page-B2pC--2X.js} +1 -1
  39. package/dist/gateway/static/root/assets/{connectors-page-9ztbuGCI.js → connectors-page-Bu15_14O.js} +1 -1
  40. package/dist/gateway/static/root/assets/{date-picker-xb5w8iAa.js → date-picker-CCN30yiy.js} +1 -1
  41. package/dist/gateway/static/root/assets/{dependency-picker-D7B6s4d4.js → dependency-picker-CV2ybJJd.js} +1 -1
  42. package/dist/gateway/static/root/assets/{desktop-pet-Bt5JatKm.js → desktop-pet-DipFHe4X.js} +1 -1
  43. package/dist/gateway/static/root/assets/{desktop-pet-settings-BdgUJk-e.js → desktop-pet-settings-Dg3RM_vY.js} +1 -1
  44. package/dist/gateway/static/root/assets/{device-pairing-wizard-DQ7LNTKz.js → device-pairing-wizard-DUy1HymM.js} +1 -1
  45. package/dist/gateway/static/root/assets/{directory-picker-path-field-_PcWmfRH.js → directory-picker-path-field-BTuFpGIK.js} +1 -1
  46. package/dist/gateway/static/root/assets/{extension-debug-page-BhXwxHMP.js → extension-debug-page-xM8vfbRZ.js} +1 -1
  47. package/dist/gateway/static/root/assets/{extension-page-CIXPBzGU.js → extension-page-Cl8zlion.js} +1 -1
  48. package/dist/gateway/static/root/assets/{extension-settings-page-DE4UUMD-.js → extension-settings-page-DODk0nOi.js} +1 -1
  49. package/dist/gateway/static/root/assets/{gateway-config-swr-CmjHbMj7.js → gateway-config-swr-DZWFlfJr.js} +1 -1
  50. package/dist/gateway/static/root/assets/{gateway-realtime-DzyR6LYb.js → gateway-realtime-HO9tL9xo.js} +1 -1
  51. package/dist/gateway/static/root/assets/gateway-realtime-store-B01fiKrV.js +1 -0
  52. package/dist/gateway/static/root/assets/{gateway-settings-CI2oGZEg.js → gateway-settings-BL3C7Q9w.js} +1 -1
  53. package/dist/gateway/static/root/assets/{gateway-startup-retry-CbOUnKv5.js → gateway-startup-retry-Cg1nbxJR.js} +1 -1
  54. package/dist/gateway/static/root/assets/{home-page-DfJvuWC-.js → home-page-CjJVq_Ff.js} +1 -1
  55. package/dist/gateway/static/root/assets/{image-generation-api-BmLpVntI.js → image-generation-api-DSnPfr_U.js} +1 -1
  56. package/dist/gateway/static/root/assets/{imports-page-DRG-aahH.js → imports-page-By9oc8sD.js} +1 -1
  57. package/dist/gateway/static/root/assets/index-B-w6Rk9Z.css +1 -0
  58. package/dist/gateway/static/root/assets/{index-Z6i4GDcT.js → index-S4z-eKe-.js} +9 -9
  59. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CSwc_Olv.js → keyboard-shortcuts-settings-ixQ8_6ad.js} +1 -1
  60. package/dist/gateway/static/root/assets/{local-app-workbench-page-DsSCCThS.js → local-app-workbench-page-Bnz5YOks.js} +1 -1
  61. package/dist/gateway/static/root/assets/{local-apps-page-C4psaPz5.js → local-apps-page-BV3NFUJQ.js} +1 -1
  62. package/dist/gateway/static/root/assets/local-session-drafts-CuyTzbfW.js +1 -0
  63. package/dist/gateway/static/root/assets/{locale-store-WMaCMm3_.js → locale-store-qcYD05PF.js} +1 -1
  64. package/dist/gateway/static/root/assets/{logs-page-kx7ama7K.js → logs-page-DVqwybaT.js} +1 -1
  65. package/dist/gateway/static/root/assets/{management-settings-BqcrFVsF.js → management-settings-CUoDWFg7.js} +1 -1
  66. package/dist/gateway/static/root/assets/{markdown-view-Oe4rXk1N.js → markdown-view-BhFHoVtG.js} +1 -1
  67. package/dist/gateway/static/root/assets/{media-plugins-BCMV9heb.js → media-plugins-cpalRgVI.js} +1 -1
  68. package/dist/gateway/static/root/assets/messages-vL3EpIrL.js +3 -0
  69. package/dist/gateway/static/root/assets/{note-detail-panel-Bvjc5JNM.js → note-detail-panel-CxbZWvj1.js} +3 -3
  70. package/dist/gateway/static/root/assets/{notes-page-Dak5PuTq.js → notes-page-DkEOEza6.js} +1 -1
  71. package/dist/gateway/static/root/assets/{page-context-capture-button-BYQnvTni.js → page-context-capture-button-CjCYNkVb.js} +1 -1
  72. package/dist/gateway/static/root/assets/{page-tabs--d3GEnvY.js → page-tabs-Dnzie6QW.js} +1 -1
  73. package/dist/gateway/static/root/assets/{preview-open-alternatives-ByuWaDEv.js → preview-open-alternatives-D1H4_Nfl.js} +1 -1
  74. package/dist/gateway/static/root/assets/{product-open-page-CMvjGjTz.js → product-open-page-BJwEshPw.js} +1 -1
  75. package/dist/gateway/static/root/assets/{project-detail-page-m8ybJpJ_.js → project-detail-page-BWC89e7l.js} +1 -1
  76. package/dist/gateway/static/root/assets/{projects-page-i00ns68r.js → projects-page-BYmHC91B.js} +1 -1
  77. package/dist/gateway/static/root/assets/{registry-api-DEePN1Rc.js → registry-api-C0j3sKT4.js} +1 -1
  78. package/dist/gateway/static/root/assets/{remote-access-hub-CY4kQa1Z.js → remote-access-hub-DuVzpZ9R.js} +1 -1
  79. package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-D-gA6BW9.js → runtime-tools-settings-panel-SbIgL9Ya.js} +1 -1
  80. package/dist/gateway/static/root/assets/{scenes-page--sExi9Fz.js → scenes-page-BBl_4U1U.js} +1 -1
  81. package/dist/gateway/static/root/assets/{schema-form-B8Zns_Se.js → schema-form-Rj-wi9sm.js} +1 -1
  82. package/dist/gateway/static/root/assets/{session-api-Bv-hCMKS.js → session-api-iR1SFNHe.js} +1 -1
  83. package/dist/gateway/static/root/assets/{session-manager-BcDptzCN.js → session-manager-3YOU74jt.js} +5 -5
  84. package/dist/gateway/static/root/assets/{sessions-page-BzW33zp4.js → sessions-page-BnipzwJ6.js} +1 -1
  85. package/dist/gateway/static/root/assets/settings-advanced-gate-C7oNKVxC.js +1 -0
  86. package/dist/gateway/static/root/assets/{settings-form-section-Lpep8yx-.js → settings-form-section-6gOr-ype.js} +1 -1
  87. package/dist/gateway/static/root/assets/{settings-page-Cl_KOVsG.js → settings-page-D1tVcmlR.js} +1 -1
  88. package/dist/gateway/static/root/assets/{setup-status-panel-mWQaql5h.js → setup-status-panel-CR0VBBw3.js} +1 -1
  89. package/dist/gateway/static/root/assets/{share-preview-page-ZZ6qg3xL.js → share-preview-page-CK0Bg_-o.js} +1 -1
  90. package/dist/gateway/static/root/assets/{shares-settings-DhQRwYYL.js → shares-settings-B3Ghvh3c.js} +1 -1
  91. package/dist/gateway/static/root/assets/{skill-api-DC3EXeUS.js → skill-api-CoIsCPbI.js} +1 -1
  92. package/dist/gateway/static/root/assets/skill-reload-api-DMIwfISw.js +1 -0
  93. package/dist/gateway/static/root/assets/{skills-page-ThkBmKew.js → skills-page-CDkm7yig.js} +1 -1
  94. package/dist/gateway/static/root/assets/{system-settings-panel-C93mkvML.js → system-settings-panel-Cfv-jDmY.js} +1 -1
  95. package/dist/gateway/static/root/assets/{task-detail-page-DWqYIP_j.js → task-detail-page-eYs6qgcW.js} +1 -1
  96. package/dist/gateway/static/root/assets/{tunnel-api-DI4NcRc8.js → tunnel-api-CpOQaCFN.js} +1 -1
  97. package/dist/gateway/static/root/assets/{usage-page-C--1ibDb.js → usage-page-Cye-2eKA.js} +1 -1
  98. package/dist/gateway/static/root/assets/{use-autosave-83u3Kf_7.js → use-autosave-o6YLrkpO.js} +1 -1
  99. package/dist/gateway/static/root/assets/{user-model-page-DasK0_MY.js → user-model-page-Bg-jeU7W.js} +1 -1
  100. package/dist/gateway/static/root/assets/{voice-api-key-field-D4SxKV47.js → voice-api-key-field-FMNwQIho.js} +1 -1
  101. package/dist/gateway/static/root/assets/{voice-config-api-DbjjZkIg.js → voice-config-api-CylVelIb.js} +1 -1
  102. package/dist/gateway/static/root/assets/{work-discovery-overlay-RSWjSoEp.js → work-discovery-overlay-9bULjfGk.js} +1 -1
  103. package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BINT9Shl.js → workflow-run-setup-panel-VYQHBiz3.js} +1 -1
  104. package/dist/gateway/static/root/assets/{workflows-page-Bj3K-lxR.js → workflows-page-KnoMMEDN.js} +1 -1
  105. package/dist/gateway/static/root/index.html +15 -15
  106. package/dist/package.js +1 -1
  107. package/dist/packages/gateway-contract/src/session-input-command.js +2 -1
  108. package/dist/src/agent/agent-manager.js +31 -22
  109. package/dist/src/agent/agent-scope.js +2 -2
  110. package/dist/src/agent/background-review/prompts.js +1 -1
  111. package/dist/src/agent/background-review/run-background-review.js +4 -4
  112. package/dist/src/agent/bootstrap/filter-bootstrap-files.js +1 -1
  113. package/dist/src/agent/coding/repository-instructions.js +1 -1
  114. package/dist/src/agent/context/coordinator.js +2 -2
  115. package/dist/src/agent/context/execution-context.js +4 -4
  116. package/dist/src/agent/context/execution-scope.js +2 -2
  117. package/dist/src/agent/context/project-context.js +3 -3
  118. package/dist/src/agent/data-acquisition/service.js +1 -1
  119. package/dist/src/agent/embedded/index.js +2 -2
  120. package/dist/src/agent/embedded/model-runtime.js +1 -1
  121. package/dist/src/agent/embedded/run-for-session.js +4 -4
  122. package/dist/src/agent/embedded/run-turn.js +4 -4
  123. package/dist/src/agent/embedded/session-tool-result-guard.js +3 -3
  124. package/dist/src/agent/embedded/tool-result-truncation.js +1 -1
  125. package/dist/src/agent/external-tools/cliProvider.js +3 -3
  126. package/dist/src/agent/external-tools/composio-provider.js +3 -3
  127. package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
  128. package/dist/src/agent/external-tools/gateway-tools.js +1 -1
  129. package/dist/src/agent/external-tools/mcp-provider.js +3 -3
  130. package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
  131. package/dist/src/agent/image/generation/providers/dashscope.js +1 -1
  132. package/dist/src/agent/image/generation/providers/fal.js +1 -1
  133. package/dist/src/agent/image/generation/providers/google.js +1 -1
  134. package/dist/src/agent/image/generation/runtime.js +1 -1
  135. package/dist/src/agent/image/index.js +1 -1
  136. package/dist/src/agent/image/load-image-media.js +1 -1
  137. package/dist/src/agent/image/tool-model-config.js +2 -2
  138. package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
  139. package/dist/src/agent/inbound/inbound-loop.js +2 -2
  140. package/dist/src/agent/index.js +1 -1
  141. package/dist/src/agent/mcp/bundle-mcp-config.js +1 -1
  142. package/dist/src/agent/mcp/bundle-mcp-gateway.js +1 -1
  143. package/dist/src/agent/mcp/bundle-mcp-runtime.js +2 -2
  144. package/dist/src/agent/mcp/index.js +2 -2
  145. package/dist/src/agent/mcp/mcp-stdio-transport.js +1 -1
  146. package/dist/src/agent/mcp/mcp-transport.js +1 -1
  147. package/dist/src/agent/mcp/oauth/mcp-oauth-manager.js +1 -1
  148. package/dist/src/agent/mcp/plugin-http-fetch.js +1 -1
  149. package/dist/src/agent/memory/context-recovery.js +1 -1
  150. package/dist/src/agent/memory/index.js +1 -1
  151. package/dist/src/agent/messaging/outbound-coordinator.js +1 -1
  152. package/dist/src/agent/orchestration/agent-orchestrator.js +1 -1
  153. package/dist/src/agent/prompt/service-prompt-builder.js +2 -2
  154. package/dist/src/agent/sandbox/exec-policy.js +1 -1
  155. package/dist/src/agent/service/direct-turn-helpers.js +4 -4
  156. package/dist/src/agent/service/process-direct-one-shot.js +1 -1
  157. package/dist/src/agent/service/process-direct-streaming.js +5 -5
  158. package/dist/src/agent/service/webchat-tts.js +2 -2
  159. package/dist/src/agent/service.js +21 -21
  160. package/dist/src/agent/session/session-inspector.js +1 -1
  161. package/dist/src/agent/source-context/index.js +2 -2
  162. package/dist/src/agent/starter-agents.d.ts +3 -0
  163. package/dist/src/agent/starter-agents.js +57 -2
  164. package/dist/src/agent/tasks/task-judge-service.js +4 -4
  165. package/dist/src/agent/tools/create-share-tool.js +3 -3
  166. package/dist/src/agent/tools/dataBatch.js +1 -1
  167. package/dist/src/agent/tools/delegate-tool.js +3 -3
  168. package/dist/src/agent/tools/delegation-parent-policy.js +1 -1
  169. package/dist/src/agent/tools/executor.js +1 -1
  170. package/dist/src/agent/tools/factory.d.ts +3 -1
  171. package/dist/src/agent/tools/factory.js +22 -19
  172. package/dist/src/agent/tools/fetch-text.js +1 -1
  173. package/dist/src/agent/tools/image-generate-tool.js +3 -3
  174. package/dist/src/agent/tools/index.js +6 -6
  175. package/dist/src/agent/tools/list-dir.js +1 -1
  176. package/dist/src/agent/tools/publish-artifacts.js +2 -2
  177. package/dist/src/agent/tools/read.js +2 -2
  178. package/dist/src/agent/tools/review-workspace.js +1 -1
  179. package/dist/src/agent/tools/send-media.js +2 -2
  180. package/dist/src/agent/tools/skills-tools.js +1 -1
  181. package/dist/src/agent/tools/tts-tool.js +1 -1
  182. package/dist/src/agent/tools/user-context-tool.js +1 -1
  183. package/dist/src/agent/tools/write.js +2 -2
  184. package/dist/src/agent/tools/xopc-use-tool.js +5 -5
  185. package/dist/src/agent/workflow/subagent-runner.js +1 -1
  186. package/dist/src/agent/workflow/workflow-child-tools.js +2 -1
  187. package/dist/src/agent-catalog/capabilities.js +2 -2
  188. package/dist/src/agent-config/resolver.js +2 -0
  189. package/dist/src/agent-config/schema.d.ts +2 -0
  190. package/dist/src/agent-config/schema.js +2 -0
  191. package/dist/src/ai-assist/text-assist.js +1 -1
  192. package/dist/src/auth/credentials.js +1 -1
  193. package/dist/src/auth/oauth-provider-lock.js +1 -1
  194. package/dist/src/auth/sync-provider-auth.js +1 -1
  195. package/dist/src/automations/capabilities/drafts.js +1 -1
  196. package/dist/src/automations/domain/index.js +2 -2
  197. package/dist/src/automations/events/event-repository.js +2 -1
  198. package/dist/src/automations/index.js +4 -4
  199. package/dist/src/automations/service/automation-service.js +2 -2
  200. package/dist/src/backup/archive.js +1 -1
  201. package/dist/src/bootstrap/application-state.js +1 -1
  202. package/dist/src/browser/native-messaging-host.js +1 -1
  203. package/dist/src/capabilities/runtime/dispatcher.js +1 -1
  204. package/dist/src/capabilities/runtime/product.js +1 -1
  205. package/dist/src/channels/attachments/voice-stt-webchat.js +2 -2
  206. package/dist/src/channels/index.js +2 -2
  207. package/dist/src/channels/outbound-sender.js +1 -1
  208. package/dist/src/channels/pairing/allow-from-file.js +9 -9
  209. package/dist/src/channels/pairing/pairing-store.js +6 -6
  210. package/dist/src/chat-commands/agent-edit.js +1 -1
  211. package/dist/src/chat-commands/builtins/config.js +4 -4
  212. package/dist/src/chat-commands/builtins/review.js +1 -1
  213. package/dist/src/chat-commands/builtins/session.js +1 -1
  214. package/dist/src/chat-commands/builtins/thinking.js +1 -1
  215. package/dist/src/chat-commands/builtins/tts.js +1 -1
  216. package/dist/src/chat-commands/builtins/understanding.js +1 -1
  217. package/dist/src/chat-commands/builtins/workflow.js +2 -2
  218. package/dist/src/chat-commands/context.js +3 -3
  219. package/dist/src/chat-commands/index.js +3 -3
  220. package/dist/src/cli/commands/agent.js +7 -7
  221. package/dist/src/cli/commands/agents.js +1 -1
  222. package/dist/src/cli/commands/config.js +1 -1
  223. package/dist/src/cli/commands/connectors.js +1 -1
  224. package/dist/src/cli/commands/doctor/checks/channel-plugins.js +1 -1
  225. package/dist/src/cli/commands/doctor/checks/gateway-health.js +1 -1
  226. package/dist/src/cli/commands/doctor/checks/provider-auth.js +2 -2
  227. package/dist/src/cli/commands/doctor/checks/tool-runtimes.js +1 -1
  228. package/dist/src/cli/commands/extension-agent-plugin.js +2 -2
  229. package/dist/src/cli/commands/extension-dev.js +1 -1
  230. package/dist/src/cli/commands/extension-marketplace.js +2 -2
  231. package/dist/src/cli/commands/extension.js +4 -4
  232. package/dist/src/cli/commands/gateway/shared.js +1 -1
  233. package/dist/src/cli/commands/gateway/token.js +1 -1
  234. package/dist/src/cli/commands/image.js +1 -1
  235. package/dist/src/cli/commands/init.js +1 -1
  236. package/dist/src/cli/commands/models.js +1 -1
  237. package/dist/src/cli/commands/onboard/channels/registry.js +1 -1
  238. package/dist/src/cli/commands/onboard/model.js +2 -2
  239. package/dist/src/cli/commands/onboard.js +1 -1
  240. package/dist/src/cli/commands/project.js +2 -2
  241. package/dist/src/cli/commands/runtime.js +1 -1
  242. package/dist/src/cli/commands/skills.js +2 -2
  243. package/dist/src/cli/commands/tunnel.js +4 -4
  244. package/dist/src/cli/extension-cli-register.js +5 -5
  245. package/dist/src/cli/utils/gateway-client.js +1 -1
  246. package/dist/src/cli/utils/init-workspace-core.js +2 -2
  247. package/dist/src/cli/utils/session.js +1 -1
  248. package/dist/src/computer/runtime.js +2 -2
  249. package/dist/src/config/index.js +7 -7
  250. package/dist/src/config/loader.js +3 -3
  251. package/dist/src/config/models-json.js +1 -1
  252. package/dist/src/config/schema.js +1 -1
  253. package/dist/src/connectors/cli/authorization.js +1 -1
  254. package/dist/src/connectors/cli/runtime.js +1 -1
  255. package/dist/src/connectors/composio-sessions.js +1 -1
  256. package/dist/src/connectors/composio.js +1 -1
  257. package/dist/src/connectors/connected-source-understanding.js +3 -3
  258. package/dist/src/connectors/connection-recovery-service.js +10 -5
  259. package/dist/src/connectors/health.js +1 -1
  260. package/dist/src/connectors/plugin-mcp-recovery.js +1 -1
  261. package/dist/src/discussions/live-worker.js +1 -1
  262. package/dist/src/discussions/recording.js +1 -1
  263. package/dist/src/discussions/sealer.js +1 -1
  264. package/dist/src/extensions/activation-context.js +3 -3
  265. package/dist/src/extensions/agent-plugins/validation.js +1 -1
  266. package/dist/src/extensions/api.js +4 -4
  267. package/dist/src/extensions/bundled-extension-activation.js +1 -1
  268. package/dist/src/extensions/index.js +3 -3
  269. package/dist/src/extensions/install.js +1 -1
  270. package/dist/src/extensions/loader.js +2 -2
  271. package/dist/src/extensions/sdk/index.js +1 -1
  272. package/dist/src/extensions/sdk/media.js +1 -1
  273. package/dist/src/extensions/update.js +1 -1
  274. package/dist/src/gateway/agents-admin.d.ts +1 -0
  275. package/dist/src/gateway/agents-admin.js +3 -2
  276. package/dist/src/gateway/device-routes.js +2 -2
  277. package/dist/src/gateway/file-path-classifier.js +2 -2
  278. package/dist/src/gateway/global-defaults-admin.js +1 -1
  279. package/dist/src/gateway/hono/app.js +3 -3
  280. package/dist/src/gateway/hono/lib/config-payload.js +4 -4
  281. package/dist/src/gateway/hono/routes/agents.js +9 -2
  282. package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
  283. package/dist/src/gateway/hono/routes/browser.js +1 -1
  284. package/dist/src/gateway/hono/routes/commands-skills.js +4 -4
  285. package/dist/src/gateway/hono/routes/config-patch/gateway.js +1 -1
  286. package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
  287. package/dist/src/gateway/hono/routes/device-push.js +1 -1
  288. package/dist/src/gateway/hono/routes/home.js +1 -1
  289. package/dist/src/gateway/hono/routes/mcp.js +2 -2
  290. package/dist/src/gateway/hono/routes/media.js +1 -1
  291. package/dist/src/gateway/hono/routes/models.js +5 -5
  292. package/dist/src/gateway/hono/routes/notes.js +3 -3
  293. package/dist/src/gateway/hono/routes/projects.js +4 -4
  294. package/dist/src/gateway/hono/routes/session-command-handler.js +1 -1
  295. package/dist/src/gateway/hono/routes/session-input-handler.js +3 -3
  296. package/dist/src/gateway/hono/routes/sessions.js +1 -1
  297. package/dist/src/gateway/hono/routes/shares.js +3 -3
  298. package/dist/src/gateway/hono/routes/site-shares.js +1 -1
  299. package/dist/src/gateway/hono/routes/tasks.js +2 -2
  300. package/dist/src/gateway/hono/routes/user-model-refresh.js +1 -1
  301. package/dist/src/gateway/hono/routes/user-model.js +5 -5
  302. package/dist/src/gateway/hono/routes/voice.js +6 -6
  303. package/dist/src/gateway/hono/routes/workflows.js +2 -2
  304. package/dist/src/gateway/host.d.ts +0 -2
  305. package/dist/src/gateway/host.js +2 -5
  306. package/dist/src/gateway/image-generation-setup.js +3 -3
  307. package/dist/src/gateway/index.js +1 -1
  308. package/dist/src/gateway/lock.js +11 -11
  309. package/dist/src/gateway/media-access.js +1 -1
  310. package/dist/src/gateway/mobile-privacy.js +2 -2
  311. package/dist/src/gateway/ports.js +6 -6
  312. package/dist/src/gateway/run-loop.js +1 -1
  313. package/dist/src/gateway/scenes/mailContext.js +1 -1
  314. package/dist/src/gateway/scenes/slackThreadSource.js +1 -1
  315. package/dist/src/gateway/server.js +1 -1
  316. package/dist/src/gateway/service/config-coordinator.js +3 -3
  317. package/dist/src/gateway/service/run-gateway-agent.js +3 -3
  318. package/dist/src/gateway/service/sessions-api.js +1 -1
  319. package/dist/src/gateway/service.js +37 -37
  320. package/dist/src/gateway/session-context-summary.js +2 -2
  321. package/dist/src/gateway/workspace-editor-path.js +2 -2
  322. package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
  323. package/dist/src/home-intelligence/generator.js +1 -1
  324. package/dist/src/infra/gateway-processes.js +2 -2
  325. package/dist/src/infra/path-env.js +3 -3
  326. package/dist/src/infra/update-global.js +10 -10
  327. package/dist/src/local-apps/service.js +2 -2
  328. package/dist/src/mcp/gateway-http-client.js +1 -1
  329. package/dist/src/media-understanding/openai-compatible-audio.js +1 -1
  330. package/dist/src/notes/agent-context.js +4 -4
  331. package/dist/src/notes/index.js +1 -1
  332. package/dist/src/notes/service.js +1 -1
  333. package/dist/src/notes/store.js +1 -1
  334. package/dist/src/notifications/device-store.d.ts +0 -1
  335. package/dist/src/notifications/device-store.js +2 -7
  336. package/dist/src/notifications/service.d.ts +0 -1
  337. package/dist/src/notifications/service.js +13 -82
  338. package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
  339. package/dist/src/providers/index.js +2 -2
  340. package/dist/src/providers/model-catalog-persistence.js +1 -1
  341. package/dist/src/providers/model-reference-auditor.js +1 -1
  342. package/dist/src/providers/register-runtime-providers.js +1 -1
  343. package/dist/src/remote-access/exposure-manager.js +1 -1
  344. package/dist/src/scenes/taskFollowUp/agentExecutor.js +4 -4
  345. package/dist/src/scenes/taskFollowUp/resources.js +1 -1
  346. package/dist/src/scenes/taskFollowUp/service.js +4 -4
  347. package/dist/src/session/execution-detail.js +16 -0
  348. package/dist/src/session/index.js +2 -2
  349. package/dist/src/session/session-title.js +1 -1
  350. package/dist/src/session/store.js +4 -4
  351. package/dist/src/session/thinking-resolve.js +1 -1
  352. package/dist/src/share/share-store.js +1 -1
  353. package/dist/src/share/share-thumbnail.js +1 -1
  354. package/dist/src/share/share-zip.js +1 -1
  355. package/dist/src/share/site-proxy.js +1 -1
  356. package/dist/src/share/site-share-store.js +1 -1
  357. package/dist/src/storage/sqlite/connection.js +9 -9
  358. package/dist/src/storage/sqlite/notes-repository.js +19 -4
  359. package/dist/src/tasks/capabilities/read.js +2 -2
  360. package/dist/src/tasks/capabilities/write.js +1 -1
  361. package/dist/src/tasks/execution-context.js +1 -1
  362. package/dist/src/tasks/home-query-service.js +3 -3
  363. package/dist/src/tasks/index.js +4 -4
  364. package/dist/src/tasks/task-application-service.js +2 -2
  365. package/dist/src/tasks/task-collaboration-delivery.js +1 -1
  366. package/dist/src/tasks/task-context-assembler.js +1 -1
  367. package/dist/src/tasks/task-handoff-service.js +1 -1
  368. package/dist/src/tasks/task-main-update-decision-service.js +1 -1
  369. package/dist/src/tui/backends/embedded-backend.js +12 -12
  370. package/dist/src/tui/backends/gateway-realtime-backend.js +1 -1
  371. package/dist/src/tui/extension-host/load-extensions.js +1 -1
  372. package/dist/src/tui/tui-command-formatters.js +1 -1
  373. package/dist/src/tui/tui-commands.js +6 -6
  374. package/dist/src/tui/tui-picker-overlay.js +1 -1
  375. package/dist/src/tui/tui-skills-autocomplete.js +1 -1
  376. package/dist/src/tui/tui-startup-resources.js +4 -4
  377. package/dist/src/tui/tui.js +7 -7
  378. package/dist/src/tunnel/frpc-binary.js +1 -1
  379. package/dist/src/tunnel/gateway-lifecycle.js +1 -1
  380. package/dist/src/voice/audio/normalize.js +34 -1
  381. package/dist/src/voice/realtime/memory-context.js +3 -3
  382. package/dist/src/voice/realtime/persona-context.js +1 -1
  383. package/dist/src/voice/realtime/runtime.js +4 -4
  384. package/dist/src/voice/stt/index.js +2 -2
  385. package/dist/src/voice/stt/preflight.js +1 -1
  386. package/dist/src/voice/stt/providers/alibaba-transcription.js +1 -1
  387. package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +1 -1
  388. package/dist/src/voice/stt/transcribe-core.js +1 -1
  389. package/dist/src/voice/tts/index.js +3 -3
  390. package/dist/src/voice/tts/merge-config.js +1 -1
  391. package/dist/src/voice/tts/payload.js +1 -1
  392. package/dist/src/voice/tts/providers/xopc-cloud-speech.js +1 -1
  393. package/dist/src/voice/tts/speak-core.js +1 -1
  394. package/dist/src/work-discovery/incremental-repository.js +1 -1
  395. package/dist/src/work-discovery/index.js +1 -1
  396. package/dist/src/work-discovery/service.js +5 -5
  397. package/dist/src/workflows/engine/workflow-engine.js +1 -1
  398. package/dist/src/workflows/service/workflow-run-service.js +8 -8
  399. package/dist/src/workflows/service/workflow-session-bridge.js +1 -1
  400. package/package.json +10 -11
  401. package/dist/gateway/static/root/assets/gateway-realtime-store-KyhksZSM.js +0 -1
  402. package/dist/gateway/static/root/assets/index-CPi50n0l.css +0 -1
  403. package/dist/gateway/static/root/assets/local-session-drafts-CxXjQ5Du.js +0 -1
  404. package/dist/gateway/static/root/assets/messages-sXePe3LQ.js +0 -3
  405. package/dist/gateway/static/root/assets/settings-advanced-gate-CVnn1f7J.js +0 -1
  406. package/dist/gateway/static/root/assets/skill-reload-api-C-Dn5hSx.js +0 -1
@@ -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-Oe4rXk1N.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-sXePe3LQ.js";import{t as m}from"./cn-JdwAhgNB.js";import{c as h,i as g,n as _,r as v}from"./locale-store-WMaCMm3_.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{o as O}from"./gateway-realtime-DzyR6LYb.js";import{t as k}from"./skeleton-BwbyijEw.js";import{Bc as A,Bn as j,Hn as M,Ns as N,Rc as P,So as F,Vn as ee,Wn as I,Yu as L,_c as te,_o as R,dl as z,go as B,ho as V,ka as H,od as ne,vc as re,vo as U,yo as W,zn as G,zu as K}from"./index-Z6i4GDcT.js";import{n as q,t as J}from"./capability-header-actions-C6d_GsqD.js";import{t as Y}from"./page-tabs--d3GEnvY.js";import{t as ie}from"./agent-plugin-dialog-vR-3YU8w.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||e.pluginId===t);return n?n.source===`bundled`?`bundled`:`user`:`absent`}var pe={debounced:``,detailPkg:null,quickInstallPkg:null,rowBusy:null,actionError:null,restartHint:null};function me({className:e,query:t}){let n=_(e=>e.language),r=p(n).extensionsPage,i=h(e=>!!e.conversationId),a=B(),{mutate:o}=T(),[s,c]=(0,Z.useReducer)(H,pe),{debounced:l,detailPkg:d,quickInstallPkg:f,rowBusy:g,actionError:v,restartHint:y}=s,b=i?`marketplace-${l}`:null;(0,Z.useEffect)(()=>{let e=window.setTimeout(()=>c({type:`patch`,patch:{debounced:t.trim()}}),300);return()=>window.clearTimeout(e)},[t]);let{data:x,isLoading:S,error:C}=E(b,()=>oe(l),{revalidateOnFocus:!1}),w=(0,Z.useCallback)(()=>{o(`gateway-extensions-list`),O()},[o]),D=(0,Z.useCallback)(async(e,t)=>{c({type:`patch`,patch:{actionError:null,restartHint:null,rowBusy:e}});try{let n=await le({name:e,overwrite:t});w(),n.requiresGatewayRestart&&c({type:`patch`,patch:{restartHint:r.marketplaceRestartHint}})}catch(e){throw c({type:`patch`,patch:{actionError:e instanceof Error?e.message:r.marketplaceInstallFailed}}),e}finally{c({type:`patch`,patch:{rowBusy:null}})}},[r.marketplaceInstallFailed,r.marketplaceRestartHint,w]),A=(0,Z.useCallback)(async e=>{c({type:`patch`,patch:{actionError:null,restartHint:null,rowBusy:e}});try{let t=await de(e);w(),t.requiresGatewayRestart&&c({type:`patch`,patch:{restartHint:r.marketplaceRestartHint}})}catch(e){throw c({type:`patch`,patch:{actionError:e instanceof Error?e.message:r.marketplaceUninstallFailed}}),e}finally{c({type:`patch`,patch:{rowBusy:null}})}},[r.marketplaceRestartHint,r.marketplaceUninstallFailed,w]),j=x??[];return(0,$.jsxs)(`div`,{className:m(`flex flex-col gap-4`,e),children:[C?(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:C instanceof Error?C.message:r.marketplaceLoadFailed}):null,v?(0,$.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:v}):null,y?(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:y}):null,S&&!x?(0,$.jsx)(`ul`,{className:`flex flex-col gap-3`,"aria-label":r.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)(k,{className:`h-5 w-40`}),(0,$.jsx)(k,{className:`h-4 w-full max-w-xl`}),(0,$.jsx)(k,{className:`h-4 w-2/3 max-w-md`})]}),(0,$.jsx)(k,{className:`h-8 w-20`})]})},e))}):(0,$.jsx)(`ul`,{className:`flex flex-col gap-3`,children:j.length===0?(0,$.jsx)(`li`,{className:`text-sm text-fg-muted`,children:r.marketplaceEmpty}):j.map(e=>{let t=fe(a,e.id),i=g===e.id,o=e.localizations?.[n.startsWith(`zh`)?`zh-CN`:`en`],s=o?.displayName??e.name,l=o?.description??e.description;return(0,$.jsx)(`li`,{className:`list-none`,children:(0,$.jsxs)(`div`,{role:`button`,tabIndex:0,"aria-label":`${s}, ${r.marketplaceDetailTitle}`,onClick:()=>c({type:`patch`,patch:{detailPkg:e.id}}),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),c({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:z}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`h3`,{className:`truncate font-semibold text-fg`,children:s}),s===e.id?null:(0,$.jsx)(`p`,{className:`truncate font-mono text-[10px] text-fg-subtle`,children:e.id})]}),e.verified?(0,$.jsx)(K,{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]}),l?(0,$.jsx)(`p`,{className:`mt-1 line-clamp-2 text-sm text-fg-muted`,children:l}):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)(z,{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:r.marketplaceBuiltin}):t===`user`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{className:`text-[11px] font-medium text-fg-muted`,children:r.marketplaceInstalled}),e.packageType===`plugin`?(0,$.jsx)(`button`,{type:`button`,onClick:()=>c({type:`patch`,patch:{detailPkg:e.id,quickInstallPkg:null}}),className:m(`inline-flex items-center justify-center 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`),children:n.startsWith(`zh`)?`管理`:`Manage`}):(0,$.jsxs)(`button`,{type:`button`,disabled:i,onClick:()=>{window.confirm(r.marketplaceUninstallConfirm)&&A(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:[i?(0,$.jsx)(u,{className:`size-3.5 animate-spin`,"aria-hidden":!0}):(0,$.jsx)(re,{className:`size-3.5`,strokeWidth:2,"aria-hidden":!0}),r.marketplaceUninstall]})]}):(0,$.jsx)(`button`,{type:`button`,onClick:()=>c({type:`patch`,patch:e.packageType===`plugin`?{detailPkg:e.id,quickInstallPkg:e.id}:{detailPkg:e.id,quickInstallPkg:null}}),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:e.packageType===`plugin`?n.startsWith(`zh`)?`安装`:`Install`:r.marketplaceReview})})]})},e.id)})}),d?(0,$.jsx)(he,{packageName:d,autoInstall:f===d,copy:r,extensions:a,onClose:()=>c({type:`patch`,patch:{detailPkg:null,quickInstallPkg:null}}),onInstall:D,onUninstall:A}):null]})}function he(e){let t=(0,ae.c)(96),{packageName:n,autoInstall:r,copy:i,extensions:o,onClose:s,onInstall:c,onUninstall:d}=e,[p,g]=(0,Z.useState)(!1),[_,v]=(0,Z.useState)(!1),b=h(be)?`ext-mp-detail-${n}`:null,T;t[0]===n?T=t[1]:(T=async()=>ce(n),t[0]=n,t[1]=T);let D;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(D={revalidateOnFocus:!1},t[2]=D):D=t[2];let{data:O,error:A,isLoading:j}=E(b,T,D),M;t[3]!==o||t[4]!==n?(M=fe(o,n),t[3]=o,t[4]=n,t[5]=M):M=t[5];let N=M,F=N===`user`,ee=O?.manifest?.permissions,I,L,R,z,B,V,H,U,W,G,K,q;if(t[6]!==r||t[7]!==i||t[8]!==O||t[9]!==A||t[10]!==o||t[11]!==N||t[12]!==j||t[13]!==s||t[14]!==n||t[15]!==ee||t[16]!==_){V=Symbol.for(`react.early_return_sentinel`);bb0:{let e=ee&&typeof ee==`object`&&!Array.isArray(ee)?Object.entries(ee):[],a;t[29]!==i||t[30]!==O?(a=O?.readme?.trim()||(O?.description?.trim()?`### ${O.name}\n\n${O.description}`:`*${i.marketplaceNoReadme}*`),t[29]=i,t[30]=O,t[31]=a):a=t[31];let c=a;if(O?.format===`agent-plugin`){let e;if(t[32]!==O||t[33]!==o){let n;t[35]===O?n=t[36]:(n=e=>e.pluginId===O.manifest?.name,t[35]=O,t[36]=n),e=o.find(n),t[32]=O,t[33]=o,t[34]=e}else e=t[34];let i=`store:${n}`,a;t[37]!==r||t[38]!==O||t[39]!==s||t[40]!==e||t[41]!==i?(a=(0,$.jsx)(ie,{extension:e,initialSource:i,marketplace:O,autoInstall:r,onClose:s}),t[37]=r,t[38]=O,t[39]=s,t[40]=e,t[41]=i,t[42]=a):a=t[42],V=a;break bb0}R=w,z=!0,t[43]===s?B=t[44]:(B=e=>!e&&s(),t[43]=s,t[44]=B),L=x,t[45]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,$.jsx)(y,{className:`xopc-dialog-overlay fixed inset-0 z-[130] bg-scrim`}),t[45]=q):q=t[45],I=S,W=`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`,G=ye;let u;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(ne,{className:`size-5`}),t[46]=u):u=t[46];let d;t[47]!==i.detailBack||t[48]!==s?(d=(0,$.jsx)(`button`,{type:`button`,onClick:s,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":i.detailBack,children:u}),t[47]=i.detailBack,t[48]=s,t[49]=d):d=t[49];let p;t[50]===i.marketplaceDetailTitle?p=t[51]:(p=(0,$.jsx)(C,{className:`min-w-0 flex-1 truncate text-center text-sm font-semibold text-fg`,children:i.marketplaceDetailTitle}),t[50]=i.marketplaceDetailTitle,t[51]=p);let m;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(f,{className:`size-5`}),t[52]=m):m=t[52];let h;t[53]!==i.detailClose||t[54]!==s?(h=(0,$.jsx)(`button`,{type:`button`,onClick:s,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":i.detailClose,children:m}),t[53]=i.detailClose,t[54]=s,t[55]=h):h=t[55],t[56]!==d||t[57]!==p||t[58]!==h?(K=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 border-b border-edge px-4 py-3`,children:[d,p,h]}),t[56]=d,t[57]=p,t[58]=h,t[59]=K):K=t[59],H=`min-h-0 flex-1 overflow-y-auto p-5`,U=j&&!O?(0,$.jsxs)(`div`,{className:`space-y-4`,"aria-label":i.marketplaceLoading,children:[(0,$.jsx)(k,{className:`h-6 w-48`}),(0,$.jsx)(k,{className:`h-4 w-28`}),(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,$.jsx)(k,{className:`h-12`}),(0,$.jsx)(k,{className:`h-12`})]}),(0,$.jsx)(k,{className:`h-28 w-full`}),(0,$.jsx)(k,{className:`h-36 w-full`})]}):A?(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:i.marketplaceDetailLoadFailed}),(0,$.jsx)(`p`,{className:`mt-1 break-words text-red-600 dark:text-red-400`,children:A instanceof Error?A.message:i.marketplaceLoadFailed})]}):O?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`h3`,{className:`text-lg font-semibold text-fg`,children:O.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:O.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:i.marketplaceAuthor}),(0,$.jsx)(`dd`,{children:O.author.username})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`dt`,{className:`font-medium text-fg`,children:i.marketplaceVersion}),(0,$.jsx)(`dd`,{children:O.latestVersion.version})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`dt`,{className:`font-medium text-fg`,children:i.marketplaceDownloads}),(0,$.jsx)(`dd`,{children:O.downloads})]})]}),N===`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:[O.installability.available?(0,$.jsx)(P,{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:O.installability.available?i.marketplaceRiskTitle:i.marketplaceUnavailableTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-fg-muted`,children:O.installability.available?i.marketplaceCodeRisk:O.installability.reason??i.marketplaceUnavailableBody})]})]}),O.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:i.marketplaceIntegrity}),(0,$.jsx)(`dd`,{children:i.marketplaceIntegrityVerified})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`dt`,{className:`font-medium text-fg`,children:i.marketplaceDependencies}),(0,$.jsx)(`dd`,{children:O.packageSummary?.dependencyCount??0})]})]}),(0,$.jsxs)(`div`,{className:`text-xs text-fg-muted`,children:[(0,$.jsx)(`p`,{className:`font-medium text-fg`,children:i.marketplacePermissions}),e.length>0?(0,$.jsx)(`ul`,{className:`mt-1 space-y-1`,children:e.map(ve)}):(0,$.jsx)(`p`,{className:`mt-1`,children:i.marketplacePermissionsNone})]}),(O.packageSummary?.lifecycleScripts.length??0)>0?(0,$.jsxs)(`p`,{className:`text-xs leading-relaxed text-amber-700 dark:text-amber-300`,children:[i.marketplaceLifecycleScripts,`: `,O.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:_,onChange:e=>v(e.target.checked),className:`mt-0.5 size-4 rounded border-edge accent-[var(--color-accent)]`}),(0,$.jsx)(`span`,{children:i.marketplaceRiskConfirm})]})]}):null]}),O.readme?.trim()?(0,$.jsx)(`h4`,{className:`mb-2 mt-6 text-sm font-semibold text-fg`,children:i.marketplaceDetailReadmeHeading}):null,(0,$.jsx)(`div`,{className:`markdown-content min-w-0 break-words text-sm`,children:(0,$.jsx)(l,{content:c})})]}):null}t[6]=r,t[7]=i,t[8]=O,t[9]=A,t[10]=o,t[11]=N,t[12]=j,t[13]=s,t[14]=n,t[15]=ee,t[16]=_,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,t[28]=q}else 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],q=t[28];if(V!==Symbol.for(`react.early_return_sentinel`))return V;let J;t[60]!==H||t[61]!==U?(J=(0,$.jsx)(`div`,{className:H,children:U}),t[60]=H,t[61]=U,t[62]=J):J=t[62];let Y;t[63]!==p||t[64]!==i.marketplaceBuiltinGoBuiltin||t[65]!==i.marketplaceBuiltinManageHint||t[66]!==i.marketplaceInstall||t[67]!==i.marketplaceReinstall||t[68]!==i.marketplaceReinstallConfirm||t[69]!==i.marketplaceUninstall||t[70]!==i.marketplaceUninstallConfirm||t[71]!==O||t[72]!==N||t[73]!==s||t[74]!==c||t[75]!==d||t[76]!==n||t[77]!==_||t[78]!==F?(Y=O?(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:N===`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:i.marketplaceBuiltinManageHint}),(0,$.jsx)(a,{to:`/capabilities/extensions?tab=builtin`,onClick:s,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:i.marketplaceBuiltinGoBuiltin})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`button`,{type:`button`,disabled:p||!O.installability.available||!_,onClick:()=>{F&&!window.confirm(i.marketplaceReinstallConfirm)||(g(!0),c(n,F).catch(_e).finally(()=>g(!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:[p?(0,$.jsx)(u,{className:`size-4 animate-spin`,"aria-hidden":!0}):null,F?i.marketplaceReinstall:i.marketplaceInstall]}),F?(0,$.jsxs)(`button`,{type:`button`,disabled:p,onClick:()=>{window.confirm(i.marketplaceUninstallConfirm)&&(g(!0),d(n).then(()=>s()).catch(ge).finally(()=>g(!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)(re,{className:`size-4 shrink-0`,"aria-hidden":!0}),i.marketplaceUninstall]}):null]})}):null,t[63]=p,t[64]=i.marketplaceBuiltinGoBuiltin,t[65]=i.marketplaceBuiltinManageHint,t[66]=i.marketplaceInstall,t[67]=i.marketplaceReinstall,t[68]=i.marketplaceReinstallConfirm,t[69]=i.marketplaceUninstall,t[70]=i.marketplaceUninstallConfirm,t[71]=O,t[72]=N,t[73]=s,t[74]=c,t[75]=d,t[76]=n,t[77]=_,t[78]=F,t[79]=Y):Y=t[79];let X;t[80]!==I||t[81]!==J||t[82]!==Y||t[83]!==W||t[84]!==G||t[85]!==K?(X=(0,$.jsxs)(I,{className:W,onOpenAutoFocus:G,children:[K,J,Y]}),t[80]=I,t[81]=J,t[82]=Y,t[83]=W,t[84]=G,t[85]=K,t[86]=X):X=t[86];let Q;t[87]!==L||t[88]!==X||t[89]!==q?(Q=(0,$.jsxs)(L,{children:[q,X]}),t[87]=L,t[88]=X,t[89]=q,t[90]=Q):Q=t[90];let oe;return t[91]!==R||t[92]!==z||t[93]!==B||t[94]!==Q?(oe=(0,$.jsx)(R,{defaultOpen:z,onOpenChange:B,children:Q}),t[91]=R,t[92]=z,t[93]=B,t[94]=Q,t[95]=oe):oe=t[95],oe}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=R(),[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(),k=(0,Z.useRef)(O);if(k.current!==O){k.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 A=(0,Z.useMemo)(()=>l.filter(e=>e.source===`bundled`),[l]),P=(0,Z.useMemo)(()=>l.filter(e=>e.source!==`bundled`),[l]),te=y===`builtin`?A:P,z=(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 V=(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)(I,{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)(ee,{children:(0,$.jsxs)(G,{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)(j,{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`,N.transition),onSelect:()=>E(!0),children:[(0,$.jsx)(d,{className:`size-4 text-fg-muted`,"aria-hidden":!0}),n.startsWith(`zh`)?`安装插件`:`Install plugin`]}),(0,$.jsx)(j,{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`,N.transition),children:[(0,$.jsx)(L,{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?.(V),()=>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:V})}),()=>c()),[c,e,V,r.extensionsPage.title,t,o]),u&&y!==`marketplace`)return(0,$.jsx)(ke,{});let H=[{id:`marketplace`,label:r.extensionsPage.tabMarketplace},{id:`builtin`,label:r.extensionsPage.tabBuiltin,count:A.length},{id:`user`,label:r.extensionsPage.tabUser,count:P.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`,`pb-7 pt-3 lg:pb-9 lg:pt-4`),children:[(0,$.jsx)(`div`,{className:`mb-6 border-b border-edge-subtle pb-3`,children:(0,$.jsx)(Y,{items:H,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`&&A.length===0?(0,$.jsx)(je,{message:r.extensionsPage.emptyBuiltin}):y===`user`&&P.length===0?(0,$.jsx)(je,{message:r.extensionsPage.emptyUser}):z.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:z.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`),O(),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`),O(),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??[],k=e.ui?.contributions?.chatWidgets??[],j=v.find(e=>e.showInNav)??v[0],M=E[0],N=j?V(e.id,j):null,P=M?`/settings/ext/${e.id}/${M.id}`:e.hasConfigSchema||U(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)(re,{className:`size-3.5`,"aria-hidden":!0}),t.marketplaceUninstall]})})]}),e.hasUi&&(v.length>0||E.length>0||k.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:k.length,hidden:k.length===0})]})]}):null,W(e)&&(N||P)?(0,$.jsxs)(`div`,{className:`mt-6 flex flex-wrap gap-2 border-t border-edge-subtle pt-4`,children:[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)(c,{className:`size-4 shrink-0 opacity-80`,"aria-hidden":!0}),t.open]}):null,P?(0,$.jsxs)(a,{to:P,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)(A,{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 pb-8 pt-3 sm:px-5 lg:pt-4 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-BhFHoVtG.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-vL3EpIrL.js";import{t as m}from"./cn-JdwAhgNB.js";import{c as h,i as g,n as _,r as v}from"./locale-store-qcYD05PF.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{o as O}from"./gateway-realtime-HO9tL9xo.js";import{t as k}from"./skeleton-BwbyijEw.js";import{Bc as A,Bn as j,Hn as M,Ns as N,Rc as P,So as F,Vn as ee,Wn as I,Yu as L,_c as te,_o as R,dl as z,go as B,ho as V,ka as H,od as ne,vc as re,vo as U,yo as W,zn as G,zu as K}from"./index-S4z-eKe-.js";import{n as q,t as J}from"./capability-header-actions-B_60-buR.js";import{t as Y}from"./page-tabs-Dnzie6QW.js";import{t as ie}from"./agent-plugin-dialog-CDhtsMpV.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||e.pluginId===t);return n?n.source===`bundled`?`bundled`:`user`:`absent`}var pe={debounced:``,detailPkg:null,quickInstallPkg:null,rowBusy:null,actionError:null,restartHint:null};function me({className:e,query:t}){let n=_(e=>e.language),r=p(n).extensionsPage,i=h(e=>!!e.conversationId),a=B(),{mutate:o}=T(),[s,c]=(0,Z.useReducer)(H,pe),{debounced:l,detailPkg:d,quickInstallPkg:f,rowBusy:g,actionError:v,restartHint:y}=s,b=i?`marketplace-${l}`:null;(0,Z.useEffect)(()=>{let e=window.setTimeout(()=>c({type:`patch`,patch:{debounced:t.trim()}}),300);return()=>window.clearTimeout(e)},[t]);let{data:x,isLoading:S,error:C}=E(b,()=>oe(l),{revalidateOnFocus:!1}),w=(0,Z.useCallback)(()=>{o(`gateway-extensions-list`),O()},[o]),D=(0,Z.useCallback)(async(e,t)=>{c({type:`patch`,patch:{actionError:null,restartHint:null,rowBusy:e}});try{let n=await le({name:e,overwrite:t});w(),n.requiresGatewayRestart&&c({type:`patch`,patch:{restartHint:r.marketplaceRestartHint}})}catch(e){throw c({type:`patch`,patch:{actionError:e instanceof Error?e.message:r.marketplaceInstallFailed}}),e}finally{c({type:`patch`,patch:{rowBusy:null}})}},[r.marketplaceInstallFailed,r.marketplaceRestartHint,w]),A=(0,Z.useCallback)(async e=>{c({type:`patch`,patch:{actionError:null,restartHint:null,rowBusy:e}});try{let t=await de(e);w(),t.requiresGatewayRestart&&c({type:`patch`,patch:{restartHint:r.marketplaceRestartHint}})}catch(e){throw c({type:`patch`,patch:{actionError:e instanceof Error?e.message:r.marketplaceUninstallFailed}}),e}finally{c({type:`patch`,patch:{rowBusy:null}})}},[r.marketplaceRestartHint,r.marketplaceUninstallFailed,w]),j=x??[];return(0,$.jsxs)(`div`,{className:m(`flex flex-col gap-4`,e),children:[C?(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:C instanceof Error?C.message:r.marketplaceLoadFailed}):null,v?(0,$.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:v}):null,y?(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:y}):null,S&&!x?(0,$.jsx)(`ul`,{className:`flex flex-col gap-3`,"aria-label":r.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)(k,{className:`h-5 w-40`}),(0,$.jsx)(k,{className:`h-4 w-full max-w-xl`}),(0,$.jsx)(k,{className:`h-4 w-2/3 max-w-md`})]}),(0,$.jsx)(k,{className:`h-8 w-20`})]})},e))}):(0,$.jsx)(`ul`,{className:`flex flex-col gap-3`,children:j.length===0?(0,$.jsx)(`li`,{className:`text-sm text-fg-muted`,children:r.marketplaceEmpty}):j.map(e=>{let t=fe(a,e.id),i=g===e.id,o=e.localizations?.[n.startsWith(`zh`)?`zh-CN`:`en`],s=o?.displayName??e.name,l=o?.description??e.description;return(0,$.jsx)(`li`,{className:`list-none`,children:(0,$.jsxs)(`div`,{role:`button`,tabIndex:0,"aria-label":`${s}, ${r.marketplaceDetailTitle}`,onClick:()=>c({type:`patch`,patch:{detailPkg:e.id}}),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),c({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:z}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`h3`,{className:`truncate font-semibold text-fg`,children:s}),s===e.id?null:(0,$.jsx)(`p`,{className:`truncate font-mono text-[10px] text-fg-subtle`,children:e.id})]}),e.verified?(0,$.jsx)(K,{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]}),l?(0,$.jsx)(`p`,{className:`mt-1 line-clamp-2 text-sm text-fg-muted`,children:l}):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)(z,{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:r.marketplaceBuiltin}):t===`user`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{className:`text-[11px] font-medium text-fg-muted`,children:r.marketplaceInstalled}),e.packageType===`plugin`?(0,$.jsx)(`button`,{type:`button`,onClick:()=>c({type:`patch`,patch:{detailPkg:e.id,quickInstallPkg:null}}),className:m(`inline-flex items-center justify-center 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`),children:n.startsWith(`zh`)?`管理`:`Manage`}):(0,$.jsxs)(`button`,{type:`button`,disabled:i,onClick:()=>{window.confirm(r.marketplaceUninstallConfirm)&&A(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:[i?(0,$.jsx)(u,{className:`size-3.5 animate-spin`,"aria-hidden":!0}):(0,$.jsx)(re,{className:`size-3.5`,strokeWidth:2,"aria-hidden":!0}),r.marketplaceUninstall]})]}):(0,$.jsx)(`button`,{type:`button`,onClick:()=>c({type:`patch`,patch:e.packageType===`plugin`?{detailPkg:e.id,quickInstallPkg:e.id}:{detailPkg:e.id,quickInstallPkg:null}}),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:e.packageType===`plugin`?n.startsWith(`zh`)?`安装`:`Install`:r.marketplaceReview})})]})},e.id)})}),d?(0,$.jsx)(he,{packageName:d,autoInstall:f===d,copy:r,extensions:a,onClose:()=>c({type:`patch`,patch:{detailPkg:null,quickInstallPkg:null}}),onInstall:D,onUninstall:A}):null]})}function he(e){let t=(0,ae.c)(96),{packageName:n,autoInstall:r,copy:i,extensions:o,onClose:s,onInstall:c,onUninstall:d}=e,[p,g]=(0,Z.useState)(!1),[_,v]=(0,Z.useState)(!1),b=h(be)?`ext-mp-detail-${n}`:null,T;t[0]===n?T=t[1]:(T=async()=>ce(n),t[0]=n,t[1]=T);let D;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(D={revalidateOnFocus:!1},t[2]=D):D=t[2];let{data:O,error:A,isLoading:j}=E(b,T,D),M;t[3]!==o||t[4]!==n?(M=fe(o,n),t[3]=o,t[4]=n,t[5]=M):M=t[5];let N=M,F=N===`user`,ee=O?.manifest?.permissions,I,L,R,z,B,V,H,U,W,G,K,q;if(t[6]!==r||t[7]!==i||t[8]!==O||t[9]!==A||t[10]!==o||t[11]!==N||t[12]!==j||t[13]!==s||t[14]!==n||t[15]!==ee||t[16]!==_){V=Symbol.for(`react.early_return_sentinel`);bb0:{let e=ee&&typeof ee==`object`&&!Array.isArray(ee)?Object.entries(ee):[],a;t[29]!==i||t[30]!==O?(a=O?.readme?.trim()||(O?.description?.trim()?`### ${O.name}\n\n${O.description}`:`*${i.marketplaceNoReadme}*`),t[29]=i,t[30]=O,t[31]=a):a=t[31];let c=a;if(O?.format===`agent-plugin`){let e;if(t[32]!==O||t[33]!==o){let n;t[35]===O?n=t[36]:(n=e=>e.pluginId===O.manifest?.name,t[35]=O,t[36]=n),e=o.find(n),t[32]=O,t[33]=o,t[34]=e}else e=t[34];let i=`store:${n}`,a;t[37]!==r||t[38]!==O||t[39]!==s||t[40]!==e||t[41]!==i?(a=(0,$.jsx)(ie,{extension:e,initialSource:i,marketplace:O,autoInstall:r,onClose:s}),t[37]=r,t[38]=O,t[39]=s,t[40]=e,t[41]=i,t[42]=a):a=t[42],V=a;break bb0}R=w,z=!0,t[43]===s?B=t[44]:(B=e=>!e&&s(),t[43]=s,t[44]=B),L=x,t[45]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,$.jsx)(y,{className:`xopc-dialog-overlay fixed inset-0 z-[130] bg-scrim`}),t[45]=q):q=t[45],I=S,W=`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`,G=ye;let u;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(ne,{className:`size-5`}),t[46]=u):u=t[46];let d;t[47]!==i.detailBack||t[48]!==s?(d=(0,$.jsx)(`button`,{type:`button`,onClick:s,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":i.detailBack,children:u}),t[47]=i.detailBack,t[48]=s,t[49]=d):d=t[49];let p;t[50]===i.marketplaceDetailTitle?p=t[51]:(p=(0,$.jsx)(C,{className:`min-w-0 flex-1 truncate text-center text-sm font-semibold text-fg`,children:i.marketplaceDetailTitle}),t[50]=i.marketplaceDetailTitle,t[51]=p);let m;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(f,{className:`size-5`}),t[52]=m):m=t[52];let h;t[53]!==i.detailClose||t[54]!==s?(h=(0,$.jsx)(`button`,{type:`button`,onClick:s,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":i.detailClose,children:m}),t[53]=i.detailClose,t[54]=s,t[55]=h):h=t[55],t[56]!==d||t[57]!==p||t[58]!==h?(K=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 border-b border-edge px-4 py-3`,children:[d,p,h]}),t[56]=d,t[57]=p,t[58]=h,t[59]=K):K=t[59],H=`min-h-0 flex-1 overflow-y-auto p-5`,U=j&&!O?(0,$.jsxs)(`div`,{className:`space-y-4`,"aria-label":i.marketplaceLoading,children:[(0,$.jsx)(k,{className:`h-6 w-48`}),(0,$.jsx)(k,{className:`h-4 w-28`}),(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,$.jsx)(k,{className:`h-12`}),(0,$.jsx)(k,{className:`h-12`})]}),(0,$.jsx)(k,{className:`h-28 w-full`}),(0,$.jsx)(k,{className:`h-36 w-full`})]}):A?(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:i.marketplaceDetailLoadFailed}),(0,$.jsx)(`p`,{className:`mt-1 break-words text-red-600 dark:text-red-400`,children:A instanceof Error?A.message:i.marketplaceLoadFailed})]}):O?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`h3`,{className:`text-lg font-semibold text-fg`,children:O.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:O.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:i.marketplaceAuthor}),(0,$.jsx)(`dd`,{children:O.author.username})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`dt`,{className:`font-medium text-fg`,children:i.marketplaceVersion}),(0,$.jsx)(`dd`,{children:O.latestVersion.version})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`dt`,{className:`font-medium text-fg`,children:i.marketplaceDownloads}),(0,$.jsx)(`dd`,{children:O.downloads})]})]}),N===`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:[O.installability.available?(0,$.jsx)(P,{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:O.installability.available?i.marketplaceRiskTitle:i.marketplaceUnavailableTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-fg-muted`,children:O.installability.available?i.marketplaceCodeRisk:O.installability.reason??i.marketplaceUnavailableBody})]})]}),O.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:i.marketplaceIntegrity}),(0,$.jsx)(`dd`,{children:i.marketplaceIntegrityVerified})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`dt`,{className:`font-medium text-fg`,children:i.marketplaceDependencies}),(0,$.jsx)(`dd`,{children:O.packageSummary?.dependencyCount??0})]})]}),(0,$.jsxs)(`div`,{className:`text-xs text-fg-muted`,children:[(0,$.jsx)(`p`,{className:`font-medium text-fg`,children:i.marketplacePermissions}),e.length>0?(0,$.jsx)(`ul`,{className:`mt-1 space-y-1`,children:e.map(ve)}):(0,$.jsx)(`p`,{className:`mt-1`,children:i.marketplacePermissionsNone})]}),(O.packageSummary?.lifecycleScripts.length??0)>0?(0,$.jsxs)(`p`,{className:`text-xs leading-relaxed text-amber-700 dark:text-amber-300`,children:[i.marketplaceLifecycleScripts,`: `,O.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:_,onChange:e=>v(e.target.checked),className:`mt-0.5 size-4 rounded border-edge accent-[var(--color-accent)]`}),(0,$.jsx)(`span`,{children:i.marketplaceRiskConfirm})]})]}):null]}),O.readme?.trim()?(0,$.jsx)(`h4`,{className:`mb-2 mt-6 text-sm font-semibold text-fg`,children:i.marketplaceDetailReadmeHeading}):null,(0,$.jsx)(`div`,{className:`markdown-content min-w-0 break-words text-sm`,children:(0,$.jsx)(l,{content:c})})]}):null}t[6]=r,t[7]=i,t[8]=O,t[9]=A,t[10]=o,t[11]=N,t[12]=j,t[13]=s,t[14]=n,t[15]=ee,t[16]=_,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,t[28]=q}else 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],q=t[28];if(V!==Symbol.for(`react.early_return_sentinel`))return V;let J;t[60]!==H||t[61]!==U?(J=(0,$.jsx)(`div`,{className:H,children:U}),t[60]=H,t[61]=U,t[62]=J):J=t[62];let Y;t[63]!==p||t[64]!==i.marketplaceBuiltinGoBuiltin||t[65]!==i.marketplaceBuiltinManageHint||t[66]!==i.marketplaceInstall||t[67]!==i.marketplaceReinstall||t[68]!==i.marketplaceReinstallConfirm||t[69]!==i.marketplaceUninstall||t[70]!==i.marketplaceUninstallConfirm||t[71]!==O||t[72]!==N||t[73]!==s||t[74]!==c||t[75]!==d||t[76]!==n||t[77]!==_||t[78]!==F?(Y=O?(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:N===`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:i.marketplaceBuiltinManageHint}),(0,$.jsx)(a,{to:`/capabilities/extensions?tab=builtin`,onClick:s,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:i.marketplaceBuiltinGoBuiltin})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`button`,{type:`button`,disabled:p||!O.installability.available||!_,onClick:()=>{F&&!window.confirm(i.marketplaceReinstallConfirm)||(g(!0),c(n,F).catch(_e).finally(()=>g(!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:[p?(0,$.jsx)(u,{className:`size-4 animate-spin`,"aria-hidden":!0}):null,F?i.marketplaceReinstall:i.marketplaceInstall]}),F?(0,$.jsxs)(`button`,{type:`button`,disabled:p,onClick:()=>{window.confirm(i.marketplaceUninstallConfirm)&&(g(!0),d(n).then(()=>s()).catch(ge).finally(()=>g(!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)(re,{className:`size-4 shrink-0`,"aria-hidden":!0}),i.marketplaceUninstall]}):null]})}):null,t[63]=p,t[64]=i.marketplaceBuiltinGoBuiltin,t[65]=i.marketplaceBuiltinManageHint,t[66]=i.marketplaceInstall,t[67]=i.marketplaceReinstall,t[68]=i.marketplaceReinstallConfirm,t[69]=i.marketplaceUninstall,t[70]=i.marketplaceUninstallConfirm,t[71]=O,t[72]=N,t[73]=s,t[74]=c,t[75]=d,t[76]=n,t[77]=_,t[78]=F,t[79]=Y):Y=t[79];let X;t[80]!==I||t[81]!==J||t[82]!==Y||t[83]!==W||t[84]!==G||t[85]!==K?(X=(0,$.jsxs)(I,{className:W,onOpenAutoFocus:G,children:[K,J,Y]}),t[80]=I,t[81]=J,t[82]=Y,t[83]=W,t[84]=G,t[85]=K,t[86]=X):X=t[86];let Q;t[87]!==L||t[88]!==X||t[89]!==q?(Q=(0,$.jsxs)(L,{children:[q,X]}),t[87]=L,t[88]=X,t[89]=q,t[90]=Q):Q=t[90];let oe;return t[91]!==R||t[92]!==z||t[93]!==B||t[94]!==Q?(oe=(0,$.jsx)(R,{defaultOpen:z,onOpenChange:B,children:Q}),t[91]=R,t[92]=z,t[93]=B,t[94]=Q,t[95]=oe):oe=t[95],oe}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=R(),[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(),k=(0,Z.useRef)(O);if(k.current!==O){k.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 A=(0,Z.useMemo)(()=>l.filter(e=>e.source===`bundled`),[l]),P=(0,Z.useMemo)(()=>l.filter(e=>e.source!==`bundled`),[l]),te=y===`builtin`?A:P,z=(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 V=(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)(I,{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)(ee,{children:(0,$.jsxs)(G,{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)(j,{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`,N.transition),onSelect:()=>E(!0),children:[(0,$.jsx)(d,{className:`size-4 text-fg-muted`,"aria-hidden":!0}),n.startsWith(`zh`)?`安装插件`:`Install plugin`]}),(0,$.jsx)(j,{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`,N.transition),children:[(0,$.jsx)(L,{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?.(V),()=>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:V})}),()=>c()),[c,e,V,r.extensionsPage.title,t,o]),u&&y!==`marketplace`)return(0,$.jsx)(ke,{});let H=[{id:`marketplace`,label:r.extensionsPage.tabMarketplace},{id:`builtin`,label:r.extensionsPage.tabBuiltin,count:A.length},{id:`user`,label:r.extensionsPage.tabUser,count:P.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`,`pb-7 pt-3 lg:pb-9 lg:pt-4`),children:[(0,$.jsx)(`div`,{className:`mb-6 border-b border-edge-subtle pb-3`,children:(0,$.jsx)(Y,{items:H,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`&&A.length===0?(0,$.jsx)(je,{message:r.extensionsPage.emptyBuiltin}):y===`user`&&P.length===0?(0,$.jsx)(je,{message:r.extensionsPage.emptyUser}):z.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:z.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`),O(),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`),O(),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??[],k=e.ui?.contributions?.chatWidgets??[],j=v.find(e=>e.showInNav)??v[0],M=E[0],N=j?V(e.id,j):null,P=M?`/settings/ext/${e.id}/${M.id}`:e.hasConfigSchema||U(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)(re,{className:`size-3.5`,"aria-hidden":!0}),t.marketplaceUninstall]})})]}),e.hasUi&&(v.length>0||E.length>0||k.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:k.length,hidden:k.length===0})]})]}):null,W(e)&&(N||P)?(0,$.jsxs)(`div`,{className:`mt-6 flex flex-wrap gap-2 border-t border-edge-subtle pt-4`,children:[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)(c,{className:`size-4 shrink-0 opacity-80`,"aria-hidden":!0}),t.open]}):null,P?(0,$.jsxs)(a,{to:P,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)(A,{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 pb-8 pt-3 sm:px-5 lg:pt-4 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-sXePe3LQ.js";import{t as a}from"./jszip.min-DT31yWkU.js";import{t as o}from"./preview-open-alternatives-ByuWaDEv.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-vL3EpIrL.js";import{t as a}from"./jszip.min-DT31yWkU.js";import{t as o}from"./preview-open-alternatives-D1H4_Nfl.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{n as e,t}from"./vendor-react-BOUWij0V.js";import{t as n}from"./automations-workspace-DEsdkcup.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-DJ_-_kGh.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};