sliccy 6.87.2 → 6.88.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (349) hide show
  1. package/README.md +1 -1
  2. package/dist/node-server/_shared/index.d.ts +1 -0
  3. package/dist/node-server/_shared/index.d.ts.map +1 -1
  4. package/dist/node-server/_shared/index.js +1 -0
  5. package/dist/node-server/_shared/index.js.map +1 -1
  6. package/dist/node-server/_shared/loopback.d.ts +18 -0
  7. package/dist/node-server/_shared/loopback.d.ts.map +1 -0
  8. package/dist/node-server/_shared/loopback.js +41 -0
  9. package/dist/node-server/_shared/loopback.js.map +1 -0
  10. package/dist/node-server/bridge-security.d.ts +4 -1
  11. package/dist/node-server/bridge-security.js +6 -16
  12. package/dist/node-server/cloud-status.d.ts +3 -0
  13. package/dist/node-server/cloud-status.js +6 -2
  14. package/dist/node-server/hostfs.d.ts +58 -0
  15. package/dist/node-server/hostfs.js +257 -0
  16. package/dist/node-server/index.js +10 -0
  17. package/dist/node-server/routes/fetch-proxy.js +3 -18
  18. package/dist/node-server/runtime-flags.d.ts +22 -0
  19. package/dist/node-server/runtime-flags.js +78 -2
  20. package/dist/ui/.vite/manifest.json +508 -437
  21. package/dist/ui/assets/CLAUDE-4LHXSyPA.js +1 -0
  22. package/dist/ui/assets/CLAUDE-Bio4HPGK.js +1 -0
  23. package/dist/ui/assets/MEMORY-6FXnIBfJ.js +135 -0
  24. package/dist/ui/assets/SKILL-BKUxKc7f.js +296 -0
  25. package/dist/ui/assets/SKILL-BKyxMoME.js +1 -0
  26. package/dist/ui/assets/SKILL-BcELX5TL.js +1 -0
  27. package/dist/ui/assets/SKILL-Bd5ykLEh.js +1 -0
  28. package/dist/ui/assets/SKILL-Bt-RhG0L.js +1 -0
  29. package/dist/ui/assets/SKILL-CED8RXQP.js +69 -0
  30. package/dist/ui/assets/SKILL-CNdAIhbb.js +1 -0
  31. package/dist/ui/assets/SKILL-CcMg6eqt.js +1 -0
  32. package/dist/ui/assets/SKILL-Ch-cOl61.js +1 -0
  33. package/dist/ui/assets/SKILL-CkfptFag.js +132 -0
  34. package/dist/ui/assets/SKILL-Ckg2XbSL.js +114 -0
  35. package/dist/ui/assets/SKILL-D40-t9w0.js +57 -0
  36. package/dist/ui/assets/SKILL-DFKKFkzD.js +96 -0
  37. package/dist/ui/assets/SKILL-DJ815vTN.js +62 -0
  38. package/dist/ui/assets/SKILL-DLXzwsY4.js +1 -0
  39. package/dist/ui/assets/SKILL-DXIigmDy.js +35 -0
  40. package/dist/ui/assets/SKILL-DfSluXpV.js +385 -0
  41. package/dist/ui/assets/SKILL-DhKtVqb-.js +1 -0
  42. package/dist/ui/assets/SKILL-FnBxPcDX.js +1 -0
  43. package/dist/ui/assets/SKILL-HEHb9hIB.js +1 -0
  44. package/dist/ui/assets/SKILL-i1NMDKwT.js +1 -0
  45. package/dist/ui/assets/SKILL-oOIS8LAm.js +1 -0
  46. package/dist/ui/assets/{account-store-u5knhoCx.js → account-store-BLu0_ipL.js} +2 -2
  47. package/dist/ui/assets/{account-store-D1f8dn0G.js → account-store-l8BmmoRx.js} +4 -4
  48. package/dist/ui/assets/adobe-Caluo3Vg.js +2 -0
  49. package/dist/ui/assets/adobe-Cj2iYsHq.js +1 -0
  50. package/dist/ui/assets/{angular-html-Cm4-xod0.js → angular-html-aPuBvESs.js} +1 -1
  51. package/dist/ui/assets/{angular-ts-Dopuir71.js → angular-ts-ocjSXnvf.js} +1 -1
  52. package/dist/ui/assets/anthropic-messages-CpSojOI8.js +39 -0
  53. package/dist/ui/assets/anthropic-messages-DbPJ2ji9.js +39 -0
  54. package/dist/ui/assets/api-endpoint-C00IT5T9.js +1 -0
  55. package/dist/ui/assets/api-endpoint-GRCyib6X.js +1 -0
  56. package/dist/ui/assets/{apply-layout-g9ha9fDb.js → apply-layout-lJ2Uyc3p.js} +1 -1
  57. package/dist/ui/assets/{apps-D2giAoeX.js → apps-BRi5S2KV.js} +1 -1
  58. package/dist/ui/assets/{astro-E_b8esPp.js → astro-go1PgQEf.js} +1 -1
  59. package/dist/ui/assets/auto-mount-table-CdyPAwVL.js +1 -0
  60. package/dist/ui/assets/{azure-openai-DYlB7tTf.js → azure-openai-DtPDwGAY.js} +2 -2
  61. package/dist/ui/assets/azure-openai-responses-BcoOaRCx.js +1 -0
  62. package/dist/ui/assets/azure-openai-responses-DUMDrZ29.js +1 -0
  63. package/dist/ui/assets/{azure-openai-CB7Ox9_p.js → azure-openai-xFuHu_hU.js} +2 -2
  64. package/dist/ui/assets/backend-hostfs-Com-zF5W.js +1 -0
  65. package/dist/ui/assets/backend-hostfs-bQQx-S0W.js +1 -0
  66. package/dist/ui/assets/bedrock-camp-BcJEC3Pg.js +1 -0
  67. package/dist/ui/assets/bedrock-camp-LeceEQbU.js +1 -0
  68. package/dist/ui/assets/bedrock-camp-compat-CYnC9BQI.js +1 -0
  69. package/dist/ui/assets/bedrock-camp-compat-CgBMwna8.js +1 -0
  70. package/dist/ui/assets/{blade-mj2TcBTp.js → blade-DPPr6MF0.js} +1 -1
  71. package/dist/ui/assets/catppuccin-frappe-C9Q5zVZY.js +1 -0
  72. package/dist/ui/assets/catppuccin-latte-CtsyrtPq.js +1 -0
  73. package/dist/ui/assets/catppuccin-macchiato-R8nAf1vR.js +1 -0
  74. package/dist/ui/assets/catppuccin-mocha-DjuaAJKi.js +1 -0
  75. package/dist/ui/assets/cerebras-BKhMaWSl.js +1 -0
  76. package/dist/ui/assets/cerebras-CCLa0xVH.js +1 -0
  77. package/dist/ui/assets/chime-CPc6qSh5.js +1 -0
  78. package/dist/ui/assets/claude-model-version-Csn7RPVg.js +1 -0
  79. package/dist/ui/assets/claude-model-version-DoVrYsKi.js +2 -0
  80. package/dist/ui/assets/{client-BTUV7dbh.js → client-DVC0x03n.js} +1 -1
  81. package/dist/ui/assets/{composer-speech-SNeD5SER.js → composer-speech-Cy4g3lh3.js} +1 -1
  82. package/dist/ui/assets/connect-llm-FevTa-aV.js +561 -0
  83. package/dist/ui/assets/{connect-surface-NkMUeXbQ.js → connect-surface-T7iCJFeB.js} +1 -1
  84. package/dist/ui/assets/cpp-Ct9pQPqT.js +1 -0
  85. package/dist/ui/assets/{css-vJJohHMc.js → css-DlBQoFxe.js} +1 -1
  86. package/dist/ui/assets/discovery-preference-__0HPYJC.js +1 -0
  87. package/dist/ui/assets/dist-B4LJzMVB.js +1547 -0
  88. package/dist/ui/assets/{ensure-speech-assets-DvFwJX-M.js → ensure-speech-assets-CKwQ54O1.js} +1 -1
  89. package/dist/ui/assets/float-topology-DiK91BlA.js +1 -0
  90. package/dist/ui/assets/{follower-navigate-watcher-CNC7ybEv.js → follower-navigate-watcher-Dz-52eZY.js} +1 -1
  91. package/dist/ui/assets/fs-1btyYJVn.js +1 -0
  92. package/dist/ui/assets/fs-BYtJQhvh.js +2 -0
  93. package/dist/ui/assets/github-BHL_hKU_.js +2 -0
  94. package/dist/ui/assets/github-copilot-CZorsYUj.js +1 -0
  95. package/dist/ui/assets/github-copilot-DVmzgGYz.js +2 -0
  96. package/dist/ui/assets/github-fX2kuECo.js +1 -0
  97. package/dist/ui/assets/{github-install-C7YXkDBT.js → github-install-DVzD1asQ.js} +1 -1
  98. package/dist/ui/assets/{github-zip-DVWjYLIh.js → github-zip-5ekKl7Z0.js} +1 -1
  99. package/dist/ui/assets/{go-BJwz_mda.js → go-rLFTqkRN.js} +1 -1
  100. package/dist/ui/assets/google-generative-ai-Dxo91M3n.js +1 -0
  101. package/dist/ui/assets/google-generative-ai-Rjh7hNBV.js +1 -0
  102. package/dist/ui/assets/{google-shared-BMJ_JErv.js → google-shared-CzJgTu-P.js} +3 -3
  103. package/dist/ui/assets/{google-shared-YqcyR4cm.js → google-shared-DQJPCU3d.js} +3 -3
  104. package/dist/ui/assets/google-vertex-61Jj0dk6.js +1 -0
  105. package/dist/ui/assets/google-vertex-DEwkNZJm.js +1 -0
  106. package/dist/ui/assets/{haml-DboNpPfQ.js → haml-Bqgi1Cau.js} +1 -1
  107. package/dist/ui/assets/{handlebars-Bv_jLwHk.js → handlebars-JgcNzdBj.js} +1 -1
  108. package/dist/ui/assets/{hear-D33CHppO.js → hear-BqNAK8-P.js} +1 -1
  109. package/dist/ui/assets/{horizon-bright-Br1oVSNq.js → horizon-bright-DSNQnXHK.js} +1 -1
  110. package/dist/ui/assets/{host-command-G_JIdBPR.js → host-command-C3cIKdbE.js} +1 -1
  111. package/dist/ui/assets/{html-BLkwJ0Yd.js → html-BsvMqTlf.js} +1 -1
  112. package/dist/ui/assets/{html-derivative-B3p5VrMH.js → html-derivative-D9FvRNj4.js} +1 -1
  113. package/dist/ui/assets/icon-example-LUkiEXyS.js +111 -0
  114. package/dist/ui/assets/{jinja-BeFOxtqS.js → jinja-CixBDh_U.js} +1 -1
  115. package/dist/ui/assets/{js-realm-worker-Ymi_bwDP.js → js-realm-worker-iDrigwwJ.js} +1 -1
  116. package/dist/ui/assets/jsh-runtime-extensions-DpVq60Gw.js +1 -0
  117. package/dist/ui/assets/julia-B5NbrcUp.js +1 -0
  118. package/dist/ui/assets/kanagawa-dragon-Bozd7klA.js +1 -0
  119. package/dist/ui/assets/kanagawa-lotus-BmuOG9ZW.js +1 -0
  120. package/dist/ui/assets/kanagawa-wave-BML5mF2J.js +1 -0
  121. package/dist/ui/assets/{kernel-worker-CJu5HqlT.js → kernel-worker-BdKtpNzV.js} +614 -4395
  122. package/dist/ui/assets/legacy-api-aliases-BnRqMAef.js +1 -0
  123. package/dist/ui/assets/legacy-api-aliases-oJPAvhVV.js +1 -0
  124. package/dist/ui/assets/{lick-urls-AW0BSaf4.js → lick-urls-DcXOqXGm.js} +1 -1
  125. package/dist/ui/assets/{lick-ws-bridge-DiPcVRfN.js → lick-ws-bridge-CnkYvHKI.js} +1 -1
  126. package/dist/ui/assets/{lick-ws-bridge-CWRES2H2.js → lick-ws-bridge-DOJW_mZp.js} +1 -1
  127. package/dist/ui/assets/loader-B23_5sFw.js +4 -0
  128. package/dist/ui/assets/{local-llm-CwFpBJ4H.js → local-llm-BoLsVU6D.js} +1 -1
  129. package/dist/ui/assets/{local-llm-C0c86vuh.js → local-llm-aZ3BO7wK.js} +1 -1
  130. package/dist/ui/assets/loopback-2H1kMO8T.js +1 -0
  131. package/dist/ui/assets/main-CSh1z5qo.js +22 -0
  132. package/dist/ui/assets/{marko-C3klgjEa.js → marko-DYWPPmCl.js} +1 -1
  133. package/dist/ui/assets/mdc-Cno1UUUH.js +1 -0
  134. package/dist/ui/assets/mistral-conversations-BtaPxrK1.js +4 -0
  135. package/dist/ui/assets/mistral-conversations-CDLVw-9i.js +4 -0
  136. package/dist/ui/assets/{transform-messages-DEFauvrq.js → models-4WTk3EBD.js} +1 -1
  137. package/dist/ui/assets/{transform-messages-N_eMsP2M.js → models-BSkXF4T6.js} +1 -1
  138. package/dist/ui/assets/monokai-B_bV9PQ9.js +1 -0
  139. package/dist/ui/assets/mount-BCaA8NF3.js +1 -0
  140. package/dist/ui/assets/mount-ICXjya6b.js +2 -0
  141. package/dist/ui/assets/{mount-bridge-client-4blXuJO1.js → mount-bridge-client-DZE6sHdr.js} +1 -1
  142. package/dist/ui/assets/mount-recovery-CtadSXiq.js +2 -0
  143. package/dist/ui/assets/new-session-CCcPVim0.js +2 -0
  144. package/dist/ui/assets/oauth-bootstrap-CJ7pyk8I.js +2 -0
  145. package/dist/ui/assets/oauth-service-CTntqv0R.js +1 -0
  146. package/dist/ui/assets/oauth-service-Uk8UIb05.js +1 -0
  147. package/dist/ui/assets/openai-codex-C7WXAsyq.js +1 -0
  148. package/dist/ui/assets/openai-codex-DJHh6O0O.js +1 -0
  149. package/dist/ui/assets/openai-codex-responses-CPOJeFUY.js +7 -0
  150. package/dist/ui/assets/openai-codex-responses-jQR19NyX.js +7 -0
  151. package/dist/ui/assets/openai-completions-DGOcowq8.js +5 -0
  152. package/dist/ui/assets/openai-completions-DGZFJo5D.js +5 -0
  153. package/dist/ui/assets/openai-responses-CDTdSIhv.js +1 -0
  154. package/dist/ui/assets/openai-responses-bnETPgx9.js +1 -0
  155. package/dist/ui/assets/{openai-responses-shared-DxcsuzHF.js → openai-responses-shared-ChgvRZ74.js} +5 -5
  156. package/dist/ui/assets/{openai-responses-shared-DhnqxYC9.js → openai-responses-shared-DqJbHrek.js} +5 -5
  157. package/dist/ui/assets/openrouter-CIXJV3ar.js +1 -0
  158. package/dist/ui/assets/openrouter-CbIgawBs.js +1 -0
  159. package/dist/ui/assets/{openrouter-oauth-578SWfOt.js → openrouter-oauth-CfwEmxEv.js} +1 -1
  160. package/dist/ui/assets/{openrouter-oauth-BeOk-ba4.js → openrouter-oauth-ZehYXklO.js} +1 -1
  161. package/dist/ui/assets/{page-approval-service-Bbc3_KdK.js → page-approval-service-BsXoPdFJ.js} +1 -1
  162. package/dist/ui/assets/panel-rpc-handlers-Bg0_q2j9.js +2 -0
  163. package/dist/ui/assets/{panelize-shell-BRldzPxv.js → panelize-shell-DG3fFAS4.js} +1 -1
  164. package/dist/ui/assets/patterns-ChiGbijt.js +171 -0
  165. package/dist/ui/assets/php-m5Ug_San.js +1 -0
  166. package/dist/ui/assets/port-bridge-client-BhmNRlRv.js +2 -0
  167. package/dist/ui/assets/port-bridge-client-Bz2N1tvn.js +1 -0
  168. package/dist/ui/assets/{provider-qCqf7_uc.js → provider-1dH_J0Ky.js} +2 -2
  169. package/dist/ui/assets/{provider-B5MTJuhf.js → provider-CCer_iKN.js} +1 -1
  170. package/dist/ui/assets/{provider-settings-NcM2Npzg.js → provider-settings-DKXi1uSi.js} +1 -1
  171. package/dist/ui/assets/provider-settings-DZxqnVAO.js +2 -0
  172. package/dist/ui/assets/{provider-store-access-BlHUi5MH.js → provider-store-access-BthQZUzO.js} +2 -2
  173. package/dist/ui/assets/provider-store-access-NzVfMvPw.js +1 -0
  174. package/dist/ui/assets/providers-D8GPTe3s.js +2 -0
  175. package/dist/ui/assets/providers-DdfpdKUf.js +1 -0
  176. package/dist/ui/assets/proxied-fetch-BGeNrvQ4.js +2 -0
  177. package/dist/ui/assets/proxied-fetch-Co-pb0x0.js +1 -0
  178. package/dist/ui/assets/{pug-BPcX_o8k.js → pug-B4bk2kWf.js} +1 -1
  179. package/dist/ui/assets/quick-llm-DscHMm6M.js +1 -0
  180. package/dist/ui/assets/r-C5FwQflr.js +1 -0
  181. package/dist/ui/assets/{recovery-screen-CC3JYs-j.js → recovery-screen-CmxX9RlA.js} +1 -1
  182. package/dist/ui/assets/red-DX1BQOs8.js +1 -0
  183. package/dist/ui/assets/{redirect-uri-Cz0-DXMU.js → redirect-uri-CSXbRzUU.js} +1 -1
  184. package/dist/ui/assets/rose-pine-aMsaMD1D.js +1 -0
  185. package/dist/ui/assets/rose-pine-dawn-8PwUyIlP.js +1 -0
  186. package/dist/ui/assets/rose-pine-moon-DO-qXg-I.js +1 -0
  187. package/dist/ui/assets/{scss-0nEf0IT-.js → scss-BaZL6t2Y.js} +1 -1
  188. package/dist/ui/assets/secret-env-CjwX7z7b.js +1 -0
  189. package/dist/ui/assets/secret-topology-0AWfFTh5.js +1 -0
  190. package/dist/ui/assets/{secrets-bridge-client-cWDAnFqs.js → secrets-bridge-client-DCQ44RyR.js} +1 -1
  191. package/dist/ui/assets/{session-freezer-DYVYVWZ3.js → session-freezer-cQJKe1j_.js} +3 -3
  192. package/dist/ui/assets/{setup-feature-flags-remote-DtLgZPds.js → setup-feature-flags-remote-BxfewGbb.js} +1 -1
  193. package/dist/ui/assets/setup-standalone-prelude-Bv9X4-V2.js +2 -0
  194. package/dist/ui/assets/setup-sudo-B3tWN6O2.js +2 -0
  195. package/dist/ui/assets/silent-renew-backoff-C_Iv54ZG.js +1 -0
  196. package/dist/ui/assets/silent-renew-backoff-t_Cd4Zw7.js +1 -0
  197. package/dist/ui/assets/{skills-CfaCWaY6.js → skills-C8Ojzeu6.js} +1 -1
  198. package/dist/ui/assets/{slicc-diff-DsGtkf0J.js → slicc-diff-DhGIKKqP.js} +1 -1
  199. package/dist/ui/assets/slicc-version-CaunkoU5.js +1 -0
  200. package/dist/ui/assets/smithy-Dgaz7aur.js +1 -0
  201. package/dist/ui/assets/solarized-dark-UdsmMDCL.js +1 -0
  202. package/dist/ui/assets/solarized-light-C1IUL_tW.js +1 -0
  203. package/dist/ui/assets/{speak-BDT9rGzg.js → speak-BSK3Souh.js} +1 -1
  204. package/dist/ui/assets/{sql-69VAgb2g.js → sql-DvarVTMJ.js} +1 -1
  205. package/dist/ui/assets/{src-DsDPrXOS.js → src-DXdqCrdV.js} +2 -2
  206. package/dist/ui/assets/{store-sdSLaoJp.js → store-BPyCiwPs.js} +1 -1
  207. package/dist/ui/assets/{store-BQWc00Lo.js → store-CGgqI527.js} +1 -1
  208. package/dist/ui/assets/style-guide-Bgzsk7bf.js +821 -0
  209. package/dist/ui/assets/{sudo-BTuTezs4.js → sudo-1gsx4XWx.js} +2 -2
  210. package/dist/ui/assets/{svelte-B4PVQJ-7.js → svelte-D4FIy7cP.js} +1 -1
  211. package/dist/ui/assets/swift-CyEgAFGc.js +1 -0
  212. package/dist/ui/assets/temperature-support-B4x2xaWY.js +1 -0
  213. package/dist/ui/assets/temperature-support-Cpml9LfI.js +1 -0
  214. package/dist/ui/assets/transform-messages-DZg9zDcV.js +1 -0
  215. package/dist/ui/assets/transform-messages-XkZ1QnTb.js +1 -0
  216. package/dist/ui/assets/transformers-env-DPjdc2EQ.js +1 -0
  217. package/dist/ui/assets/tray-leader-CP11I609.js +1 -0
  218. package/dist/ui/assets/{tray-leave-runtime-BGfdX5KF.js → tray-leave-runtime-CN7V9V7O.js} +1 -1
  219. package/dist/ui/assets/{tray-runtime-config-B1LF8Kd4.js → tray-runtime-config-CVoPQrT2.js} +1 -1
  220. package/dist/ui/assets/tray-runtime-config-D7cmCcHJ.js +1 -0
  221. package/dist/ui/assets/ts-tags-C4Ifwy6r.js +1 -0
  222. package/dist/ui/assets/{upgrade-detection-CmsEVCLH.js → upgrade-detection-DHKcwE9c.js} +1 -1
  223. package/dist/ui/assets/vesper-DdrHHSXu.js +1 -0
  224. package/dist/ui/assets/{voice-reply-CnP5wEO_.js → voice-reply-BNX-jA0G.js} +1 -1
  225. package/dist/ui/assets/{vue-Dg0Kv3qp.js → vue-Djeyp8pE.js} +1 -1
  226. package/dist/ui/assets/{vue-vine-DdvC-EE2.js → vue-vine-By_xyXdL.js} +1 -1
  227. package/dist/ui/assets/{wc-attach-DsMfUpx8.js → wc-attach-CPoS-Z-g.js} +2 -2
  228. package/dist/ui/assets/{wc-extension-wBWx11Lq.js → wc-extension-vZctlNTg.js} +2 -2
  229. package/dist/ui/assets/wc-float-label-D7p-4xyd.js +1 -0
  230. package/dist/ui/assets/wc-follower-BgCWId1J.js +17 -0
  231. package/dist/ui/assets/wc-live-leqS7MUz.js +8 -0
  232. package/dist/ui/assets/wc-nav-CO_N4L3V.js +2 -0
  233. package/dist/ui/assets/wc-onboarding-B4o-Pdiq.js +2 -0
  234. package/dist/ui/assets/wc-placeholder-BTbGc9bq.js +4 -0
  235. package/dist/ui/assets/wc-settings-B4hsC2Um.js +51 -0
  236. package/dist/ui/assets/{wc-shell-DrXzWzBs.js → wc-shell-B9UbR2P2.js} +3 -3
  237. package/dist/ui/assets/{wc-sprinkles-Hdy-5FTU.js → wc-sprinkles-Ds-rd0k7.js} +2 -2
  238. package/dist/ui/assets/wc-tray-BQls_HTm.js +2 -0
  239. package/dist/ui/assets/{wc-tray-scoops-B2RP8cgD.js → wc-tray-scoops-D8qwcovR.js} +1 -1
  240. package/dist/ui/assets/welcome-CyCMJDqG.js +621 -0
  241. package/dist/ui/assets/whisper-session-DpDs0sDL.js +2 -0
  242. package/dist/ui/assets/x_search-C-5p00-C.js +131 -0
  243. package/dist/ui/assets/xai-grok-DzMkuuG4.js +1 -0
  244. package/dist/ui/assets/xai-grok-kLSQtmUi.js +1 -0
  245. package/dist/ui/index.html +17 -16
  246. package/dist/ui/llm-proxy-sw.js +1 -1
  247. package/dist/ui/packages/webapp/index.html +17 -16
  248. package/dist/ui/slicc-diff.js +1 -1
  249. package/package.json +1 -1
  250. package/dist/ui/assets/adobe-B034kk8u.js +0 -2
  251. package/dist/ui/assets/adobe-FLVM_96g.js +0 -1
  252. package/dist/ui/assets/anthropic-messages-BX4DpK10.js +0 -39
  253. package/dist/ui/assets/anthropic-messages-C-orWG7m.js +0 -39
  254. package/dist/ui/assets/azure-openai-responses-C2LleG-4.js +0 -1
  255. package/dist/ui/assets/azure-openai-responses-Df9YPxyp.js +0 -1
  256. package/dist/ui/assets/bedrock-camp-B0KF_4RS.js +0 -1
  257. package/dist/ui/assets/bedrock-camp-qpZqnqLa.js +0 -2
  258. package/dist/ui/assets/bridge-launch-params-zrpWWxT3.js +0 -1
  259. package/dist/ui/assets/catppuccin-frappe-3VR1Za6u.js +0 -1
  260. package/dist/ui/assets/catppuccin-latte-DwIHMF0Q.js +0 -1
  261. package/dist/ui/assets/catppuccin-macchiato-DYnBP6_5.js +0 -1
  262. package/dist/ui/assets/catppuccin-mocha-DYhrFGRu.js +0 -1
  263. package/dist/ui/assets/cerebras-DweKDbE1.js +0 -1
  264. package/dist/ui/assets/cerebras-O8AuH6NY.js +0 -1
  265. package/dist/ui/assets/cpp-CdhRINFH.js +0 -1
  266. package/dist/ui/assets/discovery-preference-fqUhjzeE.js +0 -1
  267. package/dist/ui/assets/dist-Dwa3Gdd4.js +0 -1547
  268. package/dist/ui/assets/float-topology-BgioAcOd.js +0 -1
  269. package/dist/ui/assets/fs-Bov3sJ0L.js +0 -1
  270. package/dist/ui/assets/fs-Drpegy_X.js +0 -2
  271. package/dist/ui/assets/github-CE8SlGEA.js +0 -2
  272. package/dist/ui/assets/github-copilot-DsCq9ehC.js +0 -2
  273. package/dist/ui/assets/github-copilot-ywjopCMn.js +0 -1
  274. package/dist/ui/assets/github-t3RMhkRE.js +0 -1
  275. package/dist/ui/assets/google-generative-ai-C9uw7Zks.js +0 -1
  276. package/dist/ui/assets/google-generative-ai-DHBc1oKV.js +0 -1
  277. package/dist/ui/assets/google-vertex-BaT3InWy.js +0 -1
  278. package/dist/ui/assets/google-vertex-DX8CfGr6.js +0 -1
  279. package/dist/ui/assets/julia-DibC-h6i.js +0 -1
  280. package/dist/ui/assets/kanagawa-dragon-CXtmUGW6.js +0 -1
  281. package/dist/ui/assets/kanagawa-lotus-BN08jTvb.js +0 -1
  282. package/dist/ui/assets/kanagawa-wave-CTweb8Dz.js +0 -1
  283. package/dist/ui/assets/legacy-api-aliases-CsTVszvY.js +0 -1
  284. package/dist/ui/assets/legacy-api-aliases-nSD9C16V.js +0 -1
  285. package/dist/ui/assets/loader-sgPDMLWT.js +0 -4
  286. package/dist/ui/assets/main-BWIUe9mc.js +0 -22
  287. package/dist/ui/assets/mdc-Otire2H_.js +0 -1
  288. package/dist/ui/assets/mistral-conversations-BXo-tb0V.js +0 -4
  289. package/dist/ui/assets/mistral-conversations-Ck257tvp.js +0 -4
  290. package/dist/ui/assets/monokai-CdkpiU2Y.js +0 -1
  291. package/dist/ui/assets/mount-CDH4T-Mp.js +0 -2
  292. package/dist/ui/assets/mount-CE7C-kQS.js +0 -1
  293. package/dist/ui/assets/mount-recovery-h9v3cRpd.js +0 -2
  294. package/dist/ui/assets/new-session-CU8TGRAW.js +0 -2
  295. package/dist/ui/assets/oauth-bootstrap-CRJLIz8V.js +0 -2
  296. package/dist/ui/assets/oauth-service-Bbrrl8Mr.js +0 -1
  297. package/dist/ui/assets/oauth-service-Cy5ngmcU.js +0 -1
  298. package/dist/ui/assets/openai-codex-C2u_j09G.js +0 -1
  299. package/dist/ui/assets/openai-codex-DhoN0DsA.js +0 -1
  300. package/dist/ui/assets/openai-codex-responses-BQzefg3i.js +0 -7
  301. package/dist/ui/assets/openai-codex-responses-JtcU5b3J.js +0 -7
  302. package/dist/ui/assets/openai-completions-D-HjYi8x.js +0 -5
  303. package/dist/ui/assets/openai-completions-QMfwfjiE.js +0 -5
  304. package/dist/ui/assets/openai-responses-BVHnEPuG.js +0 -1
  305. package/dist/ui/assets/openai-responses-Ca0oWhbv.js +0 -1
  306. package/dist/ui/assets/openrouter-DnjFjBY3.js +0 -1
  307. package/dist/ui/assets/openrouter-DvfkEaFA.js +0 -1
  308. package/dist/ui/assets/panel-rpc-handlers-CqcvBRTi.js +0 -2
  309. package/dist/ui/assets/php-BidqsJNR.js +0 -1
  310. package/dist/ui/assets/port-bridge-client-BbVs1yhx.js +0 -2
  311. package/dist/ui/assets/port-bridge-client-DxYLF2-N.js +0 -1
  312. package/dist/ui/assets/provider-settings-DcYK3m1J.js +0 -2
  313. package/dist/ui/assets/provider-store-access-BN6c8KtH.js +0 -1
  314. package/dist/ui/assets/providers-BAjAn8LJ.js +0 -2
  315. package/dist/ui/assets/providers-BYRmRIj_.js +0 -1
  316. package/dist/ui/assets/proxied-fetch-B4g-4VbQ.js +0 -2
  317. package/dist/ui/assets/proxied-fetch-n2pCvcgW.js +0 -1
  318. package/dist/ui/assets/quick-llm-CXBgg2d_.js +0 -1
  319. package/dist/ui/assets/r-Dzep-lPg.js +0 -1
  320. package/dist/ui/assets/red-CJ3rzSJv.js +0 -1
  321. package/dist/ui/assets/rose-pine-BthvhNj6.js +0 -1
  322. package/dist/ui/assets/rose-pine-dawn-Dg85fqjY.js +0 -1
  323. package/dist/ui/assets/rose-pine-moon-hon4tzzS.js +0 -1
  324. package/dist/ui/assets/secret-env-q4hxkt7Z.js +0 -1
  325. package/dist/ui/assets/secret-topology-xLmXoozo.js +0 -1
  326. package/dist/ui/assets/setup-standalone-prelude-B5yx5j_i.js +0 -2
  327. package/dist/ui/assets/setup-sudo-CGpFS_H9.js +0 -2
  328. package/dist/ui/assets/silent-renew-backoff-BhyOB6Rq.js +0 -1
  329. package/dist/ui/assets/silent-renew-backoff-BrAZcbzt.js +0 -1
  330. package/dist/ui/assets/slicc-version-ClAVruxy.js +0 -1
  331. package/dist/ui/assets/solarized-dark-DV17i1UV.js +0 -1
  332. package/dist/ui/assets/solarized-light-DSh2HLQt.js +0 -1
  333. package/dist/ui/assets/swift-DonLKvLd.js +0 -1
  334. package/dist/ui/assets/transformers-env-SL0zTs7S.js +0 -1
  335. package/dist/ui/assets/tray-leader-DcRtwWl-.js +0 -1
  336. package/dist/ui/assets/tray-runtime-config-CRGwg9SK.js +0 -1
  337. package/dist/ui/assets/ts-tags-BUIgHz80.js +0 -1
  338. package/dist/ui/assets/vesper-D5bVUKB1.js +0 -1
  339. package/dist/ui/assets/wc-float-label-qqb_uM9y.js +0 -1
  340. package/dist/ui/assets/wc-follower-Di7VVZ0z.js +0 -17
  341. package/dist/ui/assets/wc-live-1OpoOfN1.js +0 -8
  342. package/dist/ui/assets/wc-nav-B8ymo0Vu.js +0 -2
  343. package/dist/ui/assets/wc-onboarding-CMJYjLlt.js +0 -2
  344. package/dist/ui/assets/wc-placeholder-DIOhu2Ac.js +0 -4
  345. package/dist/ui/assets/wc-settings-D2oVzKVs.js +0 -51
  346. package/dist/ui/assets/wc-tray-CfSIy5M0.js +0 -2
  347. package/dist/ui/assets/whisper-session-Cf2gGkoR.js +0 -2
  348. package/dist/ui/assets/xai-grok-B_POoF8K.js +0 -1
  349. package/dist/ui/assets/xai-grok-D__MgEgm.js +0 -1
@@ -1 +0,0 @@
1
- var e=Object.freeze(JSON.parse(`{"colors":{"activityBar.background":"#E7DBA0","activityBar.foreground":"#545464","activityBarBadge.background":"#5A7785","activityBarBadge.foreground":"#545464","badge.background":"#E7DBA0","button.background":"#E7DBA0","button.foreground":"#43436C","button.secondaryBackground":"#C7D7E0","button.secondaryForeground":"#545464","checkbox.border":"#C7D7E0","debugToolBar.background":"#D5CEA3","descriptionForeground":"#545464","diffEditor.insertedTextBackground":"#B7D0AE80","dropdown.background":"#D5CEA3","dropdown.border":"#D5CEA3","editor.background":"#F2ECBC","editor.findMatchBackground":"#B5CBD2","editor.findMatchBorder":"#E98A00","editor.findMatchHighlightBackground":"#B5CBD280","editor.foreground":"#545464","editor.lineHighlightBackground":"#E4D794","editor.selectionBackground":"#C7D7E0","editor.selectionHighlightBackground":"#E4D79480","editor.selectionHighlightBorder":"#766B90","editor.wordHighlightBackground":"#E4D7944D","editor.wordHighlightBorder":"#766B90","editor.wordHighlightStrongBackground":"#E4D7944D","editor.wordHighlightStrongBorder":"#766B90","editorBracketHighlight.foreground1":"#624C83","editorBracketHighlight.foreground2":"#CC6D00","editorBracketHighlight.foreground3":"#4D699B","editorBracketHighlight.foreground4":"#B35B79","editorBracketHighlight.foreground5":"#77713F","editorBracketHighlight.foreground6":"#597B75","editorBracketHighlight.unexpectedBracket.foreground":"#D9A594","editorBracketMatch.background":"#D5CEA3","editorBracketMatch.border":"#766B90","editorBracketPairGuide.activeBackground1":"#624C83","editorBracketPairGuide.activeBackground2":"#CC6D00","editorBracketPairGuide.activeBackground3":"#4D699B","editorBracketPairGuide.activeBackground4":"#B35B79","editorBracketPairGuide.activeBackground5":"#77713F","editorBracketPairGuide.activeBackground6":"#597B75","editorCursor.background":"#F2ECBC","editorCursor.foreground":"#545464","editorError.foreground":"#E82424","editorGroup.border":"#D5CEA3","editorGroupHeader.tabsBackground":"#D5CEA3","editorGutter.addedBackground":"#6E915F","editorGutter.deletedBackground":"#D7474B","editorGutter.modifiedBackground":"#DE9800","editorHoverWidget.background":"#F2ECBC","editorHoverWidget.border":"#E7DBA0","editorHoverWidget.highlightForeground":"#5A7785","editorIndentGuide.activeBackground1":"#E4D794","editorIndentGuide.background1":"#E7DBA0","editorInlayHint.background":"#F2ECBC","editorInlayHint.foreground":"#716E61","editorLineNumber.activeForeground":"#CC6D00","editorLineNumber.foreground":"#766B90","editorMarkerNavigation.background":"#E4D794","editorRuler.foreground":"#ff0000","editorSuggestWidget.background":"#C7D7E0","editorSuggestWidget.border":"#C7D7E0","editorSuggestWidget.selectedBackground":"#B5CBD2","editorWarning.foreground":"#E98A00","editorWhitespace.foreground":"#F2ECBC","editorWidget.background":"#F2ECBC","focusBorder":"#C7D7E0","foreground":"#545464","gitDecoration.ignoredResourceForeground":"#716E61","input.background":"#D5CEA3","list.activeSelectionBackground":"#E4D794","list.activeSelectionForeground":"#545464","list.focusBackground":"#E7DBA0","list.focusForeground":"#545464","list.highlightForeground":"#4D699B","list.hoverBackground":"#E4D794","list.hoverForeground":"#545464","list.inactiveSelectionBackground":"#E7DBA0","list.inactiveSelectionForeground":"#545464","list.warningForeground":"#E98A00","menu.background":"#E4D794","menu.border":"#D5CEA3","menu.foreground":"#545464","menu.selectionBackground":"#D5CEA3","menu.selectionForeground":"#545464","menu.separatorBackground":"#766B90","menubar.selectionBackground":"#D5CEA3","menubar.selectionForeground":"#545464","minimapGutter.addedBackground":"#6E915F","minimapGutter.deletedBackground":"#D7474B","minimapGutter.modifiedBackground":"#DE9800","panel.border":"#D5CEA3","panelSectionHeader.background":"#F2ECBC","peekView.border":"#766B90","peekViewEditor.background":"#E7DBA0","peekViewEditor.matchHighlightBackground":"#B5CBD2","peekViewResult.background":"#E4D794","scrollbar.shadow":"#E4D794","scrollbarSlider.activeBackground":"#E7DBA080","scrollbarSlider.background":"#766B9066","scrollbarSlider.hoverBackground":"#766B9080","settings.focusedRowBackground":"#E4D794","settings.headerForeground":"#545464","sideBar.background":"#F2ECBC","sideBar.border":"#D5CEA3","sideBar.foreground":"#545464","sideBarSectionHeader.background":"#E4D794","sideBarSectionHeader.foreground":"#545464","statusBar.background":"#D5CEA3","statusBar.debuggingBackground":"#E82424","statusBar.debuggingBorder":"#624C83","statusBar.debuggingForeground":"#545464","statusBar.foreground":"#43436C","statusBar.noFolderBackground":"#F2ECBC","statusBarItem.hoverBackground":"#E4D794","statusBarItem.remoteBackground":"#B5CBD2","statusBarItem.remoteForeground":"#545464","tab.activeBackground":"#E7DBA0","tab.activeForeground":"#4D699B","tab.border":"#E7DBA0","tab.hoverBackground":"#E4D794","tab.inactiveBackground":"#E5DDB0","tab.unfocusedHoverBackground":"#F2ECBC","terminal.ansiBlack":"#1F1F28","terminal.ansiBlue":"#4D699B","terminal.ansiBrightBlack":"#8A8980","terminal.ansiBrightBlue":"#6693BF","terminal.ansiBrightCyan":"#5E857A","terminal.ansiBrightGreen":"#6E915F","terminal.ansiBrightMagenta":"#624C83","terminal.ansiBrightRed":"#D7474B","terminal.ansiBrightWhite":"#43436C","terminal.ansiBrightYellow":"#836F4A","terminal.ansiCyan":"#597B75","terminal.ansiGreen":"#6F894E","terminal.ansiMagenta":"#B35B79","terminal.ansiRed":"#C84053","terminal.ansiWhite":"#545464","terminal.ansiYellow":"#77713F","terminal.background":"#F2ECBC","terminal.border":"#D5CEA3","terminal.foreground":"#545464","terminal.selectionBackground":"#C7D7E0","textBlockQuote.background":"#F2ECBC","textBlockQuote.border":"#D5CEA3","textLink.foreground":"#5E857A","textPreformat.foreground":"#E98A00","titleBar.activeBackground":"#E4D794","titleBar.activeForeground":"#545464","titleBar.inactiveBackground":"#F2ECBC","titleBar.inactiveForeground":"#545464","walkThrough.embeddedEditorBackground":"#F2ECBC"},"displayName":"Kanagawa Lotus","name":"kanagawa-lotus","semanticHighlighting":true,"semanticTokenColors":{"arithmetic":"#836F4A","function":"#4D699B","keyword.controlFlow":{"fontStyle":"bold","foreground":"#624C83"},"macro":"#C84053","method":"#6693BF","operator":"#836F4A","parameter":"#5D57A3","parameter.declaration":"#5D57A3","parameter.definition":"#5D57A3","variable":"#545464","variable.readonly":"#545464","variable.readonly.defaultLibrary":"#545464","variable.readonly.local":"#545464"},"tokenColors":[{"scope":["comment","punctuation.definition.comment"],"settings":{"foreground":"#716E61"}},{"scope":["variable","string constant.other.placeholder"],"settings":{"foreground":"#545464"}},{"scope":["constant.other.color"],"settings":{"foreground":"#CC6D00"}},{"scope":["invalid","invalid.illegal"],"settings":{"foreground":"#E82424"}},{"scope":["storage.type"],"settings":{"foreground":"#624C83"}},{"scope":["storage.modifier"],"settings":{"foreground":"#624C83"}},{"scope":["keyword.control.flow","keyword.control.conditional","keyword.control.loop"],"settings":{"fontStyle":"bold","foreground":"#624C83"}},{"scope":["keyword.control","constant.other.color","meta.tag","keyword.other.template","keyword.other.substitution","keyword.other"],"settings":{"foreground":"#624C83"}},{"scope":["keyword.other.definition.ini"],"settings":{"foreground":"#CC6D00"}},{"scope":["keyword.control.trycatch"],"settings":{"fontStyle":"bold","foreground":"#D9A594"}},{"scope":["keyword.other.unit","keyword.operator"],"settings":{"foreground":"#77713F"}},{"scope":["punctuation","punctuation.definition.tag","punctuation.separator.inheritance.php","punctuation.definition.tag.html","punctuation.definition.tag.begin.html","punctuation.definition.tag.end.html","punctuation.section.embedded","meta.brace","keyword.operator.type.annotation","keyword.operator.namespace"],"settings":{"foreground":"#4E8CA2"}},{"scope":["entity.name.tag","meta.tag.sgml"],"settings":{"foreground":"#77713F"}},{"scope":["entity.name.function","meta.function-call","variable.function","support.function"],"settings":{"foreground":"#4D699B"}},{"scope":["keyword.other.special-method"],"settings":{"foreground":"#6693BF"}},{"scope":["entity.name.function.macro"],"settings":{"foreground":"#C84053"}},{"scope":["meta.block variable.other"],"settings":{"foreground":"#545464"}},{"scope":["variable.other.enummember"],"settings":{"foreground":"#CC6D00"}},{"scope":["support.other.variable"],"settings":{"foreground":"#545464"}},{"scope":["string.other.link"],"settings":{"foreground":"#6693BF"}},{"scope":["constant.numeric","constant.language","support.constant","constant.character","constant.escape"],"settings":{"foreground":"#CC6D00"}},{"scope":["constant.language.boolean"],"settings":{"foreground":"#CC6D00"}},{"scope":["constant.numeric"],"settings":{"foreground":"#B35B79"}},{"scope":["string","punctuation.definition.string","constant.other.symbol","constant.other.key","entity.other.inherited-class","markup.heading","markup.inserted.git_gutter","meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js","markup.inline.raw.string"],"settings":{"foreground":"#6F894E"}},{"scope":["entity.name","support.type","support.class","support.other.namespace.use.php","meta.use.php","support.other.namespace.php","support.type.sys-types"],"settings":{"foreground":"#597B75"}},{"scope":["entity.name.type.module","entity.name.namespace"],"settings":{"foreground":"#77713F"}},{"scope":["entity.name.import.go"],"settings":{"foreground":"#6F894E"}},{"scope":["keyword.blade"],"settings":{"foreground":"#624C83"}},{"scope":["variable.other.property"],"settings":{"foreground":"#77713F"}},{"scope":["keyword.control.import","keyword.import","meta.import"],"settings":{"foreground":"#CC6D00"}},{"scope":["source.css support.type.property-name","source.sass support.type.property-name","source.scss support.type.property-name","source.less support.type.property-name","source.stylus support.type.property-name","source.postcss support.type.property-name"],"settings":{"foreground":"#597B75"}},{"scope":["entity.name.module.js","variable.import.parameter.js","variable.other.class.js"],"settings":{"foreground":"#D9A594"}},{"scope":["variable.language"],"settings":{"foreground":"#D9A594"}},{"scope":["entity.name.method.js"],"settings":{"foreground":"#6693BF"}},{"scope":["meta.class-method.js entity.name.function.js","variable.function.constructor"],"settings":{"foreground":"#6693BF"}},{"scope":["entity.other.attribute-name"],"settings":{"foreground":"#624C83"}},{"scope":["entity.other.attribute-name.class"],"settings":{"foreground":"#77713F"}},{"scope":["source.sass keyword.control"],"settings":{"foreground":"#6693BF"}},{"scope":["markup.inserted"],"settings":{"foreground":"#6E915F"}},{"scope":["markup.deleted"],"settings":{"foreground":"#D7474B"}},{"scope":["markup.changed"],"settings":{"foreground":"#DE9800"}},{"scope":["string.regexp"],"settings":{"foreground":"#836F4A"}},{"scope":["constant.character.escape"],"settings":{"foreground":"#6693BF"}},{"scope":["*url*","*link*","*uri*"],"settings":{"fontStyle":"underline"}},{"scope":["tag.decorator.js entity.name.tag.js","tag.decorator.js punctuation.definition.tag.js"],"settings":{"foreground":"#624C83"}},{"scope":["source.js constant.other.object.key.js string.unquoted.label.js"],"settings":{"foreground":"#D9A594"}},{"scope":["source.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#B35B79"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#77713F"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#CC6D00"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#D9A594"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#CC6D00"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#4D699B"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#B35B79"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#624C83"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#6F894E"}},{"scope":["meta.tag JSXNested","meta.jsx.children","text.html","text.log"],"settings":{"foreground":"#545464"}},{"scope":["text.html.markdown","punctuation.definition.list_item.markdown"],"settings":{"foreground":"#545464"}},{"scope":["text.html.markdown markup.inline.raw.markdown"],"settings":{"foreground":"#624C83"}},{"scope":["text.html.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown"],"settings":{"foreground":"#624C83"}},{"scope":["markdown.heading","entity.name.section.markdown","markup.heading.markdown"],"settings":{"foreground":"#4D699B"}},{"scope":["markup.italic"],"settings":{"fontStyle":"italic","foreground":"#C84053"}},{"scope":["markup.bold","markup.bold string"],"settings":{"fontStyle":"bold"}},{"scope":["markup.bold markup.italic","markup.italic markup.bold","markup.quote markup.bold","markup.bold markup.italic string","markup.italic markup.bold string","markup.quote markup.bold string"],"settings":{"fontStyle":"bold","foreground":"#C84053"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline","foreground":"#6693BF"}},{"scope":["markup.quote punctuation.definition.blockquote.markdown"],"settings":{"foreground":"#716E61"}},{"scope":["markup.quote"],"settings":{"fontStyle":"italic"}},{"scope":["string.other.link.title.markdown"],"settings":{"foreground":"#CC6D00"}},{"scope":["string.other.link.description.title.markdown"],"settings":{"foreground":"#624C83"}},{"scope":["constant.other.reference.link.markdown"],"settings":{"foreground":"#77713F"}},{"scope":["markup.raw.block"],"settings":{"foreground":"#624C83"}},{"scope":["markup.raw.block.fenced.markdown"],"settings":{"foreground":"#716E61"}},{"scope":["punctuation.definition.fenced.markdown"],"settings":{"foreground":"#716E61"}},{"scope":["markup.raw.block.fenced.markdown","variable.language.fenced.markdown","punctuation.section.class.end"],"settings":{"foreground":"#545464"}},{"scope":["variable.language.fenced.markdown"],"settings":{"foreground":"#716E61"}},{"scope":["meta.separator"],"settings":{"fontStyle":"bold","foreground":"#4E8CA2"}},{"scope":["markup.table"],"settings":{"foreground":"#545464"}}],"type":"light"}`));export{e as default};
@@ -1 +0,0 @@
1
- var e=Object.freeze(JSON.parse(`{"colors":{"activityBar.background":"#2A2A37","activityBar.foreground":"#DCD7BA","activityBarBadge.background":"#658594","activityBarBadge.foreground":"#DCD7BA","badge.background":"#2A2A37","button.background":"#2A2A37","button.foreground":"#C8C093","button.secondaryBackground":"#223249","button.secondaryForeground":"#DCD7BA","checkbox.border":"#223249","debugToolBar.background":"#16161D","descriptionForeground":"#DCD7BA","diffEditor.insertedTextBackground":"#2B332880","dropdown.background":"#16161D","dropdown.border":"#16161D","editor.background":"#1F1F28","editor.findMatchBackground":"#2D4F67","editor.findMatchBorder":"#FF9E3B","editor.findMatchHighlightBackground":"#2D4F6780","editor.foreground":"#DCD7BA","editor.lineHighlightBackground":"#363646","editor.selectionBackground":"#223249","editor.selectionHighlightBackground":"#36364680","editor.selectionHighlightBorder":"#54546D","editor.wordHighlightBackground":"#3636464D","editor.wordHighlightBorder":"#54546D","editor.wordHighlightStrongBackground":"#3636464D","editor.wordHighlightStrongBorder":"#54546D","editorBracketHighlight.foreground1":"#957FB8","editorBracketHighlight.foreground2":"#FFA066","editorBracketHighlight.foreground3":"#7E9CD8","editorBracketHighlight.foreground4":"#D27E99","editorBracketHighlight.foreground5":"#E6C384","editorBracketHighlight.foreground6":"#7AA89F","editorBracketHighlight.unexpectedBracket.foreground":"#FF5D62","editorBracketMatch.background":"#16161D","editorBracketMatch.border":"#54546D","editorBracketPairGuide.activeBackground1":"#957FB8","editorBracketPairGuide.activeBackground2":"#FFA066","editorBracketPairGuide.activeBackground3":"#7E9CD8","editorBracketPairGuide.activeBackground4":"#D27E99","editorBracketPairGuide.activeBackground5":"#E6C384","editorBracketPairGuide.activeBackground6":"#7AA89F","editorCursor.background":"#1F1F28","editorCursor.foreground":"#DCD7BA","editorError.foreground":"#E82424","editorGroup.border":"#16161D","editorGroupHeader.tabsBackground":"#16161D","editorGutter.addedBackground":"#76946A","editorGutter.deletedBackground":"#C34043","editorGutter.modifiedBackground":"#DCA561","editorHoverWidget.background":"#1F1F28","editorHoverWidget.border":"#2A2A37","editorHoverWidget.highlightForeground":"#658594","editorIndentGuide.activeBackground1":"#363646","editorIndentGuide.background1":"#2A2A37","editorInlayHint.background":"#1F1F28","editorInlayHint.foreground":"#727169","editorLineNumber.activeForeground":"#FFA066","editorLineNumber.foreground":"#54546D","editorMarkerNavigation.background":"#363646","editorRuler.foreground":"#363646","editorSuggestWidget.background":"#223249","editorSuggestWidget.border":"#223249","editorSuggestWidget.selectedBackground":"#2D4F67","editorWarning.foreground":"#FF9E3B","editorWhitespace.foreground":"#1F1F28","editorWidget.background":"#1F1F28","focusBorder":"#223249","foreground":"#DCD7BA","gitDecoration.ignoredResourceForeground":"#727169","input.background":"#16161D","list.activeSelectionBackground":"#363646","list.activeSelectionForeground":"#DCD7BA","list.focusBackground":"#2A2A37","list.focusForeground":"#DCD7BA","list.highlightForeground":"#7E9CD8","list.hoverBackground":"#363646","list.hoverForeground":"#DCD7BA","list.inactiveSelectionBackground":"#2A2A37","list.inactiveSelectionForeground":"#DCD7BA","list.warningForeground":"#FF9E3B","menu.background":"#363646","menu.border":"#16161D","menu.foreground":"#DCD7BA","menu.selectionBackground":"#16161D","menu.selectionForeground":"#DCD7BA","menu.separatorBackground":"#54546D","menubar.selectionBackground":"#16161D","menubar.selectionForeground":"#DCD7BA","minimapGutter.addedBackground":"#76946A","minimapGutter.deletedBackground":"#C34043","minimapGutter.modifiedBackground":"#DCA561","panel.border":"#16161D","panelSectionHeader.background":"#1F1F28","peekView.border":"#54546D","peekViewEditor.background":"#2A2A37","peekViewEditor.matchHighlightBackground":"#2D4F67","peekViewResult.background":"#363646","scrollbar.shadow":"#363646","scrollbarSlider.activeBackground":"#2A2A3780","scrollbarSlider.background":"#54546D66","scrollbarSlider.hoverBackground":"#54546D80","settings.focusedRowBackground":"#363646","settings.headerForeground":"#DCD7BA","sideBar.background":"#1F1F28","sideBar.border":"#16161D","sideBar.foreground":"#DCD7BA","sideBarSectionHeader.background":"#363646","sideBarSectionHeader.foreground":"#DCD7BA","statusBar.background":"#16161D","statusBar.debuggingBackground":"#E82424","statusBar.debuggingBorder":"#957FB8","statusBar.debuggingForeground":"#DCD7BA","statusBar.foreground":"#C8C093","statusBar.noFolderBackground":"#1F1F28","statusBarItem.hoverBackground":"#363646","statusBarItem.remoteBackground":"#2D4F67","statusBarItem.remoteForeground":"#DCD7BA","tab.activeBackground":"#2A2A37","tab.activeForeground":"#7E9CD8","tab.border":"#2A2A37","tab.hoverBackground":"#363646","tab.inactiveBackground":"#1A1A22","tab.unfocusedHoverBackground":"#1F1F28","terminal.ansiBlack":"#16161D","terminal.ansiBlue":"#7E9CD8","terminal.ansiBrightBlack":"#727169","terminal.ansiBrightBlue":"#7FB4CA","terminal.ansiBrightCyan":"#7AA89F","terminal.ansiBrightGreen":"#98BB6C","terminal.ansiBrightMagenta":"#938AA9","terminal.ansiBrightRed":"#E82424","terminal.ansiBrightWhite":"#DCD7BA","terminal.ansiBrightYellow":"#E6C384","terminal.ansiCyan":"#6A9589","terminal.ansiGreen":"#76946A","terminal.ansiMagenta":"#957FB8","terminal.ansiRed":"#C34043","terminal.ansiWhite":"#C8C093","terminal.ansiYellow":"#C0A36E","terminal.background":"#1F1F28","terminal.border":"#16161D","terminal.foreground":"#DCD7BA","terminal.selectionBackground":"#223249","textBlockQuote.background":"#1F1F28","textBlockQuote.border":"#16161D","textLink.foreground":"#6A9589","textPreformat.foreground":"#FF9E3B","titleBar.activeBackground":"#363646","titleBar.activeForeground":"#DCD7BA","titleBar.inactiveBackground":"#1F1F28","titleBar.inactiveForeground":"#DCD7BA","walkThrough.embeddedEditorBackground":"#1F1F28"},"displayName":"Kanagawa Wave","name":"kanagawa-wave","semanticHighlighting":true,"semanticTokenColors":{"arithmetic":"#C0A36E","function":"#7E9CD8","keyword.controlFlow":{"fontStyle":"bold","foreground":"#957FB8"},"macro":"#E46876","method":"#7FB4CA","operator":"#C0A36E","parameter":"#B8B4D0","parameter.declaration":"#B8B4D0","parameter.definition":"#B8B4D0","variable":"#DCD7BA","variable.readonly":"#DCD7BA","variable.readonly.defaultLibrary":"#DCD7BA","variable.readonly.local":"#DCD7BA"},"tokenColors":[{"scope":["comment","punctuation.definition.comment"],"settings":{"foreground":"#727169"}},{"scope":["variable","string constant.other.placeholder"],"settings":{"foreground":"#DCD7BA"}},{"scope":["constant.other.color"],"settings":{"foreground":"#FFA066"}},{"scope":["invalid","invalid.illegal"],"settings":{"foreground":"#E82424"}},{"scope":["storage.type"],"settings":{"foreground":"#957FB8"}},{"scope":["storage.modifier"],"settings":{"foreground":"#957FB8"}},{"scope":["keyword.control.flow","keyword.control.conditional","keyword.control.loop"],"settings":{"fontStyle":"bold","foreground":"#957FB8"}},{"scope":["keyword.control","constant.other.color","meta.tag","keyword.other.template","keyword.other.substitution","keyword.other"],"settings":{"foreground":"#957FB8"}},{"scope":["keyword.other.definition.ini"],"settings":{"foreground":"#FFA066"}},{"scope":["keyword.control.trycatch"],"settings":{"fontStyle":"bold","foreground":"#FF5D62"}},{"scope":["keyword.other.unit","keyword.operator"],"settings":{"foreground":"#E6C384"}},{"scope":["punctuation","punctuation.definition.tag","punctuation.separator.inheritance.php","punctuation.definition.tag.html","punctuation.definition.tag.begin.html","punctuation.definition.tag.end.html","punctuation.section.embedded","meta.brace","keyword.operator.type.annotation","keyword.operator.namespace"],"settings":{"foreground":"#9CABCA"}},{"scope":["entity.name.tag","meta.tag.sgml"],"settings":{"foreground":"#E6C384"}},{"scope":["entity.name.function","meta.function-call","variable.function","support.function"],"settings":{"foreground":"#7E9CD8"}},{"scope":["keyword.other.special-method"],"settings":{"foreground":"#7FB4CA"}},{"scope":["entity.name.function.macro"],"settings":{"foreground":"#E46876"}},{"scope":["meta.block variable.other"],"settings":{"foreground":"#DCD7BA"}},{"scope":["variable.other.enummember"],"settings":{"foreground":"#FFA066"}},{"scope":["support.other.variable"],"settings":{"foreground":"#DCD7BA"}},{"scope":["string.other.link"],"settings":{"foreground":"#7FB4CA"}},{"scope":["constant.numeric","constant.language","support.constant","constant.character","constant.escape"],"settings":{"foreground":"#FFA066"}},{"scope":["constant.language.boolean"],"settings":{"foreground":"#FFA066"}},{"scope":["constant.numeric"],"settings":{"foreground":"#D27E99"}},{"scope":["string","punctuation.definition.string","constant.other.symbol","constant.other.key","entity.other.inherited-class","markup.heading","markup.inserted.git_gutter","meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js","markup.inline.raw.string"],"settings":{"foreground":"#98BB6C"}},{"scope":["entity.name","support.type","support.class","support.other.namespace.use.php","meta.use.php","support.other.namespace.php","support.type.sys-types"],"settings":{"foreground":"#7AA89F"}},{"scope":["entity.name.type.module","entity.name.namespace"],"settings":{"foreground":"#E6C384"}},{"scope":["entity.name.import.go"],"settings":{"foreground":"#98BB6C"}},{"scope":["keyword.blade"],"settings":{"foreground":"#957FB8"}},{"scope":["variable.other.property"],"settings":{"foreground":"#E6C384"}},{"scope":["keyword.control.import","keyword.import","meta.import"],"settings":{"foreground":"#FFA066"}},{"scope":["source.css support.type.property-name","source.sass support.type.property-name","source.scss support.type.property-name","source.less support.type.property-name","source.stylus support.type.property-name","source.postcss support.type.property-name"],"settings":{"foreground":"#7AA89F"}},{"scope":["entity.name.module.js","variable.import.parameter.js","variable.other.class.js"],"settings":{"foreground":"#FF5D62"}},{"scope":["variable.language"],"settings":{"foreground":"#FF5D62"}},{"scope":["entity.name.method.js"],"settings":{"foreground":"#7FB4CA"}},{"scope":["meta.class-method.js entity.name.function.js","variable.function.constructor"],"settings":{"foreground":"#7FB4CA"}},{"scope":["entity.other.attribute-name"],"settings":{"foreground":"#957FB8"}},{"scope":["entity.other.attribute-name.class"],"settings":{"foreground":"#E6C384"}},{"scope":["source.sass keyword.control"],"settings":{"foreground":"#7FB4CA"}},{"scope":["markup.inserted"],"settings":{"foreground":"#76946A"}},{"scope":["markup.deleted"],"settings":{"foreground":"#C34043"}},{"scope":["markup.changed"],"settings":{"foreground":"#DCA561"}},{"scope":["string.regexp"],"settings":{"foreground":"#C0A36E"}},{"scope":["constant.character.escape"],"settings":{"foreground":"#7FB4CA"}},{"scope":["*url*","*link*","*uri*"],"settings":{"fontStyle":"underline"}},{"scope":["tag.decorator.js entity.name.tag.js","tag.decorator.js punctuation.definition.tag.js"],"settings":{"foreground":"#957FB8"}},{"scope":["source.js constant.other.object.key.js string.unquoted.label.js"],"settings":{"foreground":"#FF5D62"}},{"scope":["source.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#D27E99"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#E6C384"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#FFA066"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#FF5D62"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#FFA066"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#7E9CD8"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#D27E99"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#957FB8"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#98BB6C"}},{"scope":["meta.tag JSXNested","meta.jsx.children","text.html","text.log"],"settings":{"foreground":"#DCD7BA"}},{"scope":["text.html.markdown","punctuation.definition.list_item.markdown"],"settings":{"foreground":"#DCD7BA"}},{"scope":["text.html.markdown markup.inline.raw.markdown"],"settings":{"foreground":"#957FB8"}},{"scope":["text.html.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown"],"settings":{"foreground":"#957FB8"}},{"scope":["markdown.heading","entity.name.section.markdown","markup.heading.markdown"],"settings":{"foreground":"#7E9CD8"}},{"scope":["markup.italic"],"settings":{"fontStyle":"italic","foreground":"#E46876"}},{"scope":["markup.bold","markup.bold string"],"settings":{"fontStyle":"bold"}},{"scope":["markup.bold markup.italic","markup.italic markup.bold","markup.quote markup.bold","markup.bold markup.italic string","markup.italic markup.bold string","markup.quote markup.bold string"],"settings":{"fontStyle":"bold","foreground":"#E46876"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline","foreground":"#7FB4CA"}},{"scope":["markup.quote punctuation.definition.blockquote.markdown"],"settings":{"foreground":"#727169"}},{"scope":["markup.quote"],"settings":{"fontStyle":"italic"}},{"scope":["string.other.link.title.markdown"],"settings":{"foreground":"#FFA066"}},{"scope":["string.other.link.description.title.markdown"],"settings":{"foreground":"#957FB8"}},{"scope":["constant.other.reference.link.markdown"],"settings":{"foreground":"#E6C384"}},{"scope":["markup.raw.block"],"settings":{"foreground":"#957FB8"}},{"scope":["markup.raw.block.fenced.markdown"],"settings":{"foreground":"#727169"}},{"scope":["punctuation.definition.fenced.markdown"],"settings":{"foreground":"#727169"}},{"scope":["markup.raw.block.fenced.markdown","variable.language.fenced.markdown","punctuation.section.class.end"],"settings":{"foreground":"#DCD7BA"}},{"scope":["variable.language.fenced.markdown"],"settings":{"foreground":"#727169"}},{"scope":["meta.separator"],"settings":{"fontStyle":"bold","foreground":"#9CABCA"}},{"scope":["markup.table"],"settings":{"foreground":"#DCD7BA"}}],"type":"dark"}`));export{e as default};
@@ -1 +0,0 @@
1
- import{_ as e,b as t,g as n,h as r,m as i,v as a,x as o,y as s}from"./bedrock-camp-qpZqnqLa.js";var c=o(),l=t(),u=s(),d=a(),f=e(),p=n(),m=r(),h=i(),g=c.stream,_=c.streamSimple;l.stream,l.streamSimple,u.stream,u.streamSimple,d.stream,d.streamSimple,f.stream,f.streamSimple;var v=p.stream,y=p.streamSimple,b=m.stream,x=m.streamSimple,S=h.stream,C=h.streamSimple;export{_ as a,C as c,S as i,v as n,y as o,b as r,x as s,g as t};
@@ -1 +0,0 @@
1
- import{S as e,_ as t,b as n,g as r,h as i,v as a,x as o,y as s}from"./bedrock-camp-B0KF_4RS.js";const c=e(),l=o(),u=n(),d=s(),f=a(),p=t(),m=r(),h=i(),g=c.stream,_=c.streamSimple;l.stream,l.streamSimple,u.stream,u.streamSimple,d.stream,d.streamSimple,f.stream,f.streamSimple;const v=p.stream,y=p.streamSimple,b=m.stream,x=m.streamSimple,S=h.stream,C=h.streamSimple;export{_ as a,C as c,S as i,v as n,y as o,b as r,x as s,g as t};
@@ -1,4 +0,0 @@
1
- const e=`plugin.json`,t=new Set([`$schema`,`name`,`version`,`description`,`author`,`homepage`,`repository`,`license`,`keywords`,`extensions`]),n=new Set([`name`,`email`,`url`]);function r(e){return!(e.length<1||e.length>64||!/^[a-z0-9.-]+$/.test(e)||!/^[a-z0-9]/.test(e)||!/[a-z0-9]$/.test(e)||e.includes(`--`)||e.includes(`..`))}async function i(e,t){let n=[],r=b(t);if((await C(e,r))?.type!==`directory`)return n.push(x(`manifest`,`plugin root is not a directory: ${r}`)),{ok:!1,diagnostics:n};let i=await a(e,r,n);return i?{ok:!0,plugin:{root:r,manifest:i,skills:await l(e,r,n),mcp:await p(e,r,n)},diagnostics:n}:{ok:!1,diagnostics:n}}async function a(n,i,a){let s=`${i}/${e}`;if((await C(n,s))?.type!==`file`)return a.push(x(`manifest`,`missing ${e} at plugin root`)),null;let c;try{c=JSON.parse(await n.readTextFile(s))}catch(e){return a.push(x(`manifest`,`plugin.json is not valid JSON: ${e instanceof Error?e.message:e}`)),null}if(typeof c!=`object`||!c||Array.isArray(c))return a.push(x(`manifest`,`plugin.json must contain a top-level object`)),null;let l=c;for(let e of Object.keys(l))t.has(e)||(a.push(S(`manifest`,`unknown field "${e}" ignored`)),delete l[e]);return typeof l.$schema!=`string`||l.$schema.length===0?(a.push(x(`manifest`,`required field "$schema" is missing or not a string`)),null):l.$schema===`https://agent-plugins.org/schemas/1.0.0/plugin.schema.json`?typeof l.name!=`string`||l.name.length===0?(a.push(x(`manifest`,`required field "name" is missing or not a string`)),null):r(l.name)?o(l,a):(a.push(x(`manifest`,`invalid plugin name "${l.name}" (§5.5)`)),null):(a.push(x(`manifest`,`unsupported Agent Plugins version: ${l.$schema} (supported: 1.0.0)`)),null)}function o(e,t){let n=s(e);if(n)return t.push(x(`manifest`,n)),null;if(`extensions`in e){let n=e.extensions;if(typeof n!=`object`||!n||Array.isArray(n))t.push(S(`manifest`,`field "extensions" is not an object; ignored`)),delete e.extensions;else{let e=c(n);if(e)return t.push(x(`manifest`,e)),null}}return e}function s(e){for(let t of[`version`,`description`,`homepage`,`repository`,`license`])if(t in e&&typeof e[t]!=`string`)return`field "${t}" must be a string`;if(`keywords`in e){let t=e.keywords;if(!Array.isArray(t)||t.some(e=>typeof e!=`string`))return`field "keywords" must be an array of strings`}if(`author`in e){let t=e.author;if(typeof t!=`object`||!t||Array.isArray(t))return`field "author" must be an object`;for(let[e,r]of Object.entries(t))if(!n.has(e)||typeof r!=`string`)return`invalid "author" field "${e}"`}return null}function c(e){for(let[t,n]of Object.entries(e))if(typeof n!=`object`||!n||Array.isArray(n))return`extensions namespace "${t}" must map to an object`;return null}async function l(e,t,n){let r=`${t}/skills`,i=await C(e,r);if(!i)return[];if(i.type!==`directory`)return n.push(S(`skills`,`"skills" exists but is not a directory; component skipped`)),[];let a;try{a=await e.readDir(r)}catch(e){return n.push(S(`skills`,`cannot read skills/: ${e instanceof Error?e.message:e}`)),[]}let o=[];for(let t of[...a].sort((e,t)=>e.name.localeCompare(t.name))){if(t.type!==`directory`)continue;let i=`${r}/${t.name}`,a=`${i}/SKILL.md`;if((await C(e,a))?.type===`file`)try{let r=u(await e.readTextFile(a));if(!r.name||!r.description){n.push(S(`skills`,`skill "${t.name}" skipped: SKILL.md missing name/description`));continue}o.push({name:t.name,path:i,skillFilePath:a,description:r.description})}catch(e){n.push(S(`skills`,`skill "${t.name}" skipped: ${e instanceof Error?e.message:e}`))}}return o}function u(e){let t=e.replace(/^\uFEFF/,``).replace(/\r\n?/g,`
2
- `).trimStart().match(/^---\s*\n([\s\S]*?)\n---/);if(!t)return{};let n={},r=t[1].split(`
3
- `);for(let e=0;e<r.length;e+=1){let t=r[e].match(/^(name|description):\s*(.*)$/);if(!t)continue;let i=t[2].trim(),a=i.match(/^([>|])[+-]?$/),o=a?f(r,e+1,a[1]===`>`?` `:`
4
- `):d(i);t[1]===`name`?n.name=o:n.description=o}return n}function d(e){let t=e[0];if((t===`"`||t===`'`)&&e.length>=2&&e.endsWith(t)){let n=e.slice(1,-1);return t===`"`?n.replace(/\\(["\\])/g,`$1`):n.replace(/''/g,`'`)}return e}function f(e,t,n){let r=[];for(let n=t;n<e.length;n+=1){let t=e[n];if(t.trim()!==``){if(!/^\s/.test(t))break;r.push(t.trim())}}return r.join(n)}async function p(e,t,n){let r=`${t}/mcp.json`,i=await C(e,r);if(!i)return{status:`absent`,servers:[]};if(i.type!==`file`)return n.push(S(`mcp`,`"mcp.json" exists but is not a regular file; MCP disabled`)),{status:`invalid`,servers:[]};let a;try{a=JSON.parse(await e.readTextFile(r))}catch(e){return n.push(S(`mcp`,`mcp.json is not valid JSON: ${e instanceof Error?e.message:e}; MCP disabled`)),{status:`invalid`,servers:[]}}if(typeof a!=`object`||!a||Array.isArray(a))return n.push(S(`mcp`,`mcp.json must contain a top-level object; MCP disabled`)),{status:`invalid`,servers:[]};let o=a,s=Object.keys(o).filter(e=>e!==`$schema`&&e!==`mcpServers`);if(s.length>0)return n.push(S(`mcp`,`mcp.json has unexpected top-level fields (${s.join(`, `)}); MCP disabled`)),{status:`invalid`,servers:[]};if(o.$schema!==`https://agent-plugins.org/schemas/1.0.0/mcp.schema.json`)return n.push(S(`mcp`,`mcp.json $schema is missing or targets an unsupported version; MCP disabled`)),{status:`invalid`,servers:[]};let c=o.mcpServers;if(typeof c!=`object`||!c||Array.isArray(c))return n.push(S(`mcp`,`mcp.json "mcpServers" must be an object; MCP disabled`)),{status:`invalid`,servers:[]};let l=[];for(let[e,t]of Object.entries(c)){let r=g(e,t);r.status!==`supported`&&n.push(S(`mcp`,`server "${e}" skipped: ${r.reason}`)),l.push(r)}return{status:`loaded`,servers:l}}const m=new Set([`type`,`command`,`args`,`env`,`cwd`]),h=new Set([`type`,`url`,`headers`]);function g(e,t){if(typeof t!=`object`||!t||Array.isArray(t))return{name:e,status:`invalid`,reason:`server entry must be an object`};let n=t,r=n.type;if(r===`stdio`){let t=Object.keys(n).filter(e=>!m.has(e));return t.length>0?{name:e,status:`invalid`,reason:`unknown field(s): ${t.join(`, `)}`}:typeof n.command!=`string`||n.command.length===0?{name:e,status:`invalid`,reason:`"command" must be a non-empty string`}:{name:e,status:`unsupported-transport`,reason:`stdio transport is unsupported (slicc cannot launch subprocesses in the browser)`}}if(r===`streamable-http`||r===`sse`){let t=Object.keys(n).filter(e=>!h.has(e));if(t.length>0)return{name:e,status:`invalid`,reason:`unknown field(s): ${t.join(`, `)}`};let i=_(n.url);if(i)return{name:e,status:`invalid`,reason:i};let a=y(n.headers);return a?{name:e,status:`invalid`,reason:a}:r===`sse`?{name:e,status:`unsupported-transport`,reason:`legacy HTTP+SSE transport is unsupported (streamable-http only)`}:{name:e,status:`supported`,config:{type:r,url:n.url,...n.headers?{headers:n.headers}:{}}}}return{name:e,status:`invalid`,reason:`unknown transport type "${String(r)}"`}}function _(e){if(typeof e!=`string`)return`"url" must be a string`;let t;try{t=new URL(e)}catch{return`"url" is not an absolute URL: ${e}`}return t.protocol!==`https:`&&t.protocol!==`http:`?`"url" must be HTTP or HTTPS: ${e}`:t.username||t.password?`"url" must not contain user information`:t.hash?`"url" must not contain a fragment`:t.protocol===`http:`&&!v(t.hostname)?`non-loopback endpoints must use HTTPS`:null}function v(e){return!!(e===`localhost`||/^127(\.\d{1,3}){3}$/.test(e)||e===`[::1]`||e===`::1`)}function y(e){if(e===void 0)return null;if(typeof e!=`object`||!e||Array.isArray(e))return`"headers" must be an object of strings`;let t=new Set;for(let[n,r]of Object.entries(e)){if(typeof r!=`string`)return`header "${n}" must have a string value`;if(!/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/.test(n))return`invalid header name "${n}"`;let e=n.toLowerCase();if(t.has(e))return`duplicate header name "${n}" (case-insensitive)`;t.add(e)}return null}function b(e){let t=e.replace(/\/+/g,`/`);return t.length>1?t.replace(/\/$/,``):t}function x(e,t){return{level:`error`,component:e,message:t}}function S(e,t){return{level:`warning`,component:e,message:t}}async function C(e,t){try{return await e.stat(t)}catch{return null}}export{i as loadPluginFromDirectory};
@@ -1,22 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/setup-feature-flags-remote-DtLgZPds.js","assets/feature-flags-ByMXaIc4.js","assets/tray-runtime-config-CRGwg9SK.js","assets/src-CAWTvdAa.js","assets/proxied-fetch-B4g-4VbQ.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/preload-helper-Czpn1I53.js","assets/base64-DpPqYZJF.js","assets/runtime-env-Dlaokqg1.js","assets/fetch-body-D2PwksUW.js","assets/messages-BD4p8GuF.js","assets/wc-shell-DrXzWzBs.js","assets/image-markers-BXtVm4og.js","assets/telemetry-BVzuNdvW.js","assets/runtime-env-CgsZ7LTp.js","assets/runtime-env-E-i2SW1s.js","assets/html-B_Hg2WOy.js","assets/icons-ZLR7gmJ4.js","assets/dictation-priming-CNllGgNq.js","assets/agent-message-to-chat-_cvF5A5g.js","assets/timestamp-preference-sKwBl5I8.js","assets/src-DsDPrXOS.js","assets/speech-C5U8h4In.js","assets/soundscape-cues-5_sT5Un6.js","assets/panel-registry-CJdOibpf.js","assets/layout-schema-m9_VAwOw.js","assets/trusted-layer-ghPA1ENf.js","assets/wc-scoop-color-CByZNEJo.js","assets/wc-shell-WkeczD9x.css","assets/wc-follower-Di7VVZ0z.js","assets/logger-DDBAeTLF.js","assets/tray-sync-protocol-BZ5yhJH9.js","assets/wc-live-1OpoOfN1.js","assets/account-store-D1f8dn0G.js","assets/bedrock-camp-qpZqnqLa.js","assets/diagnostics-DN_idNHx.js","assets/transform-messages-N_eMsP2M.js","assets/provider-env-CTOcDKrQ.js","assets/__vite-browser-external-5eBdwsFd.js","assets/openrouter.models-gbjkpjE_.js","assets/libesm-BI4UHVqp.js","assets/float-topology-BgioAcOd.js","assets/secret-topology-xLmXoozo.js","assets/secrets-bridge-client-cWDAnFqs.js","assets/port-bridge-client-BbVs1yhx.js","assets/tool-ui-DfXu6quJ.js","assets/providers-BAjAn8LJ.js","assets/panel-rpc-B3MSVImO.js","assets/mime-types-ugOWOUZ9.js","assets/setup-standalone-prelude-B5yx5j_i.js","assets/bridge-launch-params-zrpWWxT3.js","assets/setup-sudo-CGpFS_H9.js","assets/tray-follower-status-BAjnN7Ar.js","assets/src-BWaKqLvQ.js","assets/chat-session-store-pWb1-jNp.js","assets/tray-leader-DcRtwWl-.js","assets/db-DIbBClfy.js","assets/record-Z5ZWTUPJ.js","assets/shared-CddfUR6k.js","assets/export-provider-BEHTjSYw.js","assets/dip-B58NQGEQ.js","assets/permissions-surface-registry-CilCRwhh.js","assets/hid-device-registry-B2R-0rNt.js","assets/serial-port-registry-B3LG5UIy.js","assets/usb-operations-Cgk-otz-.js","assets/usb-device-registry-CRsCisej.js","assets/sprinkle-renderer-D64E-W2o.js","assets/theme-CXRqxpw6.js","assets/theme-engine-By4GU_Wc.js","assets/sprinkle-bridge-CSfksHce.js","assets/session-freezer-DYVYVWZ3.js","assets/attachments-CByeG2Ru.js","assets/types-idfTVsM8.js","assets/follower-presentation-DqBw0YiV.js","assets/host-command-G_JIdBPR.js","assets/browser-DdY1FBRp.js","assets/leader-session-events-CC6poXIx.js","assets/wc-tray-scoops-B2RP8cgD.js","assets/slicc-app-url-BsBryEhn.js","assets/remote-cdp-transport-CgOXLjZ8.js","assets/pending-request-table-Dgn6qYdL.js","assets/tray-sync-protocol-DV_QG_Ey.js","assets/export-spool-Eul4J1RP.js","assets/wc-sprinkles-Hdy-5FTU.js","assets/wc-attach-DsMfUpx8.js","assets/wc-permissions-gFKCQht9.js","assets/oauth-bootstrap-CRJLIz8V.js","assets/provider-settings-DcYK3m1J.js","assets/clipboard-eqmn97SP.js","assets/tray-join-url-BIvzbiFR.js","assets/logger-BoSvu4mW.js","assets/legacy-styles-DcRu2WCJ.js","assets/connect-surface-NkMUeXbQ.js","assets/wc-extension-wBWx11Lq.js","assets/wc-detached-B3WCbbZT.js"])))=>i.map(i=>d[i]);
2
- import"./modulepreload-polyfill-P2Xu9kJm.js";import{a as e}from"./account-store-D1f8dn0G.js";import{t}from"./preload-helper-Czpn1I53.js";import{t as n}from"./logger-DDBAeTLF.js";import{t as r}from"./bridge-launch-params-zrpWWxT3.js";import{n as i,t as a}from"./runtime-env-Dlaokqg1.js";import"./runtime-env-CgsZ7LTp.js";import{t as o}from"./telemetry-BVzuNdvW.js";import{a as s}from"./providers-BAjAn8LJ.js";import{n as c}from"./feature-flags-ByMXaIc4.js";import{o as l,s as u,t as d}from"./setup-standalone-prelude-B5yx5j_i.js";import"./provider-settings-DcYK3m1J.js";var f=`slicc:bridge-config`,p=`slicc:extension-delegate-config`;function m(e){if(!e||typeof e!=`object`)return!1;let t=e;return t.type===`slicc:ext-fetch`&&typeof t.extensionId==`string`&&!!t.request&&typeof t.request==`object`}var h=n(`boot/ext-fetch-delegate`);function g(){let e=globalThis.chrome?.runtime;return e&&typeof e.connect==`function`?e:null}function _(e,t,n){let r=g();if(!r){try{t.postMessage({type:`response-error`,error:`extension-delegate: chrome.runtime.connect unavailable`})}catch{}t.close();return}let i=e.extensionId||n,a;try{a=r.connect(i,{name:`fetch-proxy.fetch`})}catch(e){try{t.postMessage({type:`response-error`,error:`extension-delegate: connect failed — ${e instanceof Error?e.message:String(e)}`})}catch{}t.close();return}let o=!1,s=()=>{o=!0;try{a.disconnect()}catch{}try{t.close()}catch{}};a.onMessage.addListener(e=>{if(o)return;let n=e;try{t.postMessage(n)}catch{}(n.type===`response-end`||n.type===`response-error`)&&s()}),a.onDisconnect.addListener(()=>{if(!o){try{t.postMessage({type:`response-error`,error:`extension-delegate: fetch-proxy port disconnected`})}catch{}s()}}),a.postMessage({type:`request`,...e.request})}function v(e){typeof navigator>`u`||!navigator.serviceWorker||navigator.serviceWorker.addEventListener(`message`,t=>{if(!m(t.data))return;let n=t.ports?.[0];if(!n){h.warn(`delegated fetch envelope arrived without a response port`);return}_(t.data,n,e)})}var y=`slicc_feature_flags_remote`;function b(e){return`${y}:${e}`}function x(e,t){let n=C(t);c(e,w(n,e)??{})}function S(e,t,n){try{e?.setItem(b(t),JSON.stringify(n))}catch{}}function C(e){if(e!==void 0)return e;try{let e=globalThis.localStorage;return typeof e?.getItem!=`function`||typeof e.setItem!=`function`?void 0:e}catch{return}}function w(e,t){try{let n=e?.getItem(b(t));return n?T(JSON.parse(n)):null}catch{return null}}function T(e){return!E(e)||Object.values(e).some(e=>typeof e!=`string`)?null:e}function E(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function D(e,n){x(e,n.storage),t(async()=>{let{refreshFeatureFlagsForPage:e}=await import(`./setup-feature-flags-remote-DtLgZPds.js`);return{refreshFeatureFlagsForPage:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(({refreshFeatureFlagsForPage:t})=>t(e,n)).catch(()=>{})}function O(e){let t=u(e.locationHref,e.isExtension,e.storage);return D(t,e),t}function k(){if(i())return;let e=new Blob([`
3
- let lastPong = Date.now();
4
- let frozen = false;
5
- setInterval(() => {
6
- postMessage({ type: 'ping' });
7
- const elapsed = Date.now() - lastPong;
8
- if (elapsed > 5000 && !frozen) {
9
- frozen = true;
10
- postMessage({ type: 'freeze-detected', elapsed });
11
- }
12
- }, 2000);
13
- self.onmessage = (e) => {
14
- if (e.data.type === 'pong') {
15
- lastPong = Date.now();
16
- if (frozen) {
17
- frozen = false;
18
- postMessage({ type: 'freeze-recovered' });
19
- }
20
- }
21
- };
22
- `],{type:`application/javascript`}),t=URL.createObjectURL(e),n=new Worker(t);URL.revokeObjectURL(t),n.onmessage=e=>{if(e.data.type===`ping`)n.postMessage({type:`pong`});else if(e.data.type===`freeze-detected`)console.error(`[freeze-watchdog] Main thread blocked for ${e.data.elapsed}ms — capturing trace on recovery`);else if(e.data.type===`freeze-recovered`){console.error(`[freeze-watchdog] Main thread recovered. Stack trace at recovery point:`),console.trace(`[freeze-watchdog] recovery stack`);let e=performance.getEntriesByType(`longtask`);e.length>0&&console.error(`[freeze-watchdog] Long tasks:`,e.map(e=>({duration:e.duration,startTime:e.startTime,name:e.name})))}},window.addEventListener(`beforeunload`,()=>{n.terminate()},{once:!0})}var A=`slicc-nuke-control`,j=[`slicc:welcome-flow-fired`,`slicc.trayJoinUrl`,`slicc.trayWorkerBaseUrl`];function M(e=()=>location.reload()){if(typeof BroadcastChannel!=`function`)return()=>{};let t=new BroadcastChannel(A),n=t=>{let n=t.data;if(n?.type===`nuke-reload`){if(Array.isArray(n.keysToRemove)){for(let e of n.keysToRemove)if(typeof e==`string`)try{localStorage.removeItem(e)}catch{}}e()}};return t.addEventListener(`message`,n),()=>{t.removeEventListener(`message`,n),t.close()}}var N=null;function P(){return N||(N=M(),N)}var F=n(`boot/sw-registration`);async function I(e=null,t=null){let n=(()=>{try{return new URL(window.location.href).searchParams.get(`connect`)===`1`}catch{return!1}})();if(`serviceWorker`in navigator&&n&&await z())return`reload-pending`;if(!(`serviceWorker`in navigator)||n)return`ready`;try{if(await navigator.serviceWorker.register(`/preview-sw.js`,{scope:`/preview/`}),F.info(`Preview SW registered`),!i())try{await navigator.serviceWorker.register(`/llm-proxy-sw.js`,{scope:`/`}),F.info(`LLM-proxy SW registered`)}catch(e){F.error(`LLM-proxy SW registration failed — cross-origin LLM calls will hit CORS`,e)}if(navigator.serviceWorker.controller||await Promise.race([new Promise(e=>navigator.serviceWorker.addEventListener(`controllerchange`,()=>e(),{once:!0})),new Promise(e=>setTimeout(e,1500))]),!navigator.serviceWorker.controller&&!sessionStorage.getItem(`slicc-sw-reloaded`))return sessionStorage.setItem(`slicc-sw-reloaded`,`1`),F.info(`Reloading once to gain SW control`),location.reload(),`reload-pending`;sessionStorage.removeItem(`slicc-sw-reloaded`),e&&(L(e),navigator.serviceWorker.addEventListener(`controllerchange`,()=>{L(e)})),t&&(R(t),navigator.serviceWorker.addEventListener(`controllerchange`,()=>{R(t)}))}catch(e){F.error(`Preview SW registration failed — preview feature will not work`,e)}return`ready`}function L(e){let t=navigator.serviceWorker.controller;if(!t)return;let n={type:f,apiBaseUrl:e.apiBaseUrl,token:e.token};try{t.postMessage(n)}catch(e){F.warn(`LLM-proxy SW bridge-config postMessage failed`,e)}}function R(e){let t=navigator.serviceWorker.controller;if(!t)return;let n={type:p,extensionId:e.extensionId};try{t.postMessage(n)}catch(e){F.warn(`LLM-proxy SW extension-delegate postMessage failed`,e)}}async function z(){try{let e=await navigator.serviceWorker.getRegistrations();if(await Promise.all(e.map(e=>e.unregister().catch(()=>!1))),navigator.serviceWorker.controller&&!sessionStorage.getItem(`slicc-connect-sw-cleared`))return sessionStorage.setItem(`slicc-connect-sw-cleared`,`1`),F.info(`connect mode: detaching from service worker (no proxy on worker origin)`),location.reload(),!0;sessionStorage.removeItem(`slicc-connect-sw-cleared`)}catch(e){F.error(`connect-mode SW cleanup failed`,e)}return!1}var B=n(`main`);function V(e){try{return new URL(e).searchParams.has(`ui-fixture`)}catch{return!1}}async function H(){l();let n=document.getElementById(`app`);if(!n)throw Error(`#app element not found`);let c=i(),u=O({locationHref:window.location.href,storage:window.localStorage,envBaseUrl:null,isDev:!1,isExtension:c});if(V(window.location.href)){let{mountWcUiPreview:e}=await t(async()=>{let{mountWcUiPreview:e}=await import(`./wc-shell-DrXzWzBs.js`).then(e=>e.o);return{mountWcUiPreview:e}},__vite__mapDeps([11,5,6,3,12,13,8,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28]));e(n);return}k(),P(),u!==`connect`&&o().catch(()=>{});let f=r(window.location.search),p=u===`cherry`?null:d(window.location.search),m=!!p&&a();if(await I(f?{apiBaseUrl:f.apiBaseUrl,token:f.token}:null,m&&p?{extensionId:p.extensionId}:null)===`reload-pending`)return;if(!c&&(u===`follower`||u===`cherry`)){let{mountWcUiFollower:e}=await t(async()=>{let{mountWcUiFollower:e}=await import(`./wc-follower-Di7VVZ0z.js`);return{mountWcUiFollower:e}},__vite__mapDeps([29,6,30,3,31,32,5,33,34,35,36,37,38,39,40,4,7,8,9,41,15,42,43,44,12,45,46,47,48,13,14,1,2,10,49,50,51,52,53,16,54,55,56,57,58,18,59,60,61,62,63,64,65,66,67,68,69,70,71,72,17,19,11,20,21,22,23,24,25,26,27,28,73,74,75,76,77,78,79,80,81,82,83,84,85]));return e(n,B,u)}await s(),e();let{bootstrapOAuthReplicas:h}=await t(async()=>{let{bootstrapOAuthReplicas:e}=await import(`./oauth-bootstrap-CRJLIz8V.js`);return{bootstrapOAuthReplicas:e}},__vite__mapDeps([86,33,5,6,34,35,36,37,38,39,40,30,3,4,7,8,9,41,15,42,43,44,12,45,46,47,87,13,14,2,10,52,88,89,90]));if(await Promise.race([h().catch(e=>{B.error(`OAuth bootstrap failed`,e)}),new Promise(e=>setTimeout(e,1e4))]),u===`connect`){globalThis.__slicc_connect_mode=!0;let{loadLegacyStyles:e}=await t(async()=>{let{loadLegacyStyles:e}=await import(`./legacy-styles-DcRu2WCJ.js`);return{loadLegacyStyles:e}},__vite__mapDeps([91,6]));await e();let{mountConnectSurface:r}=await t(async()=>{let{mountConnectSurface:e}=await import(`./connect-surface-NkMUeXbQ.js`);return{mountConnectSurface:e}},__vite__mapDeps([92,33,5,6,34,35,36,37,38,39,40,30,3,4,7,8,9,41,15,42,43,44,12,45,46,47,87,13,14,2,10,52,88,89]));await r(n);return}if(c){let{mountWcUiExtension:e}=await t(async()=>{let{mountWcUiExtension:e}=await import(`./wc-extension-wBWx11Lq.js`);return{mountWcUiExtension:e}},__vite__mapDeps([93,6,32,5,33,34,35,36,37,38,39,40,30,3,4,7,8,9,41,15,42,43,44,12,45,46,47,48,13,14,1,2,10,49,50,51,52,53,16,54,55,56,57,58,18,59,60,61,62,63,64,65,66,67,68,69,70,71,72,17,19,11,20,21,22,23,24,25,26,27,28,73,74,75,76,94]));return e(n,B,u===`extension-detached`)}m&&p&&v(p.extensionId);let{mountWcUiLive:g}=await t(async()=>{let{mountWcUiLive:e}=await import(`./wc-live-1OpoOfN1.js`).then(e=>e.r);return{mountWcUiLive:e}},__vite__mapDeps([32,5,33,6,34,35,36,37,38,39,40,30,3,4,7,8,9,41,15,42,43,44,12,45,46,47,48,13,14,1,2,10,49,50,51,52,53,16,54,55,56,57,58,18,59,60,61,62,63,64,65,66,67,68,69,70,71,72,17,19,11,20,21,22,23,24,25,26,27,28,73,74,75,76]));return g(n,B,u)}function U(e,t){let n=document.createElement(`div`);n.style.cssText=`padding:2rem;text-align:center;font-family:system-ui;`;let r=document.createElement(`h1`);r.textContent=`Failed to start`;let i=document.createElement(`p`);i.textContent=t instanceof Error?t.message:String(t);let a=document.createElement(`button`);a.type=`button`,a.textContent=`Reload`,a.addEventListener(`click`,()=>location.reload()),n.append(r,i,a),e.replaceChildren(n)}async function W(e,n){let r;try{({renderBootRecoveryScreen:r}=await t(()=>import(`./recovery-screen-CC3JYs-j.js`),[]))}catch{U(e,n);return}if(r(e,n),n instanceof Error&&n.message.includes(`did not signal ready`))try{let{triageModuleWorkerHealth:i}=await t(async()=>{let{triageModuleWorkerHealth:e}=await import(`./worker-triage-BvsMZrdR.js`);return{triageModuleWorkerHealth:e}},[]),a=await i();a===`browser-wedged`&&r(e,n,{verdict:a})}catch{}}H().catch(e=>{B.error(`Fatal error`,e);let t=document.getElementById(`app`);t&&W(t,e)});export{C as n,S as r,j as t};
@@ -1 +0,0 @@
1
- import e from"./html-derivative-B3p5VrMH.js";import t from"./yaml-rwi0_p6S.js";import n from"./markdown-BYOwaDjH.js";var r=Object.freeze(JSON.parse(`{"displayName":"MDC","injectionSelector":"L:text.html.markdown","name":"mdc","patterns":[{"include":"text.html.markdown#frontMatter"},{"include":"#block"}],"repository":{"attribute":{"patterns":[{"captures":{"2":{"name":"entity.other.attribute-name.html"},"3":{"patterns":[{"include":"#attribute-interior"}]}},"match":"(([^<=>\\\\s]*)(=\\"([^\\"]*)(\\")|'([^']*)(')|=[^\\"'}\\\\s]*)?\\\\s*)"}]},"attribute-interior":{"patterns":[{"begin":"=","beginCaptures":{"0":{"name":"punctuation.separator.key-value.html"}},"end":"(?<=[^=\\\\s])(?!\\\\s*=)|(?=/?>)","patterns":[{"match":"([^\\"'/<=>\`\\\\s]|/(?!>))+","name":"string.unquoted.html"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.double.html","patterns":[{"include":"#entities"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.single.html","patterns":[{"include":"#entities"}]},{"match":"=","name":"invalid.illegal.unexpected-equals-sign.html"}]}]},"attributes":{"captures":{"1":{"name":"punctuation.definition.tag.start.component"},"3":{"patterns":[{"include":"#attribute"}]},"4":{"name":"punctuation.definition.tag.end.component"}},"match":"((\\\\{)([^{]*)(}))","name":"attributes.mdc"},"block":{"patterns":[{"include":"#inline"},{"include":"#component_block"},{"include":"text.html.markdown#separator"},{"include":"#heading"},{"include":"#blockquote"},{"include":"#lists"},{"include":"text.html.markdown#fenced_code_block"},{"include":"text.html.markdown#link-def"},{"include":"text.html.markdown#html"},{"include":"#paragraph"}]},"blockquote":{"begin":"(^|\\\\G) *(>) ?","captures":{"2":{"name":"punctuation.definition.quote.begin.markdown"}},"name":"markup.quote.markdown","patterns":[{"include":"#block"}],"while":"(^|\\\\G)\\\\s*(>) ?"},"component_block":{"begin":"(^|\\\\G)(\\\\s*)(:{2,})(?i:(\\\\w[-\\\\w\\\\d]+)(\\\\s*|\\\\s*(\\\\{[^{]*}))$)","beginCaptures":{"3":{"name":"punctuation.definition.tag.start.mdc"},"4":{"name":"entity.name.tag.mdc"},"5":{"patterns":[{"include":"#attributes"}]}},"end":"(^|\\\\G)(\\\\2)(\\\\3)\\\\s*$","endCaptures":{"3":{"name":"punctuation.definition.tag.end.mdc"}},"name":"block.component.mdc","patterns":[{"captures":{"2":{"name":"punctuation.definition.tag.end.mdc"}},"match":"(^|\\\\G)\\\\s*(:{2,})$"},{"begin":"(^|\\\\G)(\\\\s*)(-{3})(\\\\s*)$","end":"(^|\\\\G)(\\\\s*(-{3})(\\\\s*))$","patterns":[{"include":"source.yaml"}]},{"captures":{"2":{"name":"entity.other.attribute-name.html"},"3":{"name":"comment.block.html"}},"match":"^(\\\\s*)(#[-_\\\\w]*)\\\\s*(<!--(.*)-->)?$"},{"include":"#block"}]},"component_inline":{"captures":{"2":{"name":"punctuation.definition.tag.start.component"},"3":{"name":"entity.name.tag.component"},"5":{"patterns":[{"include":"#attributes"}]},"6":{"patterns":[{"include":"#span"}]},"7":{"patterns":[{"include":"#span"}]},"8":{"patterns":[{"include":"#attributes"}]}},"match":"(^|\\\\G|\\\\s+)(:)(?i:(\\\\w[-\\\\w\\\\d]*))((\\\\{[^}]*})(\\\\[[^]]*])?|(\\\\[[^]]*])(\\\\{[^}]*})?)?\\\\s","name":"inline.component.mdc"},"entities":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.entity.html"},"912":{"name":"punctuation.definition.entity.html"}},"match":"(&)(?=[A-Za-z])((a(s(ymp(eq)?|cr|t)|n(d(slope|[dv]|and)?|g(s(t|ph)|zarr|e|le|rt(vb(d)?)?|msd(a([a-h]))?)?)|c(y|irc|d|ute|E)?|tilde|o(pf|gon)|uml|p(id|os|prox(eq)?|[Ee]|acir)?|elig|f(r)?|w((?:con|)int)|l(pha|e(ph|fsym))|acute|ring|grave|m(p|a(cr|lg))|breve)|A(s(sign|cr)|nd|MP|c(y|irc)|tilde|o(pf|gon)|uml|pplyFunction|fr|Elig|lpha|acute|ring|grave|macr|breve))|(B(scr|cy|opf|umpeq|e(cause|ta|rnoullis)|fr|a(ckslash|r(v|wed))|reve)|b(s(cr|im(e)?|ol(hsub|b)?|emi)|n(ot|e(quiv)?)|c(y|ong)|ig(s(tar|qcup)|c(irc|up|ap)|triangle(down|up)|o(times|dot|plus)|uplus|vee|wedge)|o(t(tom)?|pf|wtie|x(h([DUdu])?|times|H([DUdu])?|d([LRlr])|u([LRlr])|plus|D([LRlr])|v([HLRhlr])?|U([LRlr])|V([HLRhlr])?|minus|box))|Not|dquo|u(ll(et)?|mp(e(q)?|E)?)|prime|e(caus(e)?|t(h|ween|a)|psi|rnou|mptyv)|karow|fr|l(ock|k(1([24])|34)|a(nk|ck(square|triangle(down|left|right)?|lozenge)))|a(ck(sim(eq)?|cong|prime|epsilon)|r(vee|wed(ge)?))|r(eve|vbar)|brk(tbrk)?))|(c(s(cr|u(p(e)?|b(e)?))|h(cy|i|eck(mark)?)|ylcty|c(irc|ups(sm)?|edil|a(ps|ron))|tdot|ir(scir|c(eq|le(d(R|circ|S|dash|ast)|arrow(left|right)))?|e|fnint|E|mid)?|o(n(int|g(dot)?)|p(y(sr)?|f|rod)|lon(e(q)?)?|m(p(fn|le(xes|ment))?|ma(t)?))|dot|u(darr([lr])|p(s|c([au]p)|or|dot|brcap)?|e(sc|pr)|vee|wed|larr(p)?|r(vearrow(left|right)|ly(eq(succ|prec)|vee|wedge)|arr(m)?|ren))|e(nt(erdot)?|dil|mptyv)|fr|w((?:con|)int)|lubs(uit)?|a(cute|p(s|c([au]p)|dot|and|brcup)?|r(on|et))|r(oss|arr))|C(scr|hi|c(irc|onint|edil|aron)|ircle(Minus|Times|Dot|Plus)|Hcy|o(n(tourIntegral|int|gruent)|unterClockwiseContourIntegral|p(f|roduct)|lon(e)?)|dot|up(Cap)?|OPY|e(nterDot|dilla)|fr|lo(seCurly((?:Double|)Quote)|ckwiseContourIntegral)|a(yleys|cute|p(italDifferentialD)?)|ross))|(d(s(c([ry])|trok|ol)|har([lr])|c(y|aron)|t(dot|ri(f)?)|i(sin|e|v(ide(ontimes)?|onx)?|am(s|ond(suit)?)?|gamma)|Har|z(cy|igrarr)|o(t(square|plus|eq(dot)?|minus)?|ublebarwedge|pf|wn(harpoon(left|right)|downarrows|arrow)|llar)|d(otseq|a(rr|gger))?|u(har|arr)|jcy|e(lta|g|mptyv)|f(isht|r)|wangle|lc(orn|rop)|a(sh(v)?|leth|rr|gger)|r(c(orn|rop)|bkarow)|b(karow|lac)|Arr)|D(s(cr|trok)|c(y|aron)|Scy|i(fferentialD|a(critical(Grave|Tilde|Do(t|ubleAcute)|Acute)|mond))|o(t(Dot|Equal)?|uble(Right(Tee|Arrow)|ContourIntegral|Do(t|wnArrow)|Up((?:Down|)Arrow)|VerticalBar|L(ong(RightArrow|Left((?:Right|)Arrow))|eft(RightArrow|Tee|Arrow)))|pf|wn(Right(TeeVector|Vector(Bar)?)|Breve|Tee(Arrow)?|arrow|Left(RightVector|TeeVector|Vector(Bar)?)|Arrow(Bar|UpArrow)?))|Zcy|el(ta)?|D(otrahd)?|Jcy|fr|a(shv|rr|gger)))|(e(s(cr|im|dot)|n(sp|g)|c(y|ir(c)?|olon|aron)|t([ah])|o(pf|gon)|dot|u(ro|ml)|p(si(v|lon)?|lus|ar(sl)?)|e|D(D??ot)|q(s(im|lant(less|gtr))|c(irc|olon)|u(iv(DD)?|est|als)|vparsl)|f(Dot|r)|l(s(dot)?|inters|l)?|a(ster|cute)|r(Dot|arr)|g(s(dot)?|rave)?|x(cl|ist|p(onentiale|ectation))|m(sp(1([34]))?|pty(set|v)?|acr))|E(s(cr|im)|c(y|irc|aron)|ta|o(pf|gon)|NG|dot|uml|TH|psilon|qu(ilibrium|al(Tilde)?)|fr|lement|acute|grave|x(ists|ponentialE)|m(pty((?:|Very)SmallSquare)|acr)))|(f(scr|nof|cy|ilig|o(pf|r(k(v)?|all))|jlig|partint|emale|f(ilig|l(l??ig)|r)|l(tns|lig|at)|allingdotseq|r(own|a(sl|c(1([2-68])|78|2([35])|3([458])|45|5([68])))))|F(scr|cy|illed((?:|Very)SmallSquare)|o(uriertrf|pf|rAll)|fr))|(G(scr|c(y|irc|edil)|t|opf|dot|T|Jcy|fr|amma(d)?|reater(Greater|SlantEqual|Tilde|Equal(Less)?|FullEqual|Less)|g|breve)|g(s(cr|im([el])?)|n(sim|e(q(q)?)?|E|ap(prox)?)|c(y|irc)|t(c(c|ir)|dot|quest|lPar|r(sim|dot|eq(q?less)|less|a(pprox|rr)))?|imel|opf|dot|jcy|e(s(cc|dot(o(l)?)?|l(es)?)?|q(slant|q)?|l)?|v(nE|ertneqq)|fr|E(l)?|l([Eaj])?|a(cute|p|mma(d)?)|rave|g(g)?|breve))|(h(s(cr|trok|lash)|y(phen|bull)|circ|o(ok((?:lef|righ)tarrow)|pf|arr|rbar|mtht)|e(llip|arts(uit)?|rcon)|ks([ew]arow)|fr|a(irsp|lf|r(dcy|r(cir|w)?)|milt)|bar|Arr)|H(s(cr|trok)|circ|ilbertSpace|o(pf|rizontalLine)|ump(DownHump|Equal)|fr|a(cek|t)|ARDcy))|(i(s(cr|in(s(v)?|dot|[Ev])?)|n(care|t(cal|prod|e(rcal|gers)|larhk)?|odot|fin(tie)?)?|c(y|irc)?|t(ilde)?|i(nfin|i(i??nt)|ota)?|o(cy|ta|pf|gon)|u(kcy|ml)|jlig|prod|e(cy|xcl)|quest|f([fr])|acute|grave|m(of|ped|a(cr|th|g(part|e|line))))|I(scr|n(t(e(rsection|gral))?|visible(Comma|Times))|c(y|irc)|tilde|o(ta|pf|gon)|dot|u(kcy|ml)|Ocy|Jlig|fr|Ecy|acute|grave|m(plies|a(cr|ginaryI))?))|(j(s(cr|ercy)|c(y|irc)|opf|ukcy|fr|math)|J(s(cr|ercy)|c(y|irc)|opf|ukcy|fr))|(k(scr|hcy|c(y|edil)|opf|jcy|fr|appa(v)?|green)|K(scr|c(y|edil)|Hcy|opf|Jcy|fr|appa))|(l(s(h|cr|trok|im([eg])?|q(uo(r)?|b)|aquo)|h(ar(d|u(l)?)|blk)|n(sim|e(q(q)?)?|E|ap(prox)?)|c(y|ub|e(d??il)|aron)|Barr|t(hree|c(c|ir)|imes|dot|quest|larr|r(i([ef])?|Par))?|Har|o(ng(left((?:|right)arrow)|rightarrow|mapsto)|times|z(enge|f)?|oparrow(left|right)|p(f|lus|ar)|w(ast|bar)|a(ng|rr)|brk)|d(sh|ca|quo(r)?|r((?:d|us)har))|ur((?:ds|u)har)|jcy|par(lt)?|e(s(s(sim|dot|eq(q?gtr)|approx|gtr)|cc|dot(o(r)?)?|g(es)?)?|q(slant|q)?|ft(harpoon(down|up)|threetimes|leftarrows|arrow(tail)?|right(squigarrow|harpoons|arrow(s)?))|g)?|v(nE|ertneqq)|f(isht|loor|r)|E(g)?|l(hard|corner|tri|arr)?|a(ng(d|le)?|cute|t(e(s)?|ail)?|p|emptyv|quo|rr(sim|hk|tl|pl|fs|lp|b(fs)?)?|gran|mbda)|r(har(d)?|corner|tri|arr|m)|g(E)?|m(idot|oust(ache)?)|b(arr|r(k(sl([du])|e)|ac([ek]))|brk)|A(tail|arr|rr))|L(s(h|cr|trok)|c(y|edil|aron)|t|o(ng(RightArrow|left((?:|right)arrow)|rightarrow|Left((?:Right|)Arrow))|pf|wer((?:Righ|Lef)tArrow))|T|e(ss(Greater|SlantEqual|Tilde|EqualGreater|FullEqual|Less)|ft(Right(Vector|Arrow)|Ceiling|T(ee(Vector|Arrow)?|riangle(Bar|Equal)?)|Do(ubleBracket|wn(TeeVector|Vector(Bar)?))|Up(TeeVector|DownVector|Vector(Bar)?)|Vector(Bar)?|arrow|rightarrow|Floor|A(ngleBracket|rrow(RightArrow|Bar)?)))|Jcy|fr|l(eftarrow)?|a(ng|cute|placetrf|rr|mbda)|midot))|(M(scr|cy|inusPlus|opf|u|e(diumSpace|llintrf)|fr|ap)|m(s(cr|tpos)|ho|nplus|c(y|omma)|i(nus(d(u)?|b)?|cro|d(cir|dot|ast)?)|o(dels|pf)|dash|u((?:lti|)map)?|p|easuredangle|DDot|fr|l(cp|dr)|a(cr|p(sto(down|up|left)?)?|l(t(ese)?|e)|rker)))|(n(s(hort(parallel|mid)|c(cue|[er])?|im(e(q)?)?|u(cc(eq)?|p(set(eq(q)?)?|[Ee])?|b(set(eq(q)?)?|[Ee])?)|par|qsu([bp]e)|mid)|Rightarrow|h(par|arr|Arr)|G(t(v)?|g)|c(y|ong(dot)?|up|edil|a(p|ron))|t(ilde|lg|riangle(left(eq)?|right(eq)?)|gl)|i(s(d)?|v)?|o(t(ni(v([abc]))?|in(dot|v([abc])|E)?)?|pf)|dash|u(m(sp|ero)?)?|jcy|p(olint|ar(sl|t|allel)?|r(cue|e(c(eq)?)?)?)|e(s(im|ear)|dot|quiv|ar(hk|r(ow)?)|xist(s)?|Arr)?|v(sim|infin|Harr|dash|Dash|l(t(rie)?|e|Arr)|ap|r(trie|Arr)|g([et]))|fr|w(near|ar(hk|r(ow)?)|Arr)|V([Dd]ash)|l(sim|t(ri(e)?)?|dr|e(s(s)?|q(slant|q)?|ft((?:|right)arrow))?|E|arr|Arr)|a(ng|cute|tur(al(s)?)?|p(id|os|prox|E)?|bla)|r(tri(e)?|ightarrow|arr([cw])?|Arr)|g(sim|t(r)?|e(s|q(slant|q)?)?|E)|mid|L(t(v)?|eft((?:|right)arrow)|l)|b(sp|ump(e)?))|N(scr|c(y|edil|aron)|tilde|o(nBreakingSpace|Break|t(R(ightTriangle(Bar|Equal)?|everseElement)|Greater(Greater|SlantEqual|Tilde|Equal|FullEqual|Less)?|S(u(cceeds(SlantEqual|Tilde|Equal)?|perset(Equal)?|bset(Equal)?)|quareSu(perset(Equal)?|bset(Equal)?))|Hump(DownHump|Equal)|Nested(GreaterGreater|LessLess)|C(ongruent|upCap)|Tilde(Tilde|Equal|FullEqual)?|DoubleVerticalBar|Precedes((?:Slant|)Equal)?|E(qual(Tilde)?|lement|xists)|VerticalBar|Le(ss(Greater|SlantEqual|Tilde|Equal|Less)?|ftTriangle(Bar|Equal)?))?|pf)|u|e(sted(GreaterGreater|LessLess)|wLine|gative(MediumSpace|Thi((?:n|ck)Space)|VeryThinSpace))|Jcy|fr|acute))|(o(s(cr|ol|lash)|h(m|bar)|c(y|ir(c)?)|ti(lde|mes(as)?)|S|int|opf|d(sold|iv|ot|ash|blac)|uml|p(erp|lus|ar)|elig|vbar|f(cir|r)|l(c(ir|ross)|t|ine|arr)|a(st|cute)|r(slope|igof|or|d(er(of)?|[fm])?|v|arr)?|g(t|on|rave)|m(i(nus|cron|d)|ega|acr))|O(s(cr|lash)|c(y|irc)|ti(lde|mes)|opf|dblac|uml|penCurly((?:Double|)Quote)|ver(B(ar|rac(e|ket))|Parenthesis)|fr|Elig|acute|r|grave|m(icron|ega|acr)))|(p(s(cr|i)|h(i(v)?|one|mmat)|cy|i(tchfork|v)?|o(intint|und|pf)|uncsp|er(cnt|tenk|iod|p|mil)|fr|l(us(sim|cir|two|d([ou])|e|acir|mn|b)?|an(ck(h)?|kv))|ar(s(im|l)|t|a(llel)?)?|r(sim|n(sim|E|ap)|cue|ime(s)?|o(d|p(to)?|f(surf|line|alar))|urel|e(c(sim|n(sim|eqq|approx)|curlyeq|eq|approx)?)?|E|ap)?|m)|P(s(cr|i)|hi|cy|i|o(incareplane|pf)|fr|lusMinus|artialD|r(ime|o(duct|portion(al)?)|ecedes(SlantEqual|Tilde|Equal)?)?))|(q(scr|int|opf|u(ot|est(eq)?|at(int|ernions))|prime|fr)|Q(scr|opf|UOT|fr))|(R(s(h|cr)|ho|c(y|edil|aron)|Barr|ight(Ceiling|T(ee(Vector|Arrow)?|riangle(Bar|Equal)?)|Do(ubleBracket|wn(TeeVector|Vector(Bar)?))|Up(TeeVector|DownVector|Vector(Bar)?)|Vector(Bar)?|arrow|Floor|A(ngleBracket|rrow(Bar|LeftArrow)?))|o(undImplies|pf)|uleDelayed|e(verse(UpEquilibrium|E(quilibrium|lement)))?|fr|EG|a(ng|cute|rr(tl)?)|rightarrow)|r(s(h|cr|q(uo(r)?|b)|aquo)|h(o(v)?|ar(d|u(l)?))|nmid|c(y|ub|e(d??il)|aron)|Barr|t(hree|imes|ri([ef]|ltri)?)|i(singdotseq|ng|ght(squigarrow|harpoon(down|up)|threetimes|left(harpoons|arrows)|arrow(tail)?|rightarrows))|Har|o(times|p(f|lus|ar)|a(ng|rr)|brk)|d(sh|ca|quo(r)?|ldhar)|uluhar|p(polint|ar(gt)?)|e(ct|al(s|ine|part)?|g)|f(isht|loor|r)|l(har|arr|m)|a(ng([de]|le)?|c(ute|e)|t(io(nals)?|ail)|dic|emptyv|quo|rr(sim|hk|c|tl|pl|fs|w|lp|ap|b(fs)?)?)|rarr|x|moust(ache)?|b(arr|r(k(sl([du])|e)|ac([ek]))|brk)|A(tail|arr|rr)))|(s(s(cr|tarf|etmn|mile)|h(y|c(hcy|y)|ort(parallel|mid)|arp)|c(sim|y|n(sim|E|ap)|cue|irc|polint|e(dil)?|E|a(p|ron))?|t(ar(f)?|r(ns|aight(phi|epsilon)))|i(gma([fv])?|m(ne|dot|plus|e(q)?|l(E)?|rarr|g(E)?)?)|zlig|o(pf|ftcy|l(b(ar)?)?)|dot([be])?|u(ng|cc(sim|n(sim|eqq|approx)|curlyeq|eq|approx)?|p(s(im|u([bp])|et(neq(q)?|eq(q)?)?)|hs(ol|ub)|1|n([Ee])|2|d(sub|ot)|3|plus|e(dot)?|E|larr|mult)?|m|b(s(im|u([bp])|et(neq(q)?|eq(q)?)?)|n([Ee])|dot|plus|e(dot)?|E|rarr|mult)?)|pa(des(uit)?|r)|e(swar|ct|tm(n|inus)|ar(hk|r(ow)?)|xt|mi|Arr)|q(su(p(set(eq)?|e)?|b(set(eq)?|e)?)|c(up(s)?|ap(s)?)|u(f|ar([ef]))?)|fr(own)?|w(nwar|ar(hk|r(ow)?)|Arr)|larr|acute|rarr|m(t(e(s)?)?|i(d|le)|eparsl|a(shp|llsetminus))|bquo)|S(scr|hort((?:Right|Down|Up|Left)Arrow)|c(y|irc|edil|aron)?|tar|igma|H(cy|CHcy)|opf|u(c(hThat|ceeds(SlantEqual|Tilde|Equal)?)|p(set|erset(Equal)?)?|m|b(set(Equal)?)?)|OFTcy|q(uare(Su(perset(Equal)?|bset(Equal)?)|Intersection|Union)?|rt)|fr|acute|mallCircle))|(t(s(hcy|c([ry])|trok)|h(i(nsp|ck(sim|approx))|orn|e(ta(sym|v)?|re(4|fore))|k(sim|ap))|c(y|edil|aron)|i(nt|lde|mes(d|b(ar)?)?)|o(sa|p(cir|f(ork)?|bot)?|ea)|dot|prime|elrec|fr|w(ixt|ohead((?:lef|righ)tarrow))|a(u|rget)|r(i(sb|time|dot|plus|e|angle(down|q|left(eq)?|right(eq)?)?|minus)|pezium|ade)|brk)|T(s(cr|trok)|RADE|h(i((?:n|ck)Space)|e(ta|refore))|c(y|edil|aron)|S(H??cy)|ilde(Tilde|Equal|FullEqual)?|HORN|opf|fr|a([bu])|ripleDot))|(u(scr|h(ar([lr])|blk)|c(y|irc)|t(ilde|dot|ri(f)?)|Har|o(pf|gon)|d(har|arr|blac)|u(arr|ml)|p(si(h|lon)?|harpoon(left|right)|downarrow|uparrows|lus|arrow)|f(isht|r)|wangle|l(c(orn(er)?|rop)|tri)|a(cute|rr)|r(c(orn(er)?|rop)|tri|ing)|grave|m(l|acr)|br(cy|eve)|Arr)|U(scr|n(ion(Plus)?|der(B(ar|rac(e|ket))|Parenthesis))|c(y|irc)|tilde|o(pf|gon)|dblac|uml|p(si(lon)?|downarrow|Tee(Arrow)?|per((?:Righ|Lef)tArrow)|DownArrow|Equilibrium|arrow|Arrow(Bar|DownArrow)?)|fr|a(cute|rr(ocir)?)|ring|grave|macr|br(cy|eve)))|(v(s(cr|u(pn([Ee])|bn([Ee])))|nsu([bp])|cy|Bar(v)?|zigzag|opf|dash|prop|e(e(eq|bar)?|llip|r(t|bar))|Dash|fr|ltri|a(ngrt|r(s(igma|u(psetneq(q)?|bsetneq(q)?))|nothing|t(heta|riangle(left|right))|p(hi|i|ropto)|epsilon|kappa|r(ho)?))|rtri|Arr)|V(scr|cy|opf|dash(l)?|e(e|r(yThinSpace|t(ical(Bar|Separator|Tilde|Line))?|bar))|Dash|vdash|fr|bar))|(w(scr|circ|opf|p|e(ierp|d(ge(q)?|bar))|fr|r(eath)?)|W(scr|circ|opf|edge|fr))|(X(scr|i|opf|fr)|x(s(cr|qcup)|h([Aa]rr)|nis|c(irc|up|ap)|i|o(time|dot|p(f|lus))|dtri|u(tri|plus)|vee|fr|wedge|l([Aa]rr)|r([Aa]rr)|map))|(y(scr|c(y|irc)|icy|opf|u(cy|ml)|en|fr|ac(y|ute))|Y(scr|c(y|irc)|opf|uml|Icy|Ucy|fr|acute|Acy))|(z(scr|hcy|c(y|aron)|igrarr|opf|dot|e(ta|etrf)|fr|w(n?j)|acute)|Z(scr|c(y|aron)|Hcy|opf|dot|e(ta|roWidthSpace)|fr|acute)))(;)","name":"constant.character.entity.named.$2.html"},{"captures":{"1":{"name":"punctuation.definition.entity.html"},"3":{"name":"punctuation.definition.entity.html"}},"match":"(&)#[0-9]+(;)","name":"constant.character.entity.numeric.decimal.html"},{"captures":{"1":{"name":"punctuation.definition.entity.html"},"3":{"name":"punctuation.definition.entity.html"}},"match":"(&)#[Xx]\\\\h+(;)","name":"constant.character.entity.numeric.hexadecimal.html"},{"match":"&(?=[0-9A-Za-z]+;)","name":"invalid.illegal.ambiguous-ampersand.html"}]},"heading":{"captures":{"1":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.heading.markdown"},"2":{"name":"entity.name.section.markdown","patterns":[{"include":"text.html.markdown#inline"},{"include":"text.html.derivative"}]},"3":{"name":"punctuation.definition.heading.markdown"}},"match":"(#{6})\\\\s+(.*?)(?:\\\\s+(#+))?\\\\s*$","name":"heading.6.markdown"},{"captures":{"1":{"name":"punctuation.definition.heading.markdown"},"2":{"name":"entity.name.section.markdown","patterns":[{"include":"text.html.markdown#inline"},{"include":"text.html.derivative"}]},"3":{"name":"punctuation.definition.heading.markdown"}},"match":"(#{5})\\\\s+(.*?)(?:\\\\s+(#+))?\\\\s*$","name":"heading.5.markdown"},{"captures":{"1":{"name":"punctuation.definition.heading.markdown"},"2":{"name":"entity.name.section.markdown","patterns":[{"include":"text.html.markdown#inline"},{"include":"text.html.derivative"}]},"3":{"name":"punctuation.definition.heading.markdown"}},"match":"(#{4})\\\\s+(.*?)(?:\\\\s+(#+))?\\\\s*$","name":"heading.4.markdown"},{"captures":{"1":{"name":"punctuation.definition.heading.markdown"},"2":{"name":"entity.name.section.markdown","patterns":[{"include":"text.html.markdown#inline"},{"include":"text.html.derivative"}]},"3":{"name":"punctuation.definition.heading.markdown"}},"match":"(#{3})\\\\s+(.*?)(?:\\\\s+(#+))?\\\\s*$","name":"heading.3.markdown"},{"captures":{"1":{"name":"punctuation.definition.heading.markdown"},"2":{"name":"entity.name.section.markdown","patterns":[{"include":"text.html.markdown#inline"},{"include":"text.html.derivative"}]},"3":{"name":"punctuation.definition.heading.markdown"}},"match":"(#{2})\\\\s+(.*?)(?:\\\\s+(#+))?\\\\s*$","name":"heading.2.markdown"},{"captures":{"1":{"name":"punctuation.definition.heading.markdown"},"2":{"name":"entity.name.section.markdown","patterns":[{"include":"text.html.markdown#inline"},{"include":"text.html.derivative"}]},"3":{"name":"punctuation.definition.heading.markdown"}},"match":"(#{1})\\\\s+(.*?)(?:\\\\s+(#+))?\\\\s*$","name":"heading.1.markdown"}]}},"match":"(?:^|\\\\G) *(#{1,6}\\\\s+(.*?)(\\\\s+#{1,6})?\\\\s*)$","name":"markup.heading.markdown","patterns":[{"include":"text.html.markdown#inline"}]},"heading-setext":{"patterns":[{"match":"^(={3,})(?=[\\\\t ]*$\\\\n?)","name":"markup.heading.setext.1.markdown"},{"match":"^(-{3,})(?=[\\\\t ]*$\\\\n?)","name":"markup.heading.setext.2.markdown"}]},"inline":{"patterns":[{"include":"#component_inline"},{"include":"#span"},{"include":"#attributes"}]},"lists":{"patterns":[{"begin":"(^|\\\\G)( *)([-*+])([\\\\t ])","beginCaptures":{"3":{"name":"punctuation.definition.list.begin.markdown"}},"name":"markup.list.unnumbered.markdown","patterns":[{"include":"#block"},{"include":"text.html.markdown#list_paragraph"}],"while":"((^|\\\\G)[\\\\t ]+)|^([\\\\t ]*)$"},{"begin":"(^|\\\\G)( *)([0-9]+\\\\.)([\\\\t ])","beginCaptures":{"3":{"name":"punctuation.definition.list.begin.markdown"}},"name":"markup.list.numbered.markdown","patterns":[{"include":"#block"},{"include":"text.html.markdown#list_paragraph"}],"while":"((^|\\\\G)[\\\\t ]+)|^([\\\\t ]*)$"}]},"paragraph":{"begin":"(^|\\\\G) *(?=\\\\S)","name":"meta.paragraph.markdown","patterns":[{"include":"text.html.markdown#inline"},{"include":"text.html.derivative"},{"include":"#heading-setext"}],"while":"(^|\\\\G)((?=\\\\s*[-=]{3,}\\\\s*$)| {4,}(?=\\\\S))"},"span":{"captures":{"1":{"name":"punctuation.definition.tag.start.component"},"2":{"name":"string.other.link.description.title.markdown"},"3":{"name":"punctuation.definition.tag.end.component"},"4":{"patterns":[{"include":"#attributes"}]}},"match":"(\\\\[)([^]]*)(])((\\\\{)([^{]*)(}))?\\\\s","name":"span.component.mdc"}},"scopeName":"text.markdown.mdc.standalone","embeddedLangs":["markdown","yaml","html-derivative"]}`)),i=[...n,...t,...e,r];export{i as default};
@@ -1,4 +0,0 @@
1
- import{i as e}from"./diagnostics-DN_idNHx.js";import{c as t,i as n,s as r,t as i}from"./transform-messages-N_eMsP2M.js";import{n as a}from"./json-parse-CgFfIg4Q.js";import{t as o}from"./headers-CbDaTl3c.js";import{t as s}from"./sanitize-unicode-DmIE6hZJ.js";import{i as c,o as l}from"./constrained-sampling-Zzx2ko9x.js";import{t as u}from"./hash-yQufAZII.js";var d=9,f=4e3,p=(t,n,r)=>{let a=new e;return(async()=>{let e=h(t);try{let o=r?.apiKey;if(!o)throw Error(`No API key for provider: ${t.provider}`);let s=g(),c=F(t,n,i(n.messages,t,e=>s(e)),r),l=await r?.onPayload?.(c,t);l!==void 0&&(c=l);let u=await x(t,c,o,r);if(a.push({type:`start`,partial:e}),await R(t,e,a,u),r?.signal?.aborted)throw Error(`Request was aborted`);if(e.stopReason===`pending`)throw Error(`Mistral stream ended without a finish reason`);if(e.stopReason===`aborted`||e.stopReason===`error`)throw Error(e.errorMessage||`An unknown error occurred`);a.push({type:`done`,reason:e.stopReason,message:e}),a.end()}catch(t){for(let t of e.content)delete t.partialArgs;e.stopReason=r?.signal?.aborted?`aborted`:`error`,e.errorMessage=v(t),a.push({type:`error`,reason:e.stopReason,error:e}),a.end()}})(),a},m=(e,r,i)=>{let a=i?.apiKey;if(!a)throw Error(`No API key for provider: ${e.provider}`);let o=n(e,r,i,a),s=i?.reasoning?t(e,i.reasoning):void 0,c=s===`off`?void 0:s,l=e.reasoning&&c!==void 0;return p(e,r,{...o,promptMode:l&&W(e)?`reasoning`:void 0,reasoningEffort:l&&U(e)?G(e,c):void 0})};function h(e){return{role:`assistant`,content:[],api:e.api,provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:`pending`,timestamp:Date.now()}}function g(){let e=new Map,t=new Map;return n=>{let r=e.get(n);if(r)return r;let i=0;for(;;){let r=_(n,i),a=t.get(r);if(!a||a===n)return e.set(n,r),t.set(r,n),r;i++}}}function _(e,t){let n=e.replace(/[^a-zA-Z0-9]/g,``);if(t===0&&n.length===d)return n;let r=n||e,i=t===0?r:`${r}:${t}`;return u(i).replace(/[^a-zA-Z0-9]/g,``).slice(0,d)}function v(e){if(e instanceof Error){let t=e,n=typeof t.statusCode==`number`?t.statusCode:void 0,r=typeof t.body==`string`?t.body.trim():void 0;return n!==void 0&&r?`Mistral API error (${n}): ${y(r,f)}`:n===void 0?e.message:`Mistral API error (${n}): ${e.message}`}return b(e)}function y(e,t){return e.length<=t?e:`${e.slice(0,t)}... [truncated ${e.length-t} chars]`}function b(e){try{let t=JSON.stringify(e);return t===void 0?String(e):t}catch{return String(e)}}async function x(e,t,n,r){let i=new URL(e.baseUrl);i.pathname=`${i.pathname.replace(/\/+$/u,``)}/`;let a=new URL(`v1/chat/completions`,i),s=C(e,n,r),c=AbortSignal.timeout(r?.timeoutMs??6e4),l=r?.signal?AbortSignal.any([r.signal,c]):c,u=await(r?.fetch??globalThis.fetch)(a,{method:`POST`,headers:s,body:JSON.stringify(E(t)),signal:l});if(await r?.onResponse?.({status:u.status,headers:o(u.headers)},e),!u.ok){let e=await u.text();throw new S(u.status,e,u.statusText)}if(!u.body)throw Error(`Mistral response has no body`);return M(u.body,l)}var S=class extends Error{statusCode;body;constructor(e,t,n){super(n||`Request failed with status ${e}`),this.name=`MistralHttpError`,this.statusCode=e,this.body=t}};function C(e,t,n){let r=new Headers({accept:`text/event-stream`,authorization:`Bearer ${t}`,"content-type":`application/json`});w(r,e.headers),w(r,n?.headers);let i=T(e.headers,`x-affinity`)||T(n?.headers,`x-affinity`);return I(n)&&!i&&r.set(`x-affinity`,n.sessionId),r}function w(e,t){if(t)for(let[n,r]of Object.entries(t))r===null?e.delete(n):e.set(n,r)}function T(e,t){return!!e&&Object.keys(e).some(e=>e.toLowerCase()===t)}function E(e){let t={...e};for(let[e,n]of[[`topP`,`top_p`],[`maxTokens`,`max_tokens`],[`randomSeed`,`random_seed`],[`responseFormat`,`response_format`],[`toolChoice`,`tool_choice`],[`presencePenalty`,`presence_penalty`],[`frequencyPenalty`,`frequency_penalty`],[`parallelToolCalls`,`parallel_tool_calls`],[`reasoningEffort`,`reasoning_effort`],[`promptMode`,`prompt_mode`],[`promptCacheKey`,`prompt_cache_key`],[`safePrompt`,`safe_prompt`]])k(t,e,n);t.messages=e.messages.map(e=>D(e));let n=t.response_format;if(A(n)){let e={...n};k(e,`jsonSchema`,`json_schema`);let r=e.json_schema;if(A(r)){let t={...r};k(t,`schemaDefinition`,`schema`),e.json_schema=t}t.response_format=e}return t}function D(e){let t={...e};return k(t,`toolCalls`,`tool_calls`),k(t,`toolCallId`,`tool_call_id`),Array.isArray(e.content)&&(t.content=e.content.map(e=>O(e))),t}function O(e){let t={...e};for(let[e,n]of[[`imageUrl`,`image_url`],[`documentUrl`,`document_url`],[`documentName`,`document_name`],[`fileId`,`file_id`],[`referenceIds`,`reference_ids`],[`inputAudio`,`input_audio`]])k(t,e,n);return t}function k(e,t,n){t in e&&(e[n]=e[t],delete e[t])}function A(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var j=Symbol(`mistral-stream-done`);async function*M(e,t){let n=e.getReader(),r=new TextDecoder,i=``,a=()=>{n.cancel().catch(()=>{})};t.addEventListener(`abort`,a,{once:!0});try{for(;;){if(t.aborted)throw t.reason;let{done:e,value:a}=await n.read();if(t.aborted)throw t.reason;i+=e?r.decode():r.decode(a,{stream:!0});let o=N(i);for(;o;){let e=P(i.slice(0,o.index));if(i=i.slice(o.index+o.length),e===j)return;e&&(yield e),o=N(i)}if(e)break}if(i.trim()){let e=P(i);e!==j&&e&&(yield e)}}finally{t.removeEventListener(`abort`,a);try{await n.cancel()}catch{}try{n.releaseLock()}catch{}}}function N(e){let t=/\r\n\r\n|\r\n\r|\r\n\n|\r\r\n|\n\r\n|\r\r|\n\r|\n\n/u.exec(e);return t?.index===void 0?void 0:{index:t.index,length:t[0].length}}function P(e){let t=e.split(/\r\n|\r|\n/u).filter(e=>e.startsWith(`data:`)).map(e=>e.slice(5).trimStart()).join(`
2
- `).trim();if(!t)return;if(t===`[DONE]`)return j;let n=JSON.parse(t);if(!A(n)||!Array.isArray(n.choices))throw Error(`Invalid Mistral streaming event`);return{data:n}}function F(e,t,n,r){let i={model:e.id,stream:!0,messages:V(n,e.input.includes(`image`))};return t.tools?.length&&(i.tools=z(t.tools)),r?.temperature!==void 0&&(i.temperature=r.temperature),r?.maxTokens!==void 0&&(i.maxTokens=r.maxTokens),r?.toolChoice&&(i.toolChoice=K(r.toolChoice)),r?.promptMode&&(i.promptMode=r.promptMode),r?.reasoningEffort&&(i.reasoningEffort=r.reasoningEffort),I(r)&&(i.promptCacheKey=r.sessionId),t.systemPrompt&&i.messages.unshift({role:`system`,content:s(t.systemPrompt)}),i}function I(e){return e?.cacheRetention!==`none`&&!!e?.sessionId}function L(e,t){let n=e,r=n.promptTokensDetails?.cachedTokens??n.prompt_tokens_details?.cached_tokens??n.promptTokenDetails?.cachedTokens??n.prompt_token_details?.cached_tokens??n.numCachedTokens??n.num_cached_tokens??0;return Math.min(t,Math.max(0,typeof r==`number`&&Number.isFinite(r)?r:0))}async function R(e,t,n,i){let o=null,c=t.content,l=()=>c.length-1,u=new Map,d=e=>{if(e){if(e.type===`text`){n.push({type:`text_end`,contentIndex:l(),content:e.text,partial:t});return}e.type===`thinking`&&n.push({type:`thinking_end`,contentIndex:l(),content:e.thinking,partial:t})}};for await(let c of i){let i=c.data;if(t.responseId||=i.id,i.usage){let n=i.usage.prompt_tokens||0,a=L(i.usage,n);t.usage.input=Math.max(0,n-a),t.usage.output=i.usage.completion_tokens||0,t.usage.cacheRead=a,t.usage.cacheWrite=0,t.usage.totalTokens=i.usage.total_tokens||t.usage.input+t.usage.output+t.usage.cacheRead+t.usage.cacheWrite,r(e,t.usage)}let f=i.choices[0];if(!f)continue;if(f.finish_reason){t.rawStopReason=f.finish_reason;let e=q(f.finish_reason);t.stopReason=e.stopReason,e.errorMessage&&(t.errorMessage=e.errorMessage)}let p=f.delta;if(p.content!==null&&p.content!==void 0){let e=typeof p.content==`string`?[p.content]:p.content;for(let r of e){if(typeof r==`string`){let e=s(r);(!o||o.type!==`text`)&&(d(o),o={type:`text`,text:``},t.content.push(o),n.push({type:`text_start`,contentIndex:l(),partial:t})),o.text+=e,n.push({type:`text_delta`,contentIndex:l(),delta:e,partial:t});continue}if(r.type===`thinking`){let e=(r.thinking??[]).map(e=>e.text??``).filter(e=>e.length>0).join(``),i=s(e);if(!i)continue;(!o||o.type!==`thinking`)&&(d(o),o={type:`thinking`,thinking:``},t.content.push(o),n.push({type:`thinking_start`,contentIndex:l(),partial:t})),o.thinking+=i,n.push({type:`thinking_delta`,contentIndex:l(),delta:i,partial:t});continue}if(r.type===`text`){let e=s(r.text??``);(!o||o.type!==`text`)&&(d(o),o={type:`text`,text:``},t.content.push(o),n.push({type:`text_start`,contentIndex:l(),partial:t})),o.text+=e,n.push({type:`text_delta`,contentIndex:l(),delta:e,partial:t})}}}let m=p.tool_calls||[];for(let e of m){o&&=(d(o),null);let r=e.id&&e.id!==`null`?e.id:_(`toolcall:${e.index??0}`,0),i=`${r}:${e.index||0}`,s=u.get(i),c;if(s!==void 0){let e=t.content[s];e?.type===`toolCall`&&(c=e)}c||(c={type:`toolCall`,id:r,name:e.function.name,arguments:{},partialArgs:``},t.content.push(c),u.set(i,t.content.length-1),n.push({type:`toolcall_start`,contentIndex:t.content.length-1,partial:t}));let l=typeof e.function.arguments==`string`?e.function.arguments:JSON.stringify(e.function.arguments||{});c.partialArgs=(c.partialArgs||``)+l,c.arguments=a(c.partialArgs),n.push({type:`toolcall_delta`,contentIndex:u.get(i),delta:l,partial:t})}}d(o);for(let e of u.values()){let r=t.content[e];if(r.type!==`toolCall`)continue;let i=r;i.arguments=a(i.partialArgs),delete i.partialArgs,n.push({type:`toolcall_end`,contentIndex:e,toolCall:i,partial:t})}}function z(e){return e.map(e=>{let t=l(e,!0);return{type:`function`,function:{name:e.name,description:e.description,parameters:B(c(e,t)),strict:t??!1}}})}function B(e){if(Array.isArray(e))return e.map(e=>B(e));if(e&&typeof e==`object`){let t={};for(let[n,r]of Object.entries(e))t[n]=B(r);return t}return e}function V(e,t){let n=[];for(let r of e){if(r.role===`user`){if(typeof r.content==`string`){n.push({role:`user`,content:s(r.content)});continue}let e=r.content.some(e=>e.type===`image`),i=r.content.filter(e=>e.type===`text`||t).map(e=>e.type===`text`?{type:`text`,text:s(e.text)}:{type:`image_url`,imageUrl:`data:${e.mimeType};base64,${e.data}`});if(i.length>0){n.push({role:`user`,content:i});continue}e&&!t&&n.push({role:`user`,content:`(image omitted: model does not support images)`});continue}if(r.role===`assistant`){let e=[],t=[];for(let n of r.content){if(n.type===`text`){n.text.trim().length>0&&e.push({type:`text`,text:s(n.text)});continue}if(n.type===`thinking`){n.thinking.trim().length>0&&e.push({type:`thinking`,thinking:[{type:`text`,text:s(n.thinking)}]});continue}t.push({id:n.id,type:`function`,function:{name:n.name,arguments:JSON.stringify(n.arguments||{})},index:0})}let i={role:`assistant`,prefix:!1};e.length>0&&(i.content=e),t.length>0&&(i.toolCalls=t),(e.length>0||t.length>0)&&n.push(i);continue}let e=[],i=H(r.content.filter(e=>e.type===`text`).map(e=>e.type===`text`?s(e.text):``).join(`
3
- `),r.content.some(e=>e.type===`image`),t,r.isError);e.push({type:`text`,text:i});for(let n of r.content)t&&n.type===`image`&&e.push({type:`image_url`,imageUrl:`data:${n.mimeType};base64,${n.data}`});n.push({role:`tool`,toolCallId:r.toolCallId,name:r.toolName,content:e})}return n}function H(e,t,n,r){let i=e.trim(),a=r?`[tool error] `:``;return i.length>0?`${a}${i}${t&&!n?`
4
- [tool image omitted: model does not support images]`:``}`:t?n?r?`[tool error] (see attached image)`:`(see attached image)`:r?`[tool error] (image omitted: model does not support images)`:`(image omitted: model does not support images)`:r?`[tool error] (no tool output)`:`(no tool output)`}function U(e){return e.id===`mistral-small-2603`||e.id===`mistral-small-latest`||e.id===`mistral-medium-3.5`}function W(e){return e.reasoning&&!U(e)}function G(e,t){return e.thinkingLevelMap?.[t]??`high`}function K(e){if(e)return e===`auto`||e===`none`||e===`any`||e===`required`?e:{type:`function`,function:{name:e.function.name}}}function q(e){if(e===null)return{stopReason:`stop`};switch(e){case`stop`:return{stopReason:`stop`};case`length`:case`model_length`:return{stopReason:`length`};case`tool_calls`:return{stopReason:`toolUse`};case`error`:return{stopReason:`error`,errorMessage:`Provider stopped with: error`};default:return{stopReason:`error`,errorMessage:`Provider stopped with: ${e}`}}}export{p as stream,m as streamSimple};
@@ -1,4 +0,0 @@
1
- import{i as e}from"./diagnostics-DN_idNHx.js";import{c as t,i as n,s as r,t as i}from"./transform-messages-DEFauvrq.js";import{n as a}from"./json-parse-ClXMvBdK.js";import{t as o}from"./headers-CbDaTl3c.js";import{t as s}from"./sanitize-unicode-DmIE6hZJ.js";import{i as c,o as l}from"./constrained-sampling-BNmnoM-i.js";import{t as u}from"./hash-yQufAZII.js";const d=(t,n,r)=>{let a=new e;return(async()=>{let e=p(t);try{let o=r?.apiKey;if(!o)throw Error(`No API key for provider: ${t.provider}`);let s=m(),c=N(t,n,i(n.messages,t,e=>s(e)),r),l=await r?.onPayload?.(c,t);l!==void 0&&(c=l);let u=await y(t,c,o,r);if(a.push({type:`start`,partial:e}),await I(t,e,a,u),r?.signal?.aborted)throw Error(`Request was aborted`);if(e.stopReason===`pending`)throw Error(`Mistral stream ended without a finish reason`);if(e.stopReason===`aborted`||e.stopReason===`error`)throw Error(e.errorMessage||`An unknown error occurred`);a.push({type:`done`,reason:e.stopReason,message:e}),a.end()}catch(t){for(let t of e.content)delete t.partialArgs;e.stopReason=r?.signal?.aborted?`aborted`:`error`,e.errorMessage=g(t),a.push({type:`error`,reason:e.stopReason,error:e}),a.end()}})(),a},f=(e,r,i)=>{let a=i?.apiKey;if(!a)throw Error(`No API key for provider: ${e.provider}`);let o=n(e,r,i,a),s=i?.reasoning?t(e,i.reasoning):void 0,c=s===`off`?void 0:s,l=e.reasoning&&c!==void 0;return d(e,r,{...o,promptMode:l&&H(e)?`reasoning`:void 0,reasoningEffort:l&&V(e)?U(e,c):void 0})};function p(e){return{role:`assistant`,content:[],api:e.api,provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:`pending`,timestamp:Date.now()}}function m(){let e=new Map,t=new Map;return n=>{let r=e.get(n);if(r)return r;let i=0;for(;;){let r=h(n,i),a=t.get(r);if(!a||a===n)return e.set(n,r),t.set(r,n),r;i++}}}function h(e,t){let n=e.replace(/[^a-zA-Z0-9]/g,``);if(t===0&&n.length===9)return n;let r=n||e,i=t===0?r:`${r}:${t}`;return u(i).replace(/[^a-zA-Z0-9]/g,``).slice(0,9)}function g(e){if(e instanceof Error){let t=e,n=typeof t.statusCode==`number`?t.statusCode:void 0,r=typeof t.body==`string`?t.body.trim():void 0;return n!==void 0&&r?`Mistral API error (${n}): ${_(r,4e3)}`:n===void 0?e.message:`Mistral API error (${n}): ${e.message}`}return v(e)}function _(e,t){return e.length<=t?e:`${e.slice(0,t)}... [truncated ${e.length-t} chars]`}function v(e){try{let t=JSON.stringify(e);return t===void 0?String(e):t}catch{return String(e)}}async function y(e,t,n,r){let i=new URL(e.baseUrl);i.pathname=`${i.pathname.replace(/\/+$/u,``)}/`;let a=new URL(`v1/chat/completions`,i),s=x(e,n,r),c=AbortSignal.timeout(r?.timeoutMs??6e4),l=r?.signal?AbortSignal.any([r.signal,c]):c,u=await(r?.fetch??globalThis.fetch)(a,{method:`POST`,headers:s,body:JSON.stringify(w(t)),signal:l});if(await r?.onResponse?.({status:u.status,headers:o(u.headers)},e),!u.ok){let e=await u.text();throw new b(u.status,e,u.statusText)}if(!u.body)throw Error(`Mistral response has no body`);return A(u.body,l)}var b=class extends Error{statusCode;body;constructor(e,t,n){super(n||`Request failed with status ${e}`),this.name=`MistralHttpError`,this.statusCode=e,this.body=t}};function x(e,t,n){let r=new Headers({accept:`text/event-stream`,authorization:`Bearer ${t}`,"content-type":`application/json`});S(r,e.headers),S(r,n?.headers);let i=C(e.headers,`x-affinity`)||C(n?.headers,`x-affinity`);return P(n)&&!i&&r.set(`x-affinity`,n.sessionId),r}function S(e,t){if(t)for(let[n,r]of Object.entries(t))r===null?e.delete(n):e.set(n,r)}function C(e,t){return!!e&&Object.keys(e).some(e=>e.toLowerCase()===t)}function w(e){let t={...e};for(let[e,n]of[[`topP`,`top_p`],[`maxTokens`,`max_tokens`],[`randomSeed`,`random_seed`],[`responseFormat`,`response_format`],[`toolChoice`,`tool_choice`],[`presencePenalty`,`presence_penalty`],[`frequencyPenalty`,`frequency_penalty`],[`parallelToolCalls`,`parallel_tool_calls`],[`reasoningEffort`,`reasoning_effort`],[`promptMode`,`prompt_mode`],[`promptCacheKey`,`prompt_cache_key`],[`safePrompt`,`safe_prompt`]])D(t,e,n);t.messages=e.messages.map(e=>T(e));let n=t.response_format;if(O(n)){let e={...n};D(e,`jsonSchema`,`json_schema`);let r=e.json_schema;if(O(r)){let t={...r};D(t,`schemaDefinition`,`schema`),e.json_schema=t}t.response_format=e}return t}function T(e){let t={...e};return D(t,`toolCalls`,`tool_calls`),D(t,`toolCallId`,`tool_call_id`),Array.isArray(e.content)&&(t.content=e.content.map(e=>E(e))),t}function E(e){let t={...e};for(let[e,n]of[[`imageUrl`,`image_url`],[`documentUrl`,`document_url`],[`documentName`,`document_name`],[`fileId`,`file_id`],[`referenceIds`,`reference_ids`],[`inputAudio`,`input_audio`]])D(t,e,n);return t}function D(e,t,n){t in e&&(e[n]=e[t],delete e[t])}function O(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const k=Symbol(`mistral-stream-done`);async function*A(e,t){let n=e.getReader(),r=new TextDecoder,i=``,a=()=>{n.cancel().catch(()=>{})};t.addEventListener(`abort`,a,{once:!0});try{for(;;){if(t.aborted)throw t.reason;let{done:e,value:a}=await n.read();if(t.aborted)throw t.reason;i+=e?r.decode():r.decode(a,{stream:!0});let o=j(i);for(;o;){let e=M(i.slice(0,o.index));if(i=i.slice(o.index+o.length),e===k)return;e&&(yield e),o=j(i)}if(e)break}if(i.trim()){let e=M(i);e!==k&&e&&(yield e)}}finally{t.removeEventListener(`abort`,a);try{await n.cancel()}catch{}try{n.releaseLock()}catch{}}}function j(e){let t=/\r\n\r\n|\r\n\r|\r\n\n|\r\r\n|\n\r\n|\r\r|\n\r|\n\n/u.exec(e);return t?.index===void 0?void 0:{index:t.index,length:t[0].length}}function M(e){let t=e.split(/\r\n|\r|\n/u).filter(e=>e.startsWith(`data:`)).map(e=>e.slice(5).trimStart()).join(`
2
- `).trim();if(!t)return;if(t===`[DONE]`)return k;let n=JSON.parse(t);if(!O(n)||!Array.isArray(n.choices))throw Error(`Invalid Mistral streaming event`);return{data:n}}function N(e,t,n,r){let i={model:e.id,stream:!0,messages:z(n,e.input.includes(`image`))};return t.tools?.length&&(i.tools=L(t.tools)),r?.temperature!==void 0&&(i.temperature=r.temperature),r?.maxTokens!==void 0&&(i.maxTokens=r.maxTokens),r?.toolChoice&&(i.toolChoice=W(r.toolChoice)),r?.promptMode&&(i.promptMode=r.promptMode),r?.reasoningEffort&&(i.reasoningEffort=r.reasoningEffort),P(r)&&(i.promptCacheKey=r.sessionId),t.systemPrompt&&i.messages.unshift({role:`system`,content:s(t.systemPrompt)}),i}function P(e){return e?.cacheRetention!==`none`&&!!e?.sessionId}function F(e,t){let n=e,r=n.promptTokensDetails?.cachedTokens??n.prompt_tokens_details?.cached_tokens??n.promptTokenDetails?.cachedTokens??n.prompt_token_details?.cached_tokens??n.numCachedTokens??n.num_cached_tokens??0;return Math.min(t,Math.max(0,typeof r==`number`&&Number.isFinite(r)?r:0))}async function I(e,t,n,i){let o=null,c=t.content,l=()=>c.length-1,u=new Map,d=e=>{if(e){if(e.type===`text`){n.push({type:`text_end`,contentIndex:l(),content:e.text,partial:t});return}e.type===`thinking`&&n.push({type:`thinking_end`,contentIndex:l(),content:e.thinking,partial:t})}};for await(let c of i){let i=c.data;if(t.responseId||=i.id,i.usage){let n=i.usage.prompt_tokens||0,a=F(i.usage,n);t.usage.input=Math.max(0,n-a),t.usage.output=i.usage.completion_tokens||0,t.usage.cacheRead=a,t.usage.cacheWrite=0,t.usage.totalTokens=i.usage.total_tokens||t.usage.input+t.usage.output+t.usage.cacheRead+t.usage.cacheWrite,r(e,t.usage)}let f=i.choices[0];if(!f)continue;if(f.finish_reason){t.rawStopReason=f.finish_reason;let e=G(f.finish_reason);t.stopReason=e.stopReason,e.errorMessage&&(t.errorMessage=e.errorMessage)}let p=f.delta;if(p.content!==null&&p.content!==void 0){let e=typeof p.content==`string`?[p.content]:p.content;for(let r of e){if(typeof r==`string`){let e=s(r);(!o||o.type!==`text`)&&(d(o),o={type:`text`,text:``},t.content.push(o),n.push({type:`text_start`,contentIndex:l(),partial:t})),o.text+=e,n.push({type:`text_delta`,contentIndex:l(),delta:e,partial:t});continue}if(r.type===`thinking`){let e=(r.thinking??[]).map(e=>e.text??``).filter(e=>e.length>0).join(``),i=s(e);if(!i)continue;(!o||o.type!==`thinking`)&&(d(o),o={type:`thinking`,thinking:``},t.content.push(o),n.push({type:`thinking_start`,contentIndex:l(),partial:t})),o.thinking+=i,n.push({type:`thinking_delta`,contentIndex:l(),delta:i,partial:t});continue}if(r.type===`text`){let e=s(r.text??``);(!o||o.type!==`text`)&&(d(o),o={type:`text`,text:``},t.content.push(o),n.push({type:`text_start`,contentIndex:l(),partial:t})),o.text+=e,n.push({type:`text_delta`,contentIndex:l(),delta:e,partial:t})}}}let m=p.tool_calls||[];for(let e of m){o&&=(d(o),null);let r=e.id&&e.id!==`null`?e.id:h(`toolcall:${e.index??0}`,0),i=`${r}:${e.index||0}`,s=u.get(i),c;if(s!==void 0){let e=t.content[s];e?.type===`toolCall`&&(c=e)}c||(c={type:`toolCall`,id:r,name:e.function.name,arguments:{},partialArgs:``},t.content.push(c),u.set(i,t.content.length-1),n.push({type:`toolcall_start`,contentIndex:t.content.length-1,partial:t}));let l=typeof e.function.arguments==`string`?e.function.arguments:JSON.stringify(e.function.arguments||{});c.partialArgs=(c.partialArgs||``)+l,c.arguments=a(c.partialArgs),n.push({type:`toolcall_delta`,contentIndex:u.get(i),delta:l,partial:t})}}d(o);for(let e of u.values()){let r=t.content[e];if(r.type!==`toolCall`)continue;let i=r;i.arguments=a(i.partialArgs),delete i.partialArgs,n.push({type:`toolcall_end`,contentIndex:e,toolCall:i,partial:t})}}function L(e){return e.map(e=>{let t=l(e,!0);return{type:`function`,function:{name:e.name,description:e.description,parameters:R(c(e,t)),strict:t??!1}}})}function R(e){if(Array.isArray(e))return e.map(e=>R(e));if(e&&typeof e==`object`){let t={};for(let[n,r]of Object.entries(e))t[n]=R(r);return t}return e}function z(e,t){let n=[];for(let r of e){if(r.role===`user`){if(typeof r.content==`string`){n.push({role:`user`,content:s(r.content)});continue}let e=r.content.some(e=>e.type===`image`),i=r.content.filter(e=>e.type===`text`||t).map(e=>e.type===`text`?{type:`text`,text:s(e.text)}:{type:`image_url`,imageUrl:`data:${e.mimeType};base64,${e.data}`});if(i.length>0){n.push({role:`user`,content:i});continue}e&&!t&&n.push({role:`user`,content:`(image omitted: model does not support images)`});continue}if(r.role===`assistant`){let e=[],t=[];for(let n of r.content){if(n.type===`text`){n.text.trim().length>0&&e.push({type:`text`,text:s(n.text)});continue}if(n.type===`thinking`){n.thinking.trim().length>0&&e.push({type:`thinking`,thinking:[{type:`text`,text:s(n.thinking)}]});continue}t.push({id:n.id,type:`function`,function:{name:n.name,arguments:JSON.stringify(n.arguments||{})},index:0})}let i={role:`assistant`,prefix:!1};e.length>0&&(i.content=e),t.length>0&&(i.toolCalls=t),(e.length>0||t.length>0)&&n.push(i);continue}let e=[],i=B(r.content.filter(e=>e.type===`text`).map(e=>e.type===`text`?s(e.text):``).join(`
3
- `),r.content.some(e=>e.type===`image`),t,r.isError);e.push({type:`text`,text:i});for(let n of r.content)t&&n.type===`image`&&e.push({type:`image_url`,imageUrl:`data:${n.mimeType};base64,${n.data}`});n.push({role:`tool`,toolCallId:r.toolCallId,name:r.toolName,content:e})}return n}function B(e,t,n,r){let i=e.trim(),a=r?`[tool error] `:``;return i.length>0?`${a}${i}${t&&!n?`
4
- [tool image omitted: model does not support images]`:``}`:t?n?r?`[tool error] (see attached image)`:`(see attached image)`:r?`[tool error] (image omitted: model does not support images)`:`(image omitted: model does not support images)`:r?`[tool error] (no tool output)`:`(no tool output)`}function V(e){return e.id===`mistral-small-2603`||e.id===`mistral-small-latest`||e.id===`mistral-medium-3.5`}function H(e){return e.reasoning&&!V(e)}function U(e,t){return e.thinkingLevelMap?.[t]??`high`}function W(e){if(e)return e===`auto`||e===`none`||e===`any`||e===`required`?e:{type:`function`,function:{name:e.function.name}}}function G(e){if(e===null)return{stopReason:`stop`};switch(e){case`stop`:return{stopReason:`stop`};case`length`:case`model_length`:return{stopReason:`length`};case`tool_calls`:return{stopReason:`toolUse`};case`error`:return{stopReason:`error`,errorMessage:`Provider stopped with: error`};default:return{stopReason:`error`,errorMessage:`Provider stopped with: ${e}`}}}export{d as stream,f as streamSimple};
@@ -1 +0,0 @@
1
- var e=Object.freeze(JSON.parse(`{"colors":{"activityBar.background":"#272822","activityBar.foreground":"#f8f8f2","badge.background":"#75715E","badge.foreground":"#f8f8f2","button.background":"#75715E","debugToolBar.background":"#1e1f1c","diffEditor.insertedTextBackground":"#4b661680","diffEditor.removedTextBackground":"#90274A70","dropdown.background":"#414339","dropdown.listBackground":"#1e1f1c","editor.background":"#272822","editor.foreground":"#f8f8f2","editor.lineHighlightBackground":"#3e3d32","editor.selectionBackground":"#878b9180","editor.selectionHighlightBackground":"#575b6180","editor.wordHighlightBackground":"#4a4a7680","editor.wordHighlightStrongBackground":"#6a6a9680","editorCursor.foreground":"#f8f8f0","editorGroup.border":"#34352f","editorGroup.dropBackground":"#41433980","editorGroupHeader.tabsBackground":"#1e1f1c","editorHoverWidget.background":"#414339","editorHoverWidget.border":"#75715E","editorIndentGuide.activeBackground":"#767771","editorIndentGuide.background":"#464741","editorLineNumber.activeForeground":"#c2c2bf","editorLineNumber.foreground":"#90908a","editorSuggestWidget.background":"#272822","editorSuggestWidget.border":"#75715E","editorWhitespace.foreground":"#464741","editorWidget.background":"#1e1f1c","focusBorder":"#99947c","input.background":"#414339","inputOption.activeBorder":"#75715E","inputValidation.errorBackground":"#90274A","inputValidation.errorBorder":"#f92672","inputValidation.infoBackground":"#546190","inputValidation.infoBorder":"#819aff","inputValidation.warningBackground":"#848528","inputValidation.warningBorder":"#e2e22e","list.activeSelectionBackground":"#75715E","list.dropBackground":"#414339","list.highlightForeground":"#f8f8f2","list.hoverBackground":"#3e3d32","list.inactiveSelectionBackground":"#414339","menu.background":"#1e1f1c","menu.foreground":"#cccccc","minimap.selectionHighlight":"#878b9180","panel.border":"#414339","panelTitle.activeBorder":"#75715E","panelTitle.activeForeground":"#f8f8f2","panelTitle.inactiveForeground":"#75715E","peekView.border":"#75715E","peekViewEditor.background":"#272822","peekViewEditor.matchHighlightBackground":"#75715E","peekViewResult.background":"#1e1f1c","peekViewResult.matchHighlightBackground":"#75715E","peekViewResult.selectionBackground":"#414339","peekViewTitle.background":"#1e1f1c","pickerGroup.foreground":"#75715E","ports.iconRunningProcessForeground":"#ccccc7","progressBar.background":"#75715E","quickInputList.focusBackground":"#414339","selection.background":"#878b9180","settings.focusedRowBackground":"#4143395A","sideBar.background":"#1e1f1c","sideBarSectionHeader.background":"#272822","statusBar.background":"#414339","statusBar.debuggingBackground":"#75715E","statusBar.noFolderBackground":"#414339","statusBarItem.remoteBackground":"#AC6218","tab.border":"#1e1f1c","tab.inactiveBackground":"#34352f","tab.inactiveForeground":"#ccccc7","tab.lastPinnedBorder":"#414339","terminal.ansiBlack":"#333333","terminal.ansiBlue":"#6A7EC8","terminal.ansiBrightBlack":"#666666","terminal.ansiBrightBlue":"#819aff","terminal.ansiBrightCyan":"#66D9EF","terminal.ansiBrightGreen":"#A6E22E","terminal.ansiBrightMagenta":"#AE81FF","terminal.ansiBrightRed":"#f92672","terminal.ansiBrightWhite":"#f8f8f2","terminal.ansiBrightYellow":"#e2e22e","terminal.ansiCyan":"#56ADBC","terminal.ansiGreen":"#86B42B","terminal.ansiMagenta":"#8C6BC8","terminal.ansiRed":"#C4265E","terminal.ansiWhite":"#e3e3dd","terminal.ansiYellow":"#B3B42B","titleBar.activeBackground":"#1e1f1c","widget.shadow":"#00000098"},"displayName":"Monokai","name":"monokai","semanticHighlighting":true,"tokenColors":[{"settings":{"foreground":"#F8F8F2"}},{"scope":["meta.embedded","source.groovy.embedded","string meta.image.inline.markdown","variable.legacy.builtin.python"],"settings":{"foreground":"#F8F8F2"}},{"scope":"comment","settings":{"foreground":"#88846f"}},{"scope":"string","settings":{"foreground":"#E6DB74"}},{"scope":["punctuation.definition.template-expression","punctuation.section.embedded"],"settings":{"foreground":"#F92672"}},{"scope":["meta.template.expression"],"settings":{"foreground":"#F8F8F2"}},{"scope":"constant.numeric","settings":{"foreground":"#AE81FF"}},{"scope":"constant.language","settings":{"foreground":"#AE81FF"}},{"scope":"constant.character, constant.other","settings":{"foreground":"#AE81FF"}},{"scope":"variable","settings":{"fontStyle":"","foreground":"#F8F8F2"}},{"scope":"keyword","settings":{"foreground":"#F92672"}},{"scope":"storage","settings":{"fontStyle":"","foreground":"#F92672"}},{"scope":"storage.type","settings":{"fontStyle":"italic","foreground":"#66D9EF"}},{"scope":"entity.name.type, entity.name.class, entity.name.namespace, entity.name.scope-resolution","settings":{"fontStyle":"underline","foreground":"#A6E22E"}},{"scope":["entity.other.inherited-class","punctuation.separator.namespace.ruby"],"settings":{"fontStyle":"italic underline","foreground":"#A6E22E"}},{"scope":"entity.name.function","settings":{"fontStyle":"","foreground":"#A6E22E"}},{"scope":"variable.parameter","settings":{"fontStyle":"italic","foreground":"#FD971F"}},{"scope":"entity.name.tag","settings":{"fontStyle":"","foreground":"#F92672"}},{"scope":"entity.other.attribute-name","settings":{"fontStyle":"","foreground":"#A6E22E"}},{"scope":"support.function","settings":{"fontStyle":"","foreground":"#66D9EF"}},{"scope":"support.constant","settings":{"fontStyle":"","foreground":"#66D9EF"}},{"scope":"support.type, support.class","settings":{"fontStyle":"italic","foreground":"#66D9EF"}},{"scope":"support.other.variable","settings":{"fontStyle":""}},{"scope":"invalid","settings":{"fontStyle":"","foreground":"#F44747"}},{"scope":"invalid.deprecated","settings":{"foreground":"#F44747"}},{"scope":"meta.structure.dictionary.json string.quoted.double.json","settings":{"foreground":"#CFCFC2"}},{"scope":"meta.diff, meta.diff.header","settings":{"foreground":"#75715E"}},{"scope":"markup.deleted","settings":{"foreground":"#F92672"}},{"scope":"markup.inserted","settings":{"foreground":"#A6E22E"}},{"scope":"markup.changed","settings":{"foreground":"#E6DB74"}},{"scope":"constant.numeric.line-number.find-in-files - match","settings":{"foreground":"#AE81FFA0"}},{"scope":"entity.name.filename.find-in-files","settings":{"foreground":"#E6DB74"}},{"scope":"markup.quote","settings":{"foreground":"#F92672"}},{"scope":"markup.list","settings":{"foreground":"#E6DB74"}},{"scope":"markup.bold, markup.italic","settings":{"foreground":"#66D9EF"}},{"scope":"markup.inline.raw","settings":{"fontStyle":"","foreground":"#FD971F"}},{"scope":"markup.heading","settings":{"foreground":"#A6E22E"}},{"scope":"markup.heading.setext","settings":{"fontStyle":"bold","foreground":"#A6E22E"}},{"scope":"markup.heading.markdown","settings":{"fontStyle":"bold"}},{"scope":"markup.quote.markdown","settings":{"fontStyle":"italic","foreground":"#75715E"}},{"scope":"markup.bold.markdown","settings":{"fontStyle":"bold"}},{"scope":"string.other.link.title.markdown,string.other.link.description.markdown","settings":{"foreground":"#AE81FF"}},{"scope":"markup.underline.link.markdown,markup.underline.link.image.markdown","settings":{"foreground":"#E6DB74"}},{"scope":"markup.italic.markdown","settings":{"fontStyle":"italic"}},{"scope":"markup.strikethrough","settings":{"fontStyle":"strikethrough"}},{"scope":"markup.list.unnumbered.markdown, markup.list.numbered.markdown","settings":{"foreground":"#f8f8f2"}},{"scope":["punctuation.definition.list.begin.markdown"],"settings":{"foreground":"#A6E22E"}},{"scope":"token.info-token","settings":{"foreground":"#6796e6"}},{"scope":"token.warn-token","settings":{"foreground":"#cd9731"}},{"scope":"token.error-token","settings":{"foreground":"#f44747"}},{"scope":"token.debug-token","settings":{"foreground":"#b267e6"}},{"scope":"variable.language","settings":{"foreground":"#FD971F"}}],"type":"dark"}`));export{e as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/account-store-D1f8dn0G.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/preload-helper-Czpn1I53.js","assets/bedrock-camp-qpZqnqLa.js","assets/diagnostics-DN_idNHx.js","assets/transform-messages-N_eMsP2M.js","assets/provider-env-CTOcDKrQ.js","assets/__vite-browser-external-5eBdwsFd.js","assets/openrouter.models-gbjkpjE_.js","assets/libesm-BI4UHVqp.js","assets/logger-DDBAeTLF.js","assets/src-CAWTvdAa.js","assets/proxied-fetch-B4g-4VbQ.js","assets/base64-DpPqYZJF.js","assets/runtime-env-Dlaokqg1.js","assets/fetch-body-D2PwksUW.js","assets/float-topology-BgioAcOd.js","assets/runtime-env-E-i2SW1s.js","assets/secret-topology-xLmXoozo.js","assets/secrets-bridge-client-cWDAnFqs.js","assets/port-bridge-client-BbVs1yhx.js","assets/image-markers-BXtVm4og.js","assets/tool-ui-DfXu6quJ.js","assets/providers-BAjAn8LJ.js","assets/panel-rpc-B3MSVImO.js"])))=>i.map(i=>d[i]);
2
- import{t as e}from"./preload-helper-Czpn1I53.js";import{t}from"./mime-types-ugOWOUZ9.js";import{n,t as r}from"./base64-DpPqYZJF.js";import"./src-CAWTvdAa.js";import{i,o as a,r as o}from"./proxied-fetch-B4g-4VbQ.js";import{n as s}from"./runtime-env-Dlaokqg1.js";import"./runtime-env-E-i2SW1s.js";import{t as c}from"./types-idfTVsM8.js";import"./backend-local-1YuE96fx.js";import"./mount-table-store-dY2IfQ5S.js";import{t as l}from"./mount-bridge-client-4blXuJO1.js";var u=`https://api.aem.live`,d=`application/folder`,f=5242880;function p(e){let t=e.match(/^aem:\/\/([^/]+)\/([^/]+)(?:\/(.*))?$/);if(!t)throw Error(`invalid AEM source '${e}' — expected aem://org/site[/path]`);return{org:t[1],site:t[2],path:(t[3]??``).replace(/^\/+/,``).replace(/\/+$/,``)}}function m(e){if(!e)return``;let t=Date.parse(e);return Number.isNaN(t)?``:String(t)}function h(e){let t=Date.parse(e??``);return Number.isNaN(t)?0:t}function g(e){return e.map(e=>e[`content-type`]===d||e.name.endsWith(`/`)?{name:e.name.replace(/\/+$/,``),kind:`directory`}:{name:e.name,kind:`file`,size:e.size,etag:m(e[`last-modified`]),lastModified:h(e[`last-modified`])})}var _=class{kind=`aem`;source;profile;mountId;parsed;cache;maxBodyBytes;transport;closed=!1;constructor(e){this.source=e.source,this.profile=e.profile,this.mountId=e.mountId??crypto.randomUUID(),this.parsed=p(e.source),this.cache=e.cache,this.maxBodyBytes=e.maxBodyBytes??f,this.transport=e.signedFetch}assertOpen(e){if(this.closed)throw new c(`EBADF`,`mount closed`,e)}toMountRelative(e){return e.replace(/^\/+/,``)}toSourcePath(e){let t=e.replace(/^\/+/,``).replace(/\/+$/,``),n=[this.parsed.path,t].filter(e=>e.length>0).join(`/`),r=`/${this.parsed.org}/sites/${this.parsed.site}/source`;return n?`${r}/${n}`:r}toListPath(e){return`${this.toSourcePath(e)}/`}request(e,t,n){return this.transport({method:e,path:t,origin:u,headers:n?.headers,body:n?.body})}async readFile(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n&&!this.cache.isStale(n.cachedAt))return n.body;let r=await this.request(`GET`,this.toSourcePath(t));if(r.status===404)throw await this.cache.invalidateBody(t),new c(`ENOENT`,`no such file`,e);if(r.status===401||r.status===403)throw new c(`EACCES`,`aem access denied`,e);if(r.status>=400)throw new c(`EIO`,`aem readFile failed: ${r.status}`,e);let i=new Uint8Array(await r.arrayBuffer());if(i.byteLength>this.maxBodyBytes)throw new c(`EFBIG`,`body exceeds maxBodyBytes`,e);return await this.cache.putBody(t,i,m(r.headers.get(`last-modified`))),i}async assertUnchanged(e,t,n){if(!n)return;let r=await this.request(`HEAD`,this.toSourcePath(t));if(r.status===404)return;if(r.status>=400)throw new c(`EIO`,`aem precondition HEAD failed: ${r.status}`,e);let i=m(r.headers.get(`last-modified`));if(i&&i!==n)throw await this.cache.invalidateBody(t),new c(`EBUSY`,`remote modified since last read — re-read and retry`,e)}async writeFile(e,t){if(this.assertOpen(e),t.byteLength>this.maxBodyBytes)throw new c(`EFBIG`,`body exceeds maxBodyBytes`,e);let n=this.toMountRelative(e),r=await this.cache.getBody(n);await this.assertUnchanged(e,n,r?.etag??``);let i=await this.request(`PUT`,this.toSourcePath(n),{body:t});if(i.status===401||i.status===403)throw new c(`EACCES`,`aem write denied`,e);if(i.status>=400)throw new c(`EIO`,`aem writeFile failed: ${i.status}`,e);await this.cache.invalidateBody(n);let a=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(a)}async readDir(e){this.assertOpen(e);let t=this.toMountRelative(e).replace(/\/+$/,``),n=await this.cache.getListing(t);if(n&&!this.cache.isStale(n.cachedAt))return n.entries;let r=await this.request(`GET`,this.toListPath(t));if(r.status===404)throw new c(`ENOENT`,`no such directory`,e);if(r.status===401||r.status===403)throw new c(`EACCES`,`aem access denied`,e);if(r.status>=400)throw new c(`EIO`,`aem list failed: ${r.status}`,e);let i=g(await r.json());return await this.cache.putListing(t,i),i}async stat(e){this.assertOpen(e);let t=this.toMountRelative(e);if(t===``)return{kind:`directory`,size:0,mtime:0};let n=await this.cache.getBody(t);if(n)return{kind:`file`,size:n.size,mtime:n.cachedAt,etag:n.etag};let r=t.split(`/`),i=r.pop()??``,a=r.join(`/`),o=await this.cache.getListing(a),s=(o&&!this.cache.isStale(o.cachedAt)?o.entries:await this.readDirQuietly(a))?.find(e=>e.name===i);if(!s)throw new c(`ENOENT`,`no such file or directory`,e);return s.kind===`directory`?{kind:`directory`,size:0,mtime:s.lastModified??0}:{kind:`file`,size:s.size??0,mtime:s.lastModified??0,etag:s.etag??``}}async readDirQuietly(e){try{return await this.readDir(e)}catch{return null}}async mkdir(e){}async remove(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.request(`DELETE`,this.toSourcePath(t));if(n.status===404)throw new c(`ENOENT`,`no such file`,e);if(n.status===401||n.status===403)throw new c(`EACCES`,`aem delete denied`,e);if(n.status>=400)throw new c(`EIO`,`aem delete failed: ${n.status}`,e);await this.cache.invalidateBody(t);let r=t.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(r)}async refresh(e){this.assertOpen(`/`);let t={added:[],removed:[],changed:[],unchanged:0,errors:[]},n=[``];for(;n.length>0;){let e=n.pop();try{await this.refreshDir(e,t,n)}catch(n){t.errors.push({path:e,message:n instanceof Error?n.message:String(n)})}}return e?.bodies&&await this.refreshBodies(t),t}async classifyFile(e,t,n){let r=await this.cache.getBody(e);r?t&&r.etag!==t?(await this.cache.invalidateBody(e),n.changed.push(e)):n.unchanged++:n.added.push(e)}async refreshDir(e,t,n){let r=await this.request(`GET`,this.toListPath(e));if(r.status===404){await this.cache.putListing(e,[]);return}if(r.status>=400){t.errors.push({path:e,message:`list failed: ${r.status}`});return}let i=g(await r.json());for(let r of i){let i=e?`${e}/${r.name}`:r.name;r.kind===`directory`?n.push(i):await this.classifyFile(i,r.etag??``,t)}await this.cache.putListing(e,i)}async refreshBodies(e){for(let t of e.changed)try{await this.readFile(t)}catch(n){e.errors.push({path:t,message:n instanceof Error?n.message:String(n)})}}describe(){return{displayName:`${this.parsed.org}/${this.parsed.site}${this.parsed.path?`/${this.parsed.path}`:``}`,source:this.source,profile:this.profile}}async close(){this.closed||=!0}};function v(e,t,n){let r=`----DaMount${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`,i=new TextEncoder,a=i.encode(`--${r}\r\nContent-Disposition: form-data; name="data"; filename="${e}"\r\nContent-Type: ${t}\r\n\r\n`),o=i.encode(`\r\n--${r}--\r\n`),s=new Uint8Array(a.byteLength+n.byteLength+o.byteLength);return s.set(a,0),s.set(n,a.byteLength),s.set(o,a.byteLength+n.byteLength),{contentType:`multipart/form-data; boundary=${r}`,body:s}}function y(e){return e.split(`/`).pop()||`data`}function b(e){let t=e.match(/^da:\/\/([^/]+)\/([^/]+)(?:\/(.*))?$/);if(!t)throw Error(`invalid DA source '${e}' — expected da://org/repo[/path]`);return{org:t[1],repo:t[2],path:(t[3]??``).replace(/^\/+/,``).replace(/\/+$/,``)}}var x=5242880,S=class{kind=`da`;source;profile;mountId;parsed;cache;maxBodyBytes;transport;closed=!1;constructor(e){this.source=e.source,this.profile=e.profile,this.mountId=e.mountId??crypto.randomUUID(),this.parsed=b(e.source),this.cache=e.cache,this.maxBodyBytes=e.maxBodyBytes??x,this.transport=e.signedFetch}assertOpen(e){if(this.closed)throw new c(`EBADF`,`mount closed`,e)}toMountRelative(e){return e.replace(/^\/+/,``)}toSourcePath(e){let t=e.replace(/^\/+/,``).replace(/\/+$/,``),n=[this.parsed.path,t].filter(e=>e.length>0).join(`/`);return`/source/${this.parsed.org}/${this.parsed.repo}${n?`/${n}`:``}`}toListPath(e){let t=e.replace(/^\/+/,``).replace(/\/+$/,``),n=[this.parsed.path,t].filter(e=>e.length>0).join(`/`);return`/list/${this.parsed.org}/${this.parsed.repo}${n?`/${n}`:``}`}async readFile(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n&&!this.cache.isStale(n.cachedAt))return n.body;let r={};n&&(r[`if-none-match`]=n.etag);let i=await this.transport({method:`GET`,path:this.toSourcePath(t),headers:r});if(i.status===304&&n)return await this.cache.putBody(t,n.body,n.etag),n.body;if(i.status===404)throw await this.cache.invalidateBody(t),new c(`ENOENT`,`no such file`,e);if(i.status===401||i.status===403)throw new c(`EACCES`,`da access denied`,e);if(i.status>=400)throw new c(`EIO`,`da readFile failed: ${i.status}`,e);let a=i.headers.get(`content-length`),o=a?Number(a):void 0;if(o!==void 0&&o>this.maxBodyBytes)throw new c(`EFBIG`,`body exceeds maxBodyBytes`,e);let s=new Uint8Array(await i.arrayBuffer());if(s.byteLength>this.maxBodyBytes)throw new c(`EFBIG`,`body exceeds maxBodyBytes`,e);let l=i.headers.get(`etag`)??``,u=l.startsWith(`W/`)?l.slice(2):l;return await this.cache.putBody(t,s,u),s}async writeFile(e,n){if(this.assertOpen(e),n.byteLength>this.maxBodyBytes)throw new c(`EFBIG`,`body exceeds maxBodyBytes`,e);let r=this.toMountRelative(e),i=await this.cache.getBody(r),a=v(y(e),t(e),n),o={"content-type":a.contentType,"content-length":String(a.body.byteLength)};i?.etag?o[`if-match`]=i.etag.startsWith(`W/`)?i.etag.slice(2):i.etag:i||(o[`if-none-match`]=`*`);let s=()=>this.transport({method:`POST`,path:this.toSourcePath(r),headers:o,body:a.body}),l,u=1;try{l=await s()}catch{u=2,l=await s()}if(l.status===412){if(u===2){let t=await this.transport({method:`HEAD`,path:this.toSourcePath(r)});if(t.status>=400)throw new c(`EIO`,`da reconcile HEAD failed: ${t.status}`,e);let i=t.headers.get(`etag`)??``;await this.cache.putBody(r,n,i);let a=r.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(a);return}await this.cache.invalidateBody(r);try{await this.readFile(e)}catch{}throw new c(`EBUSY`,`remote modified since last read — re-read and retry`,e)}if(l.status===401||l.status===403)throw new c(`EACCES`,`da write denied`,e);if(l.status>=400)throw new c(`EIO`,`da writeFile failed: ${l.status}`,e);let d=l.headers.get(`etag`)??``;await this.cache.putBody(r,n,d);let f=r.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(f)}async readDir(e){this.assertOpen(e);let t=this.toMountRelative(e).replace(/\/+$/,``),n=await this.cache.getListing(t);if(n&&!this.cache.isStale(n.cachedAt))return n.entries;let r=await this.transport({method:`GET`,path:this.toListPath(t)});if(r.status===404)throw new c(`ENOENT`,`no such directory`,e);if(r.status>=400)throw new c(`EIO`,`da list failed: ${r.status}`,e);let i=(await r.json()).map(e=>e.ext?{name:`${e.name}.${e.ext}`,kind:`file`,etag:e.etag,lastModified:e.lastModified}:{name:e.name,kind:`directory`,lastModified:e.lastModified});return await this.cache.putListing(t,i),i}async stat(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n)return{kind:`file`,size:n.size,mtime:n.cachedAt,etag:n.etag};let r=t.split(`/`),i=r.pop()??``,a=r.join(`/`),o=await this.cache.getListing(a);if(o&&!this.cache.isStale(o.cachedAt)){let t=o.entries.find(e=>e.name===i);if(t?.kind===`file`&&t.size!==void 0)return{kind:`file`,size:t.size,mtime:t.lastModified??o.cachedAt,etag:t.etag??``};if(t?.kind===`directory`)return{kind:`directory`,size:0,mtime:t.lastModified??o.cachedAt};if(!t)throw new c(`ENOENT`,`no such file or directory`,e)}let s=await this.transport({method:`HEAD`,path:this.toSourcePath(t)});if(s.status===200){let e=Number(s.headers.get(`content-length`)??`0`),t=s.headers.get(`etag`)??``,n=s.headers.get(`last-modified`),r=n?Date.parse(n):0;if(o){let n=o.entries.map(n=>n.name===i&&n.kind===`file`?{...n,size:e,etag:t,lastModified:r}:n);await this.cache.putListing(a,n)}return{kind:`file`,size:e,mtime:r,etag:t}}if(s.status===404){let n=await this.cache.getListing(t);if(n)return{kind:`directory`,size:0,mtime:n.cachedAt};throw new c(`ENOENT`,`no such file or directory`,e)}throw new c(`EIO`,`da stat failed: ${s.status}`,e)}async mkdir(e){}async remove(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.transport({method:`DELETE`,path:this.toSourcePath(t)});if(n.status===404)throw new c(`ENOENT`,`no such file`,e);if(n.status===401||n.status===403)throw new c(`EACCES`,`da delete denied`,e);if(n.status>=400)throw new c(`EIO`,`da delete failed: ${n.status}`,e);await this.cache.invalidateBody(t);let r=t.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(r)}async refresh(e){this.assertOpen(`/`);let t={added:[],removed:[],changed:[],unchanged:0,errors:[]},n=[``];for(;n.length>0;){let e=n.pop();try{await this.refreshDir(e,t,n)}catch(n){t.errors.push({path:e,message:n instanceof Error?n.message:String(n)})}}return e?.bodies&&await this.refreshBodies(t),t}async classifyFile(e,t,n){let r=await this.cache.getBody(e);r?t&&r.etag!==t?(await this.cache.invalidateBody(e),n.changed.push(e)):n.unchanged++:n.added.push(e)}async refreshDir(e,t,n){let r=await this.transport({method:`GET`,path:this.toListPath(e)});if(r.status>=400){t.errors.push({path:e,message:`list failed: ${r.status}`});return}let i=await r.json(),a=[];for(let r of i)if(r.ext){let n=e?`${e}/${r.name}.${r.ext}`:`${r.name}.${r.ext}`;a.push({name:`${r.name}.${r.ext}`,kind:`file`,etag:r.etag,lastModified:r.lastModified}),await this.classifyFile(n,r.etag,t)}else a.push({name:r.name,kind:`directory`}),n.push(e?`${e}/${r.name}`:r.name);await this.cache.putListing(e,a)}async refreshBodies(e){for(let t of e.changed)try{await this.readFile(t)}catch(n){e.errors.push({path:t,message:n instanceof Error?n.message:String(n)})}}describe(){return{displayName:`${this.parsed.org}/${this.parsed.repo}${this.parsed.path?`/${this.parsed.path}`:``}`,source:this.source,profile:this.profile}}async close(){this.closed||=!0}};function C(e){let t=e.match(/^s3:\/\/([^/]+)(?:\/(.*))?$/);if(!t)throw Error(`invalid S3 source '${e}' — expected s3://bucket[/prefix]`);return{bucket:t[1],prefix:(t[2]??``).replace(/^\/+/,``).replace(/\/+$/,``)}}var w=26214400,T=class{kind=`s3`;source;profile;mountId;parsed;cache;maxBodyBytes;transport;closed=!1;constructor(e){this.source=e.source,this.profile=e.profile,this.mountId=e.mountId??crypto.randomUUID(),this.parsed=C(e.source),this.cache=e.cache,this.maxBodyBytes=e.maxBodyBytes??w,this.transport=e.signedFetch}assertOpen(e){if(this.closed)throw new c(`EBADF`,`mount closed`,e)}toMountRelative(e){return e.replace(/^\/+/,``)}toS3Key(e){let t=e.replace(/^\/+/,``).replace(/\/+$/,``);return[this.parsed.prefix,t].filter(e=>e.length>0).join(`/`)}toMountRelativeKey(e){return this.parsed.prefix?e.slice(this.parsed.prefix.length+1):e}async readFile(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n&&!this.cache.isStale(n.cachedAt))return n.body;let r={};n&&(r[`if-none-match`]=n.etag);let i=await this.transport({method:`GET`,bucket:this.parsed.bucket,key:this.toS3Key(t),headers:r});if(i.status===304&&n)return await this.cache.putBody(t,n.body,n.etag),n.body;if(i.status===404)throw await this.cache.invalidateBody(t),new c(`ENOENT`,`no such file`,e);if(i.status===401||i.status===403)throw new c(`EACCES`,`s3 access denied`,e);if(i.status>=400)throw new c(`EIO`,`s3 readFile failed: ${i.status}`,e);let a=i.headers.get(`content-length`),o=a?Number(a):void 0;if(o!==void 0&&o>this.maxBodyBytes)throw new c(`EFBIG`,`body exceeds maxBodyBytes (${o} > ${this.maxBodyBytes})`,e);let s=new Uint8Array(await i.arrayBuffer());if(s.byteLength>this.maxBodyBytes)throw new c(`EFBIG`,`body exceeds maxBodyBytes`,e);let l=i.headers.get(`etag`)??``;return await this.cache.putBody(t,s,l),s}async writeFile(e,t){this.assertOpen(e);let n=this.toMountRelative(e);if(t.byteLength>this.maxBodyBytes)throw new c(`EFBIG`,`body exceeds maxBodyBytes`,e);let r=await this.cache.getBody(n),i={"content-type":`application/octet-stream`,"content-length":String(t.byteLength)};r?i[`if-match`]=r.etag:i[`if-none-match`]=`*`;let a=()=>this.transport({method:`PUT`,bucket:this.parsed.bucket,key:this.toS3Key(n),headers:i,body:t}),o,s=1;try{o=await a()}catch{s=2,o=await a()}if(o.status===412){if(s===2){let r=await this.transport({method:`HEAD`,bucket:this.parsed.bucket,key:this.toS3Key(n)});if(r.status>=400)throw new c(`EIO`,`s3 reconcile HEAD failed: ${r.status}`,e);let i=r.headers.get(`etag`)??``;await this.cache.putBody(n,t,i);let a=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(a);return}await this.cache.invalidateBody(n);try{await this.readFile(e)}catch{}throw new c(`EBUSY`,`remote modified since last read — re-read and retry`,e)}if(o.status===401||o.status===403)throw new c(`EACCES`,`s3 write denied`,e);if(o.status>=400)throw new c(`EIO`,`s3 writeFile failed: ${o.status}`,e);let l=o.headers.get(`etag`)??``;await this.cache.putBody(n,t,l);let u=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(u)}async listObjectsV2(){let e=[],t;do{let n={"list-type":`2`};this.parsed.prefix&&(n.prefix=`${this.parsed.prefix}/`),t&&(n[`continuation-token`]=t);let r=await this.transport({method:`GET`,bucket:this.parsed.bucket,key:``,query:n});if(r.status>=400)throw new c(`EIO`,`s3 list failed: ${r.status}`,`/`);let i=await r.text(),a=this.parseListingXml(i);e.push(...a.contents),t=a.nextContinuationToken}while(t);return e}parseListingXml(e){let t=[];for(let n of e.matchAll(/<Contents>([\s\S]*?)<\/Contents>/g)){let e=n[1],r=e.match(/<Key>([^<]+)<\/Key>/)?.[1]??``,i=e.match(/<ETag>([^<]+)<\/ETag>/)?.[1]??``,a=e.match(/<Size>([^<]+)<\/Size>/)?.[1]??`0`,o=e.match(/<LastModified>([^<]+)<\/LastModified>/)?.[1]??``;t.push({key:r,etag:i,size:Number(a),lastModified:o?Date.parse(o):0})}return{contents:t,nextContinuationToken:e.match(/<IsTruncated>([^<]+)<\/IsTruncated>/)?.[1]===`true`?e.match(/<NextContinuationToken>([^<]+)<\/NextContinuationToken>/)?.[1]:void 0}}async readDir(e){this.assertOpen(e);let t=this.toMountRelative(e).replace(/\/+$/,``),n=await this.cache.getListing(t);if(n&&!this.cache.isStale(n.cachedAt))return n.entries;let r=await this.listObjectsV2(),i=this.groupByDir(r);for(let[e,t]of i)await this.cache.putListing(e,t);return i.get(t)??[]}groupByDir(e){let t=new Map,n=e=>(t.has(e)||t.set(e,[]),t.get(e));n(``);for(let t of e){let e=this.toMountRelativeKey(t.key).split(`/`),r=e.pop();n(e.join(`/`)).push({name:r,kind:`file`,size:t.size,etag:t.etag,lastModified:t.lastModified});let i=``;for(let t of e){let e=i;i=i?`${i}/${t}`:t;let r=n(e);r.find(e=>e.name===t&&e.kind===`directory`)||r.push({name:t,kind:`directory`}),n(i)}}return t}async stat(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n)return{kind:`file`,size:n.body.byteLength,mtime:n.cachedAt,etag:n.etag};let r=t.split(`/`),i=r.pop()??``,a=r.join(`/`),o=await this.cache.getListing(a);if(o&&!this.cache.isStale(o.cachedAt)){let t=o.entries.find(e=>e.name===i);if(t?.kind===`file`&&t.size!==void 0)return{kind:`file`,size:t.size,mtime:t.lastModified??o.cachedAt,etag:t.etag??``};if(t?.kind===`directory`)return{kind:`directory`,size:0,mtime:t.lastModified??o.cachedAt};if(!t)throw new c(`ENOENT`,`no such file or directory`,e)}let s=await this.transport({method:`HEAD`,bucket:this.parsed.bucket,key:this.toS3Key(t)});if(s.status===200){let e=Number(s.headers.get(`content-length`)??`0`),t=s.headers.get(`etag`)??``,n=s.headers.get(`last-modified`);return{kind:`file`,size:e,mtime:n?Date.parse(n):0,etag:t}}if(s.status===404){let n=await this.cache.getListing(t);if(n)return{kind:`directory`,size:0,mtime:n.cachedAt};throw new c(`ENOENT`,`no such file or directory`,e)}throw new c(`EIO`,`s3 stat failed: ${s.status}`,e)}async refresh(e){this.assertOpen(`/`);let t=await this.listObjectsV2(),n=new Set(t.map(e=>this.toMountRelativeKey(e.key))),r=new Map(t.map(e=>[this.toMountRelativeKey(e.key),e.etag])),i={added:[],removed:[],changed:[],unchanged:0,errors:[]};for(let e of n){let t=await this.cache.getBody(e),n=r.get(e);t?t.etag===n?i.unchanged++:(await this.cache.invalidateBody(e),i.changed.push(e)):i.added.push(e)}let a=this.groupByDir(t);for(let[e,t]of a)await this.cache.putListing(e,t);if(e?.bodies)for(let e of i.changed)try{await this.readFile(e)}catch(t){i.errors.push({path:e,message:t instanceof Error?t.message:String(t)})}return i}async mkdir(e){}async remove(e,t){this.assertOpen(e);let n=this.toMountRelative(e);if(t?.recursive)throw new c(`EINVAL`,`recursive remove not yet supported on S3`,e);let r=await this.transport({method:`DELETE`,bucket:this.parsed.bucket,key:this.toS3Key(n)});if(r.status===404)throw new c(`ENOENT`,`no such file`,e);if(r.status===401||r.status===403)throw new c(`EACCES`,`s3 delete denied`,e);if(r.status>=400)throw new c(`EIO`,`s3 delete failed: ${r.status}`,e);await this.cache.invalidateBody(n);let i=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(i)}describe(){return{displayName:this.parsed.prefix?`${this.parsed.bucket}/${this.parsed.prefix}`:this.parsed.bucket,source:this.source,profile:this.profile}}async close(){this.closed||=!0}},E=class extends Error{constructor(e){super(e),this.name=`ProfileNotConfiguredError`}};async function D(){let{getAccounts:t}=await e(async()=>{let{getAccounts:e}=await import(`./account-store-D1f8dn0G.js`).then(e=>e.r);return{getAccounts:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24])),n=t().find(e=>e.providerId===`adobe`);if(!n?.accessToken)throw new E(`No Adobe IMS account found. Log in via Settings → Providers → Adobe first.`);return{identity:`adobe-ims`,getBearerToken:async()=>n.accessToken}}var O=`slicc-mount-cache`,k=`listings`,A=`bodies`,j=class{mountId;ttlMs;dbName;dbPromise=null;constructor(e){this.mountId=e.mountId,this.ttlMs=e.ttlMs,this.dbName=e.dbName??O}isStale(e,t){return Date.now()-e>=(t??this.ttlMs)}async openDb(){return this.dbPromise||=new Promise((e,t)=>{let n=indexedDB.open(this.dbName,1);n.onupgradeneeded=()=>{let e=n.result;e.objectStoreNames.contains(k)||e.createObjectStore(k),e.objectStoreNames.contains(A)||e.createObjectStore(A)},n.onsuccess=()=>{let t=n.result;t.onversionchange=()=>{t.close(),this.dbPromise=null},t.onclose=()=>{this.dbPromise=null},e(t)},n.onerror=()=>t(n.error)}),this.dbPromise}key(e){return`${this.mountId}::${e}`}async getListing(e){let t=await this.openDb();return new Promise((n,r)=>{let i=t.transaction(k,`readonly`).objectStore(k).get(this.key(e));i.onsuccess=()=>n(i.result??null),i.onerror=()=>r(i.error)})}async putListing(e,t){let n=await this.openDb();return new Promise((r,i)=>{let a=n.transaction(k,`readwrite`),o={entries:t,cachedAt:Date.now()};a.objectStore(k).put(o,this.key(e)),a.oncomplete=()=>r(),a.onerror=()=>i(a.error)})}async invalidateListing(e){let t=await this.openDb();return new Promise((n,r)=>{let i=t.transaction(k,`readwrite`);i.objectStore(k).delete(this.key(e)),i.oncomplete=()=>n(),i.onerror=()=>r(i.error)})}async getBody(e){let t=await this.openDb();return new Promise((n,r)=>{let i=t.transaction(A,`readonly`).objectStore(A).get(this.key(e));i.onsuccess=()=>n(i.result??null),i.onerror=()=>r(i.error)})}async putBody(e,t,n){let r=await this.openDb(),i={body:t,etag:n,size:t.byteLength,cachedAt:Date.now()};try{await this.txPut(r,A,this.key(e),i)}catch(t){if(t instanceof DOMException&&t.name===`QuotaExceededError`){await this.evictLru(.25);try{await this.txPut(r,A,this.key(e),i)}catch{}return}throw t}}async invalidateBody(e){let t=await this.openDb();return new Promise((n,r)=>{let i=t.transaction(A,`readwrite`);i.objectStore(A).delete(this.key(e)),i.oncomplete=()=>n(),i.onerror=()=>r(i.error)})}async clearMount(){let e=await this.openDb(),t=`${this.mountId}::`,n=n=>new Promise((r,i)=>{let a=e.transaction(n,`readwrite`),o=a.objectStore(n),s=o.getAllKeys();s.onsuccess=()=>{for(let e of s.result)typeof e==`string`&&e.startsWith(t)&&o.delete(e)},a.oncomplete=()=>r(),a.onerror=()=>i(a.error)});await Promise.all([n(k),n(A)])}txPut(e,t,n,r){return new Promise((i,a)=>{let o=e.transaction(t,`readwrite`);o.objectStore(t).put(r,n),o.oncomplete=()=>i(),o.onerror=()=>a(o.error)})}async evictLru(e){let t=await this.openDb(),n=`${this.mountId}::`,r=await new Promise((e,r)=>{let i=t.transaction(A,`readonly`).objectStore(A),a=[],o=i.openCursor();o.onsuccess=()=>{let t=o.result;if(!t){e(a);return}if(typeof t.key==`string`&&t.key.startsWith(n)){let e=t.value;a.push({key:t.key,cachedAt:e.cachedAt})}t.continue()},o.onerror=()=>r(o.error)});r.sort((e,t)=>e.cachedAt-t.cachedAt);let i=Math.max(1,Math.ceil(r.length*e)),a=r.slice(0,i);await new Promise((e,n)=>{let r=t.transaction(A,`readwrite`),i=r.objectStore(A);for(let{key:e}of a)i.delete(e);r.oncomplete=()=>e(),r.onerror=()=>n(r.error)})}},M=r,N=n,P=new Set([`invalid_profile`,`invalid_request`,`profile_not_configured`,`fetch_failed`,`internal`]),F=new Set([101,103,204,205,304]);function I(e){if(!e.ok)throw e.errorCode===`profile_not_configured`||e.errorCode===`invalid_profile`?new c(`EACCES`,e.error):e.errorCode===`invalid_request`?new c(`EINVAL`,e.error):e.errorCode===`fetch_failed`||e.errorCode===`internal`||P.has(String(e.errorCode))?new c(`EIO`,e.error):new c(`EINVAL`,`mount transport returned unrecognized errorCode '${e.errorCode}': ${e.error}`);let t;try{t=M(e.bodyBase64)}catch(e){throw new c(`EIO`,`mount transport: response body decode failed: ${e instanceof Error?e.message:String(e)}`)}let n=F.has(e.status)?null:t;return new Response(n,{status:e.status,headers:new Headers(e.headers)})}async function L(e,t){let n;try{n=await fetch(a(e),{method:`POST`,headers:o({"content-type":`application/json`}),body:JSON.stringify(t)})}catch(e){throw new c(`EIO`,`mount transport failed: ${e instanceof Error?e.message:String(e)} (SLICC backend at localhost may not be running)`)}try{return await n.json()}catch(e){throw new c(`EIO`,`mount transport: response is not a JSON envelope (status ${n.status}): ${e instanceof Error?e.message:String(e)}`)}}async function R(e,t){try{return await chrome.runtime.sendMessage({type:e,envelope:t})}catch(e){throw new c(`EIO`,`mount transport failed: ${e instanceof Error?e.message:String(e)} (extension service worker not responding)`)}}async function z(e,t,n){return s()?R(e,n):i()?l(e,n):L(t,n)}function B(e){return async t=>I(await z(`mount.s3-sign-and-forward`,`/api/s3-sign-and-forward`,{profile:e,method:t.method,bucket:t.bucket,key:t.key,query:t.query,headers:t.headers,bodyBase64:t.body?N(t.body):void 0}))}function V(e){let t=e?.getImsToken??(async()=>(await D()).getBearerToken());return async e=>{let n;try{n=await t()}catch(e){throw new c(`EACCES`,`DA mount: ${e instanceof Error?e.message:String(e)}`)}return I(await z(`mount.da-sign-and-forward`,`/api/da-sign-and-forward`,{imsToken:n,method:e.method,path:e.path,origin:e.origin,query:e.query,headers:e.headers,bodyBase64:e.body?N(e.body):void 0}))}}export{_ as AemMountBackend,S as DaMountBackend,j as RemoteMountCache,T as S3MountBackend,V as makeSignedFetchDa,B as makeSignedFetchS3};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{f as t,i as n,o as r,p as i,r as a}from"./proxied-fetch-n2pCvcgW.js";import"./src-CcFD5QfS.js";import{t as o}from"./runtime-env-DadgceZk.js";import{t as s}from"./mime-types-D7IV6i7k.js";import"./runtime-env-Dtj99aNH.js";import{t as c}from"./port-bridge-client-DxYLF2-N.js";import"./backend-local-B6kc_FvN.js";import{t as l}from"./types-idfTVsM8.js";import{t as u}from"./remote-cache-JAv9sQH_.js";const d=`https://api.aem.live`;function f(e){let t=e.match(/^aem:\/\/([^/]+)\/([^/]+)(?:\/(.*))?$/);if(!t)throw Error(`invalid AEM source '${e}' — expected aem://org/site[/path]`);return{org:t[1],site:t[2],path:(t[3]??``).replace(/^\/+/,``).replace(/\/+$/,``)}}function p(e){if(!e)return``;let t=Date.parse(e);return Number.isNaN(t)?``:String(t)}function m(e){let t=Date.parse(e??``);return Number.isNaN(t)?0:t}function h(e){return e.map(e=>e[`content-type`]===`application/folder`||e.name.endsWith(`/`)?{name:e.name.replace(/\/+$/,``),kind:`directory`}:{name:e.name,kind:`file`,size:e.size,etag:p(e[`last-modified`]),lastModified:m(e[`last-modified`])})}var g=class{kind=`aem`;source;profile;mountId;parsed;cache;maxBodyBytes;transport;closed=!1;constructor(e){this.source=e.source,this.profile=e.profile,this.mountId=e.mountId??crypto.randomUUID(),this.parsed=f(e.source),this.cache=e.cache,this.maxBodyBytes=e.maxBodyBytes??5242880,this.transport=e.signedFetch}assertOpen(e){if(this.closed)throw new l(`EBADF`,`mount closed`,e)}toMountRelative(e){return e.replace(/^\/+/,``)}toSourcePath(e){let t=e.replace(/^\/+/,``).replace(/\/+$/,``),n=[this.parsed.path,t].filter(e=>e.length>0).join(`/`),r=`/${this.parsed.org}/sites/${this.parsed.site}/source`;return n?`${r}/${n}`:r}toListPath(e){return`${this.toSourcePath(e)}/`}request(e,t,n){return this.transport({method:e,path:t,origin:d,headers:n?.headers,body:n?.body})}async readFile(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n&&!this.cache.isStale(n.cachedAt))return n.body;let r=await this.request(`GET`,this.toSourcePath(t));if(r.status===404)throw await this.cache.invalidateBody(t),new l(`ENOENT`,`no such file`,e);if(r.status===401||r.status===403)throw new l(`EACCES`,`aem access denied`,e);if(r.status>=400)throw new l(`EIO`,`aem readFile failed: ${r.status}`,e);let i=new Uint8Array(await r.arrayBuffer());if(i.byteLength>this.maxBodyBytes)throw new l(`EFBIG`,`body exceeds maxBodyBytes`,e);return await this.cache.putBody(t,i,p(r.headers.get(`last-modified`))),i}async assertUnchanged(e,t,n){if(!n)return;let r=await this.request(`HEAD`,this.toSourcePath(t));if(r.status===404)return;if(r.status>=400)throw new l(`EIO`,`aem precondition HEAD failed: ${r.status}`,e);let i=p(r.headers.get(`last-modified`));if(i&&i!==n)throw await this.cache.invalidateBody(t),new l(`EBUSY`,`remote modified since last read — re-read and retry`,e)}async writeFile(e,t){if(this.assertOpen(e),t.byteLength>this.maxBodyBytes)throw new l(`EFBIG`,`body exceeds maxBodyBytes`,e);let n=this.toMountRelative(e),r=await this.cache.getBody(n);await this.assertUnchanged(e,n,r?.etag??``);let i=await this.request(`PUT`,this.toSourcePath(n),{body:t});if(i.status===401||i.status===403)throw new l(`EACCES`,`aem write denied`,e);if(i.status>=400)throw new l(`EIO`,`aem writeFile failed: ${i.status}`,e);await this.cache.invalidateBody(n);let a=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(a)}async readDir(e){this.assertOpen(e);let t=this.toMountRelative(e).replace(/\/+$/,``),n=await this.cache.getListing(t);if(n&&!this.cache.isStale(n.cachedAt))return n.entries;let r=await this.request(`GET`,this.toListPath(t));if(r.status===404)throw new l(`ENOENT`,`no such directory`,e);if(r.status===401||r.status===403)throw new l(`EACCES`,`aem access denied`,e);if(r.status>=400)throw new l(`EIO`,`aem list failed: ${r.status}`,e);let i=h(await r.json());return await this.cache.putListing(t,i),i}async stat(e){this.assertOpen(e);let t=this.toMountRelative(e);if(t===``)return{kind:`directory`,size:0,mtime:0};let n=await this.cache.getBody(t);if(n)return{kind:`file`,size:n.size,mtime:n.cachedAt,etag:n.etag};let r=t.split(`/`),i=r.pop()??``,a=r.join(`/`),o=await this.cache.getListing(a),s=(o&&!this.cache.isStale(o.cachedAt)?o.entries:await this.readDirQuietly(a))?.find(e=>e.name===i);if(!s)throw new l(`ENOENT`,`no such file or directory`,e);return s.kind===`directory`?{kind:`directory`,size:0,mtime:s.lastModified??0}:{kind:`file`,size:s.size??0,mtime:s.lastModified??0,etag:s.etag??``}}async readDirQuietly(e){try{return await this.readDir(e)}catch{return null}}async mkdir(e){}async remove(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.request(`DELETE`,this.toSourcePath(t));if(n.status===404)throw new l(`ENOENT`,`no such file`,e);if(n.status===401||n.status===403)throw new l(`EACCES`,`aem delete denied`,e);if(n.status>=400)throw new l(`EIO`,`aem delete failed: ${n.status}`,e);await this.cache.invalidateBody(t);let r=t.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(r)}async refresh(e){this.assertOpen(`/`);let t={added:[],removed:[],changed:[],unchanged:0,errors:[]},n=[``];for(;n.length>0;){let e=n.pop();try{await this.refreshDir(e,t,n)}catch(n){t.errors.push({path:e,message:n instanceof Error?n.message:String(n)})}}return e?.bodies&&await this.refreshBodies(t),t}async classifyFile(e,t,n){let r=await this.cache.getBody(e);r?t&&r.etag!==t?(await this.cache.invalidateBody(e),n.changed.push(e)):n.unchanged++:n.added.push(e)}async refreshDir(e,t,n){let r=await this.request(`GET`,this.toListPath(e));if(r.status===404){await this.cache.putListing(e,[]);return}if(r.status>=400){t.errors.push({path:e,message:`list failed: ${r.status}`});return}let i=h(await r.json());for(let r of i){let i=e?`${e}/${r.name}`:r.name;r.kind===`directory`?n.push(i):await this.classifyFile(i,r.etag??``,t)}await this.cache.putListing(e,i)}async refreshBodies(e){for(let t of e.changed)try{await this.readFile(t)}catch(n){e.errors.push({path:t,message:n instanceof Error?n.message:String(n)})}}describe(){return{displayName:`${this.parsed.org}/${this.parsed.site}${this.parsed.path?`/${this.parsed.path}`:``}`,source:this.source,profile:this.profile}}async close(){this.closed||=!0}};function _(e,t,n){let r=`----DaMount${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`,i=new TextEncoder,a=i.encode(`--${r}\r\nContent-Disposition: form-data; name="data"; filename="${e}"\r\nContent-Type: ${t}\r\n\r\n`),o=i.encode(`\r\n--${r}--\r\n`),s=new Uint8Array(a.byteLength+n.byteLength+o.byteLength);return s.set(a,0),s.set(n,a.byteLength),s.set(o,a.byteLength+n.byteLength),{contentType:`multipart/form-data; boundary=${r}`,body:s}}function v(e){return e.split(`/`).pop()||`data`}function y(e){let t=e.match(/^da:\/\/([^/]+)\/([^/]+)(?:\/(.*))?$/);if(!t)throw Error(`invalid DA source '${e}' — expected da://org/repo[/path]`);return{org:t[1],repo:t[2],path:(t[3]??``).replace(/^\/+/,``).replace(/\/+$/,``)}}var b=class{kind=`da`;source;profile;mountId;parsed;cache;maxBodyBytes;transport;closed=!1;constructor(e){this.source=e.source,this.profile=e.profile,this.mountId=e.mountId??crypto.randomUUID(),this.parsed=y(e.source),this.cache=e.cache,this.maxBodyBytes=e.maxBodyBytes??5242880,this.transport=e.signedFetch}assertOpen(e){if(this.closed)throw new l(`EBADF`,`mount closed`,e)}toMountRelative(e){return e.replace(/^\/+/,``)}toSourcePath(e){let t=e.replace(/^\/+/,``).replace(/\/+$/,``),n=[this.parsed.path,t].filter(e=>e.length>0).join(`/`);return`/source/${this.parsed.org}/${this.parsed.repo}${n?`/${n}`:``}`}toListPath(e){let t=e.replace(/^\/+/,``).replace(/\/+$/,``),n=[this.parsed.path,t].filter(e=>e.length>0).join(`/`);return`/list/${this.parsed.org}/${this.parsed.repo}${n?`/${n}`:``}`}async readFile(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n&&!this.cache.isStale(n.cachedAt))return n.body;let r={};n&&(r[`if-none-match`]=n.etag);let i=await this.transport({method:`GET`,path:this.toSourcePath(t),headers:r});if(i.status===304&&n)return await this.cache.putBody(t,n.body,n.etag),n.body;if(i.status===404)throw await this.cache.invalidateBody(t),new l(`ENOENT`,`no such file`,e);if(i.status===401||i.status===403)throw new l(`EACCES`,`da access denied`,e);if(i.status>=400)throw new l(`EIO`,`da readFile failed: ${i.status}`,e);let a=i.headers.get(`content-length`),o=a?Number(a):void 0;if(o!==void 0&&o>this.maxBodyBytes)throw new l(`EFBIG`,`body exceeds maxBodyBytes`,e);let s=new Uint8Array(await i.arrayBuffer());if(s.byteLength>this.maxBodyBytes)throw new l(`EFBIG`,`body exceeds maxBodyBytes`,e);let c=i.headers.get(`etag`)??``,u=c.startsWith(`W/`)?c.slice(2):c;return await this.cache.putBody(t,s,u),s}async writeFile(e,t){if(this.assertOpen(e),t.byteLength>this.maxBodyBytes)throw new l(`EFBIG`,`body exceeds maxBodyBytes`,e);let n=this.toMountRelative(e),r=await this.cache.getBody(n),i=_(v(e),s(e),t),a={"content-type":i.contentType,"content-length":String(i.body.byteLength)};r?.etag?a[`if-match`]=r.etag.startsWith(`W/`)?r.etag.slice(2):r.etag:r||(a[`if-none-match`]=`*`);let o=()=>this.transport({method:`POST`,path:this.toSourcePath(n),headers:a,body:i.body}),c,u=1;try{c=await o()}catch{u=2,c=await o()}if(c.status===412){if(u===2){let r=await this.transport({method:`HEAD`,path:this.toSourcePath(n)});if(r.status>=400)throw new l(`EIO`,`da reconcile HEAD failed: ${r.status}`,e);let i=r.headers.get(`etag`)??``;await this.cache.putBody(n,t,i);let a=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(a);return}await this.cache.invalidateBody(n);try{await this.readFile(e)}catch{}throw new l(`EBUSY`,`remote modified since last read — re-read and retry`,e)}if(c.status===401||c.status===403)throw new l(`EACCES`,`da write denied`,e);if(c.status>=400)throw new l(`EIO`,`da writeFile failed: ${c.status}`,e);let d=c.headers.get(`etag`)??``;await this.cache.putBody(n,t,d);let f=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(f)}async readDir(e){this.assertOpen(e);let t=this.toMountRelative(e).replace(/\/+$/,``),n=await this.cache.getListing(t);if(n&&!this.cache.isStale(n.cachedAt))return n.entries;let r=await this.transport({method:`GET`,path:this.toListPath(t)});if(r.status===404)throw new l(`ENOENT`,`no such directory`,e);if(r.status>=400)throw new l(`EIO`,`da list failed: ${r.status}`,e);let i=(await r.json()).map(e=>e.ext?{name:`${e.name}.${e.ext}`,kind:`file`,etag:e.etag,lastModified:e.lastModified}:{name:e.name,kind:`directory`,lastModified:e.lastModified});return await this.cache.putListing(t,i),i}async stat(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n)return{kind:`file`,size:n.size,mtime:n.cachedAt,etag:n.etag};let r=t.split(`/`),i=r.pop()??``,a=r.join(`/`),o=await this.cache.getListing(a);if(o&&!this.cache.isStale(o.cachedAt)){let t=o.entries.find(e=>e.name===i);if(t?.kind===`file`&&t.size!==void 0)return{kind:`file`,size:t.size,mtime:t.lastModified??o.cachedAt,etag:t.etag??``};if(t?.kind===`directory`)return{kind:`directory`,size:0,mtime:t.lastModified??o.cachedAt};if(!t)throw new l(`ENOENT`,`no such file or directory`,e)}let s=await this.transport({method:`HEAD`,path:this.toSourcePath(t)});if(s.status===200){let e=Number(s.headers.get(`content-length`)??`0`),t=s.headers.get(`etag`)??``,n=s.headers.get(`last-modified`),r=n?Date.parse(n):0;if(o){let n=o.entries.map(n=>n.name===i&&n.kind===`file`?{...n,size:e,etag:t,lastModified:r}:n);await this.cache.putListing(a,n)}return{kind:`file`,size:e,mtime:r,etag:t}}if(s.status===404){let n=await this.cache.getListing(t);if(n)return{kind:`directory`,size:0,mtime:n.cachedAt};throw new l(`ENOENT`,`no such file or directory`,e)}throw new l(`EIO`,`da stat failed: ${s.status}`,e)}async mkdir(e){}async remove(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.transport({method:`DELETE`,path:this.toSourcePath(t)});if(n.status===404)throw new l(`ENOENT`,`no such file`,e);if(n.status===401||n.status===403)throw new l(`EACCES`,`da delete denied`,e);if(n.status>=400)throw new l(`EIO`,`da delete failed: ${n.status}`,e);await this.cache.invalidateBody(t);let r=t.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(r)}async refresh(e){this.assertOpen(`/`);let t={added:[],removed:[],changed:[],unchanged:0,errors:[]},n=[``];for(;n.length>0;){let e=n.pop();try{await this.refreshDir(e,t,n)}catch(n){t.errors.push({path:e,message:n instanceof Error?n.message:String(n)})}}return e?.bodies&&await this.refreshBodies(t),t}async classifyFile(e,t,n){let r=await this.cache.getBody(e);r?t&&r.etag!==t?(await this.cache.invalidateBody(e),n.changed.push(e)):n.unchanged++:n.added.push(e)}async refreshDir(e,t,n){let r=await this.transport({method:`GET`,path:this.toListPath(e)});if(r.status>=400){t.errors.push({path:e,message:`list failed: ${r.status}`});return}let i=await r.json(),a=[];for(let r of i)if(r.ext){let n=e?`${e}/${r.name}.${r.ext}`:`${r.name}.${r.ext}`;a.push({name:`${r.name}.${r.ext}`,kind:`file`,etag:r.etag,lastModified:r.lastModified}),await this.classifyFile(n,r.etag,t)}else a.push({name:r.name,kind:`directory`}),n.push(e?`${e}/${r.name}`:r.name);await this.cache.putListing(e,a)}async refreshBodies(e){for(let t of e.changed)try{await this.readFile(t)}catch(n){e.errors.push({path:t,message:n instanceof Error?n.message:String(n)})}}describe(){return{displayName:`${this.parsed.org}/${this.parsed.repo}${this.parsed.path?`/${this.parsed.path}`:``}`,source:this.source,profile:this.profile}}async close(){this.closed||=!0}};function x(e){let t=e.match(/^s3:\/\/([^/]+)(?:\/(.*))?$/);if(!t)throw Error(`invalid S3 source '${e}' — expected s3://bucket[/prefix]`);return{bucket:t[1],prefix:(t[2]??``).replace(/^\/+/,``).replace(/\/+$/,``)}}var S=class{kind=`s3`;source;profile;mountId;parsed;cache;maxBodyBytes;transport;closed=!1;constructor(e){this.source=e.source,this.profile=e.profile,this.mountId=e.mountId??crypto.randomUUID(),this.parsed=x(e.source),this.cache=e.cache,this.maxBodyBytes=e.maxBodyBytes??26214400,this.transport=e.signedFetch}assertOpen(e){if(this.closed)throw new l(`EBADF`,`mount closed`,e)}toMountRelative(e){return e.replace(/^\/+/,``)}toS3Key(e){let t=e.replace(/^\/+/,``).replace(/\/+$/,``);return[this.parsed.prefix,t].filter(e=>e.length>0).join(`/`)}toMountRelativeKey(e){return this.parsed.prefix?e.slice(this.parsed.prefix.length+1):e}async readFile(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n&&!this.cache.isStale(n.cachedAt))return n.body;let r={};n&&(r[`if-none-match`]=n.etag);let i=await this.transport({method:`GET`,bucket:this.parsed.bucket,key:this.toS3Key(t),headers:r});if(i.status===304&&n)return await this.cache.putBody(t,n.body,n.etag),n.body;if(i.status===404)throw await this.cache.invalidateBody(t),new l(`ENOENT`,`no such file`,e);if(i.status===401||i.status===403)throw new l(`EACCES`,`s3 access denied`,e);if(i.status>=400)throw new l(`EIO`,`s3 readFile failed: ${i.status}`,e);let a=i.headers.get(`content-length`),o=a?Number(a):void 0;if(o!==void 0&&o>this.maxBodyBytes)throw new l(`EFBIG`,`body exceeds maxBodyBytes (${o} > ${this.maxBodyBytes})`,e);let s=new Uint8Array(await i.arrayBuffer());if(s.byteLength>this.maxBodyBytes)throw new l(`EFBIG`,`body exceeds maxBodyBytes`,e);let c=i.headers.get(`etag`)??``;return await this.cache.putBody(t,s,c),s}async writeFile(e,t){this.assertOpen(e);let n=this.toMountRelative(e);if(t.byteLength>this.maxBodyBytes)throw new l(`EFBIG`,`body exceeds maxBodyBytes`,e);let r=await this.cache.getBody(n),i={"content-type":`application/octet-stream`,"content-length":String(t.byteLength)};r?i[`if-match`]=r.etag:i[`if-none-match`]=`*`;let a=()=>this.transport({method:`PUT`,bucket:this.parsed.bucket,key:this.toS3Key(n),headers:i,body:t}),o,s=1;try{o=await a()}catch{s=2,o=await a()}if(o.status===412){if(s===2){let r=await this.transport({method:`HEAD`,bucket:this.parsed.bucket,key:this.toS3Key(n)});if(r.status>=400)throw new l(`EIO`,`s3 reconcile HEAD failed: ${r.status}`,e);let i=r.headers.get(`etag`)??``;await this.cache.putBody(n,t,i);let a=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(a);return}await this.cache.invalidateBody(n);try{await this.readFile(e)}catch{}throw new l(`EBUSY`,`remote modified since last read — re-read and retry`,e)}if(o.status===401||o.status===403)throw new l(`EACCES`,`s3 write denied`,e);if(o.status>=400)throw new l(`EIO`,`s3 writeFile failed: ${o.status}`,e);let c=o.headers.get(`etag`)??``;await this.cache.putBody(n,t,c);let u=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(u)}async listObjectsV2(){let e=[],t;do{let n={"list-type":`2`};this.parsed.prefix&&(n.prefix=`${this.parsed.prefix}/`),t&&(n[`continuation-token`]=t);let r=await this.transport({method:`GET`,bucket:this.parsed.bucket,key:``,query:n});if(r.status>=400)throw new l(`EIO`,`s3 list failed: ${r.status}`,`/`);let i=await r.text(),a=this.parseListingXml(i);e.push(...a.contents),t=a.nextContinuationToken}while(t);return e}parseListingXml(e){let t=[];for(let n of e.matchAll(/<Contents>([\s\S]*?)<\/Contents>/g)){let e=n[1],r=e.match(/<Key>([^<]+)<\/Key>/)?.[1]??``,i=e.match(/<ETag>([^<]+)<\/ETag>/)?.[1]??``,a=e.match(/<Size>([^<]+)<\/Size>/)?.[1]??`0`,o=e.match(/<LastModified>([^<]+)<\/LastModified>/)?.[1]??``;t.push({key:r,etag:i,size:Number(a),lastModified:o?Date.parse(o):0})}return{contents:t,nextContinuationToken:e.match(/<IsTruncated>([^<]+)<\/IsTruncated>/)?.[1]===`true`?e.match(/<NextContinuationToken>([^<]+)<\/NextContinuationToken>/)?.[1]:void 0}}async readDir(e){this.assertOpen(e);let t=this.toMountRelative(e).replace(/\/+$/,``),n=await this.cache.getListing(t);if(n&&!this.cache.isStale(n.cachedAt))return n.entries;let r=await this.listObjectsV2(),i=this.groupByDir(r);for(let[e,t]of i)await this.cache.putListing(e,t);return i.get(t)??[]}groupByDir(e){let t=new Map,n=e=>(t.has(e)||t.set(e,[]),t.get(e));n(``);for(let t of e){let e=this.toMountRelativeKey(t.key).split(`/`),r=e.pop();n(e.join(`/`)).push({name:r,kind:`file`,size:t.size,etag:t.etag,lastModified:t.lastModified});let i=``;for(let t of e){let e=i;i=i?`${i}/${t}`:t;let r=n(e);r.find(e=>e.name===t&&e.kind===`directory`)||r.push({name:t,kind:`directory`}),n(i)}}return t}async stat(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n)return{kind:`file`,size:n.body.byteLength,mtime:n.cachedAt,etag:n.etag};let r=t.split(`/`),i=r.pop()??``,a=r.join(`/`),o=await this.cache.getListing(a);if(o&&!this.cache.isStale(o.cachedAt)){let t=o.entries.find(e=>e.name===i);if(t?.kind===`file`&&t.size!==void 0)return{kind:`file`,size:t.size,mtime:t.lastModified??o.cachedAt,etag:t.etag??``};if(t?.kind===`directory`)return{kind:`directory`,size:0,mtime:t.lastModified??o.cachedAt};if(!t)throw new l(`ENOENT`,`no such file or directory`,e)}let s=await this.transport({method:`HEAD`,bucket:this.parsed.bucket,key:this.toS3Key(t)});if(s.status===200){let e=Number(s.headers.get(`content-length`)??`0`),t=s.headers.get(`etag`)??``,n=s.headers.get(`last-modified`);return{kind:`file`,size:e,mtime:n?Date.parse(n):0,etag:t}}if(s.status===404){let n=await this.cache.getListing(t);if(n)return{kind:`directory`,size:0,mtime:n.cachedAt};throw new l(`ENOENT`,`no such file or directory`,e)}throw new l(`EIO`,`s3 stat failed: ${s.status}`,e)}async refresh(e){this.assertOpen(`/`);let t=await this.listObjectsV2(),n=new Set(t.map(e=>this.toMountRelativeKey(e.key))),r=new Map(t.map(e=>[this.toMountRelativeKey(e.key),e.etag])),i={added:[],removed:[],changed:[],unchanged:0,errors:[]};for(let e of n){let t=await this.cache.getBody(e),n=r.get(e);t?t.etag===n?i.unchanged++:(await this.cache.invalidateBody(e),i.changed.push(e)):i.added.push(e)}let a=this.groupByDir(t);for(let[e,t]of a)await this.cache.putListing(e,t);if(e?.bodies)for(let e of i.changed)try{await this.readFile(e)}catch(t){i.errors.push({path:e,message:t instanceof Error?t.message:String(t)})}return i}async mkdir(e){}async remove(e,t){this.assertOpen(e);let n=this.toMountRelative(e);if(t?.recursive)throw new l(`EINVAL`,`recursive remove not yet supported on S3`,e);let r=await this.transport({method:`DELETE`,bucket:this.parsed.bucket,key:this.toS3Key(n)});if(r.status===404)throw new l(`ENOENT`,`no such file`,e);if(r.status===401||r.status===403)throw new l(`EACCES`,`s3 delete denied`,e);if(r.status>=400)throw new l(`EIO`,`s3 delete failed: ${r.status}`,e);await this.cache.invalidateBody(n);let i=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(i)}describe(){return{displayName:this.parsed.prefix?`${this.parsed.bucket}/${this.parsed.prefix}`:this.parsed.bucket,source:this.source,profile:this.profile}}async close(){this.closed||=!0}},C=class extends Error{constructor(e){super(e),this.name=`ProfileNotConfiguredError`}};async function w(){let{getAccounts:e}=await import(`./account-store-u5knhoCx.js`).then(e=>e.r),t=e().find(e=>e.providerId===`adobe`);if(!t?.accessToken)throw new C(`No Adobe IMS account found. Log in via Settings → Providers → Adobe first.`);return{identity:`adobe-ims`,getBearerToken:async()=>t.accessToken}}const T=c({portName:`mount.sign-and-forward`,panelRpcOp:`mount-sign-and-forward`,timeoutMs:12e4,onUnavailable:`reject`,makeError:e=>new l(`EIO`,`mount transport failed: ${e}`),logNamespace:`mount-bridge`,toPortMessage:({type:e,envelope:t})=>({type:e,envelope:t}),toPanelRpcPayload:({type:e,envelope:t})=>({type:e,envelope:t})});function E(e,t){return T({type:e,envelope:t})}const D=t,O=i,k=new Set([`invalid_profile`,`invalid_request`,`profile_not_configured`,`fetch_failed`,`internal`]),A=new Set([101,103,204,205,304]);function j(e){if(!e.ok)throw e.errorCode===`profile_not_configured`||e.errorCode===`invalid_profile`?new l(`EACCES`,e.error):e.errorCode===`invalid_request`?new l(`EINVAL`,e.error):e.errorCode===`fetch_failed`||e.errorCode===`internal`||k.has(String(e.errorCode))?new l(`EIO`,e.error):new l(`EINVAL`,`mount transport returned unrecognized errorCode '${e.errorCode}': ${e.error}`);let t;try{t=D(e.bodyBase64)}catch(e){throw new l(`EIO`,`mount transport: response body decode failed: ${e instanceof Error?e.message:String(e)}`)}let n=A.has(e.status)?null:t;return new Response(n,{status:e.status,headers:new Headers(e.headers)})}async function M(e,t){let n;try{n=await fetch(r(e),{method:`POST`,headers:a({"content-type":`application/json`}),body:JSON.stringify(t)})}catch(e){throw new l(`EIO`,`mount transport failed: ${e instanceof Error?e.message:String(e)} (SLICC backend at localhost may not be running)`)}try{return await n.json()}catch(e){throw new l(`EIO`,`mount transport: response is not a JSON envelope (status ${n.status}): ${e instanceof Error?e.message:String(e)}`)}}async function N(e,t){try{return await chrome.runtime.sendMessage({type:e,envelope:t})}catch(e){throw new l(`EIO`,`mount transport failed: ${e instanceof Error?e.message:String(e)} (extension service worker not responding)`)}}async function P(e,t,r){return o()?N(e,r):n()?E(e,r):M(t,r)}function F(e){return async t=>j(await P(`mount.s3-sign-and-forward`,`/api/s3-sign-and-forward`,{profile:e,method:t.method,bucket:t.bucket,key:t.key,query:t.query,headers:t.headers,bodyBase64:t.body?O(t.body):void 0}))}function I(e){let t=e?.getImsToken??(async()=>(await w()).getBearerToken());return async e=>{let n;try{n=await t()}catch(e){throw new l(`EACCES`,`DA mount: ${e instanceof Error?e.message:String(e)}`)}return j(await P(`mount.da-sign-and-forward`,`/api/da-sign-and-forward`,{imsToken:n,method:e.method,path:e.path,origin:e.origin,query:e.query,headers:e.headers,bodyBase64:e.body?O(e.body):void 0}))}}var L=e({AEM_SOURCE_BUS_ORIGIN:()=>d,AemMountBackend:()=>g,DaMountBackend:()=>b,RemoteMountCache:()=>u,S3MountBackend:()=>S,makeSignedFetchDa:()=>I,makeSignedFetchS3:()=>F});export{b as a,S as i,I as n,d as o,F as r,g as s,L as t};
@@ -1,2 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./backend-local-B6kc_FvN.js";import{a as n,i as r,n as i,r as a,s as o}from"./mount-CE7C-kQS.js";import{n as s}from"./mount-table-store-DrF_Ifaz.js";import{t as c}from"./remote-cache-JAv9sQH_.js";var l=e({formatMountRecoveryPrompt:()=>g,mdInlineCode:()=>h,recoverMounts:()=>p,shellQuote:()=>m});function u(e){return e instanceof Error?e.message:String(e)}async function d(e,n,r,i){let a=await s(n.idbHandleKey),o=typeof a?.name==`string`?a.name:``,c={kind:`local`,path:e,dirName:o};if(!a||!(`queryPermission`in a))return{entry:c,ok:!1};let l;try{l=await a.queryPermission({mode:`readwrite`})}catch(t){return i?.warn?.(`queryPermission threw on persisted handle`,{path:e,error:u(t)}),{entry:c,ok:!1}}if(l!==`granted`)return{entry:c,ok:!1};try{let s=t.fromHandle(a,{mountId:n.mountId});return await r.mount(e,s),i?.info?.(`Restored mount from previous session`,{path:e,name:o}),{entry:c,ok:!0}}catch(t){return i?.warn?.(`Failed to re-mount persisted handle`,{path:e,error:u(t)}),{entry:c,ok:!1}}}async function f(e,t,s,l){let{kind:d,source:f,profile:p,mountId:m}=t,h=d===`s3`?`S3`:d===`aem`?`AEM`:`DA`;try{let t={source:f,profile:p,cache:new c({mountId:m,ttlMs:3e4}),mountId:m},u=d===`s3`?new r({...t,signedFetch:a(p)}):d===`aem`?new o({...t,signedFetch:i()}):new n({...t,signedFetch:i()});return await s.mount(e,u),l?.info?.(`Restored ${h} mount from previous session`,{path:e,source:f}),{entry:{kind:d,path:e,source:f,profile:p,reason:``},ok:!0}}catch(t){let n=u(t);return l?.warn?.(`Failed to restore ${h} mount`,{path:e,error:n}),{entry:{kind:d,path:e,source:f,profile:p,reason:n},ok:!1}}}async function p(e,t,n){let r=[],i=[];for(let{targetPath:a,descriptor:o}of e){let e=o.kind===`local`?await d(a,o,t,n):await f(a,o,t,n);(e.ok?r:i).push(e.entry)}return{restored:r,needsRecovery:i}}function m(e){return`'${e.replace(/'/g,`'\\''`)}'`}function h(e){let t=e.replace(/\r\n|[\r\n]/g,` `),n=t.match(/`+/g),r=n?Math.max(...n.map(e=>e.length))+1:1,i="`".repeat(r);return`${i}${t.startsWith("`")||t.endsWith("`")?` ${t} `:t}${i}`}function g(e){if(!Array.isArray(e)||e.length===0)return null;let t=e.length===1?`mount point`:`mount points`,n=e.length===1?`it`:`them`,r=e.filter(e=>e.kind===`local`),i=e.filter(e=>e.kind===`s3`||e.kind===`da`||e.kind===`aem`),a=[`[Session Reload] Mount recovery required for ${e.length} ${t}.`,``];if(r.length>0){let e=r.map(({path:e,dirName:t})=>{let n=t?` (previously mounted from ${h(t)})`:``;return`- ${h(e)}${n}`}),i=r.map(({path:e})=>` mount ${m(e)}`);a.push(`The page was reloaded and the following local ${t} lost filesystem permission. The browser cannot restore access without a fresh user gesture, so ${n} cannot be used until the user re-authorizes:`,``,...e,``,`Please tell the user what happened and ask whether they want to re-mount. If yes, run the corresponding command(s) so the folder picker opens and they can re-select the same directory:`,``,...i,``)}if(i.length>0){let e=i.map(({path:e,source:t,profile:n,reason:r})=>{let i=n==="default"?``:` --profile ${m(n)}`,a=`mount --source ${m(t)}${i} ${m(e)}`;return`- ${h(e)} (${h(t)}, profile ${h(n)}) — ${r}\n Retry: ${h(a)}`});a.push(`The following remote ${t} could not be auto-restored:`,``,...e,``)}return a.push("If the user no longer needs a mount, run `mount unmount <path>` (with the path shell-quoted the same way) to clear the stale entry instead."),a.join(`
2
- `)}export{l as n,m as r,g as t};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/quick-llm-CXBgg2d_.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/account-store-D1f8dn0G.js","assets/preload-helper-Czpn1I53.js","assets/bedrock-camp-qpZqnqLa.js","assets/diagnostics-DN_idNHx.js","assets/transform-messages-N_eMsP2M.js","assets/provider-env-CTOcDKrQ.js","assets/__vite-browser-external-5eBdwsFd.js","assets/openrouter.models-gbjkpjE_.js","assets/libesm-BI4UHVqp.js","assets/logger-DDBAeTLF.js","assets/src-CAWTvdAa.js","assets/proxied-fetch-B4g-4VbQ.js","assets/base64-DpPqYZJF.js","assets/runtime-env-Dlaokqg1.js","assets/fetch-body-D2PwksUW.js","assets/float-topology-BgioAcOd.js","assets/runtime-env-E-i2SW1s.js","assets/secret-topology-xLmXoozo.js","assets/secrets-bridge-client-cWDAnFqs.js","assets/port-bridge-client-BbVs1yhx.js","assets/image-markers-BXtVm4og.js","assets/tool-ui-DfXu6quJ.js","assets/providers-BAjAn8LJ.js","assets/panel-rpc-B3MSVImO.js","assets/llm-session-id-bZQs6gBN.js","assets/icons-ZLR7gmJ4.js"])))=>i.map(i=>d[i]);
2
- import{L as e,m as t}from"./account-store-D1f8dn0G.js";import{t as n}from"./preload-helper-Czpn1I53.js";import{t as r}from"./logger-DDBAeTLF.js";import{r as i}from"./feature-flags-ByMXaIc4.js";import"./provider-settings-DcYK3m1J.js";import{t as a}from"./llm-session-id-bZQs6gBN.js";import{t as o}from"./chat-session-store-pWb1-jNp.js";import{a as s,i as c,n as l,r as u,t as d}from"./session-freezer-DYVYVWZ3.js";var f=r(`new-session`),p=`ui-new-session`,m=2e4,h=250;async function g(n){try{let r=await n.openVfs(),i=t()??void 0;if(!i)return;let o;try{o=e()}catch{return}let c=o.provider===`adobe`?{"X-Session-Id":a(p)}:void 0;await s({vfs:r,model:o,apiKey:i,headers:c}),n.onComplete?.()}catch(e){f.warn(`Pending session catch-up failed (boot continues)`,{error:e instanceof Error?e.message:String(e)})}}function _(e){(e.schedule??v)(()=>{g(e)})}function v(e){if(typeof globalThis.requestIdleCallback==`function`){globalThis.requestIdleCallback(e,{timeout:5e3});return}setTimeout(e,0)}function y(e){if(i(`agentic-memory`)){if(!e.agenticMemorySpawn){f.info(`Agentic memory enabled but agent bridge unavailable — using legacy enrichment`);return}return e.agenticMemorySpawn}}async function b(e,t,n,r,i,a){let o=await u({sessionStore:t,vfs:e.vfs,mode:`quick`,agenticMemorySpawn:a,cone:e.cone});if(!o)return null;if(e.captureCompleteSnapshot)try{await e.captureCompleteSnapshot(o)}catch(t){let n=t?.code??`unknown`;f.warn(`captureCompleteSnapshot failed`,{code:n}),o.completeSnapshotUnavailable=!0;try{await c(e.vfs,o.filename)}catch{}}return x(e,t,n,r,i,a,o),o}async function x(e,t,r,i,a,o,s){let c=s;try{let t=await l(e.vfs,s,{model:r,apiKey:i,headers:a,skipMemory:!0,pickIcon:e=>n(async()=>{let{pickLucideIcon:e}=await import(`./quick-llm-CXBgg2d_.js`).then(e=>e.n);return{pickLucideIcon:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27])).then(({pickLucideIcon:t})=>t(e))});t&&(c={...t,archive:s.archive},e.onBackgroundEnriched?.(t))}catch(e){f.warn(`Agentic title enrichment threw (draft stays pending)`,{filename:s.filename,error:e instanceof Error?e.message:String(e)})}let u=await d({sessionStore:t,vfs:e.vfs,mode:`full`,model:r,apiKey:i,headers:a,agenticMemorySpawn:o,cone:e.cone},c).catch(e=>(f.warn(`Agentic memory curator threw (entry stays pending)`,{filename:c.filename,error:e instanceof Error?e.message:String(e)}),null));f.info(`Agentic memory curator finished`,{filename:c.filename,memoryPending:!u||u.memoryPending===!0}),e.onBackgroundEnriched?.(u)}async function S(e,t,n,r){for(let i of n){let n=`${t}/${i.name}`;r.has(n)||i.type===`directory`&&(await S(e,n,await e.readDir(n),r),[...r].some(e=>e.startsWith(`${n}/`)))||await e.rm(n)}}async function C(e){let t=new Set((await e.listMountPoints()).map(({path:e})=>e).filter(e=>e===`/tmp`||e.startsWith(`/tmp/`)));if(t.has(`/tmp`))return;let n;try{n=await e.readDir(`/tmp`)}catch(t){if(t?.code!==`ENOENT`)throw t;await e.mkdir(`/tmp`,{recursive:!0});return}await S(e,`/tmp`,n,t),await e.mkdir(`/tmp`,{recursive:!0})}async function w(r){let i=r.enrichmentRaceMs??m,s=t()??void 0,d;try{d=e()}catch(e){f.info(`No active model — freezing without LLM enrichment`,{error:e instanceof Error?e.message:String(e)})}let h=d?.provider===`adobe`?{"X-Session-Id":a(p)}:void 0,g=new o;try{await g.init()}catch(e){return f.warn(`SessionStore init failed — cannot freeze`,{error:e instanceof Error?e.message:String(e)}),null}let _=s&&d?y(r):void 0;if(_)return await b(r,g,d,s,h,_);let v=await u({sessionStore:g,vfs:r.vfs,mode:`quick`,cone:r.cone});if(!v)return null;if(r.captureCompleteSnapshot)try{await r.captureCompleteSnapshot(v)}catch(e){let t=e?.code??`unknown`;f.warn(`captureCompleteSnapshot failed`,{code:t}),v.completeSnapshotUnavailable=!0;try{await c(r.vfs,v.filename)}catch{}}if(!s||!d)return f.info(`Frozen without enrichment (no LLM credentials) — left pending`,{filename:v.filename}),v;let x=d,S=l(r.vfs,v,{model:x,apiKey:s,headers:h,pickIcon:e=>n(async()=>{let{pickLucideIcon:e}=await import(`./quick-llm-CXBgg2d_.js`).then(e=>e.n);return{pickLucideIcon:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27])).then(({pickLucideIcon:t})=>t(e))}).catch(e=>(f.warn(`Single-click enrichment threw (entry stays pending)`,{filename:v.filename,error:e instanceof Error?e.message:String(e)}),null)),C=await T(S,i,r.onProgress);return C.kind===`llm`?C.updated?{...C.updated,archive:v.archive}:v:(S.then(e=>{f.info(`Background enrichment resolved after race window`,{filename:v.filename,enriched:e?.filename??null}),r.onBackgroundEnriched?.(e)}),v)}async function T(e,t,n){let r=Date.now(),i,a;n?.(0),n&&(i=setInterval(()=>{n(Math.min(1,(Date.now()-r)/t))},h));let o=new Promise(e=>{a=setTimeout(()=>e({kind:`timer`}),t)}),s=e.then(e=>({kind:`llm`,updated:e}));try{return await Promise.race([s,o])}finally{i&&clearInterval(i),a&&clearTimeout(a),n?.(null)}}async function E(e){return O(e,void 0)}async function D(e){return O(e,`skip`)}async function O(e,t){let n=new o;try{await n.init()}catch(e){return f.warn(`SessionStore init failed — cannot quick-freeze`,{error:e instanceof Error?e.message:String(e)}),null}let r=await u({sessionStore:n,vfs:e.vfs,mode:`quick`,cone:e.cone,...t?{memory:t}:{}});if(r&&e.captureCompleteSnapshot)try{await e.captureCompleteSnapshot(r)}catch(t){let n=t?.code??`unknown`;f.warn(`captureCompleteSnapshot failed (quick-freeze)`,{code:n}),r.completeSnapshotUnavailable=!0;try{await c(e.vfs,r.filename)}catch{}}return r}export{C as resetNewSessionTmp,D as runNewSessionArchiveOnly,w as runNewSessionFreeze,E as runNewSessionFreezeQuick,_ as schedulePendingSessionCatchup};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/provider-qCqf7_uc.js","assets/account-store-D1f8dn0G.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/preload-helper-Czpn1I53.js","assets/bedrock-camp-qpZqnqLa.js","assets/diagnostics-DN_idNHx.js","assets/transform-messages-N_eMsP2M.js","assets/provider-env-CTOcDKrQ.js","assets/__vite-browser-external-5eBdwsFd.js","assets/openrouter.models-gbjkpjE_.js","assets/libesm-BI4UHVqp.js","assets/logger-DDBAeTLF.js","assets/src-CAWTvdAa.js","assets/proxied-fetch-B4g-4VbQ.js","assets/base64-DpPqYZJF.js","assets/runtime-env-Dlaokqg1.js","assets/fetch-body-D2PwksUW.js","assets/float-topology-BgioAcOd.js","assets/runtime-env-E-i2SW1s.js","assets/secret-topology-xLmXoozo.js","assets/secrets-bridge-client-cWDAnFqs.js","assets/port-bridge-client-BbVs1yhx.js","assets/image-markers-BXtVm4og.js","assets/tool-ui-DfXu6quJ.js","assets/providers-BAjAn8LJ.js","assets/panel-rpc-B3MSVImO.js","assets/pkce-hGf_TEnP.js","assets/provider-store-access-BlHUi5MH.js","assets/global-db-CbuLl-zx.js","assets/types-idfTVsM8.js"])))=>i.map(i=>d[i]);
2
- import{H as e,d as t}from"./account-store-D1f8dn0G.js";import{t as n}from"./preload-helper-Czpn1I53.js";import{t as r}from"./logger-DDBAeTLF.js";import{t as i}from"./providers-BAjAn8LJ.js";import"./provider-settings-DcYK3m1J.js";import"./logger-BoSvu4mW.js";var a=r(`oauth-bootstrap`),o=6e4;async function s(){try{let{ensureAllMcpProvidersRegistered:e}=await n(async()=>{let{ensureAllMcpProvidersRegistered:e}=await import(`./provider-qCqf7_uc.js`);return{ensureAllMcpProvidersRegistered:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29])),t=await e();t.length>0&&a.debug(`Pre-registered MCP providers for OAuth bootstrap`,{count:t.length})}catch(e){a.warn(`Failed to pre-register MCP providers for OAuth bootstrap`,{error:e instanceof Error?e.message:String(e)})}let r=t();a.info(`Bootstrap OAuth replicas`,{count:r.length});for(let t of r){if(!t.accessToken){a.debug(`Skipping account without token`,{providerId:t.providerId});continue}if((t.tokenExpiresAt??1/0)-Date.now()<=o){let e=i(t.providerId);if(e?.onSilentRenew)try{if(await e.onSilentRenew()){a.info(`Silently renewed OAuth token`,{providerId:t.providerId});continue}a.warn(`Silent renewal yielded no token; user must re-authenticate`,{providerId:t.providerId});continue}catch(e){a.warn(`Silent renewal failed`,{providerId:t.providerId,error:e instanceof Error?e.message:String(e)});continue}a.debug(`Skipping expired account (no silent-renew hook)`,{providerId:t.providerId});continue}try{await e({providerId:t.providerId,accessToken:t.accessToken,refreshToken:t.refreshToken,tokenExpiresAt:t.tokenExpiresAt,userName:t.userName,userAvatar:t.userAvatar}),a.debug(`Bootstrapped OAuth replica`,{providerId:t.providerId})}catch(e){a.error(`OAuth bootstrap failed`,{providerId:t.providerId,error:e instanceof Error?e.message:String(e)})}}}export{s as bootstrapOAuthReplicas};
@@ -1 +0,0 @@
1
- import{n as e}from"./panel-rpc-BPwAqRch.js";import{o as t,r as n}from"./proxied-fetch-n2pCvcgW.js";import{t as r}from"./runtime-env-DadgceZk.js";import"./runtime-env-DVGQx9p3.js";import{t as i}from"./permissions-surface-registry-BqPdUk9w.js";import{t as a}from"./intercepted-oauth-BIKnTjZm.js";const o=r();var s=class extends Error{constructor(e){super(e),this.name=`OAuthLaunchError`}};async function c(){if(typeof window<`u`)return!1;let t=e();if(!t)return!1;try{return(await t.call(`oauth-route`,{},{timeoutMs:5e3})).delegate===!0}catch{return!1}}function l(){return o?y:typeof window>`u`?p:m}async function u(){let e=await d();return e?a(e):null}async function d(){try{let{getActiveCdpTransport:e}=await import(`./active-transport-BIjzxdwv.js`);return await e()}catch(e){return console.warn(`[oauth-service] could not resolve active CDP transport:`,e instanceof Error?e.message:String(e)),null}}async function f(){if(typeof window<`u`)return{origin:window.location.origin,href:window.location.href};let t=e();if(!t)throw Error(`OAuth from worker context requires the panel-RPC bridge (no page-info available)`);let n=await t.call(`page-info`,void 0);return{origin:n.origin,href:n.href}}async function p(t){let n=e();if(!n)return console.error(`[oauth-service] panel-RPC client unavailable in worker`),null;try{let e=await n.call(`oauth-popup`,{url:t},{timeoutMs:13e4});if(!e.redirectUrl&&e.error)throw new s(e.error);return e.redirectUrl}catch(e){if(e instanceof s)throw e;return console.error(`[oauth-service] oauth-popup RPC failed:`,e instanceof Error?e.message:String(e)),null}}async function m(e){if(h())return g(window.open(e,`_blank`,`width=500,height=700,popup=yes`));let t=i();if(t){let n=await _(t,e);return n===void 0?null:g(n)}return g(window.open(e,`_blank`,`width=500,height=700,popup=yes`))}function h(){return(typeof navigator<`u`?navigator.userActivation:void 0)?.isActive===!0}function g(e){return new Promise(r=>{let i=!1,a=null,o=null,s=()=>{i||(i=!0,window.removeEventListener(`message`,c),clearTimeout(l),a&&clearInterval(a),o&&clearInterval(o))},c=t=>{if(t.data?.type!==`oauth-callback`||t.origin!==window.location.origin||e&&t.source!==e)return;if(s(),t.data.error){console.error(`[oauth-service] CLI OAuth error:`,t.data.error),r(null);return}let n=t.data.redirectUrl;(typeof n==`string`||n==null)&&r(n??null)};window.addEventListener(`message`,c),a=setInterval(async()=>{if(!i)try{let e=await fetch(t(`/api/oauth-result`),{headers:n()});if(e.status===204||!e.ok)return;let a=await e.json();if(i)return;if(s(),a.error){console.error(`[oauth-service] Server relay OAuth error:`,a.error),r(null);return}r(a.redirectUrl??null)}catch(e){console.warn(`[oauth-service] Poll failed:`,e instanceof Error?e.message:String(e))}},1e3),e&&(o=setInterval(()=>{e.closed&&(clearInterval(o),o=null,setTimeout(()=>{i||(s(),r(null))},1500))},500));let l=setTimeout(()=>{s();try{e?.close()}catch{}r(null)},12e4)})}async function _(e,t){let n=await e.prompt({kinds:[`popup`],description:`Continue to sign in. A new window will open to the provider.`,grantLabel:`Continue`,requestOptions:{popup:{url:t}}});if(n.status!==`granted`)return;let r=n.grants.find(e=>e.kind===`popup`);return r&&r.kind===`popup`?r.window:null}async function v(e,t=18e4){if(typeof window>`u`||o)return;let n=window.open(e,`_blank`,`width=500,height=600,popup=yes`);if(!n){console.warn(`[oauth-service] Could not open IdP logout popup — popups may be blocked`);return}await new Promise(e=>{let r=setTimeout(()=>{clearInterval(i);try{n.close()}catch{}e()},t),i=setInterval(()=>{n.closed&&(clearTimeout(r),clearInterval(i),e())},500)})}async function y(e,t){let n=chrome.runtime;return new Promise(r=>{let i=!1,a=()=>{i||(i=!0,n.onMessage.removeListener(o),clearTimeout(s))},o=e=>{if(typeof e!=`object`||!e)return;let t=e;if(t.source===`service-worker`&&t.payload?.type===`oauth-result`){if(a(),t.payload.error){console.error(`[oauth-service] Extension OAuth error:`,t.payload.error),r(null);return}r(t.payload.redirectUrl??null)}};n.onMessage.addListener(o),n.sendMessage({source:`panel`,payload:{type:`oauth-request`,providerId:`oauth`,authorizeUrl:e,interactive:t?.interactive??!0}}).catch(e=>{console.error(`[oauth-service] Failed to send OAuth request to service worker:`,e)});let s=setTimeout(()=>{a(),r(null)},12e4)})}export{u as createInterceptingOAuthLauncherForCurrentRuntime,l as createOAuthLauncher,f as getOAuthPageOrigin,v as openIdpLogoutUrl,c as resolveOAuthDelegation};
@@ -1 +0,0 @@
1
- import{t as e}from"./preload-helper-Czpn1I53.js";import{o as t,r as n}from"./proxied-fetch-B4g-4VbQ.js";import{n as r}from"./runtime-env-Dlaokqg1.js";import"./runtime-env-CgsZ7LTp.js";import{t as i}from"./panel-rpc-B3MSVImO.js";import{t as a}from"./permissions-surface-registry-CilCRwhh.js";var o=12e4;function s(e,t){return t.endsWith(`*`)?e.startsWith(t.slice(0,-1)):e===t||e.startsWith(`${t}?`)||e.startsWith(`${t}#`)}function c(e){return e.endsWith(`*`)?e:`${e}*`}function l(e,t){if(!t||t.length===0)return e;let n=e;for(let e of t)if(n.includes(e.match)){if(e.replaceUrl){n=e.replaceUrl;continue}if(e.appendParams)try{let t=new URL(n);for(let[n,r]of Object.entries(e.appendParams))t.searchParams.set(n,r);n=t.toString()}catch{}}return n}function u(e){return async t=>{let n=t.timeoutMs??o,r=t.rewrite??[],i=t.onCapture??`close`,a,u,d=!1,f=null,p=async()=>{if(u){try{await e.send(`Fetch.disable`,{},u)}catch{}try{await e.send(`Target.detachFromTarget`,{sessionId:u})}catch{}}if(a&&i===`close`)try{await e.send(`Target.closeTarget`,{targetId:a})}catch{}};return await new Promise(i=>{let o=async t=>{d||(d=!0,clearTimeout(h),e.off(`Fetch.requestPaused`,m),await p(),i(t))},m=n=>{let i=n;if(!i?.request?.url||!u||(typeof n.sessionId==`string`?n.sessionId:void 0)!==u)return;if(s(i.request.url,t.redirectUriPattern)){f=i.request.url,e.send(`Fetch.failRequest`,{requestId:i.requestId,errorReason:`Aborted`},u).catch(()=>{}),o(f);return}let a=l(i.request.url,r);if(a!==i.request.url){e.send(`Fetch.continueRequest`,{requestId:i.requestId,url:a},u).catch(e=>{console.warn(`[intercepted-oauth] continueRequest (rewrite) failed:`,e instanceof Error?e.message:String(e))});return}e.send(`Fetch.continueRequest`,{requestId:i.requestId},u).catch(()=>{})},h=setTimeout(()=>{o(null)},n);(async()=>{try{a=(await e.send(`Target.createTarget`,{url:`about:blank`})).targetId,u=(await e.send(`Target.attachToTarget`,{targetId:a,flatten:!0})).sessionId,e.on(`Fetch.requestPaused`,m),await e.send(`Fetch.enable`,{patterns:[{urlPattern:c(t.redirectUriPattern),requestStage:`Request`},...r.map(e=>({urlPattern:`*${e.match}*`,requestStage:`Request`}))]},u),await e.send(`Page.navigate`,{url:t.authorizeUrl},u)}catch(e){console.error(`[intercepted-oauth] setup failed:`,e instanceof Error?e.message:String(e)),o(null)}})()})}}var d=r(),f=class extends Error{constructor(e){super(e),this.name=`OAuthLaunchError`}};async function p(){if(typeof window<`u`)return!1;let e=i();if(!e)return!1;try{return(await e.call(`oauth-route`,{},{timeoutMs:5e3})).delegate===!0}catch{return!1}}function m(){return d?w:typeof window>`u`?v:y}async function h(){let e=await g();return e?u(e):null}async function g(){try{let{getActiveCdpTransport:t}=await e(async()=>{let{getActiveCdpTransport:e}=await import(`./active-transport-BIjzxdwv.js`);return{getActiveCdpTransport:e}},[]);return await t()}catch(e){return console.warn(`[oauth-service] could not resolve active CDP transport:`,e instanceof Error?e.message:String(e)),null}}async function _(){if(typeof window<`u`)return{origin:window.location.origin,href:window.location.href};let e=i();if(!e)throw Error(`OAuth from worker context requires the panel-RPC bridge (no page-info available)`);let t=await e.call(`page-info`,void 0);return{origin:t.origin,href:t.href}}async function v(e){let t=i();if(!t)return console.error(`[oauth-service] panel-RPC client unavailable in worker`),null;try{let n=await t.call(`oauth-popup`,{url:e},{timeoutMs:13e4});if(!n.redirectUrl&&n.error)throw new f(n.error);return n.redirectUrl}catch(e){if(e instanceof f)throw e;return console.error(`[oauth-service] oauth-popup RPC failed:`,e instanceof Error?e.message:String(e)),null}}async function y(e){if(b())return x(window.open(e,`_blank`,`width=500,height=700,popup=yes`));let t=a();if(t){let n=await S(t,e);return n===void 0?null:x(n)}return x(window.open(e,`_blank`,`width=500,height=700,popup=yes`))}function b(){return(typeof navigator<`u`?navigator.userActivation:void 0)?.isActive===!0}function x(e){return new Promise(r=>{let i=!1,a=null,o=null,s=()=>{i||(i=!0,window.removeEventListener(`message`,c),clearTimeout(l),a&&clearInterval(a),o&&clearInterval(o))},c=t=>{if(t.data?.type!==`oauth-callback`||t.origin!==window.location.origin||e&&t.source!==e)return;if(s(),t.data.error){console.error(`[oauth-service] CLI OAuth error:`,t.data.error),r(null);return}let n=t.data.redirectUrl;(typeof n==`string`||n==null)&&r(n??null)};window.addEventListener(`message`,c),a=setInterval(async()=>{if(!i)try{let e=await fetch(t(`/api/oauth-result`),{headers:n()});if(e.status===204||!e.ok)return;let a=await e.json();if(i)return;if(s(),a.error){console.error(`[oauth-service] Server relay OAuth error:`,a.error),r(null);return}r(a.redirectUrl??null)}catch(e){console.warn(`[oauth-service] Poll failed:`,e instanceof Error?e.message:String(e))}},1e3),e&&(o=setInterval(()=>{e.closed&&(clearInterval(o),o=null,setTimeout(()=>{i||(s(),r(null))},1500))},500));let l=setTimeout(()=>{s();try{e?.close()}catch{}r(null)},12e4)})}async function S(e,t){let n=await e.prompt({kinds:[`popup`],description:`Continue to sign in. A new window will open to the provider.`,grantLabel:`Continue`,requestOptions:{popup:{url:t}}});if(n.status!==`granted`)return;let r=n.grants.find(e=>e.kind===`popup`);return r&&r.kind===`popup`?r.window:null}async function C(e,t=18e4){if(typeof window>`u`||d)return;let n=window.open(e,`_blank`,`width=500,height=600,popup=yes`);if(!n){console.warn(`[oauth-service] Could not open IdP logout popup — popups may be blocked`);return}await new Promise(e=>{let r=setTimeout(()=>{clearInterval(i);try{n.close()}catch{}e()},t),i=setInterval(()=>{n.closed&&(clearTimeout(r),clearInterval(i),e())},500)})}async function w(e,t){let n=chrome.runtime;return new Promise(r=>{let i=!1,a=()=>{i||(i=!0,n.onMessage.removeListener(o),clearTimeout(s))},o=e=>{if(typeof e!=`object`||!e)return;let t=e;if(t.source===`service-worker`&&t.payload?.type===`oauth-result`){if(a(),t.payload.error){console.error(`[oauth-service] Extension OAuth error:`,t.payload.error),r(null);return}r(t.payload.redirectUrl??null)}};n.onMessage.addListener(o),n.sendMessage({source:`panel`,payload:{type:`oauth-request`,providerId:`oauth`,authorizeUrl:e,interactive:t?.interactive??!0}}).catch(e=>{console.error(`[oauth-service] Failed to send OAuth request to service worker:`,e)});let s=setTimeout(()=>{a(),r(null)},12e4)})}export{h as createInterceptingOAuthLauncherForCurrentRuntime,m as createOAuthLauncher,_ as getOAuthPageOrigin,C as openIdpLogoutUrl,p as resolveOAuthDelegation};