@xopcai/xopc 0.0.149 → 0.0.151

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 (2914) hide show
  1. package/README.md +10 -0
  2. package/README.zh-CN.md +10 -0
  3. package/dist/browser-ext/manifest.json +1 -1
  4. package/dist/extensions/dashscope/src/image-generation-provider.js +0 -2
  5. package/dist/extensions/demo-memory/src/index.js +0 -2
  6. package/dist/extensions/fal/src/image-generation-provider.js +0 -2
  7. package/dist/extensions/feishu/src/actions/message-action-handler.js +0 -2
  8. package/dist/extensions/feishu/src/adapters/cli-login.js +0 -2
  9. package/dist/extensions/feishu/src/adapters/gateway-setup.js +0 -2
  10. package/dist/extensions/feishu/src/adapters/onboard-cli.js +0 -2
  11. package/dist/extensions/feishu/src/auth/app-registration.js +0 -2
  12. package/dist/extensions/feishu/src/auth/pairing.js +0 -2
  13. package/dist/extensions/feishu/src/auth/paths.js +0 -2
  14. package/dist/extensions/feishu/src/directory/directory-adapter.js +0 -2
  15. package/dist/extensions/feishu/src/format.js +0 -2
  16. package/dist/extensions/feishu/src/index.js +0 -2
  17. package/dist/extensions/feishu/src/outbound/actions.js +0 -2
  18. package/dist/extensions/feishu/src/outbound/media-load.js +0 -2
  19. package/dist/extensions/feishu/src/outbound/outbound-adapter.js +0 -2
  20. package/dist/extensions/feishu/src/pairing/feishu-pairing-prompt.js +0 -2
  21. package/dist/extensions/feishu/src/pairing-config-resolver.js +0 -2
  22. package/dist/extensions/feishu/src/plugin.js +0 -2
  23. package/dist/extensions/feishu/src/schema/config-schema.js +0 -2
  24. package/dist/extensions/feishu/src/state/accounts.js +0 -2
  25. package/dist/extensions/feishu/src/state/message-bindings.js +0 -2
  26. package/dist/extensions/feishu/src/state/thread-bindings.js +0 -2
  27. package/dist/extensions/feishu/src/status/doctor.js +0 -2
  28. package/dist/extensions/feishu/src/status/status-adapter.js +0 -2
  29. package/dist/extensions/feishu/src/streaming/streaming-adapter.js +0 -2
  30. package/dist/extensions/feishu/src/subagent-hooks.js +0 -2
  31. package/dist/extensions/feishu/src/tools/docx/docx-batch-insert.js +0 -2
  32. package/dist/extensions/feishu/src/tools/docx/docx-color-text.d.ts +6 -3386
  33. package/dist/extensions/feishu/src/tools/docx/docx-color-text.js +0 -2
  34. package/dist/extensions/feishu/src/tools/docx/docx-table-ops.d.ts +16 -16927
  35. package/dist/extensions/feishu/src/tools/docx/docx-table-ops.js +0 -2
  36. package/dist/extensions/feishu/src/tools/tools.js +0 -2
  37. package/dist/extensions/feishu/src/transport/client/client.js +2 -4
  38. package/dist/extensions/feishu/src/transport/client/lark-sdk-logger.js +0 -2
  39. package/dist/extensions/feishu/src/transport/client/lark-sdk.d.ts +3 -0
  40. package/dist/extensions/feishu/src/transport/client/lark-sdk.js +14 -0
  41. package/dist/extensions/feishu/src/transport/reliability/dedupe.js +0 -2
  42. package/dist/extensions/feishu/src/transport/reliability/inbound-pipeline.js +0 -2
  43. package/dist/extensions/feishu/src/transport/socket-mode/monitor.js +0 -2
  44. package/dist/extensions/feishu/src/transport/socket-mode/retry.js +0 -2
  45. package/dist/extensions/feishu/src/transport/text/mentions.js +0 -2
  46. package/dist/extensions/feishu/src/transport/webhook/monitor.js +3 -5
  47. package/dist/extensions/feishu/src/ui/config-surface.js +0 -2
  48. package/dist/extensions/feishu/src/workflow-progress.js +0 -2
  49. package/dist/extensions/google/src/image-generation-provider.js +0 -2
  50. package/dist/extensions/minimax/src/image-generation-provider.js +0 -2
  51. package/dist/extensions/openai/src/image-generation-provider.js +0 -2
  52. package/dist/extensions/telegram/src/access-control.js +0 -2
  53. package/dist/extensions/telegram/src/account-manager.js +0 -2
  54. package/dist/extensions/telegram/src/actions/message-actions.js +0 -2
  55. package/dist/extensions/telegram/src/adapters/command-adapter.js +0 -2
  56. package/dist/extensions/telegram/src/adapters/config-adapter.js +0 -2
  57. package/dist/extensions/telegram/src/adapters/debounce-keys.js +0 -2
  58. package/dist/extensions/telegram/src/adapters/gateway-adapter.js +0 -2
  59. package/dist/extensions/telegram/src/adapters/gateway-setup.js +0 -2
  60. package/dist/extensions/telegram/src/adapters/inbound-access.js +0 -2
  61. package/dist/extensions/telegram/src/adapters/index.js +0 -2
  62. package/dist/extensions/telegram/src/adapters/onboard-cli.js +0 -2
  63. package/dist/extensions/telegram/src/adapters/outbound-adapter.js +0 -2
  64. package/dist/extensions/telegram/src/adapters/security-adapter.js +0 -2
  65. package/dist/extensions/telegram/src/adapters/setup-wizard.js +0 -2
  66. package/dist/extensions/telegram/src/adapters/status-adapter.js +0 -2
  67. package/dist/extensions/telegram/src/adapters/streaming-adapter.js +0 -2
  68. package/dist/extensions/telegram/src/api-root.js +0 -2
  69. package/dist/extensions/telegram/src/approval-delivery.js +0 -2
  70. package/dist/extensions/telegram/src/approval-store.js +0 -2
  71. package/dist/extensions/telegram/src/caption.js +0 -2
  72. package/dist/extensions/telegram/src/command-handler.js +0 -2
  73. package/dist/extensions/telegram/src/config-schema.js +0 -2
  74. package/dist/extensions/telegram/src/conversation-id.js +0 -2
  75. package/dist/extensions/telegram/src/dedupe.js +0 -2
  76. package/dist/extensions/telegram/src/delivery-chat-id.js +0 -2
  77. package/dist/extensions/telegram/src/doctor.js +0 -2
  78. package/dist/extensions/telegram/src/draft-stream-lifecycle.js +0 -2
  79. package/dist/extensions/telegram/src/draft-stream-loop.js +0 -2
  80. package/dist/extensions/telegram/src/draft-stream.js +0 -2
  81. package/dist/extensions/telegram/src/errors.js +0 -2
  82. package/dist/extensions/telegram/src/exec-approval-handler.js +0 -2
  83. package/dist/extensions/telegram/src/exec-approvals.js +0 -2
  84. package/dist/extensions/telegram/src/focus-handler.js +0 -2
  85. package/dist/extensions/telegram/src/format.js +0 -2
  86. package/dist/extensions/telegram/src/group-config-resolver.js +0 -2
  87. package/dist/extensions/telegram/src/inbound-coalescer.js +0 -2
  88. package/dist/extensions/telegram/src/inbound-processor.js +0 -2
  89. package/dist/extensions/telegram/src/index.js +0 -2
  90. package/dist/extensions/telegram/src/inline-keyboards.js +0 -2
  91. package/dist/extensions/telegram/src/network-errors.js +0 -2
  92. package/dist/extensions/telegram/src/outbound-sender.js +0 -2
  93. package/dist/extensions/telegram/src/pairing-config-resolver.js +0 -2
  94. package/dist/extensions/telegram/src/plugin-defaults.js +0 -2
  95. package/dist/extensions/telegram/src/plugin.js +0 -2
  96. package/dist/extensions/telegram/src/polling-session.js +0 -2
  97. package/dist/extensions/telegram/src/proxy-fetch.js +0 -2
  98. package/dist/extensions/telegram/src/reactions.js +0 -2
  99. package/dist/extensions/telegram/src/reply-params.js +0 -2
  100. package/dist/extensions/telegram/src/routing-integration.js +0 -2
  101. package/dist/extensions/telegram/src/send-options.js +0 -2
  102. package/dist/extensions/telegram/src/sent-cache.js +0 -2
  103. package/dist/extensions/telegram/src/startup-errors.js +0 -2
  104. package/dist/extensions/telegram/src/telegram-actions.js +0 -2
  105. package/dist/extensions/telegram/src/telegram-draft-errors.js +0 -2
  106. package/dist/extensions/telegram/src/thread-bindings.js +0 -2
  107. package/dist/extensions/telegram/src/timeout-abort.js +0 -2
  108. package/dist/extensions/telegram/src/token-resolver.js +0 -2
  109. package/dist/extensions/telegram/src/update-offset-store.js +0 -2
  110. package/dist/extensions/telegram/src/workflow-progress.js +0 -2
  111. package/dist/extensions/telegram/xopc.extension.json +1 -1
  112. package/dist/extensions/weixin/src/adapters/onboard-cli.js +0 -2
  113. package/dist/extensions/weixin/src/api/api.js +0 -2
  114. package/dist/extensions/weixin/src/api/config-cache.js +0 -2
  115. package/dist/extensions/weixin/src/api/session-guard.js +0 -2
  116. package/dist/extensions/weixin/src/api/types.js +0 -2
  117. package/dist/extensions/weixin/src/auth/accounts.js +0 -2
  118. package/dist/extensions/weixin/src/auth/login-qr.js +0 -2
  119. package/dist/extensions/weixin/src/auth/pairing.js +0 -2
  120. package/dist/extensions/weixin/src/auth/weixin-account-id.js +0 -2
  121. package/dist/extensions/weixin/src/cdn/aes-ecb.js +0 -2
  122. package/dist/extensions/weixin/src/cdn/cdn-upload.js +0 -2
  123. package/dist/extensions/weixin/src/cdn/cdn-url.js +0 -2
  124. package/dist/extensions/weixin/src/cdn/pic-decrypt.js +0 -2
  125. package/dist/extensions/weixin/src/cdn/upload.js +0 -2
  126. package/dist/extensions/weixin/src/cli/gateway-qr-login.js +0 -2
  127. package/dist/extensions/weixin/src/cli/qr-login.js +0 -2
  128. package/dist/extensions/weixin/src/config-schema.js +0 -2
  129. package/dist/extensions/weixin/src/config-surface.js +0 -2
  130. package/dist/extensions/weixin/src/delivery-to.js +0 -2
  131. package/dist/extensions/weixin/src/index.js +0 -2
  132. package/dist/extensions/weixin/src/media/data-url.js +0 -2
  133. package/dist/extensions/weixin/src/media/media-download.js +0 -2
  134. package/dist/extensions/weixin/src/media/mime.js +0 -2
  135. package/dist/extensions/weixin/src/media/silk-transcode.js +0 -2
  136. package/dist/extensions/weixin/src/messaging/context-token-init.js +0 -2
  137. package/dist/extensions/weixin/src/messaging/debug-mode.js +0 -2
  138. package/dist/extensions/weixin/src/messaging/error-notice.js +0 -2
  139. package/dist/extensions/weixin/src/messaging/inbound.js +0 -2
  140. package/dist/extensions/weixin/src/messaging/markdown-filter.js +0 -2
  141. package/dist/extensions/weixin/src/messaging/process-message.js +0 -2
  142. package/dist/extensions/weixin/src/messaging/send-media.js +0 -2
  143. package/dist/extensions/weixin/src/messaging/send.js +0 -2
  144. package/dist/extensions/weixin/src/messaging/slash-commands.js +0 -2
  145. package/dist/extensions/weixin/src/messaging/typing-ticket-store.js +0 -2
  146. package/dist/extensions/weixin/src/monitor/monitor.js +0 -2
  147. package/dist/extensions/weixin/src/outbound-send.js +0 -2
  148. package/dist/extensions/weixin/src/pairing-config-resolver.js +0 -2
  149. package/dist/extensions/weixin/src/plugin.js +0 -2
  150. package/dist/extensions/weixin/src/routing-integration.js +0 -2
  151. package/dist/extensions/weixin/src/storage/state-dir.js +0 -2
  152. package/dist/extensions/weixin/src/storage/sync-buf.js +0 -2
  153. package/dist/extensions/weixin/src/util/logger.js +0 -2
  154. package/dist/extensions/weixin/src/util/random.js +0 -2
  155. package/dist/extensions/weixin/src/util/redact.js +0 -2
  156. package/dist/extensions/weixin/src/workflow-progress.js +0 -2
  157. package/dist/gateway/static/root/assets/{activity-store-B4s0ipx2.js → activity-store-uu1xu9Pl.js} +1 -1
  158. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BSccACje.js → agent-avatar-dicebear-BuO-OVfD.js} +1 -1
  159. package/dist/gateway/static/root/assets/agents-Bpv3h31T.js +2 -0
  160. package/dist/gateway/static/root/assets/{api-BMdUsNCV.js → api-CwL38LEV.js} +1 -1
  161. package/dist/gateway/static/root/assets/{app-management-settings-panel-DrLGhYkI.js → app-management-settings-panel-B6OU3Eol.js} +1 -1
  162. package/dist/gateway/static/root/assets/appearance-settings-BaP4GFvN.js +1 -0
  163. package/dist/gateway/static/root/assets/apps-page-DZKNIMRg.js +1 -0
  164. package/dist/gateway/static/root/assets/{archive-plugin-BQ17IK9x.js → archive-plugin-CJX3zIh_.js} +1 -1
  165. package/dist/gateway/static/root/assets/{attachment-load-HXvgWHXu.js → attachment-load-CI1ejk_l.js} +1 -1
  166. package/dist/gateway/static/root/assets/{automation-suggestion-card-CjIWpsch.js → automation-suggestion-card-CjmhICbv.js} +1 -1
  167. package/dist/gateway/static/root/assets/automations-page-BtZl3B8m.js +6 -0
  168. package/dist/gateway/static/root/assets/{binary-plugins-DifWJzNZ.js → binary-plugins-CZ8nOXqK.js} +1 -1
  169. package/dist/gateway/static/root/assets/{block-editor-DtRzIkPU.js → block-editor-BoSfyS_j.js} +46 -46
  170. package/dist/gateway/static/root/assets/browser-settings-page-CL1UiPcb.js +8 -0
  171. package/dist/gateway/static/root/assets/{capability-presets-api-DazKjWW1.js → capability-presets-api-XzDKxPZ8.js} +1 -1
  172. package/dist/gateway/static/root/assets/{capability-presets-settings-panel-Cvrw4fD1.js → capability-presets-settings-panel-Dc_uHYgl.js} +2 -2
  173. package/dist/gateway/static/root/assets/{channel-recipient-api-Bea6if_6.js → channel-recipient-api-DYLBAhFF.js} +1 -1
  174. package/dist/gateway/static/root/assets/channels-settings-mALvXpJj.js +1 -0
  175. package/dist/gateway/static/root/assets/channels-status-swr-CZuEsO5b.js +1 -0
  176. package/dist/gateway/static/root/assets/{connector-logo-BjbYbJjQ.js → connector-logo-BSjlInHT.js} +1 -1
  177. package/dist/gateway/static/root/assets/connectors-page-Cm_E3mmI.js +2 -0
  178. package/dist/gateway/static/root/assets/desktop-pet-DcJc91-C.js +1 -0
  179. package/dist/gateway/static/root/assets/desktop-pet-settings-CdeqTa3Q.js +1 -0
  180. package/dist/gateway/static/root/assets/{directory-picker-path-field-C8zZNUzC.js → directory-picker-path-field-Cp3fpm0k.js} +1 -1
  181. package/dist/gateway/static/root/assets/{dreaming-settings-gJSw7Adk.js → dreaming-settings-Bwj1O3zr.js} +3 -3
  182. package/dist/gateway/static/root/assets/{extension-debug-page-DFE5ADJ0.js → extension-debug-page-D_1xpKbZ.js} +1 -1
  183. package/dist/gateway/static/root/assets/{extension-page-CfR-aW8G.js → extension-page-CqZNCj96.js} +1 -1
  184. package/dist/gateway/static/root/assets/{extension-settings-page-CFIEbs2L.js → extension-settings-page-5MWbtQaQ.js} +1 -1
  185. package/dist/gateway/static/root/assets/{gateway-config-api-B6M_ra8U.js → gateway-config-api-Co_IaS34.js} +1 -1
  186. package/dist/gateway/static/root/assets/gateway-settings-kmeWm2Pt.js +1 -0
  187. package/dist/gateway/static/root/assets/{gateway-startup-retry-DNA3OOzV.js → gateway-startup-retry-BM_xvzl0.js} +1 -1
  188. package/dist/gateway/static/root/assets/goal-create-dialog-FoO-R4_U.js +1 -0
  189. package/dist/gateway/static/root/assets/goal-detail-page-CkJq7N5g.js +4 -0
  190. package/dist/gateway/static/root/assets/{goals-config-api-D88opgcs.js → goals-config-api-DrtsYjXz.js} +1 -1
  191. package/dist/gateway/static/root/assets/goals-page-DRAN-R64.js +2 -0
  192. package/dist/gateway/static/root/assets/{goals-settings-D07UL8Jo.js → goals-settings-wq9TKhIZ.js} +1 -1
  193. package/dist/gateway/static/root/assets/{heartbeat-settings-YCSNOcXC.js → heartbeat-settings-B5zDoHbo.js} +1 -1
  194. package/dist/gateway/static/root/assets/index-DIlxvrlG.css +1 -0
  195. package/dist/gateway/static/root/assets/index-apLU0Hun.js +196 -0
  196. package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-3tC9iD21.js +1 -0
  197. package/dist/gateway/static/root/assets/local-app-workbench-page-CT-vDTLK.js +2 -0
  198. package/dist/gateway/static/root/assets/{local-apps-page-CKvtLzsF.js → local-apps-page-B9ruF9GV.js} +1 -1
  199. package/dist/gateway/static/root/assets/locale-store-GfSwnwIZ.js +1 -0
  200. package/dist/gateway/static/root/assets/logs-page-Ca1X8X2P.js +7 -0
  201. package/dist/gateway/static/root/assets/{markdown-split-BVSFG99p.js → markdown-split-CzuhSQAB.js} +1 -1
  202. package/dist/gateway/static/root/assets/{media-plugins-DdOjIVk3.js → media-plugins-a3R4y-EL.js} +1 -1
  203. package/dist/gateway/static/root/assets/messages-B0B40tpO.js +5 -0
  204. package/dist/gateway/static/root/assets/models-hub-panel-CbTlz9Of.js +2 -0
  205. package/dist/gateway/static/root/assets/{notes-page-ZbLR3awn.js → notes-page-BCxDy2dV.js} +1 -1
  206. package/dist/gateway/static/root/assets/notes-workbench-z6sBX9B2.js +4 -0
  207. package/dist/gateway/static/root/assets/{page-tabs-DMlQERNg.js → page-tabs-CJfk6M78.js} +1 -1
  208. package/dist/gateway/static/root/assets/{preview-open-alternatives-CbiJRPxK.js → preview-open-alternatives-MFopTSgF.js} +1 -1
  209. package/dist/gateway/static/root/assets/project-detail-page-DU29deIr.js +1 -0
  210. package/dist/gateway/static/root/assets/projects-page-Ck3DLTlZ.js +1 -0
  211. package/dist/gateway/static/root/assets/remote-access-hub-gLsLyAyi.js +1 -0
  212. package/dist/gateway/static/root/assets/{save-bar-controls-BZTj3hxl.js → save-bar-controls-D0uhU3Z8.js} +1 -1
  213. package/dist/gateway/static/root/assets/{schedule-field-CxYDObjT.js → schedule-field-NGOH-7wV.js} +1 -1
  214. package/dist/gateway/static/root/assets/{schema-form-CBbXgpKQ.js → schema-form-BJz5LoqG.js} +1 -1
  215. package/dist/gateway/static/root/assets/schemas-DgQq6Z5S.js +64 -0
  216. package/dist/gateway/static/root/assets/sessions-page-TmNoWpa_.js +1 -0
  217. package/dist/gateway/static/root/assets/settings-advanced-gate-CtPhh2m9.js +1 -0
  218. package/dist/gateway/static/root/assets/{settings-collapsible-section-BySKZ8rp.js → settings-collapsible-section-oDnUHnX_.js} +1 -1
  219. package/dist/gateway/static/root/assets/{settings-form-section-CjINay6t.js → settings-form-section-DND90dDt.js} +1 -1
  220. package/dist/gateway/static/root/assets/settings-loading-skeleton-CEJtaoQp.js +1 -0
  221. package/dist/gateway/static/root/assets/{settings-page-BNrVwuL7.js → settings-page-B1LJlRi9.js} +1 -1
  222. package/dist/gateway/static/root/assets/{settings-page-layout-HdlQOOqp.js → settings-page-layout-CsrLuDsW.js} +1 -1
  223. package/dist/gateway/static/root/assets/setup-status-panel-BPCJPHHY.js +1 -0
  224. package/dist/gateway/static/root/assets/{share-preview-page-DC-eQONB.js → share-preview-page-C1PwLh-p.js} +1 -1
  225. package/dist/gateway/static/root/assets/shares-settings-DCuqr7js.js +1 -0
  226. package/dist/gateway/static/root/assets/skill-reload-api-kn1Vypcy.js +1 -0
  227. package/dist/gateway/static/root/assets/skills-page-k6VIqTkK.js +2 -0
  228. package/dist/gateway/static/root/assets/{system-settings-panel-CVa90q2f.js → system-settings-panel-BEsrEkSx.js} +1 -1
  229. package/dist/gateway/static/root/assets/{theme-store-D1cOpgsy.js → theme-store-Bi6hMBDb.js} +1 -1
  230. package/dist/gateway/static/root/assets/{typed-models-lib-DIKF9vpz.js → typed-models-lib-dOypdlMf.js} +1 -1
  231. package/dist/gateway/static/root/assets/{use-channel-catalog-DnvpI0Ys.js → use-channel-catalog-f8A-PVuq.js} +1 -1
  232. package/dist/gateway/static/root/assets/user-context-page-B9Y_Ciav.js +1 -0
  233. package/dist/gateway/static/root/assets/{user-profile-fields-editor-y8gTmkPX.js → user-profile-fields-editor-DGC38Lx7.js} +1 -1
  234. package/dist/gateway/static/root/assets/{user-profile-settings-panel-C3pvqe28.js → user-profile-settings-panel-DFkZ-tan.js} +1 -1
  235. package/dist/gateway/static/root/assets/{utils-BK2vwu_3.js → utils-CEIYZihF.js} +1 -1
  236. package/dist/gateway/static/root/assets/voice-api-key-field-DK6gaQsA.js +1 -0
  237. package/dist/gateway/static/root/assets/work-discovery-page-DSJb9Kq7.js +1 -0
  238. package/dist/gateway/static/root/assets/work-item-detail-page-DVavwV3D.js +1 -0
  239. package/dist/gateway/static/root/assets/work-page-foJDp0nz.js +1 -0
  240. package/dist/gateway/static/root/assets/workflow-run-setup-panel-BYqZpFCC.js +3 -0
  241. package/dist/gateway/static/root/assets/workflows-page-DgO0WAzs.js +11 -0
  242. package/dist/gateway/static/root/favicon.svg +1 -187
  243. package/dist/gateway/static/root/index.html +8 -7
  244. package/dist/gateway/static/root/logo-dark.svg +1 -185
  245. package/dist/gateway/static/root/logo.svg +1 -185
  246. package/dist/package.js +1 -3
  247. package/dist/src/activity/context.js +0 -2
  248. package/dist/src/activity/emitter.js +0 -2
  249. package/dist/src/activity/service.js +0 -2
  250. package/dist/src/agent/agent-manager.d.ts +1 -0
  251. package/dist/src/agent/agent-manager.js +1 -2
  252. package/dist/src/agent/agent-scope.js +0 -2
  253. package/dist/src/agent/background-review/coordinator.js +0 -2
  254. package/dist/src/agent/background-review/prompts.js +0 -2
  255. package/dist/src/agent/background-review/run-background-review.js +0 -2
  256. package/dist/src/agent/background-review/settings.js +0 -2
  257. package/dist/src/agent/bootstrap/bootstrap-cache.js +0 -2
  258. package/dist/src/agent/bootstrap/bootstrap-context.js +0 -2
  259. package/dist/src/agent/bootstrap/bootstrap-files.js +0 -2
  260. package/dist/src/agent/bootstrap/filter-bootstrap-files.js +0 -2
  261. package/dist/src/agent/bootstrap/load-bootstrap-files.js +0 -2
  262. package/dist/src/agent/bootstrap/project-agents-context.js +0 -2
  263. package/dist/src/agent/capabilities/definitions.js +0 -2
  264. package/dist/src/agent/capabilities/registry.js +0 -2
  265. package/dist/src/agent/child-agent-factory.js +0 -2
  266. package/dist/src/agent/client-error-format.js +0 -2
  267. package/dist/src/agent/code-intelligence/binary.js +0 -2
  268. package/dist/src/agent/code-intelligence/runtime.js +0 -2
  269. package/dist/src/agent/code-intelligence/tools.js +0 -2
  270. package/dist/src/agent/coding/turn-diff-tracker.js +0 -2
  271. package/dist/src/agent/context/expand-at-file-mentions.js +0 -2
  272. package/dist/src/agent/context/project-context.js +0 -2
  273. package/dist/src/agent/context/workspace-seed.js +0 -2
  274. package/dist/src/agent/context/workspace-state.js +0 -2
  275. package/dist/src/agent/context/workspace.js +0 -2
  276. package/dist/src/agent/embedded/run-for-session.js +0 -2
  277. package/dist/src/agent/embedded/run-turn.js +0 -2
  278. package/dist/src/agent/embedded/runs.js +0 -2
  279. package/dist/src/agent/embedded/session-manager-init.js +0 -2
  280. package/dist/src/agent/embedded/session-runner.js +0 -2
  281. package/dist/src/agent/embedded/session-tool-result-guard.js +0 -2
  282. package/dist/src/agent/embedded/sqlite-hydrating-session-manager.js +0 -2
  283. package/dist/src/agent/embedded/subscribe-session.js +0 -2
  284. package/dist/src/agent/embedded/system-prompt-override.js +0 -2
  285. package/dist/src/agent/embedded/tool-result-context-guard.js +0 -2
  286. package/dist/src/agent/embedded/tool-result-truncation.js +0 -2
  287. package/dist/src/agent/embedded/xopc-auth-storage.js +0 -2
  288. package/dist/src/agent/embedded/xopc-stream-bridge.js +0 -2
  289. package/dist/src/agent/embedded/xopc-tools-bridge.js +0 -2
  290. package/dist/src/agent/failover-error.js +0 -2
  291. package/dist/src/agent/fallback/candidates.js +0 -2
  292. package/dist/src/agent/fallback/reason.js +0 -2
  293. package/dist/src/agent/feedback/feedback-coordinator.js +0 -2
  294. package/dist/src/agent/goals/checklist-judge.js +0 -2
  295. package/dist/src/agent/goals/checklist-types.js +0 -2
  296. package/dist/src/agent/goals/evaluate-turn.js +0 -2
  297. package/dist/src/agent/goals/goal-locale.js +0 -2
  298. package/dist/src/agent/goals/judge.js +0 -2
  299. package/dist/src/agent/goals/persistent-goal-service.js +0 -2
  300. package/dist/src/agent/goals/post-turn.js +0 -2
  301. package/dist/src/agent/goals/state.js +0 -2
  302. package/dist/src/agent/image/generation/bundled-registry.js +0 -2
  303. package/dist/src/agent/image/generation/bundled.js +0 -2
  304. package/dist/src/agent/image/generation/image-assets.js +0 -2
  305. package/dist/src/agent/image/generation/model-ref.js +0 -2
  306. package/dist/src/agent/image/generation/normalization.js +0 -2
  307. package/dist/src/agent/image/generation/openai-compatible-image-provider.js +0 -2
  308. package/dist/src/agent/image/generation/provider-registry.js +0 -2
  309. package/dist/src/agent/image/generation/runtime.js +0 -2
  310. package/dist/src/agent/image/image-helpers.js +0 -2
  311. package/dist/src/agent/image/image-model-fallback.js +0 -2
  312. package/dist/src/agent/image/inbound-image-handling.js +0 -2
  313. package/dist/src/agent/image/load-image-media.js +0 -2
  314. package/dist/src/agent/image/tool-model-config.js +0 -2
  315. package/dist/src/agent/image/understanding/pi-ai-provider.js +0 -2
  316. package/dist/src/agent/image/understanding/provider-registry.js +0 -2
  317. package/dist/src/agent/image/understanding/runtime.js +0 -2
  318. package/dist/src/agent/image/vision-detection.js +0 -2
  319. package/dist/src/agent/inbound/attachment-pipeline.js +0 -2
  320. package/dist/src/agent/inbound/inbound-loop.js +0 -2
  321. package/dist/src/agent/inbound/turn-dispatcher.js +0 -2
  322. package/dist/src/agent/ipc/bus.js +0 -2
  323. package/dist/src/agent/ipc/inbox.js +0 -2
  324. package/dist/src/agent/ipc/socket.js +0 -2
  325. package/dist/src/agent/ipc/types.js +0 -2
  326. package/dist/src/agent/lifecycle/handlers/compaction.js +0 -2
  327. package/dist/src/agent/lifecycle/hook-handler.js +0 -2
  328. package/dist/src/agent/lifecycle/manager.js +0 -2
  329. package/dist/src/agent/lifecycle/progress.js +0 -2
  330. package/dist/src/agent/lifecycle/timeout-wrapper.js +0 -2
  331. package/dist/src/agent/lifecycle/typing.js +0 -2
  332. package/dist/src/agent/mcp/bundle-mcp-config.js +0 -2
  333. package/dist/src/agent/mcp/bundle-mcp-materialize.js +0 -2
  334. package/dist/src/agent/mcp/bundle-mcp-names.js +0 -2
  335. package/dist/src/agent/mcp/bundle-mcp-policy.js +0 -2
  336. package/dist/src/agent/mcp/bundle-mcp-runtime.js +0 -2
  337. package/dist/src/agent/mcp/embedded-mcp.js +0 -2
  338. package/dist/src/agent/mcp/mcp-config-shared.js +0 -2
  339. package/dist/src/agent/mcp/mcp-http.js +0 -2
  340. package/dist/src/agent/mcp/mcp-stdio-transport.js +0 -2
  341. package/dist/src/agent/mcp/mcp-stdio.js +0 -2
  342. package/dist/src/agent/mcp/mcp-tool-meta.js +0 -2
  343. package/dist/src/agent/mcp/mcp-transport-config.js +0 -2
  344. package/dist/src/agent/mcp/mcp-transport.js +0 -2
  345. package/dist/src/agent/mcp/resolve-embedded-mcp-tools.js +0 -2
  346. package/dist/src/agent/media-generation/model-ref.js +0 -2
  347. package/dist/src/agent/media-generation/normalization.types.js +0 -2
  348. package/dist/src/agent/media-generation/runtime-shared.js +0 -2
  349. package/dist/src/agent/memory/agent-message-access.js +0 -2
  350. package/dist/src/agent/memory/builtin-memory-store.js +0 -2
  351. package/dist/src/agent/memory/builtin-provider.js +0 -2
  352. package/dist/src/agent/memory/compaction.js +0 -2
  353. package/dist/src/agent/memory/context/planner.js +0 -2
  354. package/dist/src/agent/memory/context-fence.js +0 -2
  355. package/dist/src/agent/memory/create-memory-manager.js +0 -2
  356. package/dist/src/agent/memory/dreaming/config.js +0 -2
  357. package/dist/src/agent/memory/dreaming/constants.js +0 -2
  358. package/dist/src/agent/memory/dreaming/deep-promotion.js +0 -2
  359. package/dist/src/agent/memory/dreaming/events.js +0 -2
  360. package/dist/src/agent/memory/dreaming/last-run.js +0 -2
  361. package/dist/src/agent/memory/dreaming/light-sweep.js +0 -2
  362. package/dist/src/agent/memory/dreaming/preview.js +0 -2
  363. package/dist/src/agent/memory/dreaming/promotion-lifecycle.js +0 -2
  364. package/dist/src/agent/memory/dreaming/rem-patterns.js +0 -2
  365. package/dist/src/agent/memory/dreaming/scope.js +0 -2
  366. package/dist/src/agent/memory/dreaming/short-term-store.js +0 -2
  367. package/dist/src/agent/memory/dreaming/utils.js +0 -2
  368. package/dist/src/agent/memory/lifecycle.js +0 -2
  369. package/dist/src/agent/memory/manager.js +0 -2
  370. package/dist/src/agent/memory/memory-config.js +0 -2
  371. package/dist/src/agent/memory/message-sanitizer.js +0 -2
  372. package/dist/src/agent/memory/plugin-discovery.js +0 -2
  373. package/dist/src/agent/memory/sensitivity.js +0 -2
  374. package/dist/src/agent/memory/source-origin.js +0 -2
  375. package/dist/src/agent/memory/stub-memory-provider.js +0 -2
  376. package/dist/src/agent/memory/summary-generator.js +0 -2
  377. package/dist/src/agent/memory/understanding/correction.js +0 -2
  378. package/dist/src/agent/memory/understanding/quality.js +0 -2
  379. package/dist/src/agent/memory/understanding/service.js +0 -2
  380. package/dist/src/agent/memory/user-context-coordinator.js +0 -2
  381. package/dist/src/agent/memory/user-message-text.js +0 -2
  382. package/dist/src/agent/memory/window.js +0 -2
  383. package/dist/src/agent/messaging/command-handler.js +0 -2
  384. package/dist/src/agent/messaging/message-router.js +0 -2
  385. package/dist/src/agent/messaging/outbound-coordinator.js +0 -2
  386. package/dist/src/agent/messaging/stream-manager.js +0 -2
  387. package/dist/src/agent/middleware/context.js +0 -2
  388. package/dist/src/agent/middleware/self-verify.js +0 -2
  389. package/dist/src/agent/models/manager.js +0 -2
  390. package/dist/src/agent/models/request-limiter.js +0 -2
  391. package/dist/src/agent/models/selection.js +0 -2
  392. package/dist/src/agent/orchestration/agent-event-handler.js +0 -2
  393. package/dist/src/agent/orchestration/agent-orchestrator.js +0 -2
  394. package/dist/src/agent/orchestration/llm-turn-retry.js +0 -2
  395. package/dist/src/agent/orchestration/loop-guard.js +0 -2
  396. package/dist/src/agent/orchestration/run-agent-turn-with-timeout.js +0 -2
  397. package/dist/src/agent/prompt/cache-boundary.js +0 -2
  398. package/dist/src/agent/prompt/memory/index.js +0 -2
  399. package/dist/src/agent/prompt/safety.js +0 -2
  400. package/dist/src/agent/prompt/sanitize-for-prompt.js +0 -2
  401. package/dist/src/agent/prompt/sections/behavior.js +0 -2
  402. package/dist/src/agent/prompt/sections/memory-skills.js +0 -2
  403. package/dist/src/agent/prompt/sections/messaging-runtime.js +0 -2
  404. package/dist/src/agent/prompt/sections/project-context.js +0 -2
  405. package/dist/src/agent/prompt/sections/tooling.js +0 -2
  406. package/dist/src/agent/prompt/sections/workspace-runtime.js +0 -2
  407. package/dist/src/agent/prompt/service-prompt-builder.js +0 -2
  408. package/dist/src/agent/prompt/subagent-context.js +0 -2
  409. package/dist/src/agent/prompt/system-prompt-params.js +0 -2
  410. package/dist/src/agent/prompt/system-prompt.js +0 -2
  411. package/dist/src/agent/prompt/system-reminder.js +0 -2
  412. package/dist/src/agent/reply/apply-turn-user-enrichment.js +0 -2
  413. package/dist/src/agent/reply/post-compaction-context.js +0 -2
  414. package/dist/src/agent/reply/startup-context.js +0 -2
  415. package/dist/src/agent/reply/workspace-boundary-read.js +0 -2
  416. package/dist/src/agent/sandbox/command-validator.js +0 -2
  417. package/dist/src/agent/sandbox/exec-policy.js +0 -2
  418. package/dist/src/agent/sandbox/path-policy.js +0 -2
  419. package/dist/src/agent/sandbox/sanitize-env-vars.js +0 -2
  420. package/dist/src/agent/sandbox/types.js +0 -2
  421. package/dist/src/agent/service/async-queue.js +0 -2
  422. package/dist/src/agent/service/btw-query.js +0 -2
  423. package/dist/src/agent/service/build-direct-message-content.js +0 -2
  424. package/dist/src/agent/service/direct-turn-helpers.js +0 -2
  425. package/dist/src/agent/service/parse-outbound-session-key.js +0 -2
  426. package/dist/src/agent/service/process-direct-one-shot.js +0 -2
  427. package/dist/src/agent/service/process-direct-streaming.js +0 -2
  428. package/dist/src/agent/service/session-context-report.js +0 -2
  429. package/dist/src/agent/service/webchat-tts.js +0 -2
  430. package/dist/src/agent/service-inbound-utils.js +0 -2
  431. package/dist/src/agent/service.js +1 -2
  432. package/dist/src/agent/service.types.d.ts +2 -0
  433. package/dist/src/agent/session/session-config-service.js +0 -2
  434. package/dist/src/agent/session/session-context.js +0 -2
  435. package/dist/src/agent/session/session-hydrator.js +0 -2
  436. package/dist/src/agent/session/session-inspector.js +0 -2
  437. package/dist/src/agent/session/session-lifecycle.js +0 -2
  438. package/dist/src/agent/session/session-state-bag.js +0 -2
  439. package/dist/src/agent/session/tracker.js +0 -2
  440. package/dist/src/agent/skills/config.js +0 -2
  441. package/dist/src/agent/skills/filesystem-watcher.js +0 -2
  442. package/dist/src/agent/skills/format-skills-prompt.js +0 -2
  443. package/dist/src/agent/skills/hub-hash.js +0 -2
  444. package/dist/src/agent/skills/hub-lock.js +0 -2
  445. package/dist/src/agent/skills/hub-pull.js +0 -2
  446. package/dist/src/agent/skills/index.js +0 -2
  447. package/dist/src/agent/skills/install-target.js +0 -2
  448. package/dist/src/agent/skills/installer.js +0 -2
  449. package/dist/src/agent/skills/managed-store.js +0 -2
  450. package/dist/src/agent/skills/marketplace/adapters/clawhub/adapter.js +0 -2
  451. package/dist/src/agent/skills/marketplace/adapters/skillhub/adapter.js +0 -2
  452. package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +0 -2
  453. package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +0 -2
  454. package/dist/src/agent/skills/marketplace/marketplace-category-order.js +0 -2
  455. package/dist/src/agent/skills/marketplace/registry.js +0 -2
  456. package/dist/src/agent/skills/marketplace/resolve-adapter.js +0 -2
  457. package/dist/src/agent/skills/parse-skill-metadata.js +0 -2
  458. package/dist/src/agent/skills/required-env-vars.js +0 -2
  459. package/dist/src/agent/skills/scanner.js +0 -2
  460. package/dist/src/agent/skills/skill-manage-ops.js +0 -2
  461. package/dist/src/agent/skills/skill-manager.js +0 -2
  462. package/dist/src/agent/skills/skill-markdown-preview-from-raw.js +0 -2
  463. package/dist/src/agent/skills/skill-tool-gating.js +0 -2
  464. package/dist/src/agent/skills/skill-view-path.js +0 -2
  465. package/dist/src/agent/skills/skills-marketplace.js +0 -2
  466. package/dist/src/agent/skills/test-framework.js +0 -2
  467. package/dist/src/agent/skills/watcher.js +0 -2
  468. package/dist/src/agent/skills/workspace-skills-dir.js +0 -2
  469. package/dist/src/agent/source-context/injector.js +0 -2
  470. package/dist/src/agent/source-context/types.js +0 -2
  471. package/dist/src/agent/starter-agents.js +0 -2
  472. package/dist/src/agent/streaming/reasoning-visibility-sse.js +0 -2
  473. package/dist/src/agent/tool-manuals/browser.js +0 -2
  474. package/dist/src/agent/tool-manuals/index.js +0 -2
  475. package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
  476. package/dist/src/agent/tool-manuals/xopc-use.js +41 -4
  477. package/dist/src/agent/tools/apply-patch.js +0 -2
  478. package/dist/src/agent/tools/automation-tool.js +45 -8
  479. package/dist/src/agent/tools/browser/tool/browser-use-tool.js +0 -2
  480. package/dist/src/agent/tools/browser/tool/schemas.js +0 -2
  481. package/dist/src/agent/tools/chain-tracker.js +0 -2
  482. package/dist/src/agent/tools/clarify-tool.js +0 -2
  483. package/dist/src/agent/tools/cli-clarify.js +0 -2
  484. package/dist/src/agent/tools/communication.js +0 -2
  485. package/dist/src/agent/tools/composio-tool.js +0 -2
  486. package/dist/src/agent/tools/concurrency.js +0 -2
  487. package/dist/src/agent/tools/create-share-tool.js +0 -2
  488. package/dist/src/agent/tools/curated-memory-tool.js +0 -2
  489. package/dist/src/agent/tools/delegate-tool.js +0 -2
  490. package/dist/src/agent/tools/desktop-pet-tool.d.ts +12 -0
  491. package/dist/src/agent/tools/desktop-pet-tool.js +28 -2
  492. package/dist/src/agent/tools/dreaming-tool.js +0 -2
  493. package/dist/src/agent/tools/edit-diff.js +0 -2
  494. package/dist/src/agent/tools/error-pattern-matcher.js +0 -2
  495. package/dist/src/agent/tools/error-tracker.js +0 -2
  496. package/dist/src/agent/tools/exec-command.js +0 -2
  497. package/dist/src/agent/tools/execute-code-tool.js +0 -2
  498. package/dist/src/agent/tools/executor.js +0 -2
  499. package/dist/src/agent/tools/factory.d.ts +2 -0
  500. package/dist/src/agent/tools/factory.js +3 -4
  501. package/dist/src/agent/tools/find.js +0 -2
  502. package/dist/src/agent/tools/goal-evidence-recorder.js +0 -2
  503. package/dist/src/agent/tools/goal-tool.d.ts +7 -1
  504. package/dist/src/agent/tools/goal-tool.js +34 -7
  505. package/dist/src/agent/tools/grep.js +0 -2
  506. package/dist/src/agent/tools/image-generate-tool.js +0 -2
  507. package/dist/src/agent/tools/image-tool.js +0 -2
  508. package/dist/src/agent/tools/list-dir.js +0 -2
  509. package/dist/src/agent/tools/media-read-tool.js +0 -2
  510. package/dist/src/agent/tools/memory-tool.js +0 -2
  511. package/dist/src/agent/tools/metadata.js +0 -2
  512. package/dist/src/agent/tools/read.js +0 -2
  513. package/dist/src/agent/tools/search/http.js +0 -2
  514. package/dist/src/agent/tools/search/providers/bing-api.js +0 -2
  515. package/dist/src/agent/tools/search/providers/bing-html.js +0 -2
  516. package/dist/src/agent/tools/search/providers/brave.js +0 -2
  517. package/dist/src/agent/tools/search/providers/duckduckgo-html.js +0 -2
  518. package/dist/src/agent/tools/search/providers/searxng.js +0 -2
  519. package/dist/src/agent/tools/search/providers/tavily.js +0 -2
  520. package/dist/src/agent/tools/search/region.js +0 -2
  521. package/dist/src/agent/tools/search/registry.js +0 -2
  522. package/dist/src/agent/tools/search/resolve-config.js +0 -2
  523. package/dist/src/agent/tools/send-media.js +0 -2
  524. package/dist/src/agent/tools/session-search-tool.js +0 -2
  525. package/dist/src/agent/tools/session-status-tool.js +0 -2
  526. package/dist/src/agent/tools/skill-install-tool.js +0 -2
  527. package/dist/src/agent/tools/skill-manage-tool.js +0 -2
  528. package/dist/src/agent/tools/skills-tools.js +0 -2
  529. package/dist/src/agent/tools/structured-output.js +0 -2
  530. package/dist/src/agent/tools/todo-tool.js +0 -2
  531. package/dist/src/agent/tools/tool-manual-tool.js +0 -2
  532. package/dist/src/agent/tools/tool-paths.js +0 -2
  533. package/dist/src/agent/tools/truncate.js +0 -2
  534. package/dist/src/agent/tools/tts-tool.js +0 -2
  535. package/dist/src/agent/tools/update-plan-tool.js +0 -2
  536. package/dist/src/agent/tools/url-safety.js +0 -2
  537. package/dist/src/agent/tools/usage-analyzer.js +0 -2
  538. package/dist/src/agent/tools/web-extract.js +0 -2
  539. package/dist/src/agent/tools/web.js +4 -4
  540. package/dist/src/agent/tools/workflow-tool.js +32 -4
  541. package/dist/src/agent/tools/write.js +23 -5
  542. package/dist/src/agent/tools/xopc-use-tool.d.ts +6 -2
  543. package/dist/src/agent/tools/xopc-use-tool.js +216 -8
  544. package/dist/src/agent/transcript/google-api.js +0 -2
  545. package/dist/src/agent/transcript/model-selection.js +0 -2
  546. package/dist/src/agent/transcript/provider-capabilities.js +0 -2
  547. package/dist/src/agent/transcript/session-transcript-repair.js +0 -2
  548. package/dist/src/agent/transcript/strip-tool-messages.js +0 -2
  549. package/dist/src/agent/transcript/thinking-types.js +0 -2
  550. package/dist/src/agent/transcript/thinking.js +0 -2
  551. package/dist/src/agent/transcript/tool-call-id.js +0 -2
  552. package/dist/src/agent/transcript/transcript-hygiene.js +0 -2
  553. package/dist/src/agent/transcript/transcript-policy.js +0 -2
  554. package/dist/src/agent/workflow/agent-progress.js +0 -2
  555. package/dist/src/agent/workflow/builtins/index.js +0 -2
  556. package/dist/src/agent/workflow/catalog.js +0 -2
  557. package/dist/src/agent/workflow/progress-broker.js +0 -2
  558. package/dist/src/agent/workflow/snapshot-empty.js +0 -2
  559. package/dist/src/agent/workflow/snapshot.js +0 -2
  560. package/dist/src/agent/workflow/step-labels.js +0 -2
  561. package/dist/src/agent/workflow/structured-output-tool.js +0 -2
  562. package/dist/src/agent/workflow/subagent-runner.js +0 -2
  563. package/dist/src/agent/workflow/workflow-child-tools.js +0 -2
  564. package/dist/src/agent/workspace-runtime/registry.js +0 -2
  565. package/dist/src/agent-manifest/index.js +0 -2
  566. package/dist/src/agent-manifest/preset-chain.js +0 -2
  567. package/dist/src/agent-manifest/prompt.js +0 -2
  568. package/dist/src/agent-manifest/resolver.js +0 -2
  569. package/dist/src/agent-manifest/schema.js +0 -2
  570. package/dist/src/agent-manifest/validator.js +0 -2
  571. package/dist/src/agent-runtime/boundary-guard.js +0 -2
  572. package/dist/src/agent-runtime/memory-runtime.js +0 -2
  573. package/dist/src/agent-runtime/model-router.js +0 -2
  574. package/dist/src/agent-runtime/run-trace.js +0 -2
  575. package/dist/src/agent-runtime/runtime-profile.js +0 -2
  576. package/dist/src/agent-runtime/tool-registry.js +0 -2
  577. package/dist/src/agent-runtime/workflow-runtime.js +0 -2
  578. package/dist/src/ai-assist/text-assist.js +0 -2
  579. package/dist/src/auth/credentials.js +0 -2
  580. package/dist/src/auth/index.js +0 -2
  581. package/dist/src/auth/oauth/anthropic.js +0 -2
  582. package/dist/src/auth/oauth/github-copilot.js +0 -2
  583. package/dist/src/auth/oauth/google-oauth/google-antigravity.js +0 -2
  584. package/dist/src/auth/oauth/google-oauth/google-gemini-cli.js +0 -2
  585. package/dist/src/auth/oauth/google-oauth/oauth-page.js +0 -2
  586. package/dist/src/auth/oauth/google-oauth/pkce.js +0 -2
  587. package/dist/src/auth/oauth/kimi-coding.js +0 -2
  588. package/dist/src/auth/oauth/minimax-cn.js +0 -2
  589. package/dist/src/auth/oauth/minimax.js +0 -2
  590. package/dist/src/auth/oauth/openai-codex.js +0 -2
  591. package/dist/src/auth/oauth/pkce.js +0 -2
  592. package/dist/src/auth/profiles/oauth.js +0 -2
  593. package/dist/src/auth/profiles/order.js +0 -2
  594. package/dist/src/auth/profiles/profiles.js +0 -2
  595. package/dist/src/auth/profiles/store.js +0 -2
  596. package/dist/src/auth/sync-provider-auth.js +0 -2
  597. package/dist/src/automations/api/routes.js +0 -2
  598. package/dist/src/automations/domain/schedule.js +0 -2
  599. package/dist/src/automations/domain/validation.js +0 -2
  600. package/dist/src/automations/draft/automation-draft-prompt.js +0 -2
  601. package/dist/src/automations/draft/automation-draft-service.js +0 -2
  602. package/dist/src/automations/draft/automation-draft-validator.js +0 -2
  603. package/dist/src/automations/product-events.js +0 -2
  604. package/dist/src/automations/service/action-executor.js +0 -2
  605. package/dist/src/automations/service/automation-service.js +0 -2
  606. package/dist/src/automations/storage/automation-repository.js +0 -2
  607. package/dist/src/automations/storage/automation-run-repository.js +0 -2
  608. package/dist/src/browser/actions/extension-registry-bridge.js +0 -2
  609. package/dist/src/browser/actions/registry.js +0 -2
  610. package/dist/src/browser/backend-from-config.js +0 -2
  611. package/dist/src/browser/browser-command-timeout.js +0 -2
  612. package/dist/src/browser/cache-dir-policy.js +0 -2
  613. package/dist/src/browser/cdp-local-launcher.js +0 -2
  614. package/dist/src/browser/cdp-supervisor.js +0 -2
  615. package/dist/src/browser/free-port.js +0 -2
  616. package/dist/src/browser/humanize.js +0 -2
  617. package/dist/src/browser/install-lock.js +0 -2
  618. package/dist/src/browser/manager.js +0 -2
  619. package/dist/src/browser/pipeline/output.js +0 -2
  620. package/dist/src/browser/pipeline/runner.js +0 -2
  621. package/dist/src/browser/pipeline/schema.js +0 -2
  622. package/dist/src/browser/pipeline/source.js +0 -2
  623. package/dist/src/browser/pipeline/template.js +0 -2
  624. package/dist/src/browser/providers/browser-ext-install.js +0 -2
  625. package/dist/src/browser/providers/browser-use.js +0 -2
  626. package/dist/src/browser/providers/browserbase.js +0 -2
  627. package/dist/src/browser/providers/cloakbrowser.js +0 -2
  628. package/dist/src/browser/providers/extension-ws-acquire.js +0 -2
  629. package/dist/src/browser/providers/extension.js +0 -2
  630. package/dist/src/browser/providers/playwright-doctor.js +13 -4
  631. package/dist/src/browser/providers/playwright-install.js +0 -2
  632. package/dist/src/browser/readiness.js +0 -2
  633. package/dist/src/browser/schemas.js +0 -2
  634. package/dist/src/browser/session-lifecycle.js +0 -2
  635. package/dist/src/browser/snapshot-helpers.js +0 -2
  636. package/dist/src/browser/stealth.js +0 -2
  637. package/dist/src/browser/url-policy.js +0 -2
  638. package/dist/src/capabilities/store-connector.js +0 -2
  639. package/dist/src/channels/attachments/attachment-classifiers.js +0 -2
  640. package/dist/src/channels/attachments/inbound-persist.js +0 -2
  641. package/dist/src/channels/attachments/inbound-types.js +0 -2
  642. package/dist/src/channels/attachments/outbound-tts-persist.js +0 -2
  643. package/dist/src/channels/attachments/voice-stt-webchat.js +0 -2
  644. package/dist/src/channels/catalog/channel-catalog-service.js +0 -2
  645. package/dist/src/channels/config-helpers.js +0 -2
  646. package/dist/src/channels/envelope-timestamp.js +0 -2
  647. package/dist/src/channels/exec-approval-runtime.js +0 -2
  648. package/dist/src/channels/health-monitor.js +0 -2
  649. package/dist/src/channels/heartbeat-scheduler.js +0 -2
  650. package/dist/src/channels/internal-outbound.js +0 -2
  651. package/dist/src/channels/lifecycle-supervisor.js +0 -2
  652. package/dist/src/channels/manager.js +0 -2
  653. package/dist/src/channels/media.js +0 -2
  654. package/dist/src/channels/outbound/deliver.js +0 -2
  655. package/dist/src/channels/outbound/normalize.js +0 -2
  656. package/dist/src/channels/outbound/persist-store.js +0 -2
  657. package/dist/src/channels/outbound/queue.js +0 -2
  658. package/dist/src/channels/outbound-sender.js +0 -2
  659. package/dist/src/channels/pairing/allow-from-file.js +0 -2
  660. package/dist/src/channels/pairing/approve-cli.js +0 -2
  661. package/dist/src/channels/pairing/pairing-challenge.js +0 -2
  662. package/dist/src/channels/pairing/pairing-constants.js +0 -2
  663. package/dist/src/channels/pairing/pairing-events.js +0 -2
  664. package/dist/src/channels/pairing/pairing-messages.js +0 -2
  665. package/dist/src/channels/pairing/pairing-service.js +0 -2
  666. package/dist/src/channels/pairing/pairing-store-adapter.js +0 -2
  667. package/dist/src/channels/pairing/pairing-store.js +0 -2
  668. package/dist/src/channels/pairing/paths.js +0 -2
  669. package/dist/src/channels/pairing/preseed-allow-from.js +0 -2
  670. package/dist/src/channels/pipeline.js +0 -2
  671. package/dist/src/channels/plugin-registry.js +0 -2
  672. package/dist/src/channels/plugins/registry.js +0 -2
  673. package/dist/src/channels/restart-policy.js +0 -2
  674. package/dist/src/channels/security-helpers.js +0 -2
  675. package/dist/src/channels/security.js +0 -2
  676. package/dist/src/channels/setup-wizard-discovery.js +0 -2
  677. package/dist/src/chat-commands/agent-edit.js +0 -2
  678. package/dist/src/chat-commands/builtins/config.js +0 -2
  679. package/dist/src/chat-commands/builtins/context.js +0 -2
  680. package/dist/src/chat-commands/builtins/goal.js +0 -2
  681. package/dist/src/chat-commands/builtins/model.js +0 -2
  682. package/dist/src/chat-commands/builtins/review.js +0 -2
  683. package/dist/src/chat-commands/builtins/session.js +0 -2
  684. package/dist/src/chat-commands/builtins/skill.js +0 -2
  685. package/dist/src/chat-commands/builtins/subgoal.js +0 -2
  686. package/dist/src/chat-commands/builtins/system.js +0 -2
  687. package/dist/src/chat-commands/builtins/thinking.js +0 -2
  688. package/dist/src/chat-commands/builtins/tts.js +0 -2
  689. package/dist/src/chat-commands/builtins/workflow.js +0 -2
  690. package/dist/src/chat-commands/command-parse.js +0 -2
  691. package/dist/src/chat-commands/config-paths.js +0 -2
  692. package/dist/src/chat-commands/config-value.js +0 -2
  693. package/dist/src/chat-commands/context.js +0 -2
  694. package/dist/src/chat-commands/format-output.js +0 -2
  695. package/dist/src/chat-commands/index.js +0 -2
  696. package/dist/src/chat-commands/processor.js +0 -2
  697. package/dist/src/chat-commands/registry.js +0 -2
  698. package/dist/src/chat-commands/session-key.js +0 -2
  699. package/dist/src/cli/argv-invocation.js +0 -2
  700. package/dist/src/cli/argv.js +0 -2
  701. package/dist/src/cli/bin.js +0 -2
  702. package/dist/src/cli/cli-log-level-preset.js +0 -2
  703. package/dist/src/cli/command-catalog.js +0 -2
  704. package/dist/src/cli/command-loaders.js +0 -2
  705. package/dist/src/cli/command-manifest.js +0 -2
  706. package/dist/src/cli/command-path-matches.js +0 -2
  707. package/dist/src/cli/command-path-policy.js +0 -2
  708. package/dist/src/cli/command-startup-policy.js +0 -2
  709. package/dist/src/cli/commands/agent/interactive.js +0 -2
  710. package/dist/src/cli/commands/agent/sessions.js +0 -2
  711. package/dist/src/cli/commands/agent/stream-renderer.js +0 -2
  712. package/dist/src/cli/commands/agent.js +0 -2
  713. package/dist/src/cli/commands/agents.js +0 -2
  714. package/dist/src/cli/commands/auth.js +0 -2
  715. package/dist/src/cli/commands/browser-cli-helpers.js +0 -2
  716. package/dist/src/cli/commands/browser.js +0 -2
  717. package/dist/src/cli/commands/channels.js +0 -2
  718. package/dist/src/cli/commands/config.js +0 -2
  719. package/dist/src/cli/commands/connectors.js +0 -2
  720. package/dist/src/cli/commands/doctor/checks/channel-config.js +0 -2
  721. package/dist/src/cli/commands/doctor/checks/channel-pairing-pending.js +0 -2
  722. package/dist/src/cli/commands/doctor/checks/channel-plugins.js +0 -2
  723. package/dist/src/cli/commands/doctor/checks/config-health.js +0 -2
  724. package/dist/src/cli/commands/doctor/checks/database-schema.js +0 -2
  725. package/dist/src/cli/commands/doctor/checks/gateway-health.js +0 -2
  726. package/dist/src/cli/commands/doctor/checks/gateway-service.js +0 -2
  727. package/dist/src/cli/commands/doctor/checks/migrations.js +0 -2
  728. package/dist/src/cli/commands/doctor/checks/node-version.js +0 -2
  729. package/dist/src/cli/commands/doctor/checks/provider-auth.js +0 -2
  730. package/dist/src/cli/commands/doctor/checks/security-audit.js +0 -2
  731. package/dist/src/cli/commands/doctor/checks/session-integrity.js +0 -2
  732. package/dist/src/cli/commands/doctor/checks/state-integrity.js +0 -2
  733. package/dist/src/cli/commands/doctor/checks/version-check.js +0 -2
  734. package/dist/src/cli/commands/doctor/checks/workspace-status.js +0 -2
  735. package/dist/src/cli/commands/doctor/flow.js +0 -2
  736. package/dist/src/cli/commands/doctor/format.js +0 -2
  737. package/dist/src/cli/commands/doctor/index.js +0 -2
  738. package/dist/src/cli/commands/extension-create.js +0 -2
  739. package/dist/src/cli/commands/extension-dev.js +0 -2
  740. package/dist/src/cli/commands/extension-marketplace.js +0 -2
  741. package/dist/src/cli/commands/extension-pack.js +0 -2
  742. package/dist/src/cli/commands/extension.js +0 -2
  743. package/dist/src/cli/commands/gateway/call.js +0 -2
  744. package/dist/src/cli/commands/gateway/health.js +0 -2
  745. package/dist/src/cli/commands/gateway/lifecycle-core.js +0 -2
  746. package/dist/src/cli/commands/gateway/lifecycle.js +0 -2
  747. package/dist/src/cli/commands/gateway/logs.js +0 -2
  748. package/dist/src/cli/commands/gateway/probe.js +0 -2
  749. package/dist/src/cli/commands/gateway/restart-health.js +0 -2
  750. package/dist/src/cli/commands/gateway/restart.js +0 -2
  751. package/dist/src/cli/commands/gateway/run-foreground.js +0 -2
  752. package/dist/src/cli/commands/gateway/service.js +0 -2
  753. package/dist/src/cli/commands/gateway/shared.js +0 -2
  754. package/dist/src/cli/commands/gateway/status.js +0 -2
  755. package/dist/src/cli/commands/gateway/stop.js +0 -2
  756. package/dist/src/cli/commands/gateway/subcommands.js +0 -2
  757. package/dist/src/cli/commands/gateway/token.js +0 -2
  758. package/dist/src/cli/commands/gateway-ssh-tunnel.js +0 -2
  759. package/dist/src/cli/commands/gateway.js +0 -2
  760. package/dist/src/cli/commands/goal.js +0 -2
  761. package/dist/src/cli/commands/image.js +0 -2
  762. package/dist/src/cli/commands/init.js +0 -2
  763. package/dist/src/cli/commands/logs.js +0 -2
  764. package/dist/src/cli/commands/models.js +0 -2
  765. package/dist/src/cli/commands/onboard/channels/index.js +0 -2
  766. package/dist/src/cli/commands/onboard/channels/onboard-to-configurator.js +0 -2
  767. package/dist/src/cli/commands/onboard/channels/registry.js +0 -2
  768. package/dist/src/cli/commands/onboard/channels/wizard-to-configurator.js +0 -2
  769. package/dist/src/cli/commands/onboard/gateway.js +0 -2
  770. package/dist/src/cli/commands/onboard/model.js +0 -2
  771. package/dist/src/cli/commands/onboard.js +0 -2
  772. package/dist/src/cli/commands/profile.js +0 -2
  773. package/dist/src/cli/commands/project.js +0 -2
  774. package/dist/src/cli/commands/providers.js +0 -2
  775. package/dist/src/cli/commands/resume.js +0 -2
  776. package/dist/src/cli/commands/search.js +0 -2
  777. package/dist/src/cli/commands/session/actions.js +0 -2
  778. package/dist/src/cli/commands/session/utils.js +0 -2
  779. package/dist/src/cli/commands/session.js +0 -2
  780. package/dist/src/cli/commands/setup-shared/output.js +0 -2
  781. package/dist/src/cli/commands/setup-shared/prompts.js +0 -2
  782. package/dist/src/cli/commands/setup-shared/runner.js +0 -2
  783. package/dist/src/cli/commands/setup-shared/types.js +0 -2
  784. package/dist/src/cli/commands/setup.js +0 -2
  785. package/dist/src/cli/commands/skills-test.js +0 -2
  786. package/dist/src/cli/commands/skills.js +0 -2
  787. package/dist/src/cli/commands/tailscale.js +0 -2
  788. package/dist/src/cli/commands/tui-runner.js +0 -2
  789. package/dist/src/cli/commands/tui.js +0 -2
  790. package/dist/src/cli/commands/tunnel.js +0 -2
  791. package/dist/src/cli/commands/update.js +0 -2
  792. package/dist/src/cli/commands/voice.js +0 -2
  793. package/dist/src/cli/context.js +0 -2
  794. package/dist/src/cli/extension-cli-register.js +0 -2
  795. package/dist/src/cli/gateway-run-argv.js +0 -2
  796. package/dist/src/cli/gateway-run-fast-path.js +0 -2
  797. package/dist/src/cli/index.js +0 -2
  798. package/dist/src/cli/registry.js +0 -2
  799. package/dist/src/cli/templates.js +0 -2
  800. package/dist/src/cli/utils/colors.js +0 -2
  801. package/dist/src/cli/utils/gateway-client-options.js +0 -2
  802. package/dist/src/cli/utils/gateway-client.js +0 -2
  803. package/dist/src/cli/utils/init-workspace-core.js +0 -2
  804. package/dist/src/cli/utils/init-workspace.js +0 -2
  805. package/dist/src/cli/utils/oauth-login.js +0 -2
  806. package/dist/src/cli/utils/oauth-providers.js +0 -2
  807. package/dist/src/cli/utils/session.js +0 -2
  808. package/dist/src/commands/agents.config.js +0 -2
  809. package/dist/src/config/agent-profile.js +0 -2
  810. package/dist/src/config/agent-typed-models.js +0 -2
  811. package/dist/src/config/commands.flags.js +0 -2
  812. package/dist/src/config/default-model.js +0 -2
  813. package/dist/src/config/diff.js +0 -2
  814. package/dist/src/config/gateway-bind.js +0 -2
  815. package/dist/src/config/index.js +0 -2
  816. package/dist/src/config/loader.js +0 -2
  817. package/dist/src/config/mcp-config-normalize.js +0 -2
  818. package/dist/src/config/model-input.js +0 -2
  819. package/dist/src/config/models-json.js +0 -2
  820. package/dist/src/config/paths-state.js +0 -2
  821. package/dist/src/config/paths.js +0 -2
  822. package/dist/src/config/profile.js +0 -2
  823. package/dist/src/config/public-url.js +0 -2
  824. package/dist/src/config/reload.js +0 -2
  825. package/dist/src/config/resolve-config-value.js +0 -2
  826. package/dist/src/config/rules.js +0 -2
  827. package/dist/src/config/runtime-overrides.js +0 -2
  828. package/dist/src/config/schema.js +0 -2
  829. package/dist/src/config/validate-channel-configs.js +0 -2
  830. package/dist/src/config/voice.js +0 -2
  831. package/dist/src/config/web-patch.js +0 -2
  832. package/dist/src/config/workspace-defaults.js +0 -2
  833. package/dist/src/config/workspace-dirs.js +0 -2
  834. package/dist/src/config/workspace-path-helpers.js +0 -2
  835. package/dist/src/config/workspace-path.js +0 -2
  836. package/dist/src/connectors/approval.js +0 -2
  837. package/dist/src/connectors/auth-provider-registry.js +0 -2
  838. package/dist/src/connectors/builtin-catalog.js +0 -2
  839. package/dist/src/connectors/catalog.js +0 -2
  840. package/dist/src/connectors/composio-catalog.js +0 -2
  841. package/dist/src/connectors/composio-logo.js +0 -2
  842. package/dist/src/connectors/composio-sessions.js +9 -5
  843. package/dist/src/connectors/composio-triggers.js +0 -2
  844. package/dist/src/connectors/composio.js +0 -2
  845. package/dist/src/connectors/connector-memory-sync.js +0 -2
  846. package/dist/src/connectors/health.js +0 -2
  847. package/dist/src/connectors/install.js +0 -2
  848. package/dist/src/connectors/instances.js +0 -2
  849. package/dist/src/connectors/integration-strategy.js +0 -2
  850. package/dist/src/connectors/lifecycle.js +0 -2
  851. package/dist/src/connectors/materialize.js +0 -2
  852. package/dist/src/connectors/policy.js +0 -2
  853. package/dist/src/connectors/providers.js +0 -2
  854. package/dist/src/connectors/registries/modelscope.js +0 -2
  855. package/dist/src/connectors/registries/official-mcp.js +0 -2
  856. package/dist/src/connectors/registries/search.js +0 -2
  857. package/dist/src/connectors/registries/smithery.js +0 -2
  858. package/dist/src/connectors/runtime-adapter-registry.js +0 -2
  859. package/dist/src/connectors/secret-store.js +0 -2
  860. package/dist/src/connectors/setup-secrets.js +0 -2
  861. package/dist/src/connectors/supervisor.js +0 -2
  862. package/dist/src/connectors/usage.js +0 -2
  863. package/dist/src/connectors/workflow-preflight.js +0 -2
  864. package/dist/src/daemon/constants.js +0 -2
  865. package/dist/src/daemon/install-plan.js +0 -2
  866. package/dist/src/daemon/launchd.js +0 -2
  867. package/dist/src/daemon/schtasks.js +0 -2
  868. package/dist/src/daemon/service-audit.js +0 -2
  869. package/dist/src/daemon/service.js +0 -2
  870. package/dist/src/daemon/systemd.js +0 -2
  871. package/dist/src/document-understanding/extract.js +0 -2
  872. package/dist/src/errors/index.js +0 -2
  873. package/dist/src/extensions/activation-context.js +0 -2
  874. package/dist/src/extensions/activation-planner.js +0 -2
  875. package/dist/src/extensions/api.js +0 -2
  876. package/dist/src/extensions/bundle-mcp.js +0 -2
  877. package/dist/src/extensions/bundled-extension-activation.js +0 -2
  878. package/dist/src/extensions/diagnostics.js +0 -2
  879. package/dist/src/extensions/discover-extensions.js +0 -2
  880. package/dist/src/extensions/engine-check.js +0 -2
  881. package/dist/src/extensions/extension-metadata-snapshot.js +0 -2
  882. package/dist/src/extensions/extension-registry-impl.js +0 -2
  883. package/dist/src/extensions/health.js +0 -2
  884. package/dist/src/extensions/hooks.js +0 -2
  885. package/dist/src/extensions/index.js +0 -2
  886. package/dist/src/extensions/install-transaction.js +0 -2
  887. package/dist/src/extensions/install.js +0 -2
  888. package/dist/src/extensions/loader.js +0 -2
  889. package/dist/src/extensions/lockfile.js +0 -2
  890. package/dist/src/extensions/manifest-registry.js +0 -2
  891. package/dist/src/extensions/marketplace.js +0 -2
  892. package/dist/src/extensions/media-provider-contracts.js +0 -2
  893. package/dist/src/extensions/normalize-manifest.js +0 -2
  894. package/dist/src/extensions/onboard-helpers.js +0 -2
  895. package/dist/src/extensions/package-contract.js +0 -2
  896. package/dist/src/extensions/sdk/channel-entry.js +0 -2
  897. package/dist/src/extensions/sdk/channel-helpers.js +0 -2
  898. package/dist/src/extensions/sdk/index.js +0 -2
  899. package/dist/src/extensions/sdk/lazy.js +0 -2
  900. package/dist/src/extensions/sdk/testing.js +0 -2
  901. package/dist/src/extensions/security.js +0 -2
  902. package/dist/src/extensions/slots.js +0 -2
  903. package/dist/src/extensions/speech-provider-contracts.js +0 -2
  904. package/dist/src/extensions/store-zip-limits.js +0 -2
  905. package/dist/src/extensions/typed-event-bus.js +0 -2
  906. package/dist/src/extensions/types/hooks.js +0 -2
  907. package/dist/src/extensions/types/providers.js +0 -2
  908. package/dist/src/extensions/update.js +0 -2
  909. package/dist/src/extensions/when-context.js +0 -2
  910. package/dist/src/extensions/when-expression.js +0 -2
  911. package/dist/src/gateway/agent-builtin-tools.js +0 -2
  912. package/dist/src/gateway/agent-run-relay.js +0 -2
  913. package/dist/src/gateway/agents-admin.js +0 -2
  914. package/dist/src/gateway/auth.js +0 -2
  915. package/dist/src/gateway/capability-presets-admin.js +0 -2
  916. package/dist/src/gateway/chat-limits.js +0 -2
  917. package/dist/src/gateway/chat-stream/mapper.js +28 -14
  918. package/dist/src/gateway/chat-stream/pet-feedback.d.ts +13 -0
  919. package/dist/src/gateway/chat-stream/pet-feedback.js +45 -0
  920. package/dist/src/gateway/chat-stream/protocol.d.ts +26 -0
  921. package/dist/src/gateway/clarify-bridge.js +3 -3
  922. package/dist/src/gateway/clarify-runtime.js +0 -2
  923. package/dist/src/gateway/client-ip.js +0 -2
  924. package/dist/src/gateway/config-tools-web.js +0 -2
  925. package/dist/src/gateway/credential.js +0 -2
  926. package/dist/src/gateway/discovery/mdns.js +0 -2
  927. package/dist/src/gateway/dreaming-automation-reconciler.js +0 -2
  928. package/dist/src/gateway/ensure-network-cors.js +0 -2
  929. package/dist/src/gateway/file-path-classifier.js +0 -2
  930. package/dist/src/gateway/file-reference-registry.js +0 -2
  931. package/dist/src/gateway/global-defaults-admin.js +0 -2
  932. package/dist/src/gateway/heartbeat/service.js +0 -2
  933. package/dist/src/gateway/hono/app.js +0 -2
  934. package/dist/src/gateway/hono/lib/agent-model.js +0 -2
  935. package/dist/src/gateway/hono/lib/config-payload.js +0 -2
  936. package/dist/src/gateway/hono/lib/extension-assets.js +0 -2
  937. package/dist/src/gateway/hono/lib/extension-store.js +0 -2
  938. package/dist/src/gateway/hono/lib/mask-secret-length.js +0 -2
  939. package/dist/src/gateway/hono/lib/route-logger.js +0 -2
  940. package/dist/src/gateway/hono/lib/safe-providers-config.js +0 -2
  941. package/dist/src/gateway/hono/lib/safe-voice-config.js +0 -2
  942. package/dist/src/gateway/hono/lib/startup-unavailable.js +0 -2
  943. package/dist/src/gateway/hono/lib/static-ui.js +0 -2
  944. package/dist/src/gateway/hono/middleware/auth.js +0 -2
  945. package/dist/src/gateway/hono/middleware/log-context.js +0 -2
  946. package/dist/src/gateway/hono/middleware/logger.js +0 -2
  947. package/dist/src/gateway/hono/middleware/route-errors.js +0 -2
  948. package/dist/src/gateway/hono/middleware/scopes.js +0 -2
  949. package/dist/src/gateway/hono/middleware/strict-rate-limit.js +0 -2
  950. package/dist/src/gateway/hono/oauth-async.js +0 -2
  951. package/dist/src/gateway/hono/oauth.js +0 -2
  952. package/dist/src/gateway/hono/routes/activity.js +0 -2
  953. package/dist/src/gateway/hono/routes/agent-stream.js +0 -2
  954. package/dist/src/gateway/hono/routes/agents.js +0 -2
  955. package/dist/src/gateway/hono/routes/ai-assist.js +0 -2
  956. package/dist/src/gateway/hono/routes/auth-registry-extensions.js +0 -2
  957. package/dist/src/gateway/hono/routes/browser-install.js +0 -2
  958. package/dist/src/gateway/hono/routes/browser.js +0 -2
  959. package/dist/src/gateway/hono/routes/capabilities.js +0 -2
  960. package/dist/src/gateway/hono/routes/capability-presets.js +0 -2
  961. package/dist/src/gateway/hono/routes/channels.js +0 -2
  962. package/dist/src/gateway/hono/routes/commands-skills.js +0 -2
  963. package/dist/src/gateway/hono/routes/config-patch/agents.js +0 -2
  964. package/dist/src/gateway/hono/routes/config-patch/channels.js +0 -2
  965. package/dist/src/gateway/hono/routes/config-patch/gateway.js +0 -2
  966. package/dist/src/gateway/hono/routes/config-patch/misc.js +0 -2
  967. package/dist/src/gateway/hono/routes/config-patch/result.js +0 -2
  968. package/dist/src/gateway/hono/routes/config.js +0 -2
  969. package/dist/src/gateway/hono/routes/connectors.js +0 -2
  970. package/dist/src/gateway/hono/routes/doctor.js +0 -2
  971. package/dist/src/gateway/hono/routes/dreaming.js +0 -2
  972. package/dist/src/gateway/hono/routes/exposure.js +0 -2
  973. package/dist/src/gateway/hono/routes/extension-gateway.js +0 -2
  974. package/dist/src/gateway/hono/routes/global-defaults.js +0 -2
  975. package/dist/src/gateway/hono/routes/goals.js +0 -2
  976. package/dist/src/gateway/hono/routes/home.js +0 -2
  977. package/dist/src/gateway/hono/routes/host-fs.js +0 -2
  978. package/dist/src/gateway/hono/routes/index.js +0 -2
  979. package/dist/src/gateway/hono/routes/lazy-bundles.js +0 -2
  980. package/dist/src/gateway/hono/routes/lazy-fallback.js +0 -2
  981. package/dist/src/gateway/hono/routes/local-apps.js +0 -2
  982. package/dist/src/gateway/hono/routes/logs.js +0 -2
  983. package/dist/src/gateway/hono/routes/mcp.js +0 -2
  984. package/dist/src/gateway/hono/routes/media.js +0 -2
  985. package/dist/src/gateway/hono/routes/memory.js +0 -2
  986. package/dist/src/gateway/hono/routes/migrations.js +0 -2
  987. package/dist/src/gateway/hono/routes/mobile.js +0 -2
  988. package/dist/src/gateway/hono/routes/models.js +0 -2
  989. package/dist/src/gateway/hono/routes/notes.js +3 -3
  990. package/dist/src/gateway/hono/routes/projects.js +0 -2
  991. package/dist/src/gateway/hono/routes/public-gateway.js +0 -2
  992. package/dist/src/gateway/hono/routes/search.js +0 -2
  993. package/dist/src/gateway/hono/routes/sessions.js +0 -2
  994. package/dist/src/gateway/hono/routes/shares.js +0 -2
  995. package/dist/src/gateway/hono/routes/site-shares.js +0 -2
  996. package/dist/src/gateway/hono/routes/status.js +0 -2
  997. package/dist/src/gateway/hono/routes/tui.js +0 -2
  998. package/dist/src/gateway/hono/routes/tunnel.js +0 -2
  999. package/dist/src/gateway/hono/routes/update.js +0 -2
  1000. package/dist/src/gateway/hono/routes/voice.js +0 -2
  1001. package/dist/src/gateway/hono/routes/work-discovery.js +0 -2
  1002. package/dist/src/gateway/hono/routes/workflows.js +0 -2
  1003. package/dist/src/gateway/hono/routes/workspace.js +0 -2
  1004. package/dist/src/gateway/hono/routes/you.js +0 -2
  1005. package/dist/src/gateway/hono/sse-json.js +0 -2
  1006. package/dist/src/gateway/hono/sse.js +0 -2
  1007. package/dist/src/gateway/host.js +0 -2
  1008. package/dist/src/gateway/image-capabilities.js +0 -2
  1009. package/dist/src/gateway/listen.js +0 -2
  1010. package/dist/src/gateway/lock.js +0 -2
  1011. package/dist/src/gateway/ports.js +0 -2
  1012. package/dist/src/gateway/protocol.js +0 -2
  1013. package/dist/src/gateway/public-url.js +0 -2
  1014. package/dist/src/gateway/rate-limit/auth-policy.js +0 -2
  1015. package/dist/src/gateway/rate-limit/buckets.js +0 -2
  1016. package/dist/src/gateway/rate-limit/env-flags.js +0 -2
  1017. package/dist/src/gateway/resolve-channel-connect-defer.js +0 -2
  1018. package/dist/src/gateway/resolve-webchat-session-key.js +0 -2
  1019. package/dist/src/gateway/respawn.js +0 -2
  1020. package/dist/src/gateway/run-loop.js +0 -2
  1021. package/dist/src/gateway/runtime-config.js +0 -2
  1022. package/dist/src/gateway/security/audit.js +0 -2
  1023. package/dist/src/gateway/security/csp.js +0 -2
  1024. package/dist/src/gateway/security/dangerous-tools.js +0 -2
  1025. package/dist/src/gateway/security/external-content.js +0 -2
  1026. package/dist/src/gateway/security/known-weak-secrets.js +0 -2
  1027. package/dist/src/gateway/security/loopback.js +0 -2
  1028. package/dist/src/gateway/security/operator-scopes.js +0 -2
  1029. package/dist/src/gateway/security/origin-check.js +0 -2
  1030. package/dist/src/gateway/security/preauth-connection-budget.js +0 -2
  1031. package/dist/src/gateway/security/secret-equal.js +0 -2
  1032. package/dist/src/gateway/server-tailscale.js +0 -2
  1033. package/dist/src/gateway/server.js +0 -2
  1034. package/dist/src/gateway/service/agent-runner.js +0 -2
  1035. package/dist/src/gateway/service/config-coordinator.js +0 -2
  1036. package/dist/src/gateway/service/marketplace-service.js +0 -2
  1037. package/dist/src/gateway/service/run-gateway-agent.js +0 -2
  1038. package/dist/src/gateway/service/session-chat-ids.js +0 -2
  1039. package/dist/src/gateway/service/sessions-api.js +0 -2
  1040. package/dist/src/gateway/service/sse-hub.js +0 -2
  1041. package/dist/src/gateway/service.js +1 -2
  1042. package/dist/src/gateway/session-reset-service.js +0 -2
  1043. package/dist/src/gateway/startup-readiness.js +0 -2
  1044. package/dist/src/gateway/startup-trace.js +0 -2
  1045. package/dist/src/gateway/tailscale-auth.js +0 -2
  1046. package/dist/src/gateway/tailscale-lifecycle.js +0 -2
  1047. package/dist/src/gateway/tls-server.js +0 -2
  1048. package/dist/src/gateway/trusted-proxy.js +0 -2
  1049. package/dist/src/gateway/user-turn-input.js +0 -2
  1050. package/dist/src/gateway/workspace-editor-path.js +0 -2
  1051. package/dist/src/gateway/workspace-file-search.js +0 -2
  1052. package/dist/src/gateway/workspace-fs-file-list.js +0 -2
  1053. package/dist/src/gateway/workspace-heartbeat-path.js +0 -2
  1054. package/dist/src/gateway/workspace-ripgrep.js +0 -2
  1055. package/dist/src/gateway/ws-security.js +0 -2
  1056. package/dist/src/generated/bundled-image-generation-providers.js +0 -2
  1057. package/dist/src/goals/goal-contract-draft.js +0 -2
  1058. package/dist/src/goals/goal-evidence-review.js +0 -2
  1059. package/dist/src/goals/goal-notifications.js +0 -2
  1060. package/dist/src/goals/goal-queue-store.js +0 -2
  1061. package/dist/src/goals/goal-runner.js +0 -2
  1062. package/dist/src/goals/goal-service.js +0 -2
  1063. package/dist/src/goals/goal-store.js +0 -2
  1064. package/dist/src/goals/goal-workflow-judge.js +0 -2
  1065. package/dist/src/heartbeat/active-hours.js +0 -2
  1066. package/dist/src/heartbeat/content-check.js +0 -2
  1067. package/dist/src/heartbeat/event-prompt.js +0 -2
  1068. package/dist/src/heartbeat/tokens.js +0 -2
  1069. package/dist/src/heartbeat/wake.js +0 -2
  1070. package/dist/src/i18n/format.js +0 -2
  1071. package/dist/src/i18n/goals-bundle.js +0 -2
  1072. package/dist/src/i18n/locale.js +0 -2
  1073. package/dist/src/i18n/locales/goals.en.js +0 -2
  1074. package/dist/src/i18n/locales/goals.zh.js +0 -2
  1075. package/dist/src/i18n/locales/share-tool.en.js +0 -2
  1076. package/dist/src/i18n/locales/share-tool.zh.js +0 -2
  1077. package/dist/src/i18n/share-tool-bundle.js +0 -2
  1078. package/dist/src/index.js +0 -2
  1079. package/dist/src/infra/brew.js +0 -2
  1080. package/dist/src/infra/bus/queue.js +0 -2
  1081. package/dist/src/infra/debounce.js +0 -2
  1082. package/dist/src/infra/exec.js +0 -2
  1083. package/dist/src/infra/gateway-process-argv.js +0 -2
  1084. package/dist/src/infra/gateway-processes.js +0 -2
  1085. package/dist/src/infra/host-env-security-policy.js +0 -2
  1086. package/dist/src/infra/host-env-security.js +0 -2
  1087. package/dist/src/infra/http-proxy-env.js +0 -2
  1088. package/dist/src/infra/is-main.js +0 -2
  1089. package/dist/src/infra/json-utf8-bytes.js +0 -2
  1090. package/dist/src/infra/node-sqlite.js +0 -2
  1091. package/dist/src/infra/package-json.js +0 -2
  1092. package/dist/src/infra/package-update-steps.js +0 -2
  1093. package/dist/src/infra/path-env.js +0 -2
  1094. package/dist/src/infra/path-prepend.js +0 -2
  1095. package/dist/src/infra/ports.js +0 -2
  1096. package/dist/src/infra/rate-limit/failure-limiter.js +0 -2
  1097. package/dist/src/infra/rate-limit/keyed-store.js +0 -2
  1098. package/dist/src/infra/rate-limit/rate-limiter.js +0 -2
  1099. package/dist/src/infra/restart.js +0 -2
  1100. package/dist/src/infra/retry.js +0 -2
  1101. package/dist/src/infra/run-command.js +0 -2
  1102. package/dist/src/infra/sqlite-errors.js +0 -2
  1103. package/dist/src/infra/ssh-tunnel.js +0 -2
  1104. package/dist/src/infra/stable-node-path.js +0 -2
  1105. package/dist/src/infra/tailscale.js +0 -2
  1106. package/dist/src/infra/undici-fetch.js +0 -2
  1107. package/dist/src/infra/unhandled-rejections.js +0 -2
  1108. package/dist/src/infra/update-channels.js +0 -2
  1109. package/dist/src/infra/update-check.js +0 -2
  1110. package/dist/src/infra/update-global.js +0 -2
  1111. package/dist/src/infra/update-lock.js +0 -2
  1112. package/dist/src/infra/update-log.js +0 -2
  1113. package/dist/src/infra/update-restart.js +0 -2
  1114. package/dist/src/infra/update-runner.js +0 -2
  1115. package/dist/src/infra/update-startup.js +0 -2
  1116. package/dist/src/infra/warning-filter.js +0 -2
  1117. package/dist/src/infra/write-file-atomic.js +0 -2
  1118. package/dist/src/knowledge/connected-knowledge-pipeline.js +0 -2
  1119. package/dist/src/knowledge/coordinator.js +0 -2
  1120. package/dist/src/knowledge/ingestion-service.js +0 -2
  1121. package/dist/src/local-apps/acceptance.js +0 -2
  1122. package/dist/src/local-apps/preview-runtime-bridge.js +0 -2
  1123. package/dist/src/local-apps/runtime-entry.js +0 -2
  1124. package/dist/src/local-apps/scaffold.js +0 -2
  1125. package/dist/src/local-apps/service.js +0 -2
  1126. package/dist/src/local-apps/store.js +0 -2
  1127. package/dist/src/markdown/chunk.js +0 -2
  1128. package/dist/src/markdown/code-spans.js +0 -2
  1129. package/dist/src/markdown/fences.js +0 -2
  1130. package/dist/src/markdown/frontmatter.js +0 -2
  1131. package/dist/src/markdown/ir.js +0 -2
  1132. package/dist/src/markdown/render.js +0 -2
  1133. package/dist/src/markdown/tables.js +0 -2
  1134. package/dist/src/mcp/channel-bridge.js +0 -2
  1135. package/dist/src/mcp/channel-server.js +0 -2
  1136. package/dist/src/mcp/channel-shared.js +0 -2
  1137. package/dist/src/mcp/channel-tools.js +0 -2
  1138. package/dist/src/mcp/gateway-http-client.js +0 -2
  1139. package/dist/src/media/media-reference.js +0 -2
  1140. package/dist/src/media/paths.js +0 -2
  1141. package/dist/src/media/session-references.js +0 -2
  1142. package/dist/src/media/store.js +0 -2
  1143. package/dist/src/media/uri.js +0 -2
  1144. package/dist/src/media-shared/http/api-key-rotation.js +0 -2
  1145. package/dist/src/media-shared/http/deadline.js +0 -2
  1146. package/dist/src/media-shared/http/private-network.js +0 -2
  1147. package/dist/src/media-shared/http/provider-http-errors.js +0 -2
  1148. package/dist/src/media-shared/http/provider-http.js +0 -2
  1149. package/dist/src/media-shared/http/resolve-provider-http-request-config.js +0 -2
  1150. package/dist/src/media-shared/http/ssrf-guard.js +0 -2
  1151. package/dist/src/media-shared/http/test-helpers/mock-server.js +0 -2
  1152. package/dist/src/media-understanding/audio-transcription-runner.js +0 -2
  1153. package/dist/src/media-understanding/openai-compatible-audio.js +0 -2
  1154. package/dist/src/media-understanding/registry.js +0 -2
  1155. package/dist/src/media-understanding/resolve-entries.js +0 -2
  1156. package/dist/src/media-understanding/runner.js +0 -2
  1157. package/dist/src/migrations/config/default-capability-preset.js +0 -2
  1158. package/dist/src/migrations/registry.js +0 -2
  1159. package/dist/src/migrations/runner.js +0 -2
  1160. package/dist/src/mobile/notification-service.js +0 -2
  1161. package/dist/src/mobile/notification-store.js +0 -2
  1162. package/dist/src/mobile/notification-types.js +0 -2
  1163. package/dist/src/notes/agent-context.js +0 -2
  1164. package/dist/src/notes/attachment-ref.js +0 -2
  1165. package/dist/src/notes/note-attachment-sync.js +0 -2
  1166. package/dist/src/notes/note-index-meta.js +0 -2
  1167. package/dist/src/notes/note-markdown.js +0 -2
  1168. package/dist/src/notes/paths.js +0 -2
  1169. package/dist/src/notes/service.d.ts +3 -1
  1170. package/dist/src/notes/service.js +19 -5
  1171. package/dist/src/notes/store.js +0 -2
  1172. package/dist/src/package-version.js +0 -2
  1173. package/dist/src/pets/factory.d.ts +13 -0
  1174. package/dist/src/pets/factory.js +23 -2
  1175. package/dist/src/pets/manifest.js +0 -2
  1176. package/dist/src/pets/validator.js +0 -2
  1177. package/dist/src/process/kill-tree.js +0 -2
  1178. package/dist/src/project-trust/trust-store.js +0 -2
  1179. package/dist/src/projects/automation-bind.js +0 -2
  1180. package/dist/src/projects/goal-bind.js +0 -2
  1181. package/dist/src/projects/memory-bind.js +0 -2
  1182. package/dist/src/projects/project-agent-suggestion.js +0 -2
  1183. package/dist/src/projects/project-agent.js +0 -2
  1184. package/dist/src/projects/project-kind.js +0 -2
  1185. package/dist/src/projects/project-loop.js +0 -2
  1186. package/dist/src/projects/project-service.js +0 -2
  1187. package/dist/src/projects/project-store.js +0 -2
  1188. package/dist/src/projects/session-bind.js +0 -2
  1189. package/dist/src/projects/workflow-bind.js +0 -2
  1190. package/dist/src/projects/workspace-project.js +0 -2
  1191. package/dist/src/projects/workspace.js +0 -2
  1192. package/dist/src/providers/auth-runtime/auth-profile-store.js +0 -2
  1193. package/dist/src/providers/auth-runtime/is-configured.js +0 -2
  1194. package/dist/src/providers/auth-runtime/oauth.js +0 -2
  1195. package/dist/src/providers/auth-runtime/resolve-api-key.js +0 -2
  1196. package/dist/src/providers/auth-runtime/resolve-auth.js +0 -2
  1197. package/dist/src/providers/constants.js +0 -2
  1198. package/dist/src/providers/domestic-presets.js +0 -2
  1199. package/dist/src/providers/env-keys.js +0 -2
  1200. package/dist/src/providers/extension-stream-bridge.js +0 -2
  1201. package/dist/src/providers/index.js +0 -2
  1202. package/dist/src/providers/model-call.js +0 -2
  1203. package/dist/src/providers/model-discovery.js +0 -2
  1204. package/dist/src/providers/model-registry.js +0 -2
  1205. package/dist/src/providers/model-supplements.js +0 -2
  1206. package/dist/src/providers/plugin-registry.js +0 -2
  1207. package/dist/src/providers/presentation.js +0 -2
  1208. package/dist/src/remote-access/exposure-guards.js +0 -2
  1209. package/dist/src/remote-access/exposure-manager.js +0 -2
  1210. package/dist/src/review/review-git.js +0 -2
  1211. package/dist/src/review/review-types.js +0 -2
  1212. package/dist/src/routing/account-id.js +0 -2
  1213. package/dist/src/routing/agent-session-key.js +0 -2
  1214. package/dist/src/routing/bindings.js +0 -2
  1215. package/dist/src/routing/index.js +0 -2
  1216. package/dist/src/routing/resolve-route.js +0 -2
  1217. package/dist/src/routing/resolve-tui-session-key.js +0 -2
  1218. package/dist/src/routing/session-key-utils.js +0 -2
  1219. package/dist/src/routing/session-key.js +0 -2
  1220. package/dist/src/session/abort-cutoff.js +0 -2
  1221. package/dist/src/session/chat-export.js +0 -2
  1222. package/dist/src/session/client-history.js +0 -2
  1223. package/dist/src/session/compaction-checkpoints.js +0 -2
  1224. package/dist/src/session/config-store.js +0 -2
  1225. package/dist/src/session/init-session-turn.js +0 -2
  1226. package/dist/src/session/lifecycle-timestamps.js +0 -2
  1227. package/dist/src/session/load-jsonl-entries.js +0 -2
  1228. package/dist/src/session/manager.js +0 -2
  1229. package/dist/src/session/patch-metadata.js +0 -2
  1230. package/dist/src/session/reset-policy.js +0 -2
  1231. package/dist/src/session/reset-triggers.js +0 -2
  1232. package/dist/src/session/reset-type.js +0 -2
  1233. package/dist/src/session/resolve-session.js +0 -2
  1234. package/dist/src/session/session-context-for-llm.js +0 -2
  1235. package/dist/src/session/session-id.js +0 -2
  1236. package/dist/src/session/session-title.js +0 -2
  1237. package/dist/src/session/session-workspace.js +0 -2
  1238. package/dist/src/session/store.js +0 -2
  1239. package/dist/src/session/stored-rows-to-file-entries.js +0 -2
  1240. package/dist/src/session/thinking-resolve.js +0 -2
  1241. package/dist/src/session/transcript-events.js +0 -2
  1242. package/dist/src/session/transcript-format.js +0 -2
  1243. package/dist/src/session/transcript-outline.js +0 -2
  1244. package/dist/src/session/transcript-stats.js +0 -2
  1245. package/dist/src/session/types.js +0 -2
  1246. package/dist/src/session/user-round-delete.js +0 -2
  1247. package/dist/src/share/share-audit.js +0 -2
  1248. package/dist/src/share/share-auto.js +0 -2
  1249. package/dist/src/share/share-config.js +0 -2
  1250. package/dist/src/share/share-landing.js +0 -2
  1251. package/dist/src/share/share-rate-limit.js +0 -2
  1252. package/dist/src/share/share-store.js +0 -2
  1253. package/dist/src/share/share-thumbnail.js +0 -2
  1254. package/dist/src/share/share-types.js +0 -2
  1255. package/dist/src/share/share-url.js +0 -2
  1256. package/dist/src/share/share-zip.js +0 -2
  1257. package/dist/src/share/site-proxy.js +0 -2
  1258. package/dist/src/share/site-share-config.js +0 -2
  1259. package/dist/src/share/site-share-router.js +0 -2
  1260. package/dist/src/share/site-share-store.js +0 -2
  1261. package/dist/src/share/site-share-types.js +0 -2
  1262. package/dist/src/share/site-static-serve.js +0 -2
  1263. package/dist/src/storage/sqlite/activity-repository.js +0 -2
  1264. package/dist/src/storage/sqlite/config-repository.js +0 -2
  1265. package/dist/src/storage/sqlite/connection.js +0 -2
  1266. package/dist/src/storage/sqlite/connector-repository.js +0 -2
  1267. package/dist/src/storage/sqlite/fts.js +0 -2
  1268. package/dist/src/storage/sqlite/knowledge-repository.js +0 -2
  1269. package/dist/src/storage/sqlite/memory-index-repository.js +0 -2
  1270. package/dist/src/storage/sqlite/memory-records-repository.js +0 -2
  1271. package/dist/src/storage/sqlite/memory-reference-consent-repository.js +0 -2
  1272. package/dist/src/storage/sqlite/migrations/discover.js +0 -2
  1273. package/dist/src/storage/sqlite/migrations/errors.js +0 -2
  1274. package/dist/src/storage/sqlite/migrations/runner.js +0 -2
  1275. package/dist/src/storage/sqlite/note-agent-context-repository.js +0 -2
  1276. package/dist/src/storage/sqlite/notes-repository.js +0 -2
  1277. package/dist/src/storage/sqlite/paths.js +0 -2
  1278. package/dist/src/storage/sqlite/row-mappers.js +0 -2
  1279. package/dist/src/storage/sqlite/schema-version.js +0 -2
  1280. package/dist/src/storage/sqlite/schema.js +0 -2
  1281. package/dist/src/storage/sqlite/session-metadata.js +0 -2
  1282. package/dist/src/storage/sqlite/session-repository.js +0 -2
  1283. package/dist/src/storage/sqlite/transaction.js +0 -2
  1284. package/dist/src/storage/sqlite/transcript-repository.js +0 -2
  1285. package/dist/src/storage/sqlite/user-profile-setup-repository.js +0 -2
  1286. package/dist/src/storage/sqlite/user-trust-repository.js +0 -2
  1287. package/dist/src/tui/backends/embedded-backend.js +0 -2
  1288. package/dist/src/tui/backends/gateway-sse-backend.js +0 -2
  1289. package/dist/src/tui/chat-history.js +0 -2
  1290. package/dist/src/tui/clipboard-image.js +0 -2
  1291. package/dist/src/tui/clipboard-text.js +0 -2
  1292. package/dist/src/tui/components/assistant-message.js +0 -2
  1293. package/dist/src/tui/components/bash-execution.js +0 -2
  1294. package/dist/src/tui/components/bash-summary.js +0 -2
  1295. package/dist/src/tui/components/branch-message-summary.js +0 -2
  1296. package/dist/src/tui/components/branch-summary.js +0 -2
  1297. package/dist/src/tui/components/chat-log.js +0 -2
  1298. package/dist/src/tui/components/compaction-summary.js +0 -2
  1299. package/dist/src/tui/components/custom-editor.js +0 -2
  1300. package/dist/src/tui/components/custom-message.js +0 -2
  1301. package/dist/src/tui/components/dynamic-border.js +0 -2
  1302. package/dist/src/tui/components/extension-dialog.js +0 -2
  1303. package/dist/src/tui/components/fuzzy-filter.js +0 -2
  1304. package/dist/src/tui/components/scoped-models-selector.js +0 -2
  1305. package/dist/src/tui/components/searchable-select-list.js +0 -2
  1306. package/dist/src/tui/components/session-selector.js +0 -2
  1307. package/dist/src/tui/components/settings-selector.js +0 -2
  1308. package/dist/src/tui/components/thinking-selector.js +0 -2
  1309. package/dist/src/tui/components/tool-execution.js +0 -2
  1310. package/dist/src/tui/components/tui-bottom-bar.js +0 -2
  1311. package/dist/src/tui/components/tui-header.js +0 -2
  1312. package/dist/src/tui/components/user-message.js +0 -2
  1313. package/dist/src/tui/components/visual-truncate.js +0 -2
  1314. package/dist/src/tui/extension-host/autocomplete.js +0 -2
  1315. package/dist/src/tui/extension-host/host.js +0 -2
  1316. package/dist/src/tui/extension-host/load-extensions.js +0 -2
  1317. package/dist/src/tui/extension-host/runtime-context.js +0 -2
  1318. package/dist/src/tui/extension-host/runtime.js +0 -2
  1319. package/dist/src/tui/extension-host/surface.js +0 -2
  1320. package/dist/src/tui/extension-host/tool-renderers.js +0 -2
  1321. package/dist/src/tui/format-tui-hotkeys.js +0 -2
  1322. package/dist/src/tui/sse-consumer.js +0 -2
  1323. package/dist/src/tui/theme/dark.js +0 -2
  1324. package/dist/src/tui/theme/light.js +0 -2
  1325. package/dist/src/tui/theme-manager.js +0 -2
  1326. package/dist/src/tui/theme.js +0 -2
  1327. package/dist/src/tui/tool-summary.js +0 -2
  1328. package/dist/src/tui/tui-agent-events.js +0 -2
  1329. package/dist/src/tui/tui-command-formatters.js +0 -2
  1330. package/dist/src/tui/tui-commands.js +0 -2
  1331. package/dist/src/tui/tui-context-usage.js +0 -2
  1332. package/dist/src/tui/tui-extension-user-message.js +0 -2
  1333. package/dist/src/tui/tui-fd-path.js +0 -2
  1334. package/dist/src/tui/tui-file-autocomplete.js +0 -2
  1335. package/dist/src/tui/tui-follow-up-queue.js +0 -2
  1336. package/dist/src/tui/tui-git-branch.js +0 -2
  1337. package/dist/src/tui/tui-keybindings-file.js +0 -2
  1338. package/dist/src/tui/tui-lifecycle.js +0 -2
  1339. package/dist/src/tui/tui-local-shell.js +0 -2
  1340. package/dist/src/tui/tui-model-picker.js +0 -2
  1341. package/dist/src/tui/tui-oauth-login.js +0 -2
  1342. package/dist/src/tui/tui-overlays.js +0 -2
  1343. package/dist/src/tui/tui-picker-overlay.js +0 -2
  1344. package/dist/src/tui/tui-run-state.js +0 -2
  1345. package/dist/src/tui/tui-run-status-format.js +0 -2
  1346. package/dist/src/tui/tui-runtime-hints.js +0 -2
  1347. package/dist/src/tui/tui-scoped-models.js +0 -2
  1348. package/dist/src/tui/tui-session-actions.js +0 -2
  1349. package/dist/src/tui/tui-session-format.js +0 -2
  1350. package/dist/src/tui/tui-session-snapshot.js +0 -2
  1351. package/dist/src/tui/tui-session-stats.js +0 -2
  1352. package/dist/src/tui/tui-settings.js +0 -2
  1353. package/dist/src/tui/tui-skills-autocomplete.js +0 -2
  1354. package/dist/src/tui/tui-startup-resources.js +0 -2
  1355. package/dist/src/tui/tui-startup-text.js +0 -2
  1356. package/dist/src/tui/tui-stdio-filter.js +0 -2
  1357. package/dist/src/tui/tui-submit.js +0 -2
  1358. package/dist/src/tui/tui-suspend.js +0 -2
  1359. package/dist/src/tui/tui-timeline-picker.js +0 -2
  1360. package/dist/src/tui/tui-timeline.js +0 -2
  1361. package/dist/src/tui/tui-tool-diff.js +0 -2
  1362. package/dist/src/tui/tui-tool-result.js +0 -2
  1363. package/dist/src/tui/tui-transcript-tree-picker.js +0 -2
  1364. package/dist/src/tui/tui-transcript-tree.js +0 -2
  1365. package/dist/src/tui/tui-types.js +0 -2
  1366. package/dist/src/tui/tui-workflow-slash.js +0 -2
  1367. package/dist/src/tui/tui.js +0 -2
  1368. package/dist/src/tui/xopc-tui-keybindings.js +0 -2
  1369. package/dist/src/tunnel/broker-client.js +0 -2
  1370. package/dist/src/tunnel/consent.js +0 -2
  1371. package/dist/src/tunnel/enable-lan-pairing.js +0 -2
  1372. package/dist/src/tunnel/env.js +0 -2
  1373. package/dist/src/tunnel/frp-subdomain-host.js +0 -2
  1374. package/dist/src/tunnel/frpc-binary.js +0 -2
  1375. package/dist/src/tunnel/frpc-config.js +0 -2
  1376. package/dist/src/tunnel/frpc-extract.js +0 -2
  1377. package/dist/src/tunnel/frpc-process.js +0 -2
  1378. package/dist/src/tunnel/gateway-lifecycle.js +0 -2
  1379. package/dist/src/tunnel/pair-context.js +0 -2
  1380. package/dist/src/tunnel/pair-url.js +0 -2
  1381. package/dist/src/tunnel/pairing-rate-limit.js +0 -2
  1382. package/dist/src/tunnel/pairing.js +0 -2
  1383. package/dist/src/tunnel/tunnel-audit.js +0 -2
  1384. package/dist/src/tunnel/tunnel-config.js +0 -2
  1385. package/dist/src/tunnel/tunnel-persist.js +0 -2
  1386. package/dist/src/tunnel/tunnel-qr.js +0 -2
  1387. package/dist/src/tunnel/tunnel-rate-limit.js +0 -2
  1388. package/dist/src/tunnel/tunnel-service.js +0 -2
  1389. package/dist/src/tunnel/tunnel-state.js +0 -2
  1390. package/dist/src/tunnel/well-known.js +0 -2
  1391. package/dist/src/user-context/config.js +0 -2
  1392. package/dist/src/user-context/import.js +0 -2
  1393. package/dist/src/user-context/owner.js +0 -2
  1394. package/dist/src/user-context/profile.js +0 -2
  1395. package/dist/src/user-context/projection.js +0 -2
  1396. package/dist/src/user-context/runtime.js +0 -2
  1397. package/dist/src/user-context/source-recommendations.js +0 -2
  1398. package/dist/src/user-context/trust-policy.js +0 -2
  1399. package/dist/src/utils/global-singleton.js +0 -2
  1400. package/dist/src/utils/helpers.js +0 -2
  1401. package/dist/src/utils/index.js +0 -2
  1402. package/dist/src/utils/is-record.js +0 -2
  1403. package/dist/src/utils/logger/audit.js +0 -2
  1404. package/dist/src/utils/logger/config.js +0 -2
  1405. package/dist/src/utils/logger/context.js +0 -2
  1406. package/dist/src/utils/logger/exporters.js +0 -2
  1407. package/dist/src/utils/logger/index.js +0 -2
  1408. package/dist/src/utils/logger/log-store.js +0 -2
  1409. package/dist/src/utils/logger/log-stream.js +0 -2
  1410. package/dist/src/utils/logger/pino-record.js +0 -2
  1411. package/dist/src/utils/logger/redact.js +0 -2
  1412. package/dist/src/utils/logger/rotation.js +0 -2
  1413. package/dist/src/utils/logger/shutdown.js +0 -2
  1414. package/dist/src/utils/logger/stats.js +0 -2
  1415. package/dist/src/utils/logger/streams.js +0 -2
  1416. package/dist/src/utils/logger/types.js +0 -2
  1417. package/dist/src/utils/logger.js +0 -2
  1418. package/dist/src/utils/redact-sensitive-url.js +0 -2
  1419. package/dist/src/utils/sanitize-log.js +0 -2
  1420. package/dist/src/utils/string-coerce.js +0 -2
  1421. package/dist/src/voice/language-profile.js +0 -2
  1422. package/dist/src/voice/local/model-files.js +0 -2
  1423. package/dist/src/voice/local/model-manager.js +0 -2
  1424. package/dist/src/voice/local/models.js +0 -2
  1425. package/dist/src/voice/local/runtime-client.js +0 -2
  1426. package/dist/src/voice/local/runtime-dispatcher.js +0 -2
  1427. package/dist/src/voice/local/runtime-worker.js +12 -4
  1428. package/dist/src/voice/local/wav.js +0 -2
  1429. package/dist/src/voice/metadata/builtin.js +0 -2
  1430. package/dist/src/voice/metadata/registry.js +0 -2
  1431. package/dist/src/voice/stt/availability.js +0 -2
  1432. package/dist/src/voice/stt/config-slice.js +0 -2
  1433. package/dist/src/voice/stt/factory.js +0 -2
  1434. package/dist/src/voice/stt/index.js +0 -2
  1435. package/dist/src/voice/stt/list-providers.js +0 -2
  1436. package/dist/src/voice/stt/mention.js +0 -2
  1437. package/dist/src/voice/stt/preflight.js +0 -2
  1438. package/dist/src/voice/stt/providers/alibaba-transcription.js +0 -2
  1439. package/dist/src/voice/stt/providers/local-transcription.js +0 -2
  1440. package/dist/src/voice/stt/providers/openai-transcription.js +0 -2
  1441. package/dist/src/voice/stt/transcribe-core.js +0 -2
  1442. package/dist/src/voice/stt/types.js +0 -2
  1443. package/dist/src/voice/tts/audio.js +0 -2
  1444. package/dist/src/voice/tts/config-slice.js +0 -2
  1445. package/dist/src/voice/tts/directives.js +0 -2
  1446. package/dist/src/voice/tts/factory.js +0 -2
  1447. package/dist/src/voice/tts/list-providers.js +0 -2
  1448. package/dist/src/voice/tts/merge-config.js +0 -2
  1449. package/dist/src/voice/tts/openai-compatible-speech.js +0 -2
  1450. package/dist/src/voice/tts/payload.js +0 -2
  1451. package/dist/src/voice/tts/preprocess.js +0 -2
  1452. package/dist/src/voice/tts/providers/alibaba-speech.js +0 -2
  1453. package/dist/src/voice/tts/providers/edge-speech.js +0 -2
  1454. package/dist/src/voice/tts/providers/minimax-speech.js +0 -2
  1455. package/dist/src/voice/tts/providers/openai-speech.js +0 -2
  1456. package/dist/src/voice/tts/sentence-boundary.js +0 -2
  1457. package/dist/src/voice/tts/service.js +0 -2
  1458. package/dist/src/voice/tts/speak-core.js +0 -2
  1459. package/dist/src/voice/tts/speech-registry.js +0 -2
  1460. package/dist/src/voice/tts/status-tracker.js +0 -2
  1461. package/dist/src/voice/tts/summarize.js +0 -2
  1462. package/dist/src/voice/tts/types.js +0 -2
  1463. package/dist/src/work-discovery/analyzer.js +0 -2
  1464. package/dist/src/work-discovery/probe.js +0 -2
  1465. package/dist/src/work-discovery/repository.js +0 -2
  1466. package/dist/src/work-discovery/service.js +0 -2
  1467. package/dist/src/work-items/agent-context.js +0 -2
  1468. package/dist/src/work-items/work-item-service.js +0 -2
  1469. package/dist/src/work-items/work-item-store.js +0 -2
  1470. package/dist/src/work-items/work-item-workflow-judge.js +0 -2
  1471. package/dist/src/workflows/authoring/workflow-draft-store.js +0 -2
  1472. package/dist/src/workflows/domain/definition-utils.js +0 -2
  1473. package/dist/src/workflows/domain/run.js +0 -2
  1474. package/dist/src/workflows/domain/schema-validation.js +0 -2
  1475. package/dist/src/workflows/domain/validation.js +0 -2
  1476. package/dist/src/workflows/draft/workflow-draft-prompt.js +0 -2
  1477. package/dist/src/workflows/draft/workflow-draft-service.js +0 -2
  1478. package/dist/src/workflows/draft/workflow-draft-validator.js +0 -2
  1479. package/dist/src/workflows/engine/projector.js +0 -2
  1480. package/dist/src/workflows/engine/workflow-engine.js +0 -2
  1481. package/dist/src/workflows/registry/catalog-workflow-definition-registry.js +0 -2
  1482. package/dist/src/workflows/runtime/graph-workflow-runtime.js +0 -2
  1483. package/dist/src/workflows/service/run-view-to-snapshot.js +0 -2
  1484. package/dist/src/workflows/service/workflow-run-service.js +1 -3
  1485. package/dist/src/workflows/service/workflow-session-bridge.js +0 -2
  1486. package/dist/src/workflows/service/workflow-session-key.js +0 -2
  1487. package/dist/src/workflows/store/event-store.js +0 -2
  1488. package/dist/src/workflows/store/paths.js +0 -2
  1489. package/dist/src/workflows/store/run-index-store.js +0 -2
  1490. package/dist/src/workflows/store/run-store.js +0 -2
  1491. package/package.json +43 -12
  1492. package/skills/creative/hatch-pet/SKILL.md +1 -0
  1493. package/dist/extensions/dashscope/src/image-generation-provider.js.map +0 -1
  1494. package/dist/extensions/demo-memory/src/index.js.map +0 -1
  1495. package/dist/extensions/fal/src/image-generation-provider.js.map +0 -1
  1496. package/dist/extensions/feishu/src/actions/message-action-handler.js.map +0 -1
  1497. package/dist/extensions/feishu/src/adapters/cli-login.js.map +0 -1
  1498. package/dist/extensions/feishu/src/adapters/gateway-setup.js.map +0 -1
  1499. package/dist/extensions/feishu/src/adapters/onboard-cli.js.map +0 -1
  1500. package/dist/extensions/feishu/src/auth/app-registration.js.map +0 -1
  1501. package/dist/extensions/feishu/src/auth/pairing.js.map +0 -1
  1502. package/dist/extensions/feishu/src/auth/paths.js.map +0 -1
  1503. package/dist/extensions/feishu/src/directory/directory-adapter.js.map +0 -1
  1504. package/dist/extensions/feishu/src/format.js.map +0 -1
  1505. package/dist/extensions/feishu/src/index.js.map +0 -1
  1506. package/dist/extensions/feishu/src/outbound/actions.js.map +0 -1
  1507. package/dist/extensions/feishu/src/outbound/media-load.js.map +0 -1
  1508. package/dist/extensions/feishu/src/outbound/outbound-adapter.js.map +0 -1
  1509. package/dist/extensions/feishu/src/pairing/feishu-pairing-prompt.js.map +0 -1
  1510. package/dist/extensions/feishu/src/pairing-config-resolver.js.map +0 -1
  1511. package/dist/extensions/feishu/src/plugin.js.map +0 -1
  1512. package/dist/extensions/feishu/src/schema/config-schema.js.map +0 -1
  1513. package/dist/extensions/feishu/src/state/accounts.js.map +0 -1
  1514. package/dist/extensions/feishu/src/state/message-bindings.js.map +0 -1
  1515. package/dist/extensions/feishu/src/state/thread-bindings.js.map +0 -1
  1516. package/dist/extensions/feishu/src/status/doctor.js.map +0 -1
  1517. package/dist/extensions/feishu/src/status/status-adapter.js.map +0 -1
  1518. package/dist/extensions/feishu/src/streaming/streaming-adapter.js.map +0 -1
  1519. package/dist/extensions/feishu/src/subagent-hooks.js.map +0 -1
  1520. package/dist/extensions/feishu/src/tools/docx/docx-batch-insert.js.map +0 -1
  1521. package/dist/extensions/feishu/src/tools/docx/docx-color-text.js.map +0 -1
  1522. package/dist/extensions/feishu/src/tools/docx/docx-table-ops.js.map +0 -1
  1523. package/dist/extensions/feishu/src/tools/tools.js.map +0 -1
  1524. package/dist/extensions/feishu/src/transport/client/client.js.map +0 -1
  1525. package/dist/extensions/feishu/src/transport/client/lark-sdk-logger.js.map +0 -1
  1526. package/dist/extensions/feishu/src/transport/reliability/dedupe.js.map +0 -1
  1527. package/dist/extensions/feishu/src/transport/reliability/inbound-pipeline.js.map +0 -1
  1528. package/dist/extensions/feishu/src/transport/socket-mode/monitor.js.map +0 -1
  1529. package/dist/extensions/feishu/src/transport/socket-mode/retry.js.map +0 -1
  1530. package/dist/extensions/feishu/src/transport/text/mentions.js.map +0 -1
  1531. package/dist/extensions/feishu/src/transport/webhook/monitor.js.map +0 -1
  1532. package/dist/extensions/feishu/src/ui/config-surface.js.map +0 -1
  1533. package/dist/extensions/feishu/src/workflow-progress.js.map +0 -1
  1534. package/dist/extensions/google/src/image-generation-provider.js.map +0 -1
  1535. package/dist/extensions/minimax/src/image-generation-provider.js.map +0 -1
  1536. package/dist/extensions/openai/src/image-generation-provider.js.map +0 -1
  1537. package/dist/extensions/telegram/src/access-control.js.map +0 -1
  1538. package/dist/extensions/telegram/src/account-manager.js.map +0 -1
  1539. package/dist/extensions/telegram/src/actions/message-actions.js.map +0 -1
  1540. package/dist/extensions/telegram/src/adapters/command-adapter.js.map +0 -1
  1541. package/dist/extensions/telegram/src/adapters/config-adapter.js.map +0 -1
  1542. package/dist/extensions/telegram/src/adapters/debounce-keys.js.map +0 -1
  1543. package/dist/extensions/telegram/src/adapters/gateway-adapter.js.map +0 -1
  1544. package/dist/extensions/telegram/src/adapters/gateway-setup.js.map +0 -1
  1545. package/dist/extensions/telegram/src/adapters/inbound-access.js.map +0 -1
  1546. package/dist/extensions/telegram/src/adapters/index.js.map +0 -1
  1547. package/dist/extensions/telegram/src/adapters/onboard-cli.js.map +0 -1
  1548. package/dist/extensions/telegram/src/adapters/outbound-adapter.js.map +0 -1
  1549. package/dist/extensions/telegram/src/adapters/security-adapter.js.map +0 -1
  1550. package/dist/extensions/telegram/src/adapters/setup-wizard.js.map +0 -1
  1551. package/dist/extensions/telegram/src/adapters/status-adapter.js.map +0 -1
  1552. package/dist/extensions/telegram/src/adapters/streaming-adapter.js.map +0 -1
  1553. package/dist/extensions/telegram/src/api-root.js.map +0 -1
  1554. package/dist/extensions/telegram/src/approval-delivery.js.map +0 -1
  1555. package/dist/extensions/telegram/src/approval-store.js.map +0 -1
  1556. package/dist/extensions/telegram/src/caption.js.map +0 -1
  1557. package/dist/extensions/telegram/src/command-handler.js.map +0 -1
  1558. package/dist/extensions/telegram/src/config-schema.js.map +0 -1
  1559. package/dist/extensions/telegram/src/conversation-id.js.map +0 -1
  1560. package/dist/extensions/telegram/src/dedupe.js.map +0 -1
  1561. package/dist/extensions/telegram/src/delivery-chat-id.js.map +0 -1
  1562. package/dist/extensions/telegram/src/doctor.js.map +0 -1
  1563. package/dist/extensions/telegram/src/draft-stream-lifecycle.js.map +0 -1
  1564. package/dist/extensions/telegram/src/draft-stream-loop.js.map +0 -1
  1565. package/dist/extensions/telegram/src/draft-stream.js.map +0 -1
  1566. package/dist/extensions/telegram/src/errors.js.map +0 -1
  1567. package/dist/extensions/telegram/src/exec-approval-handler.js.map +0 -1
  1568. package/dist/extensions/telegram/src/exec-approvals.js.map +0 -1
  1569. package/dist/extensions/telegram/src/focus-handler.js.map +0 -1
  1570. package/dist/extensions/telegram/src/format.js.map +0 -1
  1571. package/dist/extensions/telegram/src/group-config-resolver.js.map +0 -1
  1572. package/dist/extensions/telegram/src/inbound-coalescer.js.map +0 -1
  1573. package/dist/extensions/telegram/src/inbound-processor.js.map +0 -1
  1574. package/dist/extensions/telegram/src/index.js.map +0 -1
  1575. package/dist/extensions/telegram/src/inline-keyboards.js.map +0 -1
  1576. package/dist/extensions/telegram/src/network-errors.js.map +0 -1
  1577. package/dist/extensions/telegram/src/outbound-sender.js.map +0 -1
  1578. package/dist/extensions/telegram/src/pairing-config-resolver.js.map +0 -1
  1579. package/dist/extensions/telegram/src/plugin-defaults.js.map +0 -1
  1580. package/dist/extensions/telegram/src/plugin.js.map +0 -1
  1581. package/dist/extensions/telegram/src/polling-session.js.map +0 -1
  1582. package/dist/extensions/telegram/src/proxy-fetch.js.map +0 -1
  1583. package/dist/extensions/telegram/src/reactions.js.map +0 -1
  1584. package/dist/extensions/telegram/src/reply-params.js.map +0 -1
  1585. package/dist/extensions/telegram/src/routing-integration.js.map +0 -1
  1586. package/dist/extensions/telegram/src/send-options.js.map +0 -1
  1587. package/dist/extensions/telegram/src/sent-cache.js.map +0 -1
  1588. package/dist/extensions/telegram/src/startup-errors.js.map +0 -1
  1589. package/dist/extensions/telegram/src/telegram-actions.js.map +0 -1
  1590. package/dist/extensions/telegram/src/telegram-draft-errors.js.map +0 -1
  1591. package/dist/extensions/telegram/src/thread-bindings.js.map +0 -1
  1592. package/dist/extensions/telegram/src/timeout-abort.js.map +0 -1
  1593. package/dist/extensions/telegram/src/token-resolver.js.map +0 -1
  1594. package/dist/extensions/telegram/src/update-offset-store.js.map +0 -1
  1595. package/dist/extensions/telegram/src/workflow-progress.js.map +0 -1
  1596. package/dist/extensions/weixin/src/adapters/onboard-cli.js.map +0 -1
  1597. package/dist/extensions/weixin/src/api/api.js.map +0 -1
  1598. package/dist/extensions/weixin/src/api/config-cache.js.map +0 -1
  1599. package/dist/extensions/weixin/src/api/session-guard.js.map +0 -1
  1600. package/dist/extensions/weixin/src/api/types.js.map +0 -1
  1601. package/dist/extensions/weixin/src/auth/accounts.js.map +0 -1
  1602. package/dist/extensions/weixin/src/auth/login-qr.js.map +0 -1
  1603. package/dist/extensions/weixin/src/auth/pairing.js.map +0 -1
  1604. package/dist/extensions/weixin/src/auth/weixin-account-id.js.map +0 -1
  1605. package/dist/extensions/weixin/src/cdn/aes-ecb.js.map +0 -1
  1606. package/dist/extensions/weixin/src/cdn/cdn-upload.js.map +0 -1
  1607. package/dist/extensions/weixin/src/cdn/cdn-url.js.map +0 -1
  1608. package/dist/extensions/weixin/src/cdn/pic-decrypt.js.map +0 -1
  1609. package/dist/extensions/weixin/src/cdn/upload.js.map +0 -1
  1610. package/dist/extensions/weixin/src/cli/gateway-qr-login.js.map +0 -1
  1611. package/dist/extensions/weixin/src/cli/qr-login.js.map +0 -1
  1612. package/dist/extensions/weixin/src/config-schema.js.map +0 -1
  1613. package/dist/extensions/weixin/src/config-surface.js.map +0 -1
  1614. package/dist/extensions/weixin/src/delivery-to.js.map +0 -1
  1615. package/dist/extensions/weixin/src/index.js.map +0 -1
  1616. package/dist/extensions/weixin/src/media/data-url.js.map +0 -1
  1617. package/dist/extensions/weixin/src/media/media-download.js.map +0 -1
  1618. package/dist/extensions/weixin/src/media/mime.js.map +0 -1
  1619. package/dist/extensions/weixin/src/media/silk-transcode.js.map +0 -1
  1620. package/dist/extensions/weixin/src/messaging/context-token-init.js.map +0 -1
  1621. package/dist/extensions/weixin/src/messaging/debug-mode.js.map +0 -1
  1622. package/dist/extensions/weixin/src/messaging/error-notice.js.map +0 -1
  1623. package/dist/extensions/weixin/src/messaging/inbound.js.map +0 -1
  1624. package/dist/extensions/weixin/src/messaging/markdown-filter.js.map +0 -1
  1625. package/dist/extensions/weixin/src/messaging/process-message.js.map +0 -1
  1626. package/dist/extensions/weixin/src/messaging/send-media.js.map +0 -1
  1627. package/dist/extensions/weixin/src/messaging/send.js.map +0 -1
  1628. package/dist/extensions/weixin/src/messaging/slash-commands.js.map +0 -1
  1629. package/dist/extensions/weixin/src/messaging/typing-ticket-store.js.map +0 -1
  1630. package/dist/extensions/weixin/src/monitor/monitor.js.map +0 -1
  1631. package/dist/extensions/weixin/src/outbound-send.js.map +0 -1
  1632. package/dist/extensions/weixin/src/pairing-config-resolver.js.map +0 -1
  1633. package/dist/extensions/weixin/src/plugin.js.map +0 -1
  1634. package/dist/extensions/weixin/src/routing-integration.js.map +0 -1
  1635. package/dist/extensions/weixin/src/storage/state-dir.js.map +0 -1
  1636. package/dist/extensions/weixin/src/storage/sync-buf.js.map +0 -1
  1637. package/dist/extensions/weixin/src/util/logger.js.map +0 -1
  1638. package/dist/extensions/weixin/src/util/random.js.map +0 -1
  1639. package/dist/extensions/weixin/src/util/redact.js.map +0 -1
  1640. package/dist/extensions/weixin/src/workflow-progress.js.map +0 -1
  1641. package/dist/gateway/static/root/assets/agents-DZDOcgz5.js +0 -2
  1642. package/dist/gateway/static/root/assets/appearance-settings-BNasnY9D.js +0 -1
  1643. package/dist/gateway/static/root/assets/apps-page-Cmr-Hvm9.js +0 -1
  1644. package/dist/gateway/static/root/assets/automations-page-TWgUAI8t.js +0 -6
  1645. package/dist/gateway/static/root/assets/browser-settings-page-DBsFItW_.js +0 -8
  1646. package/dist/gateway/static/root/assets/channels-settings-BBkzrBYy.js +0 -1
  1647. package/dist/gateway/static/root/assets/channels-status-swr-CuU6ez3y.js +0 -1
  1648. package/dist/gateway/static/root/assets/connectors-page-DLsZCAw7.js +0 -2
  1649. package/dist/gateway/static/root/assets/desktop-pet-C6V-PHwi.js +0 -1
  1650. package/dist/gateway/static/root/assets/desktop-pet-settings-5Fcz47XQ.js +0 -1
  1651. package/dist/gateway/static/root/assets/gateway-settings-BrxzyVW2.js +0 -1
  1652. package/dist/gateway/static/root/assets/goal-create-dialog-DRVRLc5Z.js +0 -1
  1653. package/dist/gateway/static/root/assets/goal-detail-page-8F7NElzP.js +0 -4
  1654. package/dist/gateway/static/root/assets/goals-page-BaoLiV8G.js +0 -2
  1655. package/dist/gateway/static/root/assets/index-CH7XN6KY.js +0 -259
  1656. package/dist/gateway/static/root/assets/index-Dfnl9tp_.css +0 -1
  1657. package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-BHnh5OoY.js +0 -1
  1658. package/dist/gateway/static/root/assets/local-app-workbench-page-Boe8n4zH.js +0 -2
  1659. package/dist/gateway/static/root/assets/locale-store-BneNAR8R.js +0 -1
  1660. package/dist/gateway/static/root/assets/logs-page-Cb4Uptct.js +0 -7
  1661. package/dist/gateway/static/root/assets/messages-t1yPaVCt.js +0 -5
  1662. package/dist/gateway/static/root/assets/models-hub-panel-CNiUKZUV.js +0 -2
  1663. package/dist/gateway/static/root/assets/notes-workbench-C9__VkD6.js +0 -4
  1664. package/dist/gateway/static/root/assets/project-detail-page-CZhuB5kO.js +0 -1
  1665. package/dist/gateway/static/root/assets/projects-page-BOq4WVdR.js +0 -1
  1666. package/dist/gateway/static/root/assets/remote-access-hub-BxGq0ebQ.js +0 -1
  1667. package/dist/gateway/static/root/assets/sessions-page-B6gSU_Au.js +0 -1
  1668. package/dist/gateway/static/root/assets/settings-advanced-gate-DwuBL834.js +0 -1
  1669. package/dist/gateway/static/root/assets/settings-loading-skeleton-vitElc-n.js +0 -1
  1670. package/dist/gateway/static/root/assets/setup-status-panel-BJeA4mmk.js +0 -1
  1671. package/dist/gateway/static/root/assets/shares-settings-DB2KYA2_.js +0 -1
  1672. package/dist/gateway/static/root/assets/skill-reload-api-DQtZiejw.js +0 -1
  1673. package/dist/gateway/static/root/assets/skills-page-Pm0fNe_p.js +0 -2
  1674. package/dist/gateway/static/root/assets/user-context-page-DnLqQyRG.js +0 -1
  1675. package/dist/gateway/static/root/assets/voice-api-key-field-BiFIIWC4.js +0 -1
  1676. package/dist/gateway/static/root/assets/work-discovery-page-D2-_bC0J.js +0 -1
  1677. package/dist/gateway/static/root/assets/work-item-detail-page-B0FPG4eJ.js +0 -1
  1678. package/dist/gateway/static/root/assets/work-page-BDeVxts_.js +0 -1
  1679. package/dist/gateway/static/root/assets/workflow-run-setup-panel-BPzS67fU.js +0 -3
  1680. package/dist/gateway/static/root/assets/workflows-page-xPhmrRLs.js +0 -11
  1681. package/dist/gateway/static/root/favicon-icon.svg +0 -187
  1682. package/dist/package.js.map +0 -1
  1683. package/dist/src/activity/context.js.map +0 -1
  1684. package/dist/src/activity/emitter.js.map +0 -1
  1685. package/dist/src/activity/service.js.map +0 -1
  1686. package/dist/src/agent/agent-manager.js.map +0 -1
  1687. package/dist/src/agent/agent-scope.js.map +0 -1
  1688. package/dist/src/agent/background-review/coordinator.js.map +0 -1
  1689. package/dist/src/agent/background-review/prompts.js.map +0 -1
  1690. package/dist/src/agent/background-review/run-background-review.js.map +0 -1
  1691. package/dist/src/agent/background-review/settings.js.map +0 -1
  1692. package/dist/src/agent/bootstrap/bootstrap-cache.js.map +0 -1
  1693. package/dist/src/agent/bootstrap/bootstrap-context.js.map +0 -1
  1694. package/dist/src/agent/bootstrap/bootstrap-files.js.map +0 -1
  1695. package/dist/src/agent/bootstrap/filter-bootstrap-files.js.map +0 -1
  1696. package/dist/src/agent/bootstrap/load-bootstrap-files.js.map +0 -1
  1697. package/dist/src/agent/bootstrap/project-agents-context.js.map +0 -1
  1698. package/dist/src/agent/capabilities/definitions.js.map +0 -1
  1699. package/dist/src/agent/capabilities/registry.js.map +0 -1
  1700. package/dist/src/agent/child-agent-factory.js.map +0 -1
  1701. package/dist/src/agent/client-error-format.js.map +0 -1
  1702. package/dist/src/agent/code-intelligence/binary.js.map +0 -1
  1703. package/dist/src/agent/code-intelligence/runtime.js.map +0 -1
  1704. package/dist/src/agent/code-intelligence/tools.js.map +0 -1
  1705. package/dist/src/agent/coding/turn-diff-tracker.js.map +0 -1
  1706. package/dist/src/agent/context/expand-at-file-mentions.js.map +0 -1
  1707. package/dist/src/agent/context/project-context.js.map +0 -1
  1708. package/dist/src/agent/context/workspace-seed.js.map +0 -1
  1709. package/dist/src/agent/context/workspace-state.js.map +0 -1
  1710. package/dist/src/agent/context/workspace.js.map +0 -1
  1711. package/dist/src/agent/embedded/run-for-session.js.map +0 -1
  1712. package/dist/src/agent/embedded/run-turn.js.map +0 -1
  1713. package/dist/src/agent/embedded/runs.js.map +0 -1
  1714. package/dist/src/agent/embedded/session-manager-init.js.map +0 -1
  1715. package/dist/src/agent/embedded/session-runner.js.map +0 -1
  1716. package/dist/src/agent/embedded/session-tool-result-guard.js.map +0 -1
  1717. package/dist/src/agent/embedded/sqlite-hydrating-session-manager.js.map +0 -1
  1718. package/dist/src/agent/embedded/subscribe-session.js.map +0 -1
  1719. package/dist/src/agent/embedded/system-prompt-override.js.map +0 -1
  1720. package/dist/src/agent/embedded/tool-result-context-guard.js.map +0 -1
  1721. package/dist/src/agent/embedded/tool-result-truncation.js.map +0 -1
  1722. package/dist/src/agent/embedded/xopc-auth-storage.js.map +0 -1
  1723. package/dist/src/agent/embedded/xopc-stream-bridge.js.map +0 -1
  1724. package/dist/src/agent/embedded/xopc-tools-bridge.js.map +0 -1
  1725. package/dist/src/agent/failover-error.js.map +0 -1
  1726. package/dist/src/agent/fallback/candidates.js.map +0 -1
  1727. package/dist/src/agent/fallback/reason.js.map +0 -1
  1728. package/dist/src/agent/feedback/feedback-coordinator.js.map +0 -1
  1729. package/dist/src/agent/goals/checklist-judge.js.map +0 -1
  1730. package/dist/src/agent/goals/checklist-types.js.map +0 -1
  1731. package/dist/src/agent/goals/evaluate-turn.js.map +0 -1
  1732. package/dist/src/agent/goals/goal-locale.js.map +0 -1
  1733. package/dist/src/agent/goals/judge.js.map +0 -1
  1734. package/dist/src/agent/goals/persistent-goal-service.js.map +0 -1
  1735. package/dist/src/agent/goals/post-turn.js.map +0 -1
  1736. package/dist/src/agent/goals/state.js.map +0 -1
  1737. package/dist/src/agent/image/generation/bundled-registry.js.map +0 -1
  1738. package/dist/src/agent/image/generation/bundled.js.map +0 -1
  1739. package/dist/src/agent/image/generation/image-assets.js.map +0 -1
  1740. package/dist/src/agent/image/generation/model-ref.js.map +0 -1
  1741. package/dist/src/agent/image/generation/normalization.js.map +0 -1
  1742. package/dist/src/agent/image/generation/openai-compatible-image-provider.js.map +0 -1
  1743. package/dist/src/agent/image/generation/provider-registry.js.map +0 -1
  1744. package/dist/src/agent/image/generation/runtime.js.map +0 -1
  1745. package/dist/src/agent/image/image-helpers.js.map +0 -1
  1746. package/dist/src/agent/image/image-model-fallback.js.map +0 -1
  1747. package/dist/src/agent/image/inbound-image-handling.js.map +0 -1
  1748. package/dist/src/agent/image/load-image-media.js.map +0 -1
  1749. package/dist/src/agent/image/tool-model-config.js.map +0 -1
  1750. package/dist/src/agent/image/understanding/pi-ai-provider.js.map +0 -1
  1751. package/dist/src/agent/image/understanding/provider-registry.js.map +0 -1
  1752. package/dist/src/agent/image/understanding/runtime.js.map +0 -1
  1753. package/dist/src/agent/image/vision-detection.js.map +0 -1
  1754. package/dist/src/agent/inbound/attachment-pipeline.js.map +0 -1
  1755. package/dist/src/agent/inbound/inbound-loop.js.map +0 -1
  1756. package/dist/src/agent/inbound/turn-dispatcher.js.map +0 -1
  1757. package/dist/src/agent/ipc/bus.js.map +0 -1
  1758. package/dist/src/agent/ipc/inbox.js.map +0 -1
  1759. package/dist/src/agent/ipc/socket.js.map +0 -1
  1760. package/dist/src/agent/ipc/types.js.map +0 -1
  1761. package/dist/src/agent/lifecycle/handlers/compaction.js.map +0 -1
  1762. package/dist/src/agent/lifecycle/hook-handler.js.map +0 -1
  1763. package/dist/src/agent/lifecycle/manager.js.map +0 -1
  1764. package/dist/src/agent/lifecycle/progress.js.map +0 -1
  1765. package/dist/src/agent/lifecycle/timeout-wrapper.js.map +0 -1
  1766. package/dist/src/agent/lifecycle/typing.js.map +0 -1
  1767. package/dist/src/agent/mcp/bundle-mcp-config.js.map +0 -1
  1768. package/dist/src/agent/mcp/bundle-mcp-materialize.js.map +0 -1
  1769. package/dist/src/agent/mcp/bundle-mcp-names.js.map +0 -1
  1770. package/dist/src/agent/mcp/bundle-mcp-policy.js.map +0 -1
  1771. package/dist/src/agent/mcp/bundle-mcp-runtime.js.map +0 -1
  1772. package/dist/src/agent/mcp/embedded-mcp.js.map +0 -1
  1773. package/dist/src/agent/mcp/mcp-config-shared.js.map +0 -1
  1774. package/dist/src/agent/mcp/mcp-http.js.map +0 -1
  1775. package/dist/src/agent/mcp/mcp-stdio-transport.js.map +0 -1
  1776. package/dist/src/agent/mcp/mcp-stdio.js.map +0 -1
  1777. package/dist/src/agent/mcp/mcp-tool-meta.js.map +0 -1
  1778. package/dist/src/agent/mcp/mcp-transport-config.js.map +0 -1
  1779. package/dist/src/agent/mcp/mcp-transport.js.map +0 -1
  1780. package/dist/src/agent/mcp/resolve-embedded-mcp-tools.js.map +0 -1
  1781. package/dist/src/agent/media-generation/model-ref.js.map +0 -1
  1782. package/dist/src/agent/media-generation/normalization.types.js.map +0 -1
  1783. package/dist/src/agent/media-generation/runtime-shared.js.map +0 -1
  1784. package/dist/src/agent/memory/agent-message-access.js.map +0 -1
  1785. package/dist/src/agent/memory/builtin-memory-store.js.map +0 -1
  1786. package/dist/src/agent/memory/builtin-provider.js.map +0 -1
  1787. package/dist/src/agent/memory/compaction.js.map +0 -1
  1788. package/dist/src/agent/memory/context/planner.js.map +0 -1
  1789. package/dist/src/agent/memory/context-fence.js.map +0 -1
  1790. package/dist/src/agent/memory/create-memory-manager.js.map +0 -1
  1791. package/dist/src/agent/memory/dreaming/config.js.map +0 -1
  1792. package/dist/src/agent/memory/dreaming/constants.js.map +0 -1
  1793. package/dist/src/agent/memory/dreaming/deep-promotion.js.map +0 -1
  1794. package/dist/src/agent/memory/dreaming/events.js.map +0 -1
  1795. package/dist/src/agent/memory/dreaming/last-run.js.map +0 -1
  1796. package/dist/src/agent/memory/dreaming/light-sweep.js.map +0 -1
  1797. package/dist/src/agent/memory/dreaming/preview.js.map +0 -1
  1798. package/dist/src/agent/memory/dreaming/promotion-lifecycle.js.map +0 -1
  1799. package/dist/src/agent/memory/dreaming/rem-patterns.js.map +0 -1
  1800. package/dist/src/agent/memory/dreaming/scope.js.map +0 -1
  1801. package/dist/src/agent/memory/dreaming/short-term-store.js.map +0 -1
  1802. package/dist/src/agent/memory/dreaming/utils.js.map +0 -1
  1803. package/dist/src/agent/memory/lifecycle.js.map +0 -1
  1804. package/dist/src/agent/memory/manager.js.map +0 -1
  1805. package/dist/src/agent/memory/memory-config.js.map +0 -1
  1806. package/dist/src/agent/memory/message-sanitizer.js.map +0 -1
  1807. package/dist/src/agent/memory/plugin-discovery.js.map +0 -1
  1808. package/dist/src/agent/memory/sensitivity.js.map +0 -1
  1809. package/dist/src/agent/memory/source-origin.js.map +0 -1
  1810. package/dist/src/agent/memory/stub-memory-provider.js.map +0 -1
  1811. package/dist/src/agent/memory/summary-generator.js.map +0 -1
  1812. package/dist/src/agent/memory/understanding/correction.js.map +0 -1
  1813. package/dist/src/agent/memory/understanding/quality.js.map +0 -1
  1814. package/dist/src/agent/memory/understanding/service.js.map +0 -1
  1815. package/dist/src/agent/memory/user-context-coordinator.js.map +0 -1
  1816. package/dist/src/agent/memory/user-message-text.js.map +0 -1
  1817. package/dist/src/agent/memory/window.js.map +0 -1
  1818. package/dist/src/agent/messaging/command-handler.js.map +0 -1
  1819. package/dist/src/agent/messaging/message-router.js.map +0 -1
  1820. package/dist/src/agent/messaging/outbound-coordinator.js.map +0 -1
  1821. package/dist/src/agent/messaging/stream-manager.js.map +0 -1
  1822. package/dist/src/agent/middleware/context.js.map +0 -1
  1823. package/dist/src/agent/middleware/self-verify.js.map +0 -1
  1824. package/dist/src/agent/models/manager.js.map +0 -1
  1825. package/dist/src/agent/models/request-limiter.js.map +0 -1
  1826. package/dist/src/agent/models/selection.js.map +0 -1
  1827. package/dist/src/agent/orchestration/agent-event-handler.js.map +0 -1
  1828. package/dist/src/agent/orchestration/agent-orchestrator.js.map +0 -1
  1829. package/dist/src/agent/orchestration/llm-turn-retry.js.map +0 -1
  1830. package/dist/src/agent/orchestration/loop-guard.js.map +0 -1
  1831. package/dist/src/agent/orchestration/run-agent-turn-with-timeout.js.map +0 -1
  1832. package/dist/src/agent/prompt/cache-boundary.js.map +0 -1
  1833. package/dist/src/agent/prompt/memory/index.js.map +0 -1
  1834. package/dist/src/agent/prompt/safety.js.map +0 -1
  1835. package/dist/src/agent/prompt/sanitize-for-prompt.js.map +0 -1
  1836. package/dist/src/agent/prompt/sections/behavior.js.map +0 -1
  1837. package/dist/src/agent/prompt/sections/memory-skills.js.map +0 -1
  1838. package/dist/src/agent/prompt/sections/messaging-runtime.js.map +0 -1
  1839. package/dist/src/agent/prompt/sections/project-context.js.map +0 -1
  1840. package/dist/src/agent/prompt/sections/tooling.js.map +0 -1
  1841. package/dist/src/agent/prompt/sections/workspace-runtime.js.map +0 -1
  1842. package/dist/src/agent/prompt/service-prompt-builder.js.map +0 -1
  1843. package/dist/src/agent/prompt/subagent-context.js.map +0 -1
  1844. package/dist/src/agent/prompt/system-prompt-params.js.map +0 -1
  1845. package/dist/src/agent/prompt/system-prompt.js.map +0 -1
  1846. package/dist/src/agent/prompt/system-reminder.js.map +0 -1
  1847. package/dist/src/agent/reply/apply-turn-user-enrichment.js.map +0 -1
  1848. package/dist/src/agent/reply/post-compaction-context.js.map +0 -1
  1849. package/dist/src/agent/reply/startup-context.js.map +0 -1
  1850. package/dist/src/agent/reply/workspace-boundary-read.js.map +0 -1
  1851. package/dist/src/agent/sandbox/command-validator.js.map +0 -1
  1852. package/dist/src/agent/sandbox/exec-policy.js.map +0 -1
  1853. package/dist/src/agent/sandbox/path-policy.js.map +0 -1
  1854. package/dist/src/agent/sandbox/sanitize-env-vars.js.map +0 -1
  1855. package/dist/src/agent/sandbox/types.js.map +0 -1
  1856. package/dist/src/agent/service/async-queue.js.map +0 -1
  1857. package/dist/src/agent/service/btw-query.js.map +0 -1
  1858. package/dist/src/agent/service/build-direct-message-content.js.map +0 -1
  1859. package/dist/src/agent/service/direct-turn-helpers.js.map +0 -1
  1860. package/dist/src/agent/service/parse-outbound-session-key.js.map +0 -1
  1861. package/dist/src/agent/service/process-direct-one-shot.js.map +0 -1
  1862. package/dist/src/agent/service/process-direct-streaming.js.map +0 -1
  1863. package/dist/src/agent/service/session-context-report.js.map +0 -1
  1864. package/dist/src/agent/service/webchat-tts.js.map +0 -1
  1865. package/dist/src/agent/service-inbound-utils.js.map +0 -1
  1866. package/dist/src/agent/service.js.map +0 -1
  1867. package/dist/src/agent/session/session-config-service.js.map +0 -1
  1868. package/dist/src/agent/session/session-context.js.map +0 -1
  1869. package/dist/src/agent/session/session-hydrator.js.map +0 -1
  1870. package/dist/src/agent/session/session-inspector.js.map +0 -1
  1871. package/dist/src/agent/session/session-lifecycle.js.map +0 -1
  1872. package/dist/src/agent/session/session-state-bag.js.map +0 -1
  1873. package/dist/src/agent/session/tracker.js.map +0 -1
  1874. package/dist/src/agent/skills/config.js.map +0 -1
  1875. package/dist/src/agent/skills/filesystem-watcher.js.map +0 -1
  1876. package/dist/src/agent/skills/format-skills-prompt.js.map +0 -1
  1877. package/dist/src/agent/skills/hub-hash.js.map +0 -1
  1878. package/dist/src/agent/skills/hub-lock.js.map +0 -1
  1879. package/dist/src/agent/skills/hub-pull.js.map +0 -1
  1880. package/dist/src/agent/skills/index.js.map +0 -1
  1881. package/dist/src/agent/skills/install-target.js.map +0 -1
  1882. package/dist/src/agent/skills/installer.js.map +0 -1
  1883. package/dist/src/agent/skills/managed-store.js.map +0 -1
  1884. package/dist/src/agent/skills/marketplace/adapters/clawhub/adapter.js.map +0 -1
  1885. package/dist/src/agent/skills/marketplace/adapters/skillhub/adapter.js.map +0 -1
  1886. package/dist/src/agent/skills/marketplace/adapters/store/adapter.js.map +0 -1
  1887. package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js.map +0 -1
  1888. package/dist/src/agent/skills/marketplace/marketplace-category-order.js.map +0 -1
  1889. package/dist/src/agent/skills/marketplace/registry.js.map +0 -1
  1890. package/dist/src/agent/skills/marketplace/resolve-adapter.js.map +0 -1
  1891. package/dist/src/agent/skills/parse-skill-metadata.js.map +0 -1
  1892. package/dist/src/agent/skills/required-env-vars.js.map +0 -1
  1893. package/dist/src/agent/skills/scanner.js.map +0 -1
  1894. package/dist/src/agent/skills/skill-manage-ops.js.map +0 -1
  1895. package/dist/src/agent/skills/skill-manager.js.map +0 -1
  1896. package/dist/src/agent/skills/skill-markdown-preview-from-raw.js.map +0 -1
  1897. package/dist/src/agent/skills/skill-tool-gating.js.map +0 -1
  1898. package/dist/src/agent/skills/skill-view-path.js.map +0 -1
  1899. package/dist/src/agent/skills/skills-marketplace.js.map +0 -1
  1900. package/dist/src/agent/skills/test-framework.js.map +0 -1
  1901. package/dist/src/agent/skills/watcher.js.map +0 -1
  1902. package/dist/src/agent/skills/workspace-skills-dir.js.map +0 -1
  1903. package/dist/src/agent/source-context/injector.js.map +0 -1
  1904. package/dist/src/agent/source-context/types.js.map +0 -1
  1905. package/dist/src/agent/starter-agents.js.map +0 -1
  1906. package/dist/src/agent/streaming/reasoning-visibility-sse.js.map +0 -1
  1907. package/dist/src/agent/tool-manuals/browser.js.map +0 -1
  1908. package/dist/src/agent/tool-manuals/index.js.map +0 -1
  1909. package/dist/src/agent/tool-manuals/xopc-use.js.map +0 -1
  1910. package/dist/src/agent/tools/apply-patch.js.map +0 -1
  1911. package/dist/src/agent/tools/automation-tool.js.map +0 -1
  1912. package/dist/src/agent/tools/browser/tool/browser-use-tool.js.map +0 -1
  1913. package/dist/src/agent/tools/browser/tool/schemas.js.map +0 -1
  1914. package/dist/src/agent/tools/chain-tracker.js.map +0 -1
  1915. package/dist/src/agent/tools/clarify-tool.js.map +0 -1
  1916. package/dist/src/agent/tools/cli-clarify.js.map +0 -1
  1917. package/dist/src/agent/tools/communication.js.map +0 -1
  1918. package/dist/src/agent/tools/composio-tool.js.map +0 -1
  1919. package/dist/src/agent/tools/concurrency.js.map +0 -1
  1920. package/dist/src/agent/tools/create-share-tool.js.map +0 -1
  1921. package/dist/src/agent/tools/curated-memory-tool.js.map +0 -1
  1922. package/dist/src/agent/tools/delegate-tool.js.map +0 -1
  1923. package/dist/src/agent/tools/desktop-pet-tool.js.map +0 -1
  1924. package/dist/src/agent/tools/dreaming-tool.js.map +0 -1
  1925. package/dist/src/agent/tools/edit-diff.js.map +0 -1
  1926. package/dist/src/agent/tools/error-pattern-matcher.js.map +0 -1
  1927. package/dist/src/agent/tools/error-tracker.js.map +0 -1
  1928. package/dist/src/agent/tools/exec-command.js.map +0 -1
  1929. package/dist/src/agent/tools/execute-code-tool.js.map +0 -1
  1930. package/dist/src/agent/tools/executor.js.map +0 -1
  1931. package/dist/src/agent/tools/factory.js.map +0 -1
  1932. package/dist/src/agent/tools/find.js.map +0 -1
  1933. package/dist/src/agent/tools/goal-evidence-recorder.js.map +0 -1
  1934. package/dist/src/agent/tools/goal-tool.js.map +0 -1
  1935. package/dist/src/agent/tools/grep.js.map +0 -1
  1936. package/dist/src/agent/tools/image-generate-tool.js.map +0 -1
  1937. package/dist/src/agent/tools/image-tool.js.map +0 -1
  1938. package/dist/src/agent/tools/list-dir.js.map +0 -1
  1939. package/dist/src/agent/tools/media-read-tool.js.map +0 -1
  1940. package/dist/src/agent/tools/memory-tool.js.map +0 -1
  1941. package/dist/src/agent/tools/metadata.js.map +0 -1
  1942. package/dist/src/agent/tools/read.js.map +0 -1
  1943. package/dist/src/agent/tools/search/http.js.map +0 -1
  1944. package/dist/src/agent/tools/search/providers/bing-api.js.map +0 -1
  1945. package/dist/src/agent/tools/search/providers/bing-html.js.map +0 -1
  1946. package/dist/src/agent/tools/search/providers/brave.js.map +0 -1
  1947. package/dist/src/agent/tools/search/providers/duckduckgo-html.js.map +0 -1
  1948. package/dist/src/agent/tools/search/providers/searxng.js.map +0 -1
  1949. package/dist/src/agent/tools/search/providers/tavily.js.map +0 -1
  1950. package/dist/src/agent/tools/search/region.js.map +0 -1
  1951. package/dist/src/agent/tools/search/registry.js.map +0 -1
  1952. package/dist/src/agent/tools/search/resolve-config.js.map +0 -1
  1953. package/dist/src/agent/tools/send-media.js.map +0 -1
  1954. package/dist/src/agent/tools/session-search-tool.js.map +0 -1
  1955. package/dist/src/agent/tools/session-status-tool.js.map +0 -1
  1956. package/dist/src/agent/tools/skill-install-tool.js.map +0 -1
  1957. package/dist/src/agent/tools/skill-manage-tool.js.map +0 -1
  1958. package/dist/src/agent/tools/skills-tools.js.map +0 -1
  1959. package/dist/src/agent/tools/structured-output.js.map +0 -1
  1960. package/dist/src/agent/tools/todo-tool.js.map +0 -1
  1961. package/dist/src/agent/tools/tool-manual-tool.js.map +0 -1
  1962. package/dist/src/agent/tools/tool-paths.js.map +0 -1
  1963. package/dist/src/agent/tools/truncate.js.map +0 -1
  1964. package/dist/src/agent/tools/tts-tool.js.map +0 -1
  1965. package/dist/src/agent/tools/update-plan-tool.js.map +0 -1
  1966. package/dist/src/agent/tools/url-safety.js.map +0 -1
  1967. package/dist/src/agent/tools/usage-analyzer.js.map +0 -1
  1968. package/dist/src/agent/tools/web-extract.js.map +0 -1
  1969. package/dist/src/agent/tools/web.js.map +0 -1
  1970. package/dist/src/agent/tools/workflow-tool.js.map +0 -1
  1971. package/dist/src/agent/tools/write.js.map +0 -1
  1972. package/dist/src/agent/tools/xopc-use-tool.js.map +0 -1
  1973. package/dist/src/agent/transcript/google-api.js.map +0 -1
  1974. package/dist/src/agent/transcript/model-selection.js.map +0 -1
  1975. package/dist/src/agent/transcript/provider-capabilities.js.map +0 -1
  1976. package/dist/src/agent/transcript/session-transcript-repair.js.map +0 -1
  1977. package/dist/src/agent/transcript/strip-tool-messages.js.map +0 -1
  1978. package/dist/src/agent/transcript/thinking-types.js.map +0 -1
  1979. package/dist/src/agent/transcript/thinking.js.map +0 -1
  1980. package/dist/src/agent/transcript/tool-call-id.js.map +0 -1
  1981. package/dist/src/agent/transcript/transcript-hygiene.js.map +0 -1
  1982. package/dist/src/agent/transcript/transcript-policy.js.map +0 -1
  1983. package/dist/src/agent/workflow/agent-progress.js.map +0 -1
  1984. package/dist/src/agent/workflow/builtins/index.js.map +0 -1
  1985. package/dist/src/agent/workflow/catalog.js.map +0 -1
  1986. package/dist/src/agent/workflow/progress-broker.js.map +0 -1
  1987. package/dist/src/agent/workflow/snapshot-empty.js.map +0 -1
  1988. package/dist/src/agent/workflow/snapshot.js.map +0 -1
  1989. package/dist/src/agent/workflow/step-labels.js.map +0 -1
  1990. package/dist/src/agent/workflow/structured-output-tool.js.map +0 -1
  1991. package/dist/src/agent/workflow/subagent-runner.js.map +0 -1
  1992. package/dist/src/agent/workflow/workflow-child-tools.js.map +0 -1
  1993. package/dist/src/agent/workspace-runtime/registry.js.map +0 -1
  1994. package/dist/src/agent-manifest/index.js.map +0 -1
  1995. package/dist/src/agent-manifest/preset-chain.js.map +0 -1
  1996. package/dist/src/agent-manifest/prompt.js.map +0 -1
  1997. package/dist/src/agent-manifest/resolver.js.map +0 -1
  1998. package/dist/src/agent-manifest/schema.js.map +0 -1
  1999. package/dist/src/agent-manifest/validator.js.map +0 -1
  2000. package/dist/src/agent-runtime/boundary-guard.js.map +0 -1
  2001. package/dist/src/agent-runtime/memory-runtime.js.map +0 -1
  2002. package/dist/src/agent-runtime/model-router.js.map +0 -1
  2003. package/dist/src/agent-runtime/run-trace.js.map +0 -1
  2004. package/dist/src/agent-runtime/runtime-profile.js.map +0 -1
  2005. package/dist/src/agent-runtime/tool-registry.js.map +0 -1
  2006. package/dist/src/agent-runtime/workflow-runtime.js.map +0 -1
  2007. package/dist/src/ai-assist/text-assist.js.map +0 -1
  2008. package/dist/src/auth/credentials.js.map +0 -1
  2009. package/dist/src/auth/index.js.map +0 -1
  2010. package/dist/src/auth/oauth/anthropic.js.map +0 -1
  2011. package/dist/src/auth/oauth/github-copilot.js.map +0 -1
  2012. package/dist/src/auth/oauth/google-oauth/google-antigravity.js.map +0 -1
  2013. package/dist/src/auth/oauth/google-oauth/google-gemini-cli.js.map +0 -1
  2014. package/dist/src/auth/oauth/google-oauth/oauth-page.js.map +0 -1
  2015. package/dist/src/auth/oauth/google-oauth/pkce.js.map +0 -1
  2016. package/dist/src/auth/oauth/kimi-coding.js.map +0 -1
  2017. package/dist/src/auth/oauth/minimax-cn.js.map +0 -1
  2018. package/dist/src/auth/oauth/minimax.js.map +0 -1
  2019. package/dist/src/auth/oauth/openai-codex.js.map +0 -1
  2020. package/dist/src/auth/oauth/pkce.js.map +0 -1
  2021. package/dist/src/auth/profiles/oauth.js.map +0 -1
  2022. package/dist/src/auth/profiles/order.js.map +0 -1
  2023. package/dist/src/auth/profiles/profiles.js.map +0 -1
  2024. package/dist/src/auth/profiles/store.js.map +0 -1
  2025. package/dist/src/auth/sync-provider-auth.js.map +0 -1
  2026. package/dist/src/automations/api/routes.js.map +0 -1
  2027. package/dist/src/automations/domain/schedule.js.map +0 -1
  2028. package/dist/src/automations/domain/validation.js.map +0 -1
  2029. package/dist/src/automations/draft/automation-draft-prompt.js.map +0 -1
  2030. package/dist/src/automations/draft/automation-draft-service.js.map +0 -1
  2031. package/dist/src/automations/draft/automation-draft-validator.js.map +0 -1
  2032. package/dist/src/automations/product-events.js.map +0 -1
  2033. package/dist/src/automations/service/action-executor.js.map +0 -1
  2034. package/dist/src/automations/service/automation-service.js.map +0 -1
  2035. package/dist/src/automations/storage/automation-repository.js.map +0 -1
  2036. package/dist/src/automations/storage/automation-run-repository.js.map +0 -1
  2037. package/dist/src/browser/actions/extension-registry-bridge.js.map +0 -1
  2038. package/dist/src/browser/actions/registry.js.map +0 -1
  2039. package/dist/src/browser/backend-from-config.js.map +0 -1
  2040. package/dist/src/browser/browser-command-timeout.js.map +0 -1
  2041. package/dist/src/browser/cache-dir-policy.js.map +0 -1
  2042. package/dist/src/browser/cdp-local-launcher.js.map +0 -1
  2043. package/dist/src/browser/cdp-supervisor.js.map +0 -1
  2044. package/dist/src/browser/free-port.js.map +0 -1
  2045. package/dist/src/browser/humanize.js.map +0 -1
  2046. package/dist/src/browser/install-lock.js.map +0 -1
  2047. package/dist/src/browser/manager.js.map +0 -1
  2048. package/dist/src/browser/pipeline/output.js.map +0 -1
  2049. package/dist/src/browser/pipeline/runner.js.map +0 -1
  2050. package/dist/src/browser/pipeline/schema.js.map +0 -1
  2051. package/dist/src/browser/pipeline/source.js.map +0 -1
  2052. package/dist/src/browser/pipeline/template.js.map +0 -1
  2053. package/dist/src/browser/providers/browser-ext-install.js.map +0 -1
  2054. package/dist/src/browser/providers/browser-use.js.map +0 -1
  2055. package/dist/src/browser/providers/browserbase.js.map +0 -1
  2056. package/dist/src/browser/providers/cloakbrowser.js.map +0 -1
  2057. package/dist/src/browser/providers/extension-ws-acquire.js.map +0 -1
  2058. package/dist/src/browser/providers/extension.js.map +0 -1
  2059. package/dist/src/browser/providers/playwright-doctor.js.map +0 -1
  2060. package/dist/src/browser/providers/playwright-install.js.map +0 -1
  2061. package/dist/src/browser/readiness.js.map +0 -1
  2062. package/dist/src/browser/schemas.js.map +0 -1
  2063. package/dist/src/browser/session-lifecycle.js.map +0 -1
  2064. package/dist/src/browser/snapshot-helpers.js.map +0 -1
  2065. package/dist/src/browser/stealth.js.map +0 -1
  2066. package/dist/src/browser/url-policy.js.map +0 -1
  2067. package/dist/src/capabilities/store-connector.js.map +0 -1
  2068. package/dist/src/channels/attachments/attachment-classifiers.js.map +0 -1
  2069. package/dist/src/channels/attachments/inbound-persist.js.map +0 -1
  2070. package/dist/src/channels/attachments/inbound-types.js.map +0 -1
  2071. package/dist/src/channels/attachments/outbound-tts-persist.js.map +0 -1
  2072. package/dist/src/channels/attachments/voice-stt-webchat.js.map +0 -1
  2073. package/dist/src/channels/catalog/channel-catalog-service.js.map +0 -1
  2074. package/dist/src/channels/config-helpers.js.map +0 -1
  2075. package/dist/src/channels/envelope-timestamp.js.map +0 -1
  2076. package/dist/src/channels/exec-approval-runtime.js.map +0 -1
  2077. package/dist/src/channels/health-monitor.js.map +0 -1
  2078. package/dist/src/channels/heartbeat-scheduler.js.map +0 -1
  2079. package/dist/src/channels/internal-outbound.js.map +0 -1
  2080. package/dist/src/channels/lifecycle-supervisor.js.map +0 -1
  2081. package/dist/src/channels/manager.js.map +0 -1
  2082. package/dist/src/channels/media.js.map +0 -1
  2083. package/dist/src/channels/outbound/deliver.js.map +0 -1
  2084. package/dist/src/channels/outbound/normalize.js.map +0 -1
  2085. package/dist/src/channels/outbound/persist-store.js.map +0 -1
  2086. package/dist/src/channels/outbound/queue.js.map +0 -1
  2087. package/dist/src/channels/outbound-sender.js.map +0 -1
  2088. package/dist/src/channels/pairing/allow-from-file.js.map +0 -1
  2089. package/dist/src/channels/pairing/approve-cli.js.map +0 -1
  2090. package/dist/src/channels/pairing/pairing-challenge.js.map +0 -1
  2091. package/dist/src/channels/pairing/pairing-constants.js.map +0 -1
  2092. package/dist/src/channels/pairing/pairing-events.js.map +0 -1
  2093. package/dist/src/channels/pairing/pairing-messages.js.map +0 -1
  2094. package/dist/src/channels/pairing/pairing-service.js.map +0 -1
  2095. package/dist/src/channels/pairing/pairing-store-adapter.js.map +0 -1
  2096. package/dist/src/channels/pairing/pairing-store.js.map +0 -1
  2097. package/dist/src/channels/pairing/paths.js.map +0 -1
  2098. package/dist/src/channels/pairing/preseed-allow-from.js.map +0 -1
  2099. package/dist/src/channels/pipeline.js.map +0 -1
  2100. package/dist/src/channels/plugin-registry.js.map +0 -1
  2101. package/dist/src/channels/plugins/registry.js.map +0 -1
  2102. package/dist/src/channels/restart-policy.js.map +0 -1
  2103. package/dist/src/channels/security-helpers.js.map +0 -1
  2104. package/dist/src/channels/security.js.map +0 -1
  2105. package/dist/src/channels/setup-wizard-discovery.js.map +0 -1
  2106. package/dist/src/chat-commands/agent-edit.js.map +0 -1
  2107. package/dist/src/chat-commands/builtins/config.js.map +0 -1
  2108. package/dist/src/chat-commands/builtins/context.js.map +0 -1
  2109. package/dist/src/chat-commands/builtins/goal.js.map +0 -1
  2110. package/dist/src/chat-commands/builtins/model.js.map +0 -1
  2111. package/dist/src/chat-commands/builtins/review.js.map +0 -1
  2112. package/dist/src/chat-commands/builtins/session.js.map +0 -1
  2113. package/dist/src/chat-commands/builtins/skill.js.map +0 -1
  2114. package/dist/src/chat-commands/builtins/subgoal.js.map +0 -1
  2115. package/dist/src/chat-commands/builtins/system.js.map +0 -1
  2116. package/dist/src/chat-commands/builtins/thinking.js.map +0 -1
  2117. package/dist/src/chat-commands/builtins/tts.js.map +0 -1
  2118. package/dist/src/chat-commands/builtins/workflow.js.map +0 -1
  2119. package/dist/src/chat-commands/command-parse.js.map +0 -1
  2120. package/dist/src/chat-commands/config-paths.js.map +0 -1
  2121. package/dist/src/chat-commands/config-value.js.map +0 -1
  2122. package/dist/src/chat-commands/context.js.map +0 -1
  2123. package/dist/src/chat-commands/format-output.js.map +0 -1
  2124. package/dist/src/chat-commands/index.js.map +0 -1
  2125. package/dist/src/chat-commands/processor.js.map +0 -1
  2126. package/dist/src/chat-commands/registry.js.map +0 -1
  2127. package/dist/src/chat-commands/session-key.js.map +0 -1
  2128. package/dist/src/cli/argv-invocation.js.map +0 -1
  2129. package/dist/src/cli/argv.js.map +0 -1
  2130. package/dist/src/cli/bin.js.map +0 -1
  2131. package/dist/src/cli/cli-log-level-preset.js.map +0 -1
  2132. package/dist/src/cli/command-catalog.js.map +0 -1
  2133. package/dist/src/cli/command-loaders.js.map +0 -1
  2134. package/dist/src/cli/command-manifest.js.map +0 -1
  2135. package/dist/src/cli/command-path-matches.js.map +0 -1
  2136. package/dist/src/cli/command-path-policy.js.map +0 -1
  2137. package/dist/src/cli/command-startup-policy.js.map +0 -1
  2138. package/dist/src/cli/commands/agent/interactive.js.map +0 -1
  2139. package/dist/src/cli/commands/agent/sessions.js.map +0 -1
  2140. package/dist/src/cli/commands/agent/stream-renderer.js.map +0 -1
  2141. package/dist/src/cli/commands/agent.js.map +0 -1
  2142. package/dist/src/cli/commands/agents.js.map +0 -1
  2143. package/dist/src/cli/commands/auth.js.map +0 -1
  2144. package/dist/src/cli/commands/browser-cli-helpers.js.map +0 -1
  2145. package/dist/src/cli/commands/browser.js.map +0 -1
  2146. package/dist/src/cli/commands/channels.js.map +0 -1
  2147. package/dist/src/cli/commands/config.js.map +0 -1
  2148. package/dist/src/cli/commands/connectors.js.map +0 -1
  2149. package/dist/src/cli/commands/doctor/checks/channel-config.js.map +0 -1
  2150. package/dist/src/cli/commands/doctor/checks/channel-pairing-pending.js.map +0 -1
  2151. package/dist/src/cli/commands/doctor/checks/channel-plugins.js.map +0 -1
  2152. package/dist/src/cli/commands/doctor/checks/config-health.js.map +0 -1
  2153. package/dist/src/cli/commands/doctor/checks/database-schema.js.map +0 -1
  2154. package/dist/src/cli/commands/doctor/checks/gateway-health.js.map +0 -1
  2155. package/dist/src/cli/commands/doctor/checks/gateway-service.js.map +0 -1
  2156. package/dist/src/cli/commands/doctor/checks/migrations.js.map +0 -1
  2157. package/dist/src/cli/commands/doctor/checks/node-version.js.map +0 -1
  2158. package/dist/src/cli/commands/doctor/checks/provider-auth.js.map +0 -1
  2159. package/dist/src/cli/commands/doctor/checks/security-audit.js.map +0 -1
  2160. package/dist/src/cli/commands/doctor/checks/session-integrity.js.map +0 -1
  2161. package/dist/src/cli/commands/doctor/checks/state-integrity.js.map +0 -1
  2162. package/dist/src/cli/commands/doctor/checks/version-check.js.map +0 -1
  2163. package/dist/src/cli/commands/doctor/checks/workspace-status.js.map +0 -1
  2164. package/dist/src/cli/commands/doctor/flow.js.map +0 -1
  2165. package/dist/src/cli/commands/doctor/format.js.map +0 -1
  2166. package/dist/src/cli/commands/doctor/index.js.map +0 -1
  2167. package/dist/src/cli/commands/extension-create.js.map +0 -1
  2168. package/dist/src/cli/commands/extension-dev.js.map +0 -1
  2169. package/dist/src/cli/commands/extension-marketplace.js.map +0 -1
  2170. package/dist/src/cli/commands/extension-pack.js.map +0 -1
  2171. package/dist/src/cli/commands/extension.js.map +0 -1
  2172. package/dist/src/cli/commands/gateway/call.js.map +0 -1
  2173. package/dist/src/cli/commands/gateway/health.js.map +0 -1
  2174. package/dist/src/cli/commands/gateway/lifecycle-core.js.map +0 -1
  2175. package/dist/src/cli/commands/gateway/lifecycle.js.map +0 -1
  2176. package/dist/src/cli/commands/gateway/logs.js.map +0 -1
  2177. package/dist/src/cli/commands/gateway/probe.js.map +0 -1
  2178. package/dist/src/cli/commands/gateway/restart-health.js.map +0 -1
  2179. package/dist/src/cli/commands/gateway/restart.js.map +0 -1
  2180. package/dist/src/cli/commands/gateway/run-foreground.js.map +0 -1
  2181. package/dist/src/cli/commands/gateway/service.js.map +0 -1
  2182. package/dist/src/cli/commands/gateway/shared.js.map +0 -1
  2183. package/dist/src/cli/commands/gateway/status.js.map +0 -1
  2184. package/dist/src/cli/commands/gateway/stop.js.map +0 -1
  2185. package/dist/src/cli/commands/gateway/subcommands.js.map +0 -1
  2186. package/dist/src/cli/commands/gateway/token.js.map +0 -1
  2187. package/dist/src/cli/commands/gateway-ssh-tunnel.js.map +0 -1
  2188. package/dist/src/cli/commands/gateway.js.map +0 -1
  2189. package/dist/src/cli/commands/goal.js.map +0 -1
  2190. package/dist/src/cli/commands/image.js.map +0 -1
  2191. package/dist/src/cli/commands/init.js.map +0 -1
  2192. package/dist/src/cli/commands/logs.js.map +0 -1
  2193. package/dist/src/cli/commands/models.js.map +0 -1
  2194. package/dist/src/cli/commands/onboard/channels/index.js.map +0 -1
  2195. package/dist/src/cli/commands/onboard/channels/onboard-to-configurator.js.map +0 -1
  2196. package/dist/src/cli/commands/onboard/channels/registry.js.map +0 -1
  2197. package/dist/src/cli/commands/onboard/channels/wizard-to-configurator.js.map +0 -1
  2198. package/dist/src/cli/commands/onboard/gateway.js.map +0 -1
  2199. package/dist/src/cli/commands/onboard/model.js.map +0 -1
  2200. package/dist/src/cli/commands/onboard.js.map +0 -1
  2201. package/dist/src/cli/commands/profile.js.map +0 -1
  2202. package/dist/src/cli/commands/project.js.map +0 -1
  2203. package/dist/src/cli/commands/providers.js.map +0 -1
  2204. package/dist/src/cli/commands/resume.js.map +0 -1
  2205. package/dist/src/cli/commands/search.js.map +0 -1
  2206. package/dist/src/cli/commands/session/actions.js.map +0 -1
  2207. package/dist/src/cli/commands/session/utils.js.map +0 -1
  2208. package/dist/src/cli/commands/session.js.map +0 -1
  2209. package/dist/src/cli/commands/setup-shared/output.js.map +0 -1
  2210. package/dist/src/cli/commands/setup-shared/prompts.js.map +0 -1
  2211. package/dist/src/cli/commands/setup-shared/runner.js.map +0 -1
  2212. package/dist/src/cli/commands/setup-shared/types.js.map +0 -1
  2213. package/dist/src/cli/commands/setup.js.map +0 -1
  2214. package/dist/src/cli/commands/skills-test.js.map +0 -1
  2215. package/dist/src/cli/commands/skills.js.map +0 -1
  2216. package/dist/src/cli/commands/tailscale.js.map +0 -1
  2217. package/dist/src/cli/commands/tui-runner.js.map +0 -1
  2218. package/dist/src/cli/commands/tui.js.map +0 -1
  2219. package/dist/src/cli/commands/tunnel.js.map +0 -1
  2220. package/dist/src/cli/commands/update.js.map +0 -1
  2221. package/dist/src/cli/commands/voice.js.map +0 -1
  2222. package/dist/src/cli/context.js.map +0 -1
  2223. package/dist/src/cli/extension-cli-register.js.map +0 -1
  2224. package/dist/src/cli/gateway-run-argv.js.map +0 -1
  2225. package/dist/src/cli/gateway-run-fast-path.js.map +0 -1
  2226. package/dist/src/cli/index.js.map +0 -1
  2227. package/dist/src/cli/registry.js.map +0 -1
  2228. package/dist/src/cli/templates.js.map +0 -1
  2229. package/dist/src/cli/utils/colors.js.map +0 -1
  2230. package/dist/src/cli/utils/gateway-client-options.js.map +0 -1
  2231. package/dist/src/cli/utils/gateway-client.js.map +0 -1
  2232. package/dist/src/cli/utils/init-workspace-core.js.map +0 -1
  2233. package/dist/src/cli/utils/init-workspace.js.map +0 -1
  2234. package/dist/src/cli/utils/oauth-login.js.map +0 -1
  2235. package/dist/src/cli/utils/oauth-providers.js.map +0 -1
  2236. package/dist/src/cli/utils/session.js.map +0 -1
  2237. package/dist/src/commands/agents.config.js.map +0 -1
  2238. package/dist/src/config/agent-profile.js.map +0 -1
  2239. package/dist/src/config/agent-typed-models.js.map +0 -1
  2240. package/dist/src/config/commands.flags.js.map +0 -1
  2241. package/dist/src/config/default-model.js.map +0 -1
  2242. package/dist/src/config/diff.js.map +0 -1
  2243. package/dist/src/config/gateway-bind.js.map +0 -1
  2244. package/dist/src/config/index.js.map +0 -1
  2245. package/dist/src/config/loader.js.map +0 -1
  2246. package/dist/src/config/mcp-config-normalize.js.map +0 -1
  2247. package/dist/src/config/model-input.js.map +0 -1
  2248. package/dist/src/config/models-json.js.map +0 -1
  2249. package/dist/src/config/paths-state.js.map +0 -1
  2250. package/dist/src/config/paths.js.map +0 -1
  2251. package/dist/src/config/profile.js.map +0 -1
  2252. package/dist/src/config/public-url.js.map +0 -1
  2253. package/dist/src/config/reload.js.map +0 -1
  2254. package/dist/src/config/resolve-config-value.js.map +0 -1
  2255. package/dist/src/config/rules.js.map +0 -1
  2256. package/dist/src/config/runtime-overrides.js.map +0 -1
  2257. package/dist/src/config/schema.js.map +0 -1
  2258. package/dist/src/config/validate-channel-configs.js.map +0 -1
  2259. package/dist/src/config/voice.js.map +0 -1
  2260. package/dist/src/config/web-patch.js.map +0 -1
  2261. package/dist/src/config/workspace-defaults.js.map +0 -1
  2262. package/dist/src/config/workspace-dirs.js.map +0 -1
  2263. package/dist/src/config/workspace-path-helpers.js.map +0 -1
  2264. package/dist/src/config/workspace-path.js.map +0 -1
  2265. package/dist/src/connectors/approval.js.map +0 -1
  2266. package/dist/src/connectors/auth-provider-registry.js.map +0 -1
  2267. package/dist/src/connectors/builtin-catalog.js.map +0 -1
  2268. package/dist/src/connectors/catalog.js.map +0 -1
  2269. package/dist/src/connectors/composio-catalog.js.map +0 -1
  2270. package/dist/src/connectors/composio-logo.js.map +0 -1
  2271. package/dist/src/connectors/composio-sessions.js.map +0 -1
  2272. package/dist/src/connectors/composio-triggers.js.map +0 -1
  2273. package/dist/src/connectors/composio.js.map +0 -1
  2274. package/dist/src/connectors/connector-memory-sync.js.map +0 -1
  2275. package/dist/src/connectors/health.js.map +0 -1
  2276. package/dist/src/connectors/install.js.map +0 -1
  2277. package/dist/src/connectors/instances.js.map +0 -1
  2278. package/dist/src/connectors/integration-strategy.js.map +0 -1
  2279. package/dist/src/connectors/lifecycle.js.map +0 -1
  2280. package/dist/src/connectors/materialize.js.map +0 -1
  2281. package/dist/src/connectors/policy.js.map +0 -1
  2282. package/dist/src/connectors/providers.js.map +0 -1
  2283. package/dist/src/connectors/registries/modelscope.js.map +0 -1
  2284. package/dist/src/connectors/registries/official-mcp.js.map +0 -1
  2285. package/dist/src/connectors/registries/search.js.map +0 -1
  2286. package/dist/src/connectors/registries/smithery.js.map +0 -1
  2287. package/dist/src/connectors/runtime-adapter-registry.js.map +0 -1
  2288. package/dist/src/connectors/secret-store.js.map +0 -1
  2289. package/dist/src/connectors/setup-secrets.js.map +0 -1
  2290. package/dist/src/connectors/supervisor.js.map +0 -1
  2291. package/dist/src/connectors/usage.js.map +0 -1
  2292. package/dist/src/connectors/workflow-preflight.js.map +0 -1
  2293. package/dist/src/daemon/constants.js.map +0 -1
  2294. package/dist/src/daemon/install-plan.js.map +0 -1
  2295. package/dist/src/daemon/launchd.js.map +0 -1
  2296. package/dist/src/daemon/schtasks.js.map +0 -1
  2297. package/dist/src/daemon/service-audit.js.map +0 -1
  2298. package/dist/src/daemon/service.js.map +0 -1
  2299. package/dist/src/daemon/systemd.js.map +0 -1
  2300. package/dist/src/document-understanding/extract.js.map +0 -1
  2301. package/dist/src/errors/index.js.map +0 -1
  2302. package/dist/src/extensions/activation-context.js.map +0 -1
  2303. package/dist/src/extensions/activation-planner.js.map +0 -1
  2304. package/dist/src/extensions/api.js.map +0 -1
  2305. package/dist/src/extensions/bundle-mcp.js.map +0 -1
  2306. package/dist/src/extensions/bundled-extension-activation.js.map +0 -1
  2307. package/dist/src/extensions/diagnostics.js.map +0 -1
  2308. package/dist/src/extensions/discover-extensions.js.map +0 -1
  2309. package/dist/src/extensions/engine-check.js.map +0 -1
  2310. package/dist/src/extensions/extension-metadata-snapshot.js.map +0 -1
  2311. package/dist/src/extensions/extension-registry-impl.js.map +0 -1
  2312. package/dist/src/extensions/health.js.map +0 -1
  2313. package/dist/src/extensions/hooks.js.map +0 -1
  2314. package/dist/src/extensions/index.js.map +0 -1
  2315. package/dist/src/extensions/install-transaction.js.map +0 -1
  2316. package/dist/src/extensions/install.js.map +0 -1
  2317. package/dist/src/extensions/loader.js.map +0 -1
  2318. package/dist/src/extensions/lockfile.js.map +0 -1
  2319. package/dist/src/extensions/manifest-registry.js.map +0 -1
  2320. package/dist/src/extensions/marketplace.js.map +0 -1
  2321. package/dist/src/extensions/media-provider-contracts.js.map +0 -1
  2322. package/dist/src/extensions/normalize-manifest.js.map +0 -1
  2323. package/dist/src/extensions/onboard-helpers.js.map +0 -1
  2324. package/dist/src/extensions/package-contract.js.map +0 -1
  2325. package/dist/src/extensions/sdk/channel-entry.js.map +0 -1
  2326. package/dist/src/extensions/sdk/channel-helpers.js.map +0 -1
  2327. package/dist/src/extensions/sdk/index.js.map +0 -1
  2328. package/dist/src/extensions/sdk/lazy.js.map +0 -1
  2329. package/dist/src/extensions/sdk/testing.js.map +0 -1
  2330. package/dist/src/extensions/security.js.map +0 -1
  2331. package/dist/src/extensions/slots.js.map +0 -1
  2332. package/dist/src/extensions/speech-provider-contracts.js.map +0 -1
  2333. package/dist/src/extensions/store-zip-limits.js.map +0 -1
  2334. package/dist/src/extensions/typed-event-bus.js.map +0 -1
  2335. package/dist/src/extensions/types/hooks.js.map +0 -1
  2336. package/dist/src/extensions/types/providers.js.map +0 -1
  2337. package/dist/src/extensions/update.js.map +0 -1
  2338. package/dist/src/extensions/when-context.js.map +0 -1
  2339. package/dist/src/extensions/when-expression.js.map +0 -1
  2340. package/dist/src/gateway/agent-builtin-tools.js.map +0 -1
  2341. package/dist/src/gateway/agent-run-relay.js.map +0 -1
  2342. package/dist/src/gateway/agents-admin.js.map +0 -1
  2343. package/dist/src/gateway/auth.js.map +0 -1
  2344. package/dist/src/gateway/capability-presets-admin.js.map +0 -1
  2345. package/dist/src/gateway/chat-limits.js.map +0 -1
  2346. package/dist/src/gateway/chat-stream/mapper.js.map +0 -1
  2347. package/dist/src/gateway/clarify-bridge.js.map +0 -1
  2348. package/dist/src/gateway/clarify-runtime.js.map +0 -1
  2349. package/dist/src/gateway/client-ip.js.map +0 -1
  2350. package/dist/src/gateway/config-tools-web.js.map +0 -1
  2351. package/dist/src/gateway/credential.js.map +0 -1
  2352. package/dist/src/gateway/discovery/mdns.js.map +0 -1
  2353. package/dist/src/gateway/dreaming-automation-reconciler.js.map +0 -1
  2354. package/dist/src/gateway/ensure-network-cors.js.map +0 -1
  2355. package/dist/src/gateway/file-path-classifier.js.map +0 -1
  2356. package/dist/src/gateway/file-reference-registry.js.map +0 -1
  2357. package/dist/src/gateway/global-defaults-admin.js.map +0 -1
  2358. package/dist/src/gateway/heartbeat/service.js.map +0 -1
  2359. package/dist/src/gateway/hono/app.js.map +0 -1
  2360. package/dist/src/gateway/hono/lib/agent-model.js.map +0 -1
  2361. package/dist/src/gateway/hono/lib/config-payload.js.map +0 -1
  2362. package/dist/src/gateway/hono/lib/extension-assets.js.map +0 -1
  2363. package/dist/src/gateway/hono/lib/extension-store.js.map +0 -1
  2364. package/dist/src/gateway/hono/lib/mask-secret-length.js.map +0 -1
  2365. package/dist/src/gateway/hono/lib/route-logger.js.map +0 -1
  2366. package/dist/src/gateway/hono/lib/safe-providers-config.js.map +0 -1
  2367. package/dist/src/gateway/hono/lib/safe-voice-config.js.map +0 -1
  2368. package/dist/src/gateway/hono/lib/startup-unavailable.js.map +0 -1
  2369. package/dist/src/gateway/hono/lib/static-ui.js.map +0 -1
  2370. package/dist/src/gateway/hono/middleware/auth.js.map +0 -1
  2371. package/dist/src/gateway/hono/middleware/log-context.js.map +0 -1
  2372. package/dist/src/gateway/hono/middleware/logger.js.map +0 -1
  2373. package/dist/src/gateway/hono/middleware/route-errors.js.map +0 -1
  2374. package/dist/src/gateway/hono/middleware/scopes.js.map +0 -1
  2375. package/dist/src/gateway/hono/middleware/strict-rate-limit.js.map +0 -1
  2376. package/dist/src/gateway/hono/oauth-async.js.map +0 -1
  2377. package/dist/src/gateway/hono/oauth.js.map +0 -1
  2378. package/dist/src/gateway/hono/routes/activity.js.map +0 -1
  2379. package/dist/src/gateway/hono/routes/agent-stream.js.map +0 -1
  2380. package/dist/src/gateway/hono/routes/agents.js.map +0 -1
  2381. package/dist/src/gateway/hono/routes/ai-assist.js.map +0 -1
  2382. package/dist/src/gateway/hono/routes/auth-registry-extensions.js.map +0 -1
  2383. package/dist/src/gateway/hono/routes/browser-install.js.map +0 -1
  2384. package/dist/src/gateway/hono/routes/browser.js.map +0 -1
  2385. package/dist/src/gateway/hono/routes/capabilities.js.map +0 -1
  2386. package/dist/src/gateway/hono/routes/capability-presets.js.map +0 -1
  2387. package/dist/src/gateway/hono/routes/channels.js.map +0 -1
  2388. package/dist/src/gateway/hono/routes/commands-skills.js.map +0 -1
  2389. package/dist/src/gateway/hono/routes/config-patch/agents.js.map +0 -1
  2390. package/dist/src/gateway/hono/routes/config-patch/channels.js.map +0 -1
  2391. package/dist/src/gateway/hono/routes/config-patch/gateway.js.map +0 -1
  2392. package/dist/src/gateway/hono/routes/config-patch/misc.js.map +0 -1
  2393. package/dist/src/gateway/hono/routes/config-patch/result.js.map +0 -1
  2394. package/dist/src/gateway/hono/routes/config.js.map +0 -1
  2395. package/dist/src/gateway/hono/routes/connectors.js.map +0 -1
  2396. package/dist/src/gateway/hono/routes/doctor.js.map +0 -1
  2397. package/dist/src/gateway/hono/routes/dreaming.js.map +0 -1
  2398. package/dist/src/gateway/hono/routes/exposure.js.map +0 -1
  2399. package/dist/src/gateway/hono/routes/extension-gateway.js.map +0 -1
  2400. package/dist/src/gateway/hono/routes/global-defaults.js.map +0 -1
  2401. package/dist/src/gateway/hono/routes/goals.js.map +0 -1
  2402. package/dist/src/gateway/hono/routes/home.js.map +0 -1
  2403. package/dist/src/gateway/hono/routes/host-fs.js.map +0 -1
  2404. package/dist/src/gateway/hono/routes/index.js.map +0 -1
  2405. package/dist/src/gateway/hono/routes/lazy-bundles.js.map +0 -1
  2406. package/dist/src/gateway/hono/routes/lazy-fallback.js.map +0 -1
  2407. package/dist/src/gateway/hono/routes/local-apps.js.map +0 -1
  2408. package/dist/src/gateway/hono/routes/logs.js.map +0 -1
  2409. package/dist/src/gateway/hono/routes/mcp.js.map +0 -1
  2410. package/dist/src/gateway/hono/routes/media.js.map +0 -1
  2411. package/dist/src/gateway/hono/routes/memory.js.map +0 -1
  2412. package/dist/src/gateway/hono/routes/migrations.js.map +0 -1
  2413. package/dist/src/gateway/hono/routes/mobile.js.map +0 -1
  2414. package/dist/src/gateway/hono/routes/models.js.map +0 -1
  2415. package/dist/src/gateway/hono/routes/notes.js.map +0 -1
  2416. package/dist/src/gateway/hono/routes/projects.js.map +0 -1
  2417. package/dist/src/gateway/hono/routes/public-gateway.js.map +0 -1
  2418. package/dist/src/gateway/hono/routes/search.js.map +0 -1
  2419. package/dist/src/gateway/hono/routes/sessions.js.map +0 -1
  2420. package/dist/src/gateway/hono/routes/shares.js.map +0 -1
  2421. package/dist/src/gateway/hono/routes/site-shares.js.map +0 -1
  2422. package/dist/src/gateway/hono/routes/status.js.map +0 -1
  2423. package/dist/src/gateway/hono/routes/tui.js.map +0 -1
  2424. package/dist/src/gateway/hono/routes/tunnel.js.map +0 -1
  2425. package/dist/src/gateway/hono/routes/update.js.map +0 -1
  2426. package/dist/src/gateway/hono/routes/voice.js.map +0 -1
  2427. package/dist/src/gateway/hono/routes/work-discovery.js.map +0 -1
  2428. package/dist/src/gateway/hono/routes/workflows.js.map +0 -1
  2429. package/dist/src/gateway/hono/routes/workspace.js.map +0 -1
  2430. package/dist/src/gateway/hono/routes/you.js.map +0 -1
  2431. package/dist/src/gateway/hono/sse-json.js.map +0 -1
  2432. package/dist/src/gateway/hono/sse.js.map +0 -1
  2433. package/dist/src/gateway/host.js.map +0 -1
  2434. package/dist/src/gateway/image-capabilities.js.map +0 -1
  2435. package/dist/src/gateway/listen.js.map +0 -1
  2436. package/dist/src/gateway/lock.js.map +0 -1
  2437. package/dist/src/gateway/ports.js.map +0 -1
  2438. package/dist/src/gateway/protocol.js.map +0 -1
  2439. package/dist/src/gateway/public-url.js.map +0 -1
  2440. package/dist/src/gateway/rate-limit/auth-policy.js.map +0 -1
  2441. package/dist/src/gateway/rate-limit/buckets.js.map +0 -1
  2442. package/dist/src/gateway/rate-limit/env-flags.js.map +0 -1
  2443. package/dist/src/gateway/resolve-channel-connect-defer.js.map +0 -1
  2444. package/dist/src/gateway/resolve-webchat-session-key.js.map +0 -1
  2445. package/dist/src/gateway/respawn.js.map +0 -1
  2446. package/dist/src/gateway/run-loop.js.map +0 -1
  2447. package/dist/src/gateway/runtime-config.js.map +0 -1
  2448. package/dist/src/gateway/security/audit.js.map +0 -1
  2449. package/dist/src/gateway/security/csp.js.map +0 -1
  2450. package/dist/src/gateway/security/dangerous-tools.js.map +0 -1
  2451. package/dist/src/gateway/security/external-content.js.map +0 -1
  2452. package/dist/src/gateway/security/known-weak-secrets.js.map +0 -1
  2453. package/dist/src/gateway/security/loopback.js.map +0 -1
  2454. package/dist/src/gateway/security/operator-scopes.js.map +0 -1
  2455. package/dist/src/gateway/security/origin-check.js.map +0 -1
  2456. package/dist/src/gateway/security/preauth-connection-budget.js.map +0 -1
  2457. package/dist/src/gateway/security/secret-equal.js.map +0 -1
  2458. package/dist/src/gateway/server-tailscale.js.map +0 -1
  2459. package/dist/src/gateway/server.js.map +0 -1
  2460. package/dist/src/gateway/service/agent-runner.js.map +0 -1
  2461. package/dist/src/gateway/service/config-coordinator.js.map +0 -1
  2462. package/dist/src/gateway/service/marketplace-service.js.map +0 -1
  2463. package/dist/src/gateway/service/run-gateway-agent.js.map +0 -1
  2464. package/dist/src/gateway/service/session-chat-ids.js.map +0 -1
  2465. package/dist/src/gateway/service/sessions-api.js.map +0 -1
  2466. package/dist/src/gateway/service/sse-hub.js.map +0 -1
  2467. package/dist/src/gateway/service.js.map +0 -1
  2468. package/dist/src/gateway/session-reset-service.js.map +0 -1
  2469. package/dist/src/gateway/startup-readiness.js.map +0 -1
  2470. package/dist/src/gateway/startup-trace.js.map +0 -1
  2471. package/dist/src/gateway/tailscale-auth.js.map +0 -1
  2472. package/dist/src/gateway/tailscale-lifecycle.js.map +0 -1
  2473. package/dist/src/gateway/tls-server.js.map +0 -1
  2474. package/dist/src/gateway/trusted-proxy.js.map +0 -1
  2475. package/dist/src/gateway/user-turn-input.js.map +0 -1
  2476. package/dist/src/gateway/workspace-editor-path.js.map +0 -1
  2477. package/dist/src/gateway/workspace-file-search.js.map +0 -1
  2478. package/dist/src/gateway/workspace-fs-file-list.js.map +0 -1
  2479. package/dist/src/gateway/workspace-heartbeat-path.js.map +0 -1
  2480. package/dist/src/gateway/workspace-ripgrep.js.map +0 -1
  2481. package/dist/src/gateway/ws-security.js.map +0 -1
  2482. package/dist/src/generated/bundled-image-generation-providers.js.map +0 -1
  2483. package/dist/src/goals/goal-contract-draft.js.map +0 -1
  2484. package/dist/src/goals/goal-evidence-review.js.map +0 -1
  2485. package/dist/src/goals/goal-notifications.js.map +0 -1
  2486. package/dist/src/goals/goal-queue-store.js.map +0 -1
  2487. package/dist/src/goals/goal-runner.js.map +0 -1
  2488. package/dist/src/goals/goal-service.js.map +0 -1
  2489. package/dist/src/goals/goal-store.js.map +0 -1
  2490. package/dist/src/goals/goal-workflow-judge.js.map +0 -1
  2491. package/dist/src/heartbeat/active-hours.js.map +0 -1
  2492. package/dist/src/heartbeat/content-check.js.map +0 -1
  2493. package/dist/src/heartbeat/event-prompt.js.map +0 -1
  2494. package/dist/src/heartbeat/tokens.js.map +0 -1
  2495. package/dist/src/heartbeat/wake.js.map +0 -1
  2496. package/dist/src/i18n/format.js.map +0 -1
  2497. package/dist/src/i18n/goals-bundle.js.map +0 -1
  2498. package/dist/src/i18n/locale.js.map +0 -1
  2499. package/dist/src/i18n/locales/goals.en.js.map +0 -1
  2500. package/dist/src/i18n/locales/goals.zh.js.map +0 -1
  2501. package/dist/src/i18n/locales/share-tool.en.js.map +0 -1
  2502. package/dist/src/i18n/locales/share-tool.zh.js.map +0 -1
  2503. package/dist/src/i18n/share-tool-bundle.js.map +0 -1
  2504. package/dist/src/index.js.map +0 -1
  2505. package/dist/src/infra/brew.js.map +0 -1
  2506. package/dist/src/infra/bus/queue.js.map +0 -1
  2507. package/dist/src/infra/debounce.js.map +0 -1
  2508. package/dist/src/infra/exec.js.map +0 -1
  2509. package/dist/src/infra/gateway-process-argv.js.map +0 -1
  2510. package/dist/src/infra/gateway-processes.js.map +0 -1
  2511. package/dist/src/infra/host-env-security-policy.js.map +0 -1
  2512. package/dist/src/infra/host-env-security.js.map +0 -1
  2513. package/dist/src/infra/http-proxy-env.js.map +0 -1
  2514. package/dist/src/infra/is-main.js.map +0 -1
  2515. package/dist/src/infra/json-utf8-bytes.js.map +0 -1
  2516. package/dist/src/infra/node-sqlite.js.map +0 -1
  2517. package/dist/src/infra/package-json.js.map +0 -1
  2518. package/dist/src/infra/package-update-steps.js.map +0 -1
  2519. package/dist/src/infra/path-env.js.map +0 -1
  2520. package/dist/src/infra/path-prepend.js.map +0 -1
  2521. package/dist/src/infra/ports.js.map +0 -1
  2522. package/dist/src/infra/rate-limit/failure-limiter.js.map +0 -1
  2523. package/dist/src/infra/rate-limit/keyed-store.js.map +0 -1
  2524. package/dist/src/infra/rate-limit/rate-limiter.js.map +0 -1
  2525. package/dist/src/infra/restart.js.map +0 -1
  2526. package/dist/src/infra/retry.js.map +0 -1
  2527. package/dist/src/infra/run-command.js.map +0 -1
  2528. package/dist/src/infra/sqlite-errors.js.map +0 -1
  2529. package/dist/src/infra/ssh-tunnel.js.map +0 -1
  2530. package/dist/src/infra/stable-node-path.js.map +0 -1
  2531. package/dist/src/infra/tailscale.js.map +0 -1
  2532. package/dist/src/infra/undici-fetch.js.map +0 -1
  2533. package/dist/src/infra/unhandled-rejections.js.map +0 -1
  2534. package/dist/src/infra/update-channels.js.map +0 -1
  2535. package/dist/src/infra/update-check.js.map +0 -1
  2536. package/dist/src/infra/update-global.js.map +0 -1
  2537. package/dist/src/infra/update-lock.js.map +0 -1
  2538. package/dist/src/infra/update-log.js.map +0 -1
  2539. package/dist/src/infra/update-restart.js.map +0 -1
  2540. package/dist/src/infra/update-runner.js.map +0 -1
  2541. package/dist/src/infra/update-startup.js.map +0 -1
  2542. package/dist/src/infra/warning-filter.js.map +0 -1
  2543. package/dist/src/infra/write-file-atomic.js.map +0 -1
  2544. package/dist/src/knowledge/connected-knowledge-pipeline.js.map +0 -1
  2545. package/dist/src/knowledge/coordinator.js.map +0 -1
  2546. package/dist/src/knowledge/ingestion-service.js.map +0 -1
  2547. package/dist/src/local-apps/acceptance.js.map +0 -1
  2548. package/dist/src/local-apps/preview-runtime-bridge.js.map +0 -1
  2549. package/dist/src/local-apps/runtime-entry.js.map +0 -1
  2550. package/dist/src/local-apps/scaffold.js.map +0 -1
  2551. package/dist/src/local-apps/service.js.map +0 -1
  2552. package/dist/src/local-apps/store.js.map +0 -1
  2553. package/dist/src/markdown/chunk.js.map +0 -1
  2554. package/dist/src/markdown/code-spans.js.map +0 -1
  2555. package/dist/src/markdown/fences.js.map +0 -1
  2556. package/dist/src/markdown/frontmatter.js.map +0 -1
  2557. package/dist/src/markdown/ir.js.map +0 -1
  2558. package/dist/src/markdown/render.js.map +0 -1
  2559. package/dist/src/markdown/tables.js.map +0 -1
  2560. package/dist/src/mcp/channel-bridge.js.map +0 -1
  2561. package/dist/src/mcp/channel-server.js.map +0 -1
  2562. package/dist/src/mcp/channel-shared.js.map +0 -1
  2563. package/dist/src/mcp/channel-tools.js.map +0 -1
  2564. package/dist/src/mcp/gateway-http-client.js.map +0 -1
  2565. package/dist/src/media/media-reference.js.map +0 -1
  2566. package/dist/src/media/paths.js.map +0 -1
  2567. package/dist/src/media/session-references.js.map +0 -1
  2568. package/dist/src/media/store.js.map +0 -1
  2569. package/dist/src/media/uri.js.map +0 -1
  2570. package/dist/src/media-shared/http/api-key-rotation.js.map +0 -1
  2571. package/dist/src/media-shared/http/deadline.js.map +0 -1
  2572. package/dist/src/media-shared/http/private-network.js.map +0 -1
  2573. package/dist/src/media-shared/http/provider-http-errors.js.map +0 -1
  2574. package/dist/src/media-shared/http/provider-http.js.map +0 -1
  2575. package/dist/src/media-shared/http/resolve-provider-http-request-config.js.map +0 -1
  2576. package/dist/src/media-shared/http/ssrf-guard.js.map +0 -1
  2577. package/dist/src/media-shared/http/test-helpers/mock-server.js.map +0 -1
  2578. package/dist/src/media-understanding/audio-transcription-runner.js.map +0 -1
  2579. package/dist/src/media-understanding/openai-compatible-audio.js.map +0 -1
  2580. package/dist/src/media-understanding/registry.js.map +0 -1
  2581. package/dist/src/media-understanding/resolve-entries.js.map +0 -1
  2582. package/dist/src/media-understanding/runner.js.map +0 -1
  2583. package/dist/src/migrations/config/default-capability-preset.js.map +0 -1
  2584. package/dist/src/migrations/registry.js.map +0 -1
  2585. package/dist/src/migrations/runner.js.map +0 -1
  2586. package/dist/src/mobile/notification-service.js.map +0 -1
  2587. package/dist/src/mobile/notification-store.js.map +0 -1
  2588. package/dist/src/mobile/notification-types.js.map +0 -1
  2589. package/dist/src/notes/agent-context.js.map +0 -1
  2590. package/dist/src/notes/attachment-ref.js.map +0 -1
  2591. package/dist/src/notes/note-attachment-sync.js.map +0 -1
  2592. package/dist/src/notes/note-index-meta.js.map +0 -1
  2593. package/dist/src/notes/note-markdown.js.map +0 -1
  2594. package/dist/src/notes/paths.js.map +0 -1
  2595. package/dist/src/notes/service.js.map +0 -1
  2596. package/dist/src/notes/store.js.map +0 -1
  2597. package/dist/src/package-version.js.map +0 -1
  2598. package/dist/src/pets/factory.js.map +0 -1
  2599. package/dist/src/pets/manifest.js.map +0 -1
  2600. package/dist/src/pets/validator.js.map +0 -1
  2601. package/dist/src/process/kill-tree.js.map +0 -1
  2602. package/dist/src/project-trust/trust-store.js.map +0 -1
  2603. package/dist/src/projects/automation-bind.js.map +0 -1
  2604. package/dist/src/projects/goal-bind.js.map +0 -1
  2605. package/dist/src/projects/memory-bind.js.map +0 -1
  2606. package/dist/src/projects/project-agent-suggestion.js.map +0 -1
  2607. package/dist/src/projects/project-agent.js.map +0 -1
  2608. package/dist/src/projects/project-kind.js.map +0 -1
  2609. package/dist/src/projects/project-loop.js.map +0 -1
  2610. package/dist/src/projects/project-service.js.map +0 -1
  2611. package/dist/src/projects/project-store.js.map +0 -1
  2612. package/dist/src/projects/session-bind.js.map +0 -1
  2613. package/dist/src/projects/workflow-bind.js.map +0 -1
  2614. package/dist/src/projects/workspace-project.js.map +0 -1
  2615. package/dist/src/projects/workspace.js.map +0 -1
  2616. package/dist/src/providers/auth-runtime/auth-profile-store.js.map +0 -1
  2617. package/dist/src/providers/auth-runtime/is-configured.js.map +0 -1
  2618. package/dist/src/providers/auth-runtime/oauth.js.map +0 -1
  2619. package/dist/src/providers/auth-runtime/resolve-api-key.js.map +0 -1
  2620. package/dist/src/providers/auth-runtime/resolve-auth.js.map +0 -1
  2621. package/dist/src/providers/constants.js.map +0 -1
  2622. package/dist/src/providers/domestic-presets.js.map +0 -1
  2623. package/dist/src/providers/env-keys.js.map +0 -1
  2624. package/dist/src/providers/extension-stream-bridge.js.map +0 -1
  2625. package/dist/src/providers/index.js.map +0 -1
  2626. package/dist/src/providers/model-call.js.map +0 -1
  2627. package/dist/src/providers/model-discovery.js.map +0 -1
  2628. package/dist/src/providers/model-registry.js.map +0 -1
  2629. package/dist/src/providers/model-supplements.js.map +0 -1
  2630. package/dist/src/providers/plugin-registry.js.map +0 -1
  2631. package/dist/src/providers/presentation.js.map +0 -1
  2632. package/dist/src/remote-access/exposure-guards.js.map +0 -1
  2633. package/dist/src/remote-access/exposure-manager.js.map +0 -1
  2634. package/dist/src/review/review-git.js.map +0 -1
  2635. package/dist/src/review/review-types.js.map +0 -1
  2636. package/dist/src/routing/account-id.js.map +0 -1
  2637. package/dist/src/routing/agent-session-key.js.map +0 -1
  2638. package/dist/src/routing/bindings.js.map +0 -1
  2639. package/dist/src/routing/index.js.map +0 -1
  2640. package/dist/src/routing/resolve-route.js.map +0 -1
  2641. package/dist/src/routing/resolve-tui-session-key.js.map +0 -1
  2642. package/dist/src/routing/session-key-utils.js.map +0 -1
  2643. package/dist/src/routing/session-key.js.map +0 -1
  2644. package/dist/src/session/abort-cutoff.js.map +0 -1
  2645. package/dist/src/session/chat-export.js.map +0 -1
  2646. package/dist/src/session/client-history.js.map +0 -1
  2647. package/dist/src/session/compaction-checkpoints.js.map +0 -1
  2648. package/dist/src/session/config-store.js.map +0 -1
  2649. package/dist/src/session/init-session-turn.js.map +0 -1
  2650. package/dist/src/session/lifecycle-timestamps.js.map +0 -1
  2651. package/dist/src/session/load-jsonl-entries.js.map +0 -1
  2652. package/dist/src/session/manager.js.map +0 -1
  2653. package/dist/src/session/patch-metadata.js.map +0 -1
  2654. package/dist/src/session/reset-policy.js.map +0 -1
  2655. package/dist/src/session/reset-triggers.js.map +0 -1
  2656. package/dist/src/session/reset-type.js.map +0 -1
  2657. package/dist/src/session/resolve-session.js.map +0 -1
  2658. package/dist/src/session/session-context-for-llm.js.map +0 -1
  2659. package/dist/src/session/session-id.js.map +0 -1
  2660. package/dist/src/session/session-title.js.map +0 -1
  2661. package/dist/src/session/session-workspace.js.map +0 -1
  2662. package/dist/src/session/store.js.map +0 -1
  2663. package/dist/src/session/stored-rows-to-file-entries.js.map +0 -1
  2664. package/dist/src/session/thinking-resolve.js.map +0 -1
  2665. package/dist/src/session/transcript-events.js.map +0 -1
  2666. package/dist/src/session/transcript-format.js.map +0 -1
  2667. package/dist/src/session/transcript-outline.js.map +0 -1
  2668. package/dist/src/session/transcript-stats.js.map +0 -1
  2669. package/dist/src/session/types.js.map +0 -1
  2670. package/dist/src/session/user-round-delete.js.map +0 -1
  2671. package/dist/src/share/share-audit.js.map +0 -1
  2672. package/dist/src/share/share-auto.js.map +0 -1
  2673. package/dist/src/share/share-config.js.map +0 -1
  2674. package/dist/src/share/share-landing.js.map +0 -1
  2675. package/dist/src/share/share-rate-limit.js.map +0 -1
  2676. package/dist/src/share/share-store.js.map +0 -1
  2677. package/dist/src/share/share-thumbnail.js.map +0 -1
  2678. package/dist/src/share/share-types.js.map +0 -1
  2679. package/dist/src/share/share-url.js.map +0 -1
  2680. package/dist/src/share/share-zip.js.map +0 -1
  2681. package/dist/src/share/site-proxy.js.map +0 -1
  2682. package/dist/src/share/site-share-config.js.map +0 -1
  2683. package/dist/src/share/site-share-router.js.map +0 -1
  2684. package/dist/src/share/site-share-store.js.map +0 -1
  2685. package/dist/src/share/site-share-types.js.map +0 -1
  2686. package/dist/src/share/site-static-serve.js.map +0 -1
  2687. package/dist/src/storage/sqlite/activity-repository.js.map +0 -1
  2688. package/dist/src/storage/sqlite/config-repository.js.map +0 -1
  2689. package/dist/src/storage/sqlite/connection.js.map +0 -1
  2690. package/dist/src/storage/sqlite/connector-repository.js.map +0 -1
  2691. package/dist/src/storage/sqlite/fts.js.map +0 -1
  2692. package/dist/src/storage/sqlite/knowledge-repository.js.map +0 -1
  2693. package/dist/src/storage/sqlite/memory-index-repository.js.map +0 -1
  2694. package/dist/src/storage/sqlite/memory-records-repository.js.map +0 -1
  2695. package/dist/src/storage/sqlite/memory-reference-consent-repository.js.map +0 -1
  2696. package/dist/src/storage/sqlite/migrations/discover.js.map +0 -1
  2697. package/dist/src/storage/sqlite/migrations/errors.js.map +0 -1
  2698. package/dist/src/storage/sqlite/migrations/runner.js.map +0 -1
  2699. package/dist/src/storage/sqlite/note-agent-context-repository.js.map +0 -1
  2700. package/dist/src/storage/sqlite/notes-repository.js.map +0 -1
  2701. package/dist/src/storage/sqlite/paths.js.map +0 -1
  2702. package/dist/src/storage/sqlite/row-mappers.js.map +0 -1
  2703. package/dist/src/storage/sqlite/schema-version.js.map +0 -1
  2704. package/dist/src/storage/sqlite/schema.js.map +0 -1
  2705. package/dist/src/storage/sqlite/session-metadata.js.map +0 -1
  2706. package/dist/src/storage/sqlite/session-repository.js.map +0 -1
  2707. package/dist/src/storage/sqlite/transaction.js.map +0 -1
  2708. package/dist/src/storage/sqlite/transcript-repository.js.map +0 -1
  2709. package/dist/src/storage/sqlite/user-profile-setup-repository.js.map +0 -1
  2710. package/dist/src/storage/sqlite/user-trust-repository.js.map +0 -1
  2711. package/dist/src/tui/backends/embedded-backend.js.map +0 -1
  2712. package/dist/src/tui/backends/gateway-sse-backend.js.map +0 -1
  2713. package/dist/src/tui/chat-history.js.map +0 -1
  2714. package/dist/src/tui/clipboard-image.js.map +0 -1
  2715. package/dist/src/tui/clipboard-text.js.map +0 -1
  2716. package/dist/src/tui/components/assistant-message.js.map +0 -1
  2717. package/dist/src/tui/components/bash-execution.js.map +0 -1
  2718. package/dist/src/tui/components/bash-summary.js.map +0 -1
  2719. package/dist/src/tui/components/branch-message-summary.js.map +0 -1
  2720. package/dist/src/tui/components/branch-summary.js.map +0 -1
  2721. package/dist/src/tui/components/chat-log.js.map +0 -1
  2722. package/dist/src/tui/components/compaction-summary.js.map +0 -1
  2723. package/dist/src/tui/components/custom-editor.js.map +0 -1
  2724. package/dist/src/tui/components/custom-message.js.map +0 -1
  2725. package/dist/src/tui/components/dynamic-border.js.map +0 -1
  2726. package/dist/src/tui/components/extension-dialog.js.map +0 -1
  2727. package/dist/src/tui/components/fuzzy-filter.js.map +0 -1
  2728. package/dist/src/tui/components/scoped-models-selector.js.map +0 -1
  2729. package/dist/src/tui/components/searchable-select-list.js.map +0 -1
  2730. package/dist/src/tui/components/session-selector.js.map +0 -1
  2731. package/dist/src/tui/components/settings-selector.js.map +0 -1
  2732. package/dist/src/tui/components/thinking-selector.js.map +0 -1
  2733. package/dist/src/tui/components/tool-execution.js.map +0 -1
  2734. package/dist/src/tui/components/tui-bottom-bar.js.map +0 -1
  2735. package/dist/src/tui/components/tui-header.js.map +0 -1
  2736. package/dist/src/tui/components/user-message.js.map +0 -1
  2737. package/dist/src/tui/components/visual-truncate.js.map +0 -1
  2738. package/dist/src/tui/extension-host/autocomplete.js.map +0 -1
  2739. package/dist/src/tui/extension-host/host.js.map +0 -1
  2740. package/dist/src/tui/extension-host/load-extensions.js.map +0 -1
  2741. package/dist/src/tui/extension-host/runtime-context.js.map +0 -1
  2742. package/dist/src/tui/extension-host/runtime.js.map +0 -1
  2743. package/dist/src/tui/extension-host/surface.js.map +0 -1
  2744. package/dist/src/tui/extension-host/tool-renderers.js.map +0 -1
  2745. package/dist/src/tui/format-tui-hotkeys.js.map +0 -1
  2746. package/dist/src/tui/sse-consumer.js.map +0 -1
  2747. package/dist/src/tui/theme/dark.js.map +0 -1
  2748. package/dist/src/tui/theme/light.js.map +0 -1
  2749. package/dist/src/tui/theme-manager.js.map +0 -1
  2750. package/dist/src/tui/theme.js.map +0 -1
  2751. package/dist/src/tui/tool-summary.js.map +0 -1
  2752. package/dist/src/tui/tui-agent-events.js.map +0 -1
  2753. package/dist/src/tui/tui-command-formatters.js.map +0 -1
  2754. package/dist/src/tui/tui-commands.js.map +0 -1
  2755. package/dist/src/tui/tui-context-usage.js.map +0 -1
  2756. package/dist/src/tui/tui-extension-user-message.js.map +0 -1
  2757. package/dist/src/tui/tui-fd-path.js.map +0 -1
  2758. package/dist/src/tui/tui-file-autocomplete.js.map +0 -1
  2759. package/dist/src/tui/tui-follow-up-queue.js.map +0 -1
  2760. package/dist/src/tui/tui-git-branch.js.map +0 -1
  2761. package/dist/src/tui/tui-keybindings-file.js.map +0 -1
  2762. package/dist/src/tui/tui-lifecycle.js.map +0 -1
  2763. package/dist/src/tui/tui-local-shell.js.map +0 -1
  2764. package/dist/src/tui/tui-model-picker.js.map +0 -1
  2765. package/dist/src/tui/tui-oauth-login.js.map +0 -1
  2766. package/dist/src/tui/tui-overlays.js.map +0 -1
  2767. package/dist/src/tui/tui-picker-overlay.js.map +0 -1
  2768. package/dist/src/tui/tui-run-state.js.map +0 -1
  2769. package/dist/src/tui/tui-run-status-format.js.map +0 -1
  2770. package/dist/src/tui/tui-runtime-hints.js.map +0 -1
  2771. package/dist/src/tui/tui-scoped-models.js.map +0 -1
  2772. package/dist/src/tui/tui-session-actions.js.map +0 -1
  2773. package/dist/src/tui/tui-session-format.js.map +0 -1
  2774. package/dist/src/tui/tui-session-snapshot.js.map +0 -1
  2775. package/dist/src/tui/tui-session-stats.js.map +0 -1
  2776. package/dist/src/tui/tui-settings.js.map +0 -1
  2777. package/dist/src/tui/tui-skills-autocomplete.js.map +0 -1
  2778. package/dist/src/tui/tui-startup-resources.js.map +0 -1
  2779. package/dist/src/tui/tui-startup-text.js.map +0 -1
  2780. package/dist/src/tui/tui-stdio-filter.js.map +0 -1
  2781. package/dist/src/tui/tui-submit.js.map +0 -1
  2782. package/dist/src/tui/tui-suspend.js.map +0 -1
  2783. package/dist/src/tui/tui-timeline-picker.js.map +0 -1
  2784. package/dist/src/tui/tui-timeline.js.map +0 -1
  2785. package/dist/src/tui/tui-tool-diff.js.map +0 -1
  2786. package/dist/src/tui/tui-tool-result.js.map +0 -1
  2787. package/dist/src/tui/tui-transcript-tree-picker.js.map +0 -1
  2788. package/dist/src/tui/tui-transcript-tree.js.map +0 -1
  2789. package/dist/src/tui/tui-types.js.map +0 -1
  2790. package/dist/src/tui/tui-workflow-slash.js.map +0 -1
  2791. package/dist/src/tui/tui.js.map +0 -1
  2792. package/dist/src/tui/xopc-tui-keybindings.js.map +0 -1
  2793. package/dist/src/tunnel/broker-client.js.map +0 -1
  2794. package/dist/src/tunnel/consent.js.map +0 -1
  2795. package/dist/src/tunnel/enable-lan-pairing.js.map +0 -1
  2796. package/dist/src/tunnel/env.js.map +0 -1
  2797. package/dist/src/tunnel/frp-subdomain-host.js.map +0 -1
  2798. package/dist/src/tunnel/frpc-binary.js.map +0 -1
  2799. package/dist/src/tunnel/frpc-config.js.map +0 -1
  2800. package/dist/src/tunnel/frpc-extract.js.map +0 -1
  2801. package/dist/src/tunnel/frpc-process.js.map +0 -1
  2802. package/dist/src/tunnel/gateway-lifecycle.js.map +0 -1
  2803. package/dist/src/tunnel/pair-context.js.map +0 -1
  2804. package/dist/src/tunnel/pair-url.js.map +0 -1
  2805. package/dist/src/tunnel/pairing-rate-limit.js.map +0 -1
  2806. package/dist/src/tunnel/pairing.js.map +0 -1
  2807. package/dist/src/tunnel/tunnel-audit.js.map +0 -1
  2808. package/dist/src/tunnel/tunnel-config.js.map +0 -1
  2809. package/dist/src/tunnel/tunnel-persist.js.map +0 -1
  2810. package/dist/src/tunnel/tunnel-qr.js.map +0 -1
  2811. package/dist/src/tunnel/tunnel-rate-limit.js.map +0 -1
  2812. package/dist/src/tunnel/tunnel-service.js.map +0 -1
  2813. package/dist/src/tunnel/tunnel-state.js.map +0 -1
  2814. package/dist/src/tunnel/well-known.js.map +0 -1
  2815. package/dist/src/user-context/config.js.map +0 -1
  2816. package/dist/src/user-context/import.js.map +0 -1
  2817. package/dist/src/user-context/owner.js.map +0 -1
  2818. package/dist/src/user-context/profile.js.map +0 -1
  2819. package/dist/src/user-context/projection.js.map +0 -1
  2820. package/dist/src/user-context/runtime.js.map +0 -1
  2821. package/dist/src/user-context/source-recommendations.js.map +0 -1
  2822. package/dist/src/user-context/trust-policy.js.map +0 -1
  2823. package/dist/src/utils/global-singleton.js.map +0 -1
  2824. package/dist/src/utils/helpers.js.map +0 -1
  2825. package/dist/src/utils/index.js.map +0 -1
  2826. package/dist/src/utils/is-record.js.map +0 -1
  2827. package/dist/src/utils/logger/audit.js.map +0 -1
  2828. package/dist/src/utils/logger/config.js.map +0 -1
  2829. package/dist/src/utils/logger/context.js.map +0 -1
  2830. package/dist/src/utils/logger/exporters.js.map +0 -1
  2831. package/dist/src/utils/logger/index.js.map +0 -1
  2832. package/dist/src/utils/logger/log-store.js.map +0 -1
  2833. package/dist/src/utils/logger/log-stream.js.map +0 -1
  2834. package/dist/src/utils/logger/pino-record.js.map +0 -1
  2835. package/dist/src/utils/logger/redact.js.map +0 -1
  2836. package/dist/src/utils/logger/rotation.js.map +0 -1
  2837. package/dist/src/utils/logger/shutdown.js.map +0 -1
  2838. package/dist/src/utils/logger/stats.js.map +0 -1
  2839. package/dist/src/utils/logger/streams.js.map +0 -1
  2840. package/dist/src/utils/logger/types.js.map +0 -1
  2841. package/dist/src/utils/logger.js.map +0 -1
  2842. package/dist/src/utils/redact-sensitive-url.js.map +0 -1
  2843. package/dist/src/utils/sanitize-log.js.map +0 -1
  2844. package/dist/src/utils/string-coerce.js.map +0 -1
  2845. package/dist/src/voice/language-profile.js.map +0 -1
  2846. package/dist/src/voice/local/model-files.js.map +0 -1
  2847. package/dist/src/voice/local/model-manager.js.map +0 -1
  2848. package/dist/src/voice/local/models.js.map +0 -1
  2849. package/dist/src/voice/local/runtime-client.js.map +0 -1
  2850. package/dist/src/voice/local/runtime-dispatcher.js.map +0 -1
  2851. package/dist/src/voice/local/runtime-worker.js.map +0 -1
  2852. package/dist/src/voice/local/wav.js.map +0 -1
  2853. package/dist/src/voice/metadata/builtin.js.map +0 -1
  2854. package/dist/src/voice/metadata/registry.js.map +0 -1
  2855. package/dist/src/voice/stt/availability.js.map +0 -1
  2856. package/dist/src/voice/stt/config-slice.js.map +0 -1
  2857. package/dist/src/voice/stt/factory.js.map +0 -1
  2858. package/dist/src/voice/stt/index.js.map +0 -1
  2859. package/dist/src/voice/stt/list-providers.js.map +0 -1
  2860. package/dist/src/voice/stt/mention.js.map +0 -1
  2861. package/dist/src/voice/stt/preflight.js.map +0 -1
  2862. package/dist/src/voice/stt/providers/alibaba-transcription.js.map +0 -1
  2863. package/dist/src/voice/stt/providers/local-transcription.js.map +0 -1
  2864. package/dist/src/voice/stt/providers/openai-transcription.js.map +0 -1
  2865. package/dist/src/voice/stt/transcribe-core.js.map +0 -1
  2866. package/dist/src/voice/stt/types.js.map +0 -1
  2867. package/dist/src/voice/tts/audio.js.map +0 -1
  2868. package/dist/src/voice/tts/config-slice.js.map +0 -1
  2869. package/dist/src/voice/tts/directives.js.map +0 -1
  2870. package/dist/src/voice/tts/factory.js.map +0 -1
  2871. package/dist/src/voice/tts/list-providers.js.map +0 -1
  2872. package/dist/src/voice/tts/merge-config.js.map +0 -1
  2873. package/dist/src/voice/tts/openai-compatible-speech.js.map +0 -1
  2874. package/dist/src/voice/tts/payload.js.map +0 -1
  2875. package/dist/src/voice/tts/preprocess.js.map +0 -1
  2876. package/dist/src/voice/tts/providers/alibaba-speech.js.map +0 -1
  2877. package/dist/src/voice/tts/providers/edge-speech.js.map +0 -1
  2878. package/dist/src/voice/tts/providers/minimax-speech.js.map +0 -1
  2879. package/dist/src/voice/tts/providers/openai-speech.js.map +0 -1
  2880. package/dist/src/voice/tts/sentence-boundary.js.map +0 -1
  2881. package/dist/src/voice/tts/service.js.map +0 -1
  2882. package/dist/src/voice/tts/speak-core.js.map +0 -1
  2883. package/dist/src/voice/tts/speech-registry.js.map +0 -1
  2884. package/dist/src/voice/tts/status-tracker.js.map +0 -1
  2885. package/dist/src/voice/tts/summarize.js.map +0 -1
  2886. package/dist/src/voice/tts/types.js.map +0 -1
  2887. package/dist/src/work-discovery/analyzer.js.map +0 -1
  2888. package/dist/src/work-discovery/probe.js.map +0 -1
  2889. package/dist/src/work-discovery/repository.js.map +0 -1
  2890. package/dist/src/work-discovery/service.js.map +0 -1
  2891. package/dist/src/work-items/agent-context.js.map +0 -1
  2892. package/dist/src/work-items/work-item-service.js.map +0 -1
  2893. package/dist/src/work-items/work-item-store.js.map +0 -1
  2894. package/dist/src/work-items/work-item-workflow-judge.js.map +0 -1
  2895. package/dist/src/workflows/authoring/workflow-draft-store.js.map +0 -1
  2896. package/dist/src/workflows/domain/definition-utils.js.map +0 -1
  2897. package/dist/src/workflows/domain/run.js.map +0 -1
  2898. package/dist/src/workflows/domain/schema-validation.js.map +0 -1
  2899. package/dist/src/workflows/domain/validation.js.map +0 -1
  2900. package/dist/src/workflows/draft/workflow-draft-prompt.js.map +0 -1
  2901. package/dist/src/workflows/draft/workflow-draft-service.js.map +0 -1
  2902. package/dist/src/workflows/draft/workflow-draft-validator.js.map +0 -1
  2903. package/dist/src/workflows/engine/projector.js.map +0 -1
  2904. package/dist/src/workflows/engine/workflow-engine.js.map +0 -1
  2905. package/dist/src/workflows/registry/catalog-workflow-definition-registry.js.map +0 -1
  2906. package/dist/src/workflows/runtime/graph-workflow-runtime.js.map +0 -1
  2907. package/dist/src/workflows/service/run-view-to-snapshot.js.map +0 -1
  2908. package/dist/src/workflows/service/workflow-run-service.js.map +0 -1
  2909. package/dist/src/workflows/service/workflow-session-bridge.js.map +0 -1
  2910. package/dist/src/workflows/service/workflow-session-key.js.map +0 -1
  2911. package/dist/src/workflows/store/event-store.js.map +0 -1
  2912. package/dist/src/workflows/store/paths.js.map +0 -1
  2913. package/dist/src/workflows/store/run-index-store.js.map +0 -1
  2914. package/dist/src/workflows/store/run-store.js.map +0 -1
@@ -1 +0,0 @@
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"./chunk-QUQL4437-DXsxWP7r.js";import{t as a}from"./cn-BQ_8x0bT.js";import{t as o}from"./messages-t1yPaVCt.js";import{d as s,i as c,n as l,o as u}from"./locale-store-BneNAR8R.js";import{i as d}from"./vendor-swr-BIWyz7Rc.js";import{$l as f,As as p,Bs as m,Hn as h,Ul as g,Wl as _,Xn as v,Zl as y,Zn as b,cc as ee,ei as x,io as S,ls as C,nl as w,rr as T,ss as E,xu as D,zc as O}from"./index-CH7XN6KY.js";import{n as k,t as A}from"./settings-page-layout-HdlQOOqp.js";import{n as j}from"./settings-loading-skeleton-vitElc-n.js";import{n as M,t as N}from"./settings-form-section-CjINay6t.js";var P=e(t(),1),F=n();function I(e){if(!e||typeof e!=`object`)return 0;let t=e.providers;return!t||typeof t!=`object`||Array.isArray(t)?0:Object.values(t).filter(e=>typeof e==`string`&&E(e)).length}function L(e){if(!e||typeof e!=`object`)return``;let t=e.agents;if(!t||typeof t!=`object`||Array.isArray(t))return``;let n=t,r=typeof n.defaultPreset==`string`&&n.defaultPreset.trim()?n.defaultPreset.trim():`default`,i=n.capabilityPresets,a=i&&typeof i==`object`&&!Array.isArray(i)?i[r]:void 0,o=a&&typeof a==`object`&&!Array.isArray(a)?a.models:void 0;if(!o||typeof o!=`object`||Array.isArray(o))return``;let s=o,c=s.roles;if(!c||typeof c!=`object`||Array.isArray(c))return``;let l=c,u=typeof s.defaultRole==`string`&&s.defaultRole.trim()?s.defaultRole.trim():Object.keys(l)[0],d=u?l[u]:void 0;if(!d||typeof d!=`object`||Array.isArray(d))return``;let f=d.model;return typeof f==`string`?f.trim():``}function R(e){if(!e||typeof e!=`object`)return!1;let t=e.channels;return!t||typeof t!=`object`||Array.isArray(t)?!1:Object.values(t).some(e=>{if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;if(`configured`in t||`config`in t||`schema`in t||`uiHints`in t){if(t.configured===!0)return!0;let e=t.config;if(!e||typeof e!=`object`||Array.isArray(e))return!1;let n=e;return n.enabled===!0||Object.keys(n).length>0}return t.enabled===!0||Object.keys(t).length>0})}function z(e){if(!e||typeof e!=`object`)return{enabled:!1,backend:`extension`};let t=e.browser;if(!t||typeof t!=`object`||Array.isArray(t))return{enabled:!1,backend:`extension`};let n=t;return{enabled:n.enabled===!0,backend:typeof n.backend==`string`&&n.backend.trim()?n.backend.trim():`extension`}}function B(e){return e?`pass`:`fail`}function V(e){if(e===`provider-auth`)return`/settings/credentials`;if(e===`config-health`)return`/settings/gateway`;if(e===`state-integrity`||e===`workspace-status`)return`/agents`;if(e===`database-schema`||e===`session-integrity`)return`/settings/sessions`;if(e===`channel-config`||e===`channel-pairing-pending`||e.startsWith(`channel:`))return`/channels`;if(e===`security-audit`||e===`gateway-service`||e===`gateway-health`)return`/settings/gateway`;if(e===`version-check`)return`/settings/desktop-app`}function H(e){return{fail:4,warn:3,skip:2,pass:1}[e]}function te(e){return e.filter(e=>e.status===`fail`||e.status===`warn`).map(e=>({id:e.id,label:e.label,status:e.status,message:e.message,hints:e.hints,path:V(e.id),source:`doctor`})).toSorted((e,t)=>H(t.status)-H(e.status)||e.label.localeCompare(t.label))}function U(e){let t=new Map(e.doctorChecks.map(e=>[e.id,e])),n=[];for(let e of[`security-audit`,`channel-config`,`channel-pairing-pending`,`gateway-health`]){let r=t.get(e);r&&n.push({id:r.id,label:r.label,status:r.status,message:r.message,path:V(r.id)})}if(e.logsHealth){let t=e.logsHealth.stats?.errorsLast24h??0;n.push({id:`logs-health`,label:`Logs`,status:e.logsHealth.shuttingDown||t>0?`warn`:`pass`,message:e.logsHealth.shuttingDown?`Logger is shutting down.`:t>0?`${t} error(s) in the last 24 hours.`:`Log system is healthy.`,path:`/settings/logs`})}for(let t of e.browserDiagnostics??[])n.push(t);return n}function ne(e){let t=I(e.config),n=e.providerMeta?.configured??t,r=e.providerMeta?.total??0,i=n>0||t>0,a=L(e.config),o=a.length>0,s=e.hasToken&&e.sseConnected,c=R(e.config),l=e.skillCount>0,u=e.doctorChecks??[],d=te(u),f=[{id:`gateway`,done:s,detail:s?e.labels.gatewayOnline:e.labels.gatewayOffline},{id:`provider`,done:i,detail:i?e.providerMeta&&e.providerMeta.total>0?e.labels.providersMetaReady(n,r):e.labels.providersConfigured(t):e.labels.providersMissing},{id:`defaultModel`,done:o,detail:o?e.labels.modelConfigured(a):e.labels.modelMissing},{id:`channel`,done:c,optional:!0,detail:c?e.labels.channelConfigured:e.labels.channelMissing},{id:`skill`,done:l,optional:!0,detail:l?e.labels.skillsConfigured(e.skillCount):e.labels.skillsMissing}],p=f.filter(e=>!e.optional).every(e=>e.done),m=f.every(e=>e.done),h=[{id:`gateway`,status:B(s),title:`Gateway`,detail:s?e.labels.gatewayOnline:e.labels.gatewayOffline,path:`/settings/gateway`},{id:`provider`,status:B(i),title:`Model provider`,detail:i?e.providerMeta&&e.providerMeta.total>0?e.labels.providersMetaReady(n,r):e.labels.providersConfigured(t):e.labels.providersMissing,path:`/settings/credentials`},{id:`defaultModel`,status:B(o),title:`Default model`,detail:o?e.labels.modelConfigured(a):e.labels.modelMissing,path:`/settings/credentials?tab=services`},{id:`ready`,status:p?`pass`:`fail`,title:`Chat readiness`,detail:p?e.labels.readyToChat:e.labels.modelMissing,path:`/chat`}],g=d.some(e=>e.status===`fail`),_=d.some(e=>e.status===`warn`),v=g?`blocked`:_?`attention`:p?`ready`:`setup`,y=U({doctorChecks:u,logsHealth:e.logsHealth,browserDiagnostics:e.browserDiagnostics});return{gatewayConnected:s,providerConfigured:i,providerCount:t,providerMetaConfigured:n,providerMetaTotal:r,defaultModel:a,defaultModelConfigured:o,channelConfigured:c,skillInstalled:l,skillCount:e.skillCount,checklist:f,readiness:h,issues:d,healthTier:v,diagnosticSignals:y,requiredComplete:p,allComplete:m}}function re(e){return z(e)}function W(e){return!e.id||!e.label||!e.status||!e.message||![`pass`,`warn`,`fail`,`skip`].includes(e.status)?null:{id:e.id,label:e.label,status:e.status,message:e.message,hints:Array.isArray(e.hints)?e.hints.filter(e=>typeof e==`string`):[],fixed:e.fixed===!0,findings:Array.isArray(e.findings)?e.findings:void 0}}function ie(){return s(`/api/doctor`)}async function ae(){return((await c(ie())).checks??[]).map(W).filter(e=>e!==null)}function oe(){return s(`/api/logs/health`)}async function se(){return c(oe())}function G(e){return e?`pass`:`warn`}function K(e){return`/settings/agent-browser?tab=${encodeURIComponent(e)}`}function ce(e){return e?.enabled?[`setup-browser-diagnostics`,e]:null}async function le(e){if(!e.enabled)return[];if(e.backend===`local`){let e=await c(s(`/api/browser/playwright/doctor`)),t=e.payload?.installed===!0;return[{id:`browser-playwright`,label:`Browser: Playwright`,status:G(t),message:t?`Local Chromium is installed.`:e.payload?.reason??`Local Chromium is not installed.`,path:K(`local`)}]}if(e.backend===`cloakbrowser`){let e=await c(s(`/api/browser/cloakbrowser/doctor`)),t=e.payload?.installed===!0;return[{id:`browser-cloakbrowser`,label:`Browser: CloakBrowser`,status:G(t),message:t?`CloakBrowser ${e.payload?.version??``}`.trim():`CloakBrowser is not installed.`,path:K(`cloakbrowser`)}]}if(e.backend===`extension`){let e=await c(s(`/api/browser/extension-status?probe=true`)),t=e.artifacts?.installed===!0,n=e.connected===!0,r=e.artifacts?.needsRefresh===!0||e.artifacts?.needsChromeReload===!0;return[{id:`browser-extension`,label:`Browser: Chrome extension`,status:n?`pass`:`warn`,message:n?`Chrome extension bridge is connected.`:t?r?`Chrome extension needs refresh.`:`Chrome extension is installed but not connected.`:`Chrome extension is not installed.`,path:K(`extension`)}]}return[{id:`browser-playwright`,label:`Browser`,status:`skip`,message:`Browser backend "${e.backend}" is not checked on this overview.`,path:K(e.backend||`overview`)}]}function q(){let e=(0,F.c)(57),t=u(he),n=l(me),r;e[0]===n?r=e[1]:(r=o(n),e[0]=n,e[1]=r);let i=r,a=i.setupStatus.labels,s=T(pe),{data:c,error:f,isLoading:p,mutate:m}=S(!!t),g;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(g={revalidateOnFocus:!1},e[2]=g):g=e[2];let{data:_,error:y,isLoading:ee,mutate:x}=d(t?`setup-checklist-skills`:null,fe,g),C;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(C={revalidateOnFocus:!1},e[3]=C):C=e[3];let{data:w,error:E,isLoading:D,mutate:O}=d(t?`setup-checklist-provider-meta`:null,h,C),k;e[4]===t?k=e[5]:(k=t?ie():null,e[4]=t,e[5]=k);let A;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(A={revalidateOnFocus:!1},e[6]=A):A=e[6];let{data:j,error:M,isLoading:N,mutate:P}=d(k,ae,A),I;e[7]===t?I=e[8]:(I=t?oe():null,e[7]=t,e[8]=I);let L;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(L={revalidateOnFocus:!1},e[9]=L):L=e[9];let{data:R,isLoading:z,mutate:B}=d(I,se,L);c?.payload?.config;let V=c?.payload?.config,H;e[10]===V?H=e[11]:(H=re(V),e[10]=V,e[11]=H);let te=t?H:null,U;e[12]===te?U=e[13]:(U=ce(te),e[12]=te,e[13]=U);let W;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(W={revalidateOnFocus:!1},e[14]=W):W=e[14];let{data:G,isLoading:K,mutate:le}=d(U,de,W),q;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(q={revalidateOnFocus:!1},e[15]=q):q=e[15],d(t?v:null,b,q);let J=!t||!p&&!ee&&!D&&!N&&!z&&!K,Y=!!(f||y||E||M),X;bb0:{if(!t||!J){X=null;break bb0}let n=_?.catalog?.length??0,r;if(e[16]!==G||e[17]!==c?.payload?.config||e[18]!==j||e[19]!==a.channelConfigured||e[20]!==a.channelMissing||e[21]!==a.gatewayOffline||e[22]!==a.gatewayOnline||e[23]!==a.modelConfigured||e[24]!==a.modelMissing||e[25]!==a.providersConfigured||e[26]!==a.providersMetaReady||e[27]!==a.providersMissing||e[28]!==a.skillsConfigured||e[29]!==a.skillsMissing||e[30]!==R||e[31]!==i.setupStatus.requiredCompleteMessage||e[32]!==w||e[33]!==n||e[34]!==s||e[35]!==t){let o=w?.filter(ue).length??0,l=w?.length??0,u;e[37]===a.providersConfigured?u=e[38]:(u=e=>a.providersConfigured.replace(`{{count}}`,String(e)),e[37]=a.providersConfigured,e[38]=u);let d;e[39]===a.providersMetaReady?d=e[40]:(d=(e,t)=>a.providersMetaReady.replace(`{{configured}}`,String(e)).replace(`{{total}}`,String(t)),e[39]=a.providersMetaReady,e[40]=d);let f;e[41]===a.modelConfigured?f=e[42]:(f=e=>a.modelConfigured.replace(`{{model}}`,e),e[41]=a.modelConfigured,e[42]=f);let p;e[43]===a.skillsConfigured?p=e[44]:(p=e=>a.skillsConfigured.replace(`{{count}}`,String(e)),e[43]=a.skillsConfigured,e[44]=p),r=ne({hasToken:!!t,sseConnected:s,config:c?.payload?.config,skillCount:n,providerMeta:l>0?{configured:o,total:l}:null,doctorChecks:j,logsHealth:R,browserDiagnostics:G,labels:{gatewayOnline:a.gatewayOnline,gatewayOffline:a.gatewayOffline,providersConfigured:u,providersMetaReady:d,providersMissing:a.providersMissing,modelConfigured:f,modelMissing:a.modelMissing,channelConfigured:a.channelConfigured,channelMissing:a.channelMissing,skillsConfigured:p,skillsMissing:a.skillsMissing,readyToChat:i.setupStatus.requiredCompleteMessage}}),e[16]=G,e[17]=c?.payload?.config,e[18]=j,e[19]=a.channelConfigured,e[20]=a.channelMissing,e[21]=a.gatewayOffline,e[22]=a.gatewayOnline,e[23]=a.modelConfigured,e[24]=a.modelMissing,e[25]=a.providersConfigured,e[26]=a.providersMetaReady,e[27]=a.providersMissing,e[28]=a.skillsConfigured,e[29]=a.skillsMissing,e[30]=R,e[31]=i.setupStatus.requiredCompleteMessage,e[32]=w,e[33]=n,e[34]=s,e[35]=t,e[36]=r}else r=e[36];X=r}let Z=X,Q;e[45]!==le||e[46]!==m||e[47]!==P||e[48]!==B||e[49]!==O||e[50]!==x?(Q=async()=>{await Promise.all([m(),x(),O(),P(),B(),le()])},e[45]=le,e[46]=m,e[47]=P,e[48]=B,e[49]=O,e[50]=x,e[51]=Q):Q=e[51];let ge=Q,$;return e[52]!==Y||e[53]!==J||e[54]!==ge||e[55]!==Z?($={ready:J,error:Y,snapshot:Z,refresh:ge},e[52]=Y,e[53]=J,e[54]=ge,e[55]=Z,e[56]=$):$=e[56],$}function ue(e){return e.configured}function de(e){let[,t]=e;return le(t)}function fe(){return x()}function pe(e){return e.connectionState===`connected`}function me(e){return e.language}function he(e){return e.token}var J=r();function Y(e){return e===`pass`?`border-success/30 bg-success-soft text-success`:e===`warn`?`border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300`:e===`fail`?`border-red-500/30 bg-red-500/10 text-red-700 dark:text-red-300`:`border-edge bg-surface-hover text-fg-muted`}function X(e){return e===`pass`?y:e===`warn`?p:e===`fail`?_:w}function Z(e,t){return e===`blocked`?{icon:_,className:`bg-red-500/10 text-red-950 dark:text-red-100`,title:t.health.blockedTitle,body:t.health.blockedBody,action:t.health.viewIssues,targetId:`next-steps`}:e===`attention`?{icon:p,className:`bg-amber-500/10 text-amber-950 dark:text-amber-100`,title:t.health.attentionTitle,body:t.health.attentionBody,action:t.health.viewIssues,targetId:`next-steps`}:e===`setup`?{icon:g,className:`bg-surface-base text-fg shadow-surface`,title:t.health.setupTitle,body:t.health.setupBody,action:t.health.continueSetup,targetId:`next-steps`}:{icon:y,className:`bg-success-soft text-success`,title:t.health.readyTitle,body:t.health.readyBody,action:t.health.startChat,actionPath:`/chat`}}function Q(e){let t=(0,F.c)(48),{tier:n,issueCount:r,onRunDoctor:s,ready:c,doctorRunning:u,doctorRunState:d}=e,p=l(ge),m,h,g,_,v,y,b,x,S,w,T;if(t[0]!==r||t[1]!==p||t[2]!==n){h=o(p).setupStatus;let e=Z(n,h),s=e.icon,c=`targetId`in e&&typeof e.targetId==`string`?e.targetId:null,l=`actionPath`in e&&typeof e.actionPath==`string`?e.actionPath:`/chat`;m=c?(0,J.jsxs)(`button`,{type:`button`,onClick:()=>document.getElementById(c)?.scrollIntoView({block:`start`,behavior:`smooth`}),className:`inline-flex items-center gap-1 rounded-lg bg-surface-base px-3 py-2 text-sm font-medium text-fg shadow-sm hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[e.action,(0,J.jsx)(f,{className:`size-4`,"aria-hidden":!0})]}):(0,J.jsxs)(i,{to:l,className:`inline-flex items-center gap-1 rounded-lg bg-surface-base px-3 py-2 text-sm font-medium text-fg shadow-sm hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[e.action,(0,J.jsx)(f,{className:`size-4`,"aria-hidden":!0})]}),T=a(`rounded-xl px-4 py-4`,e.className),w=`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,x=`flex min-w-0 gap-3`,S=(0,J.jsx)(s,{className:`mt-0.5 size-5 shrink-0`,"aria-hidden":!0}),v=`min-w-0`,y=(0,J.jsx)(`h2`,{className:`text-base font-semibold`,children:e.title}),b=(0,J.jsx)(`p`,{className:`mt-1 text-sm opacity-85`,children:e.body}),g=`mt-2 text-xs opacity-75`,_=h.health.issueCount.replace(`{{count}}`,String(r)),t[0]=r,t[1]=p,t[2]=n,t[3]=m,t[4]=h,t[5]=g,t[6]=_,t[7]=v,t[8]=y,t[9]=b,t[10]=x,t[11]=S,t[12]=w,t[13]=T}else m=t[3],h=t[4],g=t[5],_=t[6],v=t[7],y=t[8],b=t[9],x=t[10],S=t[11],w=t[12],T=t[13];let E;t[14]!==g||t[15]!==_?(E=(0,J.jsx)(`p`,{className:g,children:_}),t[14]=g,t[15]=_,t[16]=E):E=t[16];let D;t[17]!==E||t[18]!==v||t[19]!==y||t[20]!==b?(D=(0,J.jsxs)(`div`,{className:v,children:[y,b,E]}),t[17]=E,t[18]=v,t[19]=y,t[20]=b,t[21]=D):D=t[21];let k;t[22]!==D||t[23]!==x||t[24]!==S?(k=(0,J.jsxs)(`div`,{className:x,children:[S,D]}),t[22]=D,t[23]=x,t[24]=S,t[25]=k):k=t[25];let A;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(A=a(`inline-flex items-center gap-2 rounded-lg border border-edge bg-surface-base 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`,C.press),t[26]=A):A=t[26];let j=!c||u,M;t[27]===u?M=t[28]:(M=u?(0,J.jsx)(O,{className:`size-4 animate-spin`,"aria-hidden":!0}):(0,J.jsx)(ee,{className:`size-4`,"aria-hidden":!0}),t[27]=u,t[28]=M);let N=u?h.health.runDoctorRunning:h.health.runDoctor,P;t[29]!==u||t[30]!==s||t[31]!==j||t[32]!==M||t[33]!==N?(P=(0,J.jsxs)(`button`,{type:`button`,className:A,onClick:s,disabled:j,"aria-busy":u,children:[M,N]}),t[29]=u,t[30]=s,t[31]=j,t[32]=M,t[33]=N,t[34]=P):P=t[34];let I;t[35]!==m||t[36]!==P?(I=(0,J.jsxs)(`div`,{className:`flex shrink-0 flex-wrap gap-2`,children:[m,P]}),t[35]=m,t[36]=P,t[37]=I):I=t[37];let L;t[38]!==k||t[39]!==I||t[40]!==w?(L=(0,J.jsxs)(`div`,{className:w,children:[k,I]}),t[38]=k,t[39]=I,t[40]=w,t[41]=L):L=t[41];let R=u?h.health.doctorRunningMessage:d===`success`?h.health.doctorCompleteMessage:d===`error`?h.health.doctorFailedMessage:h.health.doctorIdleMessage,z;t[42]===R?z=t[43]:(z=(0,J.jsx)(`p`,{className:`mt-3 text-xs opacity-75`,role:`status`,"aria-live":`polite`,children:R}),t[42]=R,t[43]=z);let B;return t[44]!==L||t[45]!==z||t[46]!==T?(B=(0,J.jsxs)(`section`,{className:T,children:[L,z]}),t[44]=L,t[45]=z,t[46]=T,t[47]=B):B=t[47],B}function ge(e){return e.language}function $(e){let t=(0,F.c)(34),{issue:n,fixLabel:r}=e,o;t[0]===n.status?o=t[1]:(o=X(n.status),t[0]=n.status,t[1]=o);let s=o,c;t[2]===s?c=t[3]:(c=(0,J.jsx)(s,{className:`mt-0.5 size-4 shrink-0`,"aria-hidden":!0}),t[2]=s,t[3]=c);let l;t[4]===n.label?l=t[5]:(l=(0,J.jsx)(`span`,{className:`text-sm font-semibold text-fg`,children:n.label}),t[4]=n.label,t[5]=l);let u;t[6]===n.status?u=t[7]:(u=a(`rounded-full border px-2 py-0.5 text-[11px] font-medium uppercase`,Y(n.status)),t[6]=n.status,t[7]=u);let d;t[8]!==n.status||t[9]!==u?(d=(0,J.jsx)(`span`,{className:u,children:n.status}),t[8]=n.status,t[9]=u,t[10]=d):d=t[10];let p;t[11]!==l||t[12]!==d?(p=(0,J.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[l,d]}),t[11]=l,t[12]=d,t[13]=p):p=t[13];let m;t[14]===n.message?m=t[15]:(m=(0,J.jsx)(`span`,{className:`mt-1 block text-sm text-fg-muted`,children:n.message}),t[14]=n.message,t[15]=m);let h;t[16]===n.hints[0]?h=t[17]:(h=n.hints[0]?(0,J.jsx)(`span`,{className:`mt-1 block truncate text-xs text-fg-subtle`,children:n.hints[0]}):null,t[16]=n.hints[0],t[17]=h);let g;t[18]!==p||t[19]!==m||t[20]!==h?(g=(0,J.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[p,m,h]}),t[18]=p,t[19]=m,t[20]=h,t[21]=g):g=t[21];let _;t[22]!==r||t[23]!==n.path?(_=n.path?(0,J.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 text-xs font-medium text-accent-fg`,children:[r,(0,J.jsx)(f,{className:`size-4`,"aria-hidden":!0})]}):null,t[22]=r,t[23]=n.path,t[24]=_):_=t[24];let v;t[25]!==_||t[26]!==c||t[27]!==g?(v=(0,J.jsxs)(J.Fragment,{children:[c,g,_]}),t[25]=_,t[26]=c,t[27]=g,t[28]=v):v=t[28];let y=v;if(n.path){let e;return t[29]!==y||t[30]!==n.path?(e=(0,J.jsx)(i,{to:n.path,className:`flex items-start gap-3 rounded-lg bg-surface-panel/80 px-3 py-3 shadow-surface hover:bg-surface-hover/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:y}),t[29]=y,t[30]=n.path,t[31]=e):e=t[31],e}let b;return t[32]===y?b=t[33]:(b=(0,J.jsx)(`div`,{className:`flex items-start gap-3 rounded-lg bg-surface-panel/80 px-3 py-3 shadow-surface`,children:y}),t[32]=y,t[33]=b),b}function _e(e){let t=(0,F.c)(27),{item:n,labels:r}=e,o;t[0]===n.status?o=t[1]:(o=X(n.status),t[0]=n.status,t[1]=o);let s=o,c=r[n.id]??n.title,l;t[2]===n.status?l=t[3]:(l=a(`flex size-7 shrink-0 items-center justify-center rounded-full border`,Y(n.status)),t[2]=n.status,t[3]=l);let u;t[4]===s?u=t[5]:(u=(0,J.jsx)(s,{className:`size-4`,"aria-hidden":!0}),t[4]=s,t[5]=u);let d;t[6]!==l||t[7]!==u?(d=(0,J.jsx)(`span`,{className:l,children:u}),t[6]=l,t[7]=u,t[8]=d):d=t[8];let p;t[9]===c?p=t[10]:(p=(0,J.jsx)(`span`,{className:`block text-sm font-medium text-fg`,children:c}),t[9]=c,t[10]=p);let m;t[11]===n.detail?m=t[12]:(m=(0,J.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-fg-muted`,children:n.detail}),t[11]=n.detail,t[12]=m);let h;t[13]!==p||t[14]!==m?(h=(0,J.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[p,m]}),t[13]=p,t[14]=m,t[15]=h):h=t[15];let g;t[16]===n.path?g=t[17]:(g=n.path?(0,J.jsx)(f,{className:`size-4 shrink-0 text-fg-subtle`,"aria-hidden":!0}):null,t[16]=n.path,t[17]=g);let _;t[18]!==d||t[19]!==h||t[20]!==g?(_=(0,J.jsxs)(J.Fragment,{children:[d,h,g]}),t[18]=d,t[19]=h,t[20]=g,t[21]=_):_=t[21];let v=_;if(n.path){let e;return t[22]!==v||t[23]!==n.path?(e=(0,J.jsx)(i,{to:n.path,className:`flex items-center gap-3 rounded-lg px-3 py-3 hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:v}),t[22]=v,t[23]=n.path,t[24]=e):e=t[24],e}let y;return t[25]===v?y=t[26]:(y=(0,J.jsx)(`div`,{className:`flex items-center gap-3 rounded-lg px-3 py-3`,children:v}),t[25]=v,t[26]=y),y}function ve(e){let t=(0,F.c)(29),{signal:n,fixLabel:r}=e,o;t[0]===n.status?o=t[1]:(o=X(n.status),t[0]=n.status,t[1]=o);let s=o,c;t[2]===s?c=t[3]:(c=(0,J.jsx)(s,{className:`mt-0.5 size-4 shrink-0`,"aria-hidden":!0}),t[2]=s,t[3]=c);let l;t[4]===n.label?l=t[5]:(l=(0,J.jsx)(`span`,{className:`block truncate text-sm font-medium text-fg`,children:n.label}),t[4]=n.label,t[5]=l);let u;t[6]===n.message?u=t[7]:(u=(0,J.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-fg-muted`,children:n.message}),t[6]=n.message,t[7]=u);let d;t[8]!==l||t[9]!==u?(d=(0,J.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[l,u]}),t[8]=l,t[9]=u,t[10]=d):d=t[10];let f;t[11]===n.status?f=t[12]:(f=a(`shrink-0 rounded-full border px-2 py-0.5 text-[11px] font-medium uppercase`,Y(n.status)),t[11]=n.status,t[12]=f);let p;t[13]!==n.status||t[14]!==f?(p=(0,J.jsx)(`span`,{className:f,children:n.status}),t[13]=n.status,t[14]=f,t[15]=p):p=t[15];let m;t[16]!==r||t[17]!==n.path?(m=n.path?(0,J.jsx)(`span`,{className:`sr-only`,children:r}):null,t[16]=r,t[17]=n.path,t[18]=m):m=t[18];let h;t[19]!==c||t[20]!==d||t[21]!==p||t[22]!==m?(h=(0,J.jsxs)(J.Fragment,{children:[c,d,p,m]}),t[19]=c,t[20]=d,t[21]=p,t[22]=m,t[23]=h):h=t[23];let g=h;if(n.path){let e;return t[24]!==g||t[25]!==n.path?(e=(0,J.jsx)(i,{to:n.path,className:`flex min-w-0 items-start gap-2 rounded-lg bg-surface-panel/80 px-3 py-2.5 shadow-surface hover:bg-surface-hover/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:g}),t[24]=g,t[25]=n.path,t[26]=e):e=t[26],e}let _;return t[27]===g?_=t[28]:(_=(0,J.jsx)(`div`,{className:`flex min-w-0 items-start gap-2 rounded-lg bg-surface-panel/80 px-3 py-2.5 shadow-surface`,children:g}),t[27]=g,t[28]=_),_}function ye(){let e=o(l(e=>e.language)).setupStatus,{ready:t,error:n,snapshot:r,refresh:i}=q(),[s,c]=(0,P.useState)(!1),[u,d]=(0,P.useState)(`idle`),f=r?.diagnosticSignals.filter(e=>e.status===`fail`||e.status===`warn`)??[],h=async()=>{if(!(s||!t)){c(!0),d(`idle`);try{await i(),d(`success`)}catch{d(`error`)}finally{c(!1)}}};return(0,J.jsxs)(A,{gap:`gap-6`,children:[(0,J.jsx)(k,{title:e.title,subtitle:e.subtitle,actions:(0,J.jsxs)(`button`,{type:`button`,className:a(`inline-flex shrink-0 items-center gap-2 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`,C.press),onClick:()=>void h(),disabled:!t||s,"aria-busy":s,children:[(0,J.jsx)(ee,{className:a(`size-4`,(!t||s)&&`animate-spin`),"aria-hidden":!0}),s?e.health.runDoctorRunning:e.refresh]})}),n?(0,J.jsx)(`p`,{className:`rounded-xl border border-red-300/40 bg-red-50 px-4 py-3 text-sm text-red-700 dark:border-red-900/40 dark:bg-red-950/30 dark:text-red-300`,children:e.loadError}):null,!t||!r?(0,J.jsx)(j,{sections:2}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Q,{tier:r.healthTier,issueCount:r.issues.length,ready:t,onRunDoctor:()=>void h(),doctorRunning:s,doctorRunState:u}),(0,J.jsxs)(N,{id:`next-steps`,children:[(0,J.jsx)(M,{icon:r.issues.length?p:D,title:e.nextStepsTitle,subtitle:r.issues.length?e.nextStepsIssuesSubtitle:e.nextStepsReadySubtitle}),r.issues.length?(0,J.jsx)(`div`,{className:`mt-4 flex flex-col gap-2`,children:r.issues.slice(0,8).map(t=>(0,J.jsx)($,{issue:t,fixLabel:e.fixIssue},`${t.source}:${t.id}`))}):(0,J.jsx)(`div`,{className:`mt-4 rounded-lg bg-surface-panel/80 shadow-surface`,children:r.readiness.map(t=>(0,J.jsx)(_e,{item:t,labels:e.readinessLabels},t.id))})]}),(0,J.jsxs)(N,{children:[(0,J.jsx)(M,{icon:m,title:e.diagnosticsTitle,subtitle:e.diagnosticsSubtitle}),f.length?(0,J.jsx)(`div`,{className:`mt-4 grid gap-2 md:grid-cols-2`,children:f.map(t=>(0,J.jsx)(ve,{signal:t,fixLabel:e.fixIssue},t.id))}):(0,J.jsx)(`p`,{className:`mt-4 rounded-lg bg-surface-panel/80 px-3 py-3 text-sm text-fg-muted shadow-surface`,children:r.diagnosticSignals.length?e.diagnosticsAllClear:e.diagnosticsEmpty})]})]})]})}export{ye as SetupStatusPanel};
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{d as i}from"./chunk-QUQL4437-DXsxWP7r.js";import{t as a}from"./cn-BQ_8x0bT.js";import{t as o}from"./check-BODqo66o.js";import{t as s}from"./copy-to-clipboard-HOJ79TWv.js";import{t as c}from"./messages-t1yPaVCt.js";import{d as l,i as u,n as d,o as f}from"./locale-store-BneNAR8R.js";import{i as p}from"./vendor-swr-BIWyz7Rc.js";import{Ai as m,Ao as h,Fi as g,Fo as _,Go as v,Ii as y,Li as b,Lr as x,Mi as S,Ni as C,No as w,Oi as T,Pi as E,Pl as D,Po as ee,Ri as O,Sl as k,Wr as A,ao as j,cc as te,hc as M,hs as N,io as P,ji as F,jo as I,js as L,ko as ne,kt as re,ms as R,oa as ie,qo as z,ro as ae,tr as B,tu as oe,vl as se,ys as ce,zc as le,zl as V}from"./index-CH7XN6KY.js";import{n as H,r as ue,t as de}from"./settings-page-layout-HdlQOOqp.js";import{t as U}from"./settings-form-section-CjINay6t.js";import{t as fe}from"./page-tabs-DMlQERNg.js";var W=e(t(),1),pe=n(),G={enabled:!0,defaultTtlHours:24,maxTtlDays:7,maxActiveShares:100,maxActiveSites:5,maxFileSizeMb:100,inlinePreviewMimes:[`image/png`,`image/jpeg`,`image/gif`,`image/webp`,`image/svg+xml`,`application/pdf`,`text/html`,`text/markdown`,`text/plain`,`application/json`]},K=36e5,q=864e5,me=1048576;function J(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function he(e,t=32){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&e.trim().length>0).map(e=>e.trim()).slice(0,t):[]}function ge(e){let t=J(e)?e:{},n=J(t.gateway)?t.gateway:{},r=J(n.share)?n.share:{},i=J(n.siteShare)?n.siteShare:{},a=typeof r.defaultTtlMs==`number`&&Number.isFinite(r.defaultTtlMs)?Math.floor(r.defaultTtlMs):G.defaultTtlHours*K,o=typeof r.maxTtlMs==`number`&&Number.isFinite(r.maxTtlMs)?Math.floor(r.maxTtlMs):G.maxTtlDays*q,s=typeof r.maxFileSize==`number`&&Number.isFinite(r.maxFileSize)?Math.floor(r.maxFileSize):G.maxFileSizeMb*me;return{enabled:r.enabled!==!1,defaultTtlHours:Math.max(1,Math.round(a/K)),maxTtlDays:Math.max(1,Math.round(o/q)),maxActiveShares:typeof r.maxActiveShares==`number`&&Number.isFinite(r.maxActiveShares)?Math.max(1,Math.min(1e4,Math.floor(r.maxActiveShares))):G.maxActiveShares,maxActiveSites:typeof i.maxActiveSites==`number`&&Number.isFinite(i.maxActiveSites)?Math.max(1,Math.min(1e3,Math.floor(i.maxActiveSites))):G.maxActiveSites,maxFileSizeMb:Math.max(1,Math.round(s/me)),inlinePreviewMimes:he(r.inlinePreviewMimes,32).length?he(r.inlinePreviewMimes,32):[...G.inlinePreviewMimes]}}function _e(e){let t=e.defaultTtlHours*K,n=e.maxTtlDays*q;return t<6e4||t>6048e5?`Default share TTL must be between 1 minute and 7 days.`:n<6e4||n>2592e6?`Maximum share TTL must be between 1 minute and 30 days.`:t>n?`Default TTL cannot exceed maximum TTL.`:e.maxActiveShares<1||e.maxActiveShares>1e4?`Maximum active shares must be between 1 and 10,000.`:e.maxActiveSites<1||e.maxActiveSites>1e3?`Maximum active site shares must be between 1 and 1,000.`:e.maxFileSizeMb<1||e.maxFileSizeMb>10240?`Maximum file size must be between 1 MB and 10 GB.`:null}async function ve(e){let t=_e(e);if(t)throw Error(t);await u(l(`/api/config`),{method:`PATCH`,body:JSON.stringify({gateway:{share:{enabled:e.enabled,defaultTtlMs:e.defaultTtlHours*K,maxTtlMs:e.maxTtlDays*q,maxActiveShares:e.maxActiveShares,maxFileSize:e.maxFileSizeMb*me,inlinePreviewMimes:e.inlinePreviewMimes},siteShare:{maxActiveSites:e.maxActiveSites}}})}),ae()}var Y=r();function ye(){return a(`w-full rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm text-fg`,`placeholder:text-fg-subtle`,R,`dark:border-edge`)}function be({hasToken:e}){let t=c(d(e=>e.language)).sharesSettings,{data:n,isLoading:r}=P(e),i=(0,W.useMemo)(()=>n?.payload?.config===void 0?null:structuredClone(ge(n.payload.config)),[n]),a=(0,W.useRef)(!1),[o,s]=(0,W.useState)(null),[l,u]=(0,W.useState)(!1),[f,p]=(0,W.useState)(null),[m,h]=(0,W.useState)(!1),g=o??i,_=i,v=(0,W.useMemo)(()=>!g||!_?!1:JSON.stringify(g)!==JSON.stringify(_),[g,_]),y=(0,W.useCallback)(e=>{a.current=!0,s(t=>{let n=t??_;return n?{...n,...e}:null})},[_]),b=(0,W.useCallback)(async()=>{if(!(!g||l)){u(!0),p(null),h(!1);try{await ve(g),a.current=!1,s(null),h(!0),window.setTimeout(()=>h(!1),2500)}catch(e){p(e instanceof Error?e.message:t.policySaveError)}finally{u(!1)}}},[g,l,t.policySaveError]),x=(0,W.useCallback)(()=>{a.current=!1,s(null),p(null),h(!1)},[]);return!e||!g?r?(0,Y.jsx)(U,{children:(0,Y.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-fg-muted`,children:[(0,Y.jsx)(le,{className:`size-4 animate-spin`}),t.policyLoading]})}):null:(0,Y.jsxs)(U,{children:[(0,Y.jsxs)(`div`,{className:`mb-4 flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:t.policyTitle}),(0,Y.jsx)(`p`,{className:`mt-0.5 text-xs text-fg-muted`,children:t.policyHint})]}),(0,Y.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2`,children:[m?(0,Y.jsx)(`span`,{className:`text-sm text-fg-muted`,children:t.policySaved}):null,(0,Y.jsx)(N,{type:`button`,variant:`secondary`,disabled:!v||l,onClick:x,children:t.policyDiscard}),(0,Y.jsx)(N,{type:`button`,variant:`primary`,disabled:!v||l,onClick:()=>void b(),children:l?t.policySaving:t.policySave})]})]}),v?(0,Y.jsx)(`p`,{className:`mb-3 text-xs text-amber-800 dark:text-amber-200`,children:t.policyUnsaved}):null,f?(0,Y.jsx)(`p`,{className:`mb-3 text-sm text-red-600 dark:text-red-400`,children:f}):null,(0,Y.jsx)(`p`,{className:`mb-4 text-xs text-fg-subtle`,children:t.policyRestartHint}),(0,Y.jsx)(X,{t,form:g,onChange:y})]})}function X(e){let t=(0,pe.c)(64),{t:n,form:r,onChange:i}=e,a;t[0]===i?a=t[1]:(a=e=>i({enabled:e.target.checked}),t[0]=i,t[1]=a);let o;t[2]!==r.enabled||t[3]!==a?(o=(0,Y.jsx)(`input`,{type:`checkbox`,className:`ui-checkbox`,checked:r.enabled,onChange:a}),t[2]=r.enabled,t[3]=a,t[4]=o):o=t[4];let s;t[5]!==n.policyEnabled||t[6]!==o?(s=(0,Y.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 text-sm text-fg`,children:[o,n.policyEnabled]}),t[5]=n.policyEnabled,t[6]=o,t[7]=s):s=t[7];let c=!r.enabled,l;t[8]===i?l=t[9]:(l=e=>i({defaultTtlHours:e}),t[8]=i,t[9]=l);let u;t[10]!==r.defaultTtlHours||t[11]!==n.policyDefaultTtlHint||t[12]!==n.policyDefaultTtlHours||t[13]!==c||t[14]!==l?(u=(0,Y.jsx)(Z,{id:`share-default-ttl-hours`,label:n.policyDefaultTtlHours,hint:n.policyDefaultTtlHint,value:r.defaultTtlHours,min:1,max:168,disabled:c,onChange:l}),t[10]=r.defaultTtlHours,t[11]=n.policyDefaultTtlHint,t[12]=n.policyDefaultTtlHours,t[13]=c,t[14]=l,t[15]=u):u=t[15];let d=!r.enabled,f;t[16]===i?f=t[17]:(f=e=>i({maxTtlDays:e}),t[16]=i,t[17]=f);let p;t[18]!==r.maxTtlDays||t[19]!==n.policyMaxTtlDays||t[20]!==n.policyMaxTtlHint||t[21]!==d||t[22]!==f?(p=(0,Y.jsx)(Z,{id:`share-max-ttl-days`,label:n.policyMaxTtlDays,hint:n.policyMaxTtlHint,value:r.maxTtlDays,min:1,max:30,disabled:d,onChange:f}),t[18]=r.maxTtlDays,t[19]=n.policyMaxTtlDays,t[20]=n.policyMaxTtlHint,t[21]=d,t[22]=f,t[23]=p):p=t[23];let m=!r.enabled,h;t[24]===i?h=t[25]:(h=e=>i({maxActiveShares:e}),t[24]=i,t[25]=h);let g;t[26]!==r.maxActiveShares||t[27]!==n.policyMaxActiveShares||t[28]!==n.policyMaxActiveSharesHint||t[29]!==m||t[30]!==h?(g=(0,Y.jsx)(Z,{id:`share-max-active`,label:n.policyMaxActiveShares,hint:n.policyMaxActiveSharesHint,value:r.maxActiveShares,min:1,max:1e4,disabled:m,onChange:h}),t[26]=r.maxActiveShares,t[27]=n.policyMaxActiveShares,t[28]=n.policyMaxActiveSharesHint,t[29]=m,t[30]=h,t[31]=g):g=t[31];let _;t[32]===i?_=t[33]:(_=e=>i({maxActiveSites:e}),t[32]=i,t[33]=_);let v;t[34]!==r.maxActiveSites||t[35]!==n.policyMaxActiveSites||t[36]!==n.policyMaxActiveSitesHint||t[37]!==_?(v=(0,Y.jsx)(Z,{id:`site-share-max-active`,label:n.policyMaxActiveSites,hint:n.policyMaxActiveSitesHint,value:r.maxActiveSites,min:1,max:1e3,onChange:_}),t[34]=r.maxActiveSites,t[35]=n.policyMaxActiveSites,t[36]=n.policyMaxActiveSitesHint,t[37]=_,t[38]=v):v=t[38];let y=!r.enabled,b;t[39]===i?b=t[40]:(b=e=>i({maxFileSizeMb:e}),t[39]=i,t[40]=b);let x;t[41]!==r.maxFileSizeMb||t[42]!==n.policyMaxFileSizeHint||t[43]!==n.policyMaxFileSizeMb||t[44]!==y||t[45]!==b?(x=(0,Y.jsx)(Z,{id:`share-max-file-mb`,label:n.policyMaxFileSizeMb,hint:n.policyMaxFileSizeHint,value:r.maxFileSizeMb,min:1,max:10240,disabled:y,onChange:b}),t[41]=r.maxFileSizeMb,t[42]=n.policyMaxFileSizeHint,t[43]=n.policyMaxFileSizeMb,t[44]=y,t[45]=b,t[46]=x):x=t[46];let S;t[47]!==g||t[48]!==v||t[49]!==x||t[50]!==u||t[51]!==p?(S=(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[u,p,g,v,x]}),t[47]=g,t[48]=v,t[49]=x,t[50]=u,t[51]=p,t[52]=S):S=t[52];let C=!r.enabled,w;t[53]===i?w=t[54]:(w=e=>i({inlinePreviewMimes:e}),t[53]=i,t[54]=w);let T;t[55]!==r.inlinePreviewMimes||t[56]!==n||t[57]!==C||t[58]!==w?(T=(0,Y.jsx)(xe,{t:n,values:r.inlinePreviewMimes,disabled:C,onChange:w}),t[55]=r.inlinePreviewMimes,t[56]=n,t[57]=C,t[58]=w,t[59]=T):T=t[59];let E;return t[60]!==S||t[61]!==T||t[62]!==s?(E=(0,Y.jsxs)(`div`,{className:`space-y-4`,children:[s,S,T]}),t[60]=S,t[61]=T,t[62]=s,t[63]=E):E=t[63],E}function Z(e){let t=(0,pe.c)(21),{id:n,label:r,hint:i,value:o,min:s,max:c,disabled:l,onChange:u}=e,d;t[0]!==n||t[1]!==r?(d=(0,Y.jsx)(`label`,{className:`mb-1 block text-sm font-medium text-fg`,htmlFor:n,children:r}),t[0]=n,t[1]=r,t[2]=d):d=t[2];let f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=a(ye(),`max-w-xs font-mono text-xs`),t[3]=f):f=t[3];let p;t[4]!==c||t[5]!==s||t[6]!==u?(p=e=>{let t=Number(e.target.value);Number.isFinite(t)&&u(Math.max(s,Math.min(c,Math.floor(t))))},t[4]=c,t[5]=s,t[6]=u,t[7]=p):p=t[7];let m;t[8]!==l||t[9]!==n||t[10]!==c||t[11]!==s||t[12]!==p||t[13]!==o?(m=(0,Y.jsx)(`input`,{id:n,type:`number`,min:s,max:c,disabled:l,className:f,value:o,onChange:p}),t[8]=l,t[9]=n,t[10]=c,t[11]=s,t[12]=p,t[13]=o,t[14]=m):m=t[14];let h;t[15]===i?h=t[16]:(h=(0,Y.jsx)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:i}),t[15]=i,t[16]=h);let g;return t[17]!==d||t[18]!==m||t[19]!==h?(g=(0,Y.jsxs)(`div`,{children:[d,m,h]}),t[17]=d,t[18]=m,t[19]=h,t[20]=g):g=t[20],g}function xe(e){let t=(0,pe.c)(25),{t:n,values:r,disabled:i,onChange:o}=e,s;t[0]!==o||t[1]!==r?(s=e=>{let t=e.trim();!t||r.includes(t)||r.length>=32||o([...r,t])},t[0]=o,t[1]=r,t[2]=s):s=t[2];let c=s,l;t[3]===n.policyInlinePreviewMimes?l=t[4]:(l=(0,Y.jsx)(`div`,{className:`text-sm font-medium text-fg`,children:n.policyInlinePreviewMimes}),t[3]=n.policyInlinePreviewMimes,t[4]=l);let u;t[5]===n.policyInlinePreviewMimesHint?u=t[6]:(u=(0,Y.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:n.policyInlinePreviewMimesHint}),t[5]=n.policyInlinePreviewMimesHint,t[6]=u);let d;t[7]!==i||t[8]!==o||t[9]!==r?(d=r.map(e=>(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md border border-edge bg-surface-panel px-2 py-0.5 font-mono text-xs text-fg`,children:[e,i?null:(0,Y.jsx)(`button`,{type:`button`,className:`text-fg-muted hover:text-fg`,"aria-label":`Remove ${e}`,onClick:()=>o(r.filter(t=>t!==e)),children:`×`})]},e)),t[7]=i,t[8]=o,t[9]=r,t[10]=d):d=t[10];let f;t[11]===d?f=t[12]:(f=(0,Y.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:d}),t[11]=d,t[12]=f);let p;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(p=a(ye(),`font-mono text-xs`),t[13]=p):p=t[13];let m=i||r.length>=32,h;t[14]===c?h=t[15]:(h=e=>{e.key===`Enter`&&(e.preventDefault(),c(e.target.value),e.target.value=``)},t[14]=c,t[15]=h);let g;t[16]!==n.policyMimePlaceholder||t[17]!==m||t[18]!==h?(g=(0,Y.jsx)(`input`,{className:p,placeholder:n.policyMimePlaceholder,disabled:m,onKeyDown:h}),t[16]=n.policyMimePlaceholder,t[17]=m,t[18]=h,t[19]=g):g=t[19];let _;return t[20]!==l||t[21]!==u||t[22]!==f||t[23]!==g?(_=(0,Y.jsxs)(`div`,{className:`space-y-2 border-t border-edge pt-4`,children:[l,u,f,g]}),t[20]=l,t[21]=u,t[22]=f,t[23]=g,t[24]=_):_=t[24],_}function Q(e){let t=(0,pe.c)(70),{open:n,onOpenChange:r,onConfirm:i,initialPath:o,selectKind:s,sessionKey:l,agentId:u}=e,g=s===void 0?`any`:s,y=c(d(we)),b=y.workspace,S=y.sharesSettings,C=T(Ce),{data:E}=p(f(Se)?`picker-agents-list`:null,A),D;bb0:{let e;t[0]===u?e=t[1]:(e=u?.trim(),t[0]=u,t[1]=e);let n=e;if(n){D=n;break bb0}let r;t[2]===C?r=t[3]:(r=C.trim(),t[2]=C,t[3]=r);let i=r;if(i){D=i;break bb0}if(E?.defaultId){D=E.defaultId;break bb0}if(E?.agents?.[0]?.id){D=E.agents[0].id;break bb0}D=``}let O=D,[k,j]=(0,W.useState)(O),M,P;t[4]===O?(M=t[5],P=t[6]):(M=()=>{j(O)},P=[O],t[4]=O,t[5]=M,t[6]=P),(0,W.useEffect)(M,P);let{tree:F,loading:L,error:re,loadRoot:R,loadChildren:ae,reset:B}=m(k,l??null),oe;t[7]===o?oe=t[8]:(oe=o?{path:o,isDirectory:!1}:null,t[7]=o,t[8]=oe);let[V,H]=(0,W.useState)(oe),ue;t[9]!==o||t[10]!==R||t[11]!==n||t[12]!==B||t[13]!==H?(ue=()=>{if(!n){B(),H(o?{path:o,isDirectory:!1}:null);return}R()},t[9]=o,t[10]=R,t[11]=n,t[12]=B,t[13]=H,t[14]=ue):ue=t[14];let de;t[15]!==o||t[16]!==R||t[17]!==n||t[18]!==k||t[19]!==B||t[20]!==l?(de=[n,k,l,R,B,o],t[15]=o,t[16]=R,t[17]=n,t[18]=k,t[19]=B,t[20]=l,t[21]=de):de=t[21],(0,W.useEffect)(ue,de);let U;t[22]===ae?U=t[23]:(U=e=>{ae(e)},t[22]=ae,t[23]=U);let fe=U,G=V!==null&&(g===`any`||g===`file`&&!V.isDirectory||g===`directory`&&V.isDirectory),K;bb1:{if(!V){K=S.pickerHintNone;break bb1}if(g===`file`&&V.isDirectory){K=S.pickerHintNeedsFile;break bb1}if(g===`directory`&&!V.isDirectory){K=S.pickerHintNeedsDirectory;break bb1}K=`${V.isDirectory?`📁`:`📄`} ${V.path}`}let q=K,me=E?.agents??[],J;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,Y.jsx)(w,{className:`fixed inset-0 z-[70] bg-scrim backdrop-blur-[2px]`}),t[24]=J):J=t[24];let he;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(he=a(`fixed left-1/2 top-1/2 z-[71] w-[min(34rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2`,`flex h-[min(28rem,calc(100vh-3rem))] flex-col overflow-hidden rounded-lg border border-edge bg-surface-panel shadow-popover outline-none`),t[25]=he):he=t[25];let ge;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,Y.jsx)(se,{className:`size-4 shrink-0 text-fg-muted`,"aria-hidden":!0}),t[26]=ge):ge=t[26];let _e=y.cron.refresh,ve=y.cron.refresh,ye;t[27]===R?ye=t[28]:(ye=()=>void R(),t[27]=R,t[28]=ye);let be=L&&`animate-spin`,X;t[29]===be?X=t[30]:(X=a(`size-4`,be),t[29]=be,t[30]=X);let Z;t[31]===X?Z=t[32]:(Z=(0,Y.jsx)(te,{className:X,"aria-hidden":!0}),t[31]=X,t[32]=Z);let xe;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(xe=(0,Y.jsx)(ce,{className:`size-4`}),t[33]=xe):xe=t[33];let Q;t[34]!==re||t[35]!==b.loadError?(Q=re?(0,Y.jsxs)(`p`,{className:`shrink-0 px-4 py-2 text-xs text-red-600 dark:text-red-400`,children:[b.loadError,`: `,re]}):null,t[34]=re,t[35]=b.loadError,t[36]=Q):Q=t[36];let $;t[37]!==fe||t[38]!==L||t[39]!==V?.path||t[40]!==H||t[41]!==b.emptyDir||t[42]!==b.title||t[43]!==F?($=L&&F.length===0?(0,Y.jsxs)(`p`,{className:`flex shrink-0 items-center gap-2 px-4 py-3 text-sm text-fg-muted`,children:[(0,Y.jsx)(le,{className:`size-4 animate-spin`}),b.title,`…`]}):(0,Y.jsx)(ie,{tree:F,selectedPath:V?.path??null,onSelectFile:e=>H({path:e,isDirectory:!1}),onSelectEntry:(e,t)=>H({path:e,isDirectory:t}),onExpandDir:fe,onAction:void 0,emptyHint:b.emptyDir}),t[37]=fe,t[38]=L,t[39]=V?.path,t[40]=H,t[41]=b.emptyDir,t[42]=b.title,t[43]=F,t[44]=$):$=t[44];let Te;t[45]!==Q||t[46]!==$?(Te=(0,Y.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:[Q,$]}),t[45]=Q,t[46]=$,t[47]=Te):Te=t[47];let Ee;t[48]===q?Ee=t[49]:(Ee=(0,Y.jsx)(`p`,{className:`min-w-0 flex-1 truncate text-xs text-fg-muted`,children:q}),t[48]=q,t[49]=Ee);let De;t[50]===r?De=t[51]:(De=()=>r(!1),t[50]=r,t[51]=De);let Oe;t[52]!==S.cancel||t[53]!==De?(Oe=(0,Y.jsx)(N,{type:`button`,variant:`ghost`,onClick:De,children:S.cancel}),t[52]=S.cancel,t[53]=De,t[54]=Oe):Oe=t[54];let ke=!G,Ae;t[55]!==i||t[56]!==r||t[57]!==k||t[58]!==V?(Ae=()=>{V&&(i({...V,agentId:k}),r(!1))},t[55]=i,t[56]=r,t[57]=k,t[58]=V,t[59]=Ae):Ae=t[59];let je;t[60]!==S.pickerConfirm||t[61]!==ke||t[62]!==Ae?(je=(0,Y.jsx)(N,{type:`button`,disabled:ke,onClick:Ae,children:S.pickerConfirm}),t[60]=S.pickerConfirm,t[61]=ke,t[62]=Ae,t[63]=je):je=t[63];let Me;t[64]!==Oe||t[65]!==je?(Me=(0,Y.jsxs)(`div`,{className:`flex shrink-0 gap-2`,children:[Oe,je]}),t[64]=Oe,t[65]=je,t[66]=Me):Me=t[66];let Ne;return t[67]!==Ee||t[68]!==Me?(Ne=(0,Y.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-3 border-t border-edge px-4 py-3`,children:[Ee,Me]}),t[67]=Ee,t[68]=Me,t[69]=Ne):Ne=t[69],(0,Y.jsx)(ne,{open:n,onOpenChange:r,children:(0,Y.jsxs)(ee,{children:[J,(0,Y.jsxs)(I,{className:he,children:[(0,Y.jsxs)(`div`,{className:`flex h-11 shrink-0 items-center gap-2 border-b border-edge px-4`,children:[ge,(0,Y.jsx)(_,{className:`min-w-0 flex-1 truncate text-base font-semibold text-fg`,children:S.pickerTitle}),(0,Y.jsx)(`button`,{type:`button`,className:`inline-flex size-8 shrink-0 items-center justify-center rounded-md text-fg-muted hover:bg-surface-hover hover:text-fg disabled:opacity-50`,title:_e,"aria-label":ve,disabled:L,onClick:ye,children:Z}),(0,Y.jsx)(h,{asChild:!0,children:(0,Y.jsx)(`button`,{type:`button`,className:`inline-flex size-8 shrink-0 items-center justify-center rounded-md text-fg-muted hover:bg-surface-hover hover:text-fg`,"aria-label":b.close,children:xe})})]}),me.length>0?(0,Y.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-edge px-4 py-2`,children:[(0,Y.jsx)(`label`,{className:`text-xs text-fg-muted`,htmlFor:`picker-agent-select`,children:S.pickerAgentLabel}),(0,Y.jsx)(v,{id:`picker-agent-select`,className:`min-w-0 flex-1 rounded-md border border-edge bg-surface-panel px-2 py-1 text-sm text-fg focus:outline-none focus:ring-2 focus:ring-accent`,value:k,onChange:e=>{j(e.target.value),H(null)},children:me.map(e=>(0,Y.jsxs)(z,{value:e.id,children:[x(e,y.agentsSettings),e.id===E?.defaultId?` ★`:``]},e.id))})]}):null,Te,Ne]})]})})}function Se(e){return e.token}function Ce(e){return e.agentId}function we(e){return e.language}var $=[`shares`,`policy`];function Te(e){let t=(e??``).trim();return $.includes(t)?t:`shares`}function Ee(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(1)} GB`}function De(e,t){let n=new Date(e).getTime()-Date.now(),r=Math.abs(n),i=n<0;if(r<6e4)return t===`zh`?`刚刚`:`just now`;let a=Math.floor(r/6e4);if(a<60){let e=t===`zh`?`${a} 分钟`:`${a}m`;return i?t===`zh`?`${e}前`:`${e} ago`:e}let o=Math.floor(a/60);if(o<24){let e=t===`zh`?`${o} 小时`:`${o}h`;return i?t===`zh`?`${e}前`:`${e} ago`:e}let s=Math.floor(o/24),c=t===`zh`?`${s} 天`:`${s}d`;return i?t===`zh`?`${c}前`:`${c} ago`:c}var Oe=[{value:36e5,key:`1h`},{value:216e5,key:`6h`},{value:864e5,key:`24h`},{value:2592e5,key:`3d`},{value:6048e5,key:`7d`}];function ke(){let e=(0,pe.c)(24),t=d(je),n=c(t).sharesSettings,r=!!f(Ae),[a,o]=i(),s;e[0]===a?s=e[1]:(s=Te(a.get(`tab`)),e[0]=a,e[1]=s);let l=s,u;e[2]===o?u=e[3]:(u=e=>{o(t=>{let n=new URLSearchParams(t);return e===`shares`?n.delete(`tab`):n.set(`tab`,e),n},{replace:!0})},e[2]=o,e[3]=u);let p=u;if(!r)return(0,Y.jsx)(de,{gap:`gap-3`,padding:`px-3 py-8 sm:px-5 xl:px-6`,children:(0,Y.jsx)(`p`,{className:`text-sm text-fg-muted`,children:n.needToken})});let m={shares:n.tabShares,policy:n.tabPolicy},h=$.map(e=>({id:e,label:m[e]})),g;e[4]!==n.subtitle||e[5]!==n.title?(g=(0,Y.jsx)(H,{title:n.title,subtitle:n.subtitle}),e[4]=n.subtitle,e[5]=n.title,e[6]=g):g=e[6];let _;e[7]!==l||e[8]!==p||e[9]!==n.tabsAria||e[10]!==h?(_=(0,Y.jsx)(fe,{items:h,activeTab:l,onChange:p,ariaLabel:n.tabsAria,tabIdPrefix:`shares-tab`,panelIdPrefix:`shares-panel`}),e[7]=l,e[8]=p,e[9]=n.tabsAria,e[10]=h,e[11]=_):_=e[11];let v;e[12]!==l||e[13]!==r||e[14]!==t||e[15]!==n?(v=l===`shares`?(0,Y.jsx)(Me,{t:n,language:t}):(0,Y.jsx)(be,{hasToken:r}),e[12]=l,e[13]=r,e[14]=t,e[15]=n,e[16]=v):v=e[16];let y;e[17]!==l||e[18]!==v?(y=(0,Y.jsx)(ue,{id:l,activeTab:l,tabIdPrefix:`shares-tab`,panelIdPrefix:`shares-panel`,showHeading:!1,children:v}),e[17]=l,e[18]=v,e[19]=y):y=e[19];let b;return e[20]!==g||e[21]!==_||e[22]!==y?(b=(0,Y.jsxs)(de,{children:[g,_,y]}),e[20]=g,e[21]=_,e[22]=y,e[23]=b):b=e[23],b}function Ae(e){return e.token}function je(e){return e.language}function Me(e){let t=(0,pe.c)(60),{t:n,language:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={refreshInterval:3e4},t[0]=i):i=t[0];let{data:o,error:s,isLoading:c,mutate:l}=p(`shares-list`,E,i),u;t[1]===o?.payload?.shares?u=t[2]:(u=o?.payload?.shares??[],t[1]=o?.payload?.shares,t[2]=u);let d=u,[f,m]=(0,W.useState)(!1),h;bb0:{if(f){h=d;break bb0}let e;t[3]===d?e=t[4]:(e=d.filter(Le),t[3]=d,t[4]=e),h=e}let g=h,_;t[5]===d?_=t[6]:(_=d.filter(Ie),t[5]=d,t[6]=_);let v=_.length,y;t[7]===d?y=t[8]:(y=d.filter(Fe),t[7]=d,t[8]=y);let b=y.length,x;t[9]===l?x=t[10]:(x=()=>void l(),t[9]=l,t[10]=x);let S;t[11]!==n||t[12]!==x?(S=(0,Y.jsx)(ze,{t:n,onCreated:x}),t[11]=n,t[12]=x,t[13]=S):S=t[13];let C=f?n.allSharesTitle:n.listTitle,w;t[14]===v?w=t[15]:(w=v>0&&(0,Y.jsxs)(`span`,{className:`ml-2 text-xs font-normal text-fg-muted`,children:[`(`,v,`)`]}),t[14]=v,t[15]=w);let T;t[16]!==C||t[17]!==w?(T=(0,Y.jsxs)(`h2`,{className:`text-sm font-semibold text-fg`,children:[C,w]}),t[16]=C,t[17]=w,t[18]=T):T=t[18];let D;t[19]===l?D=t[20]:(D=()=>void l(),t[19]=l,t[20]=D);let ee=c&&`animate-spin`,O;t[21]===ee?O=t[22]:(O=a(`size-3.5`,ee),t[21]=ee,t[22]=O);let k;t[23]===O?k=t[24]:(k=(0,Y.jsx)(te,{className:O}),t[23]=O,t[24]=k);let A;t[25]!==c||t[26]!==D||t[27]!==k?(A=(0,Y.jsx)(N,{type:`button`,variant:`ghost`,className:`px-2 py-1`,onClick:D,disabled:c,children:k}),t[25]=c,t[26]=D,t[27]=k,t[28]=A):A=t[28];let j;t[29]!==b||t[30]!==f||t[31]!==n.hideExpired||t[32]!==n.showExpired?(j=b>0&&(0,Y.jsx)(`button`,{type:`button`,className:`text-xs text-accent hover:underline`,onClick:()=>m(Pe),children:f?n.hideExpired:n.showExpired}),t[29]=b,t[30]=f,t[31]=n.hideExpired,t[32]=n.showExpired,t[33]=j):j=t[33];let M;t[34]!==A||t[35]!==j?(M=(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[A,j]}),t[34]=A,t[35]=j,t[36]=M):M=t[36];let P;t[37]!==T||t[38]!==M?(P=(0,Y.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[T,M]}),t[37]=T,t[38]=M,t[39]=P):P=t[39];let F;t[40]!==o||t[41]!==s||t[42]!==g||t[43]!==c||t[44]!==r||t[45]!==l||t[46]!==n?(F=c&&!o?(0,Y.jsx)(`div`,{className:`grid gap-2`,"aria-busy":`true`,children:Array.from({length:4}).map(Ne)}):s?(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-red-600 dark:text-red-400`,children:[(0,Y.jsx)(`span`,{children:n.error}),(0,Y.jsx)(N,{type:`button`,variant:`ghost`,className:`px-2 py-1 text-xs`,onClick:()=>void l(),children:n.retry})]}):g.length===0?(0,Y.jsx)(`p`,{className:`text-sm text-fg-muted`,children:n.emptyState}):(0,Y.jsx)(`div`,{className:`flex flex-col gap-2`,children:g.map(e=>(0,Y.jsx)(Ve,{share:e,t:n,language:r,onRevoked:()=>void l(),onExtended:()=>void l()},e.id))}),t[40]=o,t[41]=s,t[42]=g,t[43]=c,t[44]=r,t[45]=l,t[46]=n,t[47]=F):F=t[47];let I;t[48]!==b||t[49]!==l||t[50]!==f||t[51]!==n?(I=b>0&&f&&(0,Y.jsx)(He,{t:n,onCleaned:()=>void l()}),t[48]=b,t[49]=l,t[50]=f,t[51]=n,t[52]=I):I=t[52];let L;t[53]!==P||t[54]!==F||t[55]!==I?(L=(0,Y.jsxs)(U,{children:[P,F,I]}),t[53]=P,t[54]=F,t[55]=I,t[56]=L):L=t[56];let ne;return t[57]!==L||t[58]!==S?(ne=(0,Y.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[S,L]}),t[57]=L,t[58]=S,t[59]=ne):ne=t[59],ne}function Ne(e,t){return(0,Y.jsx)(`div`,{className:`rounded-lg border border-edge bg-surface-base p-3`,children:(0,Y.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,Y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Y.jsx)(j,{className:`h-4 w-2/3`}),(0,Y.jsx)(j,{className:`mt-2 h-3 w-1/2`})]}),(0,Y.jsx)(j,{className:`h-7 w-20 rounded-md`})]})},t)}function Pe(e){return!e}function Fe(e){return e.expired||e.revoked}function Ie(e){return!e.expired&&!e.revoked}function Le(e){return!e.expired&&!e.revoked}var Re={expanded:!0,path:``,isDirectory:!1,agentId:``,ttlMs:864e5,maxViews:null,description:``,directoryMode:`browse`,creating:!1,result:null,errorMsg:null,resultDialogOpen:!1,pickerOpen:!1};function ze({t:e,onCreated:t}){let[n,r]=(0,W.useReducer)(re,Re),{expanded:i,path:o,isDirectory:s,agentId:c,ttlMs:l,maxViews:u,description:d,directoryMode:f,creating:p,result:m,errorMsg:h,resultDialogOpen:g,pickerOpen:_}=n,y=(0,W.useCallback)(async()=>{if(o.trim()){r({type:`patch`,patch:{creating:!0,errorMsg:null,result:null}});try{r({type:`patch`,patch:{result:(await S({path:o.trim(),ttlMs:l,maxViews:u,description:d.trim()||void 0,...c?{agentId:c}:{},...s?{kind:`directory`,directoryMode:f}:{}})).payload,resultDialogOpen:!0}}),t()}catch(e){r({type:`patch`,patch:{errorMsg:e instanceof Error?e.message:String(e)}})}finally{r({type:`patch`,patch:{creating:!1}})}}},[o,s,c,l,u,d,f,t]),x=(0,W.useCallback)(()=>{r({type:`patch`,patch:{path:``,isDirectory:!1,agentId:``,description:``,maxViews:null,ttlMs:864e5,directoryMode:`browse`,result:null,errorMsg:null}})},[]);return i?(0,Y.jsxs)(U,{children:[(0,Y.jsx)(`h2`,{className:`mb-1 text-sm font-semibold text-fg`,children:e.createTitle}),(0,Y.jsx)(`p`,{className:`mb-4 text-xs text-fg-muted`,children:e.createHint}),(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Y.jsx)(`span`,{className:`text-xs font-medium text-fg`,children:e.pathLabel}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Y.jsx)(`div`,{className:a(`flex min-w-0 flex-1 items-center gap-2 rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm`,o?`text-fg`:`text-fg-subtle`),children:o?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`span`,{"aria-hidden":!0,children:s?`📁`:`📄`}),(0,Y.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,title:o,children:o})]}):(0,Y.jsx)(`span`,{className:`truncate`,children:e.pathPlaceholder})}),(0,Y.jsxs)(N,{type:`button`,variant:`ghost`,onClick:()=>r({type:`patch`,patch:{pickerOpen:!0}}),children:[(0,Y.jsx)(k,{className:`size-4`}),o?e.pathBrowseChange:e.pathBrowse]})]})]}),s?(0,Y.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,Y.jsx)(`span`,{className:`text-xs font-medium text-fg`,children:e.directoryModeLabel}),(0,Y.jsxs)(v,{className:`rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm text-fg focus:outline-none focus:ring-2 focus:ring-accent`,value:f,onChange:e=>r({type:`patch`,patch:{directoryMode:e.target.value===`zip-only`?`zip-only`:`browse`}}),children:[(0,Y.jsx)(z,{value:`browse`,children:e.directoryModeBrowse}),(0,Y.jsx)(z,{value:`zip-only`,children:e.directoryModeZipOnly})]})]}):null,(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,Y.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,Y.jsx)(`span`,{className:`text-xs font-medium text-fg`,children:e.ttlLabel}),(0,Y.jsx)(v,{className:`rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm text-fg focus:outline-none focus:ring-2 focus:ring-accent`,value:l,onChange:e=>r({type:`patch`,patch:{ttlMs:Number(e.target.value)}}),children:Oe.map(t=>(0,Y.jsx)(z,{value:t.value,children:e.ttlOptions[t.key]},t.key))})]}),(0,Y.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,Y.jsx)(`span`,{className:`text-xs font-medium text-fg`,children:e.maxViewsLabel}),(0,Y.jsxs)(v,{className:`rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm text-fg focus:outline-none focus:ring-2 focus:ring-accent`,value:u??`unlimited`,onChange:e=>r({type:`patch`,patch:{maxViews:e.target.value===`unlimited`?null:Number(e.target.value)}}),children:[(0,Y.jsx)(z,{value:`unlimited`,children:e.maxViewsUnlimited}),(0,Y.jsx)(z,{value:`1`,children:`1`}),(0,Y.jsx)(z,{value:`5`,children:`5`}),(0,Y.jsx)(z,{value:`10`,children:`10`}),(0,Y.jsx)(z,{value:`50`,children:`50`}),(0,Y.jsx)(z,{value:`100`,children:`100`})]})]})]}),(0,Y.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,Y.jsx)(`span`,{className:`text-xs font-medium text-fg`,children:e.descriptionLabel}),(0,Y.jsx)(`input`,{type:`text`,className:`rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm text-fg placeholder:text-fg-subtle focus:outline-none focus:ring-2 focus:ring-accent`,placeholder:e.descriptionPlaceholder,value:d,onChange:e=>r({type:`patch`,patch:{description:e.target.value}})})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 pt-1`,children:[(0,Y.jsxs)(N,{type:`button`,disabled:p||!o.trim(),onClick:()=>void y(),children:[p?(0,Y.jsx)(le,{className:`size-4 animate-spin`}):(0,Y.jsx)(M,{className:`size-4`}),p?e.creating:e.createButton]}),(0,Y.jsx)(N,{type:`button`,variant:`ghost`,onClick:()=>{x(),r({type:`patch`,patch:{expanded:!1}})},children:e.cancel})]}),h&&(0,Y.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:h})]}),(0,Y.jsx)(b,{open:g,onOpenChange:e=>{r({type:`patch`,patch:{resultDialogOpen:e,...e?{}:{result:null}}})},result:m}),(0,Y.jsx)(Q,{open:_,onOpenChange:e=>r({type:`patch`,patch:{pickerOpen:e}}),initialPath:o||void 0,selectKind:`any`,onConfirm:e=>r({type:`patch`,patch:{path:e.path,isDirectory:e.isDirectory,agentId:e.agentId,directoryMode:`browse`}})})]}):(0,Y.jsxs)(N,{type:`button`,onClick:()=>r({type:`patch`,patch:{expanded:!0}}),className:`self-start`,children:[(0,Y.jsx)(M,{className:`size-4`}),e.createTitle]})}var Be={revokeOpen:!1,revoking:!1,linksOpen:!1,urlCopied:!1,copyFailed:!1,extending:!1};function Ve({share:e,t,language:n,onRevoked:r,onExtended:i}){let[c,l]=(0,W.useReducer)(re,Be),{revokeOpen:u,revoking:d,linksOpen:f,urlCopied:p,copyFailed:m,extending:h}=c,_=!e.expired&&!e.revoked,v=e.revoked?t.statusRevoked:e.expired?t.statusExpired:t.statusActive,b=e.revoked?`text-red-600 dark:text-red-400`:e.expired?`text-fg-subtle`:`text-emerald-600 dark:text-emerald-400`,x=(0,W.useCallback)(async()=>{l({type:`patch`,patch:{revokeOpen:!1,revoking:!0}});try{await g(e.id),r()}catch{}finally{l({type:`patch`,patch:{revoking:!1}})}},[e.id,r]),S=(0,W.useCallback)(async()=>{if(l({type:`patch`,patch:{linksOpen:!0,copyFailed:!1}}),!await s(e.shareUrl)){l({type:`patch`,patch:{copyFailed:!0}}),window.setTimeout(()=>l({type:`patch`,patch:{copyFailed:!1}}),2500);return}l({type:`patch`,patch:{urlCopied:!0}}),window.setTimeout(()=>l({type:`patch`,patch:{urlCopied:!1}}),2e3)},[e.shareUrl]),w=(0,W.useCallback)(async()=>{l({type:`patch`,patch:{extending:!0}});try{await C(e.id,864e5),i()}catch{}finally{l({type:`patch`,patch:{extending:!1}})}},[e.id,i]),T=`share-links-${e.id}`;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`div`,{className:`rounded-lg bg-surface-panel/80 px-3 py-2.5 shadow-surface`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Y.jsxs)(`button`,{type:`button`,className:a(`flex min-w-0 flex-1 items-start gap-3 rounded-md text-left`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`),"aria-expanded":f,"aria-controls":T,onClick:()=>l({type:`patch`,patch:{linksOpen:!f}}),children:[(0,Y.jsx)(oe,{className:a(`mt-0.5 size-4 shrink-0 text-fg-muted transition-transform`,f?`rotate-0`:`-rotate-90`),"aria-hidden":!0}),(0,Y.jsx)(k,{className:`mt-0.5 size-4 shrink-0 text-fg-muted`,"aria-hidden":!0}),(0,Y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Y.jsx)(`span`,{className:`truncate text-sm font-medium text-fg`,children:e.fileName}),(0,Y.jsx)(`span`,{className:a(`text-xs font-medium`,b),children:v})]}),(0,Y.jsx)(`p`,{className:`truncate text-xs text-fg-subtle`,children:e.workspaceRelativePath}),(0,Y.jsxs)(`div`,{className:`mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-fg-muted`,children:[(0,Y.jsx)(`span`,{children:Ee(e.fileSize)}),(0,Y.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,Y.jsx)(V,{className:`size-3`}),e.expired?n===`zh`?`已过期`:`expired`:De(e.expiresAt,n)]}),(0,Y.jsxs)(`span`,{children:[t.views,`: `,e.downloadCount,e.maxViews!==null&&` ${t.viewsOf} ${e.maxViews}`]}),e.description&&(0,Y.jsx)(`span`,{className:`italic text-fg-subtle`,children:e.description})]})]})]}),(0,Y.jsx)(`div`,{className:`flex shrink-0 items-center gap-1`,children:_&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(N,{type:`button`,variant:`ghost`,className:`px-2 py-1`,title:t.copyUrl,onClick:()=>void S(),children:p?(0,Y.jsx)(o,{className:`size-3.5 text-emerald-500`}):(0,Y.jsx)(D,{className:`size-3.5`})}),(0,Y.jsx)(N,{type:`button`,variant:`ghost`,className:`px-2 py-1`,onClick:()=>void w(),disabled:h,title:t.extend,children:h?(0,Y.jsx)(le,{className:`size-3.5 animate-spin`}):(0,Y.jsx)(V,{className:`size-3.5`})}),(0,Y.jsx)(N,{type:`button`,variant:`ghost`,className:`px-2 py-1 text-red-600 hover:text-red-700 dark:text-red-400`,onClick:()=>l({type:`patch`,patch:{revokeOpen:!0}}),disabled:d,children:d?(0,Y.jsx)(le,{className:`size-3.5 animate-spin`}):(0,Y.jsx)(L,{className:`size-3.5`})})]})})]}),_&&f?(0,Y.jsxs)(`div`,{id:T,className:`mt-3 bg-surface-base/45 py-3 pl-7 pr-3`,children:[(0,Y.jsx)(O,{shareUrl:e.shareUrl,lanUrl:e.lanUrl,reachability:e.reachability,compact:!0}),m?(0,Y.jsx)(`p`,{className:`mt-2 text-xs text-red-600 dark:text-red-400`,children:t.copyFailed}):null,(0,Y.jsx)(`div`,{className:`mt-2`,children:(0,Y.jsx)(y,{reachability:e.reachability})})]}):null]}),(0,Y.jsx)(B,{open:u,title:t.revokeConfirmTitle,description:t.revokeConfirmBody,confirmLabel:t.revokeConfirmLabel,cancelLabel:t.cancel,destructive:!0,onConfirm:()=>void x(),onCancel:()=>l({type:`patch`,patch:{revokeOpen:!1}})})]})}function He({t:e,onCleaned:t}){let[n,r]=(0,W.useState)(!1),[i,a]=(0,W.useState)(!1),o=(0,W.useCallback)(async()=>{r(!1),a(!0);try{await F(),t()}catch{}finally{a(!1)}},[t]);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`mt-3 flex justify-end`,children:(0,Y.jsxs)(N,{type:`button`,variant:`secondary`,disabled:i,onClick:()=>r(!0),className:`border-danger/40 px-2 py-1 text-xs text-danger hover:bg-danger/10`,children:[i?(0,Y.jsx)(le,{className:`size-3.5 animate-spin`}):(0,Y.jsx)(L,{className:`size-3.5`}),e.cleanExpired]})}),(0,Y.jsx)(B,{open:n,title:e.cleanExpiredConfirmTitle,description:e.cleanExpiredConfirmBody,confirmLabel:e.cleanExpiredConfirmLabel,cancelLabel:e.cancel,destructive:!0,onConfirm:()=>void o(),onCancel:()=>r(!1)})]})}export{ke as SharesSettingsPanel};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-aKtaBQYM.js";import{d as t,r as n}from"./locale-store-BneNAR8R.js";import{ti as r}from"./index-CH7XN6KY.js";var i=e({reloadSkills:()=>a});async function a(){let e=await n(t(`/api/skills/reload`),{method:`POST`});if(!e.ok)throw Error(await r(e))}export{i as n,a as t};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jszip.min-DT31yWkU.js","assets/rolldown-runtime-aKtaBQYM.js"])))=>i.map(i=>d[i]);
2
- 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"./preload-helper-zJ_50EbN.js";import{c as a,d as o,l as s}from"./chunk-QUQL4437-DXsxWP7r.js";import{t as c}from"./cn-BQ_8x0bT.js";import{t as l}from"./circle-alert-RzVebuX2.js";import{t as u}from"./messages-t1yPaVCt.js";import{d,n as f,o as p,r as m}from"./locale-store-BneNAR8R.js";import{t as h}from"./config-reload-event-Bjh2zoKp.js";import{$l as g,Ao as _,As as v,El as y,Fo as b,Io as x,No as S,Ol as C,Oo as w,Po as T,Vs as E,Wo as D,Yi as O,Zl as k,ei as A,eu as j,hc as M,hs as N,jo as P,js as F,ko as I,ls as L,nl as R,qi as z,sa as B,tc as V,ti as H,ys as ee,zc as U}from"./index-CH7XN6KY.js";import{t as W}from"./page-tabs-DMlQERNg.js";import{t as te}from"./skill-reload-api-DQtZiejw.js";var ne=n(),G=e(t(),1),K=r(),re=(0,G.memo)(function(e){let t=(0,ne.c)(23),{loading:n,onReloadClick:r,searchQuery:i,setSearchQuery:a,mainTab:o,sk:s,setPendingFile:c,setInstallOpen:l}=e,u;t[0]!==n||t[1]!==r||t[2]!==s.reloadDiskAria||t[3]!==s.reloadRuntime?(u=(0,K.jsx)(B,{className:`size-9 shrink-0 p-0`,loading:n,label:s.reloadDiskAria,title:s.reloadRuntime,onClick:r}),t[0]=n,t[1]=r,t[2]=s.reloadDiskAria,t[3]=s.reloadRuntime,t[4]=u):u=t[4];let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,K.jsx)(V,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-disabled`,strokeWidth:1.75,"aria-hidden":!0}),t[5]=d):d=t[5];let f;t[6]===a?f=t[7]:(f=e=>a(e.target.value),t[6]=a,t[7]=f);let p=o===`marketplace`?s.marketplaceSearchPackages:s.searchPlaceholder,m;t[8]!==i||t[9]!==f||t[10]!==p?(m=(0,K.jsxs)(`label`,{className:`relative flex min-h-9 min-w-0 max-w-sm cursor-text items-center rounded-pill border border-edge bg-surface-base py-1.5 pl-9 pr-3 shadow-surface dark:bg-surface-hover/40 sm:max-w-md`,children:[d,(0,K.jsx)(`input`,{type:`search`,enterKeyHint:`search`,value:i,onChange:f,placeholder:p,autoComplete:`off`,spellCheck:!1,className:`min-w-0 flex-1 appearance-none border-0 bg-transparent py-0.5 text-sm leading-normal text-fg caret-current placeholder:text-fg-disabled focus:border-0 focus:shadow-none focus:outline-none focus:ring-0 focus-visible:outline-none`})]}),t[8]=i,t[9]=f,t[10]=p,t[11]=m):m=t[11];let h;t[12]!==l||t[13]!==c?(h=()=>{c(null),l(!0)},t[12]=l,t[13]=c,t[14]=h):h=t[14];let g;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,K.jsx)(M,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0}),t[15]=g):g=t[15];let _;t[16]!==s.installCta||t[17]!==h?(_=(0,K.jsxs)(N,{type:`button`,variant:`primary`,className:`shrink-0 gap-2`,onClick:h,children:[g,s.installCta]}),t[16]=s.installCta,t[17]=h,t[18]=_):_=t[18];let v;return t[19]!==u||t[20]!==m||t[21]!==_?(v=(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-wrap items-center justify-end gap-2`,children:[u,m,_]}),t[19]=u,t[20]=m,t[21]=_,t[22]=v):v=t[22],v}),q=`animate-pulse motion-reduce:animate-none rounded-md bg-surface-hover dark:bg-surface-active/50`;function J(){let e=(0,ne.c)(5),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsx)(`div`,{className:c(`h-4 min-w-0 flex-1`,q)}),e[0]=t):t=e[0];let n,r,i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[t,(0,K.jsxs)(`div`,{className:`flex shrink-0 gap-1`,children:[(0,K.jsx)(`div`,{className:c(`size-8 shrink-0 rounded-lg`,q)}),(0,K.jsx)(`div`,{className:c(`h-8 w-[4.5rem] shrink-0 rounded-lg`,q)})]})]}),r=(0,K.jsx)(`div`,{className:c(`h-3 w-full`,q)}),i=(0,K.jsx)(`div`,{className:c(`h-3 w-[92%]`,q)}),e[1]=n,e[2]=r,e[3]=i):(n=e[1],r=e[2],i=e[3]);let a;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(`div`,{className:`flex h-full min-h-[10.5rem] flex-col rounded-xl bg-surface-panel p-4 shadow-surface`,"aria-hidden":!0,children:(0,K.jsx)(`div`,{className:`flex min-h-0 flex-1 items-start gap-3`,children:(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[n,r,i,(0,K.jsxs)(`div`,{className:`mt-auto space-y-1 pt-0.5`,children:[(0,K.jsx)(`div`,{className:c(`h-3 w-full`,q)}),(0,K.jsx)(`div`,{className:c(`h-2.5 w-4/5`,q)})]})]})})}),e[4]=a):a=e[4],a}function Y(){let e=(0,ne.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsx)(J,{}),e[0]=t):t=e[0],t}var X=new Set([`installed`,`marketplace`]),Z=new Set([`all`,`builtin`,`installed`,`global`,`workspace`,`extra`]),ie=new Set([`all`,`enabled`,`disabled`]),ae=`mprov`,oe=[`s0`,`s1`,`s2`,`s3`,`s4`,`s5`],se=[`business`,`creative`,`documents`,`engineering`,`tools`];function ce(e){let t=(0,ne.c)(27),{sk:n,loading:r,catalog:i,filteredCatalog:a,builtinCategories:o,builtinCategoryFilter:s,setBuiltinCategoryFilter:u,catalogDisplayRows:d,catalogStatusFilter:f,resolveSkillEnabled:p,categoryLabel:m,sourceLabel:h,openSkillDetail:g,onSkillToggle:_,onUseSkillInChat:v,usingSkillInChatName:y,togglingSkillName:b}=e;if(r){let e=n.loading,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=oe.map(le),t[0]=r):r=t[0];let i;return t[1]===n.loading?i=t[2]:(i=(0,K.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3`,"aria-busy":`true`,"aria-label":e,children:r}),t[1]=n.loading,t[2]=i),i}if(i.length===0){let e;return t[3]===n.empty?e=t[4]:(e=(0,K.jsx)(`div`,{className:`rounded-2xl border border-dashed border-edge py-16 text-center text-sm text-fg-muted`,children:n.empty}),t[3]=n.empty,t[4]=e),e}if(a.length===0){let e;return t[5]===n.noSearchResults?e=t[6]:(e=(0,K.jsx)(`div`,{className:`rounded-2xl border border-dashed border-edge py-16 text-center text-sm text-fg-muted`,children:n.noSearchResults}),t[5]=n.noSearchResults,t[6]=e),e}let x;t[7]!==o||t[8]!==s||t[9]!==m||t[10]!==u||t[11]!==n?(x=o.length>1?(0,K.jsx)(W,{items:[{id:``,label:n.marketplaceCategoryAll},...o.map(e=>({id:e,label:m(e),title:m(e)}))],activeTab:s,onChange:u,ariaLabel:n.marketplaceCategoriesAria,tabIdPrefix:`skills-builtin-category-tab`,className:`gap-2 pt-0.5 [scrollbar-width:thin]`,buttonClassName:`max-w-[14rem] truncate rounded-full border px-3 py-1.5 text-xs`,selectedClassName:`border-fg bg-fg text-surface-panel dark:border-fg dark:bg-fg dark:text-surface-base`,unselectedClassName:`border-edge bg-surface-panel text-fg-muted hover:border-edge-strong hover:text-fg dark:border-edge dark:bg-surface-hover/40`}):null,t[7]=o,t[8]=s,t[9]=m,t[10]=u,t[11]=n,t[12]=x):x=t[12];let S;t[13]!==d||t[14]!==f||t[15]!==_||t[16]!==v||t[17]!==g||t[18]!==p||t[19]!==n||t[20]!==h||t[21]!==b||t[22]!==y?(S=d.length===0?(0,K.jsx)(`div`,{className:`rounded-2xl border border-dashed border-edge py-16 text-center text-sm text-fg-muted`,children:f===`disabled`?n.noDisabledSkills:n.noSearchResults}):(0,K.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3`,children:d.map(e=>{let t=p(e);return(0,K.jsxs)(`article`,{className:c(`group flex h-full flex-col rounded-xl bg-surface-panel p-4 shadow-surface transition-colors`,t?`hover:bg-surface-hover`:`bg-amber-50/30 hover:bg-amber-50/50 dark:bg-amber-950/20`),children:[(0,K.jsx)(`button`,{type:`button`,className:c(`flex min-h-0 w-full flex-1 cursor-pointer flex-col rounded-lg text-left outline-none`,L.focusRingPanel),"aria-labelledby":`catalog-skill-title-${e.directoryId}`,onClick:()=>void g(e),children:(0,K.jsx)(`div`,{className:`flex items-start gap-3`,children:(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[(0,K.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,K.jsx)(`h3`,{id:`catalog-skill-title-${e.directoryId}`,className:`min-w-0 flex-1 truncate text-[15px] font-semibold leading-snug tracking-tight text-fg`,children:e.name}),(0,K.jsxs)(`span`,{className:c(`inline-flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-medium`,t?`border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300`:`border-amber-500/30 bg-amber-500/10 text-amber-800 dark:text-amber-200`),children:[t?(0,K.jsx)(k,{className:`size-3`,"aria-hidden":!0}):(0,K.jsx)(l,{className:`size-3`,"aria-hidden":!0}),t?n.statusEnabled:n.statusDisabled]})]}),(0,K.jsx)(`p`,{className:`line-clamp-2 text-sm leading-relaxed text-fg-muted`,title:e.description?e.description:void 0,children:e.description||`—`}),(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-1.5 text-[11px] text-fg-subtle`,children:[(0,K.jsx)(`span`,{className:`rounded-md bg-surface-hover/60 px-2 py-0.5 dark:bg-surface-active/50`,children:h(e.source)}),e.managed?(0,K.jsxs)(`span`,{className:`rounded-md bg-surface-hover/60 px-2 py-0.5 dark:bg-surface-active/50`,children:[n.col.managed,`: `,n.yes]}):null,e.hub?(0,K.jsxs)(`span`,{className:`max-w-full break-all rounded-md bg-surface-hover/60 px-2 py-0.5 font-mono text-[10px] leading-snug dark:bg-surface-active/50 line-clamp-2`,title:`${e.hub.source}${e.hub.ref?`\nref: ${e.hub.ref}`:``}\nupdated: ${e.hub.updatedAt}`,children:[n.hubRemote,` ·`,` `,e.hub.kind===`git`?n.hubKindGit:n.hubKindArchive,` ·`,` `,e.hub.source.length>48?`${e.hub.source.slice(0,48)}…`:e.hub.source]}):null]})]})})}),(0,K.jsx)(`div`,{role:`group`,className:`mt-3 flex items-center justify-end gap-1 border-t border-edge-subtle pt-3`,children:t?(0,K.jsx)(N,{type:`button`,variant:`secondary`,className:`h-8 shrink-0 whitespace-nowrap px-2.5 text-xs font-medium`,disabled:y===e.name||b===e.name,onClick:()=>void v({name:e.name,source:`catalog`}),children:y===e.name?n.previewUseInChatBusy:n.previewUseInChat}):(0,K.jsx)(N,{type:`button`,variant:`primary`,className:`h-8 shrink-0 whitespace-nowrap px-2.5 text-xs font-medium`,disabled:b===e.name,onClick:()=>void _(e.name,!0),children:b===e.name?n.uploading:n.detailModalEnable})})]},`${e.directoryId}-${e.path}`)})}),t[13]=d,t[14]=f,t[15]=_,t[16]=v,t[17]=g,t[18]=p,t[19]=n,t[20]=h,t[21]=b,t[22]=y,t[23]=S):S=t[23];let C;return t[24]!==x||t[25]!==S?(C=(0,K.jsxs)(K.Fragment,{children:[x,S]}),t[24]=x,t[25]=S,t[26]=C):C=t[26],C}function le(e){return(0,K.jsx)(Y,{},e)}var ue=`https://skillhub.cn`,de=`https://clawhub.ai`;function fe(e){let t=e.trim();return t?`${ue}/skills/${encodeURIComponent(t)}`:null}function Q(e){let t=e.trim();return t?`${de}/${encodeURIComponent(t)}`:null}function pe(e,t){return e===`skillhub`?fe(t):e===`clawhub`?Q(t):null}function me(e,t){return t===`store`?e.name.trim()||e.id:e.id.trim()||e.name}function he(e,t){return e.replace(/\{\{(\w+)\}\}/g,(e,n)=>String(t[n]??``))}function ge(e){let t=[e.kind];return e.label?.trim()&&t.push(e.label.trim()),e.package?.trim()&&t.push(e.package.trim()),e.formula?.trim()&&t.push(e.formula.trim()),e.module?.trim()&&t.push(e.module.trim()),e.url?.trim()&&t.push(e.url.trim()),t.join(` · `)}function _e(e){return{...e,enabled:e.enabled??!0,disableModelInvocation:e.disableModelInvocation??!1}}function ve(e){let t=(0,ne.c)(32),{sk:n,confirmOpen:r,setConfirmOpen:i,confirmId:a,setConfirmId:o,runDelete:s}=e,c;t[0]!==o||t[1]!==i?(c=e=>{i(e),e||o(null)},t[0]=o,t[1]=i,t[2]=c):c=t[2];let l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,K.jsx)(S,{className:`xopc-dialog-overlay fixed inset-0 z-[60] bg-scrim`}),t[3]=l):l=t[3];let u;t[4]===n.deleteTitle?u=t[5]:(u=(0,K.jsx)(b,{className:`text-base font-semibold text-fg`,children:n.deleteTitle}),t[4]=n.deleteTitle,t[5]=u);let d;t[6]!==a||t[7]!==n.deleteMessage?(d=a?he(n.deleteMessage,{id:a}):``,t[6]=a,t[7]=n.deleteMessage,t[8]=d):d=t[8];let f;t[9]===d?f=t[10]:(f=(0,K.jsx)(`p`,{className:`mt-2 text-sm text-fg-muted`,children:d}),t[9]=d,t[10]=f);let p;t[11]===i?p=t[12]:(p=()=>i(!1),t[11]=i,t[12]=p);let m;t[13]!==n.cancel||t[14]!==p?(m=(0,K.jsx)(N,{type:`button`,variant:`secondary`,onClick:p,children:n.cancel}),t[13]=n.cancel,t[14]=p,t[15]=m):m=t[15];let h;t[16]===s?h=t[17]:(h=()=>void s(),t[16]=s,t[17]=h);let g;t[18]!==n.deleteConfirm||t[19]!==h?(g=(0,K.jsx)(N,{type:`button`,variant:`primary`,className:`bg-red-600 hover:bg-red-700`,onClick:h,children:n.deleteConfirm}),t[18]=n.deleteConfirm,t[19]=h,t[20]=g):g=t[20];let _;t[21]!==m||t[22]!==g?(_=(0,K.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[m,g]}),t[21]=m,t[22]=g,t[23]=_):_=t[23];let v;t[24]!==_||t[25]!==u||t[26]!==f?(v=(0,K.jsxs)(T,{children:[l,(0,K.jsxs)(P,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[60] w-[min(100%-2rem,24rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-edge bg-surface-panel p-4 shadow-popover dark:border-edge`,children:[u,f,_]})]}),t[24]=_,t[25]=u,t[26]=f,t[27]=v):v=t[27];let y;return t[28]!==r||t[29]!==c||t[30]!==v?(y=(0,K.jsx)(I,{open:r,onOpenChange:c,children:v}),t[28]=r,t[29]=c,t[30]=v,t[31]=y):y=t[31],y}var ye=[{light:`bg-sky-100 text-sky-800`,dark:`dark:bg-sky-950/55 dark:text-sky-200`},{light:`bg-violet-100 text-violet-800`,dark:`dark:bg-violet-950/55 dark:text-violet-200`},{light:`bg-emerald-100 text-emerald-800`,dark:`dark:bg-emerald-950/55 dark:text-emerald-200`},{light:`bg-orange-100 text-orange-800`,dark:`dark:bg-orange-950/55 dark:text-orange-200`},{light:`bg-rose-100 text-rose-800`,dark:`dark:bg-rose-950/55 dark:text-rose-200`},{light:`bg-amber-100 text-amber-900`,dark:`dark:bg-amber-950/55 dark:text-amber-200`},{light:`bg-cyan-100 text-cyan-800`,dark:`dark:bg-cyan-950/55 dark:text-cyan-200`},{light:`bg-indigo-100 text-indigo-800`,dark:`dark:bg-indigo-950/55 dark:text-indigo-200`},{light:`bg-fuchsia-100 text-fuchsia-800`,dark:`dark:bg-fuchsia-950/55 dark:text-fuchsia-200`},{light:`bg-teal-100 text-teal-800`,dark:`dark:bg-teal-950/55 dark:text-teal-200`}];function be(e){let t=0;for(let n=0;n<e.length;n+=1)t=Math.imul(31,t)+e.charCodeAt(n)|0;return Math.abs(t)}function xe(e){let t=e.trim();if(!t)return`?`;let n=t.match(/[\p{L}\p{N}]/u);return n?n[0].toLocaleUpperCase(`en-US`):t[0]}function Se(e){let t=(0,ne.c)(9),{name:n,className:r}=e,i;t[0]===n?i=t[1]:(i=xe(n),t[0]=n,t[1]=i);let a=i,o=ye[be(n)%ye.length],s;t[2]!==r||t[3]!==o.dark||t[4]!==o.light?(s=c(`flex size-11 shrink-0 items-center justify-center rounded-xl font-semibold tracking-tight shadow-surface`,`text-[1.05rem] ring-1 ring-inset ring-black/[0.06] dark:ring-white/[0.1]`,`transition-[transform,box-shadow] duration-200 ease-out group-hover:ring-black/[0.1] dark:group-hover:ring-white/[0.14]`,`group-hover:-translate-y-px`,o.light,o.dark,r),t[2]=r,t[3]=o.dark,t[4]=o.light,t[5]=s):s=t[5];let l;return t[6]!==a||t[7]!==s?(l=(0,K.jsx)(`div`,{className:s,"aria-hidden":!0,children:a}),t[6]=a,t[7]=s,t[8]=l):l=t[8],l}function Ce(e){let t=(0,ne.c)(7),{label:n,children:r}=e;if(r==null||r===!1)return null;let i;t[0]===n?i=t[1]:(i=(0,K.jsx)(`div`,{className:`text-xs font-semibold uppercase tracking-wide text-fg-muted`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,K.jsx)(`div`,{className:`mt-1.5 min-w-0 text-sm text-fg`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,K.jsxs)(`div`,{className:`mt-3 border-t border-edge-subtle pt-3 dark:border-edge/60`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function we(e){let t=(0,ne.c)(118),{preview:n,sk:r}=e,i=n.metadata,a=n.toolConditions,o=!!a&&(a.requiresTools.length>0||a.requiresToolsets.length>0||a.fallbackForTools.length>0||a.fallbackForToolsets.length>0),s=i.requires,l=s&&((s.bins?.length??0)>0||(s.env?.length??0)>0||(s.anyBins?.length??0)>0),u,d,f,p,m,h,g,_,v,y,b,x,S,C,w;if(t[0]!==a||t[1]!==l||t[2]!==o||t[3]!==i.emoji||t[4]!==i.homepage||t[5]!==i.install||t[6]!==i.os||t[7]!==n.description||t[8]!==n.disableModelInvocation||t[9]!==n.requiredEnvVarNames||t[10]!==s||t[11]!==r.detailEnvVarsLabel||t[12]!==r.detailHomepageLabel||t[13]!==r.detailInstallLabel||t[14]!==r.detailNotInjectedNote||t[15]!==r.detailPlatformsLabel||t[16]!==r.detailRequiresAnyBins||t[17]!==r.detailRequiresBins||t[18]!==r.detailRequiresEnv||t[19]!==r.detailRequiresLabel||t[20]!==r.detailSummaryHeading||t[21]!==r.detailToolGatingLabel||t[22]!==r.detailToolsFallbackList||t[23]!==r.detailToolsRequiresList||t[24]!==r.detailToolsetsFallbackList||t[25]!==r.detailToolsetsRequiresList){let e=i.install?.filter(De)??[],T=n.requiredEnvVarNames?.filter(Ee)??[];g=`space-y-6`,m=`skill-detail-summary-heading`,t[41]===r.detailSummaryHeading?h=t[42]:(h=(0,K.jsx)(`h3`,{id:`skill-detail-summary-heading`,className:`mb-2 text-xs font-semibold uppercase tracking-wide text-fg-muted`,children:r.detailSummaryHeading}),t[41]=r.detailSummaryHeading,t[42]=h),v=`rounded-xl border border-edge bg-surface-base px-4 py-3 dark:bg-surface-hover/25`,t[43]===i.emoji?y=t[44]:(y=i.emoji?.trim()?(0,K.jsx)(`p`,{className:`text-2xl leading-none`,"aria-hidden":!0,children:i.emoji.trim()}):null,t[43]=i.emoji,t[44]=y);let E;t[45]===i.emoji?E=t[46]:(E=i.emoji?.trim()?`mt-2`:``,t[45]=i.emoji,t[46]=E);let D;t[47]===E?D=t[48]:(D=c(`text-sm leading-relaxed text-fg`,E),t[47]=E,t[48]=D),t[49]!==n.description||t[50]!==D?(b=(0,K.jsx)(`p`,{className:D,children:n.description}),t[49]=n.description,t[50]=D,t[51]=b):b=t[51],t[52]!==n.disableModelInvocation||t[53]!==r.detailNotInjectedNote?(x=n.disableModelInvocation?(0,K.jsx)(`p`,{className:`mt-3 rounded-lg border border-amber-200/80 bg-amber-50/90 px-3 py-2 text-xs leading-snug text-amber-950 dark:border-amber-900/50 dark:bg-amber-950/40 dark:text-amber-100`,children:r.detailNotInjectedNote}):null,t[52]=n.disableModelInvocation,t[53]=r.detailNotInjectedNote,t[54]=x):x=t[54];let O;t[55]===i.homepage?O=t[56]:(O=i.homepage?.trim()?(0,K.jsx)(`a`,{href:i.homepage.trim(),target:`_blank`,rel:`noopener noreferrer`,className:`break-all text-accent underline-offset-2 hover:underline`,children:i.homepage.trim()}):null,t[55]=i.homepage,t[56]=O),t[57]!==r.detailHomepageLabel||t[58]!==O?(S=(0,K.jsx)(Ce,{label:r.detailHomepageLabel,children:O}),t[57]=r.detailHomepageLabel,t[58]=O,t[59]=S):S=t[59];let k;t[60]===i.os?k=t[61]:(k=i.os&&i.os.length>0?(0,K.jsx)(`span`,{className:`font-mono text-xs text-fg-muted`,children:i.os.join(`, `)}):null,t[60]=i.os,t[61]=k),t[62]!==r.detailPlatformsLabel||t[63]!==k?(C=(0,K.jsx)(Ce,{label:r.detailPlatformsLabel,children:k}),t[62]=r.detailPlatformsLabel,t[63]=k,t[64]=C):C=t[64];let A;t[65]!==l||t[66]!==s||t[67]!==r.detailRequiresAnyBins||t[68]!==r.detailRequiresBins||t[69]!==r.detailRequiresEnv?(A=l&&s?(0,K.jsxs)(`ul`,{className:`list-inside list-disc space-y-1 text-sm text-fg-muted`,children:[s.bins&&s.bins.length>0?(0,K.jsxs)(`li`,{children:[(0,K.jsxs)(`span`,{className:`text-fg`,children:[r.detailRequiresBins,`: `]}),s.bins.join(`, `)]}):null,s.env&&s.env.length>0?(0,K.jsxs)(`li`,{children:[(0,K.jsxs)(`span`,{className:`text-fg`,children:[r.detailRequiresEnv,`: `]}),(0,K.jsx)(`span`,{className:`font-mono text-xs`,children:s.env.join(`, `)})]}):null,s.anyBins&&s.anyBins.length>0?(0,K.jsxs)(`li`,{children:[(0,K.jsxs)(`span`,{className:`text-fg`,children:[r.detailRequiresAnyBins,`: `]}),s.anyBins.join(`, `)]}):null]}):null,t[65]=l,t[66]=s,t[67]=r.detailRequiresAnyBins,t[68]=r.detailRequiresBins,t[69]=r.detailRequiresEnv,t[70]=A):A=t[70],t[71]!==r.detailRequiresLabel||t[72]!==A?(w=(0,K.jsx)(Ce,{label:r.detailRequiresLabel,children:A}),t[71]=r.detailRequiresLabel,t[72]=A,t[73]=w):w=t[73];let j=e.length>0?(0,K.jsx)(`ul`,{className:`list-inside list-decimal space-y-1.5 text-sm text-fg-muted`,children:e.map(Te)}):null;t[74]!==r.detailInstallLabel||t[75]!==j?(f=(0,K.jsx)(Ce,{label:r.detailInstallLabel,children:j}),t[74]=r.detailInstallLabel,t[75]=j,t[76]=f):f=t[76];let M;t[77]!==a||t[78]!==o||t[79]!==r.detailToolsFallbackList||t[80]!==r.detailToolsRequiresList||t[81]!==r.detailToolsetsFallbackList||t[82]!==r.detailToolsetsRequiresList?(M=o&&a?(0,K.jsxs)(`ul`,{className:`mt-1 space-y-2 text-sm text-fg-muted`,children:[a.requiresTools.length>0?(0,K.jsxs)(`li`,{children:[(0,K.jsxs)(`span`,{className:`font-medium text-fg`,children:[r.detailToolsRequiresList,`: `]}),a.requiresTools.join(`, `)]}):null,a.requiresToolsets.length>0?(0,K.jsxs)(`li`,{children:[(0,K.jsxs)(`span`,{className:`font-medium text-fg`,children:[r.detailToolsetsRequiresList,`: `]}),a.requiresToolsets.join(`, `)]}):null,a.fallbackForTools.length>0?(0,K.jsxs)(`li`,{children:[(0,K.jsxs)(`span`,{className:`font-medium text-fg`,children:[r.detailToolsFallbackList,`: `]}),a.fallbackForTools.join(`, `)]}):null,a.fallbackForToolsets.length>0?(0,K.jsxs)(`li`,{children:[(0,K.jsxs)(`span`,{className:`font-medium text-fg`,children:[r.detailToolsetsFallbackList,`: `]}),a.fallbackForToolsets.join(`, `)]}):null]}):null,t[77]=a,t[78]=o,t[79]=r.detailToolsFallbackList,t[80]=r.detailToolsRequiresList,t[81]=r.detailToolsetsFallbackList,t[82]=r.detailToolsetsRequiresList,t[83]=M):M=t[83],t[84]!==r.detailToolGatingLabel||t[85]!==M?(p=(0,K.jsx)(Ce,{label:r.detailToolGatingLabel,children:M}),t[84]=r.detailToolGatingLabel,t[85]=M,t[86]=p):p=t[86],u=Ce,d=r.detailEnvVarsLabel,_=T.length>0?(0,K.jsx)(`span`,{className:`font-mono text-xs text-fg-muted`,children:T.join(`, `)}):null,t[0]=a,t[1]=l,t[2]=o,t[3]=i.emoji,t[4]=i.homepage,t[5]=i.install,t[6]=i.os,t[7]=n.description,t[8]=n.disableModelInvocation,t[9]=n.requiredEnvVarNames,t[10]=s,t[11]=r.detailEnvVarsLabel,t[12]=r.detailHomepageLabel,t[13]=r.detailInstallLabel,t[14]=r.detailNotInjectedNote,t[15]=r.detailPlatformsLabel,t[16]=r.detailRequiresAnyBins,t[17]=r.detailRequiresBins,t[18]=r.detailRequiresEnv,t[19]=r.detailRequiresLabel,t[20]=r.detailSummaryHeading,t[21]=r.detailToolGatingLabel,t[22]=r.detailToolsFallbackList,t[23]=r.detailToolsRequiresList,t[24]=r.detailToolsetsFallbackList,t[25]=r.detailToolsetsRequiresList,t[26]=u,t[27]=d,t[28]=f,t[29]=p,t[30]=m,t[31]=h,t[32]=g,t[33]=_,t[34]=v,t[35]=y,t[36]=b,t[37]=x,t[38]=S,t[39]=C,t[40]=w}else u=t[26],d=t[27],f=t[28],p=t[29],m=t[30],h=t[31],g=t[32],_=t[33],v=t[34],y=t[35],b=t[36],x=t[37],S=t[38],C=t[39],w=t[40];let T;t[87]!==u||t[88]!==d||t[89]!==_?(T=(0,K.jsx)(u,{label:d,children:_}),t[87]=u,t[88]=d,t[89]=_,t[90]=T):T=t[90];let E;t[91]!==f||t[92]!==p||t[93]!==T||t[94]!==v||t[95]!==y||t[96]!==b||t[97]!==x||t[98]!==S||t[99]!==C||t[100]!==w?(E=(0,K.jsxs)(`div`,{className:v,children:[y,b,x,S,C,w,f,p,T]}),t[91]=f,t[92]=p,t[93]=T,t[94]=v,t[95]=y,t[96]=b,t[97]=x,t[98]=S,t[99]=C,t[100]=w,t[101]=E):E=t[101];let D;t[102]!==m||t[103]!==h||t[104]!==E?(D=(0,K.jsxs)(`section`,{"aria-labelledby":m,children:[h,E]}),t[102]=m,t[103]=h,t[104]=E,t[105]=D):D=t[105];let k;t[106]===r.detailInstructionsHeading?k=t[107]:(k=(0,K.jsx)(`h3`,{id:`skill-detail-instructions-heading`,className:`mb-2 text-xs font-semibold uppercase tracking-wide text-fg-muted`,children:r.detailInstructionsHeading}),t[106]=r.detailInstructionsHeading,t[107]=k);let A;t[108]!==n.bodyMarkdown||t[109]!==r.detailNoInstructionsBody?(A=n.bodyMarkdown.trim()?(0,K.jsx)(`div`,{className:`markdown-content min-w-0 break-words`,children:(0,K.jsx)(O,{content:n.bodyMarkdown})}):(0,K.jsx)(`p`,{className:`text-sm italic text-fg-muted`,children:r.detailNoInstructionsBody}),t[108]=n.bodyMarkdown,t[109]=r.detailNoInstructionsBody,t[110]=A):A=t[110];let j;t[111]!==k||t[112]!==A?(j=(0,K.jsxs)(`section`,{"aria-labelledby":`skill-detail-instructions-heading`,children:[k,A]}),t[111]=k,t[112]=A,t[113]=j):j=t[113];let M;return t[114]!==g||t[115]!==D||t[116]!==j?(M=(0,K.jsxs)(`div`,{className:g,children:[D,j]}),t[114]=g,t[115]=D,t[116]=j,t[117]=M):M=t[117],M}function Te(e,t){return(0,K.jsx)(`li`,{className:`[overflow-wrap:anywhere]`,children:(0,K.jsx)(`span`,{className:`text-fg`,children:ge(e)})},e.id||`${e.kind}-${t}`)}function Ee(e){return e.trim()}function De(e){return e&&typeof e.kind==`string`}var Oe=[{id:`s0`,width:`w-[92%]`},{id:`s1`,width:`w-full`},{id:`s2`,width:`w-4/5`},{id:`s3`,width:`w-[92%]`},{id:`s4`,width:`w-full`},{id:`s5`,width:`w-4/5`},{id:`s6`,width:`w-[92%]`},{id:`s7`,width:`w-full`},{id:`s8`,width:`w-4/5`},{id:`s9`,width:`w-[92%]`}];function ke(e){let t=(0,ne.c)(81),{sk:n,detailOpen:r,setDetailOpen:i,detailSource:a,setDetailSource:o,detailTitle:s,setDetailTitle:l,detailCatalogPreview:u,setDetailCatalogPreview:d,detailMarketplacePreview:f,setDetailMarketplacePreview:p,detailLoading:m,detailError:h,setDetailError:g,detailEnabled:y,detailDirectoryId:x,detailManaged:w,detailExternalUrl:E,usingSkillInChatName:D,installingMarketName:O,togglingSkillName:k,isSkillInstalledByName:A,onUseSkillInChat:j,onMarketInstall:M,onSkillToggle:z,setConfirmId:B,setConfirmOpen:V}=e,H;t[0]!==d||t[1]!==g||t[2]!==p||t[3]!==i||t[4]!==o||t[5]!==l?(H=e=>{i(e),e||(o(`catalog`),d(null),p(null),g(null),l(``))},t[0]=d,t[1]=g,t[2]=p,t[3]=i,t[4]=o,t[5]=l,t[6]=H):H=t[6];let U;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,K.jsx)(S,{className:`xopc-dialog-overlay fixed inset-0 z-[60] bg-scrim`}),t[7]=U):U=t[7];let W;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(W=c(`xopc-dialog-content fixed left-1/2 top-1/2 z-[60] flex h-[min(88vh,44rem)] max-h-[min(92vh,56rem)] w-[min(100%-2rem,min(92vw,56rem))]`,`-translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-2xl border border-edge bg-surface-panel shadow-float dark:border-edge`),t[8]=W):W=t[8];let te=s||`?`,G;t[9]===te?G=t[10]:(G=(0,K.jsx)(Se,{name:te}),t[9]=te,t[10]=G);let re=s||`—`,q;t[11]===re?q=t[12]:(q=(0,K.jsx)(b,{className:`min-w-0 flex-1 truncate text-base font-semibold text-fg`,children:re}),t[11]=re,t[12]=q);let J;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(J=c(`rounded-lg p-1.5 text-fg-muted hover:bg-surface-hover hover:text-fg`,L.focusRingPanel),t[13]=J):J=t[13];let Y;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,K.jsx)(ee,{className:`size-5`,strokeWidth:1.75,"aria-hidden":!0}),t[14]=Y):Y=t[14];let X;t[15]===n.detailCloseAria?X=t[16]:(X=(0,K.jsx)(_,{asChild:!0,children:(0,K.jsx)(`button`,{type:`button`,className:J,"aria-label":n.detailCloseAria,children:Y})}),t[15]=n.detailCloseAria,t[16]=X);let Z;t[17]!==G||t[18]!==q||t[19]!==X?(Z=(0,K.jsxs)(`div`,{className:`group flex min-h-[3.25rem] shrink-0 items-center gap-3 border-b border-edge px-4 py-3`,children:[G,q,X]}),t[17]=G,t[18]=q,t[19]=X,t[20]=Z):Z=t[20];let ie;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,K.jsx)(R,{className:`mt-0.5 size-4 shrink-0 text-blue-600 dark:text-blue-400`,strokeWidth:1.75,"aria-hidden":!0}),t[21]=ie):ie=t[21];let ae=a===`store`&&f?n.detailModalBanner:a===`store`?n.detailModalBannerStore:n.detailModalBanner,oe;t[22]===ae?oe=t[23]:(oe=(0,K.jsxs)(`div`,{className:`flex min-h-[3.25rem] shrink-0 items-start gap-2 border-b border-blue-200/80 bg-blue-50/95 px-4 py-2.5 text-sm text-fg dark:border-blue-900/50 dark:bg-blue-950/45`,children:[ie,(0,K.jsx)(`p`,{className:`min-w-0 leading-relaxed`,children:ae})]}),t[22]=ae,t[23]=oe);let se;t[24]!==u||t[25]!==y||t[26]!==h||t[27]!==m||t[28]!==f||t[29]!==a||t[30]!==n?(se=(0,K.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-auto p-4`,children:m?(0,K.jsx)(`div`,{className:`flex h-full min-h-[14rem] flex-col gap-2.5 py-1`,"aria-busy":`true`,"aria-label":n.loading,children:Oe.map(Ae)}):h?(0,K.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:h}):a===`catalog`&&u?(0,K.jsxs)(K.Fragment,{children:[y?null:(0,K.jsxs)(`div`,{className:`mb-4 flex items-start gap-2 rounded-xl border border-amber-200 bg-amber-50 px-3 py-2.5 text-sm text-amber-900 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-100`,children:[(0,K.jsx)(v,{className:`mt-0.5 size-4 shrink-0 text-amber-600 dark:text-amber-300`,strokeWidth:1.75,"aria-hidden":!0}),(0,K.jsx)(`p`,{className:`leading-relaxed`,children:n.detailDisabledNotice})]}),(0,K.jsx)(we,{preview:u,sk:n})]}):a===`store`&&f?(0,K.jsx)(we,{preview:f,sk:n}):(0,K.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:n.detailLoadFailed})}),t[24]=u,t[25]=y,t[26]=h,t[27]=m,t[28]=f,t[29]=a,t[30]=n,t[31]=se):se=t[31];let ce;t[32]!==E||t[33]!==a||t[34]!==n.marketplaceOpenExternal||t[35]!==n.marketplaceOpenExternalAria?(ce=a===`store`&&E?(0,K.jsxs)(`a`,{href:E,target:`_blank`,rel:`noopener noreferrer`,className:c(`inline-flex h-9 items-center gap-1.5 rounded-lg border border-edge bg-surface-panel px-3 text-sm font-medium text-fg-muted`,`hover:bg-surface-hover hover:text-fg dark:border-edge`,L.focusRingPanel),"aria-label":n.marketplaceOpenExternalAria,title:n.marketplaceOpenExternal,children:[(0,K.jsx)(C,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0}),(0,K.jsx)(`span`,{children:n.marketplaceOpenExternal})]}):null,t[32]=E,t[33]=a,t[34]=n.marketplaceOpenExternal,t[35]=n.marketplaceOpenExternalAria,t[36]=ce):ce=t[36];let le;t[37]!==x||t[38]!==w||t[39]!==a||t[40]!==B||t[41]!==V||t[42]!==n.delete?(le=a===`catalog`&&w&&x?(0,K.jsxs)(N,{type:`button`,variant:`ghost`,className:`gap-1.5 text-red-600 hover:bg-red-50 hover:text-red-700 dark:text-red-400 dark:hover:bg-red-950/40 dark:hover:text-red-300`,onClick:()=>{B(x),V(!0)},children:[(0,K.jsx)(F,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0}),n.delete]}):null,t[37]=x,t[38]=w,t[39]=a,t[40]=B,t[41]=V,t[42]=n.delete,t[43]=le):le=t[43];let ue;t[44]!==ce||t[45]!==le?(ue=(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[ce,le]}),t[44]=ce,t[45]=le,t[46]=ue):ue=t[46];let de;t[47]!==y||t[48]!==m||t[49]!==a||t[50]!==s||t[51]!==O||t[52]!==A||t[53]!==M||t[54]!==z||t[55]!==j||t[56]!==i||t[57]!==n.cancel||t[58]!==n.detailModalDisable||t[59]!==n.detailModalEnable||t[60]!==n.marketplaceInstall||t[61]!==n.marketplaceReinstall||t[62]!==n.previewUseInChat||t[63]!==n.previewUseInChatBusy||t[64]!==n.uploading||t[65]!==n.useRequiresEnabled||t[66]!==k||t[67]!==D?(de=(0,K.jsx)(`div`,{className:`flex items-center gap-2`,children:a===`store`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(N,{type:`button`,variant:`ghost`,onClick:()=>i(!1),children:n.cancel}),(0,K.jsx)(N,{type:`button`,variant:`secondary`,disabled:!s||m||D===s||O===s,onClick:()=>void j(),children:D===s?n.previewUseInChatBusy:n.previewUseInChat}),(0,K.jsx)(N,{type:`button`,variant:A(s)?`secondary`:`primary`,disabled:!s||O===s,onClick:()=>{s&&M(s,{useDetailProvider:!0})},children:O===s?n.uploading:A(s)?n.marketplaceReinstall:n.marketplaceInstall})]}):(0,K.jsxs)(K.Fragment,{children:[y?(0,K.jsx)(N,{type:`button`,variant:`secondary`,disabled:!s||k===s,onClick:()=>{s&&z(s,!1)},children:k===s?n.uploading:n.detailModalDisable}):(0,K.jsx)(N,{type:`button`,variant:`primary`,disabled:!s||k===s,onClick:()=>{s&&z(s,!0)},children:k===s?n.uploading:n.detailModalEnable}),(0,K.jsx)(N,{type:`button`,variant:`secondary`,disabled:!s||!y||m||D===s||k===s,title:y?void 0:n.useRequiresEnabled,onClick:()=>void j(),children:D===s?n.previewUseInChatBusy:n.previewUseInChat})]})}),t[47]=y,t[48]=m,t[49]=a,t[50]=s,t[51]=O,t[52]=A,t[53]=M,t[54]=z,t[55]=j,t[56]=i,t[57]=n.cancel,t[58]=n.detailModalDisable,t[59]=n.detailModalEnable,t[60]=n.marketplaceInstall,t[61]=n.marketplaceReinstall,t[62]=n.previewUseInChat,t[63]=n.previewUseInChatBusy,t[64]=n.uploading,t[65]=n.useRequiresEnabled,t[66]=k,t[67]=D,t[68]=de):de=t[68];let fe;t[69]!==ue||t[70]!==de?(fe=(0,K.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 border-t border-edge px-4 py-3`,children:[ue,de]}),t[69]=ue,t[70]=de,t[71]=fe):fe=t[71];let Q;t[72]!==Z||t[73]!==oe||t[74]!==se||t[75]!==fe?(Q=(0,K.jsxs)(T,{children:[U,(0,K.jsxs)(P,{className:W,children:[Z,oe,se,fe]})]}),t[72]=Z,t[73]=oe,t[74]=se,t[75]=fe,t[76]=Q):Q=t[76];let pe;return t[77]!==r||t[78]!==H||t[79]!==Q?(pe=(0,K.jsx)(I,{open:r,onOpenChange:H,children:Q}),t[77]=r,t[78]=H,t[79]=Q,t[80]=pe):pe=t[80],pe}function Ae(e){return(0,K.jsx)(`div`,{className:c(`h-4 animate-pulse rounded-md bg-surface-hover dark:bg-surface-active/50`,e.width)},e.id)}function je(e){let t=(0,ne.c)(67),{sk:n,installOpen:r,setInstallOpen:i,pendingFile:a,setPendingFile:o,dropActive:s,setDropActive:l,uploading:u,onModalDragOver:d,onModalDragLeave:f,onModalDrop:p,onFileInputChange:m,onInstallSubmit:h}=e,g;t[0]!==l||t[1]!==i||t[2]!==o?(g=e=>{i(e),e||(o(null),l(!1))},t[0]=l,t[1]=i,t[2]=o,t[3]=g):g=t[3];let v;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,K.jsx)(S,{className:`xopc-dialog-overlay fixed inset-0 z-[60] bg-scrim`}),t[4]=v):v=t[4];let x;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(x=c(`xopc-dialog-content fixed left-1/2 top-1/2 z-[60] max-h-[min(100vh-2rem,44rem)] w-[min(100%-2rem,min(92vw,48rem))] -translate-x-1/2 -translate-y-1/2 overflow-y-auto`,`rounded-2xl border border-edge bg-surface-panel p-6 shadow-float dark:border-edge`),t[5]=x):x=t[5];let C;t[6]===n.installModalTitle?C=t[7]:(C=(0,K.jsx)(b,{className:`text-base font-semibold text-fg`,children:n.installModalTitle}),t[6]=n.installModalTitle,t[7]=C);let w;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(w=c(`rounded-lg p-1.5 text-fg-muted hover:bg-surface-hover hover:text-fg`,L.focusRingPanel),t[8]=w):w=t[8];let E;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,K.jsx)(ee,{className:`size-5`,strokeWidth:1.75,"aria-hidden":!0}),t[9]=E):E=t[9];let D;t[10]===n.installClose?D=t[11]:(D=(0,K.jsx)(`span`,{className:`sr-only`,children:n.installClose}),t[10]=n.installClose,t[11]=D);let O;t[12]!==n.installClose||t[13]!==D?(O=(0,K.jsx)(_,{asChild:!0,children:(0,K.jsxs)(`button`,{type:`button`,className:w,"aria-label":n.installClose,children:[E,D]})}),t[12]=n.installClose,t[13]=D,t[14]=O):O=t[14];let k;t[15]!==C||t[16]!==O?(k=(0,K.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[C,O]}),t[15]=C,t[16]=O,t[17]=k):k=t[17];let A=s?`border-accent bg-accent-soft/60 dark:bg-blue-950/40`:`border-edge bg-surface-base dark:bg-surface-hover/30`,j;t[18]===A?j=t[19]:(j=c(`mt-4 flex min-h-[11rem] cursor-pointer flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-12 text-center transition-colors`,A),t[18]=A,t[19]=j);let M;t[20]!==m||t[21]!==n.installModalDropHint||t[22]!==u?(M=(0,K.jsx)(`input`,{type:`file`,accept:`.zip,.md,application/zip,text/markdown`,className:`sr-only`,"aria-label":n.installModalDropHint,disabled:u,onChange:m}),t[20]=m,t[21]=n.installModalDropHint,t[22]=u,t[23]=M):M=t[23];let N;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,K.jsx)(y,{className:`size-12 text-fg-subtle`,strokeWidth:1.25,"aria-hidden":!0}),t[24]=N):N=t[24];let F;t[25]===n.installModalDropHint?F=t[26]:(F=(0,K.jsx)(`span`,{className:`text-sm text-fg-muted`,children:n.installModalDropHint}),t[25]=n.installModalDropHint,t[26]=F);let R;t[27]===a?R=t[28]:(R=a?(0,K.jsx)(`span`,{className:`text-xs font-medium text-fg`,children:a.name}):null,t[27]=a,t[28]=R);let z;t[29]!==f||t[30]!==d||t[31]!==p||t[32]!==j||t[33]!==M||t[34]!==F||t[35]!==R?(z=(0,K.jsxs)(`label`,{className:j,onDragLeave:f,onDragOver:d,onDrop:p,children:[M,N,F,R]}),t[29]=f,t[30]=d,t[31]=p,t[32]=j,t[33]=M,t[34]=F,t[35]=R,t[36]=z):z=t[36];let B;t[37]===n.installModalReqTitle?B=t[38]:(B=(0,K.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:n.installModalReqTitle}),t[37]=n.installModalReqTitle,t[38]=B);let V;t[39]===n.installModalReq1?V=t[40]:(V=(0,K.jsx)(`li`,{children:n.installModalReq1}),t[39]=n.installModalReq1,t[40]=V);let H;t[41]===n.installModalReq2?H=t[42]:(H=(0,K.jsx)(`li`,{children:n.installModalReq2}),t[41]=n.installModalReq2,t[42]=H);let U;t[43]!==V||t[44]!==H?(U=(0,K.jsxs)(`ul`,{className:`list-inside list-disc space-y-1 text-sm text-fg-muted`,children:[V,H]}),t[43]=V,t[44]=H,t[45]=U):U=t[45];let W;t[46]!==B||t[47]!==U?(W=(0,K.jsxs)(`div`,{className:`mt-5 space-y-2`,children:[B,U]}),t[46]=B,t[47]=U,t[48]=W):W=t[48];let te=!a||u,G=!a||u?`cursor-not-allowed bg-surface-active text-fg-disabled`:`bg-accent text-white hover:bg-accent-hover`,re;t[49]===G?re=t[50]:(re=c(`mt-6 flex w-full items-center justify-center rounded-xl py-3 text-sm font-semibold`,`transition-colors`,G,L.focusRingPanel),t[49]=G,t[50]=re);let q;t[51]===h?q=t[52]:(q=()=>void h(),t[51]=h,t[52]=q);let J=u?n.uploading:n.installAction,Y;t[53]!==te||t[54]!==re||t[55]!==q||t[56]!==J?(Y=(0,K.jsx)(`button`,{type:`button`,disabled:te,className:re,onClick:q,children:J}),t[53]=te,t[54]=re,t[55]=q,t[56]=J,t[57]=Y):Y=t[57];let X;t[58]!==z||t[59]!==W||t[60]!==Y||t[61]!==k?(X=(0,K.jsxs)(T,{children:[v,(0,K.jsxs)(P,{className:x,children:[k,z,W,Y]})]}),t[58]=z,t[59]=W,t[60]=Y,t[61]=k,t[62]=X):X=t[62];let Z;return t[63]!==r||t[64]!==g||t[65]!==X?(Z=(0,K.jsx)(I,{open:r,onOpenChange:g,children:X}),t[63]=r,t[64]=g,t[65]=X,t[66]=Z):Z=t[66],Z}function Me(e){let t=(0,ne.c)(66),{sk:n,mpCategories:r,mpCategoriesLoading:i,mpCategoriesError:a,mpPayload:o,mpLoading:s,mpError:l,marketCategoryId:u,setMarketCategoryId:d,marketPage:f,setMarketPage:p,isSkillInstalledByName:m,openMarketplaceDetail:h,onMarketInstall:_,installingMarketName:v,onUseSkillInChat:y,usingSkillInChatName:b,searchInputActive:x,searchQuery:S,setSearchQuery:C,registeredProviders:w,marketBrowseProvider:T,setMarketBrowseProvider:D}=e,O=!x,A,M,P;if(t[0]!==v||t[1]!==m||t[2]!==T||t[3]!==u||t[4]!==f||t[5]!==r||t[6]!==a||t[7]!==i||t[8]!==l||t[9]!==s||t[10]!==o||t[11]!==_||t[12]!==y||t[13]!==h||t[14]!==w||t[15]!==x||t[16]!==S||t[17]!==D||t[18]!==d||t[19]!==p||t[20]!==C||t[21]!==O||t[22]!==n.loading||t[23]!==n.marketplaceAuthor||t[24]!==n.marketplaceCategoriesAria||t[25]!==n.marketplaceCategoryAll||t[26]!==n.marketplaceDownloads||t[27]!==n.marketplaceEmpty||t[28]!==n.marketplaceEmptySearch||t[29]!==n.marketplaceEmptySearchClear||t[30]!==n.marketplaceEmptySearchTryProvider||t[31]!==n.marketplaceInstall||t[32]!==n.marketplaceInstalled||t[33]!==n.marketplacePageNext||t[34]!==n.marketplacePagePrev||t[35]!==n.marketplacePageStatus||t[36]!==n.marketplaceVersion||t[37]!==n.previewUseInChat||t[38]!==n.previewUseInChatBusy||t[39]!==n.uploading||t[40]!==b){let e;t[44]===T?e=t[45]:(e=e=>e.id!==T,t[44]=T,t[45]=e);let F=w.filter(e),I=S.trim(),R;t[46]===n.marketplaceCategoryAll?R=t[47]:(R={id:``,label:n.marketplaceCategoryAll},t[46]=n.marketplaceCategoryAll,t[47]=R);let z;t[48]!==r||t[49]!==R?(z=[R,...r.map(Ie)],t[48]=r,t[49]=R,t[50]=z):z=t[50];let B=z;t[51]!==B||t[52]!==u||t[53]!==r.length||t[54]!==i||t[55]!==d||t[56]!==O||t[57]!==n.marketplaceCategoriesAria?(A=O?r.length>0?(0,K.jsx)(W,{items:B,activeTab:u,onChange:d,ariaLabel:n.marketplaceCategoriesAria,tabIdPrefix:`skills-marketplace-category-tab`,className:`min-h-[2.75rem] items-center gap-2 pt-0.5 [scrollbar-width:thin]`,buttonClassName:`max-w-[14rem] truncate rounded-full border px-3 py-1.5 text-xs`,selectedClassName:`border-fg bg-fg text-surface-panel dark:border-fg dark:bg-fg dark:text-surface-base`,unselectedClassName:`border-edge bg-surface-panel text-fg-muted hover:border-edge-strong hover:text-fg dark:border-edge dark:bg-surface-hover/40`}):i?(0,K.jsx)(`div`,{className:`-mx-1 flex min-h-[2.75rem] items-center gap-2 overflow-x-auto px-1 pb-1 pt-0.5 [scrollbar-width:thin]`,"aria-hidden":!0,children:[`p0`,`p1`,`p2`,`p3`,`p4`].map(Fe)}):null:null,t[51]=B,t[52]=u,t[53]=r.length,t[54]=i,t[55]=d,t[56]=O,t[57]=n.marketplaceCategoriesAria,t[58]=A):A=t[58],t[59]!==a||t[60]!==O?(M=O&&a?(0,K.jsx)(`p`,{className:`text-xs text-red-600 dark:text-red-400`,role:`alert`,children:a}):null,t[59]=a,t[60]=O,t[61]=M):M=t[61],P=!o&&!l?(0,K.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3`,"aria-busy":`true`,"aria-label":n.loading,children:oe.map(Pe)}):l&&!o?(0,K.jsx)(`div`,{className:`rounded-xl border border-edge bg-red-50 px-3 py-2 text-sm text-red-700 dark:border-edge dark:bg-red-950/40 dark:text-red-300`,role:`alert`,children:l}):o?(0,K.jsxs)(`div`,{className:`relative`,children:[s?(0,K.jsx)(`div`,{className:`pointer-events-none absolute inset-0 z-[1] flex justify-center bg-surface-panel/40 pt-[min(28vh,7.5rem)] backdrop-blur-[1px] motion-reduce:backdrop-blur-none dark:bg-surface-base/35`,"aria-busy":`true`,"aria-label":n.loading,children:(0,K.jsx)(U,{className:`size-8 shrink-0 animate-spin text-accent motion-reduce:animate-none`,strokeWidth:2,"aria-hidden":!0})}):null,o.items.length===0?(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-3 rounded-2xl border border-dashed border-edge py-12 text-center text-sm text-fg-muted`,children:[(0,K.jsx)(`p`,{className:`px-4`,children:x&&I?he(n.marketplaceEmptySearch,{query:I}):n.marketplaceEmpty}),x?(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:[F.map(e=>(0,K.jsx)(N,{type:`button`,variant:`secondary`,className:`h-8 px-3 text-xs`,onClick:()=>D(e.id),children:he(n.marketplaceEmptySearchTryProvider,{provider:e.displayName})},e.id)),(0,K.jsx)(N,{type:`button`,variant:`ghost`,className:`h-8 px-3 text-xs`,onClick:()=>C(``),children:n.marketplaceEmptySearchClear})]}):null]}):(0,K.jsx)(`div`,{className:c(`grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3`,s&&`pointer-events-none opacity-[0.52] motion-reduce:opacity-100`),children:o.items.map(e=>{let t=me(e,e.providerId??T),r=m(t);return(0,K.jsxs)(`article`,{className:c(`group flex h-full flex-col rounded-xl bg-surface-panel p-4 shadow-surface`,`transition-colors hover:bg-surface-hover`),children:[(0,K.jsx)(`button`,{type:`button`,className:c(`flex min-h-0 w-full flex-1 cursor-pointer flex-col rounded-lg text-left outline-none`,L.focusRingPanel),"aria-labelledby":`mp-skill-title-${e.id}`,onClick:()=>void h(t,e.name,e.providerId??void 0),children:(0,K.jsx)(`div`,{className:`flex items-start gap-3`,children:(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[(0,K.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,K.jsx)(`h3`,{id:`mp-skill-title-${e.id}`,className:`min-w-0 flex-1 truncate text-[15px] font-semibold leading-snug tracking-tight text-fg`,children:e.name}),r?(0,K.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 rounded-full border border-emerald-500/30 bg-emerald-500/10 px-2 py-0.5 text-[11px] font-medium text-emerald-700 dark:text-emerald-300`,children:[(0,K.jsx)(k,{className:`size-3`,"aria-hidden":!0}),n.marketplaceInstalled]}):null]}),(0,K.jsx)(`p`,{className:`line-clamp-2 text-sm leading-relaxed text-fg-muted`,title:e.description?e.description:void 0,children:e.description||`—`}),(0,K.jsxs)(`div`,{className:`mt-auto min-h-[2.625rem] space-y-1 text-[11px] leading-snug text-fg-muted`,children:[(0,K.jsxs)(`p`,{className:`line-clamp-1`,title:`${n.marketplaceAuthor}: ${e.author.username} · ${n.marketplaceDownloads}: ${e.downloads}${e.stars!=null&&e.stars>0?` · ★${e.stars}`:``}${r?` · ${n.marketplaceInstalled}`:``}`,children:[(0,K.jsx)(`span`,{className:`text-fg-subtle`,children:n.marketplaceAuthor}),` `,(0,K.jsx)(`span`,{className:`text-fg`,children:e.author.username}),(0,K.jsx)(`span`,{className:`text-fg-subtle`,children:` · `}),(0,K.jsxs)(`span`,{children:[n.marketplaceDownloads,`: `,e.downloads]}),e.stars!=null&&e.stars>0?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`text-fg-subtle`,children:` · `}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 text-fg-muted`,children:[(0,K.jsx)(E,{className:`size-3 shrink-0 text-amber-600 dark:text-amber-400`,strokeWidth:2,"aria-hidden":!0}),e.stars]})]}):null]}),e.latestVersion?(0,K.jsxs)(`p`,{className:`line-clamp-1 min-h-[1.125rem] font-mono text-[10px] text-fg-subtle`,title:`${n.marketplaceVersion}: ${e.latestVersion}`,children:[n.marketplaceVersion,`: `,e.latestVersion]}):null]})]})})}),(0,K.jsx)(`div`,{role:`group`,className:`mt-3 flex items-center justify-end gap-1 border-t border-edge-subtle pt-3`,children:r?(0,K.jsx)(N,{type:`button`,variant:`secondary`,className:`h-8 shrink-0 whitespace-nowrap px-2.5 text-xs font-medium`,disabled:s||b===t,onClick:()=>void y({name:t,source:`store`,providerOverride:e.providerId??null}),children:b===t?n.previewUseInChatBusy:n.previewUseInChat}):(0,K.jsx)(N,{type:`button`,variant:`primary`,className:`h-8 shrink-0 whitespace-nowrap px-2.5 text-xs font-medium`,disabled:s||v===t,onClick:()=>void _(t,{providerOverride:e.providerId??null}),children:v===t?n.uploading:n.marketplaceInstall})})]},e.id)})}),o.items.length>0?(0,K.jsxs)(`div`,{className:`mt-3 flex flex-col items-center justify-between gap-3 sm:flex-row`,children:[(0,K.jsx)(`p`,{className:`text-center text-xs text-fg-muted sm:text-left`,children:he(n.marketplacePageStatus,{page:o.meta.page,totalPages:o.meta.totalPages,total:o.meta.total})}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsxs)(N,{type:`button`,variant:`ghost`,className:`h-9 gap-1 px-2`,disabled:s||f<=1,"aria-label":n.marketplacePagePrev,onClick:()=>p(Ne),children:[(0,K.jsx)(j,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0}),(0,K.jsx)(`span`,{className:`sr-only sm:not-sr-only`,children:n.marketplacePagePrev})]}),(0,K.jsxs)(N,{type:`button`,variant:`ghost`,className:`h-9 gap-1 px-2`,disabled:s||f>=o.meta.totalPages,"aria-label":n.marketplacePageNext,onClick:()=>p(e=>Math.min(o.meta.totalPages,e+1)),children:[(0,K.jsx)(`span`,{className:`sr-only sm:not-sr-only`,children:n.marketplacePageNext}),(0,K.jsx)(g,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0})]})]})]}):null]}):null,t[0]=v,t[1]=m,t[2]=T,t[3]=u,t[4]=f,t[5]=r,t[6]=a,t[7]=i,t[8]=l,t[9]=s,t[10]=o,t[11]=_,t[12]=y,t[13]=h,t[14]=w,t[15]=x,t[16]=S,t[17]=D,t[18]=d,t[19]=p,t[20]=C,t[21]=O,t[22]=n.loading,t[23]=n.marketplaceAuthor,t[24]=n.marketplaceCategoriesAria,t[25]=n.marketplaceCategoryAll,t[26]=n.marketplaceDownloads,t[27]=n.marketplaceEmpty,t[28]=n.marketplaceEmptySearch,t[29]=n.marketplaceEmptySearchClear,t[30]=n.marketplaceEmptySearchTryProvider,t[31]=n.marketplaceInstall,t[32]=n.marketplaceInstalled,t[33]=n.marketplacePageNext,t[34]=n.marketplacePagePrev,t[35]=n.marketplacePageStatus,t[36]=n.marketplaceVersion,t[37]=n.previewUseInChat,t[38]=n.previewUseInChatBusy,t[39]=n.uploading,t[40]=b,t[41]=A,t[42]=M,t[43]=P}else A=t[41],M=t[42],P=t[43];let F;return t[62]!==A||t[63]!==M||t[64]!==P?(F=(0,K.jsxs)(K.Fragment,{children:[A,M,P]}),t[62]=A,t[63]=M,t[64]=P,t[65]=F):F=t[65],F}function Ne(e){return Math.max(1,e-1)}function Pe(e){return(0,K.jsx)(J,{},e)}function Fe(e){return(0,K.jsx)(`div`,{className:`h-8 w-[4.5rem] shrink-0 animate-pulse rounded-full bg-surface-hover motion-reduce:animate-none dark:bg-surface-active/50`},e)}function Ie(e){return{id:e.id,label:e.label,title:e.label}}function Le(e){let t=(0,ne.c)(118),{vm:n}=e,{sk:r,hasToken:i,error:a,actionFeedback:o,skillDiagnostics:s,mainTab:l,setMainTab:u,sourceFilter:d,setSourceFilter:f,builtinTabStats:p,userTabStats:m,catalogDisabledCount:h,catalogStatusFilter:g,setCatalogStatusFilter:_,marketSort:v,setMarketSort:y,marketBrowseProvider:b,setMarketBrowseProvider:x,registeredProviders:S,inSettingsShell:C,searchInputActive:w,resultTab:T,setResultTab:E,aggregatedTabCounts:O,aggregatedProviderStatus:k}=n;if(!i){let e;t[0]===n?e=t[1]:(e=(0,K.jsx)(Ue,{vm:n}),t[0]=n,t[1]=e);let i;t[2]===r.needToken?i=t[3]:(i=(0,K.jsx)(`div`,{className:`w-full px-3 py-16 text-center text-sm text-fg-muted sm:px-5 xl:px-6`,children:r.needToken}),t[2]=r.needToken,t[3]=i);let a;return t[4]!==e||t[5]!==i?(a=(0,K.jsxs)(K.Fragment,{children:[e,i]}),t[4]=e,t[5]=i,t[6]=a):a=t[6],a}let A=p.total+m.total,j=p.enabled+m.enabled,M=p.total+m.total-p.enabled-m.enabled,N;t[7]!==A||t[8]!==j||t[9]!==M||t[10]!==m.total?(N={total:A,ready:j,needsAttention:M,added:m.total},t[7]=A,t[8]=j,t[9]=M,t[10]=m.total,t[11]=N):N=t[11];let P=N,F;t[12]!==P.total||t[13]!==r.tabInstalled?(F={id:`installed`,label:r.tabInstalled,count:P.total},t[12]=P.total,t[13]=r.tabInstalled,t[14]=F):F=t[14];let I;t[15]===r.tabDiscover?I=t[16]:(I={id:`marketplace`,label:r.tabDiscover},t[15]=r.tabDiscover,t[16]=I);let L;t[17]!==F||t[18]!==I?(L=[F,I],t[17]=F,t[18]=I,t[19]=L):L=t[19];let R=L,z;t[20]===S?z=t[21]:(z=[`all`,...S.map(He)],t[20]=S,t[21]=z);let B=z,V;t[22]!==k||t[23]!==O||t[24]!==S||t[25]!==r.marketplaceLoadFailed||t[26]!==r.marketplaceResultsTabAll||t[27]!==B?(V=B.map(e=>{let t=e===`all`?r.marketplaceResultsTabAll:S.find(t=>t.id===e)?.displayName??e,n=O[e]??0,i=e===`all`?null:k[e];return{id:e,label:t,title:i===`error`?`${t} · ${r.marketplaceLoadFailed}`:void 0,suffix:i===`loading`?(0,K.jsx)(`span`,{className:`inline-block size-1.5 animate-pulse rounded-full bg-fg-muted/60 motion-reduce:animate-none`,"aria-hidden":!0}):i===`error`?(0,K.jsx)(`span`,{className:`inline-block size-1.5 rounded-full bg-red-500`,"aria-hidden":!0}):(0,K.jsx)(`span`,{className:`tabular-nums opacity-70`,children:n})}}),t[22]=k,t[23]=O,t[24]=S,t[25]=r.marketplaceLoadFailed,t[26]=r.marketplaceResultsTabAll,t[27]=B,t[28]=V):V=t[28];let H=V,ee;t[29]===n?ee=t[30]:(ee=(0,K.jsx)(Ue,{vm:n}),t[29]=n,t[30]=ee);let U;t[31]!==o||t[32]!==a?(U=o?(0,K.jsx)(`div`,{role:`status`,"aria-live":`polite`,className:c(`rounded-xl border px-3 py-2 text-sm`,o.kind===`success`?`border-emerald-200 bg-emerald-50 text-emerald-800 dark:border-emerald-900/40 dark:bg-emerald-950/40 dark:text-emerald-200`:`border-red-200 bg-red-50 text-red-800 dark:border-red-900/50 dark:bg-red-950/40 dark:text-red-200`),children:o.message}):a?(0,K.jsx)(`div`,{className:`rounded-xl border border-edge bg-red-50 px-3 py-2 text-sm text-red-700 dark:border-edge dark:bg-red-950/40 dark:text-red-300`,role:`alert`,children:a}):null,t[31]=o,t[32]=a,t[33]=U):U=t[33];let te;t[34]!==r.diagnosticsHint||t[35]!==r.diagnosticsTitle||t[36]!==s?(te=s.length>0?(0,K.jsxs)(`div`,{className:`rounded-xl border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-200`,role:`status`,children:[(0,K.jsx)(`div`,{className:`font-medium`,children:he(r.diagnosticsTitle,{count:s.length})}),(0,K.jsx)(`p`,{className:`mt-1 text-xs opacity-80`,children:r.diagnosticsHint}),(0,K.jsx)(`ul`,{className:`mt-1 space-y-1`,children:s.slice(0,3).map(Ve)})]}):null,t[34]=r.diagnosticsHint,t[35]=r.diagnosticsTitle,t[36]=s,t[37]=te):te=t[37];let G;t[38]!==C||t[39]!==n.loading||t[40]!==n.mainTab||t[41]!==n.onReloadClick||t[42]!==n.searchQuery||t[43]!==n.setInstallOpen||t[44]!==n.setPendingFile||t[45]!==n.setSearchQuery||t[46]!==n.sk?(G=C?(0,K.jsx)(`div`,{className:`flex flex-col gap-3 border-b border-edge-subtle pb-4 dark:border-edge-subtle sm:flex-row sm:flex-wrap sm:items-center sm:justify-end`,children:(0,K.jsx)(re,{loading:n.loading,onReloadClick:n.onReloadClick,searchQuery:n.searchQuery,setSearchQuery:n.setSearchQuery,mainTab:n.mainTab,sk:n.sk,setPendingFile:n.setPendingFile,setInstallOpen:n.setInstallOpen})}):null,t[38]=C,t[39]=n.loading,t[40]=n.mainTab,t[41]=n.onReloadClick,t[42]=n.searchQuery,t[43]=n.setInstallOpen,t[44]=n.setPendingFile,t[45]=n.setSearchQuery,t[46]=n.sk,t[47]=G):G=t[47];let q;t[48]!==l||t[49]!==R||t[50]!==u||t[51]!==r.skillsNavAria?(q=(0,K.jsx)(`div`,{className:`border-b border-edge-subtle pb-3 dark:border-edge-subtle`,children:(0,K.jsx)(W,{items:R,activeTab:l,onChange:u,ariaLabel:r.skillsNavAria,tabIdPrefix:`skills-tab`,panelIdPrefix:`skills-panel`,className:`flex-wrap`})}),t[48]=l,t[49]=R,t[50]=u,t[51]=r.skillsNavAria,t[52]=q):q=t[52];let J;t[53]!==h||t[54]!==g||t[55]!==P.added||t[56]!==P.needsAttention||t[57]!==P.ready||t[58]!==l||t[59]!==b||t[60]!==v||t[61]!==S||t[62]!==T||t[63]!==H||t[64]!==w||t[65]!==_||t[66]!==x||t[67]!==y||t[68]!==E||t[69]!==f||t[70]!==r.discoverHeading||t[71]!==r.discoverHint||t[72]!==r.filterAll||t[73]!==r.filterDisabledOnly||t[74]!==r.filterEnabled||t[75]!==r.filterExtra||t[76]!==r.filterGlobal||t[77]!==r.filterInstalled||t[78]!==r.filterWorkspace||t[79]!==r.installedHeading||t[80]!==r.installedHint||t[81]!==r.marketplaceBrowseSwitchAria||t[82]!==r.marketplaceResultsTabsAria||t[83]!==r.marketplaceSortDownloads||t[84]!==r.marketplaceSortLabel||t[85]!==r.marketplaceSortNewest||t[86]!==r.sourceFilterAria||t[87]!==r.statusFilterAria||t[88]!==r.summaryAdded||t[89]!==r.summaryNeedsAttention||t[90]!==r.summaryReady||t[91]!==r.tabBuiltin||t[92]!==d?(J=l===`installed`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between`,children:[(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`h2`,{className:`text-balance text-sm font-semibold text-fg`,children:r.installedHeading}),(0,K.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm text-fg-muted`,children:r.installedHint})]}),(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-wrap gap-2 sm:justify-end`,children:[(0,K.jsx)(D,{value:d,placeholder:r.filterAll,ariaLabel:r.sourceFilterAria,options:[{value:`all`,label:r.filterAll},{value:`builtin`,label:r.tabBuiltin},{value:`installed`,label:r.filterInstalled},{value:`workspace`,label:r.filterWorkspace},{value:`global`,label:r.filterGlobal},{value:`extra`,label:r.filterExtra}],allowEmpty:!1,triggerClassName:`h-9 w-auto min-w-[9rem] bg-surface-panel text-xs shadow-surface`,align:`end`,onChange:e=>f(e)}),(0,K.jsx)(D,{value:g,placeholder:r.filterAll,ariaLabel:r.statusFilterAria,options:[{value:`all`,label:r.filterAll},{value:`enabled`,label:r.filterEnabled},{value:`disabled`,label:he(r.filterDisabledOnly,{count:h})}],allowEmpty:!1,triggerClassName:`h-9 w-auto min-w-[9rem] bg-surface-panel text-xs shadow-surface`,align:`end`,onChange:e=>_(e)})]})]}),(0,K.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-3`,"aria-label":r.installedHeading,children:[(0,K.jsxs)(`button`,{type:`button`,className:c(`rounded-xl border border-edge-subtle bg-surface-base p-3 text-left transition-colors hover:bg-surface-hover`,g===`enabled`&&`border-emerald-500/40 bg-emerald-500/5`),"aria-pressed":g===`enabled`,onClick:()=>_(Be),children:[(0,K.jsx)(`div`,{className:`text-xl font-semibold tabular-nums text-success`,children:P.ready}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-fg-muted`,children:r.summaryReady})]}),(0,K.jsxs)(`button`,{type:`button`,className:c(`rounded-xl border border-edge-subtle bg-surface-base p-3 text-left transition-colors hover:bg-surface-hover`,g===`disabled`&&`border-amber-500/50 bg-amber-500/5`),"aria-pressed":g===`disabled`,onClick:()=>_($),children:[(0,K.jsx)(`div`,{className:c(`text-xl font-semibold tabular-nums`,P.needsAttention>0?`text-warning`:`text-fg`),children:P.needsAttention}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-fg-muted`,children:r.summaryNeedsAttention})]}),(0,K.jsxs)(`button`,{type:`button`,className:c(`rounded-xl border border-edge-subtle bg-surface-base p-3 text-left transition-colors hover:bg-surface-hover`,d===`installed`&&`border-accent/40 bg-accent/5`),"aria-pressed":d===`installed`,onClick:()=>f(ze),children:[(0,K.jsx)(`div`,{className:`text-xl font-semibold tabular-nums text-fg`,children:P.added}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-fg-muted`,children:r.summaryAdded})]})]})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between`,children:[(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`h2`,{className:`text-balance text-sm font-semibold text-fg`,children:r.discoverHeading}),(0,K.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm text-fg-muted`,children:r.discoverHint})]}),(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-wrap gap-2 sm:justify-end`,children:[w?null:(0,K.jsx)(D,{value:b??``,placeholder:r.marketplaceBrowseSwitchAria,ariaLabel:r.marketplaceBrowseSwitchAria,options:S.map(Re),allowEmpty:!1,triggerClassName:`h-9 w-auto min-w-[9rem] bg-surface-panel text-xs shadow-surface`,align:`end`,onChange:x}),(0,K.jsx)(D,{value:v,placeholder:r.marketplaceSortLabel,ariaLabel:r.marketplaceSortLabel,options:[{value:`downloads`,label:r.marketplaceSortDownloads},{value:`newest`,label:r.marketplaceSortNewest}],allowEmpty:!1,triggerClassName:`h-9 w-auto min-w-[9rem] bg-surface-panel text-xs shadow-surface`,align:`end`,onChange:e=>y(e)})]})]}),w?(0,K.jsx)(W,{items:H,activeTab:T,onChange:E,ariaLabel:r.marketplaceResultsTabsAria,tabIdPrefix:`skills-marketplace-results-tab`,panelIdPrefix:`skills-marketplace-results-panel`,className:`min-h-9 gap-1 overflow-x-auto rounded-lg border border-edge bg-surface-panel p-0.5 shadow-surface`,buttonClassName:`rounded-md px-2.5 py-1.5 text-xs`,selectedClassName:`bg-fg text-surface-panel dark:bg-fg dark:text-surface-base`,unselectedClassName:`text-fg-muted hover:text-fg`}):null]}),t[53]=h,t[54]=g,t[55]=P.added,t[56]=P.needsAttention,t[57]=P.ready,t[58]=l,t[59]=b,t[60]=v,t[61]=S,t[62]=T,t[63]=H,t[64]=w,t[65]=_,t[66]=x,t[67]=y,t[68]=E,t[69]=f,t[70]=r.discoverHeading,t[71]=r.discoverHint,t[72]=r.filterAll,t[73]=r.filterDisabledOnly,t[74]=r.filterEnabled,t[75]=r.filterExtra,t[76]=r.filterGlobal,t[77]=r.filterInstalled,t[78]=r.filterWorkspace,t[79]=r.installedHeading,t[80]=r.installedHint,t[81]=r.marketplaceBrowseSwitchAria,t[82]=r.marketplaceResultsTabsAria,t[83]=r.marketplaceSortDownloads,t[84]=r.marketplaceSortLabel,t[85]=r.marketplaceSortNewest,t[86]=r.sourceFilterAria,t[87]=r.statusFilterAria,t[88]=r.summaryAdded,t[89]=r.summaryNeedsAttention,t[90]=r.summaryReady,t[91]=r.tabBuiltin,t[92]=d,t[93]=J):J=t[93];let Y;t[94]!==l||t[95]!==n?(Y=l===`marketplace`?(0,K.jsx)(Me,{...n}):(0,K.jsx)(ce,{...n}),t[94]=l,t[95]=n,t[96]=Y):Y=t[96];let X;t[97]!==q||t[98]!==J||t[99]!==Y?(X=(0,K.jsxs)(`section`,{className:`flex flex-col gap-5`,children:[q,J,Y]}),t[97]=q,t[98]=J,t[99]=Y,t[100]=X):X=t[100];let Z;t[101]!==U||t[102]!==te||t[103]!==G||t[104]!==X?(Z=(0,K.jsxs)(`div`,{className:`flex w-full flex-col gap-6 px-3 py-6 sm:px-5 xl:px-6`,children:[U,te,G,X]}),t[101]=U,t[102]=te,t[103]=G,t[104]=X,t[105]=Z):Z=t[105];let ie,ae,oe;t[106]===n?(ie=t[107],ae=t[108],oe=t[109]):(ie=(0,K.jsx)(ke,{...n}),ae=(0,K.jsx)(je,{...n}),oe=(0,K.jsx)(ve,{...n}),t[106]=n,t[107]=ie,t[108]=ae,t[109]=oe);let se;t[110]!==Z||t[111]!==ie||t[112]!==ae||t[113]!==oe?(se=(0,K.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col bg-surface-panel`,children:[Z,ie,ae,oe]}),t[110]=Z,t[111]=ie,t[112]=ae,t[113]=oe,t[114]=se):se=t[114];let le;return t[115]!==ee||t[116]!==se?(le=(0,K.jsxs)(K.Fragment,{children:[ee,se]}),t[115]=ee,t[116]=se,t[117]=le):le=t[117],le}function Re(e){return{value:e.id,label:e.displayName}}function ze(e){return e===`installed`?`all`:`installed`}function $(e){return e===`disabled`?`all`:`disabled`}function Be(e){return e===`enabled`?`all`:`enabled`}function Ve(e,t){return(0,K.jsxs)(`li`,{className:`truncate`,children:[e.type,`: `,e.message]},`${e.path??e.skillName??`diagnostic`}-${t}`)}function He(e){return e.id}function Ue(e){let t=(0,ne.c)(17),{vm:n}=e,{sk:r,hasToken:i,loading:a,onReloadClick:o,searchQuery:s,setSearchQuery:c,mainTab:l,setPendingFile:u,setInstallOpen:d,inSettingsShell:f}=n,p=x(Ge),m=x(We),h;t[0]!==a||t[1]!==l||t[2]!==o||t[3]!==s||t[4]!==d||t[5]!==u||t[6]!==c||t[7]!==r?(h=(0,K.jsx)(re,{loading:a,onReloadClick:o,searchQuery:s,setSearchQuery:c,mainTab:l,sk:r,setPendingFile:u,setInstallOpen:d}),t[0]=a,t[1]=l,t[2]=o,t[3]=s,t[4]=d,t[5]=u,t[6]=c,t[7]=r,t[8]=h):h=t[8];let g=h,_,v;return t[9]!==m||t[10]!==i||t[11]!==f||t[12]!==p||t[13]!==r.title||t[14]!==g?(_=()=>!i||f?(m(),()=>m()):(p({startExtra:null,main:(0,K.jsx)(`div`,{className:`min-w-0`,children:(0,K.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:r.title})}),end:g}),()=>m()),v=[m,i,f,p,g,r.title],t[9]=m,t[10]=i,t[11]=f,t[12]=p,t[13]=r.title,t[14]=g,t[15]=_,t[16]=v):(_=t[15],v=t[16]),(0,G.useLayoutEffect)(_,v),null}function We(e){return e.clearPageHeader}function Ge(e){return e.setPageHeader}async function Ke(e,t){let n=new FormData;n.append(`file`,e),t.skillId&&n.append(`skillId`,t.skillId),t.overwrite&&n.append(`overwrite`,`true`),n.append(`target`,t.target??`workspace`);let r=p.getState().token,i=new Headers;r&&i.set(`Authorization`,`Bearer ${r}`);let a=await fetch(d(`/api/skills/upload`),{method:`POST`,headers:i,body:n});a.status===401&&p.getState().onUnauthorized();let o=await a.json().catch(()=>({}));if(!a.ok)throw Error(o.error||`HTTP ${a.status}`);if(!o.payload?.skillId)throw Error(`Invalid response`);return o.payload}async function qe(e,t){let n=t?`?target=${encodeURIComponent(t)}`:``,r=await m(d(`/api/skills/${encodeURIComponent(e)}${n}`),{method:`DELETE`});if(!r.ok)throw Error(await H(r))}async function Je(e,t){let n=await m(d(`/api/skills/enabled`),{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({skillName:e,enabled:t})});if(!n.ok)throw Error(await H(n))}function Ye(e,t){t?.trim()&&e.set(`provider`,t.trim())}async function Xe(e){let t=new URLSearchParams;Ye(t,e?.provider);let n=t.toString(),r=await m(d(`/api/skills/marketplace/categories${n?`?${n}`:``}`),{cache:`no-store`});if(!r.ok)throw Error(await H(r));let i=await r.json();if(!i.payload||!Array.isArray(i.payload.items))throw Error(`Invalid response`);return{items:i.payload.items}}async function Ze(e){let t=new URLSearchParams;e.q?.trim()&&t.set(`q`,e.q.trim()),e.page!=null&&t.set(`page`,String(e.page)),e.pageSize!=null&&t.set(`pageSize`,String(e.pageSize)),e.sort&&t.set(`sort`,e.sort),e.category?.trim()&&t.set(`category`,e.category.trim()),Ye(t,e.provider);let n=t.toString(),r=await m(d(`/api/skills/marketplace${n?`?${n}`:``}`),{cache:`no-store`,signal:e.signal});if(!r.ok)throw Error(await H(r));let i=await r.json();if(!i.payload?.items||!i.payload.meta)throw Error(`Invalid response`);return i.payload}async function Qe(e,t){let n=encodeURIComponent(e),r=new URLSearchParams;Ye(r,t?.provider);let i=r.toString(),a=await m(d(`/api/skills/marketplace/packages/${n}${i?`?${i}`:``}`),{cache:`no-store`});if(!a.ok)throw Error(await H(a));let o=(await a.json()).payload;if(!o?.name||!o.skillDocPreview||typeof o.skillDocPreview.name!=`string`||typeof o.skillDocPreview.description!=`string`||typeof o.skillDocPreview.bodyMarkdown!=`string`||typeof o.skillDocPreview.disableModelInvocation!=`boolean`||!o.skillDocPreview.metadata||typeof o.skillDocPreview.metadata!=`object`||typeof o.skillDocPreview.metadata.name!=`string`||typeof o.skillDocPreview.metadata.description!=`string`)throw Error(`Invalid response`);return o}async function $e(e){let t=await m(d(`/api/skills/marketplace/install`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({target:`workspace`,...e})});if(!t.ok)throw Error(await H(t));let n=await t.json();if(!n.payload?.skillId)throw Error(n.error||`Invalid response`);return n.payload}async function et(e){let t=await m(d(`/api/skills/${encodeURIComponent(e)}/content`),{cache:`no-store`});if(!t.ok)throw Error(await H(t));let n=(await t.json()).payload;if(!n||typeof n.name!=`string`||typeof n.description!=`string`||typeof n.bodyMarkdown!=`string`||typeof n.disableModelInvocation!=`boolean`||!n.metadata||typeof n.metadata!=`object`||typeof n.metadata.name!=`string`||typeof n.metadata.description!=`string`)throw Error(`Invalid response`);return n}async function tt(){let e=await m(d(`/api/skills/marketplace/provider`),{cache:`no-store`});if(!e.ok)throw Error(await H(e));let t=await e.json();if(!t.payload?.provider)throw Error(`Invalid response`);return t.payload}async function nt(){let e=await m(d(`/api/skills/marketplace/providers`),{cache:`no-store`});if(!e.ok)throw Error(await H(e));let t=await e.json();if(!t.payload?.providers)throw Error(`Invalid response`);return t.payload}async function rt(t){let n=t.name.toLowerCase();if(n.endsWith(`.zip`))return t;if(n.endsWith(`skill.md`)){let n=(await i(async()=>{let{default:t}=await import(`./jszip.min-DT31yWkU.js`).then(t=>e(t.default,1));return{default:t}},__vite__mapDeps([0,1]))).default,r=new n;r.file(`SKILL.md`,await t.arrayBuffer());let a=await r.generateAsync({type:`blob`,compression:`DEFLATE`}),o=t.name.replace(/\.md$/i,``).replace(/\s+/g,`-`)||`skill`;return new File([a],`${o}.zip`,{type:`application/zip`})}throw Error(`invalid`)}function it(){let e=u(f(e=>e.language)).skills,t=!!p(e=>e.token),n=s(),[r,i]=o(),c=r.get(`mprov`)?.trim()||null,[l,d]=(0,G.useState)(!1),[m,g]=(0,G.useState)(null),[_,v]=(0,G.useState)(!1),y=r.get(`q`)??``,b=r.get(`tab`),x=r.get(`source`),S=r.get(`status`),C=X.has(b)?b:`installed`,T=b===`builtin`?`builtin`:b===`user`?`installed`:null,E=Z.has(x)?x:T??`all`,D=ie.has(S)?S:`all`,[O,k]=(0,G.useState)(y),[j]=z(O,250),M=j.trim(),N=O.trim().length>0,P=M.length>0,[F,I]=(0,G.useState)(null),[L,R]=(0,G.useState)(C),[B,V]=(0,G.useState)(E),[H,ee]=(0,G.useState)(``),[U,W]=(0,G.useState)(D),[ne,K]=(0,G.useState)(!1),[re,q]=(0,G.useState)(null),[J,Y]=(0,G.useState)(!1),[oe,ce]=(0,G.useState)(!1),[le,ue]=(0,G.useState)(null),[de,fe]=(0,G.useState)(null),[Q,me]=(0,G.useState)({}),[he,ge]=(0,G.useState)(!1),[ve,ye]=(0,G.useState)(`catalog`),[be,xe]=(0,G.useState)(``),[Se,Ce]=(0,G.useState)(null),[we,Te]=(0,G.useState)(null),[Ee,De]=(0,G.useState)(!1),[Oe,ke]=(0,G.useState)(null),[Ae,je]=(0,G.useState)(`downloads`),[Me,Ne]=(0,G.useState)(1),[Pe,Fe]=(0,G.useState)(null),[Ie,Le]=(0,G.useState)(null),[Re,ze]=(0,G.useState)(``),[$,Be]=(0,G.useState)(()=>c),[Ve,He]=(0,G.useState)(0),[Ue,We]=(0,G.useState)(0),[Ge,Ye]=(0,G.useState)([]),it=(0,G.useRef)(null),at=(0,G.useRef)(c),ot=(0,G.useRef)(null),st=(0,G.useRef)(``),ct=(0,G.useRef)(null),lt=(0,G.useRef)(!1),[ut,dt]=(0,G.useState)({query:``,byProvider:{}}),[ft,pt]=(0,G.useState)(`all`),mt=(0,G.useRef)(0),ht=(0,G.useRef)(M);ht.current!==M&&(ht.current=M,pt(e=>e===`all`?e:`all`));let gt=w(()=>A().then(e=>(Ye(e.diagnostics??[]),e.catalog.map(_e))),[t,Ue],{enabled:t,initial:[],errorData:[]}),{data:_t,loading:vt,setData:yt}=gt,bt=w(async()=>{try{let{providers:e,current:t}=await nt();return{providers:e.map(e=>({id:e.id,displayName:e.displayName})),current:t}}catch{try{return{providers:[],current:(await tt()).provider}}catch{return{providers:[],current:`store`}}}},[t,Ve],{enabled:t,initial:{providers:[],current:null}}),xt=l||vt,St=bt.data.providers;(0,G.useEffect)(()=>{let e=e=>{if(h(e.detail)===`skills`){if(lt.current){lt.current=!1;return}We(e=>e+1)}else He(e=>e+1)};return window.addEventListener(`config-reload`,e),()=>window.removeEventListener(`config-reload`,e)},[]);let Ct=r.toString(),wt=(0,G.useRef)(Ct);if(wt.current!==Ct){wt.current=Ct;let e=r.get(`q`)??``,t=r.get(`tab`),n=r.get(`source`),i=r.get(`status`),a=X.has(t)?t:`installed`,o=t===`builtin`?`builtin`:t===`user`?`installed`:null,s=Z.has(n)?n:o??`all`,c=ie.has(i)?i:`all`;k(t=>t===e?t:e),R(e=>e===a?e:a),V(e=>e===s?e:s),W(e=>e===c?e:c);let l=r.get(`mcat`)??``;ze(a===`marketplace`?e=>e===l?e:l:``)}let Tt=(0,G.useRef)(t);!t&&Tt.current&&(Be(null),it.current=null),Tt.current=t,t&&c&&at.current!==c&&(at.current=c,Be(c)),t&&c==null&&bt.data.current&&bt.data.current!==ot.current&&(ot.current=bt.data.current,Be(e=>e??bt.data.current));let Et=`${M}|${Ae}|${L}|${Re}|${$??``}|${ft}`;st.current!==Et&&(st.current=Et,Ne(1)),L===`marketplace`&&$&&ct.current!=null&&ct.current!==$&&ze(``),ct.current=$;let Dt=w(()=>Ze({page:Me,pageSize:20,sort:Ae,category:Re.trim()||void 0,provider:$}),[t,L,Re,Me,Ae,P,$],{enabled:t&&L===`marketplace`&&!!$&&!P,initial:null,errorData:null});(0,G.useEffect)(()=>{if(!t||!P||L!==`marketplace`||St.length===0)return;let n=++mt.current,r={};for(let e of St)r[e.id]={status:`loading`,rows:[]};dt({query:M,byProvider:r});let i=[],a=[];for(let t of St){let r=new AbortController;i.push(r);let o=window.setTimeout(()=>{r.abort(new DOMException(`Adapter timed out`,`TimeoutError`))},8e3);a.push(o),Ze({provider:t.id,q:M,page:1,pageSize:40,sort:Ae,signal:r.signal}).then(e=>{if(window.clearTimeout(o),n!==mt.current)return;let r=e.items.map(e=>({...e,providerId:t.id}));dt(e=>({...e,byProvider:{...e.byProvider,[t.id]:{status:`ok`,rows:r}}}))}).catch(r=>{if(window.clearTimeout(o),n!==mt.current)return;let i=r instanceof DOMException&&(r.name===`TimeoutError`||r.name===`AbortError`)?e.marketplaceLoadFailed:r instanceof Error?r.message:e.marketplaceLoadFailed;dt(e=>({...e,byProvider:{...e.byProvider,[t.id]:{status:`error`,rows:[],error:i}}}))})}return()=>{for(let e of a)window.clearTimeout(e);for(let e of i)e.abort()}},[t,L,P,M,St,Ae,e.marketplaceLoadFailed]);let Ot=w(()=>Xe({provider:$}).then(e=>e.items),[t,L,$],{enabled:t&&L===`marketplace`&&!!$,initial:[],errorData:[]}),kt=(0,G.useMemo)(()=>{if(!P||ut.query!==M)return[];let e=St.map(e=>({id:e.id,rows:[...ut.byProvider[e.id]?.rows??[]]})),t=[];for(;e.some(e=>e.rows.length>0);)for(let n of e)n.rows.length>0&&t.push(n.rows.shift());let n=new Map;for(let e of t){let t=[(e.id??``).toLowerCase().trim(),(e.name??``).toLowerCase().trim(),(e.author?.username??``).toLowerCase().trim()].join(`|`),r=n.get(t);if(!r){n.set(t,{...e,additionalSources:[]});continue}if(e.providerId&&e.providerId!==r.providerId){let t=r.additionalSources??[];t.some(t=>t.providerId===e.providerId)||(t.push({providerId:e.providerId,sourceLabel:e.sourceLabel}),r.additionalSources=t)}}return Array.from(n.values())},[P,M,ut,St]),At=(0,G.useMemo)(()=>{if(!P)return{};let e={all:kt.length};for(let t of St)e[t.id]=kt.filter(e=>e.providerId===t.id||(e.additionalSources??[]).some(e=>e.providerId===t.id)).length;return e},[P,kt,St]),jt=(0,G.useMemo)(()=>P?ft===`all`?kt:kt.filter(e=>e.providerId===ft||(e.additionalSources??[]).some(e=>e.providerId===ft)):[],[P,kt,ft]),Mt=(0,G.useMemo)(()=>{if(!P)return{};let e={};for(let t of St)e[t.id]=ut.byProvider[t.id]?.status??`loading`;return e},[P,ut,St]),Nt=(0,G.useMemo)(()=>Object.values(Mt).some(e=>e===`loading`),[Mt]),Pt=(0,G.useMemo)(()=>{if(!P)return!1;let e=Object.values(Mt);return e.length>0&&e.every(e=>e===`error`)},[P,Mt]),Ft=(0,G.useMemo)(()=>{if(!P||kt.length===0&&Nt)return null;let e=jt.length,t=(Me-1)*20;return{items:jt.slice(t,t+20),meta:{page:Me,pageSize:20,total:e,totalPages:Math.max(1,Math.ceil(e/20))},provider:ft}},[P,kt,Nt,jt,Me,ft]),It=L===`marketplace`?N?P?Ft:null:Dt.data:null,Lt=L===`marketplace`?N?P?Nt:!0:Dt.loading:!1,Rt=P?Pt?e.marketplaceLoadFailed:null:Dt.error instanceof Error?Dt.error.message:Dt.error?e.marketplaceLoadFailed:null,zt=L===`marketplace`?Ot.data:[],Bt=L===`marketplace`?Ot.loading:!1,Vt=Ot.error instanceof Error?Ot.error.message:Ot.error?e.marketplaceCategoriesFailed:null;Re.trim()&&zt.length>0&&!zt.some(e=>e.id===Re)&&ze(``);let Ht=(0,G.useCallback)(async t=>{let n=t?.silent===!0;n||d(!0),g(null);try{let e=await A();return Ye(e.diagnostics??[]),yt(e.catalog.map(_e)),{ok:!0}}catch(t){let n=t instanceof Error?t.message:e.loadFailed;return g(n),{ok:!1,message:n}}finally{n||d(!1)}},[yt,e.loadFailed]),Ut=!l&&gt.error?gt.error instanceof Error?gt.error.message:e.loadFailed:null,Wt=m??Ut;(0,G.useEffect)(()=>{i(e=>{let t=new URLSearchParams(e);return M?t.set(`q`,M):t.delete(`q`),L===`marketplace`?t.set(`tab`,L):t.delete(`tab`),B===`all`?t.delete(`source`):t.set(`source`,B),L===`installed`&&U!==`all`?t.set(`status`,U):t.delete(`status`),L===`marketplace`&&Re.trim()?t.set(`mcat`,Re.trim()):t.delete(`mcat`),L===`marketplace`&&$?t.set(ae,$):t.delete(ae),t.toString()===e.toString()?e:t},{replace:!0})},[L,Re,$,M,U,i,B]);let Gt=(0,G.useCallback)((e,t,n=5e3)=>{I({kind:e,message:t}),window.setTimeout(()=>I(null),n)},[]),Kt=(0,G.useCallback)(t=>{let n=t.availability;if(!n)return e.installSuccess;let r=n.skillName||n.skillId;if(!n.loaded)return`Skill "${r}" installed, but it was not loaded. Check skill diagnostics.`;if(n.diagnostics.length>0)return`Skill "${r}" installed with ${n.diagnostics.length} diagnostic(s).`;if(n.enabled===!1)return`Skill "${r}" installed but disabled. Enable it before use.`;if(n.availableForDefaultAgent===!1){let e=n.unavailableReason||`unavailable`;return`Skill "${r}" installed but unavailable for agent "${n.defaultAgentId}" (${e}).`}return`Skill "${r}" installed and ready.`},[e.installSuccess]),qt=(0,G.useCallback)(async t=>{ye(`catalog`),ge(!0),xe(t.name),Ce(null),Te(null),ke(null),De(!0);try{let e=await et(t.name);Ce(e),xe(e.name)}catch(t){Ce(null),ke(t instanceof Error?t.message:e.detailLoadFailed)}finally{De(!1)}},[e.detailLoadFailed]),Jt=(0,G.useCallback)(async t=>{let n=t.trim();if(n){ye(`catalog`),ge(!0),xe(n),Ce(null),Te(null),ke(null),De(!0);try{let e=await et(n);Ce(e),xe(e.name)}catch(t){Ce(null),ke(t instanceof Error?t.message:e.detailLoadFailed)}finally{De(!1)}}},[e.detailLoadFailed]),Yt=(0,G.useCallback)(async(t,n,r)=>{let i=r?.trim()||$;if(i){it.current=i,ye(`store`),ge(!0),xe(n?.trim()||t),Ce(null),Te(null),ke(null),De(!0);try{let e=await Qe(t,{provider:i});xe(e.name),Te(e.skillDocPreview)}catch(t){Te(null),ke(t instanceof Error?t.message:e.detailLoadFailed)}finally{De(!1)}}},[$,e.detailLoadFailed]),Xt=(0,G.useCallback)(async(t,n)=>{fe(t),me(e=>({...e,[t]:n})),I(null);try{return await Je(t,n),await Ht({silent:!0}),!0}catch(n){return me(e=>{let{[t]:n,...r}=e;return r}),Gt(`error`,n instanceof Error?n.message:e.skillToggleFailed),!1}finally{fe(null),me(e=>{let{[t]:n,...r}=e;return r})}},[Ht,Gt,e.skillToggleFailed]),Zt=(0,G.useCallback)(async()=>{I(null),d(!0),g(null);try{await te()}catch(t){g(t instanceof Error?t.message:e.reloadFailed),d(!1);return}await Ht()},[Ht,e.reloadFailed]),Qt=(0,G.useMemo)(()=>{let e=O.trim().toLowerCase();return e?_t.filter(t=>[t.name,t.description,t.directoryId,t.path,t.source,t.hub?.source,t.hub?.ref].filter(Boolean).join(` `).toLowerCase().includes(e)):_t},[_t,O]),$t=(0,G.useMemo)(()=>{let e=_t.filter(e=>e.source===`builtin`);return{total:e.length,enabled:e.filter(e=>Q[e.name]??e.enabled).length}},[_t,Q]),en=(0,G.useMemo)(()=>{let e=_t.filter(e=>e.source!==`builtin`);return{total:e.length,enabled:e.filter(e=>Q[e.name]??e.enabled).length}},[_t,Q]),tn=(0,G.useMemo)(()=>be?_t.find(e=>e.name===be):void 0,[_t,be]),nn=tn==null?!0:Q[be]??tn.enabled,rn=tn?.directoryId??null,an=tn?.managed??!1,on=(0,G.useMemo)(()=>ve!==`store`||!be?null:pe(it.current??$,be),[ve,be,$]),sn=(0,G.useMemo)(()=>{let e=Qt;return L===`installed`&&B!==`all`&&(e=B===`installed`?e.filter(e=>e.source!==`builtin`):e.filter(e=>e.source===B)),e},[Qt,L,B]),cn=(0,G.useMemo)(()=>{let e=new Set,t=[];for(let n of sn){let r=n.category;!r||e.has(r)||(e.add(r),t.push(r))}return t.sort((e,t)=>{let n=se.indexOf(e),r=se.indexOf(t);return n>=0&&r>=0?n-r:n>=0?-1:r>=0?1:e.localeCompare(t)})},[sn]),ln=(0,G.useCallback)(t=>e.categoryLabel?.[t]||t,[e.categoryLabel]),un=(0,G.useMemo)(()=>H?sn.filter(e=>e.category===H):sn,[sn,H]);(0,G.useEffect)(()=>{ee(``)},[B]);let dn=(0,G.useCallback)(e=>Q[e.name]??e.enabled,[Q]),fn=(0,G.useMemo)(()=>un.filter(e=>!dn(e)).length,[un,dn]),pn=(0,G.useMemo)(()=>{let e=un;return U===`disabled`&&(e=e.filter(e=>!dn(e))),U===`enabled`&&(e=e.filter(e=>dn(e))),[...e].toSorted((e,t)=>{let n=dn(e);return n===dn(t)?e.name.localeCompare(t.name,void 0,{sensitivity:`base`}):n?-1:1})},[un,U,dn]),mn=async t=>{I(null),v(!0),g(null);try{let n;try{n=await rt(t)}catch{g(e.invalidFile),Gt(`error`,e.invalidFile);return}let r=await Ke(n,{overwrite:!0});lt.current=!0,await Ht(),Gt(`success`,Kt(r)),K(!1),q(null),R(`installed`),V(`installed`),await Jt(r.availability?.skillName||r.skillId)}catch(t){g(t instanceof Error?t.message:e.uploadFailed),Gt(`error`,t instanceof Error?t.message:e.uploadFailed)}finally{v(!1)}},hn=()=>{re&&mn(re)},gn=e=>{let t=e.target.files?.[0];e.target.value=``,t&&q(t)},_n=e=>{e.preventDefault(),e.stopPropagation(),e.dataTransfer.types.includes(`Files`)&&(Y(!0),e.dataTransfer.dropEffect=`copy`)},vn=e=>{let t=e.currentTarget,n=e.relatedTarget;n&&t.contains(n)||Y(!1)},yn=e=>{e.preventDefault(),e.stopPropagation(),Y(!1);let t=e.dataTransfer?.files?.[0];t&&q(t)},bn=t=>{switch(t){case`builtin`:return e.source.builtin;case`workspace`:return e.source.workspace;case`global`:return e.source.global;case`extra`:return e.source.extra;default:return t}},xn=async()=>{let t=le,n=he&&ve===`catalog`&&rn===t;if(ce(!1),ue(null),t){I(null);try{await qe(t),lt.current=!0,await Ht(),n&&(ge(!1),ye(`catalog`),xe(``),Ce(null),Te(null),ke(null))}catch(t){g(t instanceof Error?t.message:e.deleteFailed)}}},Sn=(0,G.useCallback)(e=>_t.some(t=>t.name===e),[_t]),Cn=(0,G.useCallback)(async t=>{let r=(t?.name??be).trim();if(!r)return;let i=t?.source??ve;if(i===`catalog`){let e=_t.find(e=>e.name===r);if(e&&!(Q[e.name]??e.enabled))return}I(null);let a=i===`store`&&!Sn(r);Le(r);try{if(a){let e=t?.providerOverride?.trim()||it.current||$;await $e({name:r,overwrite:!1,...e?{provider:e}:{}}),lt.current=!0,await Ht({silent:!0})}ge(!1),n(`/chat/new?skill=${encodeURIComponent(r)}`)}catch(t){Gt(`error`,t instanceof Error?t.message:e.uploadFailed)}finally{Le(null)}},[_t,be,ve,Q,Sn,Ht,n,Gt,e.uploadFailed,$]),wn=(0,G.useCallback)(async(t,n)=>{let r=Sn(t);if(!(r&&!window.confirm(e.marketplaceReinstallConfirm))){I(null),Fe(t);try{let e=n?.providerOverride?.trim()||(n?.useDetailProvider?it.current??$:$),i=await $e({name:t,overwrite:r,...e?{provider:e}:{}});lt.current=!0,await Ht({silent:!0}),Gt(`success`,Kt(i)),R(`installed`),V(`installed`),await Jt(i.availability?.skillName||i.skillId||t)}catch(t){Gt(`error`,t instanceof Error?t.message:e.uploadFailed)}finally{Fe(null)}}},[Sn,Kt,Ht,$,Jt,Gt,e.marketplaceReinstallConfirm,e.uploadFailed]),{pathname:Tn}=a();return{sk:e,hasToken:t,catalog:_t,loading:xt,error:Wt,uploading:_,searchQuery:O,setSearchQuery:k,actionFeedback:F,skillDiagnostics:Ge,mainTab:L,setMainTab:R,sourceFilter:B,setSourceFilter:V,builtinCategoryFilter:H,setBuiltinCategoryFilter:ee,installOpen:ne,setInstallOpen:K,pendingFile:re,setPendingFile:q,dropActive:J,setDropActive:Y,confirmOpen:oe,setConfirmOpen:ce,confirmId:le,setConfirmId:ue,togglingSkillName:de,enabledOverride:Q,detailOpen:he,setDetailOpen:ge,detailSource:ve,setDetailSource:ye,detailTitle:be,setDetailTitle:xe,detailCatalogPreview:Se,setDetailCatalogPreview:Ce,detailMarketplacePreview:we,setDetailMarketplacePreview:Te,detailLoading:Ee,detailError:Oe,setDetailError:ke,marketSort:Ae,setMarketSort:je,marketPage:Me,setMarketPage:Ne,mpLoading:Lt,mpError:Rt,mpPayload:It,searchActive:P,searchInputActive:N,resultTab:ft,setResultTab:pt,aggregatedTabCounts:At,aggregatedProviderStatus:Mt,aggregatedAllFailed:Pt,installingMarketName:Pe,usingSkillInChatName:Ie,onUseSkillInChat:Cn,marketCategoryId:Re,setMarketCategoryId:ze,mpCategories:zt,mpCategoriesError:Vt,mpCategoriesLoading:Bt,marketBrowseProvider:$,setMarketBrowseProvider:Be,registeredProviders:St,builtinTabStats:$t,userTabStats:en,detailEnabled:nn,detailDirectoryId:rn,detailManaged:an,detailExternalUrl:on,filteredCatalog:sn,builtinCategories:cn,categoryFilteredCatalog:un,catalogDisplayRows:pn,catalogDisabledCount:fn,catalogStatusFilter:U,setCatalogStatusFilter:W,resolveSkillEnabled:dn,inSettingsShell:Tn.startsWith(`/settings/`),categoryLabel:ln,onReloadClick:Zt,openSkillDetail:qt,openMarketplaceDetail:Yt,onSkillToggle:Xt,onInstallSubmit:hn,onFileInputChange:gn,onModalDragOver:_n,onModalDragLeave:vn,onModalDrop:yn,sourceLabel:bn,runDelete:xn,onMarketInstall:wn,isSkillInstalledByName:Sn}}function at(){let e=(0,ne.c)(2),t=it(),n;return e[0]===t?n=e[1]:(n=(0,K.jsx)(Le,{vm:t}),e[0]=t,e[1]=n),n}export{at as SkillsPage};
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{d as i,l as a}from"./chunk-QUQL4437-DXsxWP7r.js";import{t as o}from"./cn-BQ_8x0bT.js";import{t as s}from"./check-BODqo66o.js";import{t as c}from"./messages-t1yPaVCt.js";import{n as l}from"./locale-store-BneNAR8R.js";import{i as u}from"./vendor-swr-BIWyz7Rc.js";import{$l as d,$t as f,Ao as p,Ds as m,Fo as h,Fs as g,Go as _,Gs as v,Io as y,Jc as b,Kl as x,Ml as S,Mo as C,No as w,Os as T,Po as E,Qs as D,Qt as O,Ro as k,Xt as A,Ys as j,Yt as M,Zt as N,an as P,ao as F,au as I,bn as ee,cn as te,dn as L,en as ne,fn as re,hc as ie,hn as ae,hs as R,in as oe,jl as se,jo as z,js as B,ko as ce,ll as le,ln as ue,mn as de,nn as fe,on as pe,pn as me,qo as he,rn as ge,sl as _e,sn as ve,tn as ye,tr as be,un as xe,uu as Se,xc as Ce,ys as we}from"./index-CH7XN6KY.js";import{t as Te}from"./page-tabs-DMlQERNg.js";import{t as Ee}from"./user-profile-fields-editor-y8gTmkPX.js";import{t as De}from"./connector-logo-BjbYbJjQ.js";var V=e(t(),1),H=n(),U={"composio-gmail":`gmail`,"composio-googledrive":`google-drive`,"composio-notion":`notion`,"composio-slack":`slack`,memory:`memory`};function Oe(e){if(e.branding?.logoUrl)return e.branding;let t=U[e.id];return t?{...e.branding,logoUrl:`/connector-icons/${t}.svg`}:e.branding}var W=r();function ke(e){let t=(0,H.c)(33),{source:n,language:r,busy:i,onOpenChange:a,onConfirm:s}=e,l=c(r).you,[u,d]=(0,V.useState)(!1),f,m;t[0]===n?(f=t[1],m=t[2]):(f=()=>{n&&d(!1)},m=[n],t[0]=n,t[1]=f,t[2]=m),(0,V.useEffect)(f,m);let g;t[3]!==i||t[4]!==a?(g=e=>!i&&a(e),t[3]=i,t[4]=a,t[5]=g):g=t[5];let _;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,W.jsx)(w,{className:`xopc-dialog-overlay fixed inset-0 z-[130] bg-scrim`}),t[6]=_):_=t[6];let v;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,W.jsx)(we,{className:`size-4`,"aria-hidden":!0}),t[7]=v):v=t[7];let y;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>d(!1),t[8]=y):y=t[8];let b=u?`border-edge-subtle hover:bg-surface-hover`:`border-accent/40 bg-accent-soft/35`,x;t[9]===b?x=t[10]:(x=o(`flex w-full items-start gap-3 rounded-xl border p-4 text-left`,b),t[9]=b,t[10]=x);let D;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,W.jsx)(S,{className:`mt-0.5 size-4 shrink-0 text-accent`,"aria-hidden":!0}),t[11]=D):D=t[11];let O;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>d(!0),t[12]=O):O=t[12];let k=u?`border-danger/40 bg-danger-soft`:`border-edge-subtle hover:bg-surface-hover`,A;t[13]===k?A=t[14]:(A=o(`flex w-full items-start gap-3 rounded-xl border p-4 text-left disabled:cursor-not-allowed disabled:opacity-55`,k),t[13]=k,t[14]=A);let j;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,W.jsx)(B,{className:`mt-0.5 size-4 shrink-0 text-danger`,"aria-hidden":!0}),t[15]=j):j=t[15];let M=l.disconnectDeleteBody.replace(`{{count}}`,String(n?.derivedUnderstandingCount??0)),N;t[16]===M?N=t[17]:(N=(0,W.jsx)(`span`,{className:`mt-1 block text-xs leading-5 text-fg-muted`,children:M}),t[16]=M,t[17]=N);let P;t[18]!==i||t[19]!==l.cancel?(P=(0,W.jsx)(p,{asChild:!0,children:(0,W.jsx)(R,{type:`button`,variant:`ghost`,disabled:i,children:l.cancel})}),t[18]=i,t[19]=l.cancel,t[20]=P):P=t[20];let F=u?`border-danger/35 text-danger hover:bg-danger-soft`:void 0,I;t[21]!==u||t[22]!==s?(I=()=>s(u),t[21]=u,t[22]=s,t[23]=I):I=t[23];let ee;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,W.jsx)(T,{className:`size-4`,"aria-hidden":!0}),t[24]=ee):ee=t[24];let te=i?l.disconnecting:l.disconnectAction,L;t[25]!==i||t[26]!==F||t[27]!==I||t[28]!==te?(L=(0,W.jsxs)(R,{type:`button`,variant:`secondary`,className:F,disabled:i,onClick:I,children:[ee,te]}),t[25]=i,t[26]=F,t[27]=I,t[28]=te,t[29]=L):L=t[29];let ne;return t[30]!==P||t[31]!==L?(ne=(0,W.jsxs)(`div`,{className:`flex shrink-0 justify-end gap-2 border-t border-edge-subtle px-5 py-4`,children:[P,L]}),t[30]=P,t[31]=L,t[32]=ne):ne=t[32],(0,W.jsx)(ce,{open:n!==null,onOpenChange:g,children:(0,W.jsxs)(E,{children:[_,(0,W.jsxs)(z,{className:`fixed left-1/2 top-1/2 z-[131] flex h-[min(31rem,calc(100dvh-2rem))] w-[min(32rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-panel shadow-elevated`,children:[(0,W.jsxs)(`div`,{className:`flex shrink-0 items-start justify-between gap-3 border-b border-edge-subtle px-5 py-4`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(h,{className:`text-base font-semibold text-fg`,children:l.disconnectTitle}),(0,W.jsx)(C,{className:`mt-1 text-sm text-fg-muted`,children:l.disconnectBody.replace(`{{source}}`,n?.displayName??``)})]}),(0,W.jsx)(p,{asChild:!0,children:(0,W.jsx)(`button`,{type:`button`,className:`rounded-lg p-1.5 text-fg-muted hover:bg-surface-hover hover:text-fg`,"aria-label":l.cancel,disabled:i,children:v})})]}),(0,W.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-3 overflow-y-auto p-5`,children:[(0,W.jsxs)(`div`,{className:`rounded-xl bg-surface-muted px-4 py-3 text-xs leading-5 text-fg-muted`,children:[n?.accountLabel?(0,W.jsx)(`p`,{className:`font-medium text-fg`,children:l.disconnectAccount.replace(`{{account}}`,n.accountLabel)}):null,(0,W.jsx)(`p`,{children:l.disconnectImpact.replace(`{{items}}`,String(n?.knowledgeItemCount??0)).replace(`{{understandings}}`,String(n?.derivedUnderstandingCount??0))})]}),(0,W.jsxs)(`button`,{type:`button`,"aria-pressed":!u,onClick:y,className:x,children:[D,(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`span`,{className:`block text-sm font-semibold text-fg`,children:l.disconnectKeepTitle}),(0,W.jsx)(`span`,{className:`mt-1 block text-xs leading-5 text-fg-muted`,children:l.disconnectKeepBody})]})]}),(0,W.jsxs)(`button`,{type:`button`,"aria-pressed":u,onClick:O,disabled:!n?.derivedUnderstandingCount,className:A,children:[j,(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`span`,{className:`block text-sm font-semibold text-fg`,children:l.disconnectDeleteTitle}),N]})]})]}),ne]})]})})}var Ae=new Set([`overview`,`understanding`,`sources`,`controls`]),je=[`collaboration`,`priorities`,`boundaries`,`people`,`current`,`basics`],G=`w-full rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm text-fg outline-none placeholder:text-fg-subtle focus:border-accent/50 focus:ring-2 focus:ring-accent/20`;function K(e,t){return e.replace(`{{count}}`,String(t))}function q(e,t){let n=Date.parse(e);return Number.isFinite(n)?new Intl.DateTimeFormat(t===`zh`?`zh-CN`:`en`,{dateStyle:`medium`,timeStyle:`short`}).format(n):e}function Me(e){return e===`review`?`understanding`:e===`privacy`?`controls`:e&&Ae.has(e)?e:`overview`}function Ne(){let e=(0,H.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,W.jsx)(F,{className:`h-24 rounded-2xl`}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,W.jsxs)(`div`,{className:`space-y-4`,"aria-busy":!0,children:[t,(0,W.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,W.jsx)(F,{className:`h-64 rounded-2xl`}),(0,W.jsx)(F,{className:`h-64 rounded-2xl`})]})]}),e[1]=n):n=e[1],n}function Pe(e,t){return e.origin===`connected_source`?t.origins.connected_source.replace(`{{source}}`,e.sourceName):t.origins[e.origin]}function Fe(e){let t=(0,H.c)(19),{item:n,language:r,t:i,busy:a,onConfirm:c,onReject:l,onUpdate:u,onForget:d}=e,[f,p]=(0,V.useState)(!1),[m,h]=(0,V.useState)(n.statement),[g,_]=(0,V.useState)(null),[y,b]=(0,V.useState)(!1),x=n.status!==`active`,S=x?`border-warning/35 bg-warning-soft/35`:`border-edge-subtle bg-surface-panel`,C;t[0]===S?C=t[1]:(C=o(`rounded-xl border p-3.5`,S),t[0]=S,t[1]=C);let w;t[2]!==a||t[3]!==m||t[4]!==f||t[5]!==g||t[6]!==y||t[7]!==n||t[8]!==r||t[9]!==x||t[10]!==c||t[11]!==d||t[12]!==l||t[13]!==u||t[14]!==i?(w=f?(0,W.jsxs)(`div`,{className:`space-y-2`,children:[(0,W.jsx)(`textarea`,{className:o(G,`min-h-20 resize-y`),value:m,onChange:e=>h(e.target.value),placeholder:i.updatePlaceholder,autoFocus:!0}),(0,W.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,W.jsx)(R,{type:`button`,variant:`ghost`,className:`h-8 px-2`,onClick:()=>{h(n.statement),p(!1)},children:i.cancel}),(0,W.jsx)(R,{type:`button`,variant:`primary`,className:`h-8 px-2`,disabled:a||!m.trim(),onClick:()=>{u(m.trim()),p(!1)},children:i.save})]})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`p`,{className:`text-sm leading-6 text-fg`,children:n.statement}),(0,W.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center justify-between gap-2`,children:[(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-fg-subtle`,children:[(0,W.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,W.jsx)(v,{className:`size-3 text-accent`,"aria-hidden":!0}),Pe(n,i)]}),(0,W.jsx)(`span`,{className:`rounded-full bg-surface-hover px-2 py-0.5`,children:i.stability[n.stability]}),n.evidenceCount>1?(0,W.jsx)(`span`,{children:K(i.evidenceCount,n.evidenceCount)}):null,n.latestEvidenceAt?(0,W.jsx)(`span`,{children:i.observedAt.replace(`{{time}}`,q(n.latestEvidenceAt,r))}):null]}),(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1`,children:[x?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(R,{type:`button`,variant:`ghost`,className:`h-8 px-2`,disabled:a,onClick:c,children:[(0,W.jsx)(s,{className:`size-3.5`,"aria-hidden":!0}),i.confirm]}),(0,W.jsxs)(R,{type:`button`,variant:`ghost`,className:`h-8 px-2`,disabled:a,onClick:l,children:[(0,W.jsx)(we,{className:`size-3.5`,"aria-hidden":!0}),i.notTrue]})]}):null,(0,W.jsxs)(R,{type:`button`,variant:`ghost`,className:`h-8 px-2`,disabled:a,onClick:()=>p(!0),children:[(0,W.jsx)(Ce,{className:`size-3.5`,"aria-hidden":!0}),i.change]}),(0,W.jsxs)(R,{type:`button`,variant:`ghost`,className:`h-8 px-2`,disabled:y,onClick:()=>{if(g){_(null);return}b(!0),fe(n.id).then(e=>_(e.history)).finally(()=>b(!1))},children:[(0,W.jsx)(_e,{className:`size-3.5`,"aria-hidden":!0}),i.history]}),(0,W.jsxs)(R,{type:`button`,variant:`ghost`,className:`h-8 px-2`,disabled:a,onClick:d,children:[(0,W.jsx)(B,{className:`size-3.5`,"aria-hidden":!0}),i.forget]})]})]}),(0,W.jsxs)(`details`,{className:`mt-2 rounded-lg bg-surface-muted/70 px-3 py-2 text-xs text-fg-muted`,children:[(0,W.jsx)(`summary`,{className:`cursor-pointer font-medium text-fg-muted`,children:i.viewEvidence}),(0,W.jsxs)(`dl`,{className:`mt-2 grid gap-1.5 sm:grid-cols-2`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{className:`text-fg-subtle`,children:i.evidenceSource}),(0,W.jsx)(`dd`,{className:`mt-0.5 break-all text-fg-muted`,children:n.sourceName})]}),n.sourcePath?(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{className:`text-fg-subtle`,children:i.evidencePath}),(0,W.jsx)(`dd`,{className:`mt-0.5 break-all text-fg-muted`,children:n.sourcePath})]}):null,(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{className:`text-fg-subtle`,children:i.evidenceUpdated}),(0,W.jsx)(`dd`,{className:`mt-0.5 text-fg-muted`,children:q(n.updatedAt,r)})]}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{className:`text-fg-subtle`,children:i.evidenceSupport}),(0,W.jsx)(`dd`,{className:`mt-0.5 text-fg-muted`,children:K(i.evidenceCount,n.evidenceCount)})]})]})]}),g?(0,W.jsxs)(`div`,{className:`mt-2 space-y-2 border-t border-edge pt-2`,children:[(0,W.jsx)(`p`,{className:`text-xs font-medium text-fg-muted`,children:i.historyTitle}),g.map(e=>(0,W.jsxs)(`div`,{className:`flex items-start justify-between gap-3 text-xs`,children:[(0,W.jsx)(`p`,{className:`min-w-0 text-fg-muted`,children:e.statement}),(0,W.jsx)(`span`,{className:`shrink-0 text-fg-subtle`,children:q(e.updatedAt,r)})]},e.id))]}):null]}),t[2]=a,t[3]=m,t[4]=f,t[5]=g,t[6]=y,t[7]=n,t[8]=r,t[9]=x,t[10]=c,t[11]=d,t[12]=l,t[13]=u,t[14]=i,t[15]=w):w=t[15];let T;return t[16]!==C||t[17]!==w?(T=(0,W.jsx)(`article`,{className:C,children:w}),t[16]=C,t[17]=w,t[18]=T):T=t[18],T}function Ie(e){let t=(0,H.c)(79),{source:n,language:r,t:i,onConfigure:a,onDisconnect:s}=e,c=n.installed?n.enabled?i.connected:i.paused:i.available,l;t[0]!==n.lastHealthStatus||t[1]!==i.healthIssue||t[2]!==i.healthOk||t[3]!==i.sourceHealth?(l=n.lastHealthStatus?i.sourceHealth.replace(`{{status}}`,n.lastHealthStatus===`ok`?i.healthOk:i.healthIssue):null,t[0]=n.lastHealthStatus,t[1]=i.healthIssue,t[2]=i.healthOk,t[3]=i.sourceHealth,t[4]=l):l=t[4];let u=l,d=`${i.manageSources}: ${n.displayName}`,f;t[5]===a?f=t[6]:(f=e=>{e.target===e.currentTarget&&(e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),a()))},t[5]=a,t[6]=f);let p=n.displayName,m;t[7]===n?m=t[8]:(m=Oe(n),t[7]=n,t[8]=m);let h;t[9]!==n.displayName||t[10]!==m?(h=(0,W.jsx)(De,{connector:{displayName:p,branding:m},size:`sm`}),t[9]=n.displayName,t[10]=m,t[11]=h):h=t[11];let g;t[12]===n.displayName?g=t[13]:(g=(0,W.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:n.displayName}),t[12]=n.displayName,t[13]=g);let _;t[14]===n.accountLabel?_=t[15]:(_=n.accountLabel?(0,W.jsx)(`p`,{className:`mt-0.5 truncate text-xs font-medium text-fg-muted`,children:n.accountLabel}):null,t[14]=n.accountLabel,t[15]=_);let v;t[16]===n.description?v=t[17]:(v=(0,W.jsx)(`p`,{className:`mt-1 line-clamp-2 text-xs leading-5 text-fg-muted`,children:n.description}),t[16]=n.description,t[17]=v);let y;t[18]!==g||t[19]!==_||t[20]!==v?(y=(0,W.jsxs)(`div`,{className:`min-w-0`,children:[g,_,v]}),t[18]=g,t[19]=_,t[20]=v,t[21]=y):y=t[21];let b;t[22]!==y||t[23]!==h?(b=(0,W.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[h,y]}),t[22]=y,t[23]=h,t[24]=b):b=t[24];let x=n.installed&&n.enabled?`bg-success-soft text-fg`:`bg-surface-hover text-fg-muted`,S;t[25]===x?S=t[26]:(S=o(`shrink-0 rounded-full px-2 py-1 text-[11px] font-medium`,x),t[25]=x,t[26]=S);let C;t[27]!==c||t[28]!==S?(C=(0,W.jsx)(`span`,{className:S,children:c}),t[27]=c,t[28]=S,t[29]=C):C=t[29];let w;t[30]!==b||t[31]!==C?(w=(0,W.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[b,C]}),t[30]=b,t[31]=C,t[32]=w):w=t[32];let T;t[33]!==n.access.context||t[34]!==i.sourceContext?(T=n.access.context?(0,W.jsx)(`span`,{className:`rounded-full bg-surface-hover px-2 py-0.5`,children:i.sourceContext}):null,t[33]=n.access.context,t[34]=i.sourceContext,t[35]=T):T=t[35];let E;t[36]!==n.access.memory||t[37]!==i.sourceMemory?(E=n.access.memory?(0,W.jsx)(`span`,{className:`rounded-full bg-surface-hover px-2 py-0.5`,children:i.sourceMemory}):null,t[36]=n.access.memory,t[37]=i.sourceMemory,t[38]=E):E=t[38];let D;t[39]!==n.access.read||t[40]!==i.sourceRead?(D=n.access.read?(0,W.jsx)(`span`,{className:`rounded-full bg-surface-hover px-2 py-0.5`,children:i.sourceRead}):null,t[39]=n.access.read,t[40]=i.sourceRead,t[41]=D):D=t[41];let O;t[42]!==n.access.write||t[43]!==i.sourceWrite?(O=n.access.write?(0,W.jsx)(`span`,{className:`rounded-full bg-warning-soft px-2 py-0.5 text-fg`,children:i.sourceWrite}):null,t[42]=n.access.write,t[43]=i.sourceWrite,t[44]=O):O=t[44];let k;t[45]!==T||t[46]!==E||t[47]!==D||t[48]!==O?(k=(0,W.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-1.5 text-[11px] text-fg-subtle`,children:[T,E,D,O]}),t[45]=T,t[46]=E,t[47]=D,t[48]=O,t[49]=k):k=t[49];let A;t[50]!==u||t[51]!==r||t[52]!==n.derivedUnderstandingCount||t[53]!==n.installed||t[54]!==n.knowledgeItemCount||t[55]!==n.lastActivityAt||t[56]!==n.lastSyncAt||t[57]!==n.lastSyncError||t[58]!==n.lastSyncStatus||t[59]!==i.sourceDerivedCount||t[60]!==i.sourceKnowledgeCount||t[61]!==i.sourceLastSync||t[62]!==i.sourceLastUsed||t[63]!==i.sourceNeverUsed||t[64]!==i.sourceSyncFailed?(A=n.installed?(0,W.jsxs)(`div`,{className:`mt-3 space-y-1 border-t border-edge-subtle pt-3 text-xs text-fg-muted`,children:[u?(0,W.jsx)(`p`,{children:u}):null,(0,W.jsx)(`p`,{children:n.lastActivityAt?i.sourceLastUsed.replace(`{{time}}`,q(n.lastActivityAt,r)):i.sourceNeverUsed}),n.lastSyncAt?(0,W.jsx)(`p`,{children:i.sourceLastSync.replace(`{{time}}`,q(n.lastSyncAt,r))}):null,n.lastSyncStatus===`failed`&&n.lastSyncError?(0,W.jsx)(`p`,{className:`text-danger`,children:i.sourceSyncFailed.replace(`{{error}}`,n.lastSyncError)}):null,(0,W.jsx)(`p`,{children:i.sourceKnowledgeCount.replace(`{{count}}`,String(n.knowledgeItemCount))}),(0,W.jsx)(`p`,{children:i.sourceDerivedCount.replace(`{{count}}`,String(n.derivedUnderstandingCount))})]}):null,t[50]=u,t[51]=r,t[52]=n.derivedUnderstandingCount,t[53]=n.installed,t[54]=n.knowledgeItemCount,t[55]=n.lastActivityAt,t[56]=n.lastSyncAt,t[57]=n.lastSyncError,t[58]=n.lastSyncStatus,t[59]=i.sourceDerivedCount,t[60]=i.sourceKnowledgeCount,t[61]=i.sourceLastSync,t[62]=i.sourceLastUsed,t[63]=i.sourceNeverUsed,t[64]=i.sourceSyncFailed,t[65]=A):A=t[65];let j;t[66]!==s||t[67]!==n.installed||t[68]!==n.instanceId||t[69]!==i.disconnect?(j=n.installed&&n.instanceId?(0,W.jsx)(`div`,{className:`mt-3 flex justify-end border-t border-edge-subtle pt-3`,children:(0,W.jsx)(R,{type:`button`,variant:`ghost`,className:`h-8 px-2 text-danger hover:bg-danger-soft hover:text-danger`,onClick:e=>{e.stopPropagation(),s()},children:i.disconnect})}):null,t[66]=s,t[67]=n.installed,t[68]=n.instanceId,t[69]=i.disconnect,t[70]=j):j=t[70];let M;return t[71]!==a||t[72]!==w||t[73]!==d||t[74]!==k||t[75]!==A||t[76]!==j||t[77]!==f?(M=(0,W.jsxs)(`article`,{role:`button`,tabIndex:0,"aria-label":d,className:`cursor-pointer rounded-xl border border-edge-subtle bg-surface-panel p-4 transition-colors hover:border-accent/30 hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40`,onClick:a,onKeyDown:f,children:[w,k,A,j]}),t[71]=a,t[72]=w,t[73]=d,t[74]=k,t[75]=A,t[76]=j,t[77]=f,t[78]=M):M=t[78],M}function Le(e){let t=(0,H.c)(58),{playbook:n,busy:r,t:i,onToggleGroup:a,onCreate:s,onUpdate:c,onDelete:l}=e,[u,d]=(0,V.useState)(``),[f,p]=(0,V.useState)(null),[m,h]=(0,V.useState)(``),g=n.enabled?`border-edge-subtle bg-surface-panel`:`border-edge-subtle bg-surface-muted`,_;t[0]===g?_=t[1]:(_=o(`rounded-xl border p-4`,g),t[0]=g,t[1]=_);let v=i.playbookNames[n.id],y;t[2]===v?y=t[3]:(y=(0,W.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:v}),t[2]=v,t[3]=y);let b;t[4]!==n.rules||t[5]!==i.playbookRuleCount?(b=K(i.playbookRuleCount,n.rules.filter(Re).length),t[4]=n.rules,t[5]=i.playbookRuleCount,t[6]=b):b=t[6];let x;t[7]===b?x=t[8]:(x=(0,W.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:b}),t[7]=b,t[8]=x);let S;t[9]!==y||t[10]!==x?(S=(0,W.jsxs)(`div`,{children:[y,x]}),t[9]=y,t[10]=x,t[11]=S):S=t[11];let C=n.enabled?i.pausePlaybook:i.resumePlaybook,w;t[12]!==r||t[13]!==a||t[14]!==C?(w=(0,W.jsx)(R,{type:`button`,variant:`ghost`,className:`h-8 px-2`,disabled:r,onClick:a,children:C}),t[12]=r,t[13]=a,t[14]=C,t[15]=w):w=t[15];let T;t[16]!==S||t[17]!==w?(T=(0,W.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[S,w]}),t[16]=S,t[17]=w,t[18]=T):T=t[18];let E;t[19]!==r||t[20]!==f||t[21]!==m||t[22]!==l||t[23]!==c||t[24]!==n.rules||t[25]!==i.cancel||t[26]!==i.deleteRule||t[27]!==i.disableRule||t[28]!==i.edit||t[29]!==i.enableRule||t[30]!==i.moveDown||t[31]!==i.moveUp||t[32]!==i.save?(E=n.rules.map((e,t)=>(0,W.jsx)(`li`,{className:o(`rounded-lg border border-edge-subtle p-2.5`,!e.enabled&&`opacity-60`),children:f===e.id?(0,W.jsxs)(`div`,{className:`space-y-2`,children:[(0,W.jsx)(`textarea`,{className:o(G,`min-h-16 resize-y`),value:m,onChange:e=>h(e.target.value)}),(0,W.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[(0,W.jsx)(R,{type:`button`,variant:`ghost`,className:`h-7 px-2`,onClick:()=>p(null),children:i.cancel}),(0,W.jsx)(R,{type:`button`,variant:`primary`,className:`h-7 px-2`,disabled:!m.trim(),onClick:()=>{c(e.id,{statement:m.trim()}),p(null)},children:i.save})]})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`p`,{className:`text-xs leading-5 text-fg-muted`,children:e.statement}),(0,W.jsxs)(`div`,{className:`mt-2 flex flex-wrap justify-end gap-1`,children:[(0,W.jsx)(R,{type:`button`,variant:`ghost`,className:`h-7 px-2`,disabled:r||t===0,onClick:()=>c(e.id,{order:n.rules[t-1].order-1}),children:i.moveUp}),(0,W.jsx)(R,{type:`button`,variant:`ghost`,className:`h-7 px-2`,disabled:r||t===n.rules.length-1,onClick:()=>c(e.id,{order:n.rules[t+1].order+1}),children:i.moveDown}),(0,W.jsx)(R,{type:`button`,variant:`ghost`,className:`h-7 px-2`,disabled:r,onClick:()=>c(e.id,{enabled:!e.enabled}),children:e.enabled?i.disableRule:i.enableRule}),(0,W.jsxs)(R,{type:`button`,variant:`ghost`,className:`h-7 px-2`,disabled:r,onClick:()=>{p(e.id),h(e.statement)},children:[(0,W.jsx)(Ce,{className:`size-3`,"aria-hidden":!0}),i.edit]}),(0,W.jsxs)(R,{type:`button`,variant:`ghost`,className:`h-7 px-2 text-danger`,disabled:r,onClick:()=>l(e.id),children:[(0,W.jsx)(B,{className:`size-3`,"aria-hidden":!0}),i.deleteRule]})]})]})},e.id)),t[19]=r,t[20]=f,t[21]=m,t[22]=l,t[23]=c,t[24]=n.rules,t[25]=i.cancel,t[26]=i.deleteRule,t[27]=i.disableRule,t[28]=i.edit,t[29]=i.enableRule,t[30]=i.moveDown,t[31]=i.moveUp,t[32]=i.save,t[33]=E):E=t[33];let D;t[34]===E?D=t[35]:(D=(0,W.jsx)(`ul`,{className:`mt-3 space-y-2`,children:E}),t[34]=E,t[35]=D);let O;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>d(e.target.value),t[36]=O):O=t[36];let k;t[37]!==u||t[38]!==i.newRulePlaceholder?(k=(0,W.jsx)(`input`,{className:G,value:u,onChange:O,placeholder:i.newRulePlaceholder}),t[37]=u,t[38]=i.newRulePlaceholder,t[39]=k):k=t[39];let A;t[40]!==r||t[41]!==u?(A=r||!u.trim(),t[40]=r,t[41]=u,t[42]=A):A=t[42];let j;t[43]!==u||t[44]!==s?(j=()=>{s(u.trim()),d(``)},t[43]=u,t[44]=s,t[45]=j):j=t[45];let M;t[46]!==i.addRule||t[47]!==A||t[48]!==j?(M=(0,W.jsx)(R,{type:`button`,variant:`secondary`,disabled:A,onClick:j,children:i.addRule}),t[46]=i.addRule,t[47]=A,t[48]=j,t[49]=M):M=t[49];let N;t[50]!==k||t[51]!==M?(N=(0,W.jsxs)(`div`,{className:`mt-3 flex gap-2`,children:[k,M]}),t[50]=k,t[51]=M,t[52]=N):N=t[52];let P;return t[53]!==T||t[54]!==D||t[55]!==N||t[56]!==_?(P=(0,W.jsxs)(`article`,{className:_,children:[T,D,N]}),t[53]=T,t[54]=D,t[55]=N,t[56]=_,t[57]=P):P=t[57],P}function Re(e){return e.enabled}function ze(e){let t=(0,H.c)(46),{suggestion:n,draft:r,busy:i,onDraftChange:a,onSave:s,onLater:c,t:l}=e,u;t[0]!==n||t[1]!==l.meetSuggestedTitle||t[2]!==l.meetTitle?(u=n?l.meetSuggestedTitle.replace(`{{name}}`,n.value):l.meetTitle,t[0]=n,t[1]=l.meetSuggestedTitle,t[2]=l.meetTitle,t[3]=u):u=t[3];let d;t[4]===u?d=t[5]:(d=(0,W.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight text-fg`,children:u}),t[4]=u,t[5]=d);let f=n?l.meetSuggestedBody:l.meetBody,p;t[6]===f?p=t[7]:(p=(0,W.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-fg-muted`,children:f}),t[6]=f,t[7]=p);let m;t[8]===l.callName?m=t[9]:(m=(0,W.jsx)(`label`,{className:`sr-only`,htmlFor:`you-call-name`,children:l.callName}),t[8]=l.callName,t[9]=m);let h;t[10]===a?h=t[11]:(h=e=>a(e.target.value),t[10]=a,t[11]=h);let g;t[12]!==i||t[13]!==r||t[14]!==s?(g=e=>{e.key===`Enter`&&r.trim()&&!i&&s()},t[12]=i,t[13]=r,t[14]=s,t[15]=g):g=t[15];let _=l.meetPlaceholder,v;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(v=o(G,`h-10 flex-1 bg-surface-base/90`),t[16]=v):v=t[16];let y;t[17]!==r||t[18]!==l.meetPlaceholder||t[19]!==h||t[20]!==g?(y=(0,W.jsx)(`input`,{id:`you-call-name`,value:r,maxLength:80,autoFocus:!0,onChange:h,onKeyDown:g,placeholder:_,className:v}),t[17]=r,t[18]=l.meetPlaceholder,t[19]=h,t[20]=g,t[21]=y):y=t[21];let b;t[22]!==i||t[23]!==r?(b=i||!r.trim(),t[22]=i,t[23]=r,t[24]=b):b=t[24];let x=i?l.meetSaving:l.meetSave,S;t[25]!==s||t[26]!==b||t[27]!==x?(S=(0,W.jsx)(R,{type:`button`,variant:`primary`,className:`h-10 shrink-0`,disabled:b,onClick:s,children:x}),t[25]=s,t[26]=b,t[27]=x,t[28]=S):S=t[28];let C;t[29]!==y||t[30]!==S||t[31]!==m?(C=(0,W.jsxs)(`div`,{className:`mt-5 flex max-w-xl flex-col gap-2 sm:flex-row`,children:[m,y,S]}),t[29]=y,t[30]=S,t[31]=m,t[32]=C):C=t[32];let w;t[33]!==n||t[34]!==l.meetSource?(w=n?(0,W.jsxs)(`p`,{className:`mt-3 flex items-start gap-1.5 text-xs leading-5 text-fg-subtle`,children:[(0,W.jsx)(j,{className:`mt-0.5 size-3.5 shrink-0 text-accent`,"aria-hidden":!0}),(0,W.jsx)(`span`,{children:l.meetSource})]}):null,t[33]=n,t[34]=l.meetSource,t[35]=w):w=t[35];let T;t[36]!==i||t[37]!==c||t[38]!==l.meetLater?(T=(0,W.jsx)(`button`,{type:`button`,disabled:i,className:`mt-3 text-xs font-medium text-fg-muted hover:text-fg hover:underline disabled:opacity-60`,onClick:c,children:l.meetLater}),t[36]=i,t[37]=c,t[38]=l.meetLater,t[39]=T):T=t[39];let E;return t[40]!==C||t[41]!==w||t[42]!==T||t[43]!==d||t[44]!==p?(E=(0,W.jsx)(`section`,{className:`relative overflow-hidden rounded-2xl border border-accent/25 bg-gradient-to-br from-accent-soft/80 via-surface-panel to-surface-panel p-5 sm:p-6`,children:(0,W.jsxs)(`div`,{className:`relative max-w-2xl`,children:[d,p,C,w,T]})}),t[40]=C,t[41]=w,t[42]=T,t[43]=d,t[44]=p,t[45]=E):E=t[45],E}function Be(){let e=l(e=>e.language),t=c(e).you,n=a(),[r,p]=i(),h=Me(r.get(`tab`)),v=y(e=>e.setPageHeader),C=y(e=>e.clearPageHeader),{data:w,error:T,isLoading:E,mutate:F}=u(`/api/you`,ge),[z,B]=(0,V.useState)(null),[ce,fe]=(0,V.useState)(!1),[_e,we]=(0,V.useState)(``),[De,H]=(0,V.useState)(`preference`),[U,Oe]=(0,V.useState)(null),[Ae,Re]=(0,V.useState)(!1),[Be,Ve]=(0,V.useState)(null),[He,Ue]=(0,V.useState)(!1),[We,Ge]=(0,V.useState)(``),[Ke,qe]=(0,V.useState)(!1),[Je,Ye]=(0,V.useState)(null),[Xe,Ze]=(0,V.useState)(!1),[Qe,$e]=(0,V.useState)(!1),[et,tt]=(0,V.useState)(null),[nt,rt]=(0,V.useState)(null),[it,at]=(0,V.useState)(!1),[J,ot]=(0,V.useState)(null),st=(0,V.useRef)(null),ct=(0,V.useRef)(null),Y=w?.profile??{callName:``,pronouns:``,timezone:``,notes:``},lt=(0,V.useMemo)(()=>w?.understanding.filter(e=>e.status===`active`)??[],[w]),X=(0,V.useMemo)(()=>w?.understanding.filter(e=>e.status!==`active`)??[],[w]),ut=(0,V.useMemo)(()=>new Map(je.map(e=>[e,lt.filter(t=>t.facet===e)])),[lt]),Z=Je??w?.controls??null,dt=w?.sources.filter(e=>e.installed&&e.enabled)??[],ft=dt.filter(e=>[`failed`,`unauthorized`,`degraded`,`not_configured`].includes(e.status)),Q=(e,t)=>{let n=new URLSearchParams(r);e===`overview`?n.delete(`tab`):n.set(`tab`,e),t?n.set(`status`,t):n.delete(`status`),p(n,{replace:!0})},pt=e=>{let t=new URLSearchParams({connector:e.id});e.instanceId&&t.set(`instance`,e.instanceId),n(`/connectors?${t.toString()}`)};(0,V.useLayoutEffect)(()=>(v({startExtra:null,main:(0,W.jsxs)(`div`,{className:`min-w-0`,children:[(0,W.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:t.title}),(0,W.jsx)(`p`,{className:`truncate text-xs text-fg-muted`,children:t.subtitle})]}),end:null}),()=>C()),[C,v,t.subtitle,t.title]),(0,V.useEffect)(()=>{!w||w.profile.callName||Ge(w.profileSetup.callNameSuggestion?.value??``)},[w,w?.profile.callName,w?.profileSetup.callNameSuggestion?.id]);async function $(e,n,r){B(e.id);try{let t=await L(e.id,{action:n,content:r});await F(r=>r&&{...r,understanding:n===`reject`?r.understanding.filter(t=>t.id!==e.id):r.understanding.map(n=>n.id===e.id?t:n)},{revalidate:!1}),F()}catch{k({type:`error`,title:t.title,message:t.saveError})}finally{B(null)}}async function mt(e,n){B(`consent:${e}`);try{await O(e,n),await F(),k({type:`success`,title:t.title,message:t.saved})}catch{k({type:`error`,title:t.title,message:t.saveError})}finally{B(null)}}async function ht(){let e=_e.trim();if(e){B(`understanding:new`);try{await N({content:e,kind:De}),we(``),fe(!1),await F(),k({type:`success`,title:t.understandingTitle,message:t.saved})}catch{k({type:`error`,title:t.understandingTitle,message:t.saveError})}finally{B(null)}}}async function gt(){if(X.length){B(`understanding:batch`);try{await M(X.map(e=>e.id),`confirm`),await F()}catch{k({type:`error`,title:t.reviewTitle,message:t.saveError})}finally{B(null)}}}async function _t(e,n){B(`conflict:${e}`);try{await pe(e,n),await F()}catch{k({type:`error`,title:t.conflictsTitle,message:t.saveError})}finally{B(null)}}async function vt(e){B(`grant:${e}`);try{await ve(e),await F()}catch{k({type:`error`,title:t.grantsTitle,message:t.saveError})}finally{B(null)}}async function yt(r,i){B(`insight:${r.id}`);try{let t=await ue(r.id,{action:i,uiLocale:e});await F(),i===`apply`&&t.href&&n(t.href)}catch{k({type:`error`,title:t.insightsTitle,message:t.saveError})}finally{B(null)}}async function bt(e){B(`playbook:${e.id}`);try{await te(e.id,!e.enabled),await F()}catch{k({type:`error`,title:t.playbooksTitle,message:t.saveError})}finally{B(null)}}async function xt(e,n){B(`playbook:${e}`);try{await n(),await F()}catch{k({type:`error`,title:t.playbooksTitle,message:t.saveError})}finally{B(null)}}async function St(){if(U){B(U.id);try{await oe(U.id);let e=U.id;Oe(null),await F(t=>t&&{...t,understanding:t.understanding.filter(t=>t.id!==e)},{revalidate:!1}),F()}catch{k({type:`error`,title:t.title,message:t.saveError})}finally{B(null)}}}async function Ct(){if(Be){Ue(!0);try{let e=await me(Be);Re(!1),Ve(null),await F(t=>t&&{...t,...e},{revalidate:!1})}catch{k({type:`error`,title:t.title,message:t.saveError})}finally{Ue(!1)}}}async function wt(){let e=We.trim();if(!(!e||Ke)){qe(!0);try{let t=await me({callName:e,timezone:Y.timezone||ee()});await F(e=>e&&{...e,...t},{revalidate:!1})}catch{k({type:`error`,title:t.title,message:t.saveError})}finally{qe(!1)}}}async function Tt(){if(!Ke){qe(!0);try{let e=await de(`snooze`);await F(t=>t&&{...t,profileSetup:e.profileSetup},{revalidate:!1})}catch{k({type:`error`,title:t.title,message:t.saveError})}finally{qe(!1)}}}function Et(){Ve(Y),Re(!0),requestAnimationFrame(()=>st.current?.scrollIntoView({behavior:`smooth`,block:`center`}))}async function Dt(){if(Z){Ze(!0);try{Ye(await re(Z)),await F(),k({type:`success`,title:t.title,message:t.saved})}catch{k({type:`error`,title:t.title,message:t.saveError})}finally{Ze(!1)}}}async function Ot(e){if(!(Qe||e===w?.trust.defaultActionLevel)){$e(!0);try{let t=await ae(e);await F(e=>e&&{...e,trust:t},{revalidate:!1})}catch{k({type:`error`,title:t.trustTitle,message:t.saveError})}finally{$e(!1),tt(null)}}}async function kt(e){if(!(!nt?.instanceId||it)){at(!0);try{let n=await ne(nt.instanceId,e);rt(null),await F(),k({type:`success`,title:t.sourcesTitle,message:e?t.disconnectDeleted.replace(`{{count}}`,String(n.deletedUnderstandingCount)):t.disconnectSuccess})}catch{k({type:`error`,title:t.sourcesTitle,message:t.saveError})}finally{at(!1)}}}async function At(){if(!J){ot(`export`);try{let e=await ye(),t=URL.createObjectURL(new Blob([JSON.stringify(e,null,2)],{type:`application/json`})),n=document.createElement(`a`);n.href=t,n.download=`xopc-about-you-${e.exportedAt.slice(0,10)}.json`,n.click(),URL.revokeObjectURL(t)}catch{k({type:`error`,title:t.transferTitle,message:t.saveError})}finally{ot(null)}}}async function jt(e){if(!(!e||J)){ot(`import`);try{if(e.size>2*1024*1024)throw Error(`file too large`);let n=await P(JSON.parse(await e.text()));await F(),Q(`understanding`,`review`),k({type:`success`,title:t.transferTitle,message:t.importSuccess.replace(`{{count}}`,String(n.importedCount)).replace(`{{skipped}}`,String(n.skippedCount))})}catch{k({type:`error`,title:t.transferTitle,message:t.importError})}finally{ct.current&&(ct.current.value=``),ot(null)}}}return(0,W.jsxs)(`main`,{className:`flex w-full flex-1 flex-col gap-5 px-3 py-6 sm:px-5 xl:px-6`,children:[(0,W.jsx)(Te,{items:[{id:`overview`,label:t.tabs.overview,icon:le},{id:`understanding`,label:t.tabs.understanding,icon:I,count:X.length||void 0},{id:`sources`,label:t.tabs.sources,icon:S},{id:`controls`,label:t.tabs.controls,icon:D}],activeTab:h,onChange:Q,ariaLabel:t.title,tabIdPrefix:`you-tab`,panelIdPrefix:`you-panel`}),E?(0,W.jsx)(Ne,{}):T||!w?(0,W.jsx)(`div`,{className:`rounded-2xl border border-danger/25 bg-danger-soft p-5 text-sm text-danger`,children:t.loadError}):null,w&&h===`overview`?(0,W.jsxs)(`div`,{id:`you-panel-overview`,role:`tabpanel`,"aria-labelledby":`you-tab-overview`,className:`space-y-4`,children:[!Y.callName&&w.profileSetup.shouldPrompt?(0,W.jsx)(ze,{suggestion:w.profileSetup.callNameSuggestion,draft:We,busy:Ke,onDraftChange:Ge,onSave:()=>void wt(),onLater:()=>void Tt(),t}):null,X.length>0||ft.length>0||!Y.callName?(0,W.jsxs)(`section`,{className:`rounded-2xl border border-warning/25 bg-warning-soft/35 p-5`,children:[(0,W.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:t.attentionTitle}),(0,W.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[X.length>0?(0,W.jsxs)(R,{type:`button`,variant:`secondary`,onClick:()=>Q(`understanding`,`review`),children:[K(t.reviewCount,X.length),(0,W.jsx)(d,{className:`size-4`,"aria-hidden":!0})]}):null,ft.length>0?(0,W.jsxs)(R,{type:`button`,variant:`secondary`,onClick:()=>Q(`sources`),children:[K(t.sourceIssues,ft.length),(0,W.jsx)(d,{className:`size-4`,"aria-hidden":!0})]}):null,Y.callName?null:(0,W.jsxs)(R,{type:`button`,variant:`secondary`,onClick:Et,children:[t.completeProfile,(0,W.jsx)(d,{className:`size-4`,"aria-hidden":!0})]})]})]}):null,(0,W.jsxs)(`section`,{className:`rounded-2xl border border-accent/15 bg-gradient-to-br from-accent-soft/55 via-surface-panel to-surface-panel p-5`,children:[(0,W.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight text-fg`,children:t.heroTitle}),(0,W.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm leading-6 text-fg-muted`,children:t.heroBody}),(0,W.jsxs)(`div`,{className:`mt-4 grid gap-3 sm:grid-cols-3`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`rounded-xl bg-surface-base/80 p-3 text-left`,onClick:()=>Q(`understanding`),children:[(0,W.jsx)(`span`,{className:`text-xl font-semibold text-fg`,children:lt.length}),(0,W.jsx)(`span`,{className:`mt-1 block text-xs text-fg-muted`,children:t.knownSummary})]}),(0,W.jsxs)(`button`,{type:`button`,className:`rounded-xl bg-surface-base/80 p-3 text-left`,onClick:()=>Q(`sources`),children:[(0,W.jsx)(`span`,{className:`text-xl font-semibold text-fg`,children:dt.length}),(0,W.jsx)(`span`,{className:`mt-1 block text-xs text-fg-muted`,children:t.connectedSources})]}),(0,W.jsxs)(`button`,{type:`button`,className:`rounded-xl bg-surface-base/80 p-3 text-left`,onClick:()=>Q(`controls`),children:[(0,W.jsx)(`span`,{className:`text-sm font-semibold text-fg`,children:t.trustLevels[w.trust.defaultActionLevel]}),(0,W.jsx)(`span`,{className:`mt-1 block text-xs text-fg-muted`,children:t.currentTrust})]})]})]}),w.insights.length>0?(0,W.jsxs)(`section`,{className:`rounded-2xl border border-accent/15 bg-surface-base p-5`,children:[(0,W.jsxs)(`h2`,{className:`flex items-center gap-2 text-sm font-semibold text-fg`,children:[(0,W.jsx)(b,{className:`size-4 text-accent`,"aria-hidden":!0}),t.insightsTitle]}),(0,W.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:t.insightsHint}),(0,W.jsx)(`div`,{className:`mt-4 grid gap-3 lg:grid-cols-2`,children:w.insights.map(e=>(0,W.jsxs)(`article`,{className:`rounded-xl border border-edge-subtle bg-surface-panel p-4`,children:[(0,W.jsx)(`p`,{className:`text-sm leading-6 text-fg`,children:e.insight}),(0,W.jsx)(`p`,{className:`mt-2 text-xs text-fg-subtle`,children:e.evidenceCount>1?K(t.insightEvidence,e.evidenceCount):t.insightReason}),(0,W.jsxs)(`div`,{className:`mt-3 flex justify-end gap-2`,children:[(0,W.jsx)(R,{type:`button`,variant:`ghost`,className:`h-8 px-2`,disabled:z===`insight:${e.id}`,onClick:()=>void yt(e,`dismiss`),children:t.notNow}),(0,W.jsx)(R,{type:`button`,variant:`primary`,className:`h-8 px-2`,disabled:z===`insight:${e.id}`,onClick:()=>void yt(e,`apply`),children:t.insightActions[e.action]})]})]},e.id))})]}):null,(0,W.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,W.jsxs)(`section`,{ref:st,id:`you-profile-card`,className:`rounded-2xl border border-edge-subtle bg-surface-base p-5`,children:[(0,W.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(`h2`,{className:`flex items-center gap-2 text-sm font-semibold text-fg`,children:[(0,W.jsx)(x,{className:`size-4 text-accent`,"aria-hidden":!0}),t.profileTitle]}),(0,W.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:t.profileHint})]}),Ae?null:(0,W.jsxs)(R,{type:`button`,variant:`ghost`,className:`h-8 px-2`,onClick:Et,children:[(0,W.jsx)(Ce,{className:`size-3.5`,"aria-hidden":!0}),t.edit]})]}),Ae&&Be?(0,W.jsxs)(`div`,{className:`mt-4`,children:[(0,W.jsx)(Ee,{value:Be,onChange:Ve,language:e,inputClassName:G,labels:{callName:t.callName,callNamePlaceholder:t.meetPlaceholder,pronouns:t.pronouns,pronounsPlaceholder:t.pronounsPlaceholder,timezone:t.timezone,timezoneCustom:t.timezoneCustom,timezoneDetect:t.timezoneDetect,custom:t.custom,notes:t.notes,notesPlaceholder:t.notesPlaceholder}}),(0,W.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[(0,W.jsx)(R,{type:`button`,variant:`ghost`,onClick:()=>{Re(!1),Ve(null)},children:t.cancel}),(0,W.jsx)(R,{type:`button`,variant:`primary`,disabled:He,onClick:()=>void Ct(),children:He?t.saving:t.save})]})]}):(0,W.jsxs)(`dl`,{className:`mt-4 grid gap-3 sm:grid-cols-2`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{className:`text-xs text-fg-subtle`,children:t.callName}),(0,W.jsx)(`dd`,{className:`mt-1 text-sm text-fg`,children:Y.callName||`—`})]}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{className:`text-xs text-fg-subtle`,children:t.timezone}),(0,W.jsx)(`dd`,{className:`mt-1 text-sm text-fg`,children:Y.timezone||`—`})]}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{className:`text-xs text-fg-subtle`,children:t.pronouns}),(0,W.jsx)(`dd`,{className:`mt-1 text-sm text-fg`,children:Y.pronouns||`—`})]}),Y.notes?(0,W.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,W.jsx)(`dt`,{className:`text-xs text-fg-subtle`,children:t.notes}),(0,W.jsx)(`dd`,{className:`mt-1 line-clamp-3 text-sm leading-6 text-fg`,children:Y.notes})]}):null]})]}),(0,W.jsxs)(`section`,{className:`rounded-2xl border border-edge-subtle bg-surface-base p-5`,children:[(0,W.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(`h2`,{className:`flex items-center gap-2 text-sm font-semibold text-fg`,children:[(0,W.jsx)(I,{className:`size-4 text-accent`,"aria-hidden":!0}),t.understandingTitle]}),(0,W.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:t.understandingHint})]}),(0,W.jsx)(R,{type:`button`,variant:`ghost`,className:`h-8 px-2`,onClick:()=>Q(`understanding`),children:(0,W.jsx)(d,{className:`size-4`,"aria-hidden":!0})})]}),(0,W.jsxs)(`div`,{className:`mt-4 space-y-2`,children:[lt.slice(0,4).map(e=>(0,W.jsx)(`div`,{className:`rounded-lg bg-surface-panel px-3 py-2.5 text-sm leading-5 text-fg`,children:e.statement},e.id)),lt.length===0?(0,W.jsx)(`p`,{className:`py-5 text-center text-sm text-fg-muted`,children:t.emptyUnderstanding}):null]})]})]}),w.playbooks.length>0?(0,W.jsxs)(`section`,{className:`rounded-2xl border border-edge-subtle bg-surface-base p-5`,children:[(0,W.jsxs)(`h2`,{className:`flex items-center gap-2 text-sm font-semibold text-fg`,children:[(0,W.jsx)(Se,{className:`size-4 text-accent`,"aria-hidden":!0}),t.playbooksTitle]}),(0,W.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:t.playbooksHint}),(0,W.jsx)(`div`,{className:`mt-4 grid gap-3 xl:grid-cols-3`,children:w.playbooks.map(e=>(0,W.jsx)(Le,{playbook:e,busy:z===`playbook:${e.id}`,t,onToggleGroup:()=>void bt(e),onCreate:t=>void xt(e.id,()=>A(e.id,t,(e.rules.at(-1)?.order??0)+10)),onUpdate:(t,n)=>void xt(e.id,()=>xe(e.id,t,n)),onDelete:t=>void xt(e.id,()=>f(e.id,t))},e.id))})]}):null]}):null,w&&h===`understanding`?(0,W.jsxs)(`div`,{id:`you-panel-understanding`,role:`tabpanel`,"aria-labelledby":`you-tab-understanding`,className:`space-y-6`,children:[(0,W.jsx)(`div`,{className:`rounded-xl bg-surface-muted px-4 py-3 text-xs text-fg-muted`,children:t.memoryScope}),(0,W.jsxs)(`section`,{className:`border-b border-edge pb-5`,children:[(0,W.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:t.addUnderstanding}),(0,W.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:t.addUnderstandingHint})]}),ce?null:(0,W.jsxs)(R,{type:`button`,variant:`secondary`,onClick:()=>fe(!0),children:[(0,W.jsx)(ie,{className:`size-4`,"aria-hidden":!0}),t.add]})]}),ce?(0,W.jsxs)(`div`,{className:`mt-3 rounded-xl border border-edge bg-surface-panel p-3`,children:[(0,W.jsx)(`textarea`,{className:o(G,`min-h-24 resize-y`),value:_e,onChange:e=>we(e.target.value),placeholder:t.understandingPlaceholder,autoFocus:!0}),(0,W.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-end justify-between gap-3`,children:[(0,W.jsxs)(`label`,{className:`grid min-w-48 gap-1 text-xs font-medium text-fg-muted`,children:[t.understandingKind,(0,W.jsx)(_,{value:De,onChange:e=>H(e.target.value),children:Object.entries(t.understandingKinds).map(([e,t])=>(0,W.jsx)(he,{value:e,children:t},e))})]}),(0,W.jsxs)(`div`,{className:`flex gap-2`,children:[(0,W.jsx)(R,{type:`button`,variant:`ghost`,onClick:()=>{fe(!1),we(``)},children:t.cancel}),(0,W.jsx)(R,{type:`button`,variant:`primary`,disabled:!_e.trim()||z===`understanding:new`,onClick:()=>void ht(),children:t.add})]})]})]}):null]}),w.conflictGroups.some(e=>e.unresolved)?(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:t.conflictsTitle}),(0,W.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:t.conflictsHint}),(0,W.jsx)(`div`,{className:`mt-3 space-y-3`,children:w.conflictGroups.filter(e=>e.unresolved).map(n=>(0,W.jsx)(`div`,{className:`divide-y divide-edge overflow-hidden rounded-xl border border-warning/35 bg-warning-soft/25`,children:n.records.filter(e=>e.storedStatus!==`archived`&&e.storedStatus!==`rejected`).map(r=>(0,W.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3 px-4 py-3`,children:[(0,W.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,W.jsx)(`p`,{className:`text-sm leading-6 text-fg`,children:r.statement}),(0,W.jsxs)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:[Pe(r,t),` · `,q(r.updatedAt,e)]})]}),(0,W.jsx)(R,{type:`button`,variant:`secondary`,className:`h-8 shrink-0 px-2.5`,disabled:z===`conflict:${n.id}`,onClick:()=>void _t(n.id,r.id),children:t.useThis})]},r.id))},n.id))})]}):null,w.consentRequests.length>0?(0,W.jsxs)(`section`,{className:`space-y-3`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:t.consentTitle}),(0,W.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:t.consentHint})]}),w.consentRequests.map(e=>(0,W.jsxs)(`article`,{className:`rounded-2xl border border-accent/25 bg-accent-soft/20 p-4`,children:[(0,W.jsx)(`p`,{className:`text-sm leading-6 text-fg`,children:e.statement}),(0,W.jsx)(`p`,{className:`mt-2 text-xs text-fg-muted`,children:t.consentPurpose.replace(`{{purpose}}`,e.purpose)}),(0,W.jsxs)(`div`,{className:`mt-3 flex flex-wrap justify-end gap-2`,children:[(0,W.jsx)(R,{type:`button`,variant:`ghost`,disabled:z===`consent:${e.id}`,onClick:()=>void mt(e.id,`deny`),children:t.consentDeny}),(0,W.jsx)(R,{type:`button`,variant:`secondary`,disabled:z===`consent:${e.id}`,onClick:()=>void mt(e.id,`once`),children:t.consentOnce}),(0,W.jsx)(R,{type:`button`,variant:`secondary`,disabled:z===`consent:${e.id}`,onClick:()=>void mt(e.id,`session`),children:t.consentSession}),(0,W.jsx)(R,{type:`button`,variant:`primary`,disabled:z===`consent:${e.id}`,onClick:()=>void mt(e.id,`always`),children:t.consentAlways})]})]},e.id))]}):null,X.length>0?(0,W.jsxs)(`section`,{children:[(0,W.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:t.reviewTitle}),(0,W.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:t.reviewHint})]}),(0,W.jsx)(R,{type:`button`,variant:`secondary`,disabled:z===`understanding:batch`,onClick:()=>void gt(),children:t.reviewAll})]}),(0,W.jsx)(`div`,{className:`mt-3 grid gap-3 lg:grid-cols-2`,children:X.map(n=>(0,W.jsx)(Fe,{item:n,language:e,t,busy:z===n.id,onConfirm:()=>void $(n,`confirm`),onReject:()=>void $(n,`reject`),onUpdate:e=>void $(n,`update`,e),onForget:()=>Oe(n)},n.id))})]}):lt.length>0?(0,W.jsxs)(`div`,{className:`rounded-2xl border border-success/20 bg-success-soft p-6 text-center`,children:[(0,W.jsx)(s,{className:`mx-auto size-5 text-success`,"aria-hidden":!0}),(0,W.jsx)(`h2`,{className:`mt-2 text-sm font-semibold text-fg`,children:t.nothingToReview}),(0,W.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:t.nothingToReviewHint})]}):null,je.map(n=>{let r=ut.get(n)??[];return r.length===0?null:(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:t.facets[n]}),(0,W.jsx)(`div`,{className:`mt-3 grid gap-3 lg:grid-cols-2`,children:r.map(n=>(0,W.jsx)(Fe,{item:n,language:e,t,busy:z===n.id,onConfirm:()=>void $(n,`confirm`),onReject:()=>void $(n,`reject`),onUpdate:e=>void $(n,`update`,e),onForget:()=>Oe(n)},n.id))})]},n)}),w.understanding.length===0?(0,W.jsx)(`div`,{className:`rounded-2xl border border-dashed border-edge p-10 text-center text-sm text-fg-muted`,children:t.emptyUnderstanding}):null]}):null,w&&h===`sources`?(0,W.jsxs)(`div`,{id:`you-panel-sources`,role:`tabpanel`,"aria-labelledby":`you-tab-sources`,className:`space-y-5`,children:[(0,W.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:t.sourcesTitle}),(0,W.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm text-fg-muted`,children:t.sourcesHint})]}),(0,W.jsxs)(R,{type:`button`,variant:`primary`,onClick:()=>n(`/connectors?tab=connected&personalContext=1`),children:[t.manageSources,(0,W.jsx)(d,{className:`size-4`,"aria-hidden":!0})]})]}),w.sourceRecommendations.length>0?(0,W.jsxs)(`section`,{className:`rounded-2xl border border-accent/20 bg-accent-soft/25 p-5`,children:[(0,W.jsxs)(`h2`,{className:`flex items-center gap-2 text-sm font-semibold text-fg`,children:[(0,W.jsx)(g,{className:`size-4 text-accent`,"aria-hidden":!0}),t.recommendationsTitle]}),(0,W.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:t.recommendationsHint}),(0,W.jsx)(`div`,{className:`mt-3 grid gap-2 lg:grid-cols-3`,children:w.sourceRecommendations.map(e=>(0,W.jsxs)(`button`,{type:`button`,className:`rounded-xl border border-edge-subtle bg-surface-panel p-3 text-left hover:border-accent/30 hover:bg-surface-hover`,onClick:()=>pt({id:e.sourceId}),children:[(0,W.jsx)(`span`,{className:`text-sm font-semibold text-fg`,children:e.sourceName}),(0,W.jsx)(`span`,{className:`mt-1 block text-xs leading-5 text-fg-muted`,children:t.recommendationReason.replace(`{{goal}}`,e.goalTitle)})]},e.sourceId))})]}):null,(0,W.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2 xl:grid-cols-3`,children:w.sources.map(n=>(0,W.jsx)(Ie,{source:n,language:e,t,onConfigure:()=>pt(n),onDisconnect:()=>rt(n)},`${n.id}:${n.instanceId??`catalog`}`))}),w.sources.length===0?(0,W.jsx)(`div`,{className:`rounded-2xl border border-dashed border-edge p-8 text-center text-sm text-fg-muted`,children:t.noSources}):null]}):null,w&&h===`controls`&&Z?(0,W.jsxs)(`div`,{id:`you-panel-controls`,role:`tabpanel`,"aria-labelledby":`you-tab-controls`,className:`space-y-6`,children:[(0,W.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-2`,children:[(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:t.controlTitle}),(0,W.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:t.controlHint}),(0,W.jsxs)(`div`,{className:`mt-4 space-y-3 rounded-2xl border border-edge-subtle bg-surface-base p-5`,children:[(0,W.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium text-fg`,children:[t.learningMode,(0,W.jsx)(_,{value:Z.mode,onChange:e=>Ye({...Z,mode:e.target.value}),children:Object.entries(t.learningModes).map(([e,t])=>(0,W.jsx)(he,{value:e,children:t},e))})]}),(0,W.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium text-fg`,children:[t.sensitive,(0,W.jsx)(_,{value:Z.sensitiveWritePolicy,onChange:e=>Ye({...Z,sensitiveWritePolicy:e.target.value}),children:Object.entries(t.sensitiveOptions).map(([e,t])=>(0,W.jsx)(he,{value:e,children:t},e))})]}),(0,W.jsxs)(`div`,{className:`flex items-start gap-2 rounded-xl bg-accent-soft/40 p-3 text-xs leading-5 text-fg-muted`,children:[(0,W.jsx)(j,{className:`mt-0.5 size-4 shrink-0 text-accent`,"aria-hidden":!0}),(0,W.jsx)(`span`,{children:t.transientPromise})]}),(0,W.jsx)(`div`,{className:`flex justify-end pt-2`,children:(0,W.jsx)(R,{type:`button`,variant:`primary`,disabled:Xe,onClick:()=>void Dt(),children:Xe?t.saving:t.save})})]})]}),(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:t.trustTitle}),(0,W.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:t.trustHint}),(0,W.jsx)(`div`,{className:`mt-4 grid gap-2 sm:grid-cols-2`,children:w.trust.levels.map(e=>(0,W.jsxs)(`button`,{type:`button`,"aria-pressed":e===w.trust.defaultActionLevel,disabled:Qe,onClick:()=>e===`auto`?tt(e):void Ot(e),className:o(`rounded-xl border p-3 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 disabled:opacity-70`,e===w.trust.defaultActionLevel?`border-accent/35 bg-accent-soft/35`:`border-edge-subtle bg-surface-panel hover:border-accent/25 hover:bg-surface-hover`),children:[(0,W.jsx)(`p`,{className:`text-xs font-semibold text-fg`,children:t.trustLevels[e]}),(0,W.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:t.trustLevelHints[e]}),e===w.trust.defaultActionLevel?(0,W.jsx)(`span`,{className:`mt-2 inline-block rounded-full bg-accent-soft px-2 py-0.5 text-[11px] text-accent-fg`,children:t.defaultTrust}):null]},e))}),(0,W.jsx)(`p`,{className:`mt-3 text-xs leading-5 text-fg-subtle`,children:t.autoOptInPromise})]})]}),(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:t.grantsTitle}),(0,W.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:t.grantsHint}),w.referenceGrants.length>0?(0,W.jsx)(`div`,{className:`mt-3 divide-y divide-edge overflow-hidden rounded-xl border border-edge bg-surface-panel`,children:w.referenceGrants.map(n=>(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 px-4 py-3`,children:[(0,W.jsxs)(`div`,{className:`min-w-0`,children:[(0,W.jsx)(`p`,{className:`truncate text-sm text-fg`,children:n.statement}),(0,W.jsxs)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:[n.grantScope?t.grantScopes[n.grantScope]:``,n.expiresAt?` · ${q(n.expiresAt,e)}`:``]})]}),(0,W.jsx)(R,{type:`button`,variant:`ghost`,className:`h-8 px-2.5`,disabled:z===`grant:${n.id}`,onClick:()=>void vt(n.id),children:t.revoke})]},n.id))}):(0,W.jsx)(`p`,{className:`mt-3 rounded-xl bg-surface-muted px-4 py-3 text-sm text-fg-muted`,children:t.noGrants})]}),(0,W.jsxs)(`section`,{className:`rounded-2xl border border-edge-subtle bg-surface-base p-5`,children:[(0,W.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:t.transferTitle}),(0,W.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm leading-6 text-fg-muted`,children:t.transferHint}),(0,W.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:[(0,W.jsxs)(R,{type:`button`,variant:`secondary`,disabled:J!==null,onClick:()=>void At(),children:[(0,W.jsx)(se,{className:`size-4`,"aria-hidden":!0}),J===`export`?t.exporting:t.exportAction]}),(0,W.jsxs)(R,{type:`button`,variant:`secondary`,disabled:J!==null,onClick:()=>ct.current?.click(),children:[(0,W.jsx)(m,{className:`size-4`,"aria-hidden":!0}),J===`import`?t.importing:t.importAction]}),(0,W.jsx)(`input`,{ref:ct,type:`file`,accept:`application/json,.json`,className:`sr-only`,onChange:e=>void jt(e.target.files?.[0])})]}),(0,W.jsx)(`p`,{className:`mt-3 text-xs leading-5 text-fg-subtle`,children:t.importPromise})]})]}):null,(0,W.jsx)(be,{open:U!==null,title:t.forgetTitle,description:t.forgetBody,confirmLabel:t.forget,cancelLabel:t.cancel,destructive:!0,onConfirm:()=>void St(),onCancel:()=>Oe(null)}),(0,W.jsx)(be,{open:et===`auto`,title:t.autoConfirmTitle,description:t.autoConfirmBody,confirmLabel:t.autoConfirmAction,cancelLabel:t.cancel,onConfirm:()=>void Ot(`auto`),onCancel:()=>tt(null)}),(0,W.jsx)(ke,{source:nt,language:e,busy:it,onOpenChange:e=>{e||rt(null)},onConfirm:e=>void kt(e)})]})}export{Be as UserContextPage};
@@ -1 +0,0 @@
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"./chunk-QUQL4437-DXsxWP7r.js";import{t as a}from"./cn-BQ_8x0bT.js";import{d as o,i as s,o as c}from"./locale-store-BneNAR8R.js";import{o as l}from"./vendor-swr-BIWyz7Rc.js";import{Go as u,Gt as d,Kt as f,Ol as p,Un as m,hs as h,ic as g,io as _,ms as v,os as y,qo as b,ro as x,tu as ee,zc as te}from"./index-CH7XN6KY.js";var S=`/api/image/providers`;async function ne(){return(await s(o(`/api/image/providers`)))?.payload?.providers??[]}var C=e(t(),1),re=n();function w(){return{apiKey:``,region:``,baseUrl:``,imageBaseUrl:``}}function ie(e){return e?.apiKey?`••••••••••••`:``}function T(e,t){let n=(()=>{if(!e||typeof e!=`object`||!(`providersConfig`in e))return;let t=e.providersConfig;if(!(!t||typeof t!=`object`||Array.isArray(t)))return t})(),r={};for(let e of t){let t=n?.[e];r[e]={apiKey:ie(t),region:t?.region??``,baseUrl:t?.baseUrl??``,imageBaseUrl:t?.imageBaseUrl??``}}return r}function E(e,t,n){let r=e[n].trim();if(r!==t[n].trim())return r||null}function D(e,t){let n=e.trim(),r=t.trim();if(n!==r&&!(m(n)&&m(r)))return n||(r?null:void 0)}function O(e,t,n){let r={};for(let i of e){let e=t[i]??w(),a=n[i]??w();if(JSON.stringify(e)===JSON.stringify(a))continue;let o={},s=D(e.apiKey,a.apiKey);s!==void 0&&(o.apiKey=s);let c=E(e,a,`region`);c!==void 0&&(o.region=c);let l=E(e,a,`baseUrl`);l!==void 0&&(o.baseUrl=l);let u=E(e,a,`imageBaseUrl`);u!==void 0&&(o.imageBaseUrl=u),Object.keys(o).length>0&&(r[i]=o)}return r}async function k(e){let t=await s(o(`/api/image/providers/${encodeURIComponent(e)}/reveal-api-key`),{method:`POST`,headers:{"Content-Type":`application/json`},body:`{}`});if(!t.ok||!t.payload)throw Error(t.error?.message??`Reveal failed`);return t.payload}async function A(e){Object.keys(e).length!==0&&(await s(o(`/api/config`),{method:`PATCH`,body:JSON.stringify({providersConfig:e})}),await x())}var j=r();function ae(e){let t=(0,re.c)(18),{providerId:n,value:r,onChange:i,labels:a,apiKeyLinks:o,apiKeyLinkLabels:s}=e,c;t[0]===n?c=t[1]:(c=()=>k(n).then(M),t[0]=n,t[1]=c);let l=c,u=`img-cred-key-${n}`,d;t[2]!==a.apiKeyLabel||t[3]!==u?(d=(0,j.jsx)(`label`,{className:`text-xs font-medium text-fg-muted`,htmlFor:u,children:a.apiKeyLabel}),t[2]=a.apiKeyLabel,t[3]=u,t[4]=d):d=t[4];let m;t[5]!==s||t[6]!==o?(m=o.length>0?(0,j.jsx)(`div`,{className:`flex flex-col gap-1`,children:o.map(e=>(0,j.jsxs)(`a`,{href:e.href,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex w-fit items-center gap-1 text-xs font-medium text-accent-fg hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[f(e.kind,s),(0,j.jsx)(p,{className:`size-3`,"aria-hidden":!0})]},`${e.kind}-${e.href}`))}):null,t[5]=s,t[6]=o,t[7]=m):m=t[7];let h=`img-cred-key-${n}`,g;t[8]!==a||t[9]!==i||t[10]!==l||t[11]!==h||t[12]!==r?(g=(0,j.jsx)(y,{id:h,value:r,onChange:i,placeholder:a.optionalPlaceholder,labels:a,reveal:l,loadFailedLabel:a.loadFailed,maskedHelp:a.maskedHelp,notInConfigFile:a.notInConfigFile}),t[8]=a,t[9]=i,t[10]=l,t[11]=h,t[12]=r,t[13]=g):g=t[13];let _;return t[14]!==d||t[15]!==m||t[16]!==g?(_=(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1 sm:col-span-2`,children:[d,m,g]}),t[14]=d,t[15]=m,t[16]=g,t[17]=_):_=t[17],_}function M(e){return e.apiKey??null}function N(){return a(`w-full rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm text-fg`,`placeholder:text-fg-subtle`,v)}function oe(){return a(N(),`appearance-none bg-[length:1rem] bg-[right_0.5rem_center] bg-no-repeat pr-9`)}var P=`__custom__`;function se(e,t){if(!e.region.trim()&&!e.imageBaseUrl.trim())return``;let n=e.region.trim().toLowerCase();return t.some(e=>e.value===n)?n:P}function ce(e,t){let n=e.baseUrl.trim().replace(/\/+$/,``);if(!n)return``;let r=t.map(e=>e.value.replace(/\/+$/,``)).indexOf(n);return r>=0?t[r].value:P}function le(e,t,n){return t===`beijing`?e.dashscopeRegion_beijing:t===`singapore`?e.dashscopeRegion_singapore:t===`us`?e.dashscopeRegion_us:n}function ue(e,t){return t===`minimax`?e.minimaxClusterLabel:t===`fal`?e.falQueueBaseLabel:e.baseUrlLabel}function de(e,t){return t===`minimax`?e.minimaxClusterHint:t===`fal`?e.falQueueBaseHint:null}function fe(e,t){return JSON.stringify(e)!==JSON.stringify(t)}function pe(e,t){return t===1?e.modelCountOne:e.modelCountMany.replace(`{count}`,String(t))}function me(e){let t=(0,re.c)(76),{summaries:n,credDraft:r,credBaseline:o,credDirty:s,credSaving:c,credError:l,credSavedFlash:f,credNoopFlash:m,updateCredRow:_,onDiscardCredentials:v,onSaveCredentials:y,extensionIds:x,showExtensionLinks:S,showImageModelsLink:ne,hideActions:ie,language:T,apiKeyLinkLabels:E,messages:D}=e,O=ie===void 0?!1:ie,k;t[0]===n?k=t[1]:(k=n.some(ye),t[0]=n,t[1]=k);let A=k,M;t[2]===n?M=t[3]:(M=n.some(ve),t[2]=n,t[3]=M);let me=M,[F,be]=(0,C.useState)(_e),[I,L]=(0,C.useState)(ge),R;if(t[4]!==o||t[5]!==r||t[6]!==n){R=new Set;for(let e of n)fe(r[e.id]??w(),o[e.id]??w())&&R.add(e.id);t[4]=o,t[5]=r,t[6]=n,t[7]=R}else R=t[7];let z=R,B;t[8]!==z||t[9]!==I||t[10]!==F?(B=e=>I.has(e)?!1:F.has(e)?!0:z.has(e),t[8]=z,t[9]=I,t[10]=F,t[11]=B):B=t[11];let V=B,H;t[12]===V?H=t[13]:(H=e=>{if(V(e)){L(t=>new Set(t).add(e)),be(t=>{let n=new Set(t);return n.delete(e),n});return}L(t=>{let n=new Set(t);return n.delete(e),n}),be(t=>new Set(t).add(e))},t[12]=V,t[13]=H);let U=H;if(n.length===0)return null;let W;t[14]===D.credentialsIntro?W=t[15]:(W=(0,j.jsx)(`p`,{children:D.credentialsIntro}),t[14]=D.credentialsIntro,t[15]=W);let G;t[16]!==A||t[17]!==D.regionHint?(G=A?(0,j.jsx)(`p`,{className:`text-fg-subtle`,children:D.regionHint}):null,t[16]=A,t[17]=D.regionHint,t[18]=G):G=t[18];let K;t[19]!==me||t[20]!==D.endpointPresetsHint?(K=me?(0,j.jsx)(`p`,{className:`text-fg-subtle`,children:D.endpointPresetsHint}):null,t[19]=me,t[20]=D.endpointPresetsHint,t[21]=K):K=t[21];let q;t[22]!==ne||t[23]!==D.imageModelsLinkTitle||t[24]!==D.openImageModelsPage?(q=ne?(0,j.jsx)(`p`,{children:(0,j.jsx)(i,{to:`/settings/credentials?tab=image-models`,className:`font-medium text-accent hover:underline`,title:D.imageModelsLinkTitle,children:D.openImageModelsPage})}):null,t[22]=ne,t[23]=D.imageModelsLinkTitle,t[24]=D.openImageModelsPage,t[25]=q):q=t[25];let J;t[26]!==W||t[27]!==G||t[28]!==K||t[29]!==q?(J=(0,j.jsxs)(`div`,{className:`flex flex-col gap-1 text-xs leading-relaxed text-fg-muted`,children:[W,G,K,q]}),t[26]=W,t[27]=G,t[28]=K,t[29]=q,t[30]=J):J=t[30];let Y;t[31]===l?Y=t[32]:(Y=l?(0,j.jsx)(`div`,{className:`rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-700 dark:text-red-300`,children:l}):null,t[31]=l,t[32]=Y);let X;t[33]!==s||t[34]!==m||t[35]!==f||t[36]!==c||t[37]!==O||t[38]!==v||t[39]!==y||t[40]!==D.credentialsNothingToSave||t[41]!==D.credentialsSaved||t[42]!==D.discardCredentials||t[43]!==D.saveCredentials||t[44]!==D.savingCredentials?(X=O?null:(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[f?(0,j.jsx)(`span`,{className:`text-sm text-fg-muted`,children:D.credentialsSaved}):null,m?(0,j.jsx)(`span`,{className:`text-sm text-fg-muted`,children:D.credentialsNothingToSave}):null,(0,j.jsx)(h,{type:`button`,variant:`secondary`,onClick:v,disabled:!s||c,children:D.discardCredentials}),(0,j.jsx)(h,{type:`button`,variant:`primary`,onClick:y,disabled:!s||c,children:c?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(te,{className:`size-3.5 animate-spin`}),(0,j.jsx)(`span`,{className:`ml-1.5`,children:D.savingCredentials})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(g,{className:`size-3.5`}),(0,j.jsx)(`span`,{className:`ml-1.5`,children:D.saveCredentials})]})})]}),t[33]=s,t[34]=m,t[35]=f,t[36]=c,t[37]=O,t[38]=v,t[39]=y,t[40]=D.credentialsNothingToSave,t[41]=D.credentialsSaved,t[42]=D.discardCredentials,t[43]=D.saveCredentials,t[44]=D.savingCredentials,t[45]=X):X=t[45];let Z;if(t[46]!==E||t[47]!==o||t[48]!==r||t[49]!==x||t[50]!==V||t[51]!==T||t[52]!==S||t[53]!==n||t[54]!==D||t[55]!==U||t[56]!==_){let e;t[58]!==E||t[59]!==o||t[60]!==r||t[61]!==x||t[62]!==V||t[63]!==T||t[64]!==S||t[65]!==D||t[66]!==U||t[67]!==_?(e=e=>{let t=r[e.id]??w(),n=e.ui,s=S&&x.has(e.id)?`/settings/ext/${encodeURIComponent(e.id)}`:null,c=fe(t,o[e.id]??w()),l=V(e.id),f=e.label??e.id,m=pe(D,e.models.length);return(0,j.jsxs)(`section`,{className:a(`overflow-hidden rounded-xl bg-surface-panel/80 shadow-surface transition-colors`,c&&`ring-1 ring-accent/50`),children:[(0,j.jsxs)(`button`,{type:`button`,className:`flex w-full items-start justify-between gap-3 px-4 py-3 text-left hover:bg-surface-hover/70`,"aria-expanded":l,"aria-controls":`img-provider-credentials-${e.id}`,onClick:()=>U(e.id),children:[(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`truncate text-sm font-semibold text-fg`,children:f}),(0,j.jsx)(`span`,{className:`rounded-full bg-surface-subtle px-2 py-0.5 text-[11px] font-medium text-fg-muted`,children:e.id}),c?(0,j.jsx)(`span`,{className:`rounded-full bg-accent-soft px-2 py-0.5 text-[11px] font-medium text-accent-fg`,children:D.unsavedChanges}):null,e.configured?(0,j.jsx)(`span`,{className:`rounded-full bg-accent-soft px-2 py-0.5 text-[11px] font-medium text-accent-fg`,children:D.configured}):(0,j.jsx)(`span`,{className:`rounded-full border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-[11px] font-medium text-amber-700 dark:text-amber-300`,children:D.missingKey})]}),(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 text-xs text-fg-subtle`,children:[(0,j.jsx)(`span`,{children:m}),e.defaultModel?(0,j.jsxs)(`span`,{className:`min-w-0 truncate`,children:[(0,j.jsxs)(`span`,{className:`text-fg-muted`,children:[D.defaultModel,`:`]}),` `,e.id,`/`,e.defaultModel]}):null]})]}),(0,j.jsx)(ee,{className:a(`mt-0.5 size-4 shrink-0 text-fg-subtle transition-transform`,l?`rotate-180`:`rotate-0`),"aria-hidden":`true`}),(0,j.jsx)(`span`,{className:`sr-only`,children:l?D.collapseProvider:D.expandProvider})]}),l?(0,j.jsxs)(`div`,{id:`img-provider-credentials-${e.id}`,className:`bg-surface-base/45 px-4 py-4`,children:[s?(0,j.jsxs)(i,{to:s,className:`mb-3 inline-flex items-center gap-1 text-xs font-medium text-accent hover:underline`,title:D.extensionSettingsLinkTitle,children:[(0,j.jsx)(p,{className:`size-3`}),D.openExtensionSettings]}):null,e.models.length>0?(0,j.jsxs)(`p`,{className:`mb-3 text-xs leading-relaxed text-fg-subtle`,children:[(0,j.jsxs)(`span`,{className:`text-fg-muted`,children:[D.modelsLabel,`:`]}),` `,e.models.map(t=>`${e.id}/${t}`).join(`, `)]}):null,(0,j.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,j.jsx)(ae,{providerId:e.id,value:t.apiKey,onChange:t=>_(e.id,{apiKey:t}),apiKeyLinks:d(e.id,T),apiKeyLinkLabels:E,labels:{apiKeyLabel:D.apiKeyLabel,optionalPlaceholder:D.optionalPlaceholder,maskedHelp:D.apiKeyMaskedHelp,copy:D.apiKeyCopy,copied:D.apiKeyCopied,show:D.apiKeyShow,hide:D.apiKeyHide,notInConfigFile:D.apiKeyNotInConfigFile,loadFailed:D.apiKeyRevealFailed}}),n?.regions?.length?(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1 sm:col-span-2`,children:[(0,j.jsx)(`label`,{className:`text-xs font-medium text-fg-muted`,htmlFor:`img-cred-region-preset-${e.id}`,children:D.regionLabel}),(0,j.jsxs)(u,{id:`img-cred-region-preset-${e.id}`,className:oe(),value:se(t,n.regions),onChange:t=>{let r=t.target.value;if(r===``){_(e.id,{region:``,imageBaseUrl:``});return}if(r===P){_(e.id,{region:``,imageBaseUrl:``});return}let i=n.regions.find(e=>e.value===r);i&&_(e.id,{region:i.value,imageBaseUrl:i.imageBaseUrl})},children:[(0,j.jsx)(b,{value:``,children:D.regionPresetDefault}),n.regions.map(e=>(0,j.jsx)(b,{value:e.value,children:le(D,e.value,e.label)},e.value)),(0,j.jsx)(b,{value:P,children:D.regionPresetCustom})]}),se(t,n.regions)===P?(0,j.jsxs)(`div`,{className:`mt-2 grid gap-2 sm:grid-cols-2`,children:[(0,j.jsx)(`input`,{type:`text`,className:N(),value:t.region,placeholder:`region`,onChange:t=>_(e.id,{region:t.target.value})}),(0,j.jsx)(`input`,{type:`url`,className:N(),value:t.imageBaseUrl,placeholder:D.imageBaseUrlLabel,onChange:t=>_(e.id,{imageBaseUrl:t.target.value})})]}):null]}):null,n?.baseUrlPresets?.length?(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1 sm:col-span-2`,children:[(0,j.jsx)(`label`,{className:`text-xs font-medium text-fg-muted`,htmlFor:`img-cred-base-preset-${e.id}`,children:ue(D,n.baseUrlPresetKind)}),de(D,n.baseUrlPresetKind)?(0,j.jsx)(`p`,{className:`text-[11px] text-fg-subtle`,children:de(D,n.baseUrlPresetKind)}):null,(0,j.jsxs)(u,{id:`img-cred-base-preset-${e.id}`,className:oe(),value:ce(t,n.baseUrlPresets),onChange:t=>{let n=t.target.value;if(n===``){_(e.id,{baseUrl:``});return}if(n===P){_(e.id,{baseUrl:``});return}_(e.id,{baseUrl:n.replace(/\/+$/,``)})},children:[(0,j.jsx)(b,{value:``,children:D.baseUrlPresetDefault}),n.baseUrlPresets.map(he),(0,j.jsx)(b,{value:P,children:D.baseUrlPresetCustom})]}),ce(t,n.baseUrlPresets)===P?(0,j.jsx)(`input`,{type:`url`,className:a(N(),`mt-2`),value:t.baseUrl,placeholder:`https://…`,onChange:t=>_(e.id,{baseUrl:t.target.value})}):null]}):null,n?.regions?.length&&se(t,n.regions)!==P?(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1 sm:col-span-2`,children:[(0,j.jsx)(`label`,{className:`text-xs font-medium text-fg-muted`,htmlFor:`img-cred-imgbase-ro-${e.id}`,children:D.imageBaseUrlLabel}),(0,j.jsx)(`input`,{id:`img-cred-imgbase-ro-${e.id}`,type:`url`,readOnly:!0,className:a(N(),`cursor-not-allowed opacity-90`),value:t.imageBaseUrl,title:D.imageBaseUrlPresetHint}),(0,j.jsx)(`p`,{className:`text-[11px] text-fg-subtle`,children:D.imageBaseUrlPresetHint})]}):null]})]}):null]},e.id)},t[58]=E,t[59]=o,t[60]=r,t[61]=x,t[62]=V,t[63]=T,t[64]=S,t[65]=D,t[66]=U,t[67]=_,t[68]=e):e=t[68],Z=n.map(e),t[46]=E,t[47]=o,t[48]=r,t[49]=x,t[50]=V,t[51]=T,t[52]=S,t[53]=n,t[54]=D,t[55]=U,t[56]=_,t[57]=Z}else Z=t[57];let Q;t[69]===Z?Q=t[70]:(Q=(0,j.jsx)(`div`,{className:`flex flex-col gap-4`,children:Z}),t[69]=Z,t[70]=Q);let $;return t[71]!==J||t[72]!==Y||t[73]!==X||t[74]!==Q?($=(0,j.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[J,Y,X,Q]}),t[71]=J,t[72]=Y,t[73]=X,t[74]=Q,t[75]=$):$=t[75],$}function he(e){return(0,j.jsx)(b,{value:e.value,children:e.label},e.value)}function ge(){return new Set}function _e(){return new Set}function ve(e){return(e.ui?.baseUrlPresets?.length??0)>0}function ye(e){return(e.ui?.regions?.length??0)>0}function F(e){let t=_(c(e=>!!e.token)),n=t.data,r=(0,C.useMemo)(()=>e.map(e=>e.id),[e]),i=(0,C.useRef)(!1),[a,s]=(0,C.useState)(null),[u,d]=(0,C.useState)(!1),[f,p]=(0,C.useState)(null),[m,h]=(0,C.useState)(!1),[g,v]=(0,C.useState)(!1),y=(0,C.useMemo)(()=>T(n?.payload?.config,r),[n?.payload?.config,r]),b=a??y,x=y;return{gwSwr:t,credDraft:b,credBaseline:x,credDirty:(0,C.useMemo)(()=>JSON.stringify(b)!==JSON.stringify(x),[b,x]),credSaving:u,credError:f,credSavedFlash:m,credNoopFlash:g,updateCredRow:(0,C.useCallback)((e,t)=>{i.current=!0,s(n=>{let r=n??y,i=r[e]??w();return{...r,[e]:{...i,...t}}})},[y]),onDiscardCredentials:(0,C.useCallback)(()=>{i.current=!1,s(null),p(null),h(!1),v(!1)},[]),saveCredentials:(0,C.useCallback)(async e=>{let n=O(r,b,x);if(Object.keys(n).length===0){v(!0),window.setTimeout(()=>v(!1),2200);return}d(!0),p(null),h(!1);try{await A(n),await t.mutate?.(),l(o(S)),i.current=!1,s(null),h(!0),window.setTimeout(()=>h(!1),2e3)}catch(t){p(t instanceof Error?t.message:e)}finally{d(!1)}},[r,b,x,t])}}function be(){return{enabled:!0,provider:`xopc-local`,alibaba:{model:`paraformer-v2`},openai:{model:`whisper-1`},providers:{"xopc-local":{model:`sensevoice-small`}},fallback:{enabled:!1,order:[`xopc-local`]}}}function I(){return{enabled:!0,provider:`edge`,trigger:`inbound`,maxTextLength:512,timeoutMs:6e4,alibaba:{model:`qwen-tts`,voice:`Cherry`},openai:{model:`tts-1`,voice:`alloy`},edge:{voice:`zh-CN-XiaoxiaoNeural`,lang:`zh-CN`},minimax:{model:`speech-2.8-hd`,voice:`male-qn-qingse`},"tts-local-cli":{command:``,outputFormat:`wav`}}}function L(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function R(e){return typeof e==`string`&&e.trim().length>0?e.trim():`xopc-local`}function z(e,t,n){let r=L(e.providers)?e.providers:void 0,i=r&&L(r[t])?r[t]:void 0;return{...n,...i??{}}}function B(e){let t=be();if(!L(e))return t;let n=R(e.provider),r=z(e,`alibaba`,t.alibaba??{}),i=z(e,`openai`,t.openai??{}),a=t.fallback??{enabled:!1,order:[`xopc-local`]};if(L(e.fallback)){let t=Array.isArray(e.fallback.order)?e.fallback.order.filter(e=>typeof e==`string`&&e.trim().length>0):a.order;a={enabled:typeof e.fallback.enabled==`boolean`?e.fallback.enabled:a.enabled,order:t.length?t:a.order}}let o=L(e.providers)?Object.fromEntries(Object.entries(e.providers).map(([e,t])=>[e,L(t)?{...t}:{}])):void 0;return{enabled:!!e.enabled,provider:n,alibaba:r,openai:i,...o?{providers:o}:{},fallback:a}}function V(e){return typeof e==`string`&&e.trim().length>0?e.trim():`edge`}function H(e){let t=I();if(!L(e))return t;let n=V(e.provider),r=e.trigger===`off`||e.trigger===`always`||e.trigger===`inbound`||e.trigger===`tagged`?e.trigger:`inbound`,i=t[`tts-local-cli`]??{},a=L(e.providers)?Object.fromEntries(Object.entries(e.providers).map(([e,t])=>[e,L(t)?{...t}:{}])):void 0;return{enabled:!!e.enabled,provider:n,trigger:r,maxTextLength:typeof e.maxTextLength==`number`&&Number.isFinite(e.maxTextLength)?e.maxTextLength:t.maxTextLength,timeoutMs:typeof e.timeoutMs==`number`&&Number.isFinite(e.timeoutMs)?e.timeoutMs:t.timeoutMs,...a?{providers:a}:{},alibaba:z(e,`alibaba`,t.alibaba??{}),openai:z(e,`openai`,t.openai??{}),edge:z(e,`edge`,t.edge??{}),minimax:z(e,`minimax`,t.minimax??{}),"tts-local-cli":z(e,`tts-local-cli`,i)}}function U(e){let{alibaba:t,openai:n,providers:r,...i}=e,a={...r??{}};return t&&(a.alibaba={...a.alibaba??{},...t}),n&&(a.openai={...a.openai??{},...n}),{...i,...Object.keys(a).length>0?{providers:a}:{}}}function W(e){let{alibaba:t,openai:n,edge:r,minimax:i,"tts-local-cli":a,providers:o,...s}=e,c={...o??{}};return t&&(c.alibaba={...c.alibaba??{},...t}),n&&(c.openai={...c.openai??{},...n}),r&&(c.edge={...c.edge??{},...r}),i&&(c.minimax={...c.minimax??{},...i}),a&&(c[`tts-local-cli`]={...c[`tts-local-cli`]??{},...a}),{...s,...Object.keys(c).length>0?{providers:c}:{}}}function G(e){let t=L(e)?e:{},n=L(t.voice)?t.voice:{},r=L(n.input)?n.input:{},i=L(r.refinement)?r.refinement:{},a=i.mode===`punctuation`||i.mode===`light`||i.mode===`custom`?i.mode:`off`;return{stt:B(t.stt),tts:H(t.tts),voice:{languageMode:n.languageMode===`manual`?`manual`:`auto`,language:n.language===`zh`?`zh`:`en`,input:{refinement:{mode:a,...typeof i.model==`string`&&i.model.trim()?{model:i.model.trim()}:{},...typeof i.customInstruction==`string`?{customInstruction:i.customInstruction}:{}}}}}}async function K(){return G((await s(o(`/api/config`))).payload?.config??{})}async function q(e){await s(o(`/api/config`),{method:`PATCH`,body:JSON.stringify({stt:U(e.stt),tts:W(e.tts),voice:e.voice})}),e.voice.languageMode===`auto`&&await s(o(`/api/voice/language`),{method:`POST`,body:JSON.stringify({language:e.voice.language})}),typeof window<`u`&&window.dispatchEvent(new Event(`voice-config-changed`)),x()}async function J(){let e=await s(o(`/api/voice/models`));if(!e.payload?.models)throw Error(`Missing voice models payload`);return e.payload.models}async function Y(){let e=await s(o(`/api/voice/providers`));if(!e.payload?.providers)throw Error(`Missing voice providers payload`);return e.payload}async function X(){let e=await s(o(`/api/voice/stt-providers`));if(!e.payload?.providers)throw Error(`Missing STT providers payload`);return e.payload}async function Z(){let e=await s(o(`/api/voice/local/status`));if(!e.payload)throw Error(`Missing local voice status payload`);return e.payload}async function Q(e){await s(o(`/api/voice/local/models/${encodeURIComponent(e)}/install`),{method:`POST`,body:`{}`})}async function $(e){await s(o(`/api/voice/local/models/${encodeURIComponent(e)}`),{method:`DELETE`})}async function xe(e){let t=await s(o(`/api/voice/tts-test`),{method:`POST`,body:JSON.stringify(e)});if(t.ok===!1){let e=typeof t.error==`string`?t.error:t.error?.message;throw Error(e||`TTS test failed`)}if(!t.payload||typeof t.payload.audio!=`string`||!t.payload.audio.trim())throw Error(`TTS test returned no audio. Check the selected voice engine and try again.`);return t.payload}async function Se(e){let t=await s(o(`/api/voice/reveal-api-key`),{method:`POST`,body:JSON.stringify(e)});if(!t.payload)throw Error(`Missing reveal payload`);return t.payload}function Ce(e){let t=(0,re.c)(15),{kind:n,providerId:r,fieldId:i,value:o,onChange:s,labels:c,placeholder:l,className:u}=e,d=l===void 0?`sk-...`:l,f;t[0]!==n||t[1]!==r?(f=()=>Se({kind:n,provider:r}).then(we),t[0]=n,t[1]=r,t[2]=f):f=t[2];let p=f,m;t[3]===u?m=t[4]:(m=a(`flex min-w-0 flex-col gap-1.5`,u),t[3]=u,t[4]=m);let h;t[5]!==i||t[6]!==c||t[7]!==s||t[8]!==d||t[9]!==p||t[10]!==o?(h=(0,j.jsx)(y,{id:i,value:o,onChange:s,placeholder:d,labels:c,reveal:p,loadFailedLabel:c.loadFailed,maskedHelp:c.maskedHelp,notInConfigFile:c.notInConfigFile,inputClassName:`text-xs`}),t[5]=i,t[6]=c,t[7]=s,t[8]=d,t[9]=p,t[10]=o,t[11]=h):h=t[11];let g;return t[12]!==m||t[13]!==h?(g=(0,j.jsx)(`div`,{className:m,children:h}),t[12]=m,t[13]=h,t[14]=g):g=t[14],g}function we(e){return e.apiKey??null}export{K as a,G as c,xe as d,F as f,S as h,Y as i,q as l,ne as m,Z as n,X as o,me as p,J as r,Q as s,Ce as t,$ as u};
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,t as n}from"./vendor-react-BOUWij0V.js";import{d as r,l as i}from"./chunk-QUQL4437-DXsxWP7r.js";import{t as a}from"./check-BODqo66o.js";import{t as o}from"./messages-t1yPaVCt.js";import{n as ee}from"./locale-store-BneNAR8R.js";import{$l as s,At as c,Bl as l,Bt as u,Et as d,Ft as f,Ht as te,It as ne,Lt as p,Rt as m,Sl as h,Ut as g,Vt as re,Ys as _,ao as v,gs as ie,hs as y,ml as b,tu as ae,vl as x,ys as S,zc as C,zt as oe}from"./index-CH7XN6KY.js";var w=e(t(),1),T=n(),E=[`folder_structure`,`recent_progress`,`next_steps`];function D(e){return e instanceof Error?e.message:String(e)}function O(){let e=ee(e=>e.language),t=o(e).onboarding.workDiscovery,n=o(e).chat.workingDirectory,O=i(),[se]=r(),k=se.get(`new`)===`1`,[A,j]=(0,w.useState)(`loading`),[M,N]=(0,w.useState)(null),[P,F]=(0,w.useState)(null),[I,L]=(0,w.useState)(!1),[R,z]=(0,w.useState)(null),[B,V]=(0,w.useState)(!1),[H,U]=(0,w.useState)(``),[W,G]=(0,w.useState)(!1),K=(0,w.useCallback)(e=>{F(e),e.status===`completed`?j(e.feedback?.recognitionDecision===`confirmed`?`recommendation`:`recognition`):e.status===`failed`||e.status===`canceled`?j(`error`):j(`running`)},[]),q=c({onPicked:(0,w.useCallback)(async e=>{L(!0),z(null);try{N(await oe(e)),j(`consent`)}catch(e){z(D(e)),j(`intro`)}finally{L(!1)}},[])});(0,w.useEffect)(()=>{let e=!1;return p().then(async({enabled:t,state:n})=>{if(!e){if(!t){O(`/chat`,{replace:!0});return}if(!k&&n.activeRunId)try{let t=await m(n.activeRunId);e||K(t);return}catch{}e||j(`intro`)}}).catch(t=>{e||(z(D(t)),j(`intro`))}),()=>{e=!0}},[K,O,k]),(0,w.useEffect)(()=>{if(!P||A!==`running`)return;let e=!1,t=async()=>{try{let t=await m(P.id);e||K(t)}catch{}},n=window.setInterval(()=>void t(),1200),r=e=>{let n=e.detail;(!n?.runId||n.runId===P.id)&&t()};for(let e of[`work-discovery-progress`,`work-discovery-completed`,`work-discovery-failed`,`work-discovery-canceled`])window.addEventListener(e,r);return()=>{e=!0,window.clearInterval(n);for(let e of[`work-discovery-progress`,`work-discovery-completed`,`work-discovery-failed`,`work-discovery-canceled`])window.removeEventListener(e,r)}},[K,A,P]);let J=async()=>{L(!0);try{await ne()}finally{O(`/chat`,{replace:!0})}},ce=async()=>{if(M){L(!0),z(null);try{K(await te(M.canonicalRootPath))}catch(e){z(D(e)),j(`consent`)}finally{L(!1)}}},Y=(e,t)=>{let n=t?`?draft=${encodeURIComponent(t)}`:``;O(`/chat/${encodeURIComponent(e)}${n}`)},X=async(t,n)=>{if(!P)return;await re(P.id,t.id).catch(()=>{});let r=n?`${e===`zh`?`先帮我评估这个方向,不要修改文件:`:`First assess this direction without changing files:`}\n\n${t.actionPrompt}`:t.actionPrompt;Y(P.sessionKey,r)},le=async()=>{if(P){L(!0),z(null);try{F(await g(P.id,`confirmed`)),j(`recommendation`)}catch(e){z(D(e))}finally{L(!1)}}},Z=async e=>{if(!(!P||!H.trim())){L(!0),z(null);try{let t=await g(P.id,e,H.trim());F(t),Y(t.sessionKey,H.trim())}catch(e){z(D(e)),L(!1)}}},ue=async()=>{if(P){L(!0);try{Y((await g(P.id,`dismissed`)).sessionKey)}catch(e){z(D(e)),L(!1)}}},Q=P?.result?.suggestions.find(e=>e.id===P.result?.primarySuggestionId)??P?.result?.suggestions[0],$=P?.result?.suggestions.filter(e=>e.id!==Q?.id)??[];return(0,T.jsxs)(`div`,{className:`flex min-h-full flex-1 flex-col bg-surface-base`,children:[(0,T.jsxs)(`main`,{className:`mx-auto flex w-full max-w-[40rem] flex-1 flex-col px-5 py-10 sm:px-8 sm:py-16`,children:[(0,T.jsx)(`div`,{className:`mb-10 flex items-center justify-center`,children:(0,T.jsx)(ie,{className:`size-11`})}),A===`loading`?(0,T.jsxs)(`div`,{className:`space-y-5`,"aria-busy":!0,children:[(0,T.jsx)(v,{className:`mx-auto h-8 w-64`}),(0,T.jsx)(v,{className:`mx-auto h-4 w-full max-w-lg`}),(0,T.jsx)(v,{className:`mx-auto h-4 w-4/5 max-w-md`}),(0,T.jsx)(v,{className:`mt-8 h-12 w-full rounded-xl`})]}):null,A===`intro`?(0,T.jsxs)(`section`,{className:`flex flex-1 flex-col text-center`,"aria-labelledby":`work-discovery-title`,children:[(0,T.jsxs)(`div`,{className:`mx-auto max-w-[36rem]`,children:[(0,T.jsx)(`h1`,{id:`work-discovery-title`,className:`text-2xl font-semibold tracking-tight text-fg`,children:t.title}),(0,T.jsx)(`p`,{className:`mx-auto mt-3 max-w-[34rem] text-[0.95rem] leading-7 text-fg-muted`,children:t.subtitle})]}),(0,T.jsxs)(`div`,{className:`mx-auto mt-9 w-full max-w-md`,children:[(0,T.jsxs)(y,{type:`button`,className:`h-12 w-full gap-2 bg-accent text-white hover:bg-accent-hover`,onClick:q.pick,disabled:I||q.picking,children:[I||q.picking?(0,T.jsx)(C,{className:`size-4 animate-spin`}):(0,T.jsx)(x,{className:`size-4`}),t.chooseFolder]}),(0,T.jsxs)(`div`,{className:`mt-4 flex items-start justify-center gap-2 text-xs leading-5 text-fg-muted`,children:[(0,T.jsx)(_,{className:`mt-0.5 size-4 shrink-0 text-accent-fg`}),(0,T.jsx)(`span`,{children:t.readOnlyNote})]}),R?(0,T.jsx)(`p`,{className:`mt-4 text-sm text-danger`,role:`alert`,children:R}):null]}),(0,T.jsx)(`button`,{type:`button`,className:`mx-auto mt-auto pt-10 text-sm text-fg-muted hover:text-fg hover:underline`,onClick:()=>void J(),disabled:I,children:t.skip})]}):null,A===`consent`&&M?(0,T.jsxs)(`section`,{"aria-labelledby":`work-discovery-consent-title`,children:[(0,T.jsxs)(`div`,{className:`text-center`,children:[(0,T.jsx)(`h1`,{id:`work-discovery-consent-title`,className:`text-2xl font-semibold tracking-tight text-fg`,children:t.selectedTitle}),(0,T.jsx)(`p`,{className:`mt-3 text-[0.95rem] leading-7 text-fg-muted`,children:t.selectedSubtitle})]}),(0,T.jsxs)(`div`,{className:`mt-8 overflow-hidden rounded-xl border border-edge bg-surface-panel`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-edge-subtle px-4 py-3.5`,children:[(0,T.jsx)(x,{className:`size-5 shrink-0 text-accent-fg`}),(0,T.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,T.jsx)(`p`,{className:`truncate text-sm font-medium text-fg`,children:M.displayName}),(0,T.jsx)(`p`,{className:`truncate font-mono text-xs text-fg-muted`,children:M.canonicalRootPath})]}),(0,T.jsx)(`span`,{className:`rounded-full bg-accent-soft px-2.5 py-1 text-xs font-medium text-accent-fg`,children:M.projectKind===`coding`?t.codingProject:M.projectKind===`general`?t.generalProject:t.unknownProject})]}),(0,T.jsxs)(`div`,{className:`grid gap-3 border-b border-edge-subtle bg-surface-base/60 px-4 py-4 sm:grid-cols-2`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`text-xs font-medium text-fg-muted`,children:t.localFingerprint}),(0,T.jsx)(`p`,{className:`mt-1 text-sm text-fg`,children:M.fingerprint.branch?t.branchValue.replace(`{{branch}}`,M.fingerprint.branch):t.noGitBranch})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`text-xs font-medium text-fg-muted`,children:t.recentActivity}),(0,T.jsx)(`p`,{className:`mt-1 text-sm text-fg`,children:t.changedFiles.replace(`{{count}}`,String(M.fingerprint.changedFileCount))})]}),M.fingerprint.recentAreas.length>0?(0,T.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,T.jsx)(`p`,{className:`text-xs font-medium text-fg-muted`,children:t.recentAreas}),(0,T.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:M.fingerprint.recentAreas.map(e=>(0,T.jsx)(`code`,{className:`rounded-md bg-surface-muted px-2 py-1 text-xs text-fg`,children:e},e))})]}):null]}),(0,T.jsxs)(`div`,{className:`divide-y divide-edge-subtle px-4`,children:[(0,T.jsxs)(`div`,{className:`flex gap-3 py-4`,children:[(0,T.jsx)(h,{className:`mt-0.5 size-4 shrink-0 text-fg-muted`}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:t.willRead}),(0,T.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:t.willReadValue})]})]}),(0,T.jsxs)(`div`,{className:`flex gap-3 py-4`,children:[(0,T.jsx)(S,{className:`mt-0.5 size-4 shrink-0 text-fg-muted`}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:t.willIgnore}),(0,T.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:t.willIgnoreValue})]})]}),(0,T.jsxs)(`div`,{className:`flex gap-3 py-4`,children:[(0,T.jsx)(_,{className:`mt-0.5 size-4 shrink-0 text-accent-fg`}),(0,T.jsx)(`p`,{className:`text-sm leading-6 text-fg-muted`,children:M.remoteModel?t.providerDisclosure.replace(`{{provider}}`,M.provider):t.localDisclosure})]})]})]}),R?(0,T.jsx)(`p`,{className:`mt-4 text-sm text-danger`,role:`alert`,children:R}):null,(0,T.jsxs)(`div`,{className:`mt-7 flex flex-col gap-3 sm:flex-row-reverse`,children:[(0,T.jsxs)(y,{type:`button`,className:`h-11 flex-1 bg-accent text-white hover:bg-accent-hover`,disabled:I,onClick:()=>void ce(),children:[I?(0,T.jsx)(C,{className:`mr-2 size-4 animate-spin`}):null,t.startAnalysis]}),(0,T.jsx)(y,{type:`button`,variant:`secondary`,className:`h-11 flex-1`,disabled:I,onClick:q.pick,children:t.changeFolder})]}),(0,T.jsx)(`button`,{type:`button`,className:`mx-auto mt-6 block text-sm text-fg-muted hover:text-fg hover:underline`,onClick:()=>void J(),children:t.skip})]}):null,A===`running`&&P?(0,T.jsxs)(`section`,{"aria-labelledby":`work-discovery-running-title`,"aria-live":`polite`,children:[(0,T.jsxs)(`div`,{className:`text-center`,children:[(0,T.jsx)(`h1`,{id:`work-discovery-running-title`,className:`text-2xl font-semibold tracking-tight text-fg`,children:t.analyzingTitle}),(0,T.jsx)(`p`,{className:`mt-3 text-[0.95rem] leading-7 text-fg-muted`,children:t.analyzingSubtitle})]}),(0,T.jsx)(`div`,{className:`mt-9 rounded-xl border border-edge bg-surface-panel px-5 py-2`,children:E.map((e,n)=>{let r=Math.max(0,E.indexOf(P.stage??`folder_structure`)),i=n<r,o=n===r;return(0,T.jsxs)(`div`,{className:`flex items-center gap-4 border-b border-edge-subtle py-4 last:border-b-0`,children:[(0,T.jsx)(`span`,{className:`flex size-7 items-center justify-center rounded-full ${i?`bg-accent text-white`:o?`bg-accent-soft text-accent-fg`:`bg-surface-muted text-fg-subtle`}`,children:i?(0,T.jsx)(a,{className:`size-4`}):o?(0,T.jsx)(C,{className:`size-4 animate-spin motion-reduce:animate-none`}):(0,T.jsx)(`span`,{className:`size-1.5 rounded-full bg-current`})}),(0,T.jsx)(`span`,{className:o||i?`text-sm font-medium text-fg`:`text-sm text-fg-muted`,children:t.stages[e]})]},e)})}),(0,T.jsx)(`p`,{className:`mt-4 truncate text-center font-mono text-xs text-fg-muted`,children:P.rootPath}),(0,T.jsx)(`button`,{type:`button`,className:`mx-auto mt-7 block text-sm text-fg-muted hover:text-danger hover:underline`,onClick:()=>void f(P.id).then(K),children:t.cancelAnalysis})]}):null,A===`recognition`&&P?.result?(0,T.jsxs)(`section`,{"aria-labelledby":`work-discovery-recognition-title`,children:[(0,T.jsxs)(`div`,{className:`text-center`,children:[(0,T.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-accent-fg`,children:t.recognitionEyebrow}),(0,T.jsx)(`h1`,{id:`work-discovery-recognition-title`,className:`mt-2 text-2xl font-semibold tracking-tight text-fg`,children:P.result.lowConfidence?t.lowConfidenceTitle:t.recognitionTitle})]}),(0,T.jsxs)(`div`,{className:`mt-7 rounded-2xl border border-accent/25 bg-gradient-to-br from-accent-soft/45 via-surface-panel to-surface-panel p-5 sm:p-6`,children:[(0,T.jsx)(`p`,{className:`text-base font-medium leading-7 text-fg`,children:P.result.projectSummary}),(0,T.jsx)(`p`,{className:`mt-3 text-sm leading-6 text-fg-muted`,children:P.result.currentState}),!P.result.lowConfidence&&Q?.evidence.length?(0,T.jsx)(`ul`,{className:`mt-5 space-y-2 border-t border-edge-subtle pt-4`,children:Q.evidence.slice(0,3).map((e,t)=>(0,T.jsxs)(`li`,{className:`flex gap-2 text-xs leading-5 text-fg-muted`,children:[(0,T.jsx)(b,{className:`mt-0.5 size-3.5 shrink-0 text-accent-fg`}),(0,T.jsxs)(`span`,{children:[e.path?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`code`,{className:`font-mono text-fg`,children:e.path}),`: `]}):null,e.observation]})]},`${Q.id}-recognition-${t}`))}):null]}),P.result.lowConfidence?(0,T.jsxs)(`div`,{className:`mt-5`,children:[(0,T.jsx)(`p`,{className:`text-sm font-medium leading-6 text-fg`,children:P.result.contextQuestion}),(0,T.jsx)(`textarea`,{value:H,onChange:e=>U(e.target.value),placeholder:t.correctionPlaceholder,className:`mt-3 min-h-24 w-full resize-y rounded-xl border border-edge bg-surface-panel px-3 py-2.5 text-sm text-fg outline-none placeholder:text-fg-subtle focus:border-accent focus:ring-2 focus:ring-accent/15`}),(0,T.jsx)(y,{className:`mt-3 w-full bg-accent text-white hover:bg-accent-hover`,disabled:I||!H.trim(),onClick:()=>void Z(`different_goal`),children:t.continueWithCorrection})]}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(`div`,{className:`mt-6 flex flex-col gap-3 sm:flex-row-reverse`,children:[(0,T.jsxs)(y,{className:`h-11 flex-1 bg-accent text-white hover:bg-accent-hover`,disabled:I,onClick:()=>void le(),children:[I?(0,T.jsx)(C,{className:`size-4 animate-spin`}):(0,T.jsx)(a,{className:`size-4`}),t.confirmUnderstanding]}),(0,T.jsx)(y,{variant:`secondary`,className:`h-11 flex-1`,disabled:I,onClick:()=>V(e=>!e),children:t.notQuiteRight})]}),B?(0,T.jsxs)(`div`,{className:`mt-4 rounded-xl border border-edge bg-surface-panel p-4`,children:[(0,T.jsx)(`label`,{className:`text-sm font-medium text-fg`,htmlFor:`work-discovery-correction`,children:t.correctionLabel}),(0,T.jsx)(`textarea`,{id:`work-discovery-correction`,value:H,onChange:e=>U(e.target.value),placeholder:t.correctionPlaceholder,className:`mt-2 min-h-24 w-full resize-y rounded-lg border border-edge bg-surface-base px-3 py-2.5 text-sm text-fg outline-none placeholder:text-fg-subtle focus:border-accent focus:ring-2 focus:ring-accent/15`}),(0,T.jsxs)(`div`,{className:`mt-3 flex flex-wrap justify-end gap-2`,children:[(0,T.jsx)(y,{variant:`ghost`,disabled:I||!H.trim(),onClick:()=>void Z(`different_goal`),children:t.differentGoal}),(0,T.jsx)(y,{variant:`primary`,disabled:I||!H.trim(),onClick:()=>void Z(`corrected`),children:t.useCorrection})]})]}):null]}),R?(0,T.jsx)(`p`,{className:`mt-4 text-sm text-danger`,role:`alert`,children:R}):null,(0,T.jsx)(`button`,{type:`button`,disabled:I,className:`mx-auto mt-6 block text-sm text-fg-muted hover:text-fg hover:underline disabled:opacity-60`,onClick:()=>void ue(),children:t.openConversation})]}):null,A===`recommendation`&&P?.result&&Q?(0,T.jsxs)(`section`,{"aria-labelledby":`work-discovery-recommendation-title`,children:[(0,T.jsxs)(`div`,{className:`text-center`,children:[(0,T.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-accent-fg`,children:t.understandingConfirmed}),(0,T.jsx)(`h1`,{id:`work-discovery-recommendation-title`,className:`mt-2 text-2xl font-semibold tracking-tight text-fg`,children:t.primaryRecommendationTitle})]}),(0,T.jsx)(`article`,{className:`mt-7 rounded-2xl border border-accent/30 bg-surface-panel p-5 sm:p-6`,children:(0,T.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,T.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center rounded-xl bg-accent-soft text-accent-fg`,children:(0,T.jsx)(s,{className:`size-5`})}),(0,T.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,T.jsx)(`h2`,{className:`text-lg font-semibold text-fg`,children:Q.title}),(0,T.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-fg-muted`,children:Q.rationale}),(0,T.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2 text-xs`,children:[(0,T.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full bg-surface-muted px-2.5 py-1 text-fg-muted`,children:[(0,T.jsx)(l,{className:`size-3.5`}),t.estimatedMinutes.replace(`{{count}}`,String(Q.estimatedMinutes))]}),(0,T.jsx)(`span`,{className:`rounded-full bg-surface-muted px-2.5 py-1 text-fg-muted`,children:(e=>e===`command`?t.riskCommand:e===`file_write`?t.riskFileWrite:t.riskAnalysis)(Q.risk)})]}),(0,T.jsxs)(`div`,{className:`mt-4 rounded-xl bg-surface-base px-4 py-3`,children:[(0,T.jsx)(`p`,{className:`text-xs font-medium text-fg-muted`,children:t.expectedOutcome}),(0,T.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-fg`,children:Q.expectedOutcome})]}),(0,T.jsxs)(`div`,{className:`mt-5 flex flex-wrap gap-2`,children:[(0,T.jsx)(y,{className:`h-10 bg-accent px-4 text-white hover:bg-accent-hover`,onClick:()=>void X(Q,!1),children:t.startRecommendedAction}),(0,T.jsx)(y,{className:`h-10 px-4`,variant:`secondary`,onClick:()=>void X(Q,!0),children:t.explainFirst})]})]})]})}),$.length>0?(0,T.jsxs)(`div`,{className:`mt-5 border-t border-edge-subtle pt-4`,children:[(0,T.jsxs)(`button`,{type:`button`,className:`flex w-full items-center justify-between py-2 text-sm font-medium text-fg-muted hover:text-fg`,onClick:()=>G(e=>!e),children:[t.otherDirections,(0,T.jsx)(ae,{className:`size-4 transition-transform ${W?`rotate-180`:``}`})]}),W?(0,T.jsx)(`div`,{className:`mt-2 divide-y divide-edge-subtle rounded-xl border border-edge bg-surface-panel px-4`,children:$.map(e=>(0,T.jsxs)(`button`,{type:`button`,className:`flex w-full items-start gap-3 py-4 text-left`,onClick:()=>void X(e,!0),children:[(0,T.jsx)(s,{className:`mt-0.5 size-4 shrink-0 text-fg-subtle`}),(0,T.jsxs)(`span`,{children:[(0,T.jsx)(`span`,{className:`block text-sm font-medium text-fg`,children:e.title}),(0,T.jsx)(`span`,{className:`mt-1 block text-xs leading-5 text-fg-muted`,children:e.expectedOutcome})]})]},e.id))}):null]}):null,(0,T.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center justify-center gap-x-5 gap-y-3`,children:[(0,T.jsx)(`button`,{type:`button`,className:`text-sm text-fg-muted hover:text-fg hover:underline`,onClick:()=>Y(P.sessionKey),children:t.doSomethingElse}),(0,T.jsx)(`button`,{type:`button`,className:`text-sm text-fg-muted hover:text-fg hover:underline`,onClick:()=>{V(!0),j(`recognition`)},children:t.correctUnderstanding})]})]}):null,A===`error`&&P?(0,T.jsxs)(`section`,{className:`text-center`,"aria-labelledby":`work-discovery-error-title`,children:[(0,T.jsx)(`div`,{className:`mx-auto flex size-11 items-center justify-center rounded-xl bg-danger-soft text-danger`,children:(0,T.jsx)(S,{className:`size-5`})}),(0,T.jsx)(`h1`,{id:`work-discovery-error-title`,className:`mt-5 text-2xl font-semibold tracking-tight text-fg`,children:t.errorTitle}),(0,T.jsx)(`p`,{className:`mx-auto mt-3 max-w-lg text-sm leading-6 text-fg-muted`,children:P.errorMessage}),(0,T.jsxs)(`div`,{className:`mx-auto mt-7 flex max-w-md flex-col gap-3 sm:flex-row-reverse`,children:[(0,T.jsx)(y,{className:`h-11 flex-1 bg-accent text-white hover:bg-accent-hover`,onClick:()=>void u(P.id).then(K),children:t.retry}),(0,T.jsx)(y,{variant:`secondary`,className:`h-11 flex-1`,onClick:()=>{F(null),N(null),j(`intro`)},children:t.chooseDifferent})]}),(0,T.jsx)(`button`,{type:`button`,className:`mt-6 text-sm text-fg-muted hover:text-fg hover:underline`,onClick:()=>Y(P.sessionKey),children:t.openConversation})]}):null]}),q.hasNativePicker?null:(0,T.jsx)(d,{open:q.modalOpen,onOpenChange:q.setModalOpen,initialAbsolutePath:M?.canonicalRootPath,onConfirm:q.confirmPick,wd:n})]})}export{O as WorkDiscoveryPage};