sliccy 6.99.7 → 6.99.8

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 (272) hide show
  1. package/dist/ui/.vite/manifest.json +389 -614
  2. package/dist/ui/assets/__vite-browser-external-CyeY5rFA.js +1 -0
  3. package/dist/ui/assets/{account-store-y43KgcoW.js → account-store-BHr78r-q.js} +3 -3
  4. package/dist/ui/assets/{account-store-llwJaGRg.js → account-store-DhN2-vXh.js} +5 -5
  5. package/dist/ui/assets/adobe-BgNEArvI.js +2 -0
  6. package/dist/ui/assets/{adobe-C30ITWqR.js → adobe-C-61Gw8p.js} +1 -1
  7. package/dist/ui/assets/agent-panels-DwH4FR7k.js +1 -0
  8. package/dist/ui/assets/{anthropic-messages-DbPJ2ji9.js → anthropic-messages-B7p0objs.js} +1 -1
  9. package/dist/ui/assets/{anthropic-messages-CpSojOI8.js → anthropic-messages-JQYJ-RUq.js} +1 -1
  10. package/dist/ui/assets/{apply-layout-CyFMgsCH.js → apply-layout-DWTxIKYs.js} +1 -1
  11. package/dist/ui/assets/{apps-BaBqMpf9.js → apps-CDrFK--r.js} +1 -1
  12. package/dist/ui/assets/azure-openai-BCHBeybM.js +18 -0
  13. package/dist/ui/assets/azure-openai-C1aiXjjQ.js +18 -0
  14. package/dist/ui/assets/{azure-openai-responses-DUMDrZ29.js → azure-openai-responses-BNbgkULn.js} +1 -1
  15. package/dist/ui/assets/{azure-openai-responses-BcoOaRCx.js → azure-openai-responses-BULcSJeo.js} +1 -1
  16. package/dist/ui/assets/{bedrock-camp-LeceEQbU.js → bedrock-camp-9Mg_YE1C.js} +1 -1
  17. package/dist/ui/assets/{bedrock-camp-BcJEC3Pg.js → bedrock-camp-DP3Gfbz7.js} +1 -1
  18. package/dist/ui/assets/{browser-DdY1FBRp.js → browser-DGwroBSO.js} +3 -3
  19. package/dist/ui/assets/{bsh-watchdog-GrjFkpDG.js → bsh-watchdog--Df_ThJG.js} +1 -1
  20. package/dist/ui/assets/{cdp-ByIHQG_1.js → cdp-BzUC7d2h.js} +1 -1
  21. package/dist/ui/assets/{cerebras-DCOB1GIn.js → cerebras-BWY_xN7G.js} +1 -1
  22. package/dist/ui/assets/{cerebras-Oyxkgl8K.js → cerebras-X5XOc6kT.js} +1 -1
  23. package/dist/ui/assets/{claude-model-version-Csn7RPVg.js → claude-model-version-BXR93nLt.js} +1 -1
  24. package/dist/ui/assets/claude-model-version-D6lCh6G7.js +2 -0
  25. package/dist/ui/assets/{composer-speech-Bqp4MnUW.js → composer-speech-Byuwd2QJ.js} +1 -1
  26. package/dist/ui/assets/{connect-surface-N7OhnOjG.js → connect-surface-BqfnkTNQ.js} +1 -1
  27. package/dist/ui/assets/{cost-command-BQWpaecs.js → cost-command-CwOkolbd.js} +57 -57
  28. package/dist/ui/assets/{dist-_7dnux20.js → dist-BmTb9jmr.js} +1 -1
  29. package/dist/ui/assets/{dist-D7yTTAcb.js → dist-BnDrtqYs.js} +1 -1
  30. package/dist/ui/assets/dist-CMD3ZuiV.js +1 -0
  31. package/dist/ui/assets/{dist-DTAqvnM4.js → dist-CV-6KpFS.js} +1 -1
  32. package/dist/ui/assets/dist-CWHNqkcj.js +1 -0
  33. package/dist/ui/assets/dist-CrVgSn_b.js +6 -0
  34. package/dist/ui/assets/dist-DkG8wgj1.js +23 -0
  35. package/dist/ui/assets/dist-N1MMHRNk.js +18 -0
  36. package/dist/ui/assets/dist-RekgwRC0.js +12 -0
  37. package/dist/ui/assets/{dist-B4LJzMVB.js → dist-kBT87Ea7.js} +11 -11
  38. package/dist/ui/assets/{ensure-speech-assets-CO3wuKjp.js → ensure-speech-assets-Hv5Jwof_.js} +1 -1
  39. package/dist/ui/assets/{es-BDNIRkLU.js → es-BLFevQz4.js} +5 -5
  40. package/dist/ui/assets/{esbuild-wasm-DUOZmSly.js → esbuild-wasm-Dl3vgXvq.js} +2 -2
  41. package/dist/ui/assets/esp8266-1y0C3qJ1.js +1 -0
  42. package/dist/ui/assets/esptool-operations-CiccBbBW.js +12 -0
  43. package/dist/ui/assets/esptool-operations-lUvXx3gs.js +13 -0
  44. package/dist/ui/assets/{follower-navigate-watcher-Dd46El3D.js → follower-navigate-watcher-DRFF6ll0.js} +1 -1
  45. package/dist/ui/assets/fs-qMMHgiDM.js +2 -0
  46. package/dist/ui/assets/{fs-BNz_JyUR.js → fs-tsCmhLpU.js} +1 -1
  47. package/dist/ui/assets/github-CLAenO0m.js +2 -0
  48. package/dist/ui/assets/github-TenSKQL4.js +1 -0
  49. package/dist/ui/assets/{github-copilot-DiPxhMir.js → github-copilot-B-pJOojX.js} +1 -1
  50. package/dist/ui/assets/github-copilot-CvxZKmtr.js +2 -0
  51. package/dist/ui/assets/{github-install-CZSoNGFR.js → github-install-CSrLhUFy.js} +1 -1
  52. package/dist/ui/assets/{github-zip-CrdkhxjH.js → github-zip-KaxQyKKS.js} +1 -1
  53. package/dist/ui/assets/{google-generative-ai-Rjh7hNBV.js → google-generative-ai-DEMR2Ygt.js} +1 -1
  54. package/dist/ui/assets/{google-generative-ai-Dxo91M3n.js → google-generative-ai-ZQ9beFyW.js} +1 -1
  55. package/dist/ui/assets/{google-shared-DQJPCU3d.js → google-shared-B7H0ZrH8.js} +6 -6
  56. package/dist/ui/assets/google-shared-REamLvEm.js +11 -0
  57. package/dist/ui/assets/{google-vertex-DEwkNZJm.js → google-vertex-0C6GT5h4.js} +1 -1
  58. package/dist/ui/assets/{google-vertex-61Jj0dk6.js → google-vertex-DsErHx7o.js} +1 -1
  59. package/dist/ui/assets/handoff-link-BObMRgsx.js +1 -0
  60. package/dist/ui/assets/{hear-Co4TqejW.js → hear-zfLnACrB.js} +1 -1
  61. package/dist/ui/assets/{installer-CufDPCfO.js → installer-VcJEC2uC.js} +1 -1
  62. package/dist/ui/assets/{isomorphic-git-BAj-fLD-.js → isomorphic-git-WdgG3efW.js} +6 -6
  63. package/dist/ui/assets/js-realm-worker-CXQhPnY0.js +40 -0
  64. package/dist/ui/assets/{kernel-worker-DyoLnIZO.js → kernel-worker-BpjE-7BD.js} +421 -428
  65. package/dist/ui/assets/kokoro-BkJ3NLgd.js +4 -0
  66. package/dist/ui/assets/{legacy-api-aliases-oJPAvhVV.js → legacy-api-aliases-BYDhiWyY.js} +1 -1
  67. package/dist/ui/assets/{legacy-api-aliases-BnRqMAef.js → legacy-api-aliases-Dh4ciP2O.js} +1 -1
  68. package/dist/ui/assets/{libesm-BI4UHVqp.js → libesm-BypnjKEL.js} +1 -1
  69. package/dist/ui/assets/{libesm-zfj8k-QN.js → libesm-CSMdpGMF.js} +1 -1
  70. package/dist/ui/assets/lick-manager-CYlek4qq.js +2 -0
  71. package/dist/ui/assets/{lick-ws-bridge-yklVm5en.js → lick-ws-bridge-CdCpPLQn.js} +1 -1
  72. package/dist/ui/assets/{local-llm-DNFbzXTw.js → local-llm-D5B7umV1.js} +1 -1
  73. package/dist/ui/assets/{local-llm-DOnsCe6c.js → local-llm-onyoDvHB.js} +1 -1
  74. package/dist/ui/assets/magick-wasm-266b8ntc.js +43 -0
  75. package/dist/ui/assets/main-DjAHuk3R.js +22 -0
  76. package/dist/ui/assets/{main-cherry-3UVAQhqV.js → main-cherry-C6fqCnLL.js} +1 -1
  77. package/dist/ui/assets/{mount-DhhlMZMN.js → mount-BcopcDTf.js} +1 -1
  78. package/dist/ui/assets/mount-Cr-j5Qvu.js +2 -0
  79. package/dist/ui/assets/{mount-recovery-Dbd9EVjz.js → mount-recovery-DnWemQVb.js} +1 -1
  80. package/dist/ui/assets/{navigation-watcher-OPbGCby9.js → navigation-watcher-DrWMx-B4.js} +1 -1
  81. package/dist/ui/assets/new-session-DagG-ZZy.js +2 -0
  82. package/dist/ui/assets/oauth-bootstrap-CDgbPc25.js +2 -0
  83. package/dist/ui/assets/onboarding-orchestrator-DwBmySbw.js +1 -0
  84. package/dist/ui/assets/openai-BKEGagiR.js +17 -0
  85. package/dist/ui/assets/openai-Bgt_f1Dp.js +17 -0
  86. package/dist/ui/assets/{openai-codex-BI5-lt7L.js → openai-codex-B8nK05u1.js} +1 -1
  87. package/dist/ui/assets/openai-codex-CFHJKZXk.js +1 -0
  88. package/dist/ui/assets/{openai-codex-responses-CPOJeFUY.js → openai-codex-responses-C-nzMgox.js} +1 -1
  89. package/dist/ui/assets/{openai-codex-responses-jQR19NyX.js → openai-codex-responses-CG4v_H6T.js} +1 -1
  90. package/dist/ui/assets/{openai-completions-DGOcowq8.js → openai-completions-CIRx7G9l.js} +2 -2
  91. package/dist/ui/assets/{openai-completions-DGZFJo5D.js → openai-completions-ojba8VM0.js} +2 -2
  92. package/dist/ui/assets/{openai-responses-CDTdSIhv.js → openai-responses-BDRcKCF5.js} +1 -1
  93. package/dist/ui/assets/{openai-responses-bnETPgx9.js → openai-responses-DzwaJ-X-.js} +1 -1
  94. package/dist/ui/assets/openai-responses-shared-BjAQ1eIE.js +10 -0
  95. package/dist/ui/assets/openai-responses-shared-Dg_yfxea.js +10 -0
  96. package/dist/ui/assets/{openrouter-DZhpGJA4.js → openrouter-BQXiRTOg.js} +1 -1
  97. package/dist/ui/assets/openrouter-brhW7dHW.js +1 -0
  98. package/dist/ui/assets/{openrouter-images-C93KT7V_.js → openrouter-images-BAtqv3Im.js} +1 -1
  99. package/dist/ui/assets/{openrouter-images-CiM-JPBO.js → openrouter-images-Du3tMEQa.js} +1 -1
  100. package/dist/ui/assets/openrouter-oauth-DQ7iHoUX.js +1 -0
  101. package/dist/ui/assets/{openrouter-oauth-iFmYGgcr.js → openrouter-oauth-DuIS_qNZ.js} +1 -1
  102. package/dist/ui/assets/panel-rpc-handlers-BBgO_HM3.js +2 -0
  103. package/dist/ui/assets/panelize-shell-DpfBeau6.js +4 -0
  104. package/dist/ui/assets/pdfjs-DAWky37A.js +100 -0
  105. package/dist/ui/assets/{provider-CauMmJra.js → provider-D1IQTDOu.js} +1 -1
  106. package/dist/ui/assets/provider-VbLD3Pa_.js +2 -0
  107. package/dist/ui/assets/{provider-settings-CDR9tmFe.js → provider-settings-D24NB2-U.js} +1 -1
  108. package/dist/ui/assets/provider-store-access-CFkv-yrf.js +1 -0
  109. package/dist/ui/assets/provider-store-access-Dh0tBZso.js +1 -0
  110. package/dist/ui/assets/providers-CZ_sFfrt.js +2 -0
  111. package/dist/ui/assets/{providers-DS7U7ou8.js → providers-PfyMAay1.js} +1 -1
  112. package/dist/ui/assets/{py-realm-worker-B2OTI7Xc.js → py-realm-worker-D1gqcTkl.js} +2 -2
  113. package/dist/ui/assets/{pyodide-CkJHMMSo.js → pyodide-D43YUXvd.js} +2 -2
  114. package/dist/ui/assets/{quick-llm-DSQHsD_0.js → quick-llm-drlxgkUg.js} +1 -1
  115. package/dist/ui/assets/{recovery-screen-dGlemlkP.js → recovery-screen-BccxAWe7.js} +1 -1
  116. package/dist/ui/assets/{redirect-uri-BOpxbXbd.js → redirect-uri-AfF6uLvV.js} +1 -1
  117. package/dist/ui/assets/remote-cdp-transport-DeDqT7I4.js +1 -0
  118. package/dist/ui/assets/remote-sprinkle-vfs-CawR6gXx.js +1 -0
  119. package/dist/ui/assets/{remote-terminal-view-BNWZWMBC.js → remote-terminal-view-D2bRNJcS.js} +2 -2
  120. package/dist/ui/assets/{run-Cll4MnAK.js → run-BIKu737n.js} +1 -1
  121. package/dist/ui/assets/safe-buffer-OLJ0qaLt.js +12 -0
  122. package/dist/ui/assets/safe-buffer-iah92gQe.js +1 -0
  123. package/dist/ui/assets/{setup-feature-flags-remote-rcKrPHk7.js → setup-feature-flags-remote-Dxg6pIkQ.js} +1 -1
  124. package/dist/ui/assets/shared-B9N4MZd0.js +1 -0
  125. package/dist/ui/assets/shared-CPVZc-MN.js +4 -0
  126. package/dist/ui/assets/sidecar-repair-DCvPqdWE.js +1 -0
  127. package/dist/ui/assets/{skills-0Do2e7wj.js → skills-Cc4T1Cfp.js} +1 -1
  128. package/dist/ui/assets/{slicc-diff-DhGIKKqP.js → slicc-diff-DRjxoBYz.js} +1 -1
  129. package/dist/ui/assets/slicc-editor-D-eO_pjd.js +23 -0
  130. package/dist/ui/assets/slicc-editor-Sdfe-_x_.js +1 -0
  131. package/dist/ui/assets/slicc-version-CzfOvAya.js +1 -0
  132. package/dist/ui/assets/speak-BsVaFA0Z.js +3 -0
  133. package/dist/ui/assets/{sprinkle-bridge-C4qw-DTw.js → sprinkle-bridge-e00Na2NA.js} +1 -1
  134. package/dist/ui/assets/{sprinkle-manager-B5T2quSt.js → sprinkle-manager-BqdBktzt.js} +1 -1
  135. package/dist/ui/assets/{sprinkle-renderer-D64E-W2o.js → sprinkle-renderer-C9L5ZRvl.js} +2 -2
  136. package/dist/ui/assets/{sql-wasm-DO685FZu.js → sql-wasm-B7K7OCuB.js} +1 -1
  137. package/dist/ui/assets/{state-BrCP8Eff.js → state-B8PB53C0.js} +1 -1
  138. package/dist/ui/assets/{store-bEWnkux0.js → store-BsTL1Wgg.js} +1 -1
  139. package/dist/ui/assets/{store-C2gM1M-9.js → store-SXMbC-35.js} +1 -1
  140. package/dist/ui/assets/{sudo-D0ZG1KJr.js → sudo-Blo41kLx.js} +1 -1
  141. package/dist/ui/assets/sync-dialog-yRY0wRJj.js +1 -0
  142. package/dist/ui/assets/{temperature-support-B4x2xaWY.js → temperature-support-BVrwHxWv.js} +1 -1
  143. package/dist/ui/assets/{temperature-support-Cpml9LfI.js → temperature-support-LrmsX3ix.js} +1 -1
  144. package/dist/ui/assets/{transformers-env-HIDS8utb.js → transformers-env-_JNZLFlo.js} +1 -1
  145. package/dist/ui/assets/transformers.web-B0gi9Hor.js +39 -0
  146. package/dist/ui/assets/tray-leader-Mq6HIneb.js +1 -0
  147. package/dist/ui/assets/{upgrade-detection-Ckesn3Ns.js → upgrade-detection-DqD1aedt.js} +1 -1
  148. package/dist/ui/assets/voice-reply-B-I-XncI.js +1 -0
  149. package/dist/ui/assets/wc-attach-DgJVZRem.js +13 -0
  150. package/dist/ui/assets/wc-extension-b7ONOPn6.js +2 -0
  151. package/dist/ui/assets/wc-float-label-d3I12c8W.js +1 -0
  152. package/dist/ui/assets/{wc-floatbar-online-tsTifrU7.js → wc-floatbar-online-CFeU9jju.js} +1 -1
  153. package/dist/ui/assets/wc-follower-BU7l80Bf.js +17 -0
  154. package/dist/ui/assets/wc-follower-oauth-DIH7qpbt.js +5 -0
  155. package/dist/ui/assets/wc-live-DL5TcdQ7.js +399 -0
  156. package/dist/ui/assets/wc-nav-DjOpEDo-.js +2 -0
  157. package/dist/ui/assets/wc-onboarding-BeunqMQZ.js +2 -0
  158. package/dist/ui/assets/{wc-permissions-CEmFmdBe.js → wc-permissions-WjSZrbPa.js} +2 -2
  159. package/dist/ui/assets/{wc-placeholder-C1LDJQR7.js → wc-placeholder-mYgmrH75.js} +3 -3
  160. package/dist/ui/assets/{wc-settings-PtFpnkee.js → wc-settings-JfsyJgL9.js} +3 -3
  161. package/dist/ui/assets/{src-B-encLtu.js → wc-shell-B7yZ6nn6.js} +304 -161
  162. package/dist/ui/assets/{wc-shortcut-config-w6fJ0bVB.js → wc-shortcut-config-CRticSXA.js} +2 -2
  163. package/dist/ui/assets/{wc-sprinkles-CeAUkWME.js → wc-sprinkles-D-DWMPsX.js} +2 -2
  164. package/dist/ui/assets/wc-transcript-export-DVjtNvuR.js +2 -0
  165. package/dist/ui/assets/wc-tray-D6joGkUe.js +2 -0
  166. package/dist/ui/assets/welcome-detection-CEmFgOCI.js +1 -0
  167. package/dist/ui/assets/{whisper-session-DzV9Jmfi.js → whisper-session-Ba-J0yyJ.js} +2 -2
  168. package/dist/ui/assets/{xai-grok-DRbKtbML.js → xai-grok-DHRw8xLj.js} +1 -1
  169. package/dist/ui/assets/xai-grok-DIhtpBYR.js +1 -0
  170. package/dist/ui/assets/xterm-B5LH8GIb.css +1 -0
  171. package/dist/ui/assets/xterm-C3BHN0de.js +16 -0
  172. package/dist/ui/index.html +8 -11
  173. package/dist/ui/packages/webapp/index.html +8 -11
  174. package/dist/ui/slicc-diff.js +1 -1
  175. package/dist/ui/slicc-editor.js +1 -1
  176. package/package.json +2 -2
  177. package/dist/ui/assets/__vite-browser-external-CwfFUl-x.js +0 -1
  178. package/dist/ui/assets/adobe-DeM_oCMe.js +0 -2
  179. package/dist/ui/assets/agent-message-to-chat-_cvF5A5g.js +0 -1
  180. package/dist/ui/assets/agent-panels-B92KQapO.js +0 -1
  181. package/dist/ui/assets/azure-openai-B2VLKBwJ.js +0 -18
  182. package/dist/ui/assets/azure-openai-tc52REpx.js +0 -18
  183. package/dist/ui/assets/backend-local-1YuE96fx.js +0 -1
  184. package/dist/ui/assets/chat-session-store-pWb1-jNp.js +0 -1
  185. package/dist/ui/assets/claude-model-version-DoVrYsKi.js +0 -2
  186. package/dist/ui/assets/db-cKsBsMMN.js +0 -1
  187. package/dist/ui/assets/dictation-priming-CNllGgNq.js +0 -1
  188. package/dist/ui/assets/dip-rCM_6Bc6.js +0 -233
  189. package/dist/ui/assets/dist-B6HZAA0r.js +0 -1
  190. package/dist/ui/assets/dist-BHvDPTv0.js +0 -1
  191. package/dist/ui/assets/dist-C56QxoYU.js +0 -18
  192. package/dist/ui/assets/dist-COLaZOxM.js +0 -23
  193. package/dist/ui/assets/dist-CPNmKU6m.js +0 -12
  194. package/dist/ui/assets/dist-Cew647MY.js +0 -12
  195. package/dist/ui/assets/dist-mxmkfALf.js +0 -6
  196. package/dist/ui/assets/esptool-operations-BmdosN6N.js +0 -13
  197. package/dist/ui/assets/esptool-operations-CbgLIJzi.js +0 -12
  198. package/dist/ui/assets/export-provider-BEHTjSYw.js +0 -1
  199. package/dist/ui/assets/follower-presentation-DqBw0YiV.js +0 -1
  200. package/dist/ui/assets/fs-C6heN6Io.js +0 -2
  201. package/dist/ui/assets/github-BES17MG4.js +0 -2
  202. package/dist/ui/assets/github-BnrwrtRn.js +0 -1
  203. package/dist/ui/assets/github-copilot-CzZSdNg_.js +0 -2
  204. package/dist/ui/assets/google-shared-CzJgTu-P.js +0 -11
  205. package/dist/ui/assets/handoff-link-BM4ctkE8.js +0 -1
  206. package/dist/ui/assets/host-command-zx0pt9Np.js +0 -1
  207. package/dist/ui/assets/js-realm-worker-D_8dhTFA.js +0 -40
  208. package/dist/ui/assets/kokoro-Bs5vU5OU.js +0 -4
  209. package/dist/ui/assets/layout-schema-m9_VAwOw.js +0 -1
  210. package/dist/ui/assets/leader-session-events-Iq9N1w56.js +0 -1
  211. package/dist/ui/assets/lick-manager-DFmMezV-.js +0 -2
  212. package/dist/ui/assets/magick-wasm-BpzBj-21.js +0 -43
  213. package/dist/ui/assets/main-CPLi98yu.js +0 -22
  214. package/dist/ui/assets/mount-CvVyowQ-.js +0 -2
  215. package/dist/ui/assets/new-session-BUxTN19q.js +0 -2
  216. package/dist/ui/assets/oauth-bootstrap-BnctKs3I.js +0 -2
  217. package/dist/ui/assets/onboarding-orchestrator-BF4m_3Ig.js +0 -1
  218. package/dist/ui/assets/openai-CjBvzZcB.js +0 -17
  219. package/dist/ui/assets/openai-ZcrxEOGB.js +0 -17
  220. package/dist/ui/assets/openai-codex-ad3likLF.js +0 -1
  221. package/dist/ui/assets/openai-responses-shared-ChgvRZ74.js +0 -10
  222. package/dist/ui/assets/openai-responses-shared-DqJbHrek.js +0 -10
  223. package/dist/ui/assets/openrouter-BfwBtJ0a.js +0 -1
  224. package/dist/ui/assets/openrouter-oauth-D1ocgCDw.js +0 -1
  225. package/dist/ui/assets/panel-registry-CJdOibpf.js +0 -1
  226. package/dist/ui/assets/panel-rpc-handlers-Dj-UnwwI.js +0 -2
  227. package/dist/ui/assets/panelize-shell-Dfx0Qk97.js +0 -4
  228. package/dist/ui/assets/pdfjs-BspLIDsM.js +0 -100
  229. package/dist/ui/assets/provider-3zYFx7pL.js +0 -2
  230. package/dist/ui/assets/provider-settings-CZ97KB3C.js +0 -2
  231. package/dist/ui/assets/provider-store-access-DvHfXiAa.js +0 -2
  232. package/dist/ui/assets/provider-store-access-escWLliN.js +0 -1
  233. package/dist/ui/assets/providers-DJA67z1N.js +0 -2
  234. package/dist/ui/assets/remote-cdp-transport-CgOXLjZ8.js +0 -1
  235. package/dist/ui/assets/remote-sprinkle-vfs-e81pZJKo.js +0 -1
  236. package/dist/ui/assets/safe-buffer-B2wnAhUx.js +0 -12
  237. package/dist/ui/assets/safe-buffer-BwTVRVVo.js +0 -1
  238. package/dist/ui/assets/session-freezer-BgO7tLUp.js +0 -162
  239. package/dist/ui/assets/setup-standalone-prelude-50scBzpK.js +0 -2
  240. package/dist/ui/assets/setup-sudo-Ce_APR8D.js +0 -2
  241. package/dist/ui/assets/shared-6HJLEwgI.js +0 -1
  242. package/dist/ui/assets/shared-BzvvjAZt.js +0 -4
  243. package/dist/ui/assets/sidecar-repair-431vRT2V.js +0 -1
  244. package/dist/ui/assets/slicc-editor-CVftccS9.js +0 -1
  245. package/dist/ui/assets/slicc-editor-DsHp_in-.js +0 -12
  246. package/dist/ui/assets/slicc-version-qJjMq-6R.js +0 -1
  247. package/dist/ui/assets/speak-KEFd3n_I.js +0 -3
  248. package/dist/ui/assets/sync-dialog-ACgl0n-p.js +0 -1
  249. package/dist/ui/assets/timestamp-preference-sKwBl5I8.js +0 -2
  250. package/dist/ui/assets/transformers.web-Cg_-cFJu.js +0 -39
  251. package/dist/ui/assets/tray-leader-iVJTGwuf.js +0 -1
  252. package/dist/ui/assets/tray-sync-protocol-BZ5yhJH9.js +0 -1
  253. package/dist/ui/assets/tray-sync-protocol-DV_QG_Ey.js +0 -1
  254. package/dist/ui/assets/trusted-layer-ghPA1ENf.js +0 -1
  255. package/dist/ui/assets/voice-reply-DaVk8H0o.js +0 -1
  256. package/dist/ui/assets/wc-attach-3I9pOCPA.js +0 -13
  257. package/dist/ui/assets/wc-extension-D1gzObu-.js +0 -2
  258. package/dist/ui/assets/wc-float-label-CCMo81Ds.js +0 -1
  259. package/dist/ui/assets/wc-follower-DrCJN-aK.js +0 -17
  260. package/dist/ui/assets/wc-follower-oauth-Dw0qOLsI.js +0 -5
  261. package/dist/ui/assets/wc-live-qc9mrCs3.js +0 -8
  262. package/dist/ui/assets/wc-nav-CysORJLz.js +0 -2
  263. package/dist/ui/assets/wc-onboarding-COhEMI0E.js +0 -2
  264. package/dist/ui/assets/wc-scoop-color-ShF3p7L9.js +0 -1
  265. package/dist/ui/assets/wc-shell-lFwQe30J.js +0 -119
  266. package/dist/ui/assets/wc-shortcuts-GiPteshM.js +0 -26
  267. package/dist/ui/assets/wc-transcript-export-DKIleW7-.js +0 -2
  268. package/dist/ui/assets/wc-tray-_dof-pAl.js +0 -2
  269. package/dist/ui/assets/welcome-detection-iVN_xL76.js +0 -1
  270. package/dist/ui/assets/xai-grok-BnSpWJjV.js +0 -1
  271. package/dist/ui/assets/xterm-BSL5rRqA.js +0 -18
  272. package/dist/ui/assets/xterm-BmfB5bmM.css +0 -1
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/proxied-fetch-BGeNrvQ4.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/preload-helper-Czpn1I53.js","assets/base64-DpPqYZJF.js","assets/src-CAWTvdAa.js","assets/runtime-env-Dlaokqg1.js","assets/fetch-body-D2PwksUW.js","assets/api-endpoint-GRCyib6X.js","assets/oauth-service-Uk8UIb05.js","assets/runtime-env-CgsZ7LTp.js","assets/runtime-env-E-i2SW1s.js","assets/panel-rpc-B3MSVImO.js","assets/permissions-surface-registry-CilCRwhh.js","assets/provider-store-access-DvHfXiAa.js","assets/logger-DDBAeTLF.js","assets/global-db-CbuLl-zx.js","assets/types-idfTVsM8.js"])))=>i.map(i=>d[i]);
2
- import{H as e,S as t,d as n}from"./account-store-y43KgcoW.js";import{t as r}from"./preload-helper-Czpn1I53.js";import{t as i}from"./logger-DDBAeTLF.js";import{n as a}from"./float-topology-DiK91BlA.js";import{i as o}from"./providers-DJA67z1N.js";import{n as s,r as c,t as l}from"./pkce-hGf_TEnP.js";import"./provider-store-access-DvHfXiAa.js";var u=i(`mcp-oauth`);function d(e,t){let{discoveryPath:n,prmUrl:r,prmReason:i,asmUrl:a,asmReason:o}=t;if(!e)throw Error(n===`asm-origin-fallback`?`MCP OAuth discovery failed. PRM (${r}): ${i}. ASM fallback (${a}): ${o}.`:`ASM fetch failed: ${o} (${a})`);if(!(e.authorization_endpoint&&e.token_endpoint))throw Error(n===`asm-origin-fallback`?`MCP OAuth discovery failed. PRM (${r}): ${i}. ASM fallback (${a}) is missing required endpoints (authorization_endpoint, token_endpoint).`:`ASM at ${a} is missing required endpoints`)}async function f(e,t,n){let r=new URL(e).origin,i=t??`${r}/.well-known/oauth-protected-resource`,a=null,o=null;u.debug(`Fetching PRM`,{prmUrl:i});try{let e=await n(i,{headers:{Accept:`application/json`}});if(!e.ok)o=`${e.status} ${e.statusText}`;else{let t=await e.json();!t.authorization_servers||t.authorization_servers.length===0?o=`lists no authorization_servers`:a=t}}catch(e){o=e instanceof Error?e.message:String(e)}let s,c,l;a?.authorization_servers&&a.authorization_servers.length>0?(s=a.authorization_servers[0].replace(/\/+$/,``),c=`${s}/.well-known/oauth-authorization-server`,l=`prm`,u.debug(`Discovery via PRM`,{prmUrl:i,asmUrl:c})):(s=r,c=`${r}/.well-known/oauth-authorization-server`,l=`asm-origin-fallback`,u.debug(`PRM unavailable; falling back to ASM at server origin`,{prmUrl:i,prmReason:o,asmUrl:c}));let f=null,p=null;u.debug(`Fetching ASM`,{asmUrl:c});try{let e=await n(c,{headers:{Accept:`application/json`}});e.ok?f=await e.json():p=`${e.status} ${e.statusText}`}catch(e){p=e instanceof Error?e.message:String(e)}return d(f,{discoveryPath:l,prmUrl:i,prmReason:o,asmUrl:c,asmReason:p}),{issuer:f.issuer||s,authorizationEndpoint:f.authorization_endpoint,tokenEndpoint:f.token_endpoint,registrationEndpoint:f.registration_endpoint,supportedScopes:f.scopes_supported??a?.scopes_supported,codeChallengeMethods:f.code_challenge_methods_supported,grantTypes:f.grant_types_supported,discoveryPath:l}}function p(e){return!e||e.length===0||e.includes(`S256`)?`S256`:e.includes(`plain`)?`plain`:`S256`}async function m(e){let t=s();return e===`plain`?{codeVerifier:t,codeChallenge:t,method:e}:{codeVerifier:t,codeChallenge:await l(t),method:e}}function h(e){try{let t=new URL(e);return{code:t.searchParams.get(`code`),state:t.searchParams.get(`state`)}}catch{return{code:null,state:null}}}async function g(e){let t=await m(p(e.asMetadata.codeChallengeMethods)),n=c(),r=new URLSearchParams({response_type:`code`,client_id:e.clientId,redirect_uri:e.redirectUri,code_challenge:t.codeChallenge,code_challenge_method:t.method,state:n});e.scope&&r.set(`scope`,e.scope);let i=`${e.asMetadata.authorizationEndpoint}?${r.toString()}`,a=await e.launcher(i);if(!a)throw Error(`MCP OAuth flow cancelled or timed out`);let{code:o,state:s}=h(a);if(!o)throw Error("MCP OAuth redirect missing `code` parameter");if(s!==n)throw Error(`MCP OAuth state mismatch — possible CSRF`);return v({tokenEndpoint:e.asMetadata.tokenEndpoint,clientId:e.clientId,code:o,codeVerifier:t.codeVerifier,redirectUri:e.redirectUri,fetchImpl:e.fetchImpl})}function _(e){if(e.error||!e.access_token)throw Error(`Token endpoint error: ${e.error??`no_access_token`}${e.error_description?` — ${e.error_description}`:``}`);return{accessToken:e.access_token,refreshToken:e.refresh_token,expiresAt:e.expires_in?Date.now()+e.expires_in*1e3:void 0,scope:e.scope,tokenType:e.token_type}}async function v(e){let t=new URLSearchParams({grant_type:`authorization_code`,code:e.code,redirect_uri:e.redirectUri,client_id:e.clientId,code_verifier:e.codeVerifier}).toString(),n=await e.fetchImpl(e.tokenEndpoint,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`,Accept:`application/json`},body:t}),r=await n.json();if(!n.ok&&!r.access_token)throw Error(`Token exchange failed: ${n.status} ${n.statusText}${r.error?` (${r.error})`:``}`);return _(r)}async function y(e){let t=new URLSearchParams({grant_type:`refresh_token`,refresh_token:e.refreshToken,client_id:e.clientId});e.scope&&t.set(`scope`,e.scope);let n=await e.fetchImpl(e.tokenEndpoint,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`,Accept:`application/json`},body:t.toString()}),r=await n.json();if(!n.ok&&!r.access_token)throw Error(`Token refresh failed: ${n.status} ${n.statusText}${r.error?` (${r.error})`:``}`);return _(r)}var b=`/auth/mcp-callback`;async function x(){let e=a();if(e===`extension-direct`){let e=chrome;return e.identity?.getRedirectURL?.(`mcp-callback`)??`https://${e.runtime?.id??``}.chromiumapp.org/mcp-callback`}if(e===`node-rest`){let{getLocalApiBaseUrl:e}=await r(async()=>{let{getLocalApiBaseUrl:e}=await import(`./proxied-fetch-BGeNrvQ4.js`).then(e=>e.n);return{getLocalApiBaseUrl:e}},__vite__mapDeps([0,1,2,3,4,5,6,7])),t=e();if(t)return`${t}/auth/callback`}let{getOAuthPageOrigin:t}=await r(async()=>{let{getOAuthPageOrigin:e}=await import(`./oauth-service-Uk8UIb05.js`);return{getOAuthPageOrigin:e}},__vite__mapDeps([8,2,0,1,3,4,5,6,7,9,10,11,12])),{origin:n}=await t();return`${n}${e===`extension-delegate`?b:`/auth/callback`}`}var S=i(`mcp-provider`),C=`mcp:`;function w(){return typeof globalThis<`u`&&globalThis.indexedDB!==void 0}function T(e){return`${C}${e}`}var E=new Map,D=new Set;async function O(e){if(e)return e;let{createProxiedFetch:t}=await r(async()=>{let{createProxiedFetch:e}=await import(`./proxied-fetch-BGeNrvQ4.js`).then(e=>e.n);return{createProxiedFetch:e}},__vite__mapDeps([0,1,2,3,4,5,6,7])),n=t();return async(e,t)=>{let r=await n(e,{method:t?.method,headers:t?.headers,body:t?.body}),i=new TextDecoder().decode(r.body);return{ok:r.status>=200&&r.status<300,status:r.status,statusText:r.statusText,text:async()=>i,json:async()=>JSON.parse(i),headers:{get:e=>r.headers[e.toLowerCase()]??null}}}}async function k(e){let t=E.get(T(e.name));if(t)return t;let n=await O(e.fetchImpl),r=await f(e.serverUrl,void 0,n);return E.set(T(e.name),r),r}function A(r){let i=T(r.name),a=(()=>{try{return new URL(r.serverUrl).host}catch{return``}})();return{id:i,name:`MCP: ${r.name}`,description:`MCP server at ${r.serverUrl}`,requiresApiKey:!1,requiresBaseUrl:!1,isOAuth:!0,oauthTokenDomains:a?[a]:[],getModelIds:()=>[],onOAuthLogin:async(t,n)=>{let a=r.launcher??t,o=await O(r.fetchImpl),s=await g({asMetadata:await k(r),clientId:r.auth.clientId,scope:r.auth.scope,redirectUri:r.auth.redirectUri??await x(),launcher:a,fetchImpl:o});await e({providerId:i,accessToken:s.accessToken,refreshToken:s.refreshToken,tokenExpiresAt:s.expiresAt,scopes:s.scope}),n()},onSilentRenew:async()=>{if(!t(i))return null;let a=n().find(e=>e.providerId===i),o=a?.refreshToken;if(!o)return S.info(`No refresh token for MCP provider, skipping silent renewal`,{id:i}),null;try{let t=await k(r),n=t.grantTypes??[];if(n.length>0&&!n.includes(`refresh_token`))return S.info(`AS does not advertise refresh_token grant; skipping silent renewal`,{id:i}),null;let s=await O(r.fetchImpl),c=await y({tokenEndpoint:t.tokenEndpoint,clientId:r.auth.clientId,refreshToken:o,scope:r.auth.scope,fetchImpl:s});return await e({providerId:i,accessToken:c.accessToken,refreshToken:c.refreshToken??o,tokenExpiresAt:c.expiresAt,scopes:c.scope??a.scopes}),c.accessToken}catch(e){return S.warn(`MCP silent renewal failed`,{id:i,error:e instanceof Error?e.message:String(e)}),null}}}}function j(e){let t=T(e.name);if(D.has(t))return;let n=A(e);o(n),D.add(t),S.debug(`Registered MCP provider`,{id:t})}async function M(){if(!w())return[];let{readMcpAuthEntries:e}=await r(async()=>{let{readMcpAuthEntries:e}=await import(`./provider-store-access-DvHfXiAa.js`);return{readMcpAuthEntries:e}},__vite__mapDeps([13,2,14,15,16])),t=await e(),n=[];for(let e of t)j({name:e.name,serverUrl:e.serverUrl,auth:e.auth}),n.push(T(e.name));return n}export{M as ensureAllMcpProvidersRegistered};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/oauth-service-Uk8UIb05.js","assets/preload-helper-Czpn1I53.js","assets/proxied-fetch-BGeNrvQ4.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/base64-DpPqYZJF.js","assets/src-CAWTvdAa.js","assets/runtime-env-Dlaokqg1.js","assets/fetch-body-D2PwksUW.js","assets/api-endpoint-GRCyib6X.js","assets/runtime-env-CgsZ7LTp.js","assets/runtime-env-E-i2SW1s.js","assets/panel-rpc-B3MSVImO.js","assets/permissions-surface-registry-CilCRwhh.js"])))=>i.map(i=>d[i]);
2
- import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,R as _,S as v,T as y,U as b,V as x,W as S,_ as C,a as ee,b as te,c as ne,d as w,f as re,g as ie,h as T,i as E,j as ae,k as D,l as oe,m as se,n as ce,o as le,p as ue,q as de,s as fe,t as pe,u as O,v as me,w as he,x as ge,y as k,z as _e}from"./account-store-y43KgcoW.js";import{t as A}from"./preload-helper-Czpn1I53.js";import{t as ve}from"./logger-DDBAeTLF.js";import{l as ye}from"./src-CAWTvdAa.js";import{o as j}from"./telemetry-BVzuNdvW.js";import{c as M,p as N}from"./tray-runtime-config-D7cmCcHJ.js";import{t as P}from"./tray-follower-status-BAjnN7Ar.js";import{n as be}from"./clipboard-eqmn97SP.js";import{n as F}from"./tray-join-url-BIvzbiFR.js";var xe=e({ACCOUNTS_KEY:()=>pe,__test__:()=>ce,addAccount:()=>E,applyProviderDefaults:()=>ee,clearAllSettings:()=>le,clearApiKey:()=>fe,clearBaseUrl:()=>ne,clearSelectedProvider:()=>oe,describeInvalidJoinUrl:()=>F,downloadProviders:()=>R,exportProviders:()=>O,getAccounts:()=>w,getAllAvailableModels:()=>re,getAllExtraOAuthDomains:()=>ue,getApiKey:()=>se,getApiKeyForProvider:()=>T,getApiVersionForProvider:()=>ie,getAvailableProviders:()=>C,getBaseUrl:()=>me,getBaseUrlForProvider:()=>k,getDeploymentForProvider:()=>te,getExtraOAuthDomains:()=>ge,getOAuthAccountInfo:()=>v,getProviderConfig:()=>r,getProviderModels:()=>he,getRawApiKeyForProvider:()=>y,getSelectedModelId:()=>a,getSelectedProvider:()=>i,isModelHiddenFromPicker:()=>h,logoutOAuthAccount:()=>D,maskOAuthTokenWithRetry:()=>t,migrateLegacyAuthOnlySelection:()=>ae,modelRunsOnProvider:()=>p,persistOAuthMaskViaServiceWorker:()=>m,policyVisible:()=>g,providerOffersLlmModels:()=>o,reloginOAuthAccount:()=>G,removeAccount:()=>l,resolveCurrentModel:()=>f,resolveModelById:()=>_,resolveModelByShorthand:()=>_e,resolveModelIdForScoop:()=>n,resolveModelSelectionForScoop:()=>x,saveOAuthAccount:()=>c,setApiKey:()=>b,setBaseUrl:()=>S,setExtraOAuthDomains:()=>s,setExtraOAuthDomainsAsync:()=>d,setSelectedModelId:()=>de,setSelectedProvider:()=>u,showProviderSettings:()=>$,testOnlyDispatchTrayJoinWithFailureFeedback:()=>Se}),I=ve(`provider-settings`);function Se(e,t){return L(e,t)}function L(e,t){let n=`tray-join-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,r=!1,i,a=()=>{r||(r=!0,i!==void 0&&clearTimeout(i),window.removeEventListener(`slicc:tray-join-failed`,o))},o=r=>{let i=r.detail;if(i.requestId!==void 0&&i.requestId!==n)return;if(a(),!t.isConnected){I.error(`Tray-join failure arrived after dialog dismissed (UX swallowed half-state)`,{joinUrl:e,error:i.error,requestId:n});return}let o=t.dataset.dismissTimer;if(o){let e=Number(o);Number.isFinite(e)&&clearTimeout(e),delete t.dataset.dismissTimer}t.textContent=`Sync failed: ${i.error}. Reload the page and try again.`,t.style.color=`var(--slicc-cone)`};return window.addEventListener(`slicc:tray-join-failed`,o),i=setTimeout(a,1e4),window.dispatchEvent(new CustomEvent(`slicc:tray-join`,{detail:{joinUrl:e,requestId:n}})),a}function R(){let e=JSON.stringify(O(),null,2),t=new Blob([e],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`providers.json`,r.click(),URL.revokeObjectURL(n)}function Ce(e){return e.length<=10?`****`:e.slice(0,4)+`...`+e.slice(-4)}function z(e){let t=`http://www.w3.org/2000/svg`,n=document.createElementNS(t,`svg`);n.setAttribute(`width`,`14`),n.setAttribute(`height`,`14`),n.setAttribute(`viewBox`,`0 0 20 20`),n.setAttribute(`fill`,`none`),n.setAttribute(`stroke`,`currentColor`),n.setAttribute(`stroke-width`,`1.5`),n.setAttribute(`stroke-linecap`,`round`),n.setAttribute(`stroke-linejoin`,`round`);for(let r of e){let e=document.createElementNS(t,`path`);e.setAttribute(`d`,r),n.appendChild(e)}return n}var B={pen:[`M14.3 3.3a1.5 1.5 0 0 1 2.1 0l.3.3a1.5 1.5 0 0 1 0 2.1L7.7 14.8l-3.2.7.7-3.2z`],trash:[`M4 6h12`,`M8 6V4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2`,`M6 6v10a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V6`],logout:[`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,`M16 17l5-5-5-5`,`M21 12H9`],login:[`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,`M10 17l5-5-5-5`,`M15 12H3`]},V=`background: transparent; border: 1px solid var(--s2-border-subtle); color: var(--s2-content-secondary); border-radius: var(--s2-radius-s); padding: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: color 0.15s, border-color 0.15s;`;function H(e,t){e.addEventListener(`mouseenter`,()=>{e.style.color=t,e.style.borderColor=t}),e.addEventListener(`mouseleave`,()=>{e.style.color=`var(--s2-content-secondary)`,e.style.borderColor=`var(--s2-border-subtle)`})}function U(e){e.overlay.remove(),e.resolve((localStorage.getItem(`slicc_accounts`)??``)!==e.accountsBefore)}function W(e){e.options?.startInAddAccount?U(e):K(e)}function we(e){let t=document.createElement(`div`);return t.style.cssText=`font-size: 11px; color: var(--s2-content-disabled); font-family: monospace; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;`,e.loggedOut?(t.textContent=e.userName?`Logged out — was ${e.userName}`:`Logged out`,t.style.color=`var(--s2-content-disabled)`):t.textContent=e.userName?e.userName:e.accessToken?`Logged in`:Ce(e.apiKey),e.baseUrl&&(t.textContent+=` • `+e.baseUrl),t}async function G(e,t){let{createOAuthLauncher:n,createInterceptingOAuthLauncherForCurrentRuntime:r}=await A(async()=>{let{createOAuthLauncher:e,createInterceptingOAuthLauncherForCurrentRuntime:t}=await import(`./oauth-service-Uk8UIb05.js`);return{createOAuthLauncher:e,createInterceptingOAuthLauncherForCurrentRuntime:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])),i={forceReauth:!0};if(e.onOAuthLoginIntercepted){let n=await r();n&&await e.onOAuthLoginIntercepted(n,t,i)}else if(e.onOAuthLogin){let r=n();await e.onOAuthLogin(r,t,i)}}function Te(e,t){let n=document.createElement(`button`);return n.style.cssText=V,n.setAttribute(`aria-label`,`Edit account`),n.appendChild(z(B.pen)),H(n,`var(--s2-accent)`),n.addEventListener(`click`,()=>X(e,t)),n}function Ee(e,t,n){let r=document.createElement(`button`);return r.style.cssText=V,t.loggedOut===!0?(r.setAttribute(`aria-label`,`Log in`),r.setAttribute(`title`,`Log in`),r.appendChild(z(B.login)),H(r,`var(--s2-accent)`),r.addEventListener(`click`,()=>{G(n,()=>K(e))})):(r.setAttribute(`aria-label`,`Log out`),r.setAttribute(`title`,`Log out`),r.appendChild(z(B.logout)),H(r,`var(--s2-warning, #f59e0b)`),r.addEventListener(`click`,()=>{(async()=>{await D(t.providerId),K(e)})()})),r}function De(e,t){let n=document.createElement(`button`);return n.style.cssText=V,n.setAttribute(`aria-label`,`Remove account`),n.appendChild(z(B.trash)),H(n,`var(--s2-negative)`),n.addEventListener(`click`,()=>{(async()=>{await l(t.providerId),K(e)})()}),n}function Oe(e,t){let n=r(t.providerId),i=document.createElement(`div`);i.style.cssText=`display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--s2-bg-layer-2); border-radius: var(--s2-radius-default); margin-bottom: 8px; border: 1px solid var(--s2-border-subtle);`;let a=document.createElement(`div`);a.style.cssText=`flex: 1; min-width: 0;`;let o=document.createElement(`div`);o.style.cssText=`font-size: 14px; font-weight: 600; color: var(--s2-content-default);`,o.textContent=n.name,a.appendChild(o),a.appendChild(we(t)),i.appendChild(a);let s=document.createElement(`div`);return s.style.cssText=`display: flex; gap: 4px; margin-left: 12px; flex-shrink: 0;`,s.appendChild(Te(e,t)),n.isOAuth&&s.appendChild(Ee(e,t,n)),s.appendChild(De(e,t)),i.appendChild(s),i}function ke(e){let t=document.createDocumentFragment(),n=document.createElement(`hr`);n.style.cssText=`border: none; border-top: 1px solid var(--s2-border-subtle); margin: 16px 0;`,t.appendChild(n);let r=document.createElement(`div`);r.className=`dialog__desc`,r.style.cssText=`font-weight: 600; margin-bottom: 8px;`,r.textContent=`Tray`,t.appendChild(r);let i=P(),a=i.state!==`inactive`,o=M(window.localStorage);if(a||o){let e=document.createElement(`div`);e.style.cssText=`font-size: 12px; color: var(--s2-content-secondary); margin-bottom: 8px;`,e.textContent=`Follower: ${a?i.state:`configured`}`,i.error&&(e.textContent+=` — ${i.error}`,e.style.color=`var(--slicc-cone)`),t.appendChild(e)}let s=document.createElement(`button`);return s.className=`dialog__btn dialog__btn--secondary`,s.textContent=a||o?`Reconnect to other browser`:`Connect to another browser`,s.addEventListener(`click`,()=>Q(e)),t.appendChild(s),t}function K(e){let{dialog:t}=e;t.innerHTML=``;let n=document.createElement(`div`);n.className=`dialog__title`,n.textContent=`Accounts`,t.appendChild(n);let r=w();if(r.length===0){let e=document.createElement(`div`);e.className=`dialog__desc`,e.textContent=`No accounts configured.`,t.appendChild(e)}else{let n=document.createElement(`div`);n.style.cssText=`margin-bottom: 16px;`;for(let t of r)n.appendChild(Oe(e,t));t.appendChild(n)}let i=document.createElement(`div`);i.style.cssText=`display: flex; gap: 8px;`;let a=document.createElement(`button`);a.className=r.length>0?`dialog__btn dialog__btn--secondary`:`dialog__btn`,a.style.flex=`1`,a.textContent=`Add Account`,a.addEventListener(`click`,()=>X(e)),i.appendChild(a);let o=document.createElement(`button`);o.className=`dialog__btn dialog__btn--secondary`,o.style.flex=`1`,o.textContent=`Export`,o.addEventListener(`click`,()=>R()),i.appendChild(o),t.appendChild(i),t.appendChild(ke(e));let s=document.createElement(`hr`);s.style.cssText=`border: none; border-top: 1px solid var(--s2-border-subtle); margin: 16px 0;`,t.appendChild(s);let c=document.createElement(`button`);c.className=`dialog__btn`,c.textContent=`Get Started`,c.addEventListener(`click`,()=>U(e)),t.appendChild(c)}function Ae(e,t){let n=document.createElement(`select`);if(n.className=`dialog__input`,n.style.marginBottom=`8px`,t){let e=r(t.providerId),i=document.createElement(`option`);return i.value=t.providerId,i.textContent=e.name,n.appendChild(i),n.disabled=!0,n.style.opacity=`0.7`,n}let i=document.createElement(`option`);i.value=``,i.textContent=`Select a provider…`,i.disabled=!0,i.selected=!0,i.hidden=!0,n.appendChild(i);let a=new Set(w().map(e=>e.providerId)),s=[...C()].sort((e,t)=>r(e).name.localeCompare(r(t).name));for(let t of s){if(a.has(t))continue;if(e?.providerFilter){if(!e.providerFilter(t))continue}else if(!o(t))continue;let i=document.createElement(`option`);i.value=t,i.textContent=r(t).name,n.appendChild(i)}return n}function je(e,t){let n=Ae(e,t),r=document.createElement(`div`);r.className=`dialog__desc`,r.style.cssText=`font-size: 12px; color: var(--s2-content-tertiary); margin-bottom: 16px; margin-top: -4px;`;let i=document.createElement(`div`);i.style.cssText=`margin-bottom: 16px; display: none;`;let a=document.createElement(`button`);a.className=`dialog__btn`,a.textContent=`Login`,a.style.cssText=`width: 100%; margin-bottom: 8px;`,i.appendChild(a);let o=document.createElement(`div`);o.className=`dialog__desc`,o.style.cssText=`font-size: 12px; color: var(--s2-content-secondary); text-align: center;`,i.appendChild(o);let s=document.createElement(`div`),c=document.createElement(`div`);c.className=`dialog__desc`,s.appendChild(c);let l=document.createElement(`input`);l.className=`dialog__input`,l.type=`password`,l.autocomplete=`off`,l.spellcheck=!1,t&&(l.value=t.apiKey),s.appendChild(l);let u=document.createElement(`div`),d=document.createElement(`div`);d.className=`dialog__desc`,d.textContent=`Base URL:`,u.appendChild(d);let f=document.createElement(`input`);f.className=`dialog__input`,f.type=`text`,f.autocomplete=`off`,f.spellcheck=!1,t?.baseUrl&&(f.value=t.baseUrl),u.appendChild(f);let p=document.createElement(`div`);p.className=`dialog__desc`,p.style.cssText=`font-size: 11px; color: var(--s2-content-secondary); margin-top: -12px; margin-bottom: 16px;`,u.appendChild(p);let m=document.createElement(`div`);m.style.display=`none`;let h=document.createElement(`div`);h.className=`dialog__desc`,h.textContent=`Deployment:`,m.appendChild(h);let g=document.createElement(`input`);g.className=`dialog__input`,g.type=`text`,g.autocomplete=`off`,g.spellcheck=!1,t?.deployment&&(g.value=t.deployment),m.appendChild(g);let _=document.createElement(`div`);_.className=`dialog__desc`,_.style.cssText=`font-size: 11px; color: var(--s2-content-secondary); margin-top: -12px; margin-bottom: 16px;`,m.appendChild(_);let v=document.createElement(`div`);v.style.display=`none`;let y=document.createElement(`div`);y.className=`dialog__desc`,y.textContent=`API Version:`,v.appendChild(y);let b=document.createElement(`input`);b.className=`dialog__input`,b.type=`text`,b.autocomplete=`off`,b.spellcheck=!1,t?.apiVersion&&(b.value=t.apiVersion),v.appendChild(b);let x=document.createElement(`div`);x.className=`dialog__desc`,x.style.cssText=`font-size: 11px; color: var(--s2-content-secondary); margin-top: -12px; margin-bottom: 16px;`,v.appendChild(x);let S=document.createElement(`div`);S.style.cssText=`color: var(--slicc-cone); font-size: 12px; margin-bottom: 8px; display: none;`;let C=document.createElement(`button`);return C.className=`dialog__btn`,C.textContent=t?`Save`:`Add`,{providerSelect:n,providerDesc:r,oauth:{section:i,loginBtn:a,status:o},apiKeySection:s,apiKeyLabel:c,apiKeyInput:l,baseUrlSection:u,baseUrlInput:f,baseUrlDesc:p,deploymentSection:m,deploymentInput:g,deploymentDesc:_,apiVersionSection:v,apiVersionInput:b,apiVersionDesc:x,errorEl:S,saveBtn:C}}function Me(e){let t=document.createElement(`div`);t.setAttribute(`data-slicc-device-code-prompt`,``),t.style.cssText=`display:flex;flex-direction:column;gap:8px`;let n=document.createElement(`div`);n.className=`dialog__desc`,n.textContent=`Verification code`,n.style.cssText=`font-size: 11px; color: var(--s2-content-tertiary);`;let r=document.createElement(`div`);r.textContent=e,r.style.cssText=[`font: 600 22px ui-monospace, SFMono-Regular, Menlo, monospace`,`letter-spacing: 2px`,`color: var(--s2-content-primary, #e6edf3)`,`background: var(--s2-bg-secondary, #161b22)`,`border: 1px solid var(--s2-border, #30363d)`,`border-radius: 6px`,`padding: 10px 12px`,`text-align: center`,`user-select: all`,`cursor: text`].join(`;`);let i=document.createElement(`div`);i.className=`dialog__desc`,i.style.cssText=`font-size: 12px; color: var(--s2-content-secondary);`,i.textContent=`Click Copy & Continue — we will open the GitHub authorization page in a new tab. Paste this code there if it is not already filled in.`;let a=document.createElement(`div`);a.style.cssText=`display:flex;gap:8px;justify-content:flex-end;margin-top:4px`;let o=document.createElement(`button`);o.type=`button`,o.className=`dialog__btn`,o.textContent=`Cancel`;let s=document.createElement(`button`);return s.type=`button`,s.className=`dialog__btn dialog__btn--primary`,s.textContent=`Copy & Continue`,a.appendChild(o),a.appendChild(s),t.appendChild(n),t.appendChild(r),t.appendChild(i),t.appendChild(a),{prompt:t,cancelBtn:o,continueBtn:s}}function Ne(e){return t=>new Promise(n=>{let r=e.loginBtn.style.display,i=e.status.style.display;e.loginBtn.style.display=`none`,e.status.style.display=`none`;let{prompt:a,cancelBtn:o,continueBtn:s}=Me(t.userCode),c=()=>{try{a.remove()}catch{}e.loginBtn.style.display=r,e.status.style.display=i};o.addEventListener(`click`,()=>{c(),n(`cancel`)}),s.addEventListener(`click`,()=>{(async()=>{try{await be(t.userCode)}catch{}c(),e.status.style.display=i,e.status.textContent=`Waiting for you to authorize in the new tab…`,n(`continue`)})()}),e.section.appendChild(a)})}async function q(e,t){let n=t.providerSelect.value;if(!n)return;let i=r(n);if(!i.onOAuthLogin&&!i.onOAuthLoginIntercepted)return;let{status:a}=t.oauth,o=w().some(e=>e.providerId===n),s=k(n);if(i.requiresBaseUrl&&!t.baseUrlInput.value.trim()&&!s){a.textContent=`Base URL is required.`,a.style.color=`var(--slicc-cone)`,t.baseUrlInput.focus();return}i.requiresBaseUrl&&t.baseUrlInput.value.trim()&&E(n,``,t.baseUrlInput.value.trim()),a.textContent=`Opening login window...`;try{if(i.onOAuthLoginIntercepted){let{createInterceptingOAuthLauncherForCurrentRuntime:n}=await A(async()=>{let{createInterceptingOAuthLauncherForCurrentRuntime:e}=await import(`./oauth-service-Uk8UIb05.js`);return{createInterceptingOAuthLauncherForCurrentRuntime:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])),r=await n();if(!r)throw Error(`No controlled-browser CDP transport available — open SLICC in standalone mode or the Chrome extension.`);await i.onOAuthLoginIntercepted(r,()=>W(e),{presentDeviceCode:Ne(t.oauth)})}else if(i.onOAuthLogin){let{createOAuthLauncher:t}=await A(async()=>{let{createOAuthLauncher:e}=await import(`./oauth-service-Uk8UIb05.js`);return{createOAuthLauncher:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])),n=t();await i.onOAuthLogin(n,()=>W(e))}}catch(e){if(!o)try{await l(n)}catch{}I.error(`OAuth login failed`,{providerId:n,error:e instanceof Error?e.message:String(e)}),a.textContent=`Login failed: ${e instanceof Error?e.message:String(e)}`}}function Pe(e,t){if(t.isOAuth){e.oauth.section.style.display=``,e.apiKeySection.style.display=`none`,e.baseUrlSection.style.display=t.requiresBaseUrl?``:`none`,t.requiresBaseUrl&&(e.baseUrlInput.placeholder=t.baseUrlPlaceholder||`https://...`,e.baseUrlDesc.textContent=t.baseUrlDescription||``),e.oauth.loginBtn.textContent=`Login with ${t.name}`,e.saveBtn.style.display=`none`;return}e.oauth.section.style.display=`none`;let n=t.requiresApiKey?`API Key`:`API Key (optional)`;e.apiKeyLabel.textContent=`${n}${t.apiKeyEnvVar?` (${t.apiKeyEnvVar})`:``}:`,e.apiKeyInput.placeholder=t.apiKeyPlaceholder||`API key`,e.apiKeySection.style.display=t.requiresApiKey||t.optionalApiKey?``:`none`,e.baseUrlInput.placeholder=t.baseUrlPlaceholder||`https://...`,e.baseUrlDesc.textContent=t.baseUrlDescription||``,e.baseUrlSection.style.display=t.requiresBaseUrl?``:`none`,e.saveBtn.style.display=``}function Fe(e,t){t.requiresDeployment?(e.deploymentSection.style.display=``,e.deploymentInput.placeholder=t.deploymentPlaceholder||`deployment-name`,e.deploymentDesc.textContent=t.deploymentDescription||``):e.deploymentSection.style.display=`none`}function Ie(e,t){t.requiresApiVersion?(e.apiVersionSection.style.display=``,!e.apiVersionInput.value&&t.apiVersionDefault&&(e.apiVersionInput.value=t.apiVersionDefault),e.apiVersionInput.placeholder=t.apiVersionDefault||`api-version`,e.apiVersionDesc.textContent=t.apiVersionDescription||``):e.apiVersionSection.style.display=`none`}function J(e){let t=e.providerSelect.value;if(!t){e.providerDesc.textContent=``,e.oauth.section.style.display=`none`,e.apiKeySection.style.display=`none`,e.baseUrlSection.style.display=`none`,e.deploymentSection.style.display=`none`,e.apiVersionSection.style.display=`none`,e.saveBtn.style.display=`none`;return}let n=r(t);e.providerDesc.textContent=n.description,Pe(e,n),Fe(e,n),Ie(e,n)}function Y(e,t){let n=t.providerSelect.value;if(!n)return;let i=r(n),a=(e,n)=>{t.errorEl.textContent=e,t.errorEl.style.display=``,n.focus()};if(i.requiresApiKey&&t.apiKeyInput.value.trim().length<5){a(`API key is required (at least 5 characters).`,t.apiKeyInput);return}if(i.requiresBaseUrl&&!t.baseUrlInput.value.trim()){a(`Base URL is required for this provider.`,t.baseUrlInput);return}if(i.requiresDeployment&&!t.deploymentInput.value.trim()){a(`Deployment name is required for this provider.`,t.deploymentInput);return}E(n,t.apiKeyInput.value.trim(),t.baseUrlInput.value.trim()||void 0,t.deploymentInput.value.trim()||void 0,t.apiVersionInput.value.trim()||void 0),W(e)}function Le(e,t){let{dialog:n,options:r}=e,i=w().length>0;if(r?.startInAddAccount){let t=document.createElement(`button`);t.className=`dialog__btn dialog__btn--secondary`,t.style.marginTop=`8px`,t.textContent=`Cancel`,t.addEventListener(`click`,()=>U(e)),n.appendChild(t)}else if(!t&&!i){let t=document.createElement(`button`);t.className=`dialog__btn dialog__btn--secondary`,t.style.marginTop=`8px`,t.textContent=`Connect to another browser`,t.addEventListener(`click`,()=>Q(e)),n.appendChild(t)}else if(i){let t=document.createElement(`button`);t.className=`dialog__btn dialog__btn--secondary`,t.style.marginTop=`8px`,t.textContent=`Back`,t.addEventListener(`click`,()=>K(e)),n.appendChild(t)}}function X(e,t){let{dialog:n}=e;n.innerHTML=``;let i=document.createElement(`div`);i.className=`dialog__title`,i.textContent=t?`Edit Account`:`Add Account`,n.appendChild(i);let a=document.createElement(`div`);a.className=`dialog__desc`,a.textContent=`Provider:`,n.appendChild(a);let o=je(e.options,t);n.appendChild(o.providerSelect),n.appendChild(o.providerDesc),o.oauth.loginBtn.addEventListener(`click`,()=>{q(e,o)}),t?.userName&&(o.oauth.status.textContent=`Logged in as ${t.userName}`,o.oauth.loginBtn.textContent=`Re-login`),n.appendChild(o.oauth.section),n.appendChild(o.apiKeySection),n.appendChild(o.baseUrlSection),n.appendChild(o.deploymentSection),n.appendChild(o.apiVersionSection),n.appendChild(o.errorEl),o.providerSelect.addEventListener(`change`,()=>{o.errorEl.style.display=`none`,J(o)}),J(o),o.saveBtn.addEventListener(`click`,()=>Y(e,o));let s=t=>{t.key===`Enter`&&Y(e,o)};o.apiKeyInput.addEventListener(`keydown`,s),o.baseUrlInput.addEventListener(`keydown`,s),o.deploymentInput.addEventListener(`keydown`,s),o.apiVersionInput.addEventListener(`keydown`,s),n.appendChild(o.saveBtn),Le(e,!!t),requestAnimationFrame(()=>{let e=o.providerSelect.value;if(!e)return;let t=r(e);t.requiresApiKey?o.apiKeyInput.focus():t.requiresBaseUrl&&o.baseUrlInput.focus()})}function Z(e,t,n){L(t,n),n.textContent=`Connecting…`,n.style.display=``,n.style.color=`var(--s2-content-secondary)`;let r=setTimeout(()=>{e.overlay.remove(),e.resolve(!1)},800);n.dataset.dismissTimer=String(r)}function Re(e,t){let{dialog:n}=e;n.innerHTML=``;let r=document.createElement(`div`);r.className=`dialog__title`,r.textContent=`Connect this browser?`,n.appendChild(r);let i=document.createElement(`div`);i.className=`dialog__desc`,i.style.marginBottom=`12px`,i.textContent=`You’ve been invited to mirror another SLICC browser. Click below to start syncing.`,n.appendChild(i);let a=document.createElement(`div`);a.className=`dialog__desc`,a.style.cssText=`font-family: monospace; font-size: 11px; color: var(--s2-content-secondary); word-break: break-all; margin-bottom: 16px; padding: 8px; background: var(--s2-bg-secondary); border-radius: 4px;`,a.textContent=t.length>80?t.slice(0,40)+`…`+t.slice(-37):t,n.appendChild(a);let o=document.createElement(`div`);o.style.cssText=`font-size: 12px; color: var(--s2-content-secondary); margin-bottom: 8px; display: none;`,n.appendChild(o);let s=document.createElement(`button`);s.className=`dialog__btn`,s.textContent=`Connect`,s.addEventListener(`click`,()=>{let n=N(window.localStorage,t);if(!n){o.textContent=`Invalid sync URL.`,o.style.display=``,o.style.color=`var(--slicc-cone)`;return}Z(e,n.joinUrl,o)}),n.appendChild(s);let c=document.createElement(`button`);c.className=`dialog__btn dialog__btn--secondary`,c.style.marginTop=`8px`,c.textContent=`Set up an account instead`,c.addEventListener(`click`,()=>X(e)),n.appendChild(c)}function ze(){let e=document.createElement(`details`);e.style.cssText=`margin-bottom: 12px; font-size: 12px; color: var(--s2-content-secondary);`;let t=document.createElement(`summary`);t.style.cssText=`cursor: pointer; user-select: none; color: var(--s2-content-secondary);`,t.textContent=`How do I get the sync URL?`,e.appendChild(t);let n=document.createElement(`div`);n.style.cssText=`margin-top: 8px; padding: 10px 12px; background: var(--s2-bg-layer-2); border-radius: var(--s2-radius-default); border: 1px solid var(--s2-border-subtle); line-height: 1.5;`;let r=document.createElement(`ol`);r.style.cssText=`margin: 0; padding-left: 20px;`;for(let e of[`On the other SLICC, click the avatar (top right).`,`Choose “Enable multi-browser sync” — the URL is copied automatically.`,`Paste it below. Both browsers must be on the same SLICC version.`]){let t=document.createElement(`li`);t.textContent=e,r.appendChild(t)}return n.appendChild(r),e.appendChild(n),e}function Q(e){let{dialog:t}=e;t.innerHTML=``;let n=document.createElement(`div`);n.className=`dialog__title`,n.textContent=`Connect to another browser`,t.appendChild(n);let r=document.createElement(`div`);r.className=`dialog__desc`,r.style.marginBottom=`12px`,r.textContent=`Paste a multi-browser sync URL to mirror another SLICC browser.`,t.appendChild(r),t.appendChild(ze());let i=document.createElement(`div`);i.className=`dialog__desc`,i.textContent=`Sync URL:`,t.appendChild(i);let a=document.createElement(`input`);a.className=`dialog__input`,a.type=`text`,a.autocomplete=`off`,a.spellcheck=!1,a.placeholder=`${ye}/join/<token>`,t.appendChild(a);let o=document.createElement(`div`);o.style.cssText=`color: var(--slicc-cone); font-size: 12px; margin-bottom: 8px; display: none;`,t.appendChild(o);let s=document.createElement(`div`);s.style.cssText=`font-size: 12px; color: var(--s2-content-secondary); margin-bottom: 8px; display: none;`;let c=document.createElement(`button`);c.className=`dialog__btn`,c.textContent=`Connect`,c.addEventListener(`click`,()=>{let t=a.value.trim();if(!t){o.textContent=`Paste a sync URL to continue.`,o.style.display=``,a.focus();return}let n=N(window.localStorage,t);if(!n){o.textContent=F(t),o.style.display=``,a.focus();return}Z(e,n.joinUrl,s)}),t.appendChild(c),t.appendChild(s);let l=document.createElement(`button`);l.className=`dialog__btn dialog__btn--secondary`,l.style.marginTop=`8px`,l.textContent=`Back`,l.addEventListener(`click`,()=>X(e)),t.appendChild(l),a.addEventListener(`input`,()=>{o.style.display=`none`}),a.addEventListener(`keydown`,e=>{e.key===`Enter`&&c.click()}),requestAnimationFrame(()=>a.focus())}function $(e){return j(`button`),new Promise(t=>{let n=document.createElement(`div`);n.className=`dialog-overlay`;let r=document.createElement(`div`);r.className=`dialog`,r.style.cssText=`max-width: 480px; width: 90vw; padding: 32px;`;let i={overlay:n,dialog:r,options:e,accountsBefore:localStorage.getItem(`slicc_accounts`)??``,resolve:t};e?.startInAddAccount?X(i):w().length>0?K(i):e?.autoJoinUrl?Re(i,e.autoJoinUrl):e?.preferTrayJoin?Q(i):X(i),n.appendChild(r),document.body.appendChild(n)})}export{$ as n,xe as t};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/fs-C6heN6Io.js","assets/preload-helper-Czpn1I53.js","assets/logger-DDBAeTLF.js","assets/path-utils-DNJG-zQf.js","assets/types-idfTVsM8.js","assets/virtual-device-paths-9EXC9iPp.js","assets/backend-local-1YuE96fx.js","assets/tool-ui-DfXu6quJ.js","assets/picker-approval-D89YhXsA.js","assets/html-B_Hg2WOy.js","assets/mount-picker-popup-Bc3ca2Vl.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/logger-BoSvu4mW.js","assets/picker-popup-Bwcnocm6.js","assets/runtime-env-Dlaokqg1.js","assets/runtime-env-CgsZ7LTp.js","assets/runtime-env-E-i2SW1s.js","assets/src-CAWTvdAa.js","assets/mount-table-store-dY2IfQ5S.js","assets/sidecar-repair-431vRT2V.js"])))=>i.map(i=>d[i]);
2
- import{t as e}from"./preload-helper-Czpn1I53.js";import{t}from"./logger-DDBAeTLF.js";import{t as n}from"./global-db-CbuLl-zx.js";import{t as r}from"./types-idfTVsM8.js";var i=t(`mcp-store`),a=`/workspace/.mcp/servers.json`,o=1,s=null,c=null;async function l(){return s||=await e(()=>import(`./fs-C6heN6Io.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])),s}async function u(e){if(e)return e;if(c&&c.dbName===`slicc-fs-global`)return c.instance;let{VirtualFS:t}=await l(),r=await t.create({dbName:n});return c={instance:r,dbName:n},r}function d(){return{version:o,servers:{}}}function f(e){if(!e||typeof e!=`object`)return null;let t={...e};return typeof t.url==`string`?(delete t.sessionId,t):null}function p(e){if(!e||typeof e!=`object`)return d();let t=e,n=typeof t.version==`number`?t.version:o,r={};if(t.servers&&typeof t.servers==`object`)for(let[e,n]of Object.entries(t.servers)){let t=f(n);t&&(r[e]=t)}return{version:n,servers:r}}async function m(e){try{let t=await(await u(e)).readFile(a,{encoding:`utf-8`});try{return p(JSON.parse(t))}catch(e){return i.warn(`servers.json is not valid JSON; treating as empty`,{error:e instanceof Error?e.message:String(e)}),d()}}catch(e){return e instanceof r&&e.code===`ENOENT`||i.warn(`Failed to read servers.json`,{error:e instanceof Error?e.message:String(e)}),d()}}async function h(e){return(await m(e)).servers}async function g(){let e=await h(),t=[];for(let[n,r]of Object.entries(e))!r?.url||!r.auth?.clientId||t.push({name:n,serverUrl:r.url,auth:r.auth});return t}export{g as readMcpAuthEntries};
@@ -1 +0,0 @@
1
- import{t as e}from"./store-bEWnkux0.js";export{e as readMcpAuthEntries};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/azure-openai-B2VLKBwJ.js","assets/account-store-y43KgcoW.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/preload-helper-Czpn1I53.js","assets/claude-model-version-DoVrYsKi.js","assets/models-BSkXF4T6.js","assets/diagnostics-DN_idNHx.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-BGeNrvQ4.js","assets/base64-DpPqYZJF.js","assets/runtime-env-Dlaokqg1.js","assets/fetch-body-D2PwksUW.js","assets/api-endpoint-GRCyib6X.js","assets/float-topology-DiK91BlA.js","assets/runtime-env-E-i2SW1s.js","assets/secret-topology-0AWfFTh5.js","assets/secrets-bridge-client-DCQ44RyR.js","assets/port-bridge-client-BhmNRlRv.js","assets/image-markers-BXtVm4og.js","assets/tool-ui-DfXu6quJ.js","assets/panel-rpc-B3MSVImO.js","assets/bedrock-camp-compat-CgBMwna8.js","assets/transform-messages-XkZ1QnTb.js","assets/bedrock-camp-BcJEC3Pg.js","assets/temperature-support-Cpml9LfI.js","assets/local-llm-DOnsCe6c.js","assets/legacy-api-aliases-BnRqMAef.js","assets/adobe-DeM_oCMe.js","assets/silent-renew-backoff-t_Cd4Zw7.js","assets/provider-settings-CZ97KB3C.js","assets/telemetry-BVzuNdvW.js","assets/runtime-env-CgsZ7LTp.js","assets/tray-runtime-config-D7cmCcHJ.js","assets/messages-BD4p8GuF.js","assets/tray-follower-status-BAjnN7Ar.js","assets/clipboard-eqmn97SP.js","assets/tray-join-url-BIvzbiFR.js","assets/oauth-service-Uk8UIb05.js","assets/permissions-surface-registry-CilCRwhh.js","assets/llm-session-id-bZQs6gBN.js","assets/cerebras-Oyxkgl8K.js","assets/github-copilot-CzZSdNg_.js","assets/github-BES17MG4.js","assets/global-db-CbuLl-zx.js","assets/openai-codex-ad3likLF.js","assets/pkce-hGf_TEnP.js","assets/openrouter-models-BhgPe74G.js","assets/openrouter-oauth-D1ocgCDw.js","assets/openrouter-BfwBtJ0a.js","assets/xai-grok-BnSpWJjV.js","assets/xai-grok-errors-bnlIBeu-.js"])))=>i.map(i=>d[i]);
2
- import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./preload-helper-Czpn1I53.js";var n={include:[`*`],exclude:[`amazon-bedrock`,`xai`]},r=e({getRegisteredProviderConfig:()=>d,getRegisteredProviderIds:()=>f,registerProviderConfig:()=>p,registerProviders:()=>u,shouldIncludeProvider:()=>a}),i=Object.assign({"/packages/dev-tools/providers.build.json":n})[`/packages/dev-tools/providers.build.json`]??{include:[`*`],exclude:[]};function a(e){let{include:t,exclude:n}=i;return n.includes(`*`)||n.includes(e)?!1:!!(t.includes(`*`)||t.includes(e))}var o=Object.assign({"./built-in/azure-ai-foundry.ts":()=>t(()=>import(`./azure-ai-foundry-Bo0FAJyX.js`),[]),"./built-in/azure-openai.ts":()=>t(()=>import(`./azure-openai-B2VLKBwJ.js`),__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])),"./built-in/bedrock-camp-compat.ts":()=>t(()=>import(`./bedrock-camp-compat-CgBMwna8.js`).then(e=>e.n),__vite__mapDeps([26,2])),"./built-in/bedrock-camp.ts":()=>t(()=>import(`./bedrock-camp-BcJEC3Pg.js`),__vite__mapDeps([28,6,5,3,4,7,8,2,9,27,29])),"./built-in/local-llm.ts":()=>t(()=>import(`./local-llm-DOnsCe6c.js`),__vite__mapDeps([30,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,31]))}),s=Object.assign({"/packages/webapp/providers/adobe.ts":()=>t(()=>import(`./adobe-DeM_oCMe.js`),__vite__mapDeps([32,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,31,33,34,35,36,37,38,39,40,41,42,43,29,44])),"/packages/webapp/providers/cerebras.ts":()=>t(()=>import(`./cerebras-Oyxkgl8K.js`),__vite__mapDeps([45,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,31])),"/packages/webapp/providers/github-copilot.ts":()=>t(()=>import(`./github-copilot-CzZSdNg_.js`),__vite__mapDeps([46,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,31,34,35,36,37,38,39,40,41])),"/packages/webapp/providers/github.ts":()=>t(()=>import(`./github-BES17MG4.js`),__vite__mapDeps([47,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,33,37,38,34,35,36,39,40,41,42,43,48])),"/packages/webapp/providers/openai-codex.ts":()=>t(()=>import(`./openai-codex-ad3likLF.js`),__vite__mapDeps([49,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,31,34,35,36,37,38,39,40,41,50])),"/packages/webapp/providers/openrouter-models.ts":()=>t(()=>import(`./openrouter-models-BhgPe74G.js`),__vite__mapDeps([51,9])),"/packages/webapp/providers/openrouter-oauth.ts":()=>t(()=>import(`./openrouter-oauth-D1ocgCDw.js`),__vite__mapDeps([52,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,34,35,36,37,38,39,40,41,50])),"/packages/webapp/providers/openrouter.ts":()=>t(()=>import(`./openrouter-BfwBtJ0a.js`),__vite__mapDeps([53,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,31,34,35,36,37,38,39,40,41,51,52,50])),"/packages/webapp/providers/xai-grok-errors.ts":()=>t(()=>import(`./xai-grok-errors-bnlIBeu-.js`),[]),"/packages/webapp/providers/xai-grok.ts":()=>t(()=>import(`./xai-grok-BnSpWJjV.js`),__vite__mapDeps([54,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,31,34,35,36,37,38,39,40,41,50,55]))}),c=new Map,l=null;function u(){return l===null&&(l=(async()=>{let e=await Promise.all(Object.values(o).map(e=>e()));for(let t of e)t.config&&a(t.config.id)&&(c.set(t.config.id,t.config),t.register?.());let t=await Promise.all(Object.values(s).map(e=>e()));for(let e of t)e.config&&(c.set(e.config.id,e.config),e.register?.())})()),l}function d(e){return c.get(e)}function f(){return[...c.keys()]}function p(e){c.set(e.id,e)}export{u as a,p as i,f as n,a as o,r,d as t};
@@ -1 +0,0 @@
1
- import"./src-CAWTvdAa.js";import{d as e}from"./tray-sync-protocol-BZ5yhJH9.js";import{n as t,t as n}from"./pending-request-table-Dgn6qYdL.js";var r=class{sender;timeoutMs;pending=new n;eventListeners=new Map;chunkBuffers=new Map;_state=`connected`;requestCounter=0;constructor(e,t=3e4){this.sender=e,this.timeoutMs=t}get state(){return this._state}async connect(){}disconnect(){this._state=`disconnected`,this.pending.rejectAll(`Transport disconnected`)}async send(e,t,n,r){if(this._state===`disconnected`)throw Error(`Transport disconnected`);let i=`remote-${++this.requestCounter}-${Date.now()}`,a=r??this.timeoutMs,o=this.pending.issue(i,a,`Remote CDP request timed out after ${a}ms: ${e}`);return this.sender.sendCDPRequest(i,e,t,n),o}on(e,t){let n=this.eventListeners.get(e);n||(n=new Set,this.eventListeners.set(e,n)),n.add(t)}off(e,t){this.eventListeners.get(e)?.delete(t)}once(e,n){return t(t=>(this.on(e,t),()=>this.off(e,t)),n??this.timeoutMs,`Remote CDP event timed out: ${e}`)}handleResponse(t,n,r,i,a,o){if(!this.pending.has(t))return;let s=e(this.chunkBuffers,{type:`cdp.response`,requestId:t,result:n,error:r,chunkData:i,chunkIndex:a,totalChunks:o});s&&(s.error?this.pending.reject(t,Error(s.error)):this.pending.resolve(t,s.result??{}))}handleEvent(e,t){let n=this.eventListeners.get(e);if(n)for(let e of n)e(t)}};export{r as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./types-idfTVsM8.js";function t(e,t){return e===`/`?`/${t}`:`${e}/${t}`}function n(n){let{reader:r,writer:i}=n;return{readFile:(e,t)=>r.readFile(e,t),readDir:e=>r.readDir(e),stat:e=>r.stat(e),writeFile:(e,t,n)=>i.writeFile(e,t,n),mkdir:(e,t)=>i.mkdir(e,t),rm:(e,t)=>i.rm(e,t),flush:()=>i.flush(),exists:async t=>{try{return await r.stat(t),!0}catch(t){return t instanceof e&&t.code,!1}},walk:async function*(e){let n=[e],i=new Set;for(;n.length>0;){let e=n.pop();if(i.has(e))continue;i.add(e);let a;try{a=await r.readDir(e)}catch{continue}for(let i of a){let a=t(e,i.name);if(i.type===`file`)yield a;else if(i.type===`directory`)n.push(a);else if(i.type===`symlink`)try{let e=await r.stat(a);e.type===`file`?yield a:e.type===`directory`&&n.push(a)}catch{}}}}}}export{n as createRemoteSprinkleVfs};
@@ -1,12 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-Dd_uD5pT.js";var t=e((e=>{e.byteLength=c,e.toByteArray=u,e.fromByteArray=p;for(var t=[],n=[],r=typeof Uint8Array<`u`?Uint8Array:Array,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,a=0,o=i.length;a<o;++a)t[a]=i[a],n[i.charCodeAt(a)]=a;n[45]=62,n[95]=63;function s(e){var t=e.length;if(t%4>0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function c(e){var t=s(e),n=t[0],r=t[1];return(n+r)*3/4-r}function l(e,t,n){return(t+n)*3/4-n}function u(e){var t,i=s(e),a=i[0],o=i[1],c=new r(l(e,a,o)),u=0,d=o>0?a-4:a,f;for(f=0;f<d;f+=4)t=n[e.charCodeAt(f)]<<18|n[e.charCodeAt(f+1)]<<12|n[e.charCodeAt(f+2)]<<6|n[e.charCodeAt(f+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=n[e.charCodeAt(f)]<<2|n[e.charCodeAt(f+1)]>>4,c[u++]=t&255),o===1&&(t=n[e.charCodeAt(f)]<<10|n[e.charCodeAt(f+1)]<<4|n[e.charCodeAt(f+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function d(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[e&63]}function f(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(d(r));return i.join(``)}function p(e){for(var n,r=e.length,i=r%3,a=[],o=16383,s=0,c=r-i;s<c;s+=o)a.push(f(e,s,s+o>c?c:s+o));return i===1?(n=e[r-1],a.push(t[n>>2]+t[n<<4&63]+`==`)):i===2&&(n=(e[r-2]<<8)+e[r-1],a.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+`=`)),a.join(``)}})),n=e((e=>{
2
- /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
3
- e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else if(a===c)return o?NaN:(p?-1:1)*(1/0);else o+=2**r,a-=l;return(p?-1:1)*o*2**(a-r)},e.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,d=u>>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=+(t<0||t===0&&1/t<0);for(t=Math.abs(t),isNaN(t)||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128}})),r=e((e=>{
4
- /*!
5
- * The buffer module from node.js, for the browser.
6
- *
7
- * @author Feross Aboukhadijeh <https://feross.org>
8
- * @license MIT
9
- */
10
- let r=t(),i=n(),a=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=l,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50;let o=2147483647;e.kMaxLength=o,l.TYPED_ARRAY_SUPPORT=s(),!l.TYPED_ARRAY_SUPPORT&&typeof console<`u`&&typeof console.error==`function`&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function c(e){if(e>o)throw RangeError(`The value "`+e+`" is invalid for option "size"`);let t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return p(e)}return u(e,t,n)}l.poolSize=8192;function u(e,t,n){if(typeof e==`string`)return m(e,t);if(ArrayBuffer.isView(e))return ee(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<`u`&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return g(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);let r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return l.from(r,t,n);let i=_(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return l.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}l.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function d(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function f(e,t,n){return d(e),e<=0||t===void 0?c(e):typeof n==`string`?c(e).fill(t,n):c(e).fill(t)}l.alloc=function(e,t,n){return f(e,t,n)};function p(e){return d(e),c(e<0?0:v(e)|0)}l.allocUnsafe=function(e){return p(e)},l.allocUnsafeSlow=function(e){return p(e)};function m(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!l.isEncoding(t))throw TypeError(`Unknown encoding: `+t);let n=b(e,t)|0,r=c(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function h(e){let t=e.length<0?0:v(e.length)|0,n=c(t);for(let r=0;r<t;r+=1)n[r]=e[r]&255;return n}function ee(e){if(Z(e,Uint8Array)){let t=new Uint8Array(e);return g(t.buffer,t.byteOffset,t.byteLength)}return h(e)}function g(e,t,n){if(t<0||e.byteLength<t)throw RangeError(`"offset" is outside of buffer bounds`);if(e.byteLength<t+(n||0))throw RangeError(`"length" is outside of buffer bounds`);let r;return r=t===void 0&&n===void 0?new Uint8Array(e):n===void 0?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,l.prototype),r}function _(e){if(l.isBuffer(e)){let t=v(e.length)|0,n=c(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!=`number`||Q(e.length)?c(0):h(e);if(e.type===`Buffer`&&Array.isArray(e.data))return h(e.data)}function v(e){if(e>=o)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+o.toString(16)+` bytes`);return e|0}function y(e){return+e!=e&&(e=0),l.alloc(+e)}l.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==l.prototype},l.compare=function(e,t){if(Z(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},l.isEncoding=function(e){switch(String(e).toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`latin1`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw TypeError(`"list" argument must be an Array of Buffers`);if(e.length===0)return l.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;let r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){let t=e[n];if(Z(t,Uint8Array))i+t.length>r.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else if(l.isBuffer(t))t.copy(r,i);else throw TypeError(`"list" argument must be an Array of Buffers`);i+=t.length}return r};function b(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if(typeof e!=`string`)throw TypeError(`The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type `+typeof e);let n=e.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;let i=!1;for(;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return J(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return Y(e).length;default:if(i)return r?-1:J(e).length;t=(``+t).toLowerCase(),i=!0}}l.byteLength=b;function x(e,t,n){let r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return j(this,t,n);case`utf8`:case`utf-8`:return E(this,t,n);case`ascii`:return k(this,t,n);case`latin1`:case`binary`:return A(this,t,n);case`base64`:return T(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return M(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}l.prototype._isBuffer=!0;function S(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}l.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(let t=0;t<e;t+=2)S(this,t,t+1);return this},l.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError(`Buffer size must be a multiple of 32-bits`);for(let t=0;t<e;t+=4)S(this,t,t+3),S(this,t+1,t+2);return this},l.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError(`Buffer size must be a multiple of 64-bits`);for(let t=0;t<e;t+=8)S(this,t,t+7),S(this,t+1,t+6),S(this,t+2,t+5),S(this,t+3,t+4);return this},l.prototype.toString=function(){let e=this.length;return e===0?``:arguments.length===0?E(this,0,e):x.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw TypeError(`Argument must be a Buffer`);return this===e||l.compare(this,e)===0},l.prototype.inspect=function(){let t=``,n=e.INSPECT_MAX_BYTES;return t=this.toString(`hex`,0,n).replace(/(.{2})/g,`$1 `).trim(),this.length>n&&(t+=` ... `),`<Buffer `+t+`>`},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(Z(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;let a=i-r,o=n-t,s=Math.min(a,o),c=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<s;++e)if(c[e]!==u[e]){a=c[e],o=u[e];break}return a<o?-1:+(o<a)};function C(e,t,n,r,i){if(e.length===0)return-1;if(typeof n==`string`?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,Q(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0)if(i)n=0;else return-1;if(typeof t==`string`&&(t=l.from(t,r)),l.isBuffer(t))return t.length===0?-1:w(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof Uint8Array.prototype.indexOf==`function`?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function w(e,t,n,r,i){let a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}let l;if(i){let r=-1;for(l=n;l<o;l++)if(c(e,l)===c(t,r===-1?0:l-r)){if(r===-1&&(r=l),l-r+1===s)return r*a}else r!==-1&&(l-=l-r),r=-1}else for(n+s>o&&(n=o-s),l=n;l>=0;l--){let n=!0;for(let r=0;r<s;r++)if(c(e,l+r)!==c(t,r)){n=!1;break}if(n)return l}return-1}l.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},l.prototype.indexOf=function(e,t,n){return C(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return C(this,e,t,n,!1)};function te(e,t,n,r){n=Number(n)||0;let i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;let a=t.length;r>a/2&&(r=a/2);let o;for(o=0;o<r;++o){let r=parseInt(t.substr(o*2,2),16);if(Q(r))return o;e[n+o]=r}return o}function ne(e,t,n,r){return X(J(t,e.length-n),e,n,r)}function re(e,t,n,r){return X(se(t),e,n,r)}function ie(e,t,n,r){return X(Y(t),e,n,r)}function ae(e,t,n,r){return X(ce(t,e.length-n),e,n,r)}l.prototype.write=function(e,t,n,r){if(t===void 0)r=`utf8`,n=this.length,t=0;else if(n===void 0&&typeof t==`string`)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);let i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;let a=!1;for(;;)switch(r){case`hex`:return te(this,e,t,n);case`utf8`:case`utf-8`:return ne(this,e,t,n);case`ascii`:case`latin1`:case`binary`:return re(this,e,t,n);case`base64`:return ie(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return ae(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function T(e,t,n){return t===0&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);let r=[],i=t;for(;i<n;){let t=e[i],a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],(n&192)==128&&(c=(t&31)<<6|n&63,c>127&&(a=c));break;case 3:n=e[i+1],r=e[i+2],(n&192)==128&&(r&192)==128&&(c=(t&15)<<12|(n&63)<<6|r&63,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],(n&192)==128&&(r&192)==128&&(s&192)==128&&(c=(t&15)<<18|(n&63)<<12|(r&63)<<6|s&63,c>65535&&c<1114112&&(a=c))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|a&1023),r.push(a),i+=o}return O(r)}let D=4096;function O(e){let t=e.length;if(t<=D)return String.fromCharCode.apply(String,e);let n=``,r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=D));return n}function k(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]&127);return r}function A(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function j(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i=``;for(let r=t;r<n;++r)i+=le[e[r]];return i}function M(e,t,n){let r=e.slice(t,n),i=``;for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+r[e+1]*256);return i}l.prototype.slice=function(e,t){let n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);let r=this.subarray(e,t);return Object.setPrototypeOf(r,l.prototype),r};function N(e,t,n){if(e%1!=0||e<0)throw RangeError(`offset is not uint`);if(e+t>n)throw RangeError(`Trying to access beyond buffer length`)}l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=$(function(e){e>>>=0,G(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&K(e,this.length-8);let r=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),l.prototype.readBigUInt64BE=$(function(e){e>>>=0,G(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&K(e,this.length-8);let r=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=2**(8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=2**(8*t)),a},l.prototype.readInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=$(function(e){e>>>=0,G(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&K(e,this.length-8);let r=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),l.prototype.readBigInt64BE=$(function(e){e>>>=0,G(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&K(e,this.length-8);let r=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)}),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||N(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),i.read(this,e,!1,52,8)};function P(e,t,n,r,i,a){if(!l.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||t<a)throw RangeError(`"value" argument is out of bounds`);if(n+r>e.length)throw RangeError(`Index out of range`)}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;P(this,e,t,n,r,0)}let i=1,a=0;for(this[t]=e&255;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;P(this,e,t,n,r,0)}let i=n-1,a=1;for(this[t+i]=e&255;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,255,0),this[t]=e&255,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function F(e,t,n,r,i){W(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function I(e,t,n,r,i){W(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}l.prototype.writeBigUInt64LE=$(function(e,t=0){return F(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),l.prototype.writeBigUInt64BE=$(function(e,t=0){return I(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);P(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=e&255;++i<n&&(a*=256);)e<0&&o===0&&this[t+i-1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);P(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=e&255;--i>=0&&(a*=256);)e<0&&o===0&&this[t+i+1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},l.prototype.writeBigInt64LE=$(function(e,t=0){return F(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))}),l.prototype.writeBigInt64BE=$(function(e,t=0){return I(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))});function L(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function R(e,t,n,r,a){return t=+t,n>>>=0,a||L(e,t,n,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,n,r,23,4),n+4}l.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)};function z(e,t,n,r,a){return t=+t,n>>>=0,a||L(e,t,n,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,n,r,52,8),n+8}l.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r<n&&(r=n),r===n||e.length===0||this.length===0)return 0;if(t<0)throw RangeError(`targetStart out of bounds`);if(n<0||n>=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);let i=r-n;return this===e&&typeof Uint8Array.prototype.copyWithin==`function`?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},l.prototype.fill=function(e,t,n,r){if(typeof e==`string`){if(typeof t==`string`?(r=t,t=0,n=this.length):typeof n==`string`&&(r=n,n=this.length),r!==void 0&&typeof r!=`string`)throw TypeError(`encoding must be a string`);if(typeof r==`string`&&!l.isEncoding(r))throw TypeError(`Unknown encoding: `+r);if(e.length===1){let t=e.charCodeAt(0);(r===`utf8`&&t<128||r===`latin1`)&&(e=t)}}else typeof e==`number`?e&=255:typeof e==`boolean`&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError(`Out of range index`);if(n<=t)return this;t>>>=0,n=n===void 0?this.length:n>>>0,e||=0;let i;if(typeof e==`number`)for(i=t;i<n;++i)this[i]=e;else{let a=l.isBuffer(e)?e:l.from(e,r),o=a.length;if(o===0)throw TypeError(`The value "`+e+`" is invalid for argument "value"`);for(i=0;i<n-t;++i)this[i+t]=a[i%o]}return this};let B={};function V(e,t,n){B[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}V(`ERR_BUFFER_OUT_OF_BOUNDS`,function(e){return e?`${e} is outside of buffer bounds`:`Attempt to access memory outside buffer bounds`},RangeError),V(`ERR_INVALID_ARG_TYPE`,function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),V(`ERR_OUT_OF_RANGE`,function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=H(String(n)):typeof n==`bigint`&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=H(i)),i+=`n`),r+=` It must be ${t}. Received ${i}`,r},RangeError);function H(e){let t=``,n=e.length,r=+(e[0]===`-`);for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function U(e,t,n){G(t,`offset`),(e[t]===void 0||e[t+n]===void 0)&&K(t,e.length-(n+1))}function W(e,t,n,r,i,a){if(e>n||e<t){let r=typeof t==`bigint`?`n`:``,i;throw i=a>3?t===0||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${(a+1)*8}${r}`:`>= -(2${r} ** ${(a+1)*8-1}${r}) and < 2 ** ${(a+1)*8-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new B.ERR_OUT_OF_RANGE(`value`,i,e)}U(r,i,a)}function G(e,t){if(typeof e!=`number`)throw new B.ERR_INVALID_ARG_TYPE(t,`number`,e)}function K(e,t,n){throw Math.floor(e)===e?t<0?new B.ERR_BUFFER_OUT_OF_BOUNDS:new B.ERR_OUT_OF_RANGE(n||`offset`,`>= ${+!!n} and <= ${t}`,e):(G(e,n),new B.ERR_OUT_OF_RANGE(n||`offset`,`an integer`,e))}let q=/[^+/0-9A-Za-z-_]/g;function oe(e){if(e=e.split(`=`)[0],e=e.trim().replace(q,``),e.length<2)return``;for(;e.length%4!=0;)e+=`=`;return e}function J(e,t){t||=1/0;let n,r=e.length,i=null,a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function se(e){let t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function ce(e,t){let n,r,i,a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function Y(e){return r.toByteArray(oe(e))}function X(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Z(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Q(e){return e!==e}let le=(function(){let e=`0123456789abcdef`,t=Array(256);for(let n=0;n<16;++n){let r=n*16;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t})();function $(e){return typeof BigInt>`u`?ue:e}function ue(){throw Error(`BigInt not supported`)}})),i=e(((e,t)=>{
11
- /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
12
- var n=r(),i=n.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(a(n,e),e.Buffer=o);function o(e,t,n){return i(e,t,n)}o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return i(e,t,n)},o.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var r=i(e);return t===void 0?r.fill(0):typeof n==`string`?r.fill(t,n):r.fill(t),r},o.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return i(e)},o.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return n.SlowBuffer(e)}}));export{r as n,i as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-Dd_uD5pT.js";var t=e((e=>{e.byteLength=c,e.toByteArray=u,e.fromByteArray=p;for(var t=[],n=[],r=typeof Uint8Array<`u`?Uint8Array:Array,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,a=0,o=i.length;a<o;++a)t[a]=i[a],n[i.charCodeAt(a)]=a;n[45]=62,n[95]=63;function s(e){var t=e.length;if(t%4>0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function c(e){var t=s(e),n=t[0],r=t[1];return(n+r)*3/4-r}function l(e,t,n){return(t+n)*3/4-n}function u(e){var t,i=s(e),a=i[0],o=i[1],c=new r(l(e,a,o)),u=0,d=o>0?a-4:a,f;for(f=0;f<d;f+=4)t=n[e.charCodeAt(f)]<<18|n[e.charCodeAt(f+1)]<<12|n[e.charCodeAt(f+2)]<<6|n[e.charCodeAt(f+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=n[e.charCodeAt(f)]<<2|n[e.charCodeAt(f+1)]>>4,c[u++]=t&255),o===1&&(t=n[e.charCodeAt(f)]<<10|n[e.charCodeAt(f+1)]<<4|n[e.charCodeAt(f+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function d(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[e&63]}function f(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(d(r));return i.join(``)}function p(e){for(var n,r=e.length,i=r%3,a=[],o=16383,s=0,c=r-i;s<c;s+=o)a.push(f(e,s,s+o>c?c:s+o));return i===1?(n=e[r-1],a.push(t[n>>2]+t[n<<4&63]+`==`)):i===2&&(n=(e[r-2]<<8)+e[r-1],a.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+`=`)),a.join(``)}})),n=e((e=>{e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else if(a===c)return o?NaN:(p?-1:1)*(1/0);else o+=2**r,a-=l;return(p?-1:1)*o*2**(a-r)},e.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,d=u>>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=+(t<0||t===0&&1/t<0);for(t=Math.abs(t),isNaN(t)||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128}})),r=e((e=>{var r=t(),i=n(),a=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=l,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50;var o=2147483647;e.kMaxLength=o,l.TYPED_ARRAY_SUPPORT=s(),!l.TYPED_ARRAY_SUPPORT&&typeof console<`u`&&typeof console.error==`function`&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function c(e){if(e>o)throw RangeError(`The value "`+e+`" is invalid for option "size"`);let t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return p(e)}return u(e,t,n)}l.poolSize=8192;function u(e,t,n){if(typeof e==`string`)return m(e,t);if(ArrayBuffer.isView(e))return ee(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<`u`&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return g(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);let r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return l.from(r,t,n);let i=_(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return l.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}l.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function d(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function f(e,t,n){return d(e),e<=0||t===void 0?c(e):typeof n==`string`?c(e).fill(t,n):c(e).fill(t)}l.alloc=function(e,t,n){return f(e,t,n)};function p(e){return d(e),c(e<0?0:v(e)|0)}l.allocUnsafe=function(e){return p(e)},l.allocUnsafeSlow=function(e){return p(e)};function m(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!l.isEncoding(t))throw TypeError(`Unknown encoding: `+t);let n=b(e,t)|0,r=c(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function h(e){let t=e.length<0?0:v(e.length)|0,n=c(t);for(let r=0;r<t;r+=1)n[r]=e[r]&255;return n}function ee(e){if(Z(e,Uint8Array)){let t=new Uint8Array(e);return g(t.buffer,t.byteOffset,t.byteLength)}return h(e)}function g(e,t,n){if(t<0||e.byteLength<t)throw RangeError(`"offset" is outside of buffer bounds`);if(e.byteLength<t+(n||0))throw RangeError(`"length" is outside of buffer bounds`);let r;return r=t===void 0&&n===void 0?new Uint8Array(e):n===void 0?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,l.prototype),r}function _(e){if(l.isBuffer(e)){let t=v(e.length)|0,n=c(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!=`number`||Q(e.length)?c(0):h(e);if(e.type===`Buffer`&&Array.isArray(e.data))return h(e.data)}function v(e){if(e>=o)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+o.toString(16)+` bytes`);return e|0}function y(e){return+e!=e&&(e=0),l.alloc(+e)}l.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==l.prototype},l.compare=function(e,t){if(Z(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},l.isEncoding=function(e){switch(String(e).toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`latin1`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw TypeError(`"list" argument must be an Array of Buffers`);if(e.length===0)return l.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;let r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){let t=e[n];if(Z(t,Uint8Array))i+t.length>r.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else if(l.isBuffer(t))t.copy(r,i);else throw TypeError(`"list" argument must be an Array of Buffers`);i+=t.length}return r};function b(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if(typeof e!=`string`)throw TypeError(`The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type `+typeof e);let n=e.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;let i=!1;for(;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return J(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return Y(e).length;default:if(i)return r?-1:J(e).length;t=(``+t).toLowerCase(),i=!0}}l.byteLength=b;function x(e,t,n){let r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return j(this,t,n);case`utf8`:case`utf-8`:return E(this,t,n);case`ascii`:return k(this,t,n);case`latin1`:case`binary`:return A(this,t,n);case`base64`:return T(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return M(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}l.prototype._isBuffer=!0;function S(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}l.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(let t=0;t<e;t+=2)S(this,t,t+1);return this},l.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError(`Buffer size must be a multiple of 32-bits`);for(let t=0;t<e;t+=4)S(this,t,t+3),S(this,t+1,t+2);return this},l.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError(`Buffer size must be a multiple of 64-bits`);for(let t=0;t<e;t+=8)S(this,t,t+7),S(this,t+1,t+6),S(this,t+2,t+5),S(this,t+3,t+4);return this},l.prototype.toString=function(){let e=this.length;return e===0?``:arguments.length===0?E(this,0,e):x.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw TypeError(`Argument must be a Buffer`);return this===e||l.compare(this,e)===0},l.prototype.inspect=function(){let t=``,n=e.INSPECT_MAX_BYTES;return t=this.toString(`hex`,0,n).replace(/(.{2})/g,`$1 `).trim(),this.length>n&&(t+=` ... `),`<Buffer `+t+`>`},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(Z(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;let a=i-r,o=n-t,s=Math.min(a,o),c=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<s;++e)if(c[e]!==u[e]){a=c[e],o=u[e];break}return a<o?-1:+(o<a)};function C(e,t,n,r,i){if(e.length===0)return-1;if(typeof n==`string`?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,Q(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0)if(i)n=0;else return-1;if(typeof t==`string`&&(t=l.from(t,r)),l.isBuffer(t))return t.length===0?-1:w(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof Uint8Array.prototype.indexOf==`function`?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function w(e,t,n,r,i){let a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}let l;if(i){let r=-1;for(l=n;l<o;l++)if(c(e,l)===c(t,r===-1?0:l-r)){if(r===-1&&(r=l),l-r+1===s)return r*a}else r!==-1&&(l-=l-r),r=-1}else for(n+s>o&&(n=o-s),l=n;l>=0;l--){let n=!0;for(let r=0;r<s;r++)if(c(e,l+r)!==c(t,r)){n=!1;break}if(n)return l}return-1}l.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},l.prototype.indexOf=function(e,t,n){return C(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return C(this,e,t,n,!1)};function te(e,t,n,r){n=Number(n)||0;let i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;let a=t.length;r>a/2&&(r=a/2);let o;for(o=0;o<r;++o){let r=parseInt(t.substr(o*2,2),16);if(Q(r))return o;e[n+o]=r}return o}function ne(e,t,n,r){return X(J(t,e.length-n),e,n,r)}function re(e,t,n,r){return X(se(t),e,n,r)}function ie(e,t,n,r){return X(Y(t),e,n,r)}function ae(e,t,n,r){return X(ce(t,e.length-n),e,n,r)}l.prototype.write=function(e,t,n,r){if(t===void 0)r=`utf8`,n=this.length,t=0;else if(n===void 0&&typeof t==`string`)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);let i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;let a=!1;for(;;)switch(r){case`hex`:return te(this,e,t,n);case`utf8`:case`utf-8`:return ne(this,e,t,n);case`ascii`:case`latin1`:case`binary`:return re(this,e,t,n);case`base64`:return ie(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return ae(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function T(e,t,n){return t===0&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);let r=[],i=t;for(;i<n;){let t=e[i],a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],(n&192)==128&&(c=(t&31)<<6|n&63,c>127&&(a=c));break;case 3:n=e[i+1],r=e[i+2],(n&192)==128&&(r&192)==128&&(c=(t&15)<<12|(n&63)<<6|r&63,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],(n&192)==128&&(r&192)==128&&(s&192)==128&&(c=(t&15)<<18|(n&63)<<12|(r&63)<<6|s&63,c>65535&&c<1114112&&(a=c))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|a&1023),r.push(a),i+=o}return O(r)}var D=4096;function O(e){let t=e.length;if(t<=D)return String.fromCharCode.apply(String,e);let n=``,r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=D));return n}function k(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]&127);return r}function A(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function j(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i=``;for(let r=t;r<n;++r)i+=le[e[r]];return i}function M(e,t,n){let r=e.slice(t,n),i=``;for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+r[e+1]*256);return i}l.prototype.slice=function(e,t){let n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);let r=this.subarray(e,t);return Object.setPrototypeOf(r,l.prototype),r};function N(e,t,n){if(e%1!=0||e<0)throw RangeError(`offset is not uint`);if(e+t>n)throw RangeError(`Trying to access beyond buffer length`)}l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=$(function(e){e>>>=0,G(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&K(e,this.length-8);let r=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),l.prototype.readBigUInt64BE=$(function(e){e>>>=0,G(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&K(e,this.length-8);let r=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=2**(8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=2**(8*t)),a},l.prototype.readInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=$(function(e){e>>>=0,G(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&K(e,this.length-8);let r=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),l.prototype.readBigInt64BE=$(function(e){e>>>=0,G(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&K(e,this.length-8);let r=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)}),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||N(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),i.read(this,e,!1,52,8)};function P(e,t,n,r,i,a){if(!l.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||t<a)throw RangeError(`"value" argument is out of bounds`);if(n+r>e.length)throw RangeError(`Index out of range`)}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;P(this,e,t,n,r,0)}let i=1,a=0;for(this[t]=e&255;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;P(this,e,t,n,r,0)}let i=n-1,a=1;for(this[t+i]=e&255;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,255,0),this[t]=e&255,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function F(e,t,n,r,i){W(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function I(e,t,n,r,i){W(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}l.prototype.writeBigUInt64LE=$(function(e,t=0){return F(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),l.prototype.writeBigUInt64BE=$(function(e,t=0){return I(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);P(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=e&255;++i<n&&(a*=256);)e<0&&o===0&&this[t+i-1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);P(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=e&255;--i>=0&&(a*=256);)e<0&&o===0&&this[t+i+1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},l.prototype.writeBigInt64LE=$(function(e,t=0){return F(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))}),l.prototype.writeBigInt64BE=$(function(e,t=0){return I(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))});function L(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function R(e,t,n,r,a){return t=+t,n>>>=0,a||L(e,t,n,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,n,r,23,4),n+4}l.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)};function z(e,t,n,r,a){return t=+t,n>>>=0,a||L(e,t,n,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,n,r,52,8),n+8}l.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r<n&&(r=n),r===n||e.length===0||this.length===0)return 0;if(t<0)throw RangeError(`targetStart out of bounds`);if(n<0||n>=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);let i=r-n;return this===e&&typeof Uint8Array.prototype.copyWithin==`function`?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},l.prototype.fill=function(e,t,n,r){if(typeof e==`string`){if(typeof t==`string`?(r=t,t=0,n=this.length):typeof n==`string`&&(r=n,n=this.length),r!==void 0&&typeof r!=`string`)throw TypeError(`encoding must be a string`);if(typeof r==`string`&&!l.isEncoding(r))throw TypeError(`Unknown encoding: `+r);if(e.length===1){let t=e.charCodeAt(0);(r===`utf8`&&t<128||r===`latin1`)&&(e=t)}}else typeof e==`number`?e&=255:typeof e==`boolean`&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError(`Out of range index`);if(n<=t)return this;t>>>=0,n=n===void 0?this.length:n>>>0,e||=0;let i;if(typeof e==`number`)for(i=t;i<n;++i)this[i]=e;else{let a=l.isBuffer(e)?e:l.from(e,r),o=a.length;if(o===0)throw TypeError(`The value "`+e+`" is invalid for argument "value"`);for(i=0;i<n-t;++i)this[i+t]=a[i%o]}return this};var B={};function V(e,t,n){B[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}V(`ERR_BUFFER_OUT_OF_BOUNDS`,function(e){return e?`${e} is outside of buffer bounds`:`Attempt to access memory outside buffer bounds`},RangeError),V(`ERR_INVALID_ARG_TYPE`,function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),V(`ERR_OUT_OF_RANGE`,function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=H(String(n)):typeof n==`bigint`&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=H(i)),i+=`n`),r+=` It must be ${t}. Received ${i}`,r},RangeError);function H(e){let t=``,n=e.length,r=+(e[0]===`-`);for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function U(e,t,n){G(t,`offset`),(e[t]===void 0||e[t+n]===void 0)&&K(t,e.length-(n+1))}function W(e,t,n,r,i,a){if(e>n||e<t){let r=typeof t==`bigint`?`n`:``,i;throw i=a>3?t===0||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${(a+1)*8}${r}`:`>= -(2${r} ** ${(a+1)*8-1}${r}) and < 2 ** ${(a+1)*8-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new B.ERR_OUT_OF_RANGE(`value`,i,e)}U(r,i,a)}function G(e,t){if(typeof e!=`number`)throw new B.ERR_INVALID_ARG_TYPE(t,`number`,e)}function K(e,t,n){throw Math.floor(e)===e?t<0?new B.ERR_BUFFER_OUT_OF_BOUNDS:new B.ERR_OUT_OF_RANGE(n||`offset`,`>= ${+!!n} and <= ${t}`,e):(G(e,n),new B.ERR_OUT_OF_RANGE(n||`offset`,`an integer`,e))}var q=/[^+/0-9A-Za-z-_]/g;function oe(e){if(e=e.split(`=`)[0],e=e.trim().replace(q,``),e.length<2)return``;for(;e.length%4!=0;)e+=`=`;return e}function J(e,t){t||=1/0;let n,r=e.length,i=null,a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function se(e){let t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function ce(e,t){let n,r,i,a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function Y(e){return r.toByteArray(oe(e))}function X(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Z(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Q(e){return e!==e}var le=(function(){let e=`0123456789abcdef`,t=Array(256);for(let n=0;n<16;++n){let r=n*16;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t})();function $(e){return typeof BigInt>`u`?ue:e}function ue(){throw Error(`BigInt not supported`)}})),i=e(((e,t)=>{var n=r(),i=n.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(a(n,e),e.Buffer=o);function o(e,t,n){return i(e,t,n)}o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return i(e,t,n)},o.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var r=i(e);return t===void 0?r.fill(0):typeof n==`string`?r.fill(t,n):r.fill(t),r},o.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return i(e)},o.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return n.SlowBuffer(e)}}));export{r as n,i as t};
@@ -1,162 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/quick-llm-DSQHsD_0.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/account-store-y43KgcoW.js","assets/preload-helper-Czpn1I53.js","assets/claude-model-version-DoVrYsKi.js","assets/models-BSkXF4T6.js","assets/diagnostics-DN_idNHx.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-BGeNrvQ4.js","assets/base64-DpPqYZJF.js","assets/runtime-env-Dlaokqg1.js","assets/fetch-body-D2PwksUW.js","assets/api-endpoint-GRCyib6X.js","assets/float-topology-DiK91BlA.js","assets/runtime-env-E-i2SW1s.js","assets/secret-topology-0AWfFTh5.js","assets/secrets-bridge-client-DCQ44RyR.js","assets/port-bridge-client-BhmNRlRv.js","assets/image-markers-BXtVm4og.js","assets/tool-ui-DfXu6quJ.js","assets/providers-DJA67z1N.js","assets/panel-rpc-B3MSVImO.js","assets/bedrock-camp-compat-CgBMwna8.js","assets/llm-session-id-bZQs6gBN.js","assets/icons-ZLR7gmJ4.js"])))=>i.map(i=>d[i]);
2
- import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Q as t,X as n,Z as r}from"./account-store-y43KgcoW.js";import{t as i}from"./preload-helper-Czpn1I53.js";import{o as a}from"./claude-model-version-DoVrYsKi.js";import{t as o}from"./logger-DDBAeTLF.js";import{t as s}from"./attachments-CByeG2Ru.js";import{t as c}from"./types-idfTVsM8.js";import{t as l}from"./icons-ZLR7gmJ4.js";import{c as u,l as d,n as f,r as ee,t as p,u as te}from"./record-C0lt6kKE.js";import{a as ne}from"./dictation-priming-CNllGgNq.js";import"./agent-message-to-chat-_cvF5A5g.js";var re=`---
3
- writablePaths:
4
- - /workspace/CLAUDE.md
5
- visiblePaths:
6
- - /sessions/
7
- - /shared/
8
- - /workspace/
9
- allowedCommands:
10
- - awk
11
- - cat
12
- - cp
13
- - cut
14
- - echo
15
- - file
16
- - find
17
- - grep
18
- - head
19
- - jq # structured reads of JSON stores such as /shared/loose-ends.json
20
- - ls
21
- - mkdir
22
- - mv
23
- - od # read-only byte inspection of corrupted stores
24
- - printf
25
- - rg # recursive, .gitignore-aware search; what the curator actually uses over find|xargs grep
26
- - sed
27
- - sort
28
- - tail
29
- - tr
30
- - uniq
31
- - upskill
32
- - wc
33
- timeoutSeconds: 1200
34
- thinkingLevel: medium
35
- ---
36
-
37
- # Memory curator
38
-
39
- Curate the durable memory for session {{SESSION_COUNT}}. Today's date is {{TODAY}}.
40
-
41
- **Work fast: a full pass should finish in well under 10 minutes.** The run is hard-stopped at 20 minutes, and your rewrite only lands if the pass completes — a killed run is discarded wholesale. So mine the three signals, rewrite the file, compact it in the same pass, and stop, rather than exploring the archive exhaustively.
42
-
43
- Read the entire current memory at {{MEMORY_PATH}} if it exists. Then mine the archived session at {{SESSION_ARCHIVE_PATH}} using the reading recipes below. Rewrite the entire {{MEMORY_PATH}} file with the durable information worth carrying into future sessions. Every part of the file is editable and counts toward the budget.
44
-
45
- ## What to look for
46
-
47
- Three things carry across sessions, and each has its own place in the archive:
48
-
49
- | Look for | Where it lives |
50
- | --------------- | ---------------------------------------------------------------------- |
51
- | **Preferences** | the user's own messages — how they want things done, and what to avoid |
52
- | **Projects** | tool-call arguments — the paths, repos and files actually worked on |
53
- | **Pitfalls** | failed tool calls — what broke, and the error that proves it |
54
-
55
- Pitfalls are the highest-value and most-often-lost category: a failure that cost half an hour is worth one line next time. Keep the error text that identifies it, not the stack trace.
56
-
57
- ## Reading the session archive
58
-
59
- **Never \`cat\` the archive and never \`head\` it.** Archives reach several megabytes, and the machine-readable \`<!-- slicc:session-data ... -->\` block is a _single line_ holding the whole session as JSON — roughly half the file. Reading it costs a fortune and tells you nothing the prose below it does not. Whole \`### Tool\` result bodies are the other half and are equally not worth reading.
60
-
61
- Check the size first, then pull the three signals separately. Together they run about 1% of the archive, so these work on a 2.5 MB file as happily as on a small one.
62
-
63
- \`\`\`bash
64
- wc -c {{SESSION_ARCHIVE_PATH}}
65
-
66
- # Preferences — what the user asked for, in their words.
67
- sed '/^<!-- slicc:session-data$/,/^-->$/d' {{SESSION_ARCHIVE_PATH}} \\
68
- | awk '/^## User/{p=1;next} /^## (Assistant|Summary)/{p=0} /^### Tool/{p=0} p'
69
-
70
- # Projects — the paths touched most, which name the work.
71
- sed '/^<!-- slicc:session-data$/,/^-->$/d' {{SESSION_ARCHIVE_PATH}} \\
72
- | grep -o '/[A-Za-z0-9_][A-Za-z0-9_./-]\\{3,\\}' \\
73
- | sort | uniq -c | sort -rn | head -40
74
-
75
- # Pitfalls — failed calls with the input that caused them.
76
- sed '/^<!-- slicc:session-data$/,/^-->$/d' {{SESSION_ARCHIVE_PATH}} \\
77
- | grep -B6 '^Result:.*\\(rror\\|not found\\|failed\\|denied\\|ENOENT\\|fatal\\)' \\
78
- | cut -c1-200
79
- \`\`\`
80
-
81
- Only if something is still missing, reach into one specific block with \`grep -n\` plus a bounded \`sed -n 'START,ENDp'\`. Never widen these to the whole file.
82
-
83
- ## Suggesting a skill
84
-
85
- A recurring pitfall is often a missing skill. Once you know what broke and what the work was, spend **one** lookup on it — no more, and skip it entirely when the session had no failures:
86
-
87
- \`\`\`bash
88
- upskill search <a few words from the pitfall>
89
- upskill list # what is already installed — never suggest a duplicate
90
- \`\`\`
91
-
92
- \`upskill ai-ecoverse/skills\` and \`upskill adobe/skills\` list a repo's skills without installing anything. **Never install.** You have no write access to the skills tree, so an install attempt will fail or interrupt the user for approval; recommending is your job, deciding is theirs. Put any suggestion in your closing message, with the pitfall it addresses — that message is delivered to the main agent.
93
-
94
- ## Working within the budget
95
-
96
- Measure, decide, then write once. Do not converge on the budget by trial and error — each attempt re-reads your whole context and is billed accordingly.
97
-
98
- 1. \`wc -c {{MEMORY_PATH}}\` to get the current size, and subtract {{BUDGET_CHARS}} to get the exact surplus.
99
- 2. Decide up front which sections absorb that surplus, oldest-dated first, and roughly what each one costs. Budget the whole cut before editing anything.
100
- 3. Write the complete file once, already inside the budget. Never write a version you know to be over budget «to fix in the next step»: the pass can be killed at any moment, and the file you leave behind is the one the next session inherits.
101
- 4. \`wc -c {{MEMORY_PATH}}\` to confirm. If you are still over, cut a whole section rather than shaving a few characters at a time.
102
-
103
- Per-section costs come out of \`awk\`, not an interpreter: \`awk '/^## /{h=$0} {c[h]+=length($0)+1} END{for(k in c) printf "%7d %s\\n", c[k], k}' {{MEMORY_PATH}} | sort -rn\` tells you which sections pay for the surplus.
104
-
105
- To draft before committing, draft in \`{{SCRATCH_DIR}}\`. That is your own scratch folder: writable without a grant and without an approval prompt, private to this pass, and deleted when the pass ends. Reuse one filename such as \`{{SCRATCH_DIR}}/draft.md\` rather than numbering drafts — you have no \`rm\`, so every extra draft survives until the folder goes.
106
-
107
- If the pass is running long, drop the oldest-dated section wholesale and write. An under-budget file missing one stale section is a good outcome; an over-budget file is a broken one.
108
-
109
- Rules:
110
-
111
- - Keep durable preferences, stable project facts, validated approaches, named resources, and the pitfalls worth not repeating.
112
- - Organize retained information into concise per-topic sections rather than one flat list. Let the topic lead the heading; preferences, projects and pitfalls are what to look for, not a required table of contents.
113
- - Never write next to the memory file. It is versioned, so backups and scratch copies beside it are noise; drafts belong in \`{{SCRATCH_DIR}}\`. Do not draft in \`/tmp/\` either: it is shared with every other scoop, which can read and overwrite what you leave there.
114
- - Shell tools only. Interpreters such as \`python3\` and \`node -e\` are not on your allow-list, so reaching for one costs an approval round-trip and may fail even when approved — \`awk\`, \`sed\`, \`wc\` and \`sort\` cover every measurement this pass needs.
115
- - End every \`##\` and \`###\` section heading with its last-verified date in \`YYYY-MM-DD\` form, for example \`## Deployment pipeline (2026-08-06)\`. Dates are UTC, matching the session archive timestamps, so a late-evening freeze west of UTC stamps the next day.
116
- - Stamp sections you write or confirm with today's date, {{TODAY}}.
117
- - Prioritize re-verifying the oldest-dated sections. Treat undated headings as maximally stale and date them on this pass.
118
- - Drop ephemera and duplicates. Delete or merge sections that are stale, superseded, or unverifiable.
119
- - Preserve concrete identifiers such as file paths, URLs, IDs, and names verbatim.
120
- - Keep the entire file at or below the hard budget of {{BUDGET_CHARS}} characters, with no exempt region. When over budget, compact or remove the oldest-dated sections first.
121
- - Write the result to {{MEMORY_PATH}}; do not merely return it in your response.
122
-
123
- <!-- How to customize
124
- Add curator instructions here, for example: also update the knowledge base at /path following its WIKI.md. Extend visiblePaths or writablePaths above to grant access to extra stores, and adjust timeoutSeconds when needed.
125
-
126
- {{MEMORY_PATH}} resolves to a staged per-archive draft under /sessions/.curation/, not the live memory file: the pass snapshots the live file when it spawns, the curator rewrites the draft, and on a successful exit the runtime three-way-merges the rewrite back onto the live file. Edits the cone or the user makes to the live memory while the curator runs survive; where both sides changed the same lines the curator's version wins. An entry in writablePaths naming the memory file is substituted with the draft automatically, so this file keeps working unchanged. A failed or killed run leaves the live memory untouched and its outcome recorded at /sessions/.curation/<archive>/status.json.
127
-
128
- writablePaths defaults to the memory file alone rather than /workspace/, because the curator can run upskill and a directory-wide grant would also let it install skills into /workspace/skills. Widen it only as far as a task genuinely needs; a single file is a valid entry, not just a directory.
129
-
130
- Scratch space needs no entry here. The curator spawns under a fixed per-cone name (memory-curator for the primary cone), so the bridge grants it {{SCRATCH_DIR}} — private to the run, writable without a prompt, and removed when the pass ends — and that is where the prompt sends drafts. /tmp/ is writable too, but it is shared with every other scoop and visible to the cone, so a full rewrite of durable memory does not belong there.
131
-
132
- thinkingLevel accepts off, minimal, low, medium, high, or xhigh. Curation is cheaper with reasoning than without: an unreasoned pass converges on the budget by trial and error, and because every turn re-reads the whole context, turn count is what the pass costs. Lower it to off only if you also shrink the prompt to a single mechanical instruction.
133
-
134
- MEMORY.md is user-edited only: the curator intentionally has read-only access to /shared/ and cannot rewrite its own instructions. A bare / is rejected in writablePaths.
135
-
136
- Frontmatter supports a strict YAML subset. Arrays may use the block form above (with optional # comment tails) or inline form such as [cat, grep]. \`allowedCommands\` is additive: listed commands extend the built-in base set without replacing it. Inline entries containing commas must be quoted, for example ["/knowledge/lars,rebecca/"].
137
- -->
138
- `,ie=`/cones`,m=`/workspace/skills`;function h(e){if(u(e)){if(ee(e))return{root:`/workspace`,memoryPath:`/workspace/CLAUDE.md`,scratch:`/tmp`};let t=`${ie}/${e.folder}`;return{root:`${t}/workspace`,memoryPath:`${t}/CLAUDE.md`,scratch:`/tmp`}}let t=`/scoops/${e.folder}`;return{root:`${t}/workspace`,memoryPath:`${t}/CLAUDE.md`,scratch:t}}var g=Object.freeze(h({parentJid:null,folder:p}));function ae(e,t){let n=[...e],r=d(n,t)??te(n)[0];return r?h(r):g}function oe(e){let t=`${e.root}/`,n=`${m}/`;return n.startsWith(t)?[t]:[t,n]}var se=`abject.abortive.abrasive.absolute.abstruse.abundant.abyssal.accessible.acerbic.acrid.adamant.adept.adlerian.adornian.adroit.adventurous.aeolian.aerated.aesthetic.affable.aged.ageless.agile.airborne.airlocked.airy.akkadian.alabaster.alacritous.alert.alien.alloyed.allusive.aloof.alpha.alpine.alternate.altruistic.amaranthine.amber.ambidextrous.ambivalent.ambrosial.amiable.amorphous.ample.analog.analytical.ancestral.ancient.angelic.animated.animist.anomalous.antediluvian.antic.antlered.apollinairian.apollonian.apt.aquatic.arbitrary.arcadian.arcane.archaic.archimedean.ardent.arduous.arendtian.argent.argentine.argive.aristotelian.armstrongian.aromatic.arresting.artful.arthurian.articulate.artificial.artisanal.artless.ascetic.ashen.ashy.asimovian.aspiring.assiduous.assyrian.asteroidal.astral.astute.asynchronous.athenian.atlantean.atomic.attentive.attic.audacious.audenesque.augmented.august.augustan.aureate.auric.auroral.austenian.austere.austral.authentic.autonomous.autumnal.avalonian.avid.avuncular.aztec.azure.babbagean.babylonian.bacchic.bachian.bactrian.ballardian.ballistic.balmy.banksian.barefoot.barreled.barthesian.bartokian.bashy.baudelairean.bayesian.beatific.beckettesque.beckettian.beethovenian.beguiling.bellicose.bemused.benevolent.benign.benjaminian.bergmanesque.beta.bewitched.binary.bionic.bismarckian.bitter.bitwise.blackened.blakean.blameless.bland.blazar.blazing.blended.blessed.blissful.blistered.blithe.blooming.blunt.blustery.boeotian.boggy.bohrian.boingy.boisterous.bold.bolted.bombastic.bonny.boolean.boreal.borgesian.borgian.bosky.botticellian.bottled.bouncy.boundless.bountiful.bourbon.bradburyan.brahmsian.braised.brambly.brash.brave.brazen.bready.breathless.brechtian.breezy.briared.briery.bright.brilliant.brined.briny.brisk.bristling.briton.brittenesque.broadband.brontean.bronzed.brooding.browned.browningesque.brucknerian.brumal.brusque.bubbling.bubbly.bucolic.budding.bunuelian.buoyant.burnished.burnt.buttered.buttery.bygone.byronic.bytewise.byzantine.cacophonous.caesarean.callow.calm.candescent.candid.candied.canny.cantorian.capable.capricious.caramelized.caravaggesque.carbon.carefree.carolingian.cartesian.carved.casked.cast.cavafian.cavalier.celebrated.celestial.celtic.ceramic.cerebral.ceremonious.cerulean.cervantine.cezannesque.chagallian.chalky.chaplinesque.charcoal.charismatic.charmed.charming.charred.chaucerian.cheeky.cheerful.chekhovian.cherished.cherubic.chewy.chilled.chilly.chimerical.chipper.chirpy.chivalrous.chopinesque.chromospheric.chronal.chthonic.chubby.chunky.churchillian.cimmerian.cindered.circumspect.circumstellar.citrusy.civil.clandestine.clangy.clarified.clarkean.classic.clement.clever.cloaked.clockwork.clompy.cloned.cloudlike.cloudy.clunky.clustered.coastal.cobalt.cognitive.coherent.coleridgean.colossal.coltranesque.comely.cometary.compiled.complacent.composite.concurrent.conradian.constablean.convivial.copernican.copious.coplandesque.cordial.corinthian.corked.cornelian.coronal.cortical.cosmic.coy.cozy.cracked.crackling.crafty.cranky.crashy.creamy.credible.crepuscular.cretan.crimson.crisp.crispy.crowned.crumbly.crunchy.crushed.cryo.cryofrozen.cryogenic.cryonic.cryptic.crystalline.cuddly.cumulative.cunning.cupric.cured.curious.cursed.cursory.cushy.cybernetic.cyberpunk.cynical.cyprian.daliesque.dancy.dandy.dantean.dantesque.dapper.dappled.daring.dark.darwinian.dashing.dashy.dauntless.davisian.dawning.dazzling.deathless.debonair.deboned.debussyan.decanted.decompiled.decorous.decrypted.deep.deferential.deft.degasian.delectable.deleuzian.delian.deliberate.delicate.delirious.delphic.delta.demure.depressurized.derridean.destined.devout.dewy.dexterous.diaphanous.diced.dickensian.dickian.dickinsonian.didactic.dieselpunk.diffident.digital.dignified.diligent.dimensional.dinky.dionysian.discerning.discreet.disheveled.disparate.distant.distinct.distributed.diurnal.divine.dizzy.docile.docked.dogged.doomed.dorian.dormant.dostoevskian.dotty.doughty.doughy.downy.dozy.draconic.dreamful.dreamy.drifting.dripping.drizzly.droll.drowsy.druidic.dulcet.dun.dunky.durkheimian.dusky.dwarven.dynamic.dystopian.eager.earnest.earthy.eastward.easygoing.ebony.ebullient.eclectic.eclipsed.ecstatic.edenic.edwardian.effervescent.effulgent.effusive.einsteinian.elamite.elastic.elated.eldritch.electric.electronic.elegant.elegiac.elgarian.eliotian.eliotic.elizabethan.ellingtonian.eloquent.elusive.elven.elvish.elysian.embered.emergent.eminent.emphatic.emulsified.enchanted.encoded.encrypted.endearing.endless.endogenous.energetic.enhanced.enigmatic.enthralling.ephemeral.epic.epicurean.equanimous.errant.erudite.escherian.esoteric.esteemed.eternal.ethereal.ethiopian.etruscan.euclidean.eulerian.euphonious.euphoric.evanescent.evening.eventide.everlasting.evocative.exacting.exalted.exemplary.exo.exogenous.expansive.expressive.exquisite.extraterrestrial.extruded.exuberant.fabled.fabulous.facetious.faithful.fallow.fanciful.fantastic.faradayic.faraway.farmhouse.fastidious.fated.fateful.fathomless.faulknerian.faunal.fearless.feathered.feathery.fecund.federated.feisty.felicitous.felliniesque.fenny.fermented.ferny.ferrous.fervent.fervid.festive.fetching.fey.fickle.fierce.fiery.filleted.filtered.fitzgeraldian.fizzy.flaky.flamboyant.flamed.flashy.flawless.fleecy.fleet.fleeting.flexible.flickering.flinty.floral.florid.flouncy.flourishing.flowering.fluent.fluffy.fluid.fluvial.foamy.folded.fond.foraged.forged.formidable.forthright.fortuitous.forward.foucauldian.fourier.fractal.fragrant.frank.frankish.freckled.free.fresh.freudian.friedmanite.frisky.frizzy.frolicsome.frosted.frosty.frothy.frozen.frugal.fruiting.fruity.funky.furred.furtive.futuristic.fuzzy.gaelic.galactic.galbraithian.galilean.gallant.gallic.galvanic.gamesome.gamma.gandhian.garlanded.garrulous.gauguinesque.gaussian.gauzy.generous.genetic.genial.genomic.genteel.gentle.geomagnetic.georgian.gershwinesque.ghostly.giant.gibsonian.giddy.gifted.giga.giggly.gilded.giottesque.glacial.glad.glazed.gleaming.gleeful.glimmering.glistening.glorious.glossy.glowing.gnomish.godardian.godelian.goethean.goethesque.gogolian.golden.gooey.goofy.gorgeous.gorsy.gossamer.gothic.gowned.goyaesque.graceful.gracious.grainy.grand.grassy.grated.gravitic.gregarious.grilled.groovy.ground.grounded.guileless.gushy.gusty.habermasian.habsburg.hadrianic.halcyon.hale.hallowed.haloed.halved.hamiltonian.han.handelian.handmade.handsome.hanoverian.hapless.happy.hardy.hardyesque.harmonious.hashed.haunted.haydnesque.hayekian.hazy.heady.heaneyesque.hearthside.hearty.heathen.heathered.heavenly.hegelian.heideggerian.heinesque.heinleinian.heirloom.heisenbergian.heliacal.hellenic.hellish.hemingwayesque.herbal.herbertian.herculean.hermetic.heroic.hexed.hibernal.hilbertian.histrionic.hitchcockian.hittite.hoar.hoary.hobbesian.hobbitish.hogarthian.holderlinian.holo.holographic.holy.homerian.homeric.homeward.honest.honeyed.honky.hooded.hooved.hopeful.hopkinsian.hopperesque.hoppy.horatian.horned.hospitable.hot.housemade.huggy.humble.humean.humming.humorous.hunky.hunnish.hurrian.hushed.hydraulic.hyper.hyperborean.hypersonic.hyperspatial.hypnotic.iberian.ibsenite.iced.icy.ideal.idyllic.igneous.illustrious.imaginative.immaculate.immense.immortal.impassioned.impeccable.impetuous.impish.impressive.incan.incandescent.incisive.incorrigible.indefatigable.indelible.indigo.indolent.indomitable.industrious.ineffable.inexorable.infernal.infinite.infra.infrared.infused.ingenious.ingenuous.inimitable.innocuous.inquisitive.insatiable.inspired.intense.intergalactic.interstellar.intragalactic.intrepid.intricate.intrinsic.intuitive.inventive.inveterate.invincible.inward.ionian.ionic.ionospheric.irenic.iridescent.irrepressible.ithacan.itinerant.ivory.jacobean.jammy.jangly.jaunty.jazzy.jeffersonian.jiggly.jingly.jocular.jocund.johnsonian.jolly.jouncy.jovial.jovian.joycean.joyful.joyous.jubilant.judicious.juiced.juicy.jumped.jumpy.jungian.junky.justinianic.jute.kafkaesque.kandinskian.kantian.keatonesque.keatsian.keen.keplerian.keynesian.kierkegaardian.kindly.kindred.kinetic.kiplingesque.klimtian.knowing.kooky.kubrickian.kurosawan.lacanian.laconic.lacquered.lacustrine.lacy.lamarckian.lambda.lambent.laminated.landed.languid.lanky.laplacian.larkinesque.laser.latent.lathed.latin.lattice.laudable.launched.laureled.lavish.layered.leaden.leafy.lean.learned.legendary.leguinian.leibnizian.lemian.lemurian.lenient.leonardesque.liberal.libyan.lidar.light.lighthearted.likable.lilac.lilting.liminal.limpid.lincolnesque.lingering.linnaean.lissome.lisztian.literate.lithe.littoral.lively.loamy.local.lockean.lofty.logical.loopy.loose.loquacious.lorcaesque.lorcan.lossless.lossy.lovecraftian.lovelacean.loyal.lucent.lucid.lucky.ludic.lukewarm.luminal.luminous.lunar.luscious.lush.lushy.lusitanian.lustrous.lydian.lynchian.lyotardian.lyric.lyrical.macerated.machiavellian.macro.magical.magnanimous.magnetar.magnetic.magnetospheric.magnificent.magrittean.mahlerian.majestic.mallarmean.malleable.malthusian.malty.mandelan.manetesque.manifold.marbled.marshy.martial.martian.marvelous.marxian.maser.masked.masterful.matchless.matin.matissean.mature.matutinal.mauve.maverick.mawkish.maxwellian.mayan.meandering.mechanical.median.medicean.mega.mellifluous.mellow.melodic.mendelian.merciful.mercurial.merovingian.merry.meshed.meta.metamorphic.meteoric.meticulous.metternichian.mettlesome.michelangelesque.micro.microwave.midnight.mighty.mild.milled.miltonian.miltonic.minced.mindful.mineral.ming.mingusian.minoan.minty.miraculous.mired.miroesque.mirthful.mischievous.misty.mobile.modest.modular.molecular.molieresque.momentous.mondrianesque.monetian.monkish.mono.montane.moonless.moonlit.mordant.morning.mossy.motley.mottled.mouthwatering.mozartian.mughal.multiversal.munificent.murmuring.mushy.musical.mutable.mutant.mycenaean.mysterious.mystical.mythic.nabokovian.nameless.nano.nanoscale.napoleonic.narrowband.nascent.natty.neat.nebular.nebulous.nefarious.neptunian.nerudian.networked.neural.neutron.neutronic.newtonian.nietzschean.nifty.nimble.noble.nocturnal.nonchalant.nonpareil.noontide.norse.northward.nostalgic.notable.novel.nozickian.nuanced.nubian.nuclear.numinous.nutty.oaky.obdurate.oblique.observant.obstinate.obtuse.oceanic.ochre.odyssean.olden.olympian.omega.omni.onward.opaline.opportune.optical.optimistic.opulent.oracular.orbital.orbiting.orderly.original.ornate.orphic.orwellian.osirian.ostentatious.otherworldly.otiose.ottoman.outgoing.outspoken.outward.overcast.overclocked.ovidian.pacific.pagan.painstaking.palatial.pale.pallid.palpable.paradisal.paradoxical.parallel.paramount.parkerish.parsonian.parthian.passionate.pastoral.patched.pathless.patient.pavlovian.peaceable.peaceful.peachy.pearly.peaty.pebbly.peeled.peered.peerless.pelagic.pellucid.penetrating.pensive.peppered.peppery.peppy.perceptive.perennial.perfect.perfumed.perky.persian.persistent.perspicacious.persuasive.pert.pervasive.pessoan.petaled.petrarchan.phantom.pharaonic.phased.philosophical.phlegmatic.phoenician.photonic.photospheric.phrygian.picassoesque.pickled.pictish.picturesque.pillowy.pindaric.pinteresque.piping.piquant.pirandellian.pithy.pivotal.pixelated.placid.planckian.planetary.planetoid.plangent.plasmic.plathian.platinum.platonic.playful.pleasant.plentiful.pliant.plinky.plonky.plucky.plumed.plummy.plush.plushy.plutonian.plutonic.pneumatic.poached.poesque.poetic.poignant.poised.polished.polite.pollockian.poly.polygonal.polymer.polynesian.popean.popped.popular.portly.posh.positronic.posthuman.potent.pouncy.powdery.powerful.pragmatic.prancy.precise.precocious.precognitive.preeminent.premier.prescient.pressed.pressurized.prestigious.pretty.primeval.primordial.princely.printed.pristine.private.prized.prodigious.profane.proficient.profound.profuse.prokofievian.prolific.promethean.prompt.proper.prophetic.prosaic.prosperous.protean.proto.protostellar.proud.proustian.providential.prudent.psionic.puccinian.puckish.pudgy.puffed.pulled.pulsar.punctilious.punctual.pungent.punic.pure.purposeful.pushkinian.pynchonesque.pythagorean.quaint.quantum.quartered.quasar.questing.quick.quiescent.quiet.quintessential.quirky.quixotic.rabelaisian.racinian.radar.radiant.radio.rainwashed.rainy.rakish.rambunctious.raphaelesque.rapid.rapturous.rare.rational.ravelian.rawlsian.raytraced.ready.reasonable.rebooted.receptive.recondite.recursive.redolent.reduced.reedy.refined.reflective.refulgent.regal.relativistic.relaxed.reliable.remarkable.rembrandtesque.remote.rendered.renoiresque.renowned.replete.replicated.resilient.resinous.resolute.resourceful.respectful.resplendent.responsive.restful.restive.restless.reticent.retro.reverent.rhapsodic.rhodian.rhythmic.ricardian.rich.richelieuvian.riemannian.rigorous.rilkean.rimbaudian.rimed.ringed.ripe.ripening.rippling.risible.riverine.riveted.roaming.roaring.roasted.robed.robotic.robust.rolled.roly.roman.romanov.romantic.rompy.rooseveltian.roseate.rosy.rothkoesque.rousing.rousseauian.rowdy.royal.rubenesque.ruddy.runic.rushy.russet.rustic.sabine.sable.sacred.sagacious.sage.saintly.salient.saline.salingeresque.salted.salty.salubrious.samian.sandaled.sandy.sanguine.sapid.sapient.sapphic.sardonic.sarmatian.sartrean.sassy.satiny.saturnian.saturnine.saucy.savory.savvy.saxon.scalding.scarlet.schielesque.schillerian.schoenbergian.scholarly.schubertian.schumannesque.schumpeterian.scintillating.scorched.scorsesean.scrappy.scruffy.scrupulous.scythian.seaborne.seamless.seared.seasonal.seaward.secure.sedate.sedgy.sedimentary.sedulous.seemly.seismic.selenic.selfless.sensible.sensitive.sentient.sentimental.seraphic.sere.serene.seuratian.shaded.shadowed.shadowy.shaggy.shaken.shakespearean.shamanic.shannonian.sharded.sharp.shaved.shavian.shelleyan.shielded.shimmering.shiny.shoreless.shostakovian.shrewd.shucked.sibelian.sibilant.sibylline.sicilian.sidereal.sienna.sifted.sigma.silicon.silken.silky.silly.silty.silver.silvered.simmering.simulated.sincere.singed.singing.singular.sinuous.sisyphean.sizzling.skeptical.skillful.skinnerian.skittish.skyward.sleek.sleepless.sleepy.slender.sliced.slick.slipstreamed.slow.sly.smart.smashy.smithian.smoked.smoky.smoldering.smooth.snappy.snazzy.snoozy.snowy.snug.snuggly.soaring.sociable.socratic.sodden.soft.sogdian.solar.solarpunk.solemn.solid.somnolent.sonar.song.sonic.sonorous.sooty.soporific.soulful.sound.soundless.sour.southward.sovereign.spaceborne.spacefaring.spacious.sparkling.sparkly.spartan.special.speckled.spectacular.spectral.speedy.spellbound.spiced.spicy.spielbergian.spiffy.spinozan.spirited.splashy.splendid.split.sploshy.spontaneous.spooky.sporty.spotless.spotted.sprightly.sproingy.spry.spun.spunky.squally.squashy.squelchy.squiggly.squishy.staid.stainless.stalwart.starborn.starfaring.starless.starlit.stasisbound.stately.steadfast.steady.steaming.steampunk.steely.steeped.steinbeckian.stellar.stellarborn.sticky.stirred.stirring.stoic.stoical.stolid.stompy.stoppardian.storied.stormy.stout.strained.stratospheric.straussian.stravinskian.streaky.stretched.striking.strindbergian.striped.strong.stuart.stubby.studious.stunning.sturdy.stygian.suave.subatomic.sublime.suborbital.subsonic.substantial.subtle.succinct.succulent.sudsy.sugared.sugary.sumerian.summery.sunless.sunlit.sunny.sunward.superb.supergalactic.superlative.superluminal.supersonic.supple.supreme.sure.surreptitious.svelte.swanky.sweeping.sweet.swift.swiftian.swirled.swooshy.sylvan.sympathetic.synaptic.synchronous.synthetic.syrupy.tableside.tachyonic.taciturn.talented.talleyrandian.tame.tang.tangy.tarantinoesque.tarkovskian.tart.tasteful.tattered.taut.tawny.tectonic.telekinetic.telepathic.temperate.tempered.temporal.tenacious.tender.tennysonian.tenuous.tepid.tera.terran.terrific.terse.textured.thackerayan.thankful.thawed.theban.thessalian.theta.thorny.thorough.thoughtful.thracian.threadbare.thriving.thundery.tidal.tidy.timeless.timely.timeworn.tinkly.tiny.tipsy.tireless.titanesque.titanian.titanic.titanium.titianesque.toasted.toasty.tocharian.tokenized.tolerant.tolkienesque.tolstoyan.tonic.tonky.toothsome.torched.totemic.tough.towering.trackless.tranquil.transcendent.transhuman.treacly.treasured.tremendous.tremulous.trenchant.tricky.trim.triumphant.trojan.trollopian.truculent.true.truffautian.truffled.trusty.truthful.tudor.turbo.turingian.turneresque.twangy.twilight.twilit.twinkling.twinkly.ubiquitous.ultra.ultrasonic.ultraviolet.umami.umber.unassuming.unbounded.uncanny.uncorked.unctuous.undaunted.underworldly.undocked.undying.unearthly.unerring.unflappable.unique.unknown.unruffled.upbeat.upgraded.upright.upstanding.upward.uranian.urbane.utopian.vacuous.valeryan.valiant.valorous.vandal.vangoghian.vast.veblenian.vectorized.vedic.vehement.veiled.velazquezian.velvet.velvety.venerable.venturous.venusian.veracious.verbose.verdant.verdian.verdurous.verlainian.vermeerian.vermilion.vernal.verneian.versatile.vesper.vespertine.vibrant.victorian.vigilant.vigorous.vintage.violet.virgilian.virtual.virtuous.visceral.vital.vivacious.vivid.vocal.voidborn.voidward.volcanic.voltairean.voluble.vonnegutian.voracious.voxel.vroomy.wacky.wagnerian.wakeful.waking.wan.wandering.warholian.warm.warped.wary.washingtonian.wayward.wealthy.weathered.weberian.welcome.welded.wellesian.wellsian.westward.whacky.whimsical.whimsy.whipped.whisked.whispering.whistlerian.whitmanesque.whole.wholesome.whooshy.wide.wiggly.wild.wildean.willowy.wilsonian.wily.windswept.windy.winged.winning.winsome.wintry.wired.wireframe.wireless.wise.wishful.wispy.wistful.wittgensteinian.witty.wobbly.wodehousian.wondrous.wonky.wooded.woody.woolly.woozy.wordless.wordsworthian.wormholed.worthy.wraithlike.wreathed.wriggly.wry.xenial.xeno.yanky.yearning.yeasty.yeatsian.young.youthful.yuletide.yummy.zany.zappy.zealous.zested.zestful.zesty.zeta.zingy.zippy.zodiacal.zonked.zonky.zoomy.zoroastrian`.split(`.`),ce=`abalone.absinthe.absyrtus.accelerator.achilles.acorn.acquerello.actuator.adobo.adonis.aeetes.aegis.aello.aeneas.aengus.aether.affogato.afterburner.agartha.agate.agni.agnolotti.aioli.airlock.ajax.aji.albatross.alder.ale.alecto.aleppo.alfheim.allegory.alliteration.almond.amaranth.amaretto.amaterasu.ambrosia.americano.amphiaraus.anago.anapest.ancho.anchovy.android.andromeda.anise.annal.annwn.ansible.antaeus.antenna.anthem.antigone.antimony.antistrophe.anubis.aoidos.aperol.aphelion.aphrodite.apogee.apollo.apple.apricot.aquamarine.aquavit.aqueduct.arabica.arachne.arawn.arbor.arborio.arc.arcadia.arch.archipelago.ares.argo.argon.argonaut.aria.ariadne.ark.arke.armagnac.array.arrow.artemis.arthur.artichoke.artifact.arugula.asgard.asgardia.ash.asparagus.aspen.assam.assonance.asteroid.astronaut.atalanta.athena.atlantis.atlas.atoll.atom.atropos.aubergine.augean.aura.aurora.avalon.avalonia.avocado.awning.axion.axle.azurite.bacchus.bagna.baharat.balder.ballad.balladeer.banana.banshee.baozi.bard.barge.barium.barley.barn.basalt.basil.basilisk.basmati.bastet.bastion.bay.bayleaf.beacon.beam.bean.bearing.beech.beetroot.behemoth.bellini.beowulf.bergamot.berth.beryl.beryllium.bifrost.biodome.birch.biscotti.bismuth.bisque.bit.bittern.blackberry.blast.blaster.blini.block.blodeuwedd.bloodstone.blossom.bluebell.blueberry.bolt.bomba.bonito.boom.borage.boson.botargo.bottarga.bouillon.boundary.bow.bower.bragi.bramble.bran.branch.brandy.branwen.breeze.brew.bridge.brigid.brioche.broccoli.brook.brulee.brunhild.brush.bucatini.buckler.buckwheat.buffer.bulkhead.bunting.burrata.burst.bus.busiris.butte.butter.buttercup.butterscotch.byte.cabbage.cabin.cacao.cachaca.cache.cacus.cadence.caesura.calamarata.calamari.calcite.caldera.calliope.calvados.calypso.cam.camellia.camelot.camembert.campari.canal.cannelloni.cannoli.canopy.cantaloupe.cantata.canticle.canvas.canyon.canzone.capacitor.capellini.caper.capon.cappelletti.cappuccino.capsule.caramel.cardamom.cardoon.carillon.carnaroli.carnation.carol.carrier.carrot.cascade.cashew.cassandra.cassis.castle.castor.cavatelli.caviar.cayenne.cedar.celaeno.celeriac.cell.centaur.cerberi.cerberus.cernunnos.ceryneian.cesium.ceto.ceylon.chaff.chaffinch.chai.chain.chalk.chamomile.champagne.chandra.channel.chanson.chanterelle.chard.charon.chartreuse.cheddar.cherry.chert.chervil.chestnut.chickweed.chicory.chili.chime.chimera.chimichurri.chimney.chip.chipotle.chirashi.chiron.chive.chocolate.chorale.chorizo.chorus.chronicle.chrysanthemum.chrysaor.chrysomallus.chutney.ciabatta.cibola.cider.cilantro.cinder.cinnamon.cipher.circe.circlet.circuit.cirque.cistern.citadel.citrine.citron.clementine.cliff.clio.clipper.cloak.clotho.cloud.clove.clover.cluster.coal.cobbler.cockaigne.cockpit.cocoa.coconut.codex.coffee.cog.cognac.coif.coil.col.colchis.collider.colony.combe.comet.compote.concerto.conchiglie.conduit.confit.console.consomme.consonance.continuum.contour.cookies.coordinate.core.coriander.cormorant.corona.coronet.cortado.corvette.cosmos.cottage.couplet.course.couscous.cove.cowl.cowslip.crab.craft.crag.cranberry.crane.crayon.cream.creme.crepe.cress.crocus.croissant.crosne.crown.cruiser.crumble.cryopod.cryosleep.crystal.cuchulainn.cuckoo.cucumber.cuirass.cumin.cupid.curlew.currant.current.curry.custard.cyborg.cycle.cyclops.cyclotron.cylinder.dactyl.daedalus.daemon.daffodil.dagda.dahlia.daiquiri.dais.daisy.dale.dam.dandelion.danu.daphne.darjeeling.dart.dashi.date.dawn.daydream.deck.deirdre.demeter.destroyer.dew.diadem.diary.dill.dimension.diode.diomedean.dionysus.ditalini.ditch.djinn.dock.doenjang.domain.donburi.donjon.door.doppio.dove.downlink.dreadnought.dream.drift.droid.dryad.dukkah.dulce.dumpling.dune.durga.dusk.dust.dyke.eagle.earlgrey.easel.echidna.echo.eclair.eclipse.ecliptic.edamame.eddy.edelweiss.edge.egret.einsteinium.elderflower.eldorado.electra.elegy.elm.elysium.ember.endive.enigma.enjambment.enkidu.envoi.eos.epigram.epistle.epode.erato.erinyes.eros.erymanthian.escargot.espresso.estuary.eumenides.euryale.eurybia.eurydice.eurytion.excalibur.exoplanet.fable.fafnir.falcon.fancy.farfalle.fate.feather.feldspar.fell.fence.fennel.fenrir.fenugreek.fermion.fern.fettuccine.fiddlehead.field.fig.finch.finn.fionn.firebird.firefly.fission.fizz.fjord.flake.flame.flare.flash.flicker.flint.flue.fluorite.flux.flywheel.focaccia.fog.folio.fondant.forge.fortress.foxglove.fragment.fraise.frame.frangipane.frappe.freesia.fregola.freighter.freya.frigate.frigg.frost.fudge.fugue.fumarole.furies.fusilli.fusion.gaia.galahad.galangal.galatea.galaxy.galette.galleon.gallium.ganache.ganesh.gannet.gantry.ganymede.garam.gardenia.garlic.garuda.gateway.gauntlet.gawain.gazebo.gear.gelato.gemelli.genmaicha.genoise.geranium.germ.germanium.geryon.geyser.ghazal.ghee.ghost.gilgamesh.ginger.gingko.ginnungagap.girder.glacier.glade.glaze.gleam.gleeman.glen.glimmer.glint.glitter.gloss.glow.gluon.gnocchi.gochujang.goldfinch.golem.goose.gooseberry.gorgon.gouda.governor.gradient.graeae.granary.granite.grapefruit.grappa.gratin.graviton.greave.grebe.gremolata.grenadine.grendel.grid.griffin.gruyere.guajillo.guava.gudrun.guinevere.gunkan.gwydion.gyoza.gyroscope.habanero.habitat.hades.hadron.haiku.hall.halloumi.halo.halva.hamachi.hangar.hanuman.harissa.harpies.harpy.harvest.hatch.hauberk.hawthorn.haze.hazel.hazelnut.heading.headland.heap.heart.hearth.heather.hecate.hedge.heimdall.hel.helheim.helios.helium.helix.helle.hellebore.helm.hemistich.hephaestus.hera.hermes.heron.hesperides.hestia.hibiscus.hippogriff.hirame.hive.hoisin.hojicha.hollandaise.hollow.holly.hologram.honey.honeycomb.honeysuckle.hood.hoopoe.horizon.horseradish.horus.hrothgar.hub.huckleberry.hue.huginn.hull.husk.hut.hyacinth.hydra.hydras.hylas.hymn.hyperborea.hypercube.hyperdrive.hyperion.hyperspace.hyssop.iamb.ibis.icarus.idas.idunn.idyll.igniter.igraine.ikura.indium.indra.inductor.infusion.injector.ink.inlet.inspiration.ion.iridium.iris.ishtar.isis.isolde.isotope.ivy.iwashi.izanagi.jackdaw.jackfruit.jalapeno.janus.jasmine.jason.jasper.javelin.jay.jet.jiaozi.jongleur.jonquil.jormungandr.jotunheim.journal.julep.jumpgate.juniper.juno.jupiter.kaffir.kale.kali.kampachi.karaage.karasumi.katsu.keel.keep.kefir.kelpie.kenning.kernel.kestrel.khinkali.kiln.kimchi.kingfisher.kinmedai.kirsch.kite.kitsune.kiwi.koan.kohlrabi.kombucha.koshihikari.kraken.krypton.kumquat.kvass.lachesis.lacquer.ladon.ladons.laertes.lager.lagoon.lake.lakshmi.lambic.lament.lance.lancelot.lander.lane.langoustine.lantern.lapis.lark.larkspur.lasagna.latte.laureate.laurel.lava.lavender.leaf.leda.leek.legend.lemon.lemonbalm.lemongrass.lemuria.lens.lentil.lepton.lernaean.lethe.letter.levee.lever.leviathan.lightyear.lily.lime.limerick.limoncello.linden.linguine.link.linnet.lir.lithium.lityerses.lobster.loch.lock.lodge.loki.loop.loquat.lotus.lovage.lugh.lullaby.lungo.luster.lychee.lynceus.lyonesse.lyricist.macadamia.macaron.macchiato.madai.madeleine.madrigal.magma.magnolia.magpie.mail.mainframe.maki.makrut.malachite.manannan.mango.manicotti.manor.manti.manticore.mantle.mantou.manuscript.maple.marble.marduk.margarita.marigold.marjoram.marquee.marrow.martini.marvel.marzipan.masago.masala.mascarpone.mast.matcha.matrix.mead.meadow.mech.medea.medusa.megaera.meleager.memoir.mentaiko.mercury.meringue.merlin.merlot.mesa.mesh.metaphor.meteor.meter.mezcal.mezzaluna.mica.midas.midgard.mill.mimir.mimosa.minerva.minotaur.minstrel.mint.minuet.miracle.mirin.mirror.miso.missive.mist.mjolnir.mocha.module.moira.mojito.molasses.mole.momo.monolith.moonbase.moonbeam.moonstone.moor.mopsus.mordred.morel.morgana.morpheus.morrigan.moss.mote.motet.mousse.mu.mulberry.muninn.muon.muse.muspelheim.mustard.myrtle.mystery.myth.nadir.naga.naiad.nanite.nanobot.narcissus.neapolitan.nebula.nectarine.needle.negroni.nemean.nemesis.neon.neptune.neptunium.nereid.nereus.nessus.nest.nestor.net.nettle.neutrino.nexus.niamh.nib.nibble.nibiru.niflheim.nightingale.nigiri.nike.niobe.njord.nocturne.node.nog.nori.norn.note.nougat.nova.nozzle.nuada.nutmeg.nyx.oak.oasis.oat.obelisk.oberon.obsidian.oceanid.oceanus.octave.octavo.ocypete.ode.odin.odysseus.oisin.okonomiyaki.olive.olympus.oni.onigiri.oolong.oracle.orange.orb.orbit.orbiter.orchard.orchid.oreads.orecchiette.oregano.orion.orpheus.orthros.orthrus.orzo.oscillator.osiris.osmium.osprey.ouroboros.outline.outpost.ouzo.oven.overture.owl.oyster.paccheri.packet.padron.page.palace.palette.palladium.palm.pan.pandan.pandora.panettone.pansotti.pansy.pantoum.papaya.pappardelle.paprika.papyrus.parable.paradox.parcae.parchment.parfait.parmesan.parsec.parsley.parsnip.particle.partridge.parvati.pasilla.passionfruit.pastel.pastis.patina.pavilion.pavlova.peach.peak.pear.pebble.pecan.pegasi.pegasus.pekoe.peleus.pelican.pelmeni.pen.pencil.penelope.penne.peony.pepper.peppermint.percival.peregrine.pergola.peridot.perigee.perihelion.perry.persephone.perseus.persillade.persimmon.pesto.petal.petrel.phase.pheasant.phoenix.pholus.phorcys.photon.phrixus.pickle.pierogi.pigment.pimento.pine.pineapple.ping.pinot.pipe.pipit.piquillo.pisco.pistachio.piston.pith.plane.plasma.plate.plover.plum.plume.pluto.plutonium.poblano.pod.podarge.poet.polenta.pollux.polyphemus.pomegranate.pomelo.pond.pontus.ponzu.pooka.pool.poplar.poppy.porcini.port.portal.porter.porthole.poseidon.positron.prairie.praline.prelude.primrose.prism.probe.profile.prometheus.prosciutto.prosecco.proteus.protocol.psalm.psyche.pudding.puffin.pulse.pumice.pumpkin.purslane.pwyll.pylon.pyrrhic.quadrant.quail.quark.quarto.quartz.quatrain.qubit.quetzalcoatl.queue.quill.quince.quinoa.quiver.radish.radium.radon.ragnarok.rain.rama.ramen.ramp.rampart.ramson.raspberry.ratatoskr.raven.ravioli.ray.reactor.realm.reaper.reed.reef.refrain.region.register.relay.relic.remnant.requiem.reservoir.residue.resistor.resonator.reverie.rhapsode.rhapsody.rhea.rhiannon.rhodium.rhododendron.rhubarb.rhyme.ricotta.riddle.ridge.riesling.rigatoni.rim.ring.risotto.ristretto.river.roast.robin.robusta.roc.rocket.rod.romesco.rondeau.rooibos.rook.root.rose.rosemary.rosewater.roundel.rover.rowan.rubidium.rum.rune.saba.saffron.saga.saison.sake.salmoriglio.salsa.salsify.sambal.sambuca.samphire.sancerre.sandpiper.sangria.sanma.sansho.saraswati.sashimi.sasquatch.satellite.satyr.sauternes.savanna.sawara.sazerac.scaffold.scalar.scallop.scansion.scepter.schnapps.schooner.scop.scorzonera.scotchbonnet.scroll.sector.seed.sekhmet.selene.selenite.selenium.selkie.sencha.sensor.sequoia.serenade.serrano.servo.sesame.sestina.sextet.shack.shade.shadow.shaft.shale.shallot.shambhala.shard.shed.sheen.sherbet.sherry.shield.shimmer.ship.shishito.shiso.shiva.shoyu.shrub.shumai.shuttle.sibyl.sif.signal.sigurd.silhouette.silo.simile.simurgh.singularity.siren.sita.skadi.skald.skiff.skuld.skylark.slant.slate.sleipnir.sling.slipstream.sliver.sloop.sluice.smithy.smoke.snowdrop.socket.sofrito.sonata.sonnet.soot.sorbet.sorrel.souffle.soul.soy.spaceport.spaghetti.spark.sparkle.sparrow.spear.speck.specter.speculoos.spelt.sphere.sphinx.sphinxes.spindle.spinel.spiral.spire.spirit.splinter.spoke.spondee.spore.spring.spritz.spruce.sriracha.ssamjang.stack.stanza.starbase.starlight.starling.starport.starship.stasis.station.steam.stellarator.steppe.stheno.stork.stracciatella.strawberry.stream.strontium.strophe.strozzapreti.strut.stylus.stymphalian.styx.subspace.sumac.summit.sunbeam.sunstone.supernova.surge.surya.susanoo.sushi.svartalfheim.swallow.swan.swarm.sycamore.syleus.synchrotron.tabard.tachyon.tagliatelle.tahini.takoyaki.taliesin.tamari.tamarind.tangerine.tanka.tanker.tapenade.tapioca.tarako.taranis.tare.tarn.tarragon.tartarus.telamon.telemetry.teleporter.tellurium.temaki.tempura.tengu.tensor.tent.tequila.tercet.teriyaki.terminal.tern.terraform.tesseract.tethys.thalassa.thalia.thallium.thaumas.themis.theseus.thistle.thor.thorium.thoth.threshold.throne.throttle.thrush.thruster.thule.thunderbird.thyme.tiamat.tiara.tide.tint.tintagel.tiphys.tiramisu.tirnanog.tisane.tisiphone.titan.tobiko.toccata.toddy.toffee.tofu.tokamak.tomatillo.tomato.tome.tone.tonka.tonkatsu.tor.tortellini.torus.tourmaline.tower.trace.track.transducer.transistor.treacle.trellis.triolet.tristan.triton.trochee.trofie.trope.troubadour.trouvere.truffle.trunk.truss.tug.tulip.tundra.tungsten.turbine.turmeric.turquoise.turret.twinkle.typhon.tyr.udon.ulysses.unagi.uni.unicorn.uplink.uramaki.urania.uranium.urd.urfa.uther.vale.valhalla.valkyrie.valve.vanadium.vanaheim.vanilla.vapor.vareniki.varnish.varuna.vector.veil.vellum.vent.venus.verbena.verdandi.verge.verjus.vermouth.verse.vessel.vesta.vestige.vialone.viewport.villanelle.vishnu.vodka.volcano.volta.volume.vortex.vulcan.wall.walnut.waltz.warbler.warpgate.wasabi.wash.watercress.watermelon.wave.waypoint.web.weir.well.wendigo.wheat.whisky.whisper.wiglaf.willow.wimple.window.wisteria.wonder.wonton.woodcock.woodpecker.word.wormhole.wraith.wren.wyrm.wyvern.xenon.yacht.yakitori.yama.yarrow.yeti.yew.yggdrasil.yokai.yuzu.zaatar.zabaglione.zenith.zephyr.zeus.zinnia.zircon.zirconium.ziti.zone.zucchini`.split(`.`);se.length*ce.length;var _=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`];function le(e){return typeof e==`string`&&_.includes(e)}o(`agent-bridge`);var ue=`agent: name already in use`,v=o(`cone-memory-budget`),de=4e3,fe=2e3,pe=1.25,me=g.memoryPath,he=`/sessions/index.json`,ge=4096,_e=/^## Auto-extracted/m,ve=`Consolidate the auto-extracted memory bullets below into a single tighter set of durable memories.
139
-
140
- Rules:
141
- - Output ONLY a single \`## Auto-extracted (consolidated)\` heading followed by markdown bullets.
142
- - One fact per bullet. Drop duplicates and superseded facts. Keep the most recent / specific phrasing.
143
- - Preserve concrete identifiers (file paths, URLs, IDs, names) verbatim.
144
- - Be terse. Aim well under the original size.
145
- - Do NOT add preamble, commentary, or any heading other than the single consolidated one.`;function y(e){return Math.round(de+fe*Math.log2((Number.isFinite(e)&&e>=0?e:0)+2))}function ye(e){let t=_e.exec(e);if(!t)return{header:e,autoExtracted:``};let n=t.index;return{header:e.slice(0,n),autoExtracted:e.slice(n)}}async function b(e){try{let t=await e.readFile(he,{encoding:`utf-8`}),n=typeof t==`string`?t:new TextDecoder().decode(t),r=JSON.parse(n);return Array.isArray(r)?r.length:0}catch{return 0}}async function be(e){let{header:t,autoExtracted:n}=ye(e.currentContent);if(!n.trim())return e.currentContent;let r=`You are a memory consolidation assistant. You are given a markdown file's "auto-extracted" section — a list of memory bullets accumulated across sessions of an AI coding assistant. Your job is to rewrite that section as a tighter, deduplicated set of durable memories that fits well within ${e.budget} characters.
146
-
147
- <auto-extracted>
148
- ${n}
149
- </auto-extracted>`,i={role:`user`,content:[{type:`text`,text:ve}],timestamp:Date.now()},o=await a(e.model,{systemPrompt:r,messages:[i]},{apiKey:e.apiKey,maxTokens:ge,headers:e.headers,signal:e.signal});if(o.stopReason===`error`)throw Error(`Restructure call failed: ${o.errorMessage||`Unknown error`}`);let s=o.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
150
- `).trim();if(!s)throw Error(`Restructure call returned empty content`);return`${t}${t.length===0||t.endsWith(`
151
- `)?``:`
152
- `}${s}\n`}async function xe(e){if(!e.model||!e.apiKey)return{restructured:!1,reason:`no-llm`};let t=e.memoryPath??me,n=``;try{let r=await e.vfs.readFile(t,{encoding:`utf-8`});n=typeof r==`string`?r:new TextDecoder().decode(r)}catch{return{restructured:!1,reason:`missing-file`}}let r=await b(e.vfs),i=y(r),a=i*pe;if(n.length<=a)return{restructured:!1,reason:`under-threshold`};v.info(`Cone memory over threshold — restructuring`,{size:n.length,budget:i,threshold:a,sessionCount:r});try{let r=await be({currentContent:n,budget:i,model:e.model,apiKey:e.apiKey,headers:e.headers,signal:e.signal});return await e.vfs.writeFile(t,r),v.info(`Cone memory restructured`,{before:n.length,after:r.length}),{restructured:!0}}catch(e){return v.warn(`Cone memory restructure failed — leaving appended content in place`,{error:e instanceof Error?e.message:String(e)}),{restructured:!1,reason:`error`}}}var x=o(`agentic-memory`),Se=`/shared/MEMORY.md`,Ce=1200,we=e=>[e.memoryPath],Te=e=>[`/sessions/`,`/shared/`,...oe(e)],Ee=`awk.cat.cp.cut.date.diff.du.echo.file.find.grep.head.jq.ls.mkdir.mount.mv.nl.od.printf.readlink.sed.sort.stat.tail.touch.tr.uniq.upskill.wc.xxd`.split(`.`),De=new Set([`writablePaths`,`visiblePaths`,`allowedCommands`]),Oe=new Set([`model`,`timeoutSeconds`,`thinkingLevel`]),ke=`medium`,S=3e4;function C(e){return e===`cone`?`memory-curator`:`memory-curator-${e}`}function w(e){let t=C(e);return Ae.test(t)?t:C(p)}var Ae=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/;function T(e){return`/scoops/agent-${w(e)}`}var E=T(p);function je(e){return h({parentJid:null,folder:e?.folder??`cone`})}function D(e,t){if(t.root===g.root)return e;if(e===g.memoryPath)return t.memoryPath;if(e===`/workspace/skills`||e.startsWith(`/workspace/skills/`))return e;let n=`${g.root}/`;return e===g.root?t.root:e.startsWith(n)?`${t.root}/${e.slice(n.length)}`:e}function Me(e,t){let n=`${m}/`,r=e=>e.some(e=>n.startsWith(e.endsWith(`/`)?e:`${e}/`)),i=e.map(e=>D(e,t));return r(e)&&!r(i)&&i.push(n),i}async function Ne(e){try{if(e.signal?.aborted)return{ok:!1,reason:`aborted`,legacyFallbackSafe:!1};let t=je(e.cone),n=T(e.cone?.folder??`cone`),r=await Pe(e.vfs,t),i=F(e.sessionArchivePath);try{await Ue(e.vfs,t.memoryPath,e.sessionArchivePath)}catch(e){return{ok:!1,reason:`snapshot: ${I(e)}`,legacyFallbackSafe:!0}}let a=Ge(r,Ke(qe(r.promptTemplate,{MEMORY_PATH:i,SESSION_ARCHIVE_PATH:e.sessionArchivePath,SESSION_COUNT:String(e.sessionCount),BUDGET_CHARS:String(y(e.sessionCount)),SCRATCH_DIR:n,TODAY:e.today??new Date().toISOString().slice(0,10)}),n),e.sessionArchivePath,t,e.cone);e.signal&&(a.signal=e.signal);let o=await Je(Promise.resolve().then(()=>e.spawn(a)),r.timeoutSeconds*1e3+S,e.signal);if(o.type===`timeout`)return x.warn(`Agentic memory wait timed out past the in-run bound + grace`,{timeoutSeconds:r.timeoutSeconds,graceMs:S}),{ok:!1,reason:`timeout`,legacyFallbackSafe:!1};if(o.type===`aborted`)return{ok:!1,reason:`aborted`,legacyFallbackSafe:!1};if(o.type===`error`)return{ok:!1,reason:I(o.error),legacyFallbackSafe:!0};if(o.result.exitCode!==0){let e=(o.result.finalText??``).startsWith(ue);return{ok:!1,reason:o.result.finalText||`exit-${o.result.exitCode}`,legacyFallbackSafe:!e}}return{ok:!0,report:o.result.finalText}}catch(e){return x.warn(`Agentic memory pass failed`,{error:I(e)}),{ok:!1,reason:I(e),legacyFallbackSafe:!1}}}async function Pe(e,t=g){try{let n=await e.readFile(Se,{encoding:`utf-8`});return O(typeof n==`string`?n:new TextDecoder().decode(n),t)}catch(e){return x.warn(`Could not load valid MEMORY.md; using built-in default`,{error:I(e)}),O(re,t)}}function O(e,t=g){let n=e.replace(/^\uFEFF/,``).replace(/\r\n?/g,`
153
- `).match(/^---\s*\n([\s\S]*?)\n---\s*\n([\s\S]*)$/);if(!n?.[2].trim())throw Error(`MEMORY.md requires frontmatter and a prompt`);let r=Ie(n[1]),i=A(r,`writablePaths`,we(t));if(i.length===0)throw Error(`writablePaths must not be empty`);j(i,`writablePaths`);let a=A(r,`visiblePaths`,Te(t));j(a,`visiblePaths`);let o=Ve(r.timeoutSeconds),s=Be(r.model,`model`);return{writablePaths:i.map(e=>D(e,t)),visiblePaths:Me(a,t),allowedCommands:[...new Set([...Ee,...A(r,`allowedCommands`,[])])],...s?{model:s}:{},thinkingLevel:Fe(r.thinkingLevel),timeoutSeconds:o,promptTemplate:n[2].trim()}}function Fe(e){if(e===void 0)return ke;if(typeof e!=`string`||!le(e))throw Error(`thinkingLevel must be one of ${_.join(`, `)}`);return e}function Ie(e){let t={},n=e.split(`
154
- `);for(let e=0;e<n.length;e+=1){let r=n[e];if(!r.trim()||r.trimStart().startsWith(`#`))continue;let i=r.match(/^([A-Za-z][A-Za-z0-9]*):\s*(.*)$/);if(!i)throw Error(`Invalid frontmatter line: ${r}`);let[,a,o]=i;if(De.has(a)){let r=Le(n,e,o);t[a]=r.value,e=r.lastIndex}else if(Oe.has(a)&&o.trim())t[a]=k(o);else throw Error(`Unsupported or empty frontmatter field: ${a}`)}return t}function Le(e,t,n){if(n.trim()){let e=n.trim();if(!e.startsWith(`[`)||!e.endsWith(`]`))throw Error(`Expected an array`);let r=e.slice(1,-1).trim();return{value:r?Re(r):[],lastIndex:t}}let r=[],i=t;for(let n=t+1;n<e.length;n+=1){let t=e[n].match(/^\s+-\s+(.+)$/);if(!t)break;r.push(k(ze(t[1]))),i=n}return{value:r,lastIndex:i}}function Re(e){let t=[],n=0,r;for(let i=0;i<e.length;i+=1){let a=e[i];a===`"`||a===`'`?r=r===a?void 0:r??a:a===`,`&&!r&&(t.push(k(e.slice(n,i))),n=i+1)}if(r)throw Error(`Unclosed quoted value`);return t.push(k(e.slice(n))),t}function ze(e){let t;for(let n=0;n<e.length;n+=1){let r=e[n];if(r===`"`||r===`'`)t=t===r?void 0:t??r;else if(r===`#`&&!t&&(n===0||/\s/.test(e[n-1])))return e.slice(0,n).trimEnd()}return e}function k(e){let t=e.trim();if(!t)throw Error(`Empty frontmatter value`);let n=t[0];if((n===`"`||n===`'`)&&t.at(-1)===n)return t.slice(1,-1);if(n===`"`||n===`'`)throw Error(`Unclosed quoted value`);return t}function A(e,t,n){let r=e[t];if(r===void 0)return[...n];if(!Array.isArray(r)||r.some(e=>!e))throw Error(`${t} is invalid`);return[...r]}function Be(e,t){if(e!==void 0){if(typeof e!=`string`||!e)throw Error(`${t} is invalid`);return e}}function Ve(e){if(e===void 0)return 600;if(typeof e!=`string`)throw Error(`timeoutSeconds is invalid`);let t=Number(e);if(!Number.isFinite(t)||t<=0)throw Error(`timeoutSeconds must be positive`);return Math.min(t,Ce)}function j(e,t){if(e.some(e=>!e.startsWith(`/`)||e.includes(`\0`)||t===`writablePaths`&&e===`/`))throw Error(`${t} must contain absolute VFS paths`)}function M(e){return`/sessions/.curated/${e.slice(e.lastIndexOf(`/`)+1)}`}function N(e){return`/sessions/.curation/${e.slice(e.lastIndexOf(`/`)+1)}`}function P(e){return`${N(e)}/base.md`}function F(e){return`${N(e)}/draft.md`}function He(e){return`${N(e)}/status.json`}async function Ue(e,t,n){let r=``;try{let n=await e.readFile(t,{encoding:`utf-8`});r=typeof n==`string`?n:new TextDecoder().decode(n)}catch{}await e.mkdir(N(n),{recursive:!0}),await e.writeFile(P(n),r),await e.writeFile(F(n),r)}function We(e,t,n){let r=e.map(e=>e===t?n:e);return r.includes(n)?r:[...r,n]}function Ge(e,t,n,r,i){let a=e.model===`parent`||e.model===`cone`,o=P(n),s=F(n);return{cwd:r.root,writablePaths:We(e.writablePaths,r.memoryPath,s),visiblePaths:[...e.visiblePaths,`${N(n)}/`],allowedCommands:e.allowedCommands,prompt:t,thinkingLevel:e.thinkingLevel,persistSession:!0,name:w(i?.folder??`cone`),...i?.jid?{parentJid:i.jid}:{},notifyOnComplete:!0,successReceiptPath:M(n),mergeOnSuccess:{targetPath:r.memoryPath,basePath:o,draftPath:s},outcomeReceiptPath:He(n),maxWallClockMs:e.timeoutSeconds*1e3,...!a&&e.model?{modelId:e.model}:{}}}function Ke(e,t){return t===E?e:e.replaceAll(E,t)}function qe(e,t){let n=e;for(let[e,r]of Object.entries(t))n=n.replaceAll(`{{${e}}}`,r);return n}function Je(e,t,n){return new Promise(r=>{let i=!1,a=e=>{i||(i=!0,clearTimeout(s),n?.removeEventListener(`abort`,o),r(e))},o=()=>a({type:`aborted`}),s=setTimeout(()=>a({type:`timeout`}),t);n?.addEventListener(`abort`,o,{once:!0}),e.then(e=>a({type:`result`,result:e}),e=>a({type:`error`,error:e}))})}function I(e){return e instanceof Error?e.message:String(e)}var L=`/sessions`,R=`/sessions/index.json`;async function z(e){try{let t=await e.readFile(R,{encoding:`utf-8`}),n=typeof t==`string`?t:new TextDecoder().decode(t),r=JSON.parse(n);return Array.isArray(r)?r:[]}catch{return[]}}function B(e){return`${L}/${e.filename}`}function V(e){let t=e,n=`Untitled`,r={},i=t.match(/^---\n([\s\S]*?)\n---\n+/);if(i){t=t.slice(i[0].length);let e=U(i[1],`cost`),a=U(i[1],`models`);e&&(r.cost=e),a&&(r.models=a);let o=i[1].match(/^cone:\s*(.+?)\s*$/m)?.[1];o&&(r.cone=o);let s=i[1].match(/^coneLabel:\s*(.+?)\s*$/m)?.[1];s&&(r.coneLabel=H(s)),/^memorySkipped:\s*true\s*$/m.test(i[1])&&(r.memorySkipped=!0);let c=i[1].match(/^title:\s*(.+?)\s*$/m);c&&(n=H(c[1]))}let a=t.match(/<!-- slicc:session-data\n([\s\S]*?)\n-->\n*/);if(a){try{let e=a[1].replace(/-- >/g,`-->`),t=JSON.parse(e);if(Array.isArray(t))return{title:n,messages:t,...r}}catch{}t=t.replace(/<!-- slicc:session-data\n[\s\S]*?\n-->\n*/,``)}return t=t.replace(/^#\s+[^\n]*\n+/,``),{title:n,messages:Ye(t),...r}}function H(e){let t=e.trim();if(!t.startsWith(`"`))return t;try{let e=JSON.parse(t);if(typeof e==`string`)return e}catch{}return t.replace(/^"|"$/g,``)}function U(e,t){let n=RegExp(`^${t}:\\s*(.+?)\\s*$`,`m`).exec(e)?.[1];if(n)try{return JSON.parse(n)}catch{return}}function Ye(e){let t=[],n=/^## (User|Assistant)\s*\n/gm,r=[],i;for(;(i=n.exec(e))!==null;)r.push({role:i[1]===`User`?`user`:`assistant`,start:i.index,bodyStart:i.index+i[0].length});for(let n=0;n<r.length;n++){let i=n+1<r.length?r[n+1].start:e.length,a=e.slice(r[n].bodyStart,i).trim();t.push({id:`frozen-${n}`,role:r[n].role,content:a,timestamp:0})}return t}function W(e){let t=``;for(let n of e){let e=n.role===`user`?`User`:`Assistant`,r=n.role===`user`?ne(n.content):n.content;if(t+=`## ${e}\n${r}\n\n`,n.attachments?.length&&(t+=`Attachments:\n${n.attachments.map(e=>`- ${s(e)}`).join(`
155
- `)}\n\n`),n.toolCalls)for(let e of n.toolCalls)t+=`### Tool: ${e.name}\nInput: ${JSON.stringify(e.input,null,2)}\nResult: ${e.result??``}\n\n`}return t}var Xe=e({PENDING_SESSION_ATTEMPT_LIMIT:()=>3,SESSIONS_INDEX_PATH:()=>R,curateFrozenSessionMemories:()=>et,enrichPendingSession:()=>Q,freezeConeSession:()=>$e,listPendingEnrichments:()=>Ot,markSnapshotUnavailable:()=>Kt,processPendingSessions:()=>kt,readSessionsIndex:()=>z}),G=o(`session-freezer`),Ze=4,K=2048,q=40,Qe=`${L}/attachments`;async function $e(e){let t=await gt(e.sessionStore,J(e));if(!t||t.messages.length<Ze)return G.info(`Skipping freeze: session below threshold or missing`,{messageCount:t?.messages.length??0}),null;let n=Y(t.messages),r=e.mode??`full`,i=r===`full`&&!!(e.apiKey&&e.model);!e.agenticMemorySpawn&&e.memory!==`skip`&&await rt(e,n,i);let a=await it(e,n,i)||St(t.messages);return await at(e,t,a,r,i?await tt(e,a):void 0,!!e.agenticMemorySpawn&&e.memory!==`skip`)}async function et(e,t){let n=Y(t.archive.messages),r;try{r=await Ne({spawn:e.agenticMemorySpawn,vfs:e.vfs,sessionArchivePath:B(t),sessionCount:await b(e.vfs),...e.cone?{cone:e.cone}:{}})}catch(e){r={ok:!1,reason:e instanceof Error?e.message:String(e),legacyFallbackSafe:!1}}if(r.ok){let n=await Vt(e.vfs,t.filename);return await Mt(e.vfs,t.filename),n?(delete t.memoryPending,G.info(`Agentic memory pass completed`,{filename:t.filename}),n):(G.info(`Agentic memory pass completed; index entry already gone`,{filename:t.filename}),null)}return await Ut(e.vfs,t.filename,r.reason),r.legacyFallbackSafe?(G.warn(`Agentic memory pass failed after finishing — falling back to legacy extraction`,{filename:t.filename,reason:r.reason}),await rt(e,n,!0),null):(G.warn(`Agentic memory pass unfinished — entry stays pending for boot catch-up`,{filename:t.filename,reason:r.reason,attemptLimit:3}),null)}async function tt(e,t){try{return nt(await(e.pickIcon??(await i(async()=>{let{pickLucideIcon:e}=await import(`./quick-llm-DSQHsD_0.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,28,29]))).pickLucideIcon)({subject:`"${t}" — an archived chat session`})??void 0)}catch(e){G.warn(`Icon pick failed (freeze still proceeds)`,{error:e instanceof Error?e.message:String(e)});return}}function nt(e){if(e)return l(e)?e:void 0}async function rt(e,r,i){if(!i){G.info(`LLM unavailable — skipping memory extraction; freezing anyway`);return}let a=``;try{a=await t({messages:r,instruction:n,model:e.model,apiKey:e.apiKey,maxTokens:K,headers:e.headers})}catch(e){G.warn(`Memory extraction call failed (freeze still proceeds)`,{error:e instanceof Error?e.message:String(e)});return}if(!a.trim()||a.trim()===`NONE`){G.info(`Memory extraction returned no durable memories`);return}try{await Et(e.vfs,ht(J(e)),a.trim(),`new-session`,{model:e.model,apiKey:e.apiKey,headers:e.headers}),G.info(`Memory extracted and appended on new-session`)}catch(e){G.warn(`Memory append failed`,{error:e instanceof Error?e.message:String(e)})}}async function it(e,n,i){if(!i)return``;try{return xt(await t({messages:n,instruction:r,model:e.model,apiKey:e.apiKey,maxTokens:q,headers:e.headers}))}catch(e){return G.warn(`Title generation call failed (using heuristic)`,{error:e instanceof Error?e.message:String(e)}),``}}async function at(e,t,n,r,i,a=!1){let o=new Date().toISOString(),s=crypto.randomUUID(),c=r===`quick`?`pending-${wt()}.md`:`${o.replace(/[:.]/g,`-`)}-${Ct(n)}.md`,l=ot(t.messages),u=J(e),d={cone:u,...u!==`cone`&&e.cone?.label?{coneLabel:e.cone.label}:{}},f={filename:c,sessionId:s,title:n,frozenAt:o,messageCount:t.messages.length,...l??{},...d,...i?{icon:i}:{},...r===`quick`?{pendingEnrichment:!0}:{},...a?{memoryPending:!0}:{},...e.memory===`skip`?{memorySkipped:!0}:{}};try{await X(e.vfs,L);let r=await lt(e.vfs,t.messages,c.replace(/\.md$/,``)),i={id:t.id,title:n,frozenAt:o,createdAt:t.createdAt,updatedAt:t.updatedAt,messageCount:t.messages.length,messages:r,...l??{},...d,...e.memory===`skip`?{memorySkipped:!0}:{}},a=bt(i);return await e.vfs.writeFile(`${L}/${c}`,a),await Dt(e.vfs,f),await e.vfs.flush(),G.info(`Cone session frozen`,{filename:c,title:n,cone:u,messageCount:t.messages.length}),{...f,archive:i}}catch(e){return G.warn(`Failed to write frozen session to VFS`,{error:e instanceof Error?e.message:String(e)}),null}}function ot(e){let t={total:0,input:0,output:0,cacheRead:0,cacheWrite:0},n=new Map,r=!1;for(let i of e){if(i.role!==`assistant`)continue;let{model:e,usage:a}=i;if(!e||!a||!ct(a))return null;let o=a.cost;r=!0,t.total+=o.total,t.input+=o.input,t.output+=o.output,t.cacheRead+=o.cacheRead,t.cacheWrite+=o.cacheWrite;let s=n.get(e)??{model:e,cost:0,turns:0,tokens:0};s.cost+=o.total,s.turns+=1,s.tokens+=a.input+a.output+a.cacheRead+a.cacheWrite,n.set(e,s)}return r?{cost:t,models:[...n.values()].sort((e,t)=>t.cost-e.cost)}:null}function st(e){return typeof e==`number`&&Number.isFinite(e)}function ct(e){let{cost:t}=e;return[e.input,e.output,e.cacheRead,e.cacheWrite].every(st)&&[t.input,t.output,t.cacheRead,t.cacheWrite,t.total].every(st)}async function lt(e,t,n){let r={vfs:e,archiveDir:`${Qe}/${n}`,copiedPaths:new Map,fileIndex:0},i=[];for(let e of t){if(!e.attachments?.some(ft)){i.push(e);continue}let t=[];for(let n of e.attachments)t.push(await ut(r,n));i.push({...e,attachments:t})}return i}async function ut(e,t){if(!ft(t))return t;let n=e.copiedPaths.get(t.path);if(n)return{...t,path:n};let r=await dt(e.vfs,t.path);if(!r)return mt(t);let i=t.name.replace(/[^A-Za-z0-9._-]+/g,`_`)||`attachment`,a=`${e.archiveDir}/${e.fileIndex++}-${i}`;return await X(e.vfs,e.archiveDir),await e.vfs.writeFile(a,r),e.copiedPaths.set(t.path,a),{...t,path:a}}async function dt(e,t){try{if(!await pt(e,t))return null;let n=await e.readFile(t,{encoding:`binary`});if(!(n instanceof Uint8Array))throw Error(`Expected binary attachment content at ${t}`);return n}catch{return null}}function ft(e){return typeof e.path==`string`&&e.path.startsWith(`/tmp/`)&&e.data===void 0&&e.text===void 0}async function pt(e,t){let n=t.split(`/`).slice(1);if(n.length<2||n[0]!==`tmp`||n.some(e=>!e||e===`.`||e===`..`))return!1;let r=`/`;for(let t=0;t<n.length;t+=1){let i=(await e.readDir(r)).find(e=>e.name===n[t]);if(!i)return!1;if(t===n.length-1)return i.type===`file`;if(i.type!==`directory`)return!1;r=r===`/`?`/${n[t]}`:`${r}/${n[t]}`}return!1}function mt(e){let{path:t,...n}=e;return{...n,error:e.error??`Archived attachment file is missing or unsafe to preserve.`}}function J(e){return e.cone?.folder||`cone`}function ht(e){return h({parentJid:null,folder:e}).memoryPath}async function gt(e,t){let n=f({folder:t});try{return await e.load(n)}catch(e){return G.warn(`Failed to load cone chat session`,{sessionId:n,error:e instanceof Error?e.message:String(e)}),null}}function Y(e){return e.map(e=>({role:e.role,content:[{type:`text`,text:e.content}],timestamp:e.timestamp}))}var _t=`<!-- slicc:session-data
156
- `,vt=`
157
- -->`;function yt(e){return e.map(e=>{let t={id:e.id,role:e.role,content:e.content,timestamp:e.timestamp};return e.attachments?.length&&(t.attachments=e.attachments),e.toolCalls?.length&&(t.toolCalls=e.toolCalls.map(e=>({id:e.id,name:e.name,input:e.input,...e.result===void 0?{}:{result:e.result},...e.isError?{isError:e.isError}:{}}))),e.source&&(t.source=e.source),e.channel&&(t.channel=e.channel),t})}function bt(e){let t=(e.cost?`cost: ${JSON.stringify(e.cost)}\n`:``)+(e.models?`models: ${JSON.stringify(e.models)}\n`:``),n=(e.cone?`cone: ${e.cone}\n`:``)+(e.coneLabel?`coneLabel: ${JSON.stringify(e.coneLabel)}\n`:``)+(e.memorySkipped?`memorySkipped: true
158
- `:``),r=`---\nid: ${e.id}\ntitle: ${JSON.stringify(e.title)}\nfrozenAt: ${e.frozenAt}\ncreatedAt: ${e.createdAt}\nupdatedAt: ${e.updatedAt}\nmessageCount: ${e.messageCount}\n`+t+n+`---
159
-
160
- `,i=`${_t}${JSON.stringify(yt(e.messages)).replace(/-->/g,`-- >`)}${vt}\n\n`,a=`# ${e.title}\n\n`;return r+i+a+W(e.messages)}function xt(e){let t=e.trim();return t=t.replace(/^["'`]+|["'`]+$/g,``).trim(),t=t.replace(/\s+/g,` `),t.length>80&&(t=t.slice(0,80).trimEnd()),t}function St(e){let t=e.find(e=>e.role===`user`);if(!t?.content)return`untitled-session`;let n=t.content.trim().replace(/\s+/g,` `);return n.length>60?`${n.slice(0,60)}…`:n||`untitled-session`}function Ct(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,48)||`session`}function wt(){return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`}function Tt(e){return e.startsWith(`pending-`)}async function X(e,t){try{await e.mkdir(t,{recursive:!0})}catch{}}async function Et(e,t,n,r,i){let a=t,o=``;try{let t=await e.readFile(a,{encoding:`utf-8`});o=typeof t==`string`?t:new TextDecoder().decode(t)}catch(t){if(!(t instanceof c)||t.code!==`ENOENT`)throw t;await X(e,a.slice(0,a.lastIndexOf(`/`)))}let s=`## Auto-extracted (${new Date().toISOString().slice(0,10)}, ${r})`,l=`${o.length===0||o.endsWith(`
161
- `)?``:`
162
- `}\n${s}\n\n${n}\n`;await e.writeFile(a,o+l);try{await xe({vfs:e,memoryPath:a,model:i?.model,apiKey:i?.apiKey,headers:i?.headers,signal:i?.signal})}catch(e){G.warn(`Cone memory budget step threw (append already committed)`,{error:e instanceof Error?e.message:String(e)})}}async function Dt(e,t){let n=[];try{let t=await e.readFile(R,{encoding:`utf-8`}),r=typeof t==`string`?t:new TextDecoder().decode(t),i=JSON.parse(r);Array.isArray(i)&&(n=i)}catch(e){if(!(e instanceof c)||e.code!==`ENOENT`)throw e}let r=[t,...n.filter(e=>e.filename!==t.filename)];await e.writeFile(R,JSON.stringify(r,null,2))}async function Ot(e){return(await z(e)).filter(e=>(e.pendingEnrichment===!0||e.memoryPending===!0)&&Z(e)<3)}async function kt(e){let t={attempted:0,completed:0};if(!e.model||!e.apiKey)return t;try{for(let t of await z(e.vfs))t.memoryPending===!0&&t.memoryFailed===void 0&&Z(t)>=3&&await Ut(e.vfs,t.filename,`catch-up retries exhausted (3)`);let n=await Ot(e.vfs);for(let r of n)try{let n=await Ht(e.vfs,r.filename);if(!n)continue;t.attempted+=1,await Q(e.vfs,n,{model:e.model,apiKey:e.apiKey,headers:e.headers})&&(t.completed+=1)}catch(e){G.warn(`Pending session catch-up attempt failed`,{filename:r.filename,error:e instanceof Error?e.message:String(e)})}}catch(e){G.warn(`Pending session catch-up failed`,{error:e instanceof Error?e.message:String(e)})}return t}function Z(e){let t=e.pendingAttemptCount;return typeof t==`number`&&Number.isInteger(t)&&t>0?t:0}async function Q(e,t,n){if(!t.pendingEnrichment&&!t.memoryPending)return null;let r=await Pt(e,t);if(r===null)return null;let i=Ft(t,r);if(i===null)return null;let a=t.memoryPending===!0&&n.skipMemory!==!0&&await jt(e,t),o=a||t.memorySkipped===!0?{...n,skipMemory:!0}:n,s=await It(t,i,o);if(s===null)return null;let c=await Nt(o,s.newTitle);await Lt(e,t,s.bullets,o);let l=await zt(e,t,r,s.newTitle,c,n.skipMemory===!0);return l&&a&&(await Mt(e,t.filename),await Wt(e,l.filename),await At(e,t.filename)),l}async function At(e,t){for(let n of[P(`/sessions/${t}`),F(`/sessions/${t}`)])try{await e.rm(n)}catch{}}async function jt(e,t){try{return await e.stat(M(`/sessions/${t.filename}`)),!0}catch{return!1}}async function Mt(e,t){try{await e.rm(M(`/sessions/${t}`))}catch{}}async function Nt(e,t){if(e.pickIcon)try{return await nt(await e.pickIcon({subject:`"${t}" — an archived chat session`})??void 0)}catch(e){G.warn(`Enrichment icon pick failed (continuing without icon)`,{error:e instanceof Error?e.message:String(e)});return}}async function Pt(e,t){try{let n=await e.readFile(B(t),{encoding:`utf-8`});return typeof n==`string`?n:new TextDecoder().decode(n)}catch(e){return e?.code===`ENOENT`?G.info(`Pending archive missing — treating as already enriched`,{filename:t.filename}):G.warn(`Failed to read pending archive (entry stays pending)`,{filename:t.filename,error:e instanceof Error?e.message:String(e)}),null}}function Ft(e,t){let n;try{n=V(t).messages}catch(t){return G.warn(`Failed to parse pending archive — leaving entry intact`,{filename:e.filename,error:t instanceof Error?t.message:String(t)}),null}return n.length===0?(G.info(`Pending archive has no messages — skipping enrichment`,{filename:e.filename}),null):Y(n)}async function It(e,i,a){let o=``;if(!a.skipMemory)try{o=await t({messages:i,instruction:n,model:a.model,apiKey:a.apiKey,maxTokens:K,headers:a.headers})}catch(t){return G.warn(`Enrichment memory call failed (entry stays pending)`,{filename:e.filename,error:t instanceof Error?t.message:String(t)}),null}let s=``;try{s=xt(await t({messages:i,instruction:r,model:a.model,apiKey:a.apiKey,maxTokens:q,headers:a.headers}))}catch(t){return G.warn(`Enrichment title call failed (entry stays pending)`,{filename:e.filename,error:t instanceof Error?t.message:String(t)}),null}return s?{bullets:o,newTitle:s}:(G.info(`Enrichment title call returned empty — entry stays pending`,{filename:e.filename}),null)}async function Lt(e,t,n,r){let i=n.trim();if(!(!i||i===`NONE`))try{await Et(e,ht(t.cone||`cone`),i,`pending-enrichment`,{model:r.model,apiKey:r.apiKey,headers:r.headers})}catch(e){G.warn(`Enrichment memory append failed (continuing with title rewrite)`,{filename:t.filename,error:e instanceof Error?e.message:String(e)})}}function Rt(e,t,n,r,i){let a=r??e.icon;return{filename:t,title:n,frozenAt:e.frozenAt,messageCount:e.messageCount,...e.cost?{cost:e.cost}:{},...e.models?{models:e.models}:{},...e.cone?{cone:e.cone}:{},...e.coneLabel?{coneLabel:e.coneLabel}:{},...e.sessionId?{sessionId:e.sessionId}:{},...a?{icon:a}:{},...e.completeSnapshotUnavailable?{completeSnapshotUnavailable:!0}:{},...i&&e.memoryPending?{memoryPending:!0}:{},...e.memorySkipped?{memorySkipped:!0}:{}}}async function zt(e,t,n,r,i,a=!1){let o=B(t),s=Tt(t.filename),c=s?r:t.title,l=s?`${t.frozenAt.replace(/[:.]/g,`-`)}-${Ct(r)}.md`:t.filename,u=`${L}/${l}`;if(s)try{await X(e,L),await e.writeFile(u,Bt(n,c))}catch(e){return G.warn(`Enrichment write failed (entry stays pending)`,{filename:t.filename,error:e instanceof Error?e.message:String(e)}),null}let d=Rt(t,l,c,i,a);try{await Gt(e,t.filename,d)}catch(e){return G.warn(`Enrichment index update failed (entry may stay pending)`,{filename:t.filename,error:e instanceof Error?e.message:String(e)}),null}if(u!==o)try{await e.rm(o)}catch(e){G.info(`Stale pending archive cleanup failed (harmless)`,{oldPath:o,error:e instanceof Error?e.message:String(e)})}try{await e.flush()}catch{}return G.info(`Pending session enriched`,{oldFilename:t.filename,newFilename:l,title:c}),d}function Bt(e,t){let n=e.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);if(!n)return e;let r=n[1].replace(/^title:\s*.+$/m,`title: ${JSON.stringify(t)}`),i=n[2];return i=i.replace(/^#\s+[^\n]*$/m,`# ${t}`),`---\n${r}\n---\n${i}`}var $=Promise.resolve();async function Vt(e,t){let n=null,r=async()=>{let r=await z(e),i=r.findIndex(e=>e.filename===t);if(i===-1)return;let{memoryPending:a,pendingEnrichment:o,pendingAttemptCount:s,memoryFailed:c,...l}=r[i],u={...l,memoryCuratedAt:new Date().toISOString()},d=r.slice();d[i]=u,await e.writeFile(R,JSON.stringify(d,null,2)),await e.flush(),n=u},i=$.then(r,r);$=i.then(()=>void 0,()=>void 0);try{await i}catch(e){G.warn(`Failed to clear agentic memory pending marker`,{filename:t,error:e instanceof Error?e.message:String(e)})}return n}async function Ht(e,t){let n=null,r=async()=>{let r=await z(e),i=r.findIndex(e=>e.filename===t);if(i===-1)return;let a=r[i];if(!a.pendingEnrichment&&!a.memoryPending)return;let o=Z(a);if(o>=3)return;n={...a,pendingAttemptCount:o+1};let s=r.slice();s[i]=n,await e.writeFile(R,JSON.stringify(s,null,2)),await e.flush()},i=$.then(r,r);return $=i.then(()=>void 0,()=>void 0),await i,n}async function Ut(e,t,n){let r=async()=>{let r=await z(e),i=r.findIndex(e=>e.filename===t);if(i===-1)return;let a=r.slice();a[i]={...r[i],memoryFailed:n.slice(0,300)},await e.writeFile(R,JSON.stringify(a,null,2)),await e.flush()},i=$.then(r,r);$=i.then(()=>void 0,()=>void 0);try{await i}catch(e){G.warn(`Failed to record curator failure in sessions index`,{filename:t,error:e instanceof Error?e.message:String(e)})}}async function Wt(e,t){let n=async()=>{let n=await z(e),r=n.findIndex(e=>e.filename===t);if(r===-1)return;let{memoryFailed:i,...a}=n[r],o=n.slice();o[r]={...a,memoryCuratedAt:new Date().toISOString()},await e.writeFile(R,JSON.stringify(o,null,2)),await e.flush()},r=$.then(n,n);$=r.then(()=>void 0,()=>void 0);try{await r}catch(e){G.warn(`Failed to record curator completion in sessions index`,{filename:t,error:e instanceof Error?e.message:String(e)})}}async function Gt(e,t,n){let r=async()=>{let r=[];try{let t=await e.readFile(R,{encoding:`utf-8`}),n=typeof t==`string`?t:new TextDecoder().decode(t),i=JSON.parse(n);Array.isArray(i)&&(r=i)}catch(e){if(!(e instanceof c)||e.code!==`ENOENT`)throw e}let i=r.findIndex(e=>e.filename===t),a;i===-1?a=[n,...r.filter(e=>e.filename!==n.filename)]:(a=r.slice(),a[i]=n,a=a.filter((e,t)=>t===i||e.filename!==n.filename)),await e.writeFile(R,JSON.stringify(a,null,2))},i=$.then(r,r);return $=i.then(()=>void 0,()=>void 0),i}async function Kt(e,t){let n=async()=>{let n=[];try{let t=await e.readFile(R,{encoding:`utf-8`}),r=typeof t==`string`?t:new TextDecoder().decode(t),i=JSON.parse(r);Array.isArray(i)&&(n=i)}catch(e){if(!(e instanceof c)||e.code!==`ENOENT`)throw e;return}if(!n.find(e=>e.filename===t))return;let r=n.map(e=>e.filename===t?{...e,completeSnapshotUnavailable:!0}:e);await e.writeFile(R,JSON.stringify(r,null,2))},r=$.then(n,n);return $=r.then(()=>void 0,()=>void 0),r}export{kt as a,R as c,z as d,g as f,Kt as i,B as l,Q as n,Xe as o,ae as p,$e as r,W as s,et as t,V as u};