claude-code-best 2.8.2 → 2.8.3

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 (443) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/{AddWorkspaceDirectory-BCCbaWoh.js → AddWorkspaceDirectory-CM5PYqoF.js} +1 -1
  3. package/dist/chunks/{App-BIAYUFvT.js → App-BLLQEMkd.js} +1 -1
  4. package/dist/chunks/ApproveApiKey-AMXQPmfE.js +1 -0
  5. package/dist/chunks/{ApproveApiKey-DRARgWX3.js → ApproveApiKey-DrflOSA-.js} +1 -1
  6. package/dist/chunks/{AssistantSessionChooser-eUrEGDlX.js → AssistantSessionChooser-SlRne98s.js} +1 -1
  7. package/dist/chunks/BackgroundTasksDialog-Cciww_FF.js +2 -0
  8. package/dist/chunks/{BypassPermissionsModeDialog-8z7R5EpU.js → BypassPermissionsModeDialog-HaciDdx0.js} +1 -1
  9. package/dist/chunks/{ClaudeInChromeOnboarding-B7mDm5Hb.js → ClaudeInChromeOnboarding-EA3k_q2M.js} +1 -1
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-C-T8G8O7.js +1 -0
  11. package/dist/chunks/{ClaudeMdExternalIncludesDialog-DE9dpWtg.js → ClaudeMdExternalIncludesDialog-xBclyqKk.js} +1 -1
  12. package/dist/chunks/ConsoleOAuthFlow-BTN62PKj.js +1 -0
  13. package/dist/chunks/{DesktopHandoff-Ce0nE7D6.js → DesktopHandoff-BhY_F3Ob.js} +1 -1
  14. package/dist/chunks/{DevChannelsDialog-mt0lA5wR.js → DevChannelsDialog-DU5komVT.js} +1 -1
  15. package/dist/chunks/DiffDialog-D_-znREV.js +3 -0
  16. package/dist/chunks/Doctor-BhrEYzPO.js +3 -0
  17. package/dist/chunks/Doctor-CjnUU1CY.js +1 -0
  18. package/dist/chunks/{ExitFlow-C3BGvwv-.js → ExitFlow-cRfxceuS.js} +2 -2
  19. package/dist/chunks/{Feedback-BtZb1A8b.js → Feedback-BMv8Kt05.js} +2 -2
  20. package/dist/chunks/Grove-CRAZGlvf.js +1 -0
  21. package/dist/chunks/{Grove-HpMLktXp.js → Grove-CjfR7Acp.js} +1 -1
  22. package/dist/chunks/{HybridTransport-COk7jAC7.js → HybridTransport-D32dn9xc.js} +1 -1
  23. package/dist/chunks/{ITermBackend-BlwyeN8U.js → ITermBackend-BxjzkptA.js} +1 -1
  24. package/dist/chunks/{InvalidConfigDialog-QVIRDXwA.js → InvalidConfigDialog-CnCOCqMT.js} +1 -1
  25. package/dist/chunks/{InvalidSettingsDialog-CZRZm0oa.js → InvalidSettingsDialog-CLOgpfR2.js} +1 -1
  26. package/dist/chunks/MCPConnectionManager-BhbT4Sah.js +1 -0
  27. package/dist/chunks/{McpParsingWarnings-DWMO0bV6.js → McpParsingWarnings-B5X5HVnQ.js} +1 -1
  28. package/dist/chunks/MessageSelector-DLofsxam.js +3 -0
  29. package/dist/chunks/Messages-D1-i4MMT.js +11 -0
  30. package/dist/chunks/{Onboarding-CHcND5Tt.js → Onboarding-Co5P3gZs.js} +1 -1
  31. package/dist/chunks/{OverageCreditUpsell-CMBqZrnz.js → OverageCreditUpsell-DjgcfVt2.js} +1 -1
  32. package/dist/chunks/PluginSettings-NB-Wod-9.js +17 -0
  33. package/dist/chunks/{PromptInputHelpMenu-CAwbW7z2.js → PromptInputHelpMenu-BDI5IF1s.js} +1 -1
  34. package/dist/chunks/QueryEngine-B217mLel.js +1 -0
  35. package/dist/chunks/REPL-BfprHNDt.js +1 -0
  36. package/dist/chunks/{REPL-Dx3SPe95.js → REPL-DCm_BFr_.js} +36 -36
  37. package/dist/chunks/{RemoteCallout-CwI1mLQ9.js → RemoteCallout-dGnKRIDB.js} +1 -1
  38. package/dist/chunks/{RemoteSessionManager-BXMBhfQD.js → RemoteSessionManager-BidAIOqZ.js} +2 -2
  39. package/dist/chunks/ResumeConversation-SDRT6hO3.js +1 -0
  40. package/dist/chunks/{SSETransport-Co-0nMlR.js → SSETransport-BM2xz03M.js} +1 -1
  41. package/dist/chunks/SearchExtraToolsTool-DCSReOsq.js +1 -0
  42. package/dist/chunks/{SentryErrorBoundary-kEgE7qeH.js → SentryErrorBoundary-D5niZGEU.js} +1 -1
  43. package/dist/chunks/SentryErrorBoundary-DzwCuftg.js +1 -0
  44. package/dist/chunks/Settings-D3ds_WCz.js +2 -0
  45. package/dist/chunks/{TeleportProgress--n-u7MYY.js → TeleportProgress-Dg6HcEO9.js} +1 -1
  46. package/dist/chunks/{TeleportRepoMismatchDialog-CzQzdYb2.js → TeleportRepoMismatchDialog-BUKNU2jx.js} +1 -1
  47. package/dist/chunks/{TeleportResumeWrapper-CtANoO1Z.js → TeleportResumeWrapper-5FTzA9R_.js} +1 -1
  48. package/dist/chunks/{ThemePicker-kBt6obJb.js → ThemePicker-Bdm12PmJ.js} +1 -1
  49. package/dist/chunks/{TmuxBackend-Q5xdOkW4.js → TmuxBackend-CYx3Hdf1.js} +2 -2
  50. package/dist/chunks/{TrustDialog-CoCFqyRD.js → TrustDialog-DGKf4iwh.js} +1 -1
  51. package/dist/chunks/{ValidationErrorsList-CL42YlaS.js → ValidationErrorsList-BP7vG1uX.js} +1 -1
  52. package/dist/chunks/{WelcomeV2-B0d9sH1c.js → WelcomeV2-k_969SnB.js} +1 -1
  53. package/dist/chunks/{WindowsTerminalBackend-CLSeqqHh.js → WindowsTerminalBackend-K_zVZBSP.js} +2 -2
  54. package/dist/chunks/{add-dir-IrADCHV-.js → add-dir-DnfUkb1n.js} +1 -1
  55. package/dist/chunks/{agentDisplay-BUXpQhYh.js → agentDisplay-DT04Kqdm.js} +1 -1
  56. package/dist/chunks/{agents-Cx0f6suK.js → agents-ELZyUElQ.js} +7 -7
  57. package/dist/chunks/{agents-BqQtaTaM.js → agents-hh7Zcqm6.js} +1 -1
  58. package/dist/chunks/{ant-BUkS8Em4.js → ant-CuQC6xHS.js} +1 -1
  59. package/dist/chunks/api-BY3NFL4L.js +1 -0
  60. package/dist/chunks/{api-Cy1N7XAQ.js → api-C-KY7A3r.js} +1 -1
  61. package/dist/chunks/asciicast-BeEmDIKr.js +1 -0
  62. package/dist/chunks/{asciicast-C_1Pi99k.js → asciicast-C0fPsv7_.js} +1 -1
  63. package/dist/chunks/assistant-C669PK45.js +1 -0
  64. package/dist/chunks/{assistant-C3dP-BSJ.js → assistant-DbtrknMt.js} +1 -1
  65. package/dist/chunks/{assistant-BGzd9a5x.js → assistant-Z-xFHPiY.js} +1 -1
  66. package/dist/chunks/{auth-DVtMm7Hj.js → auth-Bo_eeRO9.js} +1 -1
  67. package/dist/chunks/auth-C-rD91K7.js +1 -0
  68. package/dist/chunks/{autoMode-ThlM20qr.js → autoMode-BhsFtU8_.js} +6 -6
  69. package/dist/chunks/{autonomy-B637YdCF.js → autonomy-B-d3Xamr.js} +1 -1
  70. package/dist/chunks/{autonomy-B_vxYZbV.js → autonomy-C5wE-5B8.js} +12 -12
  71. package/dist/chunks/{autonomyPanel-BM2VhTsn.js → autonomyPanel-CMy4Zs1a.js} +1 -1
  72. package/dist/chunks/backgroundHousekeeping-YAOGWoo4.js +17 -0
  73. package/dist/chunks/backgroundHousekeeping-xFmPDL7y.js +1 -0
  74. package/dist/chunks/{branch-BlH5WYNu.js → branch-DoV3sEJf.js} +2 -2
  75. package/dist/chunks/{bridge-QRFJRzVG.js → bridge-8RYx23zW.js} +2 -2
  76. package/dist/chunks/{bridgeConfig-Di9LziJ3.js → bridgeConfig-C8tQXEsd.js} +1 -1
  77. package/dist/chunks/bridgeConfig-D5awYlvd.js +1 -0
  78. package/dist/chunks/bridgeEnabled-0tZw2TlM.js +1 -0
  79. package/dist/chunks/{bridgeEnabled-z1fPRzzV.js → bridgeEnabled-B3KTIVe4.js} +1 -1
  80. package/dist/chunks/bridgeMain-DKkE8RYG.js +1 -0
  81. package/dist/chunks/bridgeMain-Ssp8HRcV.js +68 -0
  82. package/dist/chunks/{bridgeMessaging-BG8fNZac.js → bridgeMessaging-DGTm_wDk.js} +1 -1
  83. package/dist/chunks/{btw-DpeWZQbf.js → btw-Du0mHeiD.js} +1 -1
  84. package/dist/chunks/{buddy-Bni2g0Km.js → buddy-D04AYSW6.js} +1 -1
  85. package/dist/chunks/{bypassPermissionsKillswitch-7e56Rquc.js → bypassPermissionsKillswitch-CRYkShwu.js} +1 -1
  86. package/dist/chunks/caches-Byd8SjTZ.js +1 -0
  87. package/dist/chunks/{caches-CzEBsMvP.js → caches-DYf69-N9.js} +2 -2
  88. package/dist/chunks/{ccrClient-iR6zwGb1.js → ccrClient-CDrBxSox.js} +1 -1
  89. package/dist/chunks/changeDetector-CGzGs92S.js +1 -0
  90. package/dist/chunks/{channelNotification-CSmLgwtO.js → channelNotification-CtA9HHFW.js} +1 -1
  91. package/dist/chunks/channelNotification-DOvTvOGt.js +1 -0
  92. package/dist/chunks/{chrome-BO1vbvZ0.js → chrome-BHbT4cc4.js} +1 -1
  93. package/dist/chunks/clear-BGLxPs_B.js +1 -0
  94. package/dist/chunks/client-CtOmoNuQ.js +1 -0
  95. package/dist/chunks/color-MOZYZ1cM.js +1 -0
  96. package/dist/chunks/commands-B3XpQmEm.js +1 -0
  97. package/dist/chunks/{commitAttribution-Djh1ZpYH.js → commitAttribution-BTtCTr8c.js} +1 -1
  98. package/dist/chunks/commitAttribution-CXNK79GW.js +1 -0
  99. package/dist/chunks/compact-CMqxm2yG.js +3 -0
  100. package/dist/chunks/{companion-C-jfFhlz.js → companion-ChxkOPHB.js} +1 -1
  101. package/dist/chunks/{config-DwsIX0hc.js → config-cRyRIPI7.js} +1 -1
  102. package/dist/chunks/{config-CloXpblh.js → config-wvQYYbwU.js} +1 -1
  103. package/dist/chunks/{context-DdwMoH4j.js → context-7ds9guuJ.js} +1 -1
  104. package/dist/chunks/{context-noninteractive-BWbEqad6.js → context-noninteractive-CISZymIU.js} +2 -2
  105. package/dist/chunks/context-noninteractive-CwJBBF8h.js +1 -0
  106. package/dist/chunks/conversation-Bgsdn99n.js +1 -0
  107. package/dist/chunks/conversation-D30CU_jS.js +1 -0
  108. package/dist/chunks/{copy-tl-41wwU.js → copy-Dvz2Mge4.js} +2 -2
  109. package/dist/chunks/{createSSHSession-B_IyqOll.js → createSSHSession-Befx8LiM.js} +1 -1
  110. package/dist/chunks/createSession-Cp0KTjPL.js +1 -0
  111. package/dist/chunks/{createSession-Csaqw8kb.js → createSession-CsZGoika.js} +1 -1
  112. package/dist/chunks/{cronJitterConfig-2sHTXBLu.js → cronJitterConfig-Dfl7iZqE.js} +3 -3
  113. package/dist/chunks/{crossProjectResume-C1I0X__e.js → crossProjectResume-DK8nt_cn.js} +3 -3
  114. package/dist/chunks/{datadog-BzkFYNcv.js → datadog-2vPhbh6g.js} +1 -1
  115. package/dist/chunks/datadog-DLTYg-S2.js +1 -0
  116. package/dist/chunks/{desktop-oTXppB2O.js → desktop-DY9Nw2Fi.js} +1 -1
  117. package/dist/chunks/{diff-B23DUoT8.js → diff-Ci6rs6S6.js} +1 -1
  118. package/dist/chunks/{directoryCompletion-DqtWZsoW.js → directoryCompletion-DLxCFk_m.js} +1 -1
  119. package/dist/chunks/{doctor-o2MJvjAE.js → doctor-DBYGgS-y.js} +1 -1
  120. package/dist/chunks/{effort-B1X_S_oa.js → effort-Bi_t4J_o.js} +2 -2
  121. package/dist/chunks/{entry-BAXMpXJ0.js → entry-p_5l64_p.js} +4 -4
  122. package/dist/chunks/{envLessBridgeConfig-YNTOVEqU.js → envLessBridgeConfig-C_sqoGX6.js} +1 -1
  123. package/dist/chunks/envLessBridgeConfig-Cfbqwjew.js +1 -0
  124. package/dist/chunks/exit-Bc8L5oQT.js +1 -0
  125. package/dist/chunks/{export-CqbYdFmJ.js → export-kvnEu9Iw.js} +1 -1
  126. package/dist/chunks/{exportRenderer-DP_z8YD1.js → exportRenderer-DmpMgUiv.js} +1 -1
  127. package/dist/chunks/extra-usage-BnO6knuC.js +1 -0
  128. package/dist/chunks/{extra-usage-BQ5Z1wJb.js → extra-usage-CmP6V7HX.js} +1 -1
  129. package/dist/chunks/{extra-usage-core-B1oJoxYa.js → extra-usage-core-BqJClmf4.js} +1 -1
  130. package/dist/chunks/{extra-usage-noninteractive-BV_6cpdd.js → extra-usage-noninteractive-BWyPFx53.js} +1 -1
  131. package/dist/chunks/extraUsage-DgMspmL4.js +1 -0
  132. package/dist/chunks/extractMemories-uQJS_i6E.js +1 -0
  133. package/dist/chunks/fast-Bunl4ivM.js +1 -0
  134. package/dist/chunks/{fast-BJMGfO_S.js → fast-Dd2jZVF-.js} +1 -1
  135. package/dist/chunks/{feedback-O0Gushxg.js → feedback-8UeDx3Yc.js} +1 -1
  136. package/dist/chunks/{firstPartyEventLogger-0s2WJ6SR.js → firstPartyEventLogger-cKEuzfyR.js} +1 -1
  137. package/dist/chunks/{flushGate-CLjpgnG6.js → flushGate-B3upNVdV.js} +1 -1
  138. package/dist/chunks/{gates-C5y8P5t9.js → gates-lWoKqpJ1.js} +1 -1
  139. package/dist/chunks/gates-uo2owWkc.js +1 -0
  140. package/dist/chunks/{gemini-D6lfJRGH.js → gemini-DDSP4ArG.js} +1 -1
  141. package/dist/chunks/{generateRecap-AYujRzfu.js → generateRecap-DCBzHqag.js} +1 -1
  142. package/dist/chunks/{generateSessionName-CXg1uVLN.js → generateSessionName-Db5pZ3cL.js} +1 -1
  143. package/dist/chunks/{githubRepoPathMapping-CdjkMIX3.js → githubRepoPathMapping-v_U9b0Fe.js} +1 -1
  144. package/dist/chunks/{goal-BGr-SlcA.js → goal-EZCOCHZa.js} +3 -3
  145. package/dist/chunks/{grok-DxyRt4Jq.js → grok-H8K_fDKF.js} +1 -1
  146. package/dist/chunks/{growthbook-D93ZmHUL.js → growthbook-mMD0jkbu.js} +1 -1
  147. package/dist/chunks/{heapdump-DZz5qnZg.js → heapdump-CbVvtQuH.js} +1 -1
  148. package/dist/chunks/{help-C8HhaC70.js → help-Bq4jxCSJ.js} +1 -1
  149. package/dist/chunks/hooks-CVlFJfV0.js +1 -0
  150. package/dist/chunks/{hooks-De2yBPig.js → hooks-DbKUS0fN.js} +2 -2
  151. package/dist/chunks/{hostAdapter-CZdJUeS1.js → hostAdapter-BhVpIn1Y.js} +1 -1
  152. package/dist/chunks/{ide-GnSLasRI.js → ide-DZJheXyl.js} +2 -2
  153. package/dist/chunks/{inboundAttachments-C8y3D5mp.js → inboundAttachments-B9NxWIDx.js} +1 -1
  154. package/dist/chunks/inboundAttachments-_vhgWPEL.js +1 -0
  155. package/dist/chunks/initReplBridge-BCIaWf78.js +1 -0
  156. package/dist/chunks/{insights-23tyPxXV.js → insights-D1BFvhw_.js} +68 -68
  157. package/dist/chunks/{install-BXi4d63r.js → install-D_xm-9s1.js} +1 -1
  158. package/dist/chunks/{install-github-app-D2X7BgzJ.js → install-github-app-CUEACXdr.js} +2 -2
  159. package/dist/chunks/{install-slack-app-_J1t0kSP.js → install-slack-app-DGV6l9wy.js} +1 -1
  160. package/dist/chunks/{instrumentation-C9WDRy-K.js → instrumentation-CEfWNakt.js} +3 -3
  161. package/dist/chunks/{job-DXX7dNN_.js → job-BeeAFieV.js} +1 -1
  162. package/dist/chunks/{keybindings-CChhkkE0.js → keybindings-CeYhuE5G.js} +2 -2
  163. package/dist/chunks/{lang-COIVItM_.js → lang-BmwAsgo1.js} +1 -1
  164. package/dist/chunks/{language-DzWvcLCu.js → language-BcWiv2lr.js} +1 -1
  165. package/dist/chunks/language-BnQye2Mx.js +1 -0
  166. package/dist/chunks/{launchAgentsPlatform-Du_WvKeU.js → launchAgentsPlatform-DqQzwcqV.js} +1 -1
  167. package/dist/chunks/{launchAutofixPr-CypNniKH.js → launchAutofixPr-XltBpICW.js} +3 -3
  168. package/dist/chunks/{launchLocalMemory-GkqB_Gcr.js → launchLocalMemory-CHSU4_or.js} +2 -2
  169. package/dist/chunks/{launchLocalVault-CBihJDzq.js → launchLocalVault-CnvCdQ1M.js} +3 -3
  170. package/dist/chunks/{launchMemoryStores-BkK0wwq0.js → launchMemoryStores-DD2duIDU.js} +1 -1
  171. package/dist/chunks/{launchOnboarding-BubTG5vY.js → launchOnboarding-JTKef_jU.js} +1 -1
  172. package/dist/chunks/{launchSchedule-CkV6Ai-0.js → launchSchedule-BVtfNQtS.js} +1 -1
  173. package/dist/chunks/{launchSkillStore-DIrFg_WZ.js → launchSkillStore-TisTmZ3O.js} +1 -1
  174. package/dist/chunks/{launchTeleport-DFrgN9sU.js → launchTeleport-BO_V6ggj.js} +3 -3
  175. package/dist/chunks/{launchVault-CIiNsg91.js → launchVault-Civro2KB.js} +1 -1
  176. package/dist/chunks/{loadAgentsDir-DC4jN6-f.js → loadAgentsDir-BfEZacjM.js} +740 -690
  177. package/dist/chunks/loadAgentsDir-rYxb2igq.js +1 -0
  178. package/dist/chunks/loadPluginHooks-Cniyh-tZ.js +1 -0
  179. package/dist/chunks/localSearch-C0J7ETJQ.js +1 -0
  180. package/dist/chunks/{localSearch-But4wyLg.js → localSearch-COJcqOWl.js} +1 -1
  181. package/dist/chunks/login-B4wjtpEU.js +1 -0
  182. package/dist/chunks/{login-ajsn1Sg7.js → login-SuUxFLIY.js} +1 -1
  183. package/dist/chunks/{logoV2Utils-CpeUvaOM.js → logoV2Utils-DvjpZkyF.js} +1 -1
  184. package/dist/chunks/logout-o16yNWNB.js +1 -0
  185. package/dist/chunks/{magicDocs-TF6U6QoB.js → magicDocs-BZBrH9zB.js} +2 -2
  186. package/dist/chunks/{main-bjQRqaUr.js → main-p9Tke3lb.js} +90 -63
  187. package/dist/chunks/{mappers-Bg-xtimK.js → mappers-BcXg_fI3.js} +1 -1
  188. package/dist/chunks/mcp-BFxLEf3X.js +1 -0
  189. package/dist/chunks/{mcp-i8lqdWTr.js → mcp-CIJL0PTq.js} +2 -2
  190. package/dist/chunks/mcp-DfuQ1MJu.js +6 -0
  191. package/dist/chunks/{mcpServer-CuqaXxiJ.js → mcpServer-D2kI_m2H.js} +1 -1
  192. package/dist/chunks/{mcpServer-Dr9UfcEd.js → mcpServer-DPk-oJOU.js} +1 -1
  193. package/dist/chunks/{memory-DVJxsbcO.js → memory-CJOtY_Uv.js} +1 -1
  194. package/dist/chunks/{mode-C9yWWppB.js → mode-DkpKiyTE.js} +1 -1
  195. package/dist/chunks/{model-Dq-13vaB.js → model-DZyzd39E.js} +1 -1
  196. package/dist/chunks/model-De0AGQ3F.js +1 -0
  197. package/dist/chunks/{onChangeAppState-Cc4zOnqx.js → onChangeAppState-CvtxqUDG.js} +1 -1
  198. package/dist/chunks/{openai-DMCGGZts.js → openai-B888nVou.js} +3 -3
  199. package/dist/chunks/{overageCreditGrant-CzkWDmsQ.js → overageCreditGrant-BOSyVk3U.js} +1 -1
  200. package/dist/chunks/{panelCall-D36EWzwF.js → panelCall-BVdu8oii.js} +1 -1
  201. package/dist/chunks/{passes-CPAwB9_F.js → passes-DeSsjipz.js} +1 -1
  202. package/dist/chunks/{path-BE28AJwZ.js → path-Cit7LKW-.js} +1 -1
  203. package/dist/chunks/{paths-CEAy4QCs.js → paths-nIHVpTn2.js} +3 -3
  204. package/dist/chunks/permissions-DGdr-wOj.js +3 -0
  205. package/dist/chunks/{pipeTransport-7auNUakO.js → pipeTransport-ClZYq1sd.js} +1 -1
  206. package/dist/chunks/{plan-pCEs76NM.js → plan-D9bnkDwv.js} +1 -1
  207. package/dist/chunks/{plugin-BSC-7wQh.js → plugin-BE0r1g1g.js} +1 -1
  208. package/dist/chunks/{pluginAutoupdate-Cre72Rtf.js → pluginAutoupdate-xyXksEJv.js} +1 -1
  209. package/dist/chunks/pluginBlocklist-Dd7XBe8U.js +1 -0
  210. package/dist/chunks/{pluginCliCommands-CTxmCPph.js → pluginCliCommands-8MJCk1nq.js} +1 -1
  211. package/dist/chunks/{pluginFlagging-C5EGcjZe.js → pluginFlagging-7zuXXBD5.js} +1 -1
  212. package/dist/chunks/pluginOperations-DFzbASMD.js +2 -0
  213. package/dist/chunks/{pluginStartupCheck-B3QqfRt6.js → pluginStartupCheck-BC5npqdw.js} +1 -1
  214. package/dist/chunks/pluginStartupCheck-C6IH0haF.js +1 -0
  215. package/dist/chunks/plugins-Bhc2pbAj.js +4 -0
  216. package/dist/chunks/policyLimits-CfrU0rIR.js +1 -0
  217. package/dist/chunks/{pollConfig-CyO4Ycwc.js → pollConfig-B3hNYQ_n.js} +1 -1
  218. package/dist/chunks/{poor-eRoBwI0Z.js → poor-BjTGCuqc.js} +1 -1
  219. package/dist/chunks/{poorMode-BdNsLBQ-.js → poorMode-CGVMMLlz.js} +1 -1
  220. package/dist/chunks/poorMode-DWLhTldO.js +1 -0
  221. package/dist/chunks/{print-Ogibzjap.js → print-BJkyuCzw.js} +11 -11
  222. package/dist/chunks/{privacy-settings-Dd7PtKbY.js → privacy-settings-BDVjqVcX.js} +1 -1
  223. package/dist/chunks/processBashCommand-DnzyTwtS.js +1 -0
  224. package/dist/chunks/processSlashCommand-BGBRvSCA.js +6 -0
  225. package/dist/chunks/prompt-BXrvaHyx.js +1 -0
  226. package/dist/chunks/{prompt-BHI7PZe4.js → prompt-DgIuTC6Q.js} +1 -1
  227. package/dist/chunks/prompt-Fax-fxAf.js +1 -0
  228. package/dist/chunks/{promptEditor-DoJ-xPi4.js → promptEditor-BkHY_Vzb.js} +2 -2
  229. package/dist/chunks/{protocolHandler-Dgzu5UWb.js → protocolHandler-CrXWRkxh.js} +1 -1
  230. package/dist/chunks/rate-limit-options-skMSi19l.js +1 -0
  231. package/dist/chunks/{rcDebugLog-C0Bam8V9.js → rcDebugLog-Bv_x5w_B.js} +1 -1
  232. package/dist/chunks/{referral-B10JtHMk.js → referral-DfKWr4Jf.js} +1 -1
  233. package/dist/chunks/refresh-zosTlttX.js +1 -0
  234. package/dist/chunks/{registerProtocol-CQjmvg7a.js → registerProtocol-De6y1iOi.js} +1 -1
  235. package/dist/chunks/registry-C8JbYbJI.js +1 -0
  236. package/dist/chunks/{release-notes-dxng0ob_.js → release-notes-Su1UPyE4.js} +1 -1
  237. package/dist/chunks/{releaseNotes-CS5L5W0H.js → releaseNotes-C7-JnhrH.js} +2 -2
  238. package/dist/chunks/{reload-plugins-CgzAjBDp.js → reload-plugins-C8lWCq8M.js} +1 -1
  239. package/dist/chunks/{remote-env-BasfU8Ra.js → remote-env-tQuvJmrt.js} +1 -1
  240. package/dist/chunks/{remoteBridgeCore-IJI5koHz.js → remoteBridgeCore-CwOTDmNP.js} +1 -1
  241. package/dist/chunks/{remoteControlServer-BBCt7ySV.js → remoteControlServer-DIKi-0lr.js} +2 -2
  242. package/dist/chunks/rename-Trg9EHjT.js +1 -0
  243. package/dist/chunks/{resume-DjnfattK.js → resume-Nt_EbjKh.js} +2 -2
  244. package/dist/chunks/{runtimeObserver-ByTBtmBf.js → runtimeObserver-CyWhTJpz.js} +4 -4
  245. package/dist/chunks/{runtimeObserver-COpkJmg-.js → runtimeObserver-T9QERJ_O.js} +1 -1
  246. package/dist/chunks/sandbox-adapter-BDGhDrPl.js +1 -0
  247. package/dist/chunks/{sandbox-toggle-CQohaYND.js → sandbox-toggle-C6v31S7-.js} +1 -1
  248. package/dist/chunks/searchExtraTools-C8ehknh0.js +1 -0
  249. package/dist/chunks/{sentry-C0bQlih_.js → sentry-CK_GHX79.js} +1 -1
  250. package/dist/chunks/{session-Dx_ODOHl.js → session-Ys3KvmQ0.js} +1 -1
  251. package/dist/chunks/{sessionDiscovery-DAqs0Ra6.js → sessionDiscovery-Cg3X2fKe.js} +1 -1
  252. package/dist/chunks/sessionFileAccessHooks-vthxapHk.js +1 -0
  253. package/dist/chunks/sessionMemory-ek1SfYG_.js +1 -0
  254. package/dist/chunks/sessionMemory-l-S0jpuk.js +1 -0
  255. package/dist/chunks/sessionMemoryUtils-BGJeJyKn.js +1 -0
  256. package/dist/chunks/sessionObserver-COTvvM3Z.js +1 -0
  257. package/dist/chunks/{sessionObserver-rd6RRTzc.js → sessionObserver-DvAdG6vQ.js} +2 -2
  258. package/dist/chunks/sessionStorage-GKe4ALVr.js +1 -0
  259. package/dist/chunks/{sessionTitle-1k_2BhFL.js → sessionTitle-DJMmUKBJ.js} +2 -2
  260. package/dist/chunks/{sessionTracing-DNSDPYdR.js → sessionTracing-DuQ3kbq6.js} +1 -1
  261. package/dist/chunks/{settingsSync-3xG2A_wN.js → settingsSync-1mhDakFG.js} +1 -1
  262. package/dist/chunks/{setup-Hlga8GJ_.js → setup-CAy0HkI3.js} +1 -1
  263. package/dist/chunks/setup-CGxUKG8x.js +3 -0
  264. package/dist/chunks/{setup-CY808VaY.js → setup-D5ioKRsS.js} +1 -1
  265. package/dist/chunks/{shadowedRuleDetection-BdBNo5eP.js → shadowedRuleDetection-Cq0y9pLR.js} +1 -1
  266. package/dist/chunks/{sideQuestion-DWOCUKMh.js → sideQuestion-ZII6LMSM.js} +3 -3
  267. package/dist/chunks/{sink-DCh0VJ4g.js → sink-Cd5g6Qqh.js} +1 -1
  268. package/dist/chunks/sink-Df9tds-b.js +1 -0
  269. package/dist/chunks/sinks-C4DwU8Xs.js +1 -0
  270. package/dist/chunks/{sinks-_9T2oPB_.js → sinks-DZlIEjLZ.js} +2 -2
  271. package/dist/chunks/{skill-learning-CzZFGFZO.js → skill-learning-DO21PjpF.js} +1 -1
  272. package/dist/chunks/skillChangeDetector-B6tL2yC9.js +1 -0
  273. package/dist/chunks/{skillGapStore-DJm3SULe.js → skillGapStore-B_xv3GUy.js} +1 -1
  274. package/dist/chunks/{skillGapStore-Bz_qbwI1.js → skillGapStore-CTD8MYTx.js} +2 -2
  275. package/dist/chunks/{skillGenerator-BcNv-VZ5.js → skillGenerator-CO9r-gft.js} +2 -2
  276. package/dist/chunks/skillLearning-BJS4lsNk.js +1 -0
  277. package/dist/chunks/skillLearning-C2NmdcYQ.js +1 -0
  278. package/dist/chunks/{skillPanel-Q85P-Gg4.js → skillPanel-DSumFGKN.js} +3 -3
  279. package/dist/chunks/{skillSearchPanel-CMCQDAcX.js → skillSearchPanel-SqkfYBjV.js} +4 -4
  280. package/dist/chunks/{skills-D3eUg3HG.js → skills-Bj3g5apl.js} +1 -1
  281. package/dist/chunks/{sprites-ChoMSqpa.js → sprites-CxMz3tIE.js} +1 -1
  282. package/dist/chunks/{stats-DdhEa_6-.js → stats-D1wYx84O.js} +1 -1
  283. package/dist/chunks/{status-CX7Kgn21.js → status-BWCqbeJ3.js} +1 -1
  284. package/dist/chunks/statusNoticeHelpers-DY0Cblkd.js +1 -0
  285. package/dist/chunks/{tag-BJ_u3aJm.js → tag-Hc7nOYm5.js} +2 -2
  286. package/dist/chunks/{tasks-DeEWOchP.js → tasks-BSqecqVm.js} +1 -1
  287. package/dist/chunks/{teamHelpers-WmWa_h3B.js → teamHelpers-BOmVFTLS.js} +1 -1
  288. package/dist/chunks/teamHelpers-BueGmQcw.js +1 -0
  289. package/dist/chunks/{teammateModeSnapshot-DZ6ulELC.js → teammateModeSnapshot-DhXjREuo.js} +1 -1
  290. package/dist/chunks/teammateModeSnapshot-_MCm6NGJ.js +1 -0
  291. package/dist/chunks/teleport-W2iPwivh.js +1 -0
  292. package/dist/chunks/{templateJobs-nFBp68za.js → templateJobs-1oMC9yLQ.js} +1 -1
  293. package/dist/chunks/{terminalSetup-DULcnnWe.js → terminalSetup-Bkml3uSP.js} +1 -1
  294. package/dist/chunks/{terminalSetup-BORjK3qH.js → terminalSetup-DJX1hqKs.js} +1 -1
  295. package/dist/chunks/{theme-Bf2QD0ja.js → theme-ia4cIc4d.js} +1 -1
  296. package/dist/chunks/thinkback-1NYskewu.js +1 -0
  297. package/dist/chunks/{thinkback-DZEhr3Ii.js → thinkback-DWLUXUQC.js} +1 -1
  298. package/dist/chunks/thinkback-play-DZmXMRtq.js +1 -0
  299. package/dist/chunks/{toolEventObserver-DMdrez6V.js → toolEventObserver-Ci0BECRu.js} +1 -1
  300. package/dist/chunks/{toolEventObserver-CNZy5TpN.js → toolEventObserver-nPwMQ5Vf.js} +1 -1
  301. package/dist/chunks/toolPool-ByCdlOak.js +1 -0
  302. package/dist/chunks/toolPool-IkNWjuk2.js +1 -0
  303. package/dist/chunks/{trustedDevice-Dw2crViN.js → trustedDevice-BynTLVs4.js} +1 -1
  304. package/dist/chunks/{trustedDevice-DWb5CPB_.js → trustedDevice-CtL2IGDX.js} +1 -1
  305. package/dist/chunks/{ultrareviewCommand-BfN25zni.js → ultrareviewCommand-DN-QhQ-f.js} +2 -2
  306. package/dist/chunks/undercover-CqJzV_Ar.js +1 -0
  307. package/dist/chunks/{undercover-rcR56jZx.js → undercover-DLr5xI3K.js} +1 -1
  308. package/dist/chunks/{updateCCB-DlTAqQJq.js → updateCCB-C6Ov8SNx.js} +4 -4
  309. package/dist/chunks/{upgrade-ClLcX7zy.js → upgrade-CVM1ffhq.js} +1 -1
  310. package/dist/chunks/upgrade-d40dVpDc.js +1 -0
  311. package/dist/chunks/{upload-BqEzK59v.js → upload-DSNwGLNd.js} +1 -1
  312. package/dist/chunks/{usage-BgKDh8pQ.js → usage-BRv8mBDf.js} +1 -1
  313. package/dist/chunks/{usage-DW-akzSR.js → usage-GMw8NiO_.js} +1 -1
  314. package/dist/chunks/{useMainLoopModel-BTpZ8k3k.js → useMainLoopModel-CEM_50a0.js} +1 -1
  315. package/dist/chunks/{useManagePlugins-z0qezP5r.js → useManagePlugins-hCqb5F5n.js} +1 -1
  316. package/dist/chunks/{useMergedTools-B78rAreW.js → useMergedTools-DxvRmxVF.js} +1 -1
  317. package/dist/chunks/{useSearchInput-CwxF3CHN.js → useSearchInput-BCErnYur.js} +1 -1
  318. package/dist/chunks/useSettingsErrors-BwNeCSA6.js +1 -0
  319. package/dist/chunks/{useVoice-X5WSnyed.js → useVoice-Cu39ifSa.js} +1 -1
  320. package/dist/chunks/{util-CP-_gsEO.js → util-DYuasrIE.js} +1 -1
  321. package/dist/chunks/utils-DSGFJaZ_.js +1 -0
  322. package/dist/chunks/{validatePlugin-DUuaprqR.js → validatePlugin-b1ec7M7n.js} +1 -1
  323. package/dist/chunks/{vim-BfmsdxOa.js → vim-CrAzv4cM.js} +1 -1
  324. package/dist/chunks/{voice-B3GIfFlB.js → voice-DKG3SYqi.js} +2 -2
  325. package/dist/chunks/{voiceModeEnabled-C1Q9j5q6.js → voiceModeEnabled-By2qa3A2.js} +1 -1
  326. package/dist/chunks/voiceModeEnabled-DwYcj-FH.js +1 -0
  327. package/dist/chunks/voiceStreamSTT-DD8ulbg1.js +1 -0
  328. package/dist/chunks/{voiceStreamSTT-BguyxdrW.js → voiceStreamSTT-DEV82xnN.js} +1 -1
  329. package/dist/chunks/{web-tools-qf_VwWRn.js → web-tools-8QRyE7va.js} +1 -1
  330. package/dist/chunks/windowsPaths-CRq9Bt5c.js +1 -0
  331. package/dist/chunks/windowsPaths-jbJ-skB_.js +1 -0
  332. package/dist/chunks/{workerRegistry-SbiLJIsG.js → workerRegistry-S7pO5khK.js} +1 -1
  333. package/dist/chunks/worktree-CfXrXsQ2.js +1 -0
  334. package/dist/chunks/{xml-D7-jJqSA.js → xml-CPJXOUFt.js} +1 -1
  335. package/dist/cli.js +1 -1
  336. package/package.json +1 -1
  337. package/dist/chunks/ApproveApiKey-Do-Qth0X.js +0 -1
  338. package/dist/chunks/BackgroundTasksDialog-DSeAqhMC.js +0 -2
  339. package/dist/chunks/ClaudeMdExternalIncludesDialog-DTZS-dek.js +0 -1
  340. package/dist/chunks/ConsoleOAuthFlow-UcQCmIWd.js +0 -1
  341. package/dist/chunks/DiffDialog-BfSnz8L-.js +0 -3
  342. package/dist/chunks/Doctor-BOVjkAKn.js +0 -3
  343. package/dist/chunks/Doctor-osWC5WVY.js +0 -1
  344. package/dist/chunks/Grove-DyC_Wrfx.js +0 -1
  345. package/dist/chunks/MCPConnectionManager-2Fulnp8q.js +0 -1
  346. package/dist/chunks/MessageSelector-B4jJQ-KQ.js +0 -3
  347. package/dist/chunks/Messages-ltcn1Qkf.js +0 -11
  348. package/dist/chunks/PluginSettings-DIS_qrVA.js +0 -17
  349. package/dist/chunks/QueryEngine-BQs519Rb.js +0 -1
  350. package/dist/chunks/REPL-DJh_wVWI.js +0 -1
  351. package/dist/chunks/ResumeConversation-BK7L_YBI.js +0 -1
  352. package/dist/chunks/SearchExtraToolsTool-DVi-ggud.js +0 -1
  353. package/dist/chunks/SentryErrorBoundary-DLML64E_.js +0 -1
  354. package/dist/chunks/Settings-DOve7mW1.js +0 -2
  355. package/dist/chunks/api-CoBZPEi-.js +0 -1
  356. package/dist/chunks/asciicast-DA6TudSH.js +0 -1
  357. package/dist/chunks/assistant-B2_c5C4T.js +0 -1
  358. package/dist/chunks/auth-CRVuUNwf.js +0 -1
  359. package/dist/chunks/backgroundHousekeeping-BWAfdRVf.js +0 -1
  360. package/dist/chunks/backgroundHousekeeping-Cll7XHG1.js +0 -17
  361. package/dist/chunks/bridgeConfig-pVTHa_ED.js +0 -1
  362. package/dist/chunks/bridgeEnabled-c_BeJX3S.js +0 -1
  363. package/dist/chunks/bridgeMain-CHk_DCxy.js +0 -1
  364. package/dist/chunks/bridgeMain-DVoobI7G.js +0 -68
  365. package/dist/chunks/caches-3byHT6VF.js +0 -1
  366. package/dist/chunks/changeDetector-Cg75mKOu.js +0 -1
  367. package/dist/chunks/channelNotification-BSmZprUZ.js +0 -1
  368. package/dist/chunks/clear-CTOCrXv_.js +0 -1
  369. package/dist/chunks/client-BgdjJNnC.js +0 -1
  370. package/dist/chunks/color-BP4FmcMn.js +0 -1
  371. package/dist/chunks/commands-CkfOhzGE.js +0 -1
  372. package/dist/chunks/commitAttribution-DKvggTZx.js +0 -1
  373. package/dist/chunks/compact-BtAvCkY0.js +0 -3
  374. package/dist/chunks/context-noninteractive-DNOyQYnM.js +0 -1
  375. package/dist/chunks/conversation-DR4MFYYi.js +0 -1
  376. package/dist/chunks/conversation-DVhyJA1O.js +0 -1
  377. package/dist/chunks/createSession-CIM50iEU.js +0 -1
  378. package/dist/chunks/datadog-vQKKqB6Z.js +0 -1
  379. package/dist/chunks/envLessBridgeConfig-Dj0umjOo.js +0 -1
  380. package/dist/chunks/exit-CwGJifQF.js +0 -1
  381. package/dist/chunks/extra-usage-1FUBiJOE.js +0 -1
  382. package/dist/chunks/extraUsage-Ca_6qcke.js +0 -1
  383. package/dist/chunks/extractMemories-B-yrLjpP.js +0 -1
  384. package/dist/chunks/fast-CFtN26up.js +0 -1
  385. package/dist/chunks/gates-4fq2Ws2D.js +0 -1
  386. package/dist/chunks/hooks-CmW7bdtz.js +0 -1
  387. package/dist/chunks/inboundAttachments-DZiITyN8.js +0 -1
  388. package/dist/chunks/initReplBridge-YGXqLbNZ.js +0 -1
  389. package/dist/chunks/language-CiMwEWO-.js +0 -1
  390. package/dist/chunks/loadAgentsDir-CjhNkoq0.js +0 -1
  391. package/dist/chunks/loadPluginHooks-DukITDP2.js +0 -1
  392. package/dist/chunks/localSearch-D8FFon8N.js +0 -1
  393. package/dist/chunks/login-B3TV33p4.js +0 -1
  394. package/dist/chunks/logout-BqbTEPv9.js +0 -1
  395. package/dist/chunks/mcp-DtHGTZUo.js +0 -1
  396. package/dist/chunks/mcp-Vj0ijoSq.js +0 -6
  397. package/dist/chunks/model-BYSyXf9-.js +0 -1
  398. package/dist/chunks/permissions-B39hfy0O.js +0 -3
  399. package/dist/chunks/pluginBlocklist-D2Cj4TR2.js +0 -1
  400. package/dist/chunks/pluginOperations-DDI1CG0K.js +0 -2
  401. package/dist/chunks/pluginStartupCheck-DYC8CWxw.js +0 -1
  402. package/dist/chunks/plugins-Bz7JxD43.js +0 -4
  403. package/dist/chunks/policyLimits-C-oHygGe.js +0 -1
  404. package/dist/chunks/poorMode-D2-4vRxb.js +0 -1
  405. package/dist/chunks/processBashCommand-BjdUo_Na.js +0 -1
  406. package/dist/chunks/processSlashCommand-tetvMLMl.js +0 -6
  407. package/dist/chunks/prompt-DZ1EAUlC.js +0 -1
  408. package/dist/chunks/prompt-DeRHlPn1.js +0 -1
  409. package/dist/chunks/rate-limit-options-B6QH2-xn.js +0 -1
  410. package/dist/chunks/refresh-DmEsCaJ0.js +0 -1
  411. package/dist/chunks/registry-CLaXh4Gk.js +0 -1
  412. package/dist/chunks/rename-eEdSZsJ2.js +0 -1
  413. package/dist/chunks/sandbox-adapter-DagBhoTC.js +0 -1
  414. package/dist/chunks/searchExtraTools-kk-wV-cC.js +0 -1
  415. package/dist/chunks/sessionFileAccessHooks-C-Ic-0Ry.js +0 -1
  416. package/dist/chunks/sessionMemory-BMtFup-Y.js +0 -1
  417. package/dist/chunks/sessionMemory-Bq3ECr1S.js +0 -1
  418. package/dist/chunks/sessionMemoryUtils-BU7N_IQG.js +0 -1
  419. package/dist/chunks/sessionObserver-BwAfzGUg.js +0 -1
  420. package/dist/chunks/sessionStorage-X2u45U9z.js +0 -1
  421. package/dist/chunks/setup-C2V4elOv.js +0 -3
  422. package/dist/chunks/sink-nZmawD5W.js +0 -1
  423. package/dist/chunks/sinks-BTZnXPr_.js +0 -1
  424. package/dist/chunks/skillChangeDetector-345QNWDp.js +0 -1
  425. package/dist/chunks/skillLearning-BJAfTX2G.js +0 -1
  426. package/dist/chunks/skillLearning-DPhuKS4j.js +0 -1
  427. package/dist/chunks/statusNoticeHelpers-AibXOONm.js +0 -1
  428. package/dist/chunks/teamHelpers-CxoQp7OY.js +0 -1
  429. package/dist/chunks/teammateModeSnapshot-KWxn1jxl.js +0 -1
  430. package/dist/chunks/teleport-CuDXJj_f.js +0 -1
  431. package/dist/chunks/thinkback-C1nnGg5r.js +0 -1
  432. package/dist/chunks/thinkback-play-BtEBESXM.js +0 -1
  433. package/dist/chunks/toolPool-DDj2TbY6.js +0 -1
  434. package/dist/chunks/toolPool-DHQyHmDY.js +0 -1
  435. package/dist/chunks/undercover-DSp7SB7e.js +0 -1
  436. package/dist/chunks/upgrade-kf1QWUo7.js +0 -1
  437. package/dist/chunks/useSettingsErrors-CjDaon07.js +0 -1
  438. package/dist/chunks/utils-CULcnflj.js +0 -1
  439. package/dist/chunks/voiceModeEnabled-BrA5ZhH4.js +0 -1
  440. package/dist/chunks/voiceStreamSTT-Dmp7Vm1S.js +0 -1
  441. package/dist/chunks/windowsPaths-BeDSnJ23.js +0 -2
  442. package/dist/chunks/windowsPaths-ttHiMKpR.js +0 -1
  443. package/dist/chunks/worktree-Djga1wtm.js +0 -1
@@ -0,0 +1 @@
1
+ import{o as e,t}from"./loadAgentsDir-BfEZacjM.js";e();export{t as clearAgentDefinitionsCache};
@@ -0,0 +1 @@
1
+ import{ly as e,oy as t,sy as n}from"./loadAgentsDir-BfEZacjM.js";t();export{n as loadPluginHooks,e as setupPluginHookHotReload};
@@ -0,0 +1 @@
1
+ import{a as e,c as t,o as n,t as r}from"./localSearch-COJcqOWl.js";n();export{r as clearSkillIndexCache,e as getSkillIndex,t as searchSkills};
@@ -1 +1 @@
1
- import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{l as n,p as r}from"./debug-otxXY3j-.js";var i=t({clearSkillIndexCache:()=>m,computeIdf:()=>u,computeWeightedTf:()=>l,cosineSimilarity:()=>d,getSkillIndex:()=>h,searchSkills:()=>g,tokenize:()=>o,tokenizeAndStem:()=>c});function a(e){return v.test(e)}function o(e){let t=[],n=e.toLowerCase(),r=0;for(;r<n.length;)if(a(n[r])){let e=``;for(;r<n.length&&a(n[r]);)e+=n[r],r++;for(let n=0;n<e.length-1;n++)t.push(e.slice(n,n+2))}else if(/[a-z0-9]/.test(n[r])){let e=``;for(;r<n.length&&/[a-z0-9\-_]/.test(n[r]);)e+=n[r],r++;let i=e.replace(/^[-_]+|[-_]+$/g,``);i&&!_.has(i)&&t.push(i)}else r++;return t}function s(e){if(a(e[0]??``))return e;let t=e;return t.endsWith(`ing`)&&t.length>5?t=t.slice(0,-3):t.endsWith(`tion`)&&t.length>5||t.endsWith(`ness`)&&t.length>5||t.endsWith(`ment`)&&t.length>5?t=t.slice(0,-4):t.endsWith(`ers`)&&t.length>4?t=t.slice(0,-1):t.endsWith(`er`)&&t.length>4||t.endsWith(`es`)&&t.length>4?t=t.slice(0,-2):t.endsWith(`s`)&&t.length>3&&!t.endsWith(`ss`)?t=t.slice(0,-1):(t.endsWith(`ed`)&&t.length>4||t.endsWith(`ly`)&&t.length>4)&&(t=t.slice(0,-2)),t}function c(e){return o(e).map(s)}function l(e){let t=new Map;for(let n of e){let e=new Map;for(let t of n.tokens)e.set(t,(e.get(t)??0)+1);let r=1;for(let t of e.values())t>r&&(r=t);for(let[i,a]of e){let e=a/r*n.weight;e>(t.get(i)??0)&&t.set(i,e)}}return t}function u(e){let t=new Map;for(let n of e){let e=new Set;for(let r of n.tokens)e.has(r)||(t.set(r,(t.get(r)??0)+1),e.add(r))}let n=e.length,r=new Map;for(let[e,i]of t)r.set(e,Math.log(n/i));return r}function d(e,t){let n=0,r=0,i=0;for(let[i,a]of e){let e=t.get(i)??0;n+=a*e,r+=a*a}for(let e of t.values())i+=e*e;let a=Math.sqrt(r)*Math.sqrt(i);return a===0?0:n/a}function f(e){return e.toLowerCase().replace(/[-_]/g,` `)}function p(e){return e.toLowerCase().split(/[-_]/).filter(e=>e.length>=3)}function m(){C=null,w=null,T=null,r(`[skill-search] index cache cleared`)}async function h(e){if(C&&T===e)return C;let{getCommands:t}=await import(`./commands-CkfOhzGE.js`),n=await t(e),i=[];for(let e of n){if(e.type!==`prompt`||e.disableModelInvocation)continue;let t=e.name,n=e.description??``,r=e.whenToUse,a=e.allowedTools?.join(` `)??``,o=c(t),u=p(t),d=[...o,...u.map(s).filter(e=>!_.has(e))],m=c(n),h=c(r??``),g=c(a),v=[...new Set([...d,...m,...h,...g])],b=l([{tokens:d,weight:y.name},{tokens:h,weight:y.whenToUse},{tokens:m,weight:y.description},{tokens:g,weight:y.allowedTools}]);i.push({name:t,normalizedName:f(t),description:n,whenToUse:r,source:e.source??`unknown`,loadedFrom:e.loadedFrom,skillRoot:e.skillRoot,contentLength:e.contentLength,tokens:v,tfVector:b})}let a=u(i);for(let e of i)for(let[t,n]of e.tfVector)e.tfVector.set(t,n*(a.get(t)??0));return C=i,w=a,T=e,r(`[skill-search] indexed ${i.length} skills from ${n.length} commands`),i}function g(e,t,n=5){if(t.length===0||!e?.trim())return[];let r=c(e);if(r.length===0)return[];let i=new Map,o=new Map;for(let e of r)o.set(e,(o.get(e)??0)+1);let s=1;for(let e of o.values())e>s&&(s=e);for(let[e,t]of o)i.set(e,t/s);let l=C===t&&w?w:u(t),f=new Map;for(let[e,t]of i)f.set(e,t*(l.get(e)??0));let p=r.filter(e=>a(e[0]??``)),m=r.filter(e=>!a(e[0]??``)),h=e.toLowerCase().replace(/[-_]/g,` `),g=[];for(let e of t){let t=d(f,e.tfVector);p.length>0&&t>0&&p.filter(t=>e.tfVector.has(t)).length<S&&(m.some(t=>e.tfVector.has(t))||(t=0)),e.name.length>=x&&h.includes(e.normalizedName)&&(t=Math.max(t,.75)),t>=b&&g.push({name:e.name,description:e.description,score:t,source:e.source,loadedFrom:e.loadedFrom,skillRoot:e.skillRoot,contentLength:e.contentLength})}return g.sort((e,t)=>t.score-e.score),g.slice(0,n)}var _,v,y,b,x,S,C,w,T,E=e((()=>{n(),_=new Set(`a.an.the.is.are.was.were.be.been.being.have.has.had.do.does.did.will.would.could.should.may.might.shall.can.need.dare.ought.used.to.of.in.for.on.with.at.by.from.as.into.through.during.before.after.above.below.between.out.off.over.under.again.further.then.once.here.there.when.where.why.how.all.each.every.both.few.more.most.other.some.such.no.nor.not.only.own.same.so.than.too.very.just.because.but.and.or.if.while.this.that.these.those.it.its.i.me.my.we.our.you.your.he.him.his.she.her.they.them.their.what.which.who.whom.use.using.used`.split(`.`)),v=/[\u4e00-\u9fff\u3400-\u4dbf]/,y={name:3,whenToUse:2,description:1,allowedTools:.3},b=Number(process.env.SKILL_SEARCH_DISPLAY_MIN_SCORE??`0.10`),x=4,S=2,C=null,w=null,T=null}));export{h as a,g as c,d as i,o as l,u as n,E as o,l as r,i as s,m as t,c as u};
1
+ import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{l as n,p as r}from"./debug-otxXY3j-.js";var i=t({clearSkillIndexCache:()=>m,computeIdf:()=>u,computeWeightedTf:()=>l,cosineSimilarity:()=>d,getSkillIndex:()=>h,searchSkills:()=>g,tokenize:()=>o,tokenizeAndStem:()=>c});function a(e){return v.test(e)}function o(e){let t=[],n=e.toLowerCase(),r=0;for(;r<n.length;)if(a(n[r])){let e=``;for(;r<n.length&&a(n[r]);)e+=n[r],r++;for(let n=0;n<e.length-1;n++)t.push(e.slice(n,n+2))}else if(/[a-z0-9]/.test(n[r])){let e=``;for(;r<n.length&&/[a-z0-9\-_]/.test(n[r]);)e+=n[r],r++;let i=e.replace(/^[-_]+|[-_]+$/g,``);i&&!_.has(i)&&t.push(i)}else r++;return t}function s(e){if(a(e[0]??``))return e;let t=e;return t.endsWith(`ing`)&&t.length>5?t=t.slice(0,-3):t.endsWith(`tion`)&&t.length>5||t.endsWith(`ness`)&&t.length>5||t.endsWith(`ment`)&&t.length>5?t=t.slice(0,-4):t.endsWith(`ers`)&&t.length>4?t=t.slice(0,-1):t.endsWith(`er`)&&t.length>4||t.endsWith(`es`)&&t.length>4?t=t.slice(0,-2):t.endsWith(`s`)&&t.length>3&&!t.endsWith(`ss`)?t=t.slice(0,-1):(t.endsWith(`ed`)&&t.length>4||t.endsWith(`ly`)&&t.length>4)&&(t=t.slice(0,-2)),t}function c(e){return o(e).map(s)}function l(e){let t=new Map;for(let n of e){let e=new Map;for(let t of n.tokens)e.set(t,(e.get(t)??0)+1);let r=1;for(let t of e.values())t>r&&(r=t);for(let[i,a]of e){let e=a/r*n.weight;e>(t.get(i)??0)&&t.set(i,e)}}return t}function u(e){let t=new Map;for(let n of e){let e=new Set;for(let r of n.tokens)e.has(r)||(t.set(r,(t.get(r)??0)+1),e.add(r))}let n=e.length,r=new Map;for(let[e,i]of t)r.set(e,Math.log(n/i));return r}function d(e,t){let n=0,r=0,i=0;for(let[i,a]of e){let e=t.get(i)??0;n+=a*e,r+=a*a}for(let e of t.values())i+=e*e;let a=Math.sqrt(r)*Math.sqrt(i);return a===0?0:n/a}function f(e){return e.toLowerCase().replace(/[-_]/g,` `)}function p(e){return e.toLowerCase().split(/[-_]/).filter(e=>e.length>=3)}function m(){C=null,w=null,T=null,r(`[skill-search] index cache cleared`)}async function h(e){if(C&&T===e)return C;let{getCommands:t}=await import(`./commands-B3XpQmEm.js`),n=await t(e),i=[];for(let e of n){if(e.type!==`prompt`||e.disableModelInvocation)continue;let t=e.name,n=e.description??``,r=e.whenToUse,a=e.allowedTools?.join(` `)??``,o=c(t),u=p(t),d=[...o,...u.map(s).filter(e=>!_.has(e))],m=c(n),h=c(r??``),g=c(a),v=[...new Set([...d,...m,...h,...g])],b=l([{tokens:d,weight:y.name},{tokens:h,weight:y.whenToUse},{tokens:m,weight:y.description},{tokens:g,weight:y.allowedTools}]);i.push({name:t,normalizedName:f(t),description:n,whenToUse:r,source:e.source??`unknown`,loadedFrom:e.loadedFrom,skillRoot:e.skillRoot,contentLength:e.contentLength,tokens:v,tfVector:b})}let a=u(i);for(let e of i)for(let[t,n]of e.tfVector)e.tfVector.set(t,n*(a.get(t)??0));return C=i,w=a,T=e,r(`[skill-search] indexed ${i.length} skills from ${n.length} commands`),i}function g(e,t,n=5){if(t.length===0||!e?.trim())return[];let r=c(e);if(r.length===0)return[];let i=new Map,o=new Map;for(let e of r)o.set(e,(o.get(e)??0)+1);let s=1;for(let e of o.values())e>s&&(s=e);for(let[e,t]of o)i.set(e,t/s);let l=C===t&&w?w:u(t),f=new Map;for(let[e,t]of i)f.set(e,t*(l.get(e)??0));let p=r.filter(e=>a(e[0]??``)),m=r.filter(e=>!a(e[0]??``)),h=e.toLowerCase().replace(/[-_]/g,` `),g=[];for(let e of t){let t=d(f,e.tfVector);p.length>0&&t>0&&p.filter(t=>e.tfVector.has(t)).length<S&&(m.some(t=>e.tfVector.has(t))||(t=0)),e.name.length>=x&&h.includes(e.normalizedName)&&(t=Math.max(t,.75)),t>=b&&g.push({name:e.name,description:e.description,score:t,source:e.source,loadedFrom:e.loadedFrom,skillRoot:e.skillRoot,contentLength:e.contentLength})}return g.sort((e,t)=>t.score-e.score),g.slice(0,n)}var _,v,y,b,x,S,C,w,T,E=e((()=>{n(),_=new Set(`a.an.the.is.are.was.were.be.been.being.have.has.had.do.does.did.will.would.could.should.may.might.shall.can.need.dare.ought.used.to.of.in.for.on.with.at.by.from.as.into.through.during.before.after.above.below.between.out.off.over.under.again.further.then.once.here.there.when.where.why.how.all.each.every.both.few.more.most.other.some.such.no.nor.not.only.own.same.so.than.too.very.just.because.but.and.or.if.while.this.that.these.those.it.its.i.me.my.we.our.you.your.he.him.his.she.her.they.them.their.what.which.who.whom.use.using.used`.split(`.`)),v=/[\u4e00-\u9fff\u3400-\u4dbf]/,y={name:3,whenToUse:2,description:1,allowedTools:.3},b=Number(process.env.SKILL_SEARCH_DISPLAY_MIN_SCORE??`0.10`),x=4,S=2,C=null,w=null,T=null}));export{h as a,g as c,d as i,o as l,u as n,E as o,l as r,i as s,m as t,c as u};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,t as n}from"./login-SuUxFLIY.js";t();export{n as Login,e as call};
@@ -1 +1 @@
1
- import{a as e,n as t,o as n,r}from"./chunk-DR8-3Aex.js";import{Rn as i,b as a,f as o,t as s,x as c,xt as l}from"./src-Di342QoJ.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{cn as d,yn as f}from"./state-sIHsFpDu.js";import{Cc as p,Jt as m,S as h,T as g,dc as _,on as ee,vt as te,yc as v,yt as ne}from"./paths-CEAy4QCs.js";import{a as re,r as ie}from"./env-C2A9gV_G.js";import{o as ae,s as y}from"./log-DSV4Ht5l.js";import{DC as oe,EC as se,Hy as ce,Uo as b,Vy as le,Wa as x,Ya as S,cE as ue,fE as de,rs as fe}from"./loadAgentsDir-DC4jN6-f.js";import{a as pe,r as me,t as he}from"./trustedDevice-DWb5CPB_.js";import{n as C,t as w}from"./useMainLoopModel-BTpZ8k3k.js";import{n as T,r as E,t as D}from"./bypassPermissionsKillswitch-7e56Rquc.js";import{promises as O}from"fs";function k({subscription:e}){let t=e.active?`☑`:`☐`,n=e.active&&e.plan?` ${e.plan} plan`:``,r=e.active?`logged in${n}`:`not logged in`;return(0,N.jsxs)(c,{children:[(0,N.jsxs)(a,{color:e.active?`success`:void 0,children:[t,` Subscription (claude.ai)`,` `]}),(0,N.jsx)(a,{dimColor:!e.active,children:r})]})}function A({workspaceKey:e}){if(!e.set)return(0,N.jsxs)(c,{children:[(0,N.jsx)(a,{children:`☐ Workspace API key `}),(0,N.jsx)(a,{dimColor:!0,children:`not set`})]});if(!e.prefixValid)return(0,N.jsxs)(c,{children:[(0,N.jsx)(a,{color:`warning`,children:`⚠ Workspace API key `}),(0,N.jsx)(a,{children:e.keyPreview}),(0,N.jsx)(a,{color:`warning`,children:` (sk-ant-api03-* required)`})]});let t=e.source===`settings`?` (saved to settings)`:e.source===`env`?` (from ANTHROPIC_API_KEY env)`:``;return(0,N.jsxs)(c,{children:[(0,N.jsx)(a,{color:`success`,children:`☑ Workspace API key `}),(0,N.jsx)(a,{children:e.keyPreview}),t?(0,N.jsx)(a,{dimColor:!0,children:t}):null]})}function j({subscription:e,workspaceKey:t}){return!t.set&&e.active?(0,N.jsxs)(c,{flexDirection:`column`,marginLeft:5,marginTop:0,children:[(0,N.jsx)(a,{dimColor:!0,children:`To enable /vault /agents-platform /memory-stores:`}),(0,N.jsx)(a,{dimColor:!0,children:`Press W to set now (saves to settings.json, no restart needed)`}),(0,N.jsx)(a,{dimColor:!0,children:` — or —`}),(0,N.jsx)(a,{dimColor:!0,children:`1. Open https://console.anthropic.com/settings/keys`}),(0,N.jsx)(a,{dimColor:!0,children:`2. Create a key (sk-ant-api03-*)`}),(0,N.jsx)(a,{dimColor:!0,children:`3. Set ANTHROPIC_API_KEY=<key> and restart`})]}):null}function M({status:e}){return(0,N.jsxs)(c,{flexDirection:`column`,marginBottom:1,children:[(0,N.jsx)(c,{marginBottom:0,children:(0,N.jsx)(a,{bold:!0,children:`Anthropic auth status:`})}),(0,N.jsxs)(c,{marginLeft:2,flexDirection:`column`,children:[(0,N.jsx)(k,{subscription:e.subscription}),(0,N.jsx)(A,{workspaceKey:e.workspaceKey}),(0,N.jsx)(j,{subscription:e.subscription,workspaceKey:e.workspaceKey})]})]})}var N,P=t((()=>{i(),s(),N=u()})),F=r({getAuthStatus:()=>L});function I(e){let t=e.length;return t<20?`[redacted] (${t} chars)`:`${e.slice(0,4)}...${e.slice(-2)} (${t} chars)`}function L(){let e=m(),t=e!==null&&!!e.accessToken,n=null;if(t&&e){let t=e.subscriptionType;n=t===`free`||t===`pro`||t===`max`||t===`team`||t===`enterprise`?t:t==null?null:`unknown`}let r=(process.env.ANTHROPIC_API_KEY??``).trim(),i=_().workspaceApiKey?.trim()??``,a,o;r.length>0?(a=r,o=`env`):i.length>0?(a=i,o=`settings`):(a=``,o=null);let s=a.length>0,c=a.startsWith(R),l=s?I(a):null;return{subscription:{active:t,plan:n,accountEmail:null},workspaceKey:{set:s,prefixValid:c,keyPreview:l,source:o}}}var R,z=t((()=>{ee(),v(),R=`sk-ant-api03-`}));async function ge(e){if(!e||e.trim().length===0)throw Error(`Workspace API key must not be empty.`);let t=e.trim();if(t.length<U)throw Error(`Workspace API key is too short (${t.length} chars). Expected at least ${U} chars starting with "${H}".`);if(t.length>W)throw Error(`Workspace API key is too long (${t.length} chars). Maximum allowed length is ${W} chars.`);if(!t.startsWith(H)){let e=t.slice(0,4);throw Error(`Workspace API key must start with "${H}" (workspace key). Got prefix "${e}...". Obtain a workspace API key from https://console.anthropic.com/settings/keys.`)}try{p(e=>({...e,workspaceApiKey:t}))}catch(e){throw Error(`Failed to save workspace API key to config: ${V(e)}`)}await _e()}async function B(){try{p(e=>{let t={...e};return delete t.workspaceApiKey,t})}catch(e){throw Error(`Failed to remove workspace API key: ${V(e)}`)}}function V(e){return e instanceof Error?e.message.replace(/sk-ant-api03-\S*/g,`[REDACTED]`):`unknown error`}async function _e(){let e=ie();if(process.platform===`win32`){y(Error(`[saveWorkspaceKey] Windows: chmod 600 is not supported. To protect your API key, restrict access to ${e} via icacls or Windows ACL settings.`));return}try{await O.chmod(e,384)}catch(t){y(Error(`[saveWorkspaceKey] Could not set chmod 600 on ${e}: ${V(t)}`))}}var H,U,W,G=t((()=>{re(),v(),ae(),H=`sk-ant-api03-`,U=20,W=256}));function ve(e){if(e.length===0)return``;if(!e.startsWith(J))return e.slice(0,4)+(e.length>4?`...`:``);let t=e.slice(13);return t.length===0?J:`${J}****...${t.slice(-Math.min(4,t.length)).replace(/./g,`*`)}`}function ye(e){return e.length===0?null:e.startsWith(J)?e.length<Y?`Key too short (${e.length}/${Y} chars minimum)`:e.length>X?`Key too long (${e.length}/${X} chars maximum)`:null:`Key must start with "${J}"`}function be({onSave:e,onCancel:t,saving:n=!1,saveError:r=null}){let[i,o]=K.useState(``),[s,u]=K.useState(null),d=ye(i),f=!n&&i.length>=Y&&d===null;l((n,r)=>{if(r.escape){t();return}if(r.return){if(!f)return;u(null),e(i);return}if(r.backspace||r.delete){o(e=>e.slice(0,-1));return}if(n&&n.length>0){let e=n;e.charCodeAt(0)>=32&&e.charCodeAt(0)<=126&&o(t=>{let n=t+e;return n.length<=X?n:t})}},{isActive:!n});let p=ve(i),m=s??r??d;return(0,q.jsxs)(c,{flexDirection:`column`,marginTop:1,children:[(0,q.jsx)(c,{marginBottom:0,children:(0,q.jsx)(a,{bold:!0,children:`Enter workspace API key (sk-ant-api03-*):`})}),(0,q.jsx)(c,{marginTop:0,marginBottom:0,children:(0,q.jsx)(a,{dimColor:!0,children:` Obtain from: https://console.anthropic.com/settings/keys`})}),(0,q.jsxs)(c,{marginTop:1,marginBottom:0,children:[(0,q.jsx)(a,{children:` > `}),i.length>0?(0,q.jsx)(a,{children:p}):(0,q.jsx)(a,{dimColor:!0,children:`[paste key here]`})]}),m!==null&&(0,q.jsx)(c,{marginTop:0,children:(0,q.jsxs)(a,{color:`warning`,children:[` ✗ `,m]})}),n&&(0,q.jsx)(c,{marginTop:0,children:(0,q.jsx)(a,{dimColor:!0,children:` Saving...`})}),(0,q.jsx)(c,{marginTop:1,children:(0,q.jsx)(a,{dimColor:!0,children:f?`Press Enter to save · Esc to cancel`:`Esc to cancel`+(i.length===0?` · start typing your key`:``)})})]})}function xe({onSaved:e,onCancel:t}){let[n,r]=K.useState(!1),[i,a]=K.useState(null),o=K.useCallback(async t=>{r(!0),a(null);try{await ge(t),e()}catch(e){a(e instanceof Error?e.message:`Failed to save key — unknown error`),r(!1)}},[e]);return(0,q.jsx)(be,{onSave:e=>{o(e)},onCancel:t,saving:n,saveError:i})}var K,q,J,Y,X,Se=t((()=>{K=n(i(),1),s(),G(),q=u(),J=`sk-ant-api03-`,Y=20,X=256}));async function Ce(e,t){return(0,$.jsx)(Z,{authStatus:L(),onDone:async n=>{if(t.onChangeAPIKey(),t.setMessages(fe),n){f(),de(),S(),ne(),g(),he(),me(),E();let e=t.getAppState();D(e.toolPermissionContext,t.setAppState,e.fastMode),t.setAppState(e=>({...e,authVersion:e.authVersion+1}))}e(n?`Login successful`:`Login interrupted`)}})}function Z(t){let n=C(),[r,i]=Q.useState(!1),[s,u]=Q.useState({phase:`idle`}),[d,f]=Q.useState(t.authStatus),p=d!==void 0&&d.workspaceKey.set,m=p&&d.workspaceKey.source===`settings`,h=Q.useCallback(()=>{let{getAuthStatus:t}=(z(),e(F));f(t())},[]);l(e=>{if(!r){if(s.phase===`confirm-remove`){if(e===`y`||e===`Y`){u({phase:`removing`}),(async()=>{try{await B(),h(),u({phase:`idle`})}catch(e){u({phase:`error`,message:e instanceof Error?e.message:`Failed to remove workspace API key`})}})();return}if(e===`n`||e===`N`){u({phase:`idle`});return}return}if(e===`w`||e===`W`){i(!0);return}(e===`d`||e===`D`)&&m&&u({phase:`confirm-remove`})}},{isActive:!r});let g=Q.useCallback(()=>{h(),i(!1)},[h]),_=Q.useCallback(()=>{i(!1)},[]);return(0,$.jsx)(o,{title:`Login`,onCancel:()=>t.onDone(!1,n),color:`permission`,inputGuide:e=>e.pending?(0,$.jsxs)(a,{children:[`Press `,e.keyName,` again to exit`]}):(0,$.jsx)(se,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`}),children:(0,$.jsxs)(c,{flexDirection:`column`,children:[d!==void 0&&(0,$.jsx)(c,{marginBottom:1,children:(0,$.jsx)(M,{status:d})}),r?(0,$.jsx)(xe,{onSaved:g,onCancel:_}):s.phase===`confirm-remove`||s.phase===`removing`?(0,$.jsxs)(c,{flexDirection:`column`,marginBottom:1,children:[(0,$.jsxs)(a,{children:[`Remove the saved workspace API key? `,(0,$.jsx)(a,{dimColor:!0,children:`(settings.json only — env var is unaffected)`})]}),(0,$.jsx)(a,{dimColor:!0,children:s.phase===`removing`?`Removing…`:`Press Y to confirm, N to cancel`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(c,{flexDirection:`column`,marginBottom:1,children:[p?m?(0,$.jsx)(a,{dimColor:!0,children:`Press W to replace workspace API key · Press D to remove it`}):(0,$.jsx)(a,{dimColor:!0,children:`Workspace API key from ANTHROPIC_API_KEY env. Press W to override with a settings-saved key.`}):(0,$.jsx)(a,{dimColor:!0,children:`Press W to enter workspace API key (saves to settings, no restart needed)`}),s.phase===`error`&&(0,$.jsx)(a,{color:`error`,children:s.message})]}),(0,$.jsx)(le,{onDone:()=>t.onDone(!0,n),startingMessage:t.startingMessage})]})]})})}var Q,$,we=t((()=>{Q=n(i(),1),d(),pe(),oe(),ce(),s(),w(),h(),x(),ue(),b(),T(),te(),P(),z(),Se(),G(),$=u()}));export{Ce as n,we as r,Z as t};
1
+ import{a as e,n as t,o as n,r}from"./chunk-DR8-3Aex.js";import{Rn as i,b as a,f as o,t as s,x as c,xt as l}from"./src-Di342QoJ.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{cn as d,yn as f}from"./state-sIHsFpDu.js";import{Cc as p,Jt as m,S as h,T as g,dc as _,on as ee,vt as te,yc as v,yt as ne}from"./paths-nIHVpTn2.js";import{a as re,r as ie}from"./env-C2A9gV_G.js";import{o as ae,s as y}from"./log-DSV4Ht5l.js";import{Go as oe,Ka as se,OC as ce,Uy as b,Wy as le,Za as x,as as S,kC as ue,mE as de,uE as fe}from"./loadAgentsDir-BfEZacjM.js";import{a as pe,r as me,t as he}from"./trustedDevice-CtL2IGDX.js";import{n as C,t as w}from"./useMainLoopModel-CEM_50a0.js";import{n as T,r as E,t as D}from"./bypassPermissionsKillswitch-CRYkShwu.js";import{promises as O}from"fs";function k({subscription:e}){let t=e.active?`☑`:`☐`,n=e.active&&e.plan?` ${e.plan} plan`:``,r=e.active?`logged in${n}`:`not logged in`;return(0,N.jsxs)(c,{children:[(0,N.jsxs)(a,{color:e.active?`success`:void 0,children:[t,` Subscription (claude.ai)`,` `]}),(0,N.jsx)(a,{dimColor:!e.active,children:r})]})}function A({workspaceKey:e}){if(!e.set)return(0,N.jsxs)(c,{children:[(0,N.jsx)(a,{children:`☐ Workspace API key `}),(0,N.jsx)(a,{dimColor:!0,children:`not set`})]});if(!e.prefixValid)return(0,N.jsxs)(c,{children:[(0,N.jsx)(a,{color:`warning`,children:`⚠ Workspace API key `}),(0,N.jsx)(a,{children:e.keyPreview}),(0,N.jsx)(a,{color:`warning`,children:` (sk-ant-api03-* required)`})]});let t=e.source===`settings`?` (saved to settings)`:e.source===`env`?` (from ANTHROPIC_API_KEY env)`:``;return(0,N.jsxs)(c,{children:[(0,N.jsx)(a,{color:`success`,children:`☑ Workspace API key `}),(0,N.jsx)(a,{children:e.keyPreview}),t?(0,N.jsx)(a,{dimColor:!0,children:t}):null]})}function j({subscription:e,workspaceKey:t}){return!t.set&&e.active?(0,N.jsxs)(c,{flexDirection:`column`,marginLeft:5,marginTop:0,children:[(0,N.jsx)(a,{dimColor:!0,children:`To enable /vault /agents-platform /memory-stores:`}),(0,N.jsx)(a,{dimColor:!0,children:`Press W to set now (saves to settings.json, no restart needed)`}),(0,N.jsx)(a,{dimColor:!0,children:` — or —`}),(0,N.jsx)(a,{dimColor:!0,children:`1. Open https://console.anthropic.com/settings/keys`}),(0,N.jsx)(a,{dimColor:!0,children:`2. Create a key (sk-ant-api03-*)`}),(0,N.jsx)(a,{dimColor:!0,children:`3. Set ANTHROPIC_API_KEY=<key> and restart`})]}):null}function M({status:e}){return(0,N.jsxs)(c,{flexDirection:`column`,marginBottom:1,children:[(0,N.jsx)(c,{marginBottom:0,children:(0,N.jsx)(a,{bold:!0,children:`Anthropic auth status:`})}),(0,N.jsxs)(c,{marginLeft:2,flexDirection:`column`,children:[(0,N.jsx)(k,{subscription:e.subscription}),(0,N.jsx)(A,{workspaceKey:e.workspaceKey}),(0,N.jsx)(j,{subscription:e.subscription,workspaceKey:e.workspaceKey})]})]})}var N,P=t((()=>{i(),s(),N=u()})),F=r({getAuthStatus:()=>L});function I(e){let t=e.length;return t<20?`[redacted] (${t} chars)`:`${e.slice(0,4)}...${e.slice(-2)} (${t} chars)`}function L(){let e=m(),t=e!==null&&!!e.accessToken,n=null;if(t&&e){let t=e.subscriptionType;n=t===`free`||t===`pro`||t===`max`||t===`team`||t===`enterprise`?t:t==null?null:`unknown`}let r=(process.env.ANTHROPIC_API_KEY??``).trim(),i=_().workspaceApiKey?.trim()??``,a,o;r.length>0?(a=r,o=`env`):i.length>0?(a=i,o=`settings`):(a=``,o=null);let s=a.length>0,c=a.startsWith(R),l=s?I(a):null;return{subscription:{active:t,plan:n,accountEmail:null},workspaceKey:{set:s,prefixValid:c,keyPreview:l,source:o}}}var R,z=t((()=>{ee(),v(),R=`sk-ant-api03-`}));async function ge(e){if(!e||e.trim().length===0)throw Error(`Workspace API key must not be empty.`);let t=e.trim();if(t.length<U)throw Error(`Workspace API key is too short (${t.length} chars). Expected at least ${U} chars starting with "${H}".`);if(t.length>W)throw Error(`Workspace API key is too long (${t.length} chars). Maximum allowed length is ${W} chars.`);if(!t.startsWith(H)){let e=t.slice(0,4);throw Error(`Workspace API key must start with "${H}" (workspace key). Got prefix "${e}...". Obtain a workspace API key from https://console.anthropic.com/settings/keys.`)}try{p(e=>({...e,workspaceApiKey:t}))}catch(e){throw Error(`Failed to save workspace API key to config: ${V(e)}`)}await _e()}async function B(){try{p(e=>{let t={...e};return delete t.workspaceApiKey,t})}catch(e){throw Error(`Failed to remove workspace API key: ${V(e)}`)}}function V(e){return e instanceof Error?e.message.replace(/sk-ant-api03-\S*/g,`[REDACTED]`):`unknown error`}async function _e(){let e=ie();if(process.platform===`win32`){y(Error(`[saveWorkspaceKey] Windows: chmod 600 is not supported. To protect your API key, restrict access to ${e} via icacls or Windows ACL settings.`));return}try{await O.chmod(e,384)}catch(t){y(Error(`[saveWorkspaceKey] Could not set chmod 600 on ${e}: ${V(t)}`))}}var H,U,W,G=t((()=>{re(),v(),ae(),H=`sk-ant-api03-`,U=20,W=256}));function ve(e){if(e.length===0)return``;if(!e.startsWith(J))return e.slice(0,4)+(e.length>4?`...`:``);let t=e.slice(13);return t.length===0?J:`${J}****...${t.slice(-Math.min(4,t.length)).replace(/./g,`*`)}`}function ye(e){return e.length===0?null:e.startsWith(J)?e.length<Y?`Key too short (${e.length}/${Y} chars minimum)`:e.length>X?`Key too long (${e.length}/${X} chars maximum)`:null:`Key must start with "${J}"`}function be({onSave:e,onCancel:t,saving:n=!1,saveError:r=null}){let[i,o]=K.useState(``),[s,u]=K.useState(null),d=ye(i),f=!n&&i.length>=Y&&d===null;l((n,r)=>{if(r.escape){t();return}if(r.return){if(!f)return;u(null),e(i);return}if(r.backspace||r.delete){o(e=>e.slice(0,-1));return}if(n&&n.length>0){let e=n;e.charCodeAt(0)>=32&&e.charCodeAt(0)<=126&&o(t=>{let n=t+e;return n.length<=X?n:t})}},{isActive:!n});let p=ve(i),m=s??r??d;return(0,q.jsxs)(c,{flexDirection:`column`,marginTop:1,children:[(0,q.jsx)(c,{marginBottom:0,children:(0,q.jsx)(a,{bold:!0,children:`Enter workspace API key (sk-ant-api03-*):`})}),(0,q.jsx)(c,{marginTop:0,marginBottom:0,children:(0,q.jsx)(a,{dimColor:!0,children:` Obtain from: https://console.anthropic.com/settings/keys`})}),(0,q.jsxs)(c,{marginTop:1,marginBottom:0,children:[(0,q.jsx)(a,{children:` > `}),i.length>0?(0,q.jsx)(a,{children:p}):(0,q.jsx)(a,{dimColor:!0,children:`[paste key here]`})]}),m!==null&&(0,q.jsx)(c,{marginTop:0,children:(0,q.jsxs)(a,{color:`warning`,children:[` ✗ `,m]})}),n&&(0,q.jsx)(c,{marginTop:0,children:(0,q.jsx)(a,{dimColor:!0,children:` Saving...`})}),(0,q.jsx)(c,{marginTop:1,children:(0,q.jsx)(a,{dimColor:!0,children:f?`Press Enter to save · Esc to cancel`:`Esc to cancel`+(i.length===0?` · start typing your key`:``)})})]})}function xe({onSaved:e,onCancel:t}){let[n,r]=K.useState(!1),[i,a]=K.useState(null),o=K.useCallback(async t=>{r(!0),a(null);try{await ge(t),e()}catch(e){a(e instanceof Error?e.message:`Failed to save key — unknown error`),r(!1)}},[e]);return(0,q.jsx)(be,{onSave:e=>{o(e)},onCancel:t,saving:n,saveError:i})}var K,q,J,Y,X,Se=t((()=>{K=n(i(),1),s(),G(),q=u(),J=`sk-ant-api03-`,Y=20,X=256}));async function Ce(e,t){return(0,$.jsx)(Z,{authStatus:L(),onDone:async n=>{if(t.onChangeAPIKey(),t.setMessages(S),n){f(),de(),x(),ne(),g(),he(),me(),E();let e=t.getAppState();D(e.toolPermissionContext,t.setAppState,e.fastMode),t.setAppState(e=>({...e,authVersion:e.authVersion+1}))}e(n?`Login successful`:`Login interrupted`)}})}function Z(t){let n=C(),[r,i]=Q.useState(!1),[s,u]=Q.useState({phase:`idle`}),[d,f]=Q.useState(t.authStatus),p=d!==void 0&&d.workspaceKey.set,m=p&&d.workspaceKey.source===`settings`,h=Q.useCallback(()=>{let{getAuthStatus:t}=(z(),e(F));f(t())},[]);l(e=>{if(!r){if(s.phase===`confirm-remove`){if(e===`y`||e===`Y`){u({phase:`removing`}),(async()=>{try{await B(),h(),u({phase:`idle`})}catch(e){u({phase:`error`,message:e instanceof Error?e.message:`Failed to remove workspace API key`})}})();return}if(e===`n`||e===`N`){u({phase:`idle`});return}return}if(e===`w`||e===`W`){i(!0);return}(e===`d`||e===`D`)&&m&&u({phase:`confirm-remove`})}},{isActive:!r});let g=Q.useCallback(()=>{h(),i(!1)},[h]),_=Q.useCallback(()=>{i(!1)},[]);return(0,$.jsx)(o,{title:`Login`,onCancel:()=>t.onDone(!1,n),color:`permission`,inputGuide:e=>e.pending?(0,$.jsxs)(a,{children:[`Press `,e.keyName,` again to exit`]}):(0,$.jsx)(ce,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`}),children:(0,$.jsxs)(c,{flexDirection:`column`,children:[d!==void 0&&(0,$.jsx)(c,{marginBottom:1,children:(0,$.jsx)(M,{status:d})}),r?(0,$.jsx)(xe,{onSaved:g,onCancel:_}):s.phase===`confirm-remove`||s.phase===`removing`?(0,$.jsxs)(c,{flexDirection:`column`,marginBottom:1,children:[(0,$.jsxs)(a,{children:[`Remove the saved workspace API key? `,(0,$.jsx)(a,{dimColor:!0,children:`(settings.json only — env var is unaffected)`})]}),(0,$.jsx)(a,{dimColor:!0,children:s.phase===`removing`?`Removing…`:`Press Y to confirm, N to cancel`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(c,{flexDirection:`column`,marginBottom:1,children:[p?m?(0,$.jsx)(a,{dimColor:!0,children:`Press W to replace workspace API key · Press D to remove it`}):(0,$.jsx)(a,{dimColor:!0,children:`Workspace API key from ANTHROPIC_API_KEY env. Press W to override with a settings-saved key.`}):(0,$.jsx)(a,{dimColor:!0,children:`Press W to enter workspace API key (saves to settings, no restart needed)`}),s.phase===`error`&&(0,$.jsx)(a,{color:`error`,children:s.message})]}),(0,$.jsx)(b,{onDone:()=>t.onDone(!0,n),startingMessage:t.startingMessage})]})]})})}var Q,$,we=t((()=>{Q=n(i(),1),d(),pe(),ue(),le(),s(),w(),h(),se(),fe(),oe(),T(),te(),P(),z(),Se(),G(),$=u()}));export{Ce as n,we as r,Z as t};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Cn as t,t as n}from"./src-Di342QoJ.js";import{Ct as r,M as i,cn as a}from"./state-sIHsFpDu.js";import{Bc as o,Ka as s,Uc as c,dn as l,en as u,on as d,oo as f}from"./paths-CEAy4QCs.js";import{n as p,t as m}from"./cwd--iizewsn.js";import{E as h,S as g,T as _,b as v}from"./startupProfiler-CBcN1Chw.js";import{Fr as y,Yr as b}from"./loadAgentsDir-DC4jN6-f.js";import{r as x,t as S}from"./semver-Di5OaTd5.js";import{c as C,s as w,u as T}from"./releaseNotes-CS5L5W0H.js";function E(e){return e>=70?`horizontal`:`compact`}function D(e,t,n){if(t===`horizontal`){let t=n,r=e-(R+B+z+t),i=Math.max(30,r),a=Math.min(t+i+z+B,e-R);return a<t+i+z+B&&(i=a-t-z-B),{leftWidth:t,rightWidth:i,totalWidth:a}}let r=Math.min(e-R,I+20);return{leftWidth:r,rightWidth:r,totalWidth:r}}function O(e,n,r){let i=Math.max(t(e),t(n),t(r),20);return Math.min(i+4,I)}function k(e){return!e||e.length>L?`Welcome back!`:`Welcome back ${e}!`}function A(e,n){if(t(e)<=n)return e;let r=e.split(`/`),i=r[0]||``,a=r[r.length-1]||``,o=t(i),s=t(a);if(r.length===1)return _(e,n);if(i===``&&2+s>=n)return`/${_(a,Math.max(1,n-1))}`;if(i!==``&&3+s>=n)return`…/${_(a,Math.max(1,n-1-1))}`;if(r.length===2)return`${h(i,n-1-1-s)}…/${a}`;let c=n-o-s-1-2;if(c<=0)return`${h(i,Math.max(0,n-s-1-2))}/…/${a}`;let l=[];for(let e=r.length-2;e>0;e--){let n=r[e];if(n&&t(n)+1<=c)l.unshift(n),c-=t(n)+1;else break}return l.length===0?`${i}/…/${a}`:`${i}/…/${l.join(`/`)}/${a}`}async function j(){if(H)return H;let e=r();return H=b(10).then(t=>(V=t.filter(t=>{if(t.isSidechain||t.sessionId===e||t.summary?.includes(`I apologize`))return!1;let n=t.summary&&t.summary!==`No prompt`,r=t.firstPrompt&&t.firstPrompt!==`No prompt`;return n||r}).slice(0,3),V)).catch(()=>(V=[],V)),H}function M(){return V}function N(){let e=process.env.DEMO_VERSION??`2.8.2`,t=i(),n=process.env.DEMO_VERSION?`/code/claude`:o(m());return{version:e,cwd:t?`${n} in ${t.replace(/^https?:\/\//,``)}`:n,billingType:l()?u():`API Usage Billing`,agentName:s().agent}}function P(e,n,r){return t(e)+3+t(n)>r?{shouldSplit:!0,truncatedModel:g(e,r),truncatedBilling:g(n,r)}:{shouldSplit:!1,truncatedModel:g(e,Math.max(r-t(n)-3,10)),truncatedBilling:n}}function F(e){if(process.env.USER_TYPE===`ant`)return[];let t=w();if(!t)return[];let n;try{n=T(t)}catch{return[]}let r=[],i=Object.keys(n).sort((e,t)=>S(e,t)?-1:1).slice(0,3);for(let e of i){let t=n[e];t&&r.push(...t)}return r.slice(0,e)}var I,L,R,z,B,V,H,U=e((()=>{a(),n(),d(),p(),c(),v(),C(),x(),y(),f(),I=50,L=20,R=4,z=1,B=2,V=[],H=null}));export{E as a,M as c,A as d,k as i,F as l,O as n,N as o,P as r,j as s,D as t,U as u};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Cn as t,t as n}from"./src-Di342QoJ.js";import{Ct as r,M as i,cn as a}from"./state-sIHsFpDu.js";import{Bc as o,Ka as s,Uc as c,dn as l,en as u,on as d,oo as f}from"./paths-nIHVpTn2.js";import{n as p,t as m}from"./cwd--iizewsn.js";import{E as h,S as g,T as _,b as v}from"./startupProfiler-CBcN1Chw.js";import{Lr as y,Zr as b}from"./loadAgentsDir-BfEZacjM.js";import{r as x,t as S}from"./semver-Di5OaTd5.js";import{c as C,s as w,u as T}from"./releaseNotes-C7-JnhrH.js";function E(e){return e>=70?`horizontal`:`compact`}function D(e,t,n){if(t===`horizontal`){let t=n,r=e-(R+B+z+t),i=Math.max(30,r),a=Math.min(t+i+z+B,e-R);return a<t+i+z+B&&(i=a-t-z-B),{leftWidth:t,rightWidth:i,totalWidth:a}}let r=Math.min(e-R,I+20);return{leftWidth:r,rightWidth:r,totalWidth:r}}function O(e,n,r){let i=Math.max(t(e),t(n),t(r),20);return Math.min(i+4,I)}function k(e){return!e||e.length>L?`Welcome back!`:`Welcome back ${e}!`}function A(e,n){if(t(e)<=n)return e;let r=e.split(`/`),i=r[0]||``,a=r[r.length-1]||``,o=t(i),s=t(a);if(r.length===1)return _(e,n);if(i===``&&2+s>=n)return`/${_(a,Math.max(1,n-1))}`;if(i!==``&&3+s>=n)return`…/${_(a,Math.max(1,n-1-1))}`;if(r.length===2)return`${h(i,n-1-1-s)}…/${a}`;let c=n-o-s-1-2;if(c<=0)return`${h(i,Math.max(0,n-s-1-2))}/…/${a}`;let l=[];for(let e=r.length-2;e>0;e--){let n=r[e];if(n&&t(n)+1<=c)l.unshift(n),c-=t(n)+1;else break}return l.length===0?`${i}/…/${a}`:`${i}/…/${l.join(`/`)}/${a}`}async function j(){if(H)return H;let e=r();return H=b(10).then(t=>(V=t.filter(t=>{if(t.isSidechain||t.sessionId===e||t.summary?.includes(`I apologize`))return!1;let n=t.summary&&t.summary!==`No prompt`,r=t.firstPrompt&&t.firstPrompt!==`No prompt`;return n||r}).slice(0,3),V)).catch(()=>(V=[],V)),H}function M(){return V}function N(){let e=process.env.DEMO_VERSION??`2.8.3`,t=i(),n=process.env.DEMO_VERSION?`/code/claude`:o(m());return{version:e,cwd:t?`${n} in ${t.replace(/^https?:\/\//,``)}`:n,billingType:l()?u():`API Usage Billing`,agentName:s().agent}}function P(e,n,r){return t(e)+3+t(n)>r?{shouldSplit:!0,truncatedModel:g(e,r),truncatedBilling:g(n,r)}:{shouldSplit:!1,truncatedModel:g(e,Math.max(r-t(n)-3,10)),truncatedBilling:n}}function F(e){if(process.env.USER_TYPE===`ant`)return[];let t=w();if(!t)return[];let n;try{n=T(t)}catch{return[]}let r=[],i=Object.keys(n).sort((e,t)=>S(e,t)?-1:1).slice(0,3);for(let e of i){let t=n[e];t&&r.push(...t)}return r.slice(0,e)}var I,L,R,z,B,V,H,U=e((()=>{a(),n(),d(),p(),c(),v(),C(),x(),y(),f(),I=50,L=20,R=4,z=1,B=2,V=[],H=null}));export{E as a,M as c,A as d,k as i,F as l,O as n,N as o,P as r,j as s,D as t,U as u};
@@ -0,0 +1 @@
1
+ import{aE as e,iE as t,oE as n,rE as r}from"./loadAgentsDir-BfEZacjM.js";e();export{r as call,t as clearAuthRelatedCaches,n as performLogout};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{Dr as r,Pr as i,nc as a,rc as o}from"./paths-CEAy4QCs.js";import{K as s,U as c,_ as l,h as u}from"./debug-otxXY3j-.js";import{Eo as d,Jc as f,Kc as p,O_ as m,Tj as h,Uo as g,Vo as _,aO as v,iO as y,k_ as b,qc as x,yj as S}from"./loadAgentsDir-DC4jN6-f.js";import{Hn as C,zn as w}from"./prompt-BHI7PZe4.js";import{i as T,o as E}from"./fileStateCache-BhVfo23e.js";import{join as D}from"path";function O(){return`IMPORTANT: This message and these instructions are NOT part of the actual user conversation. Do NOT include any references to "documentation updates", "magic docs", or these update instructions in the document content.
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{Dr as r,Pr as i,nc as a,rc as o}from"./paths-nIHVpTn2.js";import{K as s,U as c,_ as l,h as u}from"./debug-otxXY3j-.js";import{A_ as d,Dj as f,Go as p,Jc as m,Oo as h,Uo as g,Xc as _,Yc as v,j_ as y,oO as b,sO as x,xj as S}from"./loadAgentsDir-BfEZacjM.js";import{Hn as C,zn as w}from"./prompt-DgIuTC6Q.js";import{i as T,o as E}from"./fileStateCache-BhVfo23e.js";import{join as D}from"path";function O(){return`IMPORTANT: This message and these instructions are NOT part of the actual user conversation. Do NOT include any references to "documentation updates", "magic docs", or these update instructions in the document content.
2
2
 
3
3
  Based on the user conversation above (EXCLUDING this documentation update instruction message), update the Magic Doc file to incorporate any NEW learnings, insights, or information that would be valuable to preserve.
4
4
 
@@ -54,4 +54,4 @@ The document author has provided specific instructions for how this file should
54
54
 
55
55
  "${i}"
56
56
 
57
- These instructions take priority over the general rules below. Make sure your updates align with these specific guidelines.`:``,s=r();return A(a,{docContents:e,docPath:t,docTitle:n,customInstructions:o,CLAUDE_EFFORT:S(s,void 0),CLAUDE_MODEL:s,CLAUDE_CWD:process.cwd()})}var M=e((()=>{n(),l(),h(),i()}));function N(){V.clear()}function P(e){let t=e.match(z);if(!t||!t[1])return null;let n=t[1].trim(),r=t.index+t[0].length,i=e.slice(r).match(/^\s*\n(?:\s*\n)?(.+?)(?:\n|$)/);if(i&&i[1]){let e=i[1].match(B);if(e&&e[1])return{title:n,instructions:e[1].trim()}}return{title:n}}function F(e){V.has(e)||V.set(e,{path:e})}function I(){return{agentType:`magic-docs`,whenToUse:`Update Magic Docs`,tools:[w],model:`sonnet`,source:`built-in`,baseDir:`built-in`,getSystemPrompt:()=>``}}async function L(e,t){let{messages:n,systemPrompt:r,userContext:i,systemContext:a,toolUseContext:o}=t,c=T(o.readFileState);c.delete(e.path);let l={...o,readFileState:c},u=``;try{let t=(await p.call({file_path:e.path},l)).data;t.type===`text`&&(u=t.file.content)}catch(t){if(s(t)||t instanceof Error&&t.message.startsWith(`File does not exist`)){V.delete(e.path);return}throw t}let f=P(u);if(!f){V.delete(e.path);return}let m=await j(u,e.path,f.title,f.instructions),h=async(t,n)=>{if(t.name===`Edit`&&typeof n==`object`&&n&&`file_path`in n){let t=n.file_path;if(typeof t==`string`&&t===e.path)return{behavior:`allow`,updatedInput:n}}return{behavior:`deny`,message:`only ${w} is allowed for ${e.path}`,decisionReason:{type:`other`,reason:`only ${w} is allowed`}}};for await(let e of b({agentDefinition:I(),promptMessages:[d({content:m})],toolUseContext:l,canUseTool:h,isAsync:!0,forkContextMessages:n,querySource:`magic_docs`,override:{systemPrompt:r,userContext:i,systemContext:a},availableTools:l.options.tools}));}async function R(){process.env.USER_TYPE===`ant`&&(f((e,t)=>{P(t)&&F(e)}),v(H))}var z,B,V,H,U=e((()=>{m(),C(),x(),c(),E(),y(),g(),a(),M(),z=/^#\s*MAGIC\s+DOC:\s*(.+)$/im,B=/^[_*](.+?)[_*]\s*$/m,V=new Map,H=o(async function(e){let{messages:t,querySource:n}=e;if(n===`repl_main_thread`&&!_(t)&&V.size!==0)for(let t of Array.from(V.values()))await L(t,e)})}));export{R as n,U as r,N as t};
57
+ These instructions take priority over the general rules below. Make sure your updates align with these specific guidelines.`:``,s=r();return A(a,{docContents:e,docPath:t,docTitle:n,customInstructions:o,CLAUDE_EFFORT:S(s,void 0),CLAUDE_MODEL:s,CLAUDE_CWD:process.cwd()})}var M=e((()=>{n(),l(),f(),i()}));function N(){V.clear()}function P(e){let t=e.match(z);if(!t||!t[1])return null;let n=t[1].trim(),r=t.index+t[0].length,i=e.slice(r).match(/^\s*\n(?:\s*\n)?(.+?)(?:\n|$)/);if(i&&i[1]){let e=i[1].match(B);if(e&&e[1])return{title:n,instructions:e[1].trim()}}return{title:n}}function F(e){V.has(e)||V.set(e,{path:e})}function I(){return{agentType:`magic-docs`,whenToUse:`Update Magic Docs`,tools:[w],model:`sonnet`,source:`built-in`,baseDir:`built-in`,getSystemPrompt:()=>``}}async function L(e,t){let{messages:n,systemPrompt:r,userContext:i,systemContext:a,toolUseContext:o}=t,c=T(o.readFileState);c.delete(e.path);let l={...o,readFileState:c},u=``;try{let t=(await m.call({file_path:e.path},l)).data;t.type===`text`&&(u=t.file.content)}catch(t){if(s(t)||t instanceof Error&&t.message.startsWith(`File does not exist`)){V.delete(e.path);return}throw t}let d=P(u);if(!d){V.delete(e.path);return}let f=await j(u,e.path,d.title,d.instructions),p=async(t,n)=>{if(t.name===`Edit`&&typeof n==`object`&&n&&`file_path`in n){let t=n.file_path;if(typeof t==`string`&&t===e.path)return{behavior:`allow`,updatedInput:n}}return{behavior:`deny`,message:`only ${w} is allowed for ${e.path}`,decisionReason:{type:`other`,reason:`only ${w} is allowed`}}};for await(let e of y({agentDefinition:I(),promptMessages:[h({content:f})],toolUseContext:l,canUseTool:p,isAsync:!0,forkContextMessages:n,querySource:`magic_docs`,override:{systemPrompt:r,userContext:i,systemContext:a},availableTools:l.options.tools}));}async function R(){process.env.USER_TYPE===`ant`&&(_((e,t)=>{P(t)&&F(e)}),x(H))}var z,B,V,H,U=e((()=>{d(),C(),v(),c(),E(),b(),p(),a(),M(),z=/^#\s*MAGIC\s+DOC:\s*(.+)$/im,B=/^[_*](.+?)[_*]\s*$/m,V=new Map,H=o(async function(e){let{messages:t,querySource:n}=e;if(n===`repl_main_thread`&&!g(t)&&V.size!==0)for(let t of Array.from(V.values()))await L(t,e)})}));export{R as n,U as r,N as t};