claude-code-best 2.8.1 → 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 (445) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/{AddWorkspaceDirectory-CNyPaerF.js → AddWorkspaceDirectory-CM5PYqoF.js} +1 -1
  3. package/dist/chunks/{App-hiKxO6UA.js → App-BLLQEMkd.js} +1 -1
  4. package/dist/chunks/ApproveApiKey-AMXQPmfE.js +1 -0
  5. package/dist/chunks/{ApproveApiKey-Cd43j9Wa.js → ApproveApiKey-DrflOSA-.js} +1 -1
  6. package/dist/chunks/{AssistantSessionChooser-C8OxwSGM.js → AssistantSessionChooser-SlRne98s.js} +1 -1
  7. package/dist/chunks/BackgroundTasksDialog-Cciww_FF.js +2 -0
  8. package/dist/chunks/{BypassPermissionsModeDialog-Ddjzluka.js → BypassPermissionsModeDialog-HaciDdx0.js} +1 -1
  9. package/dist/chunks/{ClaudeInChromeOnboarding-BhvrEJlm.js → ClaudeInChromeOnboarding-EA3k_q2M.js} +1 -1
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-C-T8G8O7.js +1 -0
  11. package/dist/chunks/{ClaudeMdExternalIncludesDialog-DoNd72PS.js → ClaudeMdExternalIncludesDialog-xBclyqKk.js} +1 -1
  12. package/dist/chunks/ConsoleOAuthFlow-BTN62PKj.js +1 -0
  13. package/dist/chunks/{DesktopHandoff-DVUOZjb0.js → DesktopHandoff-BhY_F3Ob.js} +1 -1
  14. package/dist/chunks/{DevChannelsDialog-DJbRHAIy.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-BPbtGcEg.js → ExitFlow-cRfxceuS.js} +2 -2
  19. package/dist/chunks/{Feedback-BSagYjmf.js → Feedback-BMv8Kt05.js} +2 -2
  20. package/dist/chunks/Grove-CRAZGlvf.js +1 -0
  21. package/dist/chunks/{Grove-BrP9JNpK.js → Grove-CjfR7Acp.js} +1 -1
  22. package/dist/chunks/{HybridTransport-DLaxmXCR.js → HybridTransport-D32dn9xc.js} +1 -1
  23. package/dist/chunks/{ITermBackend-tXN55G2D.js → ITermBackend-BxjzkptA.js} +1 -1
  24. package/dist/chunks/{InvalidConfigDialog-BzFQdfwu.js → InvalidConfigDialog-CnCOCqMT.js} +1 -1
  25. package/dist/chunks/{InvalidSettingsDialog-KFg61s41.js → InvalidSettingsDialog-CLOgpfR2.js} +1 -1
  26. package/dist/chunks/MCPConnectionManager-BhbT4Sah.js +1 -0
  27. package/dist/chunks/{McpParsingWarnings-DsHSSgsx.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-DBJX6Cnf.js → Onboarding-Co5P3gZs.js} +1 -1
  31. package/dist/chunks/{OverageCreditUpsell-B4beCEX2.js → OverageCreditUpsell-DjgcfVt2.js} +1 -1
  32. package/dist/chunks/PluginSettings-NB-Wod-9.js +17 -0
  33. package/dist/chunks/{PromptInputHelpMenu-Bjjr3tYl.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-CXcCBQuz.js → REPL-DCm_BFr_.js} +36 -36
  37. package/dist/chunks/{RemoteCallout-CuxqarhC.js → RemoteCallout-dGnKRIDB.js} +1 -1
  38. package/dist/chunks/{RemoteSessionManager-BhPF41Wn.js → RemoteSessionManager-BidAIOqZ.js} +2 -2
  39. package/dist/chunks/ResumeConversation-SDRT6hO3.js +1 -0
  40. package/dist/chunks/{SSETransport-8yaTbdSK.js → SSETransport-BM2xz03M.js} +1 -1
  41. package/dist/chunks/SearchExtraToolsTool-DCSReOsq.js +1 -0
  42. package/dist/chunks/{SentryErrorBoundary-ydwbrVTx.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-CNcl_DxR.js → TeleportProgress-Dg6HcEO9.js} +1 -1
  46. package/dist/chunks/{TeleportRepoMismatchDialog-DJc8_mjE.js → TeleportRepoMismatchDialog-BUKNU2jx.js} +1 -1
  47. package/dist/chunks/{TeleportResumeWrapper-Cw438s-J.js → TeleportResumeWrapper-5FTzA9R_.js} +1 -1
  48. package/dist/chunks/{ThemePicker-8X6yAwuQ.js → ThemePicker-Bdm12PmJ.js} +1 -1
  49. package/dist/chunks/{TmuxBackend-CqAnVFoI.js → TmuxBackend-CYx3Hdf1.js} +2 -2
  50. package/dist/chunks/{TrustDialog-Ch1FJzxi.js → TrustDialog-DGKf4iwh.js} +1 -1
  51. package/dist/chunks/{ValidationErrorsList-sgfvJPWZ.js → ValidationErrorsList-BP7vG1uX.js} +1 -1
  52. package/dist/chunks/{WelcomeV2-Bu8l3w90.js → WelcomeV2-k_969SnB.js} +1 -1
  53. package/dist/chunks/{WindowsTerminalBackend-Bvq7nHOp.js → WindowsTerminalBackend-K_zVZBSP.js} +2 -2
  54. package/dist/chunks/{add-dir-DqrRNnxe.js → add-dir-DnfUkb1n.js} +1 -1
  55. package/dist/chunks/{agentDisplay-DcxzWi1v.js → agentDisplay-DT04Kqdm.js} +1 -1
  56. package/dist/chunks/{agents-Do1ynqiW.js → agents-ELZyUElQ.js} +7 -7
  57. package/dist/chunks/{agents-QqLm1wcM.js → agents-hh7Zcqm6.js} +1 -1
  58. package/dist/chunks/{ant-D5gD6O-r.js → ant-CuQC6xHS.js} +1 -1
  59. package/dist/chunks/api-BY3NFL4L.js +1 -0
  60. package/dist/chunks/{api-hcsOinLV.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-CemNvrYr.js → assistant-DbtrknMt.js} +1 -1
  65. package/dist/chunks/{assistant-DkECAILU.js → assistant-Z-xFHPiY.js} +1 -1
  66. package/dist/chunks/{auth-Dm8aWPRh.js → auth-Bo_eeRO9.js} +1 -1
  67. package/dist/chunks/auth-C-rD91K7.js +1 -0
  68. package/dist/chunks/{autoMode-dygqoN_C.js → autoMode-BhsFtU8_.js} +6 -6
  69. package/dist/chunks/{autonomy-BdxnxJnk.js → autonomy-B-d3Xamr.js} +1 -1
  70. package/dist/chunks/{autonomy-DPeEmb00.js → autonomy-C5wE-5B8.js} +12 -12
  71. package/dist/chunks/{autonomyPanel-Bocl2taZ.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-DwdVgun5.js → branch-DoV3sEJf.js} +2 -2
  75. package/dist/chunks/{bridge-DkkMogD_.js → bridge-8RYx23zW.js} +2 -2
  76. package/dist/chunks/{bridgeConfig-l6Ldi_hk.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-DYclTb9d.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-CYe1Cixl.js → bridgeMessaging-DGTm_wDk.js} +1 -1
  83. package/dist/chunks/{btw-CyOlY5R-.js → btw-Du0mHeiD.js} +1 -1
  84. package/dist/chunks/{buddy-q-utA1_5.js → buddy-D04AYSW6.js} +1 -1
  85. package/dist/chunks/{bypassPermissionsKillswitch-CTrRxzdz.js → bypassPermissionsKillswitch-CRYkShwu.js} +1 -1
  86. package/dist/chunks/caches-Byd8SjTZ.js +1 -0
  87. package/dist/chunks/{caches-Bz4yVQyE.js → caches-DYf69-N9.js} +2 -2
  88. package/dist/chunks/{ccrClient-DXiEw9xU.js → ccrClient-CDrBxSox.js} +1 -1
  89. package/dist/chunks/changeDetector-CGzGs92S.js +1 -0
  90. package/dist/chunks/{channelNotification-CLPdvxGZ.js → channelNotification-CtA9HHFW.js} +1 -1
  91. package/dist/chunks/channelNotification-DOvTvOGt.js +1 -0
  92. package/dist/chunks/{chrome-DxbhLWDW.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-CJXF8wMs.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-rXSt0nmz.js → companion-ChxkOPHB.js} +1 -1
  101. package/dist/chunks/{config-BE3jrcr-.js → config-cRyRIPI7.js} +1 -1
  102. package/dist/chunks/{config-CzC08IjE.js → config-wvQYYbwU.js} +1 -1
  103. package/dist/chunks/{context-BHE99SMA.js → context-7ds9guuJ.js} +1 -1
  104. package/dist/chunks/{context-noninteractive-BZQIUH_y.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-TgphIVzy.js → copy-Dvz2Mge4.js} +2 -2
  109. package/dist/chunks/{createSSHSession-CSKEZ4ic.js → createSSHSession-Befx8LiM.js} +1 -1
  110. package/dist/chunks/createSession-Cp0KTjPL.js +1 -0
  111. package/dist/chunks/{createSession-Ce218tQj.js → createSession-CsZGoika.js} +1 -1
  112. package/dist/chunks/{cronJitterConfig-CnKed5Gi.js → cronJitterConfig-Dfl7iZqE.js} +3 -3
  113. package/dist/chunks/{crossProjectResume-BFlsTYOq.js → crossProjectResume-DK8nt_cn.js} +3 -3
  114. package/dist/chunks/{datadog-D5jSRybW.js → datadog-2vPhbh6g.js} +1 -1
  115. package/dist/chunks/datadog-DLTYg-S2.js +1 -0
  116. package/dist/chunks/{desktop-cjA0tGOa.js → desktop-DY9Nw2Fi.js} +1 -1
  117. package/dist/chunks/{diff-DMd61IjE.js → diff-Ci6rs6S6.js} +1 -1
  118. package/dist/chunks/{directoryCompletion-DqtWZsoW.js → directoryCompletion-DLxCFk_m.js} +1 -1
  119. package/dist/chunks/{doctor-ueUYyjyL.js → doctor-DBYGgS-y.js} +1 -1
  120. package/dist/chunks/{effort-B9IvAstG.js → effort-Bi_t4J_o.js} +2 -2
  121. package/dist/chunks/{entry-Bq_KRMWs.js → entry-p_5l64_p.js} +5 -5
  122. package/dist/chunks/{envLessBridgeConfig-CpjlwmvF.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-CP638-TO.js → export-kvnEu9Iw.js} +1 -1
  126. package/dist/chunks/{exportRenderer-B5emJDvn.js → exportRenderer-DmpMgUiv.js} +1 -1
  127. package/dist/chunks/extra-usage-BnO6knuC.js +1 -0
  128. package/dist/chunks/{extra-usage-DIm8nrKj.js → extra-usage-CmP6V7HX.js} +1 -1
  129. package/dist/chunks/{extra-usage-core-DERKSEe1.js → extra-usage-core-BqJClmf4.js} +1 -1
  130. package/dist/chunks/{extra-usage-noninteractive-Dq5dog_-.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-BP2t1xDM.js → fast-Dd2jZVF-.js} +1 -1
  135. package/dist/chunks/{feedback-C-mR6zJr.js → feedback-8UeDx3Yc.js} +1 -1
  136. package/dist/chunks/{firstPartyEventLogger-sMmHdYjg.js → firstPartyEventLogger-cKEuzfyR.js} +1 -1
  137. package/dist/chunks/{flushGate-C18XwNsa.js → flushGate-B3upNVdV.js} +1 -1
  138. package/dist/chunks/{gates-Be5r2kKS.js → gates-lWoKqpJ1.js} +1 -1
  139. package/dist/chunks/gates-uo2owWkc.js +1 -0
  140. package/dist/chunks/{gemini-BberPcp1.js → gemini-DDSP4ArG.js} +1 -1
  141. package/dist/chunks/{generateRecap-B76UcVUS.js → generateRecap-DCBzHqag.js} +1 -1
  142. package/dist/chunks/{generateSessionName-BwtXd8TC.js → generateSessionName-Db5pZ3cL.js} +1 -1
  143. package/dist/chunks/{githubRepoPathMapping-5IlVgR2l.js → githubRepoPathMapping-v_U9b0Fe.js} +1 -1
  144. package/dist/chunks/{goal-DQ0jNcLO.js → goal-EZCOCHZa.js} +3 -3
  145. package/dist/chunks/{grok-Dh_thT2_.js → grok-H8K_fDKF.js} +1 -1
  146. package/dist/chunks/{growthbook-4ADV3CAt.js → growthbook-mMD0jkbu.js} +1 -1
  147. package/dist/chunks/{heapdump-Dwqmh4SX.js → heapdump-CbVvtQuH.js} +1 -1
  148. package/dist/chunks/{help-Bznaywoi.js → help-Bq4jxCSJ.js} +1 -1
  149. package/dist/chunks/hooks-CVlFJfV0.js +1 -0
  150. package/dist/chunks/{hooks-F-82cg6M.js → hooks-DbKUS0fN.js} +2 -2
  151. package/dist/chunks/{hostAdapter-DpfLr3hX.js → hostAdapter-BhVpIn1Y.js} +1 -1
  152. package/dist/chunks/{ide-BfAKWufQ.js → ide-DZJheXyl.js} +2 -2
  153. package/dist/chunks/{inboundAttachments-CFV_eqMu.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-BNsCwNYa.js → insights-D1BFvhw_.js} +68 -68
  157. package/dist/chunks/{install-Bszzs98N.js → install-D_xm-9s1.js} +1 -1
  158. package/dist/chunks/{install-github-app-DVxGR2rp.js → install-github-app-CUEACXdr.js} +2 -2
  159. package/dist/chunks/{install-slack-app-CjlRL19o.js → install-slack-app-DGV6l9wy.js} +1 -1
  160. package/dist/chunks/{instrumentation-BOYPOtyu.js → instrumentation-CEfWNakt.js} +3 -3
  161. package/dist/chunks/{job-BvD5_lGz.js → job-BeeAFieV.js} +1 -1
  162. package/dist/chunks/{keybindings-RPmPPGhp.js → keybindings-CeYhuE5G.js} +2 -2
  163. package/dist/chunks/{lang-9VNaOJMz.js → lang-BmwAsgo1.js} +1 -1
  164. package/dist/chunks/{language-Ct5Nkqm6.js → language-BcWiv2lr.js} +1 -1
  165. package/dist/chunks/language-BnQye2Mx.js +1 -0
  166. package/dist/chunks/{launchAgentsPlatform-CnoxFIXV.js → launchAgentsPlatform-DqQzwcqV.js} +1 -1
  167. package/dist/chunks/{launchAutofixPr-ChaDUtvx.js → launchAutofixPr-XltBpICW.js} +3 -3
  168. package/dist/chunks/{launchLocalMemory-MwZfEJxz.js → launchLocalMemory-CHSU4_or.js} +2 -2
  169. package/dist/chunks/{launchLocalVault-B6Ib5WXx.js → launchLocalVault-CnvCdQ1M.js} +3 -3
  170. package/dist/chunks/{launchMemoryStores-D6xyGwQ1.js → launchMemoryStores-DD2duIDU.js} +1 -1
  171. package/dist/chunks/{launchOnboarding-BtdAOO3p.js → launchOnboarding-JTKef_jU.js} +1 -1
  172. package/dist/chunks/{launchSchedule-XVljzNKg.js → launchSchedule-BVtfNQtS.js} +1 -1
  173. package/dist/chunks/{launchSkillStore-QT8Qcc5N.js → launchSkillStore-TisTmZ3O.js} +1 -1
  174. package/dist/chunks/{launchTeleport-DwxPesKQ.js → launchTeleport-BO_V6ggj.js} +3 -3
  175. package/dist/chunks/{launchVault-Dbti6pph.js → launchVault-Civro2KB.js} +1 -1
  176. package/dist/chunks/{loadAgentsDir-BYWykYwn.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-eWjZxMc8.js → localSearch-COJcqOWl.js} +1 -1
  181. package/dist/chunks/login-B4wjtpEU.js +1 -0
  182. package/dist/chunks/{login-D1aQCqp0.js → login-SuUxFLIY.js} +1 -1
  183. package/dist/chunks/{logoV2Utils-CPNvLtol.js → logoV2Utils-DvjpZkyF.js} +1 -1
  184. package/dist/chunks/logout-o16yNWNB.js +1 -0
  185. package/dist/chunks/{magicDocs-DAvjAbAJ.js → magicDocs-BZBrH9zB.js} +2 -2
  186. package/dist/chunks/{main-BKlQiSuc.js → main-p9Tke3lb.js} +90 -63
  187. package/dist/chunks/mappers-BcXg_fI3.js +1 -0
  188. package/dist/chunks/mcp-BFxLEf3X.js +1 -0
  189. package/dist/chunks/{mcp-ya96irNP.js → mcp-CIJL0PTq.js} +2 -2
  190. package/dist/chunks/mcp-DfuQ1MJu.js +6 -0
  191. package/dist/chunks/{mcpServer-B1q9blAc.js → mcpServer-D2kI_m2H.js} +1 -1
  192. package/dist/chunks/{mcpServer-BJB5g6j2.js → mcpServer-DPk-oJOU.js} +1 -1
  193. package/dist/chunks/{memory-CxiukAGg.js → memory-CJOtY_Uv.js} +1 -1
  194. package/dist/chunks/{mode-DqAJ2y6R.js → mode-DkpKiyTE.js} +1 -1
  195. package/dist/chunks/{model-C8TW-qjl.js → model-DZyzd39E.js} +1 -1
  196. package/dist/chunks/model-De0AGQ3F.js +1 -0
  197. package/dist/chunks/{onChangeAppState-BG1pF7ht.js → onChangeAppState-CvtxqUDG.js} +1 -1
  198. package/dist/chunks/{openai-CHoRhRtf.js → openai-B888nVou.js} +3 -3
  199. package/dist/chunks/{overageCreditGrant-DYMg1lV4.js → overageCreditGrant-BOSyVk3U.js} +1 -1
  200. package/dist/chunks/{panelCall-SYrmrKt9.js → panelCall-BVdu8oii.js} +1 -1
  201. package/dist/chunks/{passes-CSV-SZJc.js → passes-DeSsjipz.js} +1 -1
  202. package/dist/chunks/{path-BE28AJwZ.js → path-Cit7LKW-.js} +1 -1
  203. package/dist/chunks/{paths-BZjPDxMm.js → paths-nIHVpTn2.js} +3 -3
  204. package/dist/chunks/permissions-DGdr-wOj.js +3 -0
  205. package/dist/chunks/{pipeTransport-uK7GxbSG.js → pipeTransport-ClZYq1sd.js} +1 -1
  206. package/dist/chunks/{plan-DEbo-Adi.js → plan-D9bnkDwv.js} +1 -1
  207. package/dist/chunks/{plugin-Cops24hg.js → plugin-BE0r1g1g.js} +1 -1
  208. package/dist/chunks/{pluginAutoupdate-Bg7JMOHN.js → pluginAutoupdate-xyXksEJv.js} +1 -1
  209. package/dist/chunks/pluginBlocklist-Dd7XBe8U.js +1 -0
  210. package/dist/chunks/{pluginCliCommands-DyYEg7Cv.js → pluginCliCommands-8MJCk1nq.js} +1 -1
  211. package/dist/chunks/{pluginFlagging-DwChUZMJ.js → pluginFlagging-7zuXXBD5.js} +1 -1
  212. package/dist/chunks/pluginOperations-DFzbASMD.js +2 -0
  213. package/dist/chunks/{pluginStartupCheck-DCxJJkYs.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-DBNHhvHf.js → pollConfig-B3hNYQ_n.js} +1 -1
  218. package/dist/chunks/{poor-aPQce502.js → poor-BjTGCuqc.js} +1 -1
  219. package/dist/chunks/{poorMode-CFRuV-nB.js → poorMode-CGVMMLlz.js} +1 -1
  220. package/dist/chunks/poorMode-DWLhTldO.js +1 -0
  221. package/dist/chunks/{print-Cf2tY__0.js → print-BJkyuCzw.js} +11 -11
  222. package/dist/chunks/{privacy-settings-CYkM3Aem.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-DgIuTC6Q.js +227 -0
  227. package/dist/chunks/prompt-Fax-fxAf.js +1 -0
  228. package/dist/chunks/{promptEditor-U03qQWbq.js → promptEditor-BkHY_Vzb.js} +2 -2
  229. package/dist/chunks/{protocolHandler-3yBj9w5N.js → protocolHandler-CrXWRkxh.js} +1 -1
  230. package/dist/chunks/rate-limit-options-skMSi19l.js +1 -0
  231. package/dist/chunks/{rcDebugLog-ClX1msJX.js → rcDebugLog-Bv_x5w_B.js} +1 -1
  232. package/dist/chunks/{referral-qe-yqXJE.js → referral-DfKWr4Jf.js} +1 -1
  233. package/dist/chunks/refresh-zosTlttX.js +1 -0
  234. package/dist/chunks/{registerProtocol-CClQph00.js → registerProtocol-De6y1iOi.js} +1 -1
  235. package/dist/chunks/registry-C8JbYbJI.js +1 -0
  236. package/dist/chunks/{release-notes-CyZHxWTF.js → release-notes-Su1UPyE4.js} +1 -1
  237. package/dist/chunks/{releaseNotes-BtxL5R5Q.js → releaseNotes-C7-JnhrH.js} +2 -2
  238. package/dist/chunks/{reload-plugins-B0eR8JHH.js → reload-plugins-C8lWCq8M.js} +1 -1
  239. package/dist/chunks/{remote-env-B_sIjY87.js → remote-env-tQuvJmrt.js} +1 -1
  240. package/dist/chunks/{remoteBridgeCore-C3WRaLpU.js → remoteBridgeCore-CwOTDmNP.js} +1 -1
  241. package/dist/chunks/{remoteControlServer-BOj9qmgH.js → remoteControlServer-DIKi-0lr.js} +2 -2
  242. package/dist/chunks/rename-Trg9EHjT.js +1 -0
  243. package/dist/chunks/{resume-CpivBr9S.js → resume-Nt_EbjKh.js} +2 -2
  244. package/dist/chunks/{runtimeObserver-sOnfVR7t.js → runtimeObserver-CyWhTJpz.js} +4 -4
  245. package/dist/chunks/{runtimeObserver-C2_7Vsnd.js → runtimeObserver-T9QERJ_O.js} +1 -1
  246. package/dist/chunks/sandbox-adapter-BDGhDrPl.js +1 -0
  247. package/dist/chunks/{sandbox-toggle-Bv68-Ca7.js → sandbox-toggle-C6v31S7-.js} +1 -1
  248. package/dist/chunks/searchExtraTools-C8ehknh0.js +1 -0
  249. package/dist/chunks/{sentry-BBCn6RGP.js → sentry-CK_GHX79.js} +1 -1
  250. package/dist/chunks/{session-DfvxYP8o.js → session-Ys3KvmQ0.js} +1 -1
  251. package/dist/chunks/{sessionDiscovery-CyuRBTAm.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-CTkIYplM.js → sessionObserver-DvAdG6vQ.js} +2 -2
  258. package/dist/chunks/sessionStorage-GKe4ALVr.js +1 -0
  259. package/dist/chunks/{sessionTitle-ePQRpeV2.js → sessionTitle-DJMmUKBJ.js} +2 -2
  260. package/dist/chunks/{sessionTracing-81-RIJBo.js → sessionTracing-DuQ3kbq6.js} +1 -1
  261. package/dist/chunks/{settingsSync-DEFWnE1o.js → settingsSync-1mhDakFG.js} +1 -1
  262. package/dist/chunks/{setup-CTfYsKsz.js → setup-CAy0HkI3.js} +1 -1
  263. package/dist/chunks/setup-CGxUKG8x.js +3 -0
  264. package/dist/chunks/{setup-2611vmGJ.js → setup-D5ioKRsS.js} +1 -1
  265. package/dist/chunks/{shadowedRuleDetection-CGD7Nx03.js → shadowedRuleDetection-Cq0y9pLR.js} +1 -1
  266. package/dist/chunks/{sideQuestion-BcP9Mm-5.js → sideQuestion-ZII6LMSM.js} +3 -3
  267. package/dist/chunks/{sink-D_t1TIt9.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-DXsozhmS.js → sinks-DZlIEjLZ.js} +2 -2
  271. package/dist/chunks/{skill-learning-CZm2iMik.js → skill-learning-DO21PjpF.js} +1 -1
  272. package/dist/chunks/skillChangeDetector-B6tL2yC9.js +1 -0
  273. package/dist/chunks/{skillGapStore-DzHv8v-D.js → skillGapStore-B_xv3GUy.js} +1 -1
  274. package/dist/chunks/{skillGapStore-cWo6Ra90.js → skillGapStore-CTD8MYTx.js} +2 -2
  275. package/dist/chunks/{skillGenerator-D_W1IeP3.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-ChmOZu4F.js → skillPanel-DSumFGKN.js} +3 -3
  279. package/dist/chunks/{skillSearchPanel-CVx2b4Pr.js → skillSearchPanel-SqkfYBjV.js} +4 -4
  280. package/dist/chunks/{skills-CWX1SydA.js → skills-Bj3g5apl.js} +1 -1
  281. package/dist/chunks/{sprites-BuvEFwW6.js → sprites-CxMz3tIE.js} +1 -1
  282. package/dist/chunks/{stats-wjMQA-CA.js → stats-D1wYx84O.js} +1 -1
  283. package/dist/chunks/{status-CyU7IQhO.js → status-BWCqbeJ3.js} +1 -1
  284. package/dist/chunks/statusNoticeHelpers-DY0Cblkd.js +1 -0
  285. package/dist/chunks/{tag-opEEZI5B.js → tag-Hc7nOYm5.js} +2 -2
  286. package/dist/chunks/{tasks-CCtnU5u1.js → tasks-BSqecqVm.js} +1 -1
  287. package/dist/chunks/{teamHelpers-BJJs8taN.js → teamHelpers-BOmVFTLS.js} +1 -1
  288. package/dist/chunks/teamHelpers-BueGmQcw.js +1 -0
  289. package/dist/chunks/{teammateModeSnapshot-CLiiOCkO.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-C6D7GC-Q.js → templateJobs-1oMC9yLQ.js} +1 -1
  293. package/dist/chunks/{terminalSetup-2ioFcRAA.js → terminalSetup-Bkml3uSP.js} +1 -1
  294. package/dist/chunks/{terminalSetup-B3bN4Cj8.js → terminalSetup-DJX1hqKs.js} +1 -1
  295. package/dist/chunks/{theme-Dgq_Og2P.js → theme-ia4cIc4d.js} +1 -1
  296. package/dist/chunks/thinkback-1NYskewu.js +1 -0
  297. package/dist/chunks/{thinkback-C43WBHis.js → thinkback-DWLUXUQC.js} +1 -1
  298. package/dist/chunks/thinkback-play-DZmXMRtq.js +1 -0
  299. package/dist/chunks/{toolEventObserver-B7EA-nNa.js → toolEventObserver-Ci0BECRu.js} +1 -1
  300. package/dist/chunks/{toolEventObserver-BG_3sGCL.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-S34i6Jc9.js → trustedDevice-BynTLVs4.js} +1 -1
  304. package/dist/chunks/{trustedDevice-DeNxe6bl.js → trustedDevice-CtL2IGDX.js} +1 -1
  305. package/dist/chunks/{ultrareviewCommand-C45bmZqN.js → ultrareviewCommand-DN-QhQ-f.js} +2 -2
  306. package/dist/chunks/undercover-CqJzV_Ar.js +1 -0
  307. package/dist/chunks/{undercover-DoUSM8d6.js → undercover-DLr5xI3K.js} +1 -1
  308. package/dist/chunks/{updateCCB-BuAm25MX.js → updateCCB-C6Ov8SNx.js} +4 -4
  309. package/dist/chunks/{upgrade-BDKg286g.js → upgrade-CVM1ffhq.js} +1 -1
  310. package/dist/chunks/upgrade-d40dVpDc.js +1 -0
  311. package/dist/chunks/{upload-CMptZXZs.js → upload-DSNwGLNd.js} +1 -1
  312. package/dist/chunks/{usage-Bw_LK9YI.js → usage-BRv8mBDf.js} +1 -1
  313. package/dist/chunks/{usage-DEWsKPXj.js → usage-GMw8NiO_.js} +1 -1
  314. package/dist/chunks/{useMainLoopModel-D0PmGDuy.js → useMainLoopModel-CEM_50a0.js} +1 -1
  315. package/dist/chunks/{useManagePlugins-B-ejJsXy.js → useManagePlugins-hCqb5F5n.js} +1 -1
  316. package/dist/chunks/{useMergedTools-B6x9qtfj.js → useMergedTools-DxvRmxVF.js} +1 -1
  317. package/dist/chunks/{useSearchInput-BpMLsxaS.js → useSearchInput-BCErnYur.js} +1 -1
  318. package/dist/chunks/useSettingsErrors-BwNeCSA6.js +1 -0
  319. package/dist/chunks/{useVoice-C3ryR2HE.js → useVoice-Cu39ifSa.js} +1 -1
  320. package/dist/chunks/{util-DWl5gjmI.js → util-DYuasrIE.js} +1 -1
  321. package/dist/chunks/utils-DSGFJaZ_.js +1 -0
  322. package/dist/chunks/{validatePlugin-8EMSASvV.js → validatePlugin-b1ec7M7n.js} +1 -1
  323. package/dist/chunks/{vim-CaZ20SrQ.js → vim-CrAzv4cM.js} +1 -1
  324. package/dist/chunks/{voice-BrnKguEV.js → voice-DKG3SYqi.js} +2 -2
  325. package/dist/chunks/{voiceModeEnabled-3eg8vSqy.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-D7jWIYwz.js → voiceStreamSTT-DEV82xnN.js} +1 -1
  329. package/dist/chunks/{web-tools-BT3TbzG5.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-C_i5wwjL.js → workerRegistry-S7pO5khK.js} +1 -1
  333. package/dist/chunks/worktree-CfXrXsQ2.js +1 -0
  334. package/dist/chunks/{xml-DOXio8vw.js → xml-CPJXOUFt.js} +1 -1
  335. package/dist/cli.js +1 -1
  336. package/package.json +1 -1
  337. package/dist/chunks/ApproveApiKey-DUoUTxFp.js +0 -1
  338. package/dist/chunks/BackgroundTasksDialog-VKhuyQLe.js +0 -2
  339. package/dist/chunks/ClaudeMdExternalIncludesDialog-COO2W0ij.js +0 -1
  340. package/dist/chunks/ConsoleOAuthFlow-CPWq7O57.js +0 -1
  341. package/dist/chunks/DiffDialog-D0RK4t-9.js +0 -3
  342. package/dist/chunks/Doctor-0Nv3L1Oy.js +0 -3
  343. package/dist/chunks/Doctor-Ba9zhV0V.js +0 -1
  344. package/dist/chunks/Grove-DyvIToPa.js +0 -1
  345. package/dist/chunks/MCPConnectionManager-N-oJu3qn.js +0 -1
  346. package/dist/chunks/MessageSelector-D10JMnsc.js +0 -3
  347. package/dist/chunks/Messages-CQdQJ2AA.js +0 -11
  348. package/dist/chunks/PluginSettings-BBrFCSpQ.js +0 -17
  349. package/dist/chunks/QueryEngine-BSk8-8vB.js +0 -1
  350. package/dist/chunks/REPL-D-akKdFc.js +0 -1
  351. package/dist/chunks/ResumeConversation-hmIOkZ2U.js +0 -1
  352. package/dist/chunks/SearchExtraToolsTool-wDSdfnRo.js +0 -1
  353. package/dist/chunks/SentryErrorBoundary-Duyg6HeT.js +0 -1
  354. package/dist/chunks/Settings-BSbzT25q.js +0 -2
  355. package/dist/chunks/api-VMfJpk1G.js +0 -1
  356. package/dist/chunks/asciicast-DA6TudSH.js +0 -1
  357. package/dist/chunks/assistant-D7D1sqTB.js +0 -1
  358. package/dist/chunks/auth-CGdLe3rq.js +0 -1
  359. package/dist/chunks/backgroundHousekeeping-4H6yTjsj.js +0 -1
  360. package/dist/chunks/backgroundHousekeeping-zf-tDimg.js +0 -17
  361. package/dist/chunks/bridgeConfig-CTJBoASk.js +0 -1
  362. package/dist/chunks/bridgeEnabled-SMuWz3Is.js +0 -1
  363. package/dist/chunks/bridgeMain-Ct5oDosG.js +0 -68
  364. package/dist/chunks/bridgeMain-UqwOi37W.js +0 -1
  365. package/dist/chunks/caches-DKMoKTAZ.js +0 -1
  366. package/dist/chunks/changeDetector--KPj2maX.js +0 -1
  367. package/dist/chunks/channelNotification-fJgjqRMx.js +0 -1
  368. package/dist/chunks/clear-CYVCwiwu.js +0 -1
  369. package/dist/chunks/client-DvWRsIpi.js +0 -1
  370. package/dist/chunks/color-DiLtK8_L.js +0 -1
  371. package/dist/chunks/commands-BT2_ICaW.js +0 -1
  372. package/dist/chunks/commitAttribution-Bpbro1a4.js +0 -1
  373. package/dist/chunks/compact-C6xm1N5a.js +0 -3
  374. package/dist/chunks/context-noninteractive-BQDOgVUW.js +0 -1
  375. package/dist/chunks/conversation-Bt6QdGd-.js +0 -1
  376. package/dist/chunks/conversation-CBPRFDod.js +0 -1
  377. package/dist/chunks/createSession-BaHXBnfG.js +0 -1
  378. package/dist/chunks/datadog-DgYqUGa-.js +0 -1
  379. package/dist/chunks/envLessBridgeConfig-D_GCqhTu.js +0 -1
  380. package/dist/chunks/exit-DtjFIrvJ.js +0 -1
  381. package/dist/chunks/extra-usage-C4dUWLhg.js +0 -1
  382. package/dist/chunks/extraUsage-BMvDY0Sk.js +0 -1
  383. package/dist/chunks/extractMemories-DS7XXeEo.js +0 -1
  384. package/dist/chunks/fast-D1xIHYaN.js +0 -1
  385. package/dist/chunks/gates-CUAwAhPL.js +0 -1
  386. package/dist/chunks/hooks-DynUngv2.js +0 -1
  387. package/dist/chunks/inboundAttachments-Cug-8Xdy.js +0 -1
  388. package/dist/chunks/initReplBridge-DV9KhSic.js +0 -1
  389. package/dist/chunks/language-CjFs6_la.js +0 -1
  390. package/dist/chunks/loadAgentsDir-tPgCg0WD.js +0 -1
  391. package/dist/chunks/loadPluginHooks-2U3UO__Q.js +0 -1
  392. package/dist/chunks/localSearch-CxwxzM8W.js +0 -1
  393. package/dist/chunks/login-CVVFklZw.js +0 -1
  394. package/dist/chunks/logout-BYsszpXx.js +0 -1
  395. package/dist/chunks/mappers-BBkM1aA5.js +0 -1
  396. package/dist/chunks/mcp-C3jlClk0.js +0 -6
  397. package/dist/chunks/mcp-Cmw8ecKk.js +0 -1
  398. package/dist/chunks/model-VB4ItNVB.js +0 -1
  399. package/dist/chunks/permissions-DBddT2NP.js +0 -3
  400. package/dist/chunks/pluginBlocklist-DEM_RWc2.js +0 -1
  401. package/dist/chunks/pluginOperations-COyT4tHs.js +0 -2
  402. package/dist/chunks/pluginStartupCheck-DjfIaOch.js +0 -1
  403. package/dist/chunks/plugins-BanQjHmw.js +0 -4
  404. package/dist/chunks/policyLimits-D-Y_soHx.js +0 -1
  405. package/dist/chunks/poorMode-DQagHYWe.js +0 -1
  406. package/dist/chunks/processBashCommand-BLSC8o8M.js +0 -1
  407. package/dist/chunks/processSlashCommand-Ch9B-6nh.js +0 -6
  408. package/dist/chunks/prompt-BGNhFY1n.js +0 -227
  409. package/dist/chunks/prompt-CrNwH5kr.js +0 -1
  410. package/dist/chunks/prompt-dH0MMivt.js +0 -1
  411. package/dist/chunks/rate-limit-options-D-xl_9PO.js +0 -1
  412. package/dist/chunks/refresh-CO_P3WKA.js +0 -1
  413. package/dist/chunks/registry-C0zdU2Hb.js +0 -1
  414. package/dist/chunks/rename-BFAC3WLD.js +0 -1
  415. package/dist/chunks/sandbox-adapter-jX_WzvnK.js +0 -1
  416. package/dist/chunks/searchExtraTools-xPuOKDpi.js +0 -1
  417. package/dist/chunks/sessionFileAccessHooks-DiKsr7H7.js +0 -1
  418. package/dist/chunks/sessionMemory-C34-eFnJ.js +0 -1
  419. package/dist/chunks/sessionMemory-kYQnpcyG.js +0 -1
  420. package/dist/chunks/sessionMemoryUtils-CcJcgftx.js +0 -1
  421. package/dist/chunks/sessionObserver-B73s6yu8.js +0 -1
  422. package/dist/chunks/sessionStorage-BHi7PKs-.js +0 -1
  423. package/dist/chunks/setup-BJSk1czd.js +0 -3
  424. package/dist/chunks/sink-i8NmYch9.js +0 -1
  425. package/dist/chunks/sinks-3w0mLszx.js +0 -1
  426. package/dist/chunks/skillChangeDetector-1aFn40GC.js +0 -1
  427. package/dist/chunks/skillLearning-Bddmbx8E.js +0 -1
  428. package/dist/chunks/skillLearning-C-uI_jZB.js +0 -1
  429. package/dist/chunks/statusNoticeHelpers-JNibsI_v.js +0 -1
  430. package/dist/chunks/teamHelpers-D41zdxpl.js +0 -1
  431. package/dist/chunks/teammateModeSnapshot-q-bARbLL.js +0 -1
  432. package/dist/chunks/teleport-ClxQigSQ.js +0 -1
  433. package/dist/chunks/thinkback-BE8NNmAo.js +0 -1
  434. package/dist/chunks/thinkback-play-D2_n_aoQ.js +0 -1
  435. package/dist/chunks/toolPool-BLshLuvo.js +0 -1
  436. package/dist/chunks/toolPool-HYKCHxDA.js +0 -1
  437. package/dist/chunks/undercover-B4sdXe12.js +0 -1
  438. package/dist/chunks/upgrade-BiWGhm2d.js +0 -1
  439. package/dist/chunks/useSettingsErrors-DUe4k_RK.js +0 -1
  440. package/dist/chunks/utils-DP3EtI6F.js +0 -1
  441. package/dist/chunks/voiceModeEnabled-B1ARFTcz.js +0 -1
  442. package/dist/chunks/voiceStreamSTT-CONK4g-B.js +0 -1
  443. package/dist/chunks/windowsPaths-BeDSnJ23.js +0 -2
  444. package/dist/chunks/windowsPaths-ttHiMKpR.js +0 -1
  445. package/dist/chunks/worktree-CFNQKVGn.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-BT2_ICaW.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-BZjPDxMm.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-BYWykYwn.js";import{a as pe,r as me,t as he}from"./trustedDevice-DeNxe6bl.js";import{n as C,t as w}from"./useMainLoopModel-D0PmGDuy.js";import{n as T,r as E,t as D}from"./bypassPermissionsKillswitch-CTrRxzdz.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-BZjPDxMm.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-BYWykYwn.js";import{r as x,t as S}from"./semver-Di5OaTd5.js";import{c as C,s as w,u as T}from"./releaseNotes-BtxL5R5Q.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.1`,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-BZjPDxMm.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-BYWykYwn.js";import{Hn as C,zn as w}from"./prompt-BGNhFY1n.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};