claude-code-best 2.6.5 → 2.6.6

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 (430) hide show
  1. package/dist/chunks/{AddWorkspaceDirectory-BYyM_V0q.js → AddWorkspaceDirectory-Bb6crGWh.js} +1 -1
  2. package/dist/chunks/{App-BboadKdn.js → App-CW0Y4ceR.js} +1 -1
  3. package/dist/chunks/{ApproveApiKey-BLp4742y.js → ApproveApiKey-9rkwQfgT.js} +1 -1
  4. package/dist/chunks/ApproveApiKey-BhMr2Y5F.js +1 -0
  5. package/dist/chunks/{AssistantSessionChooser-B88DM0Oq.js → AssistantSessionChooser-XzXZZdiH.js} +1 -1
  6. package/dist/chunks/BackgroundTasksDialog-BL_dfbZP.js +2 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-DlLWAKw2.js +1 -0
  8. package/dist/chunks/{ClaudeInChromeOnboarding-B6XNhFqq.js → ClaudeInChromeOnboarding-CjGydpBk.js} +1 -1
  9. package/dist/chunks/{ClaudeMdExternalIncludesDialog-BNhlq7_K.js → ClaudeMdExternalIncludesDialog-B04cjDwX.js} +1 -1
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-DPki55Xa.js +1 -0
  11. package/dist/chunks/ConsoleOAuthFlow-D_j1NebK.js +1 -0
  12. package/dist/chunks/{DesktopHandoff-S-w4bs5T.js → DesktopHandoff-CFBUqcCf.js} +1 -1
  13. package/dist/chunks/DevChannelsDialog-ByTf41du.js +1 -0
  14. package/dist/chunks/DiffDialog-CY-8kw_Q.js +3 -0
  15. package/dist/chunks/Doctor-2D5Wz58o.js +1 -0
  16. package/dist/chunks/Doctor-CDez_u_U.js +3 -0
  17. package/dist/chunks/{ExitFlow-CSBDxw9H.js → ExitFlow-BlON8IgH.js} +2 -2
  18. package/dist/chunks/Feedback-CSeD3k4M.js +2 -0
  19. package/dist/chunks/Grove-Dwu_0zRw.js +1 -0
  20. package/dist/chunks/{Grove-DSXRnXKv.js → Grove-Tp_UtIMg.js} +1 -1
  21. package/dist/chunks/{HybridTransport-CuT3KI5e.js → HybridTransport-CAko699F.js} +2 -2
  22. package/dist/chunks/{ITermBackend-mokGZVH_.js → ITermBackend-5P3WJumD.js} +1 -1
  23. package/dist/chunks/{InvalidConfigDialog-Bi4RKYlk.js → InvalidConfigDialog-CVcdra9v.js} +1 -1
  24. package/dist/chunks/{InvalidSettingsDialog-0zKo4-so.js → InvalidSettingsDialog-CfLdbmSI.js} +1 -1
  25. package/dist/chunks/MCPConnectionManager-BK_3uwQj.js +1 -0
  26. package/dist/chunks/{McpParsingWarnings-EzgsOoHw.js → McpParsingWarnings-BOj-T8F3.js} +1 -1
  27. package/dist/chunks/MessageSelector-BRkxpO1O.js +3 -0
  28. package/dist/chunks/Messages-wyMyMP7U.js +11 -0
  29. package/dist/chunks/{Onboarding-odmthwzz.js → Onboarding-C06Mxlf-.js} +1 -1
  30. package/dist/chunks/{OverageCreditUpsell-Cpk_5Lv0.js → OverageCreditUpsell-abcPm3PB.js} +1 -1
  31. package/dist/chunks/PluginSettings-DGpIVGvV.js +17 -0
  32. package/dist/chunks/{PromptInputFooterSuggestions-DrrkNOuS.js → PromptInputFooterSuggestions-ihnbjU0K.js} +1 -1
  33. package/dist/chunks/{PromptInputHelpMenu-DMsF4D6d.js → PromptInputHelpMenu-CMm8z7Gk.js} +1 -1
  34. package/dist/chunks/QueryEngine-I3Bqzbiz.js +1 -0
  35. package/dist/chunks/REPL-BxAsVlx3.js +1 -0
  36. package/dist/chunks/REPL-CBFcgD4r.js +97 -0
  37. package/dist/chunks/{RemoteCallout-CnpCWRPk.js → RemoteCallout-Cy6lH-CZ.js} +1 -1
  38. package/dist/chunks/{RemoteSessionManager-OWg_Yccq.js → RemoteSessionManager-C7iGd5Og.js} +2 -2
  39. package/dist/chunks/ResumeConversation-AdLtgdVB.js +1 -0
  40. package/dist/chunks/{SSETransport-BpnapvlK.js → SSETransport-B5xlXeAN.js} +1 -1
  41. package/dist/chunks/SearchExtraToolsTool-BJ8Nx_Nu.js +1 -0
  42. package/dist/chunks/SentryErrorBoundary-Bs7mtkPb.js +1 -0
  43. package/dist/chunks/{SentryErrorBoundary-C-NlfQZw.js → SentryErrorBoundary-iih9eFpM.js} +1 -1
  44. package/dist/chunks/Settings-PioHwsvg.js +2 -0
  45. package/dist/chunks/{TeleportProgress-CYXay2ZL.js → TeleportProgress-BX-uLwuL.js} +1 -1
  46. package/dist/chunks/TeleportRepoMismatchDialog-D8oPPTWd.js +1 -0
  47. package/dist/chunks/{TeleportResumeWrapper-DiHQeZIM.js → TeleportResumeWrapper-B_CvNDbr.js} +1 -1
  48. package/dist/chunks/{ThemePicker-BRh027fA.js → ThemePicker-BG1ykSpX.js} +1 -1
  49. package/dist/chunks/{TmuxBackend-BaX2U7iZ.js → TmuxBackend-CnMCWNS4.js} +1 -1
  50. package/dist/chunks/TrustDialog-Z_maAYj8.js +1 -0
  51. package/dist/chunks/{ValidationErrorsList-CdCUgfIl.js → ValidationErrorsList-C9swVkZ-.js} +1 -1
  52. package/dist/chunks/{WelcomeV2-DCXcYd2x.js → WelcomeV2-Au_5ddlT.js} +1 -1
  53. package/dist/chunks/WindowsTerminalBackend-CGxaYH74.js +2 -0
  54. package/dist/chunks/{add-dir-ldGd3Ppz.js → add-dir-Cm9u56YX.js} +1 -1
  55. package/dist/chunks/{agentDisplay-CVnAeURF.js → agentDisplay-Bi_bEyEn.js} +1 -1
  56. package/dist/chunks/{agents-DH5fmbVw.js → agents-CMF9fLzV.js} +7 -7
  57. package/dist/chunks/{agents-C08NzRZx.js → agents-CbjR7hNr.js} +1 -1
  58. package/dist/chunks/{ant-DJren1Aa.js → ant-Bu1Gs4WJ.js} +1 -1
  59. package/dist/chunks/api-CFNGoLoL.js +1 -0
  60. package/dist/chunks/{api-CGOR_Xfl.js → api-D_t0nHsS.js} +1 -1
  61. package/dist/chunks/assistant-BLd4y2FJ.js +1 -0
  62. package/dist/chunks/{assistant-aWkDcurV.js → assistant-C_pfWe2a.js} +1 -1
  63. package/dist/chunks/{assistant-BlzrMSkM.js → assistant-EA-MHNQ-.js} +1 -1
  64. package/dist/chunks/{auth-CSB2RDKF.js → auth-D7PZvVPf.js} +1 -1
  65. package/dist/chunks/auth-DGfZCD_B.js +1 -0
  66. package/dist/chunks/{autoMode-CWvZs1jO.js → autoMode-B8iO05xy.js} +6 -6
  67. package/dist/chunks/{autonomy-BkVcSMCZ.js → autonomy-CaLvE5N6.js} +12 -12
  68. package/dist/chunks/{autonomy-DK42aJYt.js → autonomy-dQVtSiCJ.js} +1 -1
  69. package/dist/chunks/{autonomyPanel-Cn4IhXgE.js → autonomyPanel-DSswVlCF.js} +1 -1
  70. package/dist/chunks/backgroundHousekeeping-Ckj8W3RO.js +1 -0
  71. package/dist/chunks/backgroundHousekeeping-D2_Uopt7.js +17 -0
  72. package/dist/chunks/{branch-juox_fko.js → branch-C7pM8Sjh.js} +1 -1
  73. package/dist/chunks/{bridge-DudsCZkh.js → bridge-CTYdzSWg.js} +2 -2
  74. package/dist/chunks/bridgeConfig-7c07tJm9.js +1 -0
  75. package/dist/chunks/{bridgeConfig-lRZfQqmA.js → bridgeConfig-Df6uyp3q.js} +1 -1
  76. package/dist/chunks/{bridgeEnabled-D2IykaHE.js → bridgeEnabled-A-_xJ94c.js} +1 -1
  77. package/dist/chunks/bridgeEnabled-Z2S8lk0l.js +1 -0
  78. package/dist/chunks/bridgeMain-B7FZpvo0.js +68 -0
  79. package/dist/chunks/bridgeMain-C5UxF8ST.js +1 -0
  80. package/dist/chunks/{bridgeMessaging-CqNURC4-.js → bridgeMessaging-DPVLAIzl.js} +1 -1
  81. package/dist/chunks/{btw-DKlE3Dea.js → btw-CqgjLlFN.js} +1 -1
  82. package/dist/chunks/{buddy-DQYgHR63.js → buddy-DCGBAqF2.js} +1 -1
  83. package/dist/chunks/{bypassPermissionsKillswitch-Bof-UtM-.js → bypassPermissionsKillswitch-CK0jeZTW.js} +1 -1
  84. package/dist/chunks/{caches-B5QZDncQ.js → caches-CdVW8fYV.js} +2 -2
  85. package/dist/chunks/caches-Dt52PedI.js +1 -0
  86. package/dist/chunks/{ccrClient-BaWg4E9-.js → ccrClient-B_3AmY7K.js} +1 -1
  87. package/dist/chunks/changeDetector-uO9CBvut.js +1 -0
  88. package/dist/chunks/{channelNotification-B7A-9DIl.js → channelNotification-BbDQdLZC.js} +1 -1
  89. package/dist/chunks/channelNotification-DzTzUrCe.js +1 -0
  90. package/dist/chunks/{chrome-jMAks7-w.js → chrome-CGyqsCkL.js} +1 -1
  91. package/dist/chunks/clear-B_cVk64B.js +1 -0
  92. package/dist/chunks/client-BcqXgcrx.js +1 -0
  93. package/dist/chunks/{color-DG_R5-hl.js → color-DEXUx7gE.js} +1 -1
  94. package/dist/chunks/commands-BX0_wEGw.js +1 -0
  95. package/dist/chunks/commitAttribution-CSVDcgTO.js +1 -0
  96. package/dist/chunks/{commitAttribution-C22a3OCi.js → commitAttribution-e0kkanVT.js} +1 -1
  97. package/dist/chunks/{compact-BWvnb4or.js → compact-Dh9RewNA.js} +3 -3
  98. package/dist/chunks/{companion-Bkn2lSLj.js → companion-DVFacTUw.js} +1 -1
  99. package/dist/chunks/{config-BvpTbJ5p.js → config-CkSmYDJY.js} +1 -1
  100. package/dist/chunks/{config-D-dzD6n-.js → config-DwiVCSrY.js} +1 -1
  101. package/dist/chunks/{context-DzNahdyP.js → context-B8VDDHTv.js} +1 -1
  102. package/dist/chunks/{context-noninteractive-yiyJriiw.js → context-noninteractive-IZfWniex.js} +2 -2
  103. package/dist/chunks/context-noninteractive-SBxqQ3iu.js +1 -0
  104. package/dist/chunks/conversation-CQBl9Yy2.js +1 -0
  105. package/dist/chunks/conversation-DVZplNag.js +1 -0
  106. package/dist/chunks/{copy-9k9JPRqW.js → copy-CIjrYoFa.js} +2 -2
  107. package/dist/chunks/{createSSHSession-BZf-Loo5.js → createSSHSession-ArNlbIZB.js} +1 -1
  108. package/dist/chunks/{createSession-kiTHYXSL.js → createSession-CBheIT_G.js} +1 -1
  109. package/dist/chunks/createSession-DfEQy2dZ.js +1 -0
  110. package/dist/chunks/cronJitterConfig-DcMGWOa-.js +6 -0
  111. package/dist/chunks/crossProjectResume-Z-aR2q-d.js +40 -0
  112. package/dist/chunks/{datadog-Bg-zL-i7.js → datadog-BK8eJz8B.js} +1 -1
  113. package/dist/chunks/datadog-Uj6FjEuU.js +1 -0
  114. package/dist/chunks/{desktop-DpaStjc-.js → desktop-B9vWJeRu.js} +1 -1
  115. package/dist/chunks/{diff-N_VSBo3Z.js → diff-BTV7_Dca.js} +1 -1
  116. package/dist/chunks/{doctor-CUWjbh1X.js → doctor-Dpbh0aRz.js} +1 -1
  117. package/dist/chunks/{effort-loH1TUvE.js → effort-Czlwa5qF.js} +2 -2
  118. package/dist/chunks/{entry-D58E-E6Y.js → entry-CdfuWjKu.js} +3 -3
  119. package/dist/chunks/{envLessBridgeConfig-SPEr9oqO.js → envLessBridgeConfig-BAFYaZ0E.js} +1 -1
  120. package/dist/chunks/envLessBridgeConfig-DOO9eX07.js +1 -0
  121. package/dist/chunks/{exit-D-tuPpbx.js → exit-DzOm62Dn.js} +1 -1
  122. package/dist/chunks/{export-BIZ_SPXJ.js → export-DHOR3z3Z.js} +1 -1
  123. package/dist/chunks/{exportRenderer-CWPSMaqM.js → exportRenderer-CiNXeNr9.js} +1 -1
  124. package/dist/chunks/extra-usage-CJcyfVCt.js +1 -0
  125. package/dist/chunks/{extra-usage-CCMwIa85.js → extra-usage-DIYR_3ZR.js} +1 -1
  126. package/dist/chunks/{extra-usage-core-BNW4VT7o.js → extra-usage-core-C3uM9bOP.js} +1 -1
  127. package/dist/chunks/{extra-usage-noninteractive-B_WjXO1E.js → extra-usage-noninteractive-Ctz9TfY8.js} +1 -1
  128. package/dist/chunks/{extraUsage-CNMMTNJi.js → extraUsage-CBwIvl73.js} +1 -1
  129. package/dist/chunks/extractMemories-C3SU-Osb.js +1 -0
  130. package/dist/chunks/fast-7iinMwk-.js +1 -0
  131. package/dist/chunks/{fast-CG1v3fRr.js → fast-BpBwjbSD.js} +1 -1
  132. package/dist/chunks/{feedback-CG4mS_-B.js → feedback-BkVnsZVx.js} +1 -1
  133. package/dist/chunks/{firstPartyEventLogger-Y_jAnHoR.js → firstPartyEventLogger-BCzGkdpd.js} +1 -1
  134. package/dist/chunks/{flushGate-COPcye5f.js → flushGate-CQsnMw8g.js} +1 -1
  135. package/dist/chunks/{gates-CSKxLmMJ.js → gates-CxWIWtmd.js} +1 -1
  136. package/dist/chunks/gates-qgzva-fO.js +1 -0
  137. package/dist/chunks/{gemini-B3uSLiNp.js → gemini-BbV8D2SS.js} +1 -1
  138. package/dist/chunks/{generateRecap-D7rG3jIm.js → generateRecap-B3j2nUgh.js} +1 -1
  139. package/dist/chunks/{generateSessionName-zbqanivg.js → generateSessionName-aGnXSNgN.js} +1 -1
  140. package/dist/chunks/{githubRepoPathMapping-B04nEUDG.js → githubRepoPathMapping-DCJLSTLl.js} +1 -1
  141. package/dist/chunks/{grok-CDOpos8E.js → grok-C4QFXJnR.js} +1 -1
  142. package/dist/chunks/{growthbook-C_EY78Sn.js → growthbook-prtWhMRg.js} +1 -1
  143. package/dist/chunks/{heapdump-CpmhJ55b.js → heapdump-Czm-2XiG.js} +1 -1
  144. package/dist/chunks/{help-EHn2neTv.js → help-CSAFsN0-.js} +1 -1
  145. package/dist/chunks/hooks-Ch2vPE8u.js +1 -0
  146. package/dist/chunks/{hooks-BV6HqbU4.js → hooks-DkbOP-bI.js} +2 -2
  147. package/dist/chunks/{hostAdapter-_SmFAVNf.js → hostAdapter-BcdDPVTj.js} +1 -1
  148. package/dist/chunks/{ide-DkN0KdTR.js → ide-BXERRFZF.js} +2 -2
  149. package/dist/chunks/{inboundAttachments-DnGQw7Pf.js → inboundAttachments-7rXrAtkb.js} +1 -1
  150. package/dist/chunks/inboundAttachments-C0rkLl2x.js +1 -0
  151. package/dist/chunks/initReplBridge-tXqkba08.js +1 -0
  152. package/dist/chunks/{insights-Bs9kJDG6.js → insights-DrvqJgF8.js} +25 -25
  153. package/dist/chunks/{install-CFX_ph9z.js → install-BGnxwO00.js} +1 -1
  154. package/dist/chunks/{install-github-app-CvRjY1Wi.js → install-github-app-CIpBHlr9.js} +2 -2
  155. package/dist/chunks/{install-slack-app-DjhnVSe0.js → install-slack-app-By4Lh7ww.js} +1 -1
  156. package/dist/chunks/{instrumentation-c5zlOWom.js → instrumentation-D9y7Ph_R.js} +3 -3
  157. package/dist/chunks/{job-3QwLq609.js → job-BPVIMW_P.js} +1 -1
  158. package/dist/chunks/{keybindings-7mDm3UKD.js → keybindings-Ce6AHMLI.js} +2 -2
  159. package/dist/chunks/{lang-DyyjY20G.js → lang-DfDG_fSa.js} +1 -1
  160. package/dist/chunks/language-B1yHC1d6.js +1 -0
  161. package/dist/chunks/{language-CPRGmY8Q.js → language-yGoDFP3X.js} +1 -1
  162. package/dist/chunks/{launchAgentsPlatform-CpsMsTqQ.js → launchAgentsPlatform-DT01xZM7.js} +1 -1
  163. package/dist/chunks/launchAutofixPr-DrYd7WVf.js +18 -0
  164. package/dist/chunks/{launchLocalMemory-DlYQcEQJ.js → launchLocalMemory-Bt3tMYVJ.js} +1 -1
  165. package/dist/chunks/{launchLocalVault-CP0AyPjj.js → launchLocalVault-jyRHEa_Y.js} +1 -1
  166. package/dist/chunks/{launchMemoryStores-BHoDFkJ5.js → launchMemoryStores-cmXnLAF5.js} +1 -1
  167. package/dist/chunks/{launchOnboarding-CFTNXcnc.js → launchOnboarding-BPTNFftb.js} +1 -1
  168. package/dist/chunks/{launchSchedule-5KQr6x_A.js → launchSchedule-141GqGC8.js} +1 -1
  169. package/dist/chunks/{launchSkillStore-D0yGuE68.js → launchSkillStore-Bz0lok_o.js} +1 -1
  170. package/dist/chunks/{launchTeleport-DRKnXOwY.js → launchTeleport-BMquJxIq.js} +2 -2
  171. package/dist/chunks/{launchVault-XA-zAswX.js → launchVault-Bsuwqad6.js} +1 -1
  172. package/dist/chunks/{loadAgentsDir-DI1a76pd.js → loadAgentsDir-D7kapZB5.js} +506 -498
  173. package/dist/chunks/loadAgentsDir-DxPE2bIO.js +1 -0
  174. package/dist/chunks/{loadPluginHooks-C0Ei-0E2.js → loadPluginHooks-CL5aGDrb.js} +1 -1
  175. package/dist/chunks/localSearch-iozuZZhZ.js +1 -0
  176. package/dist/chunks/{localSearch-CDOJNc_E.js → localSearch-r1_G8kfV.js} +1 -1
  177. package/dist/chunks/{login-nwTOoyxv.js → login-7MvpaOkt.js} +1 -1
  178. package/dist/chunks/login-Dxza_KNT.js +1 -0
  179. package/dist/chunks/{logoV2Utils-DDUoPClc.js → logoV2Utils-DjThKW15.js} +1 -1
  180. package/dist/chunks/logout-BeGQR78E.js +1 -0
  181. package/dist/chunks/{magicDocs-CmUlOWjI.js → magicDocs-Dy72LHIj.js} +2 -2
  182. package/dist/chunks/{main-CeG_nUsC.js → main-CF6Im-LV.js} +46 -46
  183. package/dist/chunks/{mappers-CJ8IO1o1.js → mappers-CkMESMy7.js} +1 -1
  184. package/dist/chunks/mcp-BTgHgOhR.js +2 -0
  185. package/dist/chunks/mcp-UJZ22IDJ.js +6 -0
  186. package/dist/chunks/mcp-fHf8Uc7h.js +1 -0
  187. package/dist/chunks/{mcpServer-lIneUZ5p.js → mcpServer-BueM5fWI.js} +1 -1
  188. package/dist/chunks/{mcpServer-DPHQVYdC.js → mcpServer-Dqm2PQQx.js} +1 -1
  189. package/dist/chunks/{memory-BcWBkKV8.js → memory-BNZmqma1.js} +1 -1
  190. package/dist/chunks/model-D3g2QdU-.js +1 -0
  191. package/dist/chunks/{model-DJLzVvcF.js → model-DOw7wIKQ.js} +1 -1
  192. package/dist/chunks/{onChangeAppState-Dxbl8fvk.js → onChangeAppState-Cb9_yIuW.js} +1 -1
  193. package/dist/chunks/{openai-DkYK4THc.js → openai-Bvo0Gcec.js} +3 -3
  194. package/dist/chunks/{overageCreditGrant-DLKadMYU.js → overageCreditGrant-BrN7dk3d.js} +1 -1
  195. package/dist/chunks/{passes-BIfuerjL.js → passes-vgcY8_l8.js} +1 -1
  196. package/dist/chunks/{paths-BBvuDQl9.js → paths-1ngPRtu3.js} +2 -2
  197. package/dist/chunks/permissions-BDbIjTT6.js +3 -0
  198. package/dist/chunks/{pipeTransport-DVoIA1uN.js → pipeTransport-KU8psPDI.js} +1 -1
  199. package/dist/chunks/{plan--lnWxB3Q.js → plan-5NVPuxp6.js} +1 -1
  200. package/dist/chunks/{plugin-DWLyrLw4.js → plugin-t8jMqdsY.js} +1 -1
  201. package/dist/chunks/{pluginAutoupdate-CGXIWBrb.js → pluginAutoupdate-CAa4KLro.js} +1 -1
  202. package/dist/chunks/{pluginBlocklist-DJrMdzT0.js → pluginBlocklist-BG2LkLq1.js} +1 -1
  203. package/dist/chunks/{pluginCliCommands-C08q9dHk.js → pluginCliCommands-vqAtVibb.js} +1 -1
  204. package/dist/chunks/{pluginFlagging-Dggxke70.js → pluginFlagging-BFCtv3kY.js} +1 -1
  205. package/dist/chunks/{pluginOperations-CNCImIe8.js → pluginOperations-C9XP-mko.js} +2 -2
  206. package/dist/chunks/pluginStartupCheck-DZp0wnXP.js +1 -0
  207. package/dist/chunks/{pluginStartupCheck-BW2fjg2P.js → pluginStartupCheck-RRcAbKfx.js} +1 -1
  208. package/dist/chunks/plugins-0SyID4Kx.js +4 -0
  209. package/dist/chunks/policyLimits-Cmmzuv-E.js +1 -0
  210. package/dist/chunks/{pollConfig-DAQ-ives.js → pollConfig-DTYIJ8lQ.js} +1 -1
  211. package/dist/chunks/{poor-DqfrQT61.js → poor-Dw5dMZpM.js} +1 -1
  212. package/dist/chunks/{poorMode-DzYT47KW.js → poorMode-CsGLI_hm.js} +1 -1
  213. package/dist/chunks/poorMode-D_hB-rDf.js +1 -0
  214. package/dist/chunks/{print-GGVp62vj.js → print-Ct8N4PYT.js} +12 -12
  215. package/dist/chunks/{privacy-settings-agwqjYJo.js → privacy-settings-P2r-kg2i.js} +1 -1
  216. package/dist/chunks/processBashCommand-a8W8aTRu.js +1 -0
  217. package/dist/chunks/{processSlashCommand-COtIO6Jy.js → processSlashCommand-BaUdUg3T.js} +3 -3
  218. package/dist/chunks/prompt-B1Qy8mi4.js +1 -0
  219. package/dist/chunks/{prompt-CjFAtm3w.js → prompt-BBg3jtfc.js} +1 -1
  220. package/dist/chunks/prompt-D4kWWEZC.js +1 -0
  221. package/dist/chunks/{promptEditor-EgosPsy-.js → promptEditor-CvaugNTt.js} +2 -2
  222. package/dist/chunks/{protocolHandler-mtPUT9U0.js → protocolHandler-DxBaHlaD.js} +1 -1
  223. package/dist/chunks/{rate-limit-options-C6SFOHue.js → rate-limit-options-Df_sgE0b.js} +1 -1
  224. package/dist/chunks/rcDebugLog-CPGWJbI4.js +11 -0
  225. package/dist/chunks/{referral-DeDr9zAE.js → referral-BKeCKnOJ.js} +1 -1
  226. package/dist/chunks/{refresh-D7pdoY_X.js → refresh-Cjv4jA6L.js} +1 -1
  227. package/dist/chunks/{registerProtocol-BZBH8Zgl.js → registerProtocol-DLuRm0mf.js} +1 -1
  228. package/dist/chunks/{registry-Dz6AbiYP.js → registry-DVSgtCq5.js} +1 -1
  229. package/dist/chunks/{release-notes-DiUNOrg9.js → release-notes-CZcf8zB7.js} +1 -1
  230. package/dist/chunks/{releaseNotes-CnhQit0y.js → releaseNotes-CvfZb3fZ.js} +2 -2
  231. package/dist/chunks/{reload-plugins-Dx52GcaG.js → reload-plugins-pSlDLk3b.js} +1 -1
  232. package/dist/chunks/{remote-env-B67Oo3sI.js → remote-env-BH89NuwC.js} +1 -1
  233. package/dist/chunks/{remoteBridgeCore-BzSUgPbt.js → remoteBridgeCore-CrXlWEL1.js} +1 -1
  234. package/dist/chunks/{remoteControlServer-L8smP7Zu.js → remoteControlServer-BSOnq4yY.js} +1 -1
  235. package/dist/chunks/{rename-C4PauyTZ.js → rename-DNGvNQm2.js} +1 -1
  236. package/dist/chunks/{resume-CrSn26xq.js → resume-6UL38yL3.js} +2 -2
  237. package/dist/chunks/{runtimeObserver-nAhH4Wca.js → runtimeObserver-BhvHeiwD.js} +4 -4
  238. package/dist/chunks/{runtimeObserver-YNy3mIb7.js → runtimeObserver-Cp-DN8fP.js} +1 -1
  239. package/dist/chunks/sandbox-adapter-DGVtPPD0.js +1 -0
  240. package/dist/chunks/{sandbox-toggle-BYqbcI5d.js → sandbox-toggle-D19YbI5G.js} +1 -1
  241. package/dist/chunks/searchExtraTools-DXWkpOIg.js +1 -0
  242. package/dist/chunks/{sentry-BNVxoVLS.js → sentry-BZmpC-iI.js} +1 -1
  243. package/dist/chunks/{session-BuEmHrqM.js → session-lLpGqp0B.js} +2 -2
  244. package/dist/chunks/{sessionDiscovery-Mcsfa0g-.js → sessionDiscovery-BX3fjgzD.js} +1 -1
  245. package/dist/chunks/sessionFileAccessHooks-BeuS4m7a.js +1 -0
  246. package/dist/chunks/sessionMemory-LMOQk90c.js +1 -0
  247. package/dist/chunks/sessionMemory-UpILj5ww.js +1 -0
  248. package/dist/chunks/sessionMemoryUtils-DE7AezA0.js +1 -0
  249. package/dist/chunks/{sessionObserver-DG2zQgfi.js → sessionObserver-CujNIWks.js} +1 -1
  250. package/dist/chunks/sessionObserver-HqvTXhs9.js +1 -0
  251. package/dist/chunks/sessionStorage-BN56DAAd.js +1 -0
  252. package/dist/chunks/{sessionTitle-zUVSAHO7.js → sessionTitle-QxXslbJY.js} +1 -1
  253. package/dist/chunks/{sessionTracing-DoRJ4nSa.js → sessionTracing-DognYcDf.js} +1 -1
  254. package/dist/chunks/{settingsSync-B9bz77E1.js → settingsSync-DEPET5O1.js} +1 -1
  255. package/dist/chunks/{setup-B1JbPepL.js → setup-BUBUidOg.js} +1 -1
  256. package/dist/chunks/setup-BZMVuIIx.js +2 -0
  257. package/dist/chunks/{setup-CCOLlRtP.js → setup-C6G0lasE.js} +1 -1
  258. package/dist/chunks/{shadowedRuleDetection-BBR3uEgx.js → shadowedRuleDetection-CQayPrmM.js} +1 -1
  259. package/dist/chunks/{sideQuestion-DHW5rgKz.js → sideQuestion-B9EE1vTM.js} +1 -1
  260. package/dist/chunks/sink-BRrEbL6h.js +1 -0
  261. package/dist/chunks/{sink-DxDOsLa2.js → sink-Cugto5We.js} +1 -1
  262. package/dist/chunks/{sinks-BrrTUxkC.js → sinks-B9A94oIj.js} +2 -2
  263. package/dist/chunks/sinks-CKaSBvU8.js +1 -0
  264. package/dist/chunks/{skill-learning-C0nOKZfg.js → skill-learning-CroDcatu.js} +1 -1
  265. package/dist/chunks/skillChangeDetector-DnyEQqe6.js +1 -0
  266. package/dist/chunks/{skillGapStore-_YuJP5KI.js → skillGapStore-91Mb3xDY.js} +2 -2
  267. package/dist/chunks/{skillGapStore-Czi5jKjJ.js → skillGapStore-LKwap3o4.js} +1 -1
  268. package/dist/chunks/{skillGenerator-kbaRbpqJ.js → skillGenerator-B9GM0LHk.js} +2 -2
  269. package/dist/chunks/skillLearning-D6latSKi.js +1 -0
  270. package/dist/chunks/skillLearning-DbOOqb6b.js +1 -0
  271. package/dist/chunks/{skillPanel-BxDvlPzd.js → skillPanel-rIIYgnBE.js} +3 -3
  272. package/dist/chunks/{skillSearchPanel-D-MX6Qgt.js → skillSearchPanel-xAL-6uJF.js} +4 -4
  273. package/dist/chunks/{skills-NpEgFkFZ.js → skills-Doe47wxK.js} +1 -1
  274. package/dist/chunks/{sprites-DD4eIkN7.js → sprites-D11F3i1M.js} +1 -1
  275. package/dist/chunks/{stats-xL3NHwhp.js → stats-WNUyieG-.js} +1 -1
  276. package/dist/chunks/{status-B5E70xRv.js → status-CjBS9SkF.js} +1 -1
  277. package/dist/chunks/{statusNoticeHelpers-DcssRhLw.js → statusNoticeHelpers-cnI4TiGw.js} +1 -1
  278. package/dist/chunks/{tag-BELr-qIa.js → tag-Gfb8vTAR.js} +2 -2
  279. package/dist/chunks/{tasks-CrdWcSt-.js → tasks-BwX1rzOD.js} +1 -1
  280. package/dist/chunks/{teamHelpers--3ZyNDlv.js → teamHelpers-DEgaCpta.js} +1 -1
  281. package/dist/chunks/teamHelpers-EJxTXoTV.js +1 -0
  282. package/dist/chunks/teammateModeSnapshot-BgUQ4Phz.js +1 -0
  283. package/dist/chunks/{teammateModeSnapshot-DOQMTKbQ.js → teammateModeSnapshot-Dyukgtp9.js} +1 -1
  284. package/dist/chunks/teleport-B4p8XlAv.js +1 -0
  285. package/dist/chunks/{templateJobs-8IY2Cgig.js → templateJobs-DQXuFnkl.js} +1 -1
  286. package/dist/chunks/{terminalSetup-C4psrmpb.js → terminalSetup-CTEIn08j.js} +1 -1
  287. package/dist/chunks/{terminalSetup-Lyg4NbGA.js → terminalSetup-bSbq4LE7.js} +1 -1
  288. package/dist/chunks/{theme-B8GNnJ_q.js → theme-DazaKPy8.js} +1 -1
  289. package/dist/chunks/thinkback-BOfZP_QG.js +1 -0
  290. package/dist/chunks/{thinkback-DPXwEK3B.js → thinkback-CxWZV2Oz.js} +1 -1
  291. package/dist/chunks/{thinkback-play-BMOE-ceh.js → thinkback-play-CHe1x2Hc.js} +1 -1
  292. package/dist/chunks/{toolEventObserver-DzLd0MSn.js → toolEventObserver-D4h-QqVP.js} +1 -1
  293. package/dist/chunks/{toolEventObserver-D0TSHm01.js → toolEventObserver-Dfvv2trb.js} +1 -1
  294. package/dist/chunks/toolPool-BHChMuLr.js +1 -0
  295. package/dist/chunks/toolPool-C5K43w4_.js +1 -0
  296. package/dist/chunks/{trustedDevice-1iTu4LEm.js → trustedDevice-CQ9PK-8m.js} +1 -1
  297. package/dist/chunks/{trustedDevice-BvYYXfd8.js → trustedDevice-rdvUkS1W.js} +1 -1
  298. package/dist/chunks/{ultrareviewCommand-BTXAN2wP.js → ultrareviewCommand-Zf9hO4wr.js} +2 -2
  299. package/dist/chunks/{undercover-DvvnEmsX.js → undercover-DLyKv5TE.js} +1 -1
  300. package/dist/chunks/undercover-DNS9V_JT.js +1 -0
  301. package/dist/chunks/{updateCCB-C-qfLi0j.js → updateCCB-7WQRz9lW.js} +4 -4
  302. package/dist/chunks/{upgrade-DTBZSxwv.js → upgrade-ByIumMQe.js} +1 -1
  303. package/dist/chunks/upgrade-bK4x32Ma.js +1 -0
  304. package/dist/chunks/{upload-BF8tf_Eo.js → upload-CvOMbA9_.js} +1 -1
  305. package/dist/chunks/{usage-DvSTXEYY.js → usage-C_d-Z-eb.js} +1 -1
  306. package/dist/chunks/{usage-BRYRRgNt.js → usage-DE4PSQiF.js} +1 -1
  307. package/dist/chunks/useMainLoopModel-Os8Ao8-x.js +1 -0
  308. package/dist/chunks/{useManagePlugins-GmnI9K53.js → useManagePlugins-BYBubfHU.js} +1 -1
  309. package/dist/chunks/{useMergedTools-Dah5KDMi.js → useMergedTools-BJAn2i-F.js} +1 -1
  310. package/dist/chunks/{useSearchInput-BV_azHiA.js → useSearchInput-CF77X2OV.js} +1 -1
  311. package/dist/chunks/useSettingsErrors-DD7fQ-fU.js +1 -0
  312. package/dist/chunks/{useVoice-DR69NLxp.js → useVoice-DwzMN0fq.js} +1 -1
  313. package/dist/chunks/{util-BpyJ4Bom.js → util-DD30Y4o8.js} +1 -1
  314. package/dist/chunks/utils-D44M8obg.js +1 -0
  315. package/dist/chunks/validatePlugin-DpHiJRsT.js +1 -0
  316. package/dist/chunks/{vim-DvOw8dfR.js → vim-zc9EiMil.js} +1 -1
  317. package/dist/chunks/{voice-B3BZs53f.js → voice-BRhZt4jW.js} +2 -2
  318. package/dist/chunks/{voiceModeEnabled-DA76xN1Q.js → voiceModeEnabled-168-1Ocs.js} +1 -1
  319. package/dist/chunks/voiceModeEnabled-CTT25yFj.js +1 -0
  320. package/dist/chunks/{voiceStreamSTT-_w1VjIOs.js → voiceStreamSTT-B80UegKG.js} +1 -1
  321. package/dist/chunks/voiceStreamSTT-BpYhKo2H.js +1 -0
  322. package/dist/chunks/{workerRegistry-2_MZVih1.js → workerRegistry-s8nnpmUO.js} +1 -1
  323. package/dist/chunks/worktree-CkB4jLXK.js +1 -0
  324. package/dist/chunks/{xml-Dx--sNE1.js → xml-DTMvLcPg.js} +1 -1
  325. package/dist/cli.js +1 -1
  326. package/package.json +1 -1
  327. package/dist/chunks/ApproveApiKey-DiEe4eui.js +0 -1
  328. package/dist/chunks/BackgroundTasksDialog-ByraVuXh.js +0 -2
  329. package/dist/chunks/BypassPermissionsModeDialog-BDvmz12S.js +0 -1
  330. package/dist/chunks/ClaudeMdExternalIncludesDialog-B4ocUjev.js +0 -1
  331. package/dist/chunks/ConsoleOAuthFlow-BvaB9b0y.js +0 -1
  332. package/dist/chunks/DevChannelsDialog-BljR0X9X.js +0 -1
  333. package/dist/chunks/DiffDialog-BhQ2QaLW.js +0 -3
  334. package/dist/chunks/Doctor-BXb0qv6n.js +0 -3
  335. package/dist/chunks/Doctor-C5DYPEGl.js +0 -1
  336. package/dist/chunks/Feedback-DwHzc4UT.js +0 -2
  337. package/dist/chunks/Grove-DnTo982-.js +0 -1
  338. package/dist/chunks/MCPConnectionManager-DYGoS1Ht.js +0 -1
  339. package/dist/chunks/MessageSelector-DTmUuEKJ.js +0 -3
  340. package/dist/chunks/Messages-DWiKTx5o.js +0 -11
  341. package/dist/chunks/PluginSettings-eYcWehI8.js +0 -17
  342. package/dist/chunks/QueryEngine-C_KZts4y.js +0 -1
  343. package/dist/chunks/REPL-C6YR0VKU.js +0 -1
  344. package/dist/chunks/REPL-DzHz-LOY.js +0 -97
  345. package/dist/chunks/ResumeConversation-BktSnsCm.js +0 -1
  346. package/dist/chunks/SearchExtraToolsTool-CqFD8vVS.js +0 -1
  347. package/dist/chunks/SentryErrorBoundary-BUirJRWU.js +0 -1
  348. package/dist/chunks/Settings-vfFvcweR.js +0 -2
  349. package/dist/chunks/TeleportRepoMismatchDialog-_zbZTvcJ.js +0 -1
  350. package/dist/chunks/TrustDialog-CVbzrv6g.js +0 -1
  351. package/dist/chunks/WindowsTerminalBackend-BE9NX5IH.js +0 -2
  352. package/dist/chunks/api-6tcwJlf_.js +0 -1
  353. package/dist/chunks/assistant-CwbhlCM-.js +0 -1
  354. package/dist/chunks/auth-GxZhOvQ1.js +0 -1
  355. package/dist/chunks/backgroundHousekeeping-BIZTAYho.js +0 -17
  356. package/dist/chunks/backgroundHousekeeping-Csh58CxV.js +0 -1
  357. package/dist/chunks/bridgeConfig-D4tpc568.js +0 -1
  358. package/dist/chunks/bridgeEnabled-B8_c_Ppq.js +0 -1
  359. package/dist/chunks/bridgeMain-C5RDihlX.js +0 -68
  360. package/dist/chunks/bridgeMain-D7_lg2iJ.js +0 -1
  361. package/dist/chunks/caches-dGk7xsDu.js +0 -1
  362. package/dist/chunks/changeDetector-DoLfg8a6.js +0 -1
  363. package/dist/chunks/channelNotification-DDErroWn.js +0 -1
  364. package/dist/chunks/clear-OudnCGa7.js +0 -1
  365. package/dist/chunks/client-DxDmXXTh.js +0 -1
  366. package/dist/chunks/commands-BWIOEBPs.js +0 -1
  367. package/dist/chunks/commitAttribution-BA4fcbHf.js +0 -1
  368. package/dist/chunks/context-noninteractive-CM1-lUSe.js +0 -1
  369. package/dist/chunks/conversation-DKlz47xf.js +0 -1
  370. package/dist/chunks/conversation-cUxdb8MN.js +0 -1
  371. package/dist/chunks/createSession-BuJcoBAj.js +0 -1
  372. package/dist/chunks/cronJitterConfig-CYP7yrQu.js +0 -6
  373. package/dist/chunks/crossProjectResume-BJisir9Z.js +0 -40
  374. package/dist/chunks/datadog-CVeFkaQu.js +0 -1
  375. package/dist/chunks/envLessBridgeConfig-CT8sdmFu.js +0 -1
  376. package/dist/chunks/extra-usage-rdJ7ecEb.js +0 -1
  377. package/dist/chunks/extractMemories-BrvZVsmM.js +0 -1
  378. package/dist/chunks/fast-CLKKsx2H.js +0 -1
  379. package/dist/chunks/gates-CSHuXnUx.js +0 -1
  380. package/dist/chunks/hooks-BFdX17Za.js +0 -1
  381. package/dist/chunks/inboundAttachments-BVUunfAX.js +0 -1
  382. package/dist/chunks/initReplBridge-tPRGPBq7.js +0 -1
  383. package/dist/chunks/language-Cf6bMI4N.js +0 -1
  384. package/dist/chunks/launchAutofixPr-D9h6YAZY.js +0 -2
  385. package/dist/chunks/loadAgentsDir-DCyiY0MN.js +0 -1
  386. package/dist/chunks/localSearch-MBx7KzC2.js +0 -1
  387. package/dist/chunks/login-D8UKKaud.js +0 -1
  388. package/dist/chunks/logout-B0BjqlGi.js +0 -1
  389. package/dist/chunks/mcp-CanCqnch.js +0 -2
  390. package/dist/chunks/mcp-Dq0kxZFx.js +0 -6
  391. package/dist/chunks/mcp-zbxZM9BP.js +0 -1
  392. package/dist/chunks/model-H3rtl6eR.js +0 -1
  393. package/dist/chunks/permissions-S2EvIRKj.js +0 -3
  394. package/dist/chunks/pluginStartupCheck-DpxQPXJE.js +0 -1
  395. package/dist/chunks/plugins-DQ3CRWWO.js +0 -4
  396. package/dist/chunks/policyLimits-BotYrS-v.js +0 -1
  397. package/dist/chunks/poorMode-DEAe3hiK.js +0 -1
  398. package/dist/chunks/processBashCommand-DHHN8Ca4.js +0 -1
  399. package/dist/chunks/prompt-CO160cIr.js +0 -1
  400. package/dist/chunks/prompt-GY9hlRvI.js +0 -1
  401. package/dist/chunks/rcDebugLog-CPKZCtR8.js +0 -11
  402. package/dist/chunks/sandbox-adapter-CzwHes1i.js +0 -1
  403. package/dist/chunks/searchExtraTools-CcpdCO6l.js +0 -1
  404. package/dist/chunks/sessionFileAccessHooks-qnNiGMnE.js +0 -1
  405. package/dist/chunks/sessionMemory-CMahwDdW.js +0 -1
  406. package/dist/chunks/sessionMemory-pFSn4HSN.js +0 -1
  407. package/dist/chunks/sessionMemoryUtils-Du5jUl7M.js +0 -1
  408. package/dist/chunks/sessionObserver-Je868MC9.js +0 -1
  409. package/dist/chunks/sessionStorage-D3FhAADV.js +0 -1
  410. package/dist/chunks/setup-DWkSjA49.js +0 -2
  411. package/dist/chunks/sink-cQOgsnw3.js +0 -1
  412. package/dist/chunks/sinks-Djiz_5-Z.js +0 -1
  413. package/dist/chunks/skillChangeDetector-D8C-uQSQ.js +0 -1
  414. package/dist/chunks/skillLearning-3KWrBczS.js +0 -1
  415. package/dist/chunks/skillLearning-DBbdGbk-.js +0 -1
  416. package/dist/chunks/teamHelpers-CUAiXng3.js +0 -1
  417. package/dist/chunks/teammateModeSnapshot-C6EWhR0X.js +0 -1
  418. package/dist/chunks/teleport-LXFOan9C.js +0 -1
  419. package/dist/chunks/thinkback-DZW3Mcx_.js +0 -1
  420. package/dist/chunks/toolPool-DVOfpjDz.js +0 -1
  421. package/dist/chunks/toolPool-Dq-Vtvrj.js +0 -1
  422. package/dist/chunks/undercover-C_44e3oN.js +0 -1
  423. package/dist/chunks/upgrade-CGXa5Dwy.js +0 -1
  424. package/dist/chunks/useMainLoopModel-CwvuTRXn.js +0 -1
  425. package/dist/chunks/useSettingsErrors-C-j_Zt7g.js +0 -1
  426. package/dist/chunks/utils-CrZcpypC.js +0 -1
  427. package/dist/chunks/validatePlugin-vptAYuYu.js +0 -1
  428. package/dist/chunks/voiceModeEnabled-DIveLYGb.js +0 -1
  429. package/dist/chunks/voiceStreamSTT-hpzWd_zl.js +0 -1
  430. package/dist/chunks/worktree-CCuDwRmS.js +0 -1
@@ -0,0 +1 @@
1
+ import{o as e,t}from"./loadAgentsDir-D7kapZB5.js";e();export{t as clearAgentDefinitionsCache};
@@ -1 +1 @@
1
- import{Ov as e,jv as t,kv as n}from"./loadAgentsDir-DI1a76pd.js";e();export{n as loadPluginHooks,t as setupPluginHookHotReload};
1
+ import{Av as e,Nv as t,jv as n}from"./loadAgentsDir-D7kapZB5.js";e();export{n as loadPluginHooks,t as setupPluginHookHotReload};
@@ -0,0 +1 @@
1
+ import{a as e,c as t,o as n,t as r}from"./localSearch-r1_G8kfV.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{d as n,s as r}from"./debug-UI3T040K.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,n(`[skill-search] index cache cleared`)}async function h(e){if(C&&T===e)return C;let{getCommands:t}=await import(`./commands-BWIOEBPs.js`),r=await t(e),i=[];for(let e of r){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,n(`[skill-search] indexed ${i.length} skills from ${r.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=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((()=>{r(),_=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{d as n,s as r}from"./debug-UI3T040K.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,n(`[skill-search] index cache cleared`)}async function h(e){if(C&&T===e)return C;let{getCommands:t}=await import(`./commands-BX0_wEGw.js`),r=await t(e),i=[];for(let e of r){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,n(`[skill-search] indexed ${i.length} skills from ${r.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((()=>{r(),_=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 +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{Ac as p,Jt as m,Pc as h,S as g,Sc as _,T as ee,on as te,vt as ne,yt as re}from"./paths-BBvuDQl9.js";import{a as ie,r as ae}from"./env-chR0gV31.js";import{o as oe,s as v}from"./log-CzsijfHZ.js";import{FT as se,JS as ce,Lo as le,Ra as y,Ua as ue,YS as b,Zo as x,dy as de,fy as fe,jT as pe}from"./loadAgentsDir-DI1a76pd.js";import{a as me,r as he,t as S}from"./trustedDevice-BvYYXfd8.js";import{n as C,t as w}from"./useMainLoopModel-CwvuTRXn.js";import{n as T,r as E,t as D}from"./bypassPermissionsKillswitch-Bof-UtM-.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((()=>{te(),p(),R=`sk-ant-api03-`}));async function B(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{h(e=>({...e,workspaceApiKey:t}))}catch(e){throw Error(`Failed to save workspace API key to config: ${V(e)}`)}await _e()}async function ge(){try{h(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=ae();if(process.platform===`win32`){v(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){v(Error(`[saveWorkspaceKey] Could not set chmod 600 on ${e}: ${V(t)}`))}}var H,U,W,G=t((()=>{ie(),p(),oe(),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 B(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(x),n){f(),se(),ue(),re(),ee(),S(),he(),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 ge(),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)(de,{onDone:()=>t.onDone(!0,n),startingMessage:t.startingMessage})]})]})})}var Q,$,we=t((()=>{Q=n(i(),1),d(),me(),b(),fe(),s(),w(),g(),y(),pe(),le(),T(),ne(),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{Ac as p,Jt as m,Pc as h,S as g,Sc as _,T as ee,on as te,vt as ne,yt as re}from"./paths-1ngPRtu3.js";import{a as ie,r as ae}from"./env-chR0gV31.js";import{o as oe,s as v}from"./log-CzsijfHZ.js";import{LT as se,Lo as ce,NT as le,Ra as y,Ua as ue,XS as b,ZS as x,Zo as de,my as fe,py as pe}from"./loadAgentsDir-D7kapZB5.js";import{a as me,r as he,t as S}from"./trustedDevice-rdvUkS1W.js";import{n as C,t as w}from"./useMainLoopModel-Os8Ao8-x.js";import{n as T,r as E,t as D}from"./bypassPermissionsKillswitch-CK0jeZTW.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((()=>{te(),p(),R=`sk-ant-api03-`}));async function B(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{h(e=>({...e,workspaceApiKey:t}))}catch(e){throw Error(`Failed to save workspace API key to config: ${V(e)}`)}await _e()}async function ge(){try{h(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=ae();if(process.platform===`win32`){v(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){v(Error(`[saveWorkspaceKey] Could not set chmod 600 on ${e}: ${V(t)}`))}}var H,U,W,G=t((()=>{ie(),p(),oe(),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 B(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(de),n){f(),se(),ue(),re(),ee(),S(),he(),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 ge(),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)(b,{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)(pe,{onDone:()=>t.onDone(!0,n),startingMessage:t.startingMessage})]})]})})}var Q,$,we=t((()=>{Q=n(i(),1),d(),me(),x(),fe(),s(),w(),g(),y(),le(),ce(),T(),ne(),P(),z(),Se(),G(),$=u()}));export{Ce as n,we as r,Z as t};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,t as n}from"./login-7MvpaOkt.js";t();export{n as Login,e as call};
@@ -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{Ka as o,Zc as s,dn as c,el as l,en as u,on as d,oo as f}from"./paths-BBvuDQl9.js";import{n as p,t as m}from"./cwd--iizewsn.js";import{C as h,D as g,E as _,x as v}from"./startupProfiler-DnXZaX4A.js";import{Ar as y,Wr as b}from"./loadAgentsDir-DI1a76pd.js";import{r as x,t as S}from"./semver-Tw0AFar5.js";import{c as C,s as w,u as T}from"./releaseNotes-CnhQit0y.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`${g(i,n-1-1-s)}…/${a}`;let c=n-o-s-1-2;if(c<=0)return`${g(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.6.5`,t=i(),n=process.env.DEMO_VERSION?`/code/claude`:s(m());return{version:e,cwd:t?`${n} in ${t.replace(/^https?:\/\//,``)}`:n,billingType:c()?u():`API Usage Billing`,agentName:o().agent}}function P(e,n,r){return t(e)+3+t(n)>r?{shouldSplit:!0,truncatedModel:h(e,r),truncatedBilling:h(n,r)}:{shouldSplit:!1,truncatedModel:h(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(),l(),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{Ka as o,Zc as s,dn as c,el as l,en as u,on as d,oo as f}from"./paths-1ngPRtu3.js";import{n as p,t as m}from"./cwd--iizewsn.js";import{C as h,D as g,E as _,x as v}from"./startupProfiler-DnXZaX4A.js";import{Ar as y,Wr as b}from"./loadAgentsDir-D7kapZB5.js";import{r as x,t as S}from"./semver-Tw0AFar5.js";import{c as C,s as w,u as T}from"./releaseNotes-CvfZb3fZ.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`${g(i,n-1-1-s)}…/${a}`;let c=n-o-s-1-2;if(c<=0)return`${g(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.6.6`,t=i(),n=process.env.DEMO_VERSION?`/code/claude`:s(m());return{version:e,cwd:t?`${n} in ${t.replace(/^https?:\/\//,``)}`:n,billingType:c()?u():`API Usage Billing`,agentName:o().agent}}function P(e,n,r){return t(e)+3+t(n)>r?{shouldSplit:!0,truncatedModel:h(e,r),truncatedBilling:h(n,r)}:{shouldSplit:!1,truncatedModel:h(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(),l(),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{DT as e,ET as t,OT as n,kT as r}from"./loadAgentsDir-D7kapZB5.js";n();export{t as call,e as clearAuthRelatedCaches,r 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,mc as a,pc as o}from"./paths-BBvuDQl9.js";import{V as s,W as c,h as l,p as u}from"./debug-UI3T040K.js";import{Bc as d,DD as f,Fo as p,GA as m,Hc as h,Lo as g,OD as _,Vc as v,ZA as y,bo as b,i_ as x,r_ as S}from"./loadAgentsDir-DI1a76pd.js";import{On as C,jn as w}from"./prompt-CjFAtm3w.js";import{i as T,o as E}from"./fileStateCache-C7-TxF8G.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,mc as a,pc as o}from"./paths-1ngPRtu3.js";import{V as s,W as c,h as l,p as u}from"./debug-UI3T040K.js";import{$A as d,AD as f,Bc as p,Fo as m,Hc as h,Lo as g,Vc as _,bo as v,kD as y,n_ as b,qA as x,r_ as S}from"./loadAgentsDir-D7kapZB5.js";import{On as C,jn as w}from"./prompt-BBg3jtfc.js";import{i as T,o as E}from"./fileStateCache-C7-TxF8G.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:m(s,void 0),CLAUDE_MODEL:s,CLAUDE_CWD:process.cwd()})}var M=e((()=>{n(),l(),y(),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:[C],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,s=T(o.readFileState);s.delete(e.path);let l={...o,readFileState:s},u=``;try{let t=(await d.call({file_path:e.path},l)).data;t.type===`text`&&(u=t.file.content)}catch(t){if(c(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 p=await j(u,e.path,f.title,f.instructions),m=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 ${C} is allowed for ${e.path}`,decisionReason:{type:`other`,reason:`only ${C} is allowed`}}};for await(let e of x({agentDefinition:I(),promptMessages:[b({content:p})],toolUseContext:l,canUseTool:m,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`&&(h((e,t)=>{P(t)&&F(e)}),_(H))}var z,B,V,H,U=e((()=>{S(),w(),v(),s(),E(),f(),g(),o(),M(),z=/^#\s*MAGIC\s+DOC:\s*(.+)$/im,B=/^[_*](.+?)[_*]\s*$/m,V=new Map,H=a(async function(e){let{messages:t,querySource:n}=e;if(n===`repl_main_thread`&&!p(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:x(s,void 0),CLAUDE_MODEL:s,CLAUDE_CWD:process.cwd()})}var M=e((()=>{n(),l(),d(),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:[C],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,s=T(o.readFileState);s.delete(e.path);let l={...o,readFileState:s},u=``;try{let t=(await p.call({file_path:e.path},l)).data;t.type===`text`&&(u=t.file.content)}catch(t){if(c(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),m=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 ${C} is allowed for ${e.path}`,decisionReason:{type:`other`,reason:`only ${C} is allowed`}}};for await(let e of S({agentDefinition:I(),promptMessages:[v({content:f})],toolUseContext:l,canUseTool:m,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`&&(h((e,t)=>{P(t)&&F(e)}),f(H))}var z,B,V,H,U=e((()=>{b(),w(),_(),s(),E(),y(),g(),o(),M(),z=/^#\s*MAGIC\s+DOC:\s*(.+)$/im,B=/^[_*](.+?)[_*]\s*$/m,V=new Map,H=a(async function(e){let{messages:t,querySource:n}=e;if(n===`repl_main_thread`&&!m(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};