claude-code-best 2.6.6 → 2.6.9

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 (435) hide show
  1. package/README.md +3 -5
  2. package/dist/chunks/{AddWorkspaceDirectory-Bb6crGWh.js → AddWorkspaceDirectory-_RSNUS7K.js} +1 -1
  3. package/dist/chunks/{App-CW0Y4ceR.js → App-4VqMMjIu.js} +1 -1
  4. package/dist/chunks/{ApproveApiKey-9rkwQfgT.js → ApproveApiKey-B7oSxzWc.js} +1 -1
  5. package/dist/chunks/ApproveApiKey-Bmcop2Do.js +1 -0
  6. package/dist/chunks/{AssistantSessionChooser-XzXZZdiH.js → AssistantSessionChooser-Lf5l_1Dh.js} +1 -1
  7. package/dist/chunks/BackgroundTasksDialog-Ckgmqm6u.js +2 -0
  8. package/dist/chunks/{BypassPermissionsModeDialog-DlLWAKw2.js → BypassPermissionsModeDialog-DNqPpiPC.js} +1 -1
  9. package/dist/chunks/{ClaudeInChromeOnboarding-CjGydpBk.js → ClaudeInChromeOnboarding-BODZ64gw.js} +1 -1
  10. package/dist/chunks/{ClaudeMdExternalIncludesDialog-B04cjDwX.js → ClaudeMdExternalIncludesDialog-DLI6ey3G.js} +1 -1
  11. package/dist/chunks/ClaudeMdExternalIncludesDialog-DO61Zz-S.js +1 -0
  12. package/dist/chunks/ConsoleOAuthFlow-FSHC5mxO.js +1 -0
  13. package/dist/chunks/{DesktopHandoff-CFBUqcCf.js → DesktopHandoff--xyI5kTQ.js} +1 -1
  14. package/dist/chunks/{DevChannelsDialog-ByTf41du.js → DevChannelsDialog-DJ4mHsA_.js} +1 -1
  15. package/dist/chunks/{DiffDialog-CY-8kw_Q.js → DiffDialog-CVWUlOjm.js} +2 -2
  16. package/dist/chunks/Doctor-DVoFX-9y.js +3 -0
  17. package/dist/chunks/Doctor-Dcntgp5Z.js +1 -0
  18. package/dist/chunks/{ExitFlow-BlON8IgH.js → ExitFlow-BKzQPr75.js} +2 -2
  19. package/dist/chunks/{Feedback-CSeD3k4M.js → Feedback-hFZwDSRp.js} +2 -2
  20. package/dist/chunks/Grove-Cmcsx2UE.js +1 -0
  21. package/dist/chunks/{Grove-Tp_UtIMg.js → Grove-G0DtwY22.js} +1 -1
  22. package/dist/chunks/{HybridTransport-CAko699F.js → HybridTransport-xN03sWrt.js} +1 -1
  23. package/dist/chunks/{ITermBackend-5P3WJumD.js → ITermBackend-DzN3ZWds.js} +1 -1
  24. package/dist/chunks/{InvalidConfigDialog-CVcdra9v.js → InvalidConfigDialog-Iy4Su1Lm.js} +1 -1
  25. package/dist/chunks/{InvalidSettingsDialog-CfLdbmSI.js → InvalidSettingsDialog-dx4y_nY-.js} +1 -1
  26. package/dist/chunks/{MCPConnectionManager-BK_3uwQj.js → MCPConnectionManager-kVO-4BcA.js} +1 -1
  27. package/dist/chunks/{McpParsingWarnings-BOj-T8F3.js → McpParsingWarnings-D420-W8M.js} +1 -1
  28. package/dist/chunks/MessageSelector-CDVC2CAj.js +3 -0
  29. package/dist/chunks/Messages-C5gVVVmY.js +11 -0
  30. package/dist/chunks/{Onboarding-C06Mxlf-.js → Onboarding-BkidUre_.js} +1 -1
  31. package/dist/chunks/{OverageCreditUpsell-abcPm3PB.js → OverageCreditUpsell-DoRUucoN.js} +1 -1
  32. package/dist/chunks/PluginSettings-DhpNtjTm.js +17 -0
  33. package/dist/chunks/{PromptInputFooterSuggestions-ihnbjU0K.js → PromptInputFooterSuggestions-BnpXzkW9.js} +1 -1
  34. package/dist/chunks/{PromptInputHelpMenu-CMm8z7Gk.js → PromptInputHelpMenu-DKbiO4C0.js} +1 -1
  35. package/dist/chunks/QueryEngine-J15EOjWx.js +1 -0
  36. package/dist/chunks/REPL-Dk3Ics9i.js +1 -0
  37. package/dist/chunks/{REPL-CBFcgD4r.js → REPL-nrJ13J1o.js} +34 -34
  38. package/dist/chunks/{RemoteCallout-Cy6lH-CZ.js → RemoteCallout-DGXIcTKv.js} +1 -1
  39. package/dist/chunks/{RemoteSessionManager-C7iGd5Og.js → RemoteSessionManager-3KsuTCZM.js} +2 -2
  40. package/dist/chunks/ResumeConversation-kS7lkjJm.js +1 -0
  41. package/dist/chunks/{SSETransport-B5xlXeAN.js → SSETransport-Cy1rXP6E.js} +1 -1
  42. package/dist/chunks/SearchExtraToolsTool-C998WSxs.js +1 -0
  43. package/dist/chunks/SentryErrorBoundary-BJLT-ebr.js +1 -0
  44. package/dist/chunks/{SentryErrorBoundary-iih9eFpM.js → SentryErrorBoundary-B_6MfzRa.js} +1 -1
  45. package/dist/chunks/Settings-DBopjMkN.js +2 -0
  46. package/dist/chunks/{TeleportProgress-BX-uLwuL.js → TeleportProgress-CQUN_zoe.js} +1 -1
  47. package/dist/chunks/{TeleportRepoMismatchDialog-D8oPPTWd.js → TeleportRepoMismatchDialog-CPquWrd-.js} +1 -1
  48. package/dist/chunks/{TeleportResumeWrapper-B_CvNDbr.js → TeleportResumeWrapper-NIFNCHIO.js} +1 -1
  49. package/dist/chunks/{ThemePicker-BG1ykSpX.js → ThemePicker-DnK0DStD.js} +1 -1
  50. package/dist/chunks/{TmuxBackend-CnMCWNS4.js → TmuxBackend-C00k5RF9.js} +1 -1
  51. package/dist/chunks/{TrustDialog-Z_maAYj8.js → TrustDialog-CUnvtDeS.js} +1 -1
  52. package/dist/chunks/{ValidationErrorsList-C9swVkZ-.js → ValidationErrorsList-CJbO1qub.js} +1 -1
  53. package/dist/chunks/{WelcomeV2-Au_5ddlT.js → WelcomeV2-BBFGft_e.js} +1 -1
  54. package/dist/chunks/{WindowsTerminalBackend-CGxaYH74.js → WindowsTerminalBackend-DSsgxuNK.js} +1 -1
  55. package/dist/chunks/{add-dir-Cm9u56YX.js → add-dir-BPqd010H.js} +1 -1
  56. package/dist/chunks/{agentDisplay-Bi_bEyEn.js → agentDisplay-C0B1b_90.js} +1 -1
  57. package/dist/chunks/{agents-CbjR7hNr.js → agents-CYs7WGHP.js} +1 -1
  58. package/dist/chunks/{agents-CMF9fLzV.js → agents-DMzVeRly.js} +7 -7
  59. package/dist/chunks/{ant-Bu1Gs4WJ.js → ant-BO0Hmoii.js} +1 -1
  60. package/dist/chunks/api-B2HW-oZI.js +1 -0
  61. package/dist/chunks/{api-D_t0nHsS.js → api-DLLVkmRJ.js} +1 -1
  62. package/dist/chunks/asciicast-C3nf97NR.js +1 -0
  63. package/dist/chunks/{asciicast-o5Zg4dJt.js → asciicast-DIsaWcsJ.js} +1 -1
  64. package/dist/chunks/assistant-BmM44yln.js +1 -0
  65. package/dist/chunks/{assistant-C_pfWe2a.js → assistant-CHp4-EaF.js} +1 -1
  66. package/dist/chunks/{assistant-EA-MHNQ-.js → assistant-_dIpsqHM.js} +1 -1
  67. package/dist/chunks/{auth-D7PZvVPf.js → auth-DelyQc8g.js} +1 -1
  68. package/dist/chunks/auth-ndSNSeqS.js +1 -0
  69. package/dist/chunks/{autoMode-B8iO05xy.js → autoMode-D3-o7xPK.js} +1 -1
  70. package/dist/chunks/{autonomy-CaLvE5N6.js → autonomy-CzSRoxjl.js} +12 -12
  71. package/dist/chunks/{autonomy-dQVtSiCJ.js → autonomy-tTAucjip.js} +1 -1
  72. package/dist/chunks/{autonomyPanel-DSswVlCF.js → autonomyPanel-DcK8N52K.js} +1 -1
  73. package/dist/chunks/backgroundHousekeeping-Bbkz61_-.js +17 -0
  74. package/dist/chunks/backgroundHousekeeping-DVo3ndZr.js +1 -0
  75. package/dist/chunks/{branch-C7pM8Sjh.js → branch-ZJF4xAh9.js} +1 -1
  76. package/dist/chunks/{bridge-CTYdzSWg.js → bridge-C6gSt_32.js} +2 -2
  77. package/dist/chunks/{bridgeConfig-Df6uyp3q.js → bridgeConfig-DXUNQp2l.js} +1 -1
  78. package/dist/chunks/bridgeConfig-ZcbBdhji.js +1 -0
  79. package/dist/chunks/bridgeEnabled-D5qCI5v2.js +1 -0
  80. package/dist/chunks/{bridgeEnabled-A-_xJ94c.js → bridgeEnabled-G6vxQV-7.js} +1 -1
  81. package/dist/chunks/bridgeMain-B4Zv8UOe.js +1 -0
  82. package/dist/chunks/bridgeMain-DlnIQOtX.js +68 -0
  83. package/dist/chunks/{bridgeMessaging-DPVLAIzl.js → bridgeMessaging-mek-AaFi.js} +1 -1
  84. package/dist/chunks/{bridgePointer-FvAMj3re.js → bridgePointer-B2FPGDWR.js} +1 -1
  85. package/dist/chunks/{btw-CqgjLlFN.js → btw-Cz2lyle-.js} +1 -1
  86. package/dist/chunks/{buddy-DCGBAqF2.js → buddy-BMqKttFw.js} +1 -1
  87. package/dist/chunks/{bypassPermissionsKillswitch-CK0jeZTW.js → bypassPermissionsKillswitch-BxvX48jr.js} +1 -1
  88. package/dist/chunks/caches-D_W3nCFE.js +1 -0
  89. package/dist/chunks/{caches-CdVW8fYV.js → caches-wtRUk5y5.js} +2 -2
  90. package/dist/chunks/{ccrClient-B_3AmY7K.js → ccrClient-BOrmrmgF.js} +1 -1
  91. package/dist/chunks/changeDetector-CUsHUdul.js +1 -0
  92. package/dist/chunks/channelNotification-CLVU5AuO.js +1 -0
  93. package/dist/chunks/{channelNotification-BbDQdLZC.js → channelNotification-D8do6HUN.js} +1 -1
  94. package/dist/chunks/{chrome-CGyqsCkL.js → chrome-JF2BXNK6.js} +1 -1
  95. package/dist/chunks/clear-BP-G1JWa.js +1 -0
  96. package/dist/chunks/client-BHfY6SC5.js +1 -0
  97. package/dist/chunks/color-oh8CGhkI.js +1 -0
  98. package/dist/chunks/commands-E0eNJ_XZ.js +1 -0
  99. package/dist/chunks/commitAttribution-B4DOgUS7.js +1 -0
  100. package/dist/chunks/{commitAttribution-e0kkanVT.js → commitAttribution-CUdm_sRl.js} +1 -1
  101. package/dist/chunks/{compact-Dh9RewNA.js → compact-R6vMbGQQ.js} +3 -3
  102. package/dist/chunks/{companion-DVFacTUw.js → companion-ClxqTyG9.js} +1 -1
  103. package/dist/chunks/{config-DwiVCSrY.js → config-BQ-MayP6.js} +1 -1
  104. package/dist/chunks/{config-CkSmYDJY.js → config-CPK9PlWS.js} +1 -1
  105. package/dist/chunks/{context-B8VDDHTv.js → context-CWfsKYEB.js} +1 -1
  106. package/dist/chunks/{context-noninteractive-IZfWniex.js → context-noninteractive-BJ4hE3MX.js} +2 -2
  107. package/dist/chunks/context-noninteractive-D1Kxn5e0.js +1 -0
  108. package/dist/chunks/conversation-C23rDJe3.js +1 -0
  109. package/dist/chunks/conversation-DizpkPtq.js +1 -0
  110. package/dist/chunks/{copy-CIjrYoFa.js → copy-BuPCS2HG.js} +2 -2
  111. package/dist/chunks/{createSSHSession-ArNlbIZB.js → createSSHSession-Di9Je4Th.js} +1 -1
  112. package/dist/chunks/createSession-Bsa0VJKS.js +1 -0
  113. package/dist/chunks/{createSession-CBheIT_G.js → createSession-D6v0lBtG.js} +1 -1
  114. package/dist/chunks/{cronJitterConfig-DcMGWOa-.js → cronJitterConfig-By18m-PD.js} +3 -3
  115. package/dist/chunks/{crossProjectResume-Z-aR2q-d.js → crossProjectResume-C4YT2T6P.js} +3 -3
  116. package/dist/chunks/{datadog-BK8eJz8B.js → datadog-BFSdlK6C.js} +1 -1
  117. package/dist/chunks/datadog-MUvg76p3.js +1 -0
  118. package/dist/chunks/{desktop-B9vWJeRu.js → desktop-Bd-JHrBo.js} +1 -1
  119. package/dist/chunks/{diff-BTV7_Dca.js → diff-DGmINgOc.js} +1 -1
  120. package/dist/chunks/{directoryCompletion-DP_4B1GL.js → directoryCompletion-D7EGwonO.js} +1 -1
  121. package/dist/chunks/{doctor-Dpbh0aRz.js → doctor-DQ42RQPx.js} +1 -1
  122. package/dist/chunks/{effort-Czlwa5qF.js → effort-E6XjzPYR.js} +2 -2
  123. package/dist/chunks/entry-Di8oWZUk.js +14 -0
  124. package/dist/chunks/{envLessBridgeConfig-BAFYaZ0E.js → envLessBridgeConfig-BNvozi46.js} +1 -1
  125. package/dist/chunks/envLessBridgeConfig-CUTBQKDY.js +1 -0
  126. package/dist/chunks/{exit-DzOm62Dn.js → exit-CVlpMwCq.js} +1 -1
  127. package/dist/chunks/{export-DHOR3z3Z.js → export-CXcPQd0T.js} +1 -1
  128. package/dist/chunks/{exportRenderer-CiNXeNr9.js → exportRenderer-B9WXgMV2.js} +1 -1
  129. package/dist/chunks/{extra-usage-DIYR_3ZR.js → extra-usage-B2KmuAZe.js} +1 -1
  130. package/dist/chunks/extra-usage-DVtAa1zD.js +1 -0
  131. package/dist/chunks/{extra-usage-core-C3uM9bOP.js → extra-usage-core-B20tawuN.js} +1 -1
  132. package/dist/chunks/{extra-usage-noninteractive-Ctz9TfY8.js → extra-usage-noninteractive-DZRe98BZ.js} +1 -1
  133. package/dist/chunks/{extraUsage-CBwIvl73.js → extraUsage-CxqJdnGC.js} +1 -1
  134. package/dist/chunks/extractMemories-8uB606Y0.js +1 -0
  135. package/dist/chunks/{fast-BpBwjbSD.js → fast-CPmJ2bp3.js} +1 -1
  136. package/dist/chunks/fast-DTGg3pRh.js +1 -0
  137. package/dist/chunks/{feedback-BkVnsZVx.js → feedback-4GY3ahvw.js} +1 -1
  138. package/dist/chunks/{firstPartyEventLogger-BCzGkdpd.js → firstPartyEventLogger-CISUrAsf.js} +1 -1
  139. package/dist/chunks/{flushGate-CQsnMw8g.js → flushGate-Dr8sMjB7.js} +1 -1
  140. package/dist/chunks/gates-BbF5S-Dy.js +1 -0
  141. package/dist/chunks/{gates-CxWIWtmd.js → gates-DI4pxvrD.js} +1 -1
  142. package/dist/chunks/{gemini-BbV8D2SS.js → gemini-Dcfosr2Z.js} +1 -1
  143. package/dist/chunks/{generateRecap-B3j2nUgh.js → generateRecap-CH_fgtxk.js} +1 -1
  144. package/dist/chunks/{generateSessionName-aGnXSNgN.js → generateSessionName-DO0R__8w.js} +1 -1
  145. package/dist/chunks/{githubRepoPathMapping-DCJLSTLl.js → githubRepoPathMapping-D5I8CVDz.js} +1 -1
  146. package/dist/chunks/grok-X0FzcE6Y.js +1 -0
  147. package/dist/chunks/{growthbook-prtWhMRg.js → growthbook-DZPT2JzB.js} +1 -1
  148. package/dist/chunks/{heapdump-Czm-2XiG.js → heapdump-Cq6i0wJH.js} +1 -1
  149. package/dist/chunks/{help-CSAFsN0-.js → help-B8ddA-Ec.js} +1 -1
  150. package/dist/chunks/{hooks-DkbOP-bI.js → hooks-CvFNccdv.js} +2 -2
  151. package/dist/chunks/hooks-gwB4Eotj.js +1 -0
  152. package/dist/chunks/{hostAdapter-BcdDPVTj.js → hostAdapter-D3s4JFk-.js} +1 -1
  153. package/dist/chunks/{ide-BXERRFZF.js → ide-CzxV5_D7.js} +2 -2
  154. package/dist/chunks/{inboundAttachments-7rXrAtkb.js → inboundAttachments-B3ZTyNKF.js} +1 -1
  155. package/dist/chunks/inboundAttachments-DxrrrqBW.js +1 -0
  156. package/dist/chunks/initReplBridge-DWpGy3aE.js +1 -0
  157. package/dist/chunks/{insights-DrvqJgF8.js → insights-DiWlKgVQ.js} +5 -5
  158. package/dist/chunks/{install-BGnxwO00.js → install-BFpg1zm1.js} +1 -1
  159. package/dist/chunks/{install-github-app-CIpBHlr9.js → install-github-app-BUCGGSw0.js} +2 -2
  160. package/dist/chunks/{install-slack-app-By4Lh7ww.js → install-slack-app-D5JDqzbs.js} +1 -1
  161. package/dist/chunks/{instrumentation-D9y7Ph_R.js → instrumentation--BToLJT9.js} +3 -3
  162. package/dist/chunks/{job-BPVIMW_P.js → job-mUyxSEc2.js} +1 -1
  163. package/dist/chunks/{keybindings-Ce6AHMLI.js → keybindings-D4DbE4G0.js} +2 -2
  164. package/dist/chunks/{lang-DfDG_fSa.js → lang-cMcnaxAR.js} +1 -1
  165. package/dist/chunks/language-DC6bsdvI.js +1 -0
  166. package/dist/chunks/{language-yGoDFP3X.js → language-sTn9sA3E.js} +1 -1
  167. package/dist/chunks/{launchAgentsPlatform-DT01xZM7.js → launchAgentsPlatform-CAfyCAsQ.js} +1 -1
  168. package/dist/chunks/{launchAutofixPr-DrYd7WVf.js → launchAutofixPr-CSMamZS6.js} +3 -3
  169. package/dist/chunks/{launchLocalMemory-Bt3tMYVJ.js → launchLocalMemory-nYAwNsNT.js} +2 -2
  170. package/dist/chunks/{launchLocalVault-jyRHEa_Y.js → launchLocalVault-yPp8S-tG.js} +3 -3
  171. package/dist/chunks/{launchMemoryStores-cmXnLAF5.js → launchMemoryStores-Dk3SXucB.js} +1 -1
  172. package/dist/chunks/{launchOnboarding-BPTNFftb.js → launchOnboarding-BoqmHyRx.js} +1 -1
  173. package/dist/chunks/{launchSchedule-141GqGC8.js → launchSchedule-C2HBjD6C.js} +1 -1
  174. package/dist/chunks/{launchSkillStore-Bz0lok_o.js → launchSkillStore-B5Yjvi-k.js} +1 -1
  175. package/dist/chunks/{launchTeleport-BMquJxIq.js → launchTeleport-BayvAnwh.js} +3 -3
  176. package/dist/chunks/{launchVault-Bsuwqad6.js → launchVault-BszsgPbZ.js} +1 -1
  177. package/dist/chunks/loadAgentsDir-6_9ZFegv.js +1 -0
  178. package/dist/chunks/{loadAgentsDir-D7kapZB5.js → loadAgentsDir-Cl2w3uvH.js} +810 -791
  179. package/dist/chunks/loadPluginHooks-YHtjByxm.js +1 -0
  180. package/dist/chunks/{localSearch-r1_G8kfV.js → localSearch-CpeqVibs.js} +1 -1
  181. package/dist/chunks/localSearch-DbEm6f3k.js +1 -0
  182. package/dist/chunks/login-D2x89UCR.js +1 -0
  183. package/dist/chunks/{login-7MvpaOkt.js → login-TVtq34WQ.js} +1 -1
  184. package/dist/chunks/{logoV2Utils-DjThKW15.js → logoV2Utils-DwaRnvOY.js} +1 -1
  185. package/dist/chunks/logout-BBPihkXp.js +1 -0
  186. package/dist/chunks/{magicDocs-Dy72LHIj.js → magicDocs-_yNWB88A.js} +2 -2
  187. package/dist/chunks/{main-CF6Im-LV.js → main-gTbhsbIs.js} +48 -48
  188. package/dist/chunks/{mappers-CkMESMy7.js → mappers-COd8OOml.js} +1 -1
  189. package/dist/chunks/mcp-CChzTC5v.js +6 -0
  190. package/dist/chunks/{mcp-BTgHgOhR.js → mcp-D-0wE0nJ.js} +2 -2
  191. package/dist/chunks/mcp-DoraEndj.js +1 -0
  192. package/dist/chunks/{mcpServer-BueM5fWI.js → mcpServer-CpBN77YB.js} +1 -1
  193. package/dist/chunks/{mcpServer-Dqm2PQQx.js → mcpServer-Wd9rZG_E.js} +1 -1
  194. package/dist/chunks/{memory-BNZmqma1.js → memory-I21QZZ9h.js} +1 -1
  195. package/dist/chunks/{model-DOw7wIKQ.js → model-BrHh21Db.js} +1 -1
  196. package/dist/chunks/model-C6_WjCy0.js +1 -0
  197. package/dist/chunks/{onChangeAppState-Cb9_yIuW.js → onChangeAppState-Cn_HSmmQ.js} +1 -1
  198. package/dist/chunks/openai-BD2V4lHN.js +10 -0
  199. package/dist/chunks/openaiShared-Bjrci9n8.js +1 -0
  200. package/dist/chunks/{overageCreditGrant-BrN7dk3d.js → overageCreditGrant-B47t5a73.js} +1 -1
  201. package/dist/chunks/{passes-vgcY8_l8.js → passes-DAOPYX0C.js} +1 -1
  202. package/dist/chunks/{path-C4kbwvSH.js → path-B3lx7yHn.js} +1 -1
  203. package/dist/chunks/{paths-1ngPRtu3.js → paths-q1-Ni8Oh.js} +7 -7
  204. package/dist/chunks/permissions-BmxTU-Pk.js +3 -0
  205. package/dist/chunks/{pipeTransport-KU8psPDI.js → pipeTransport-DnHE3axn.js} +1 -1
  206. package/dist/chunks/{plan-5NVPuxp6.js → plan-4dmnQ9bv.js} +1 -1
  207. package/dist/chunks/{plugin-t8jMqdsY.js → plugin-CG7lJIpf.js} +1 -1
  208. package/dist/chunks/{pluginAutoupdate-CAa4KLro.js → pluginAutoupdate-CPLuidh-.js} +1 -1
  209. package/dist/chunks/{pluginBlocklist-BG2LkLq1.js → pluginBlocklist-BHxIUqu4.js} +1 -1
  210. package/dist/chunks/{pluginCliCommands-vqAtVibb.js → pluginCliCommands-BcDIvxR3.js} +1 -1
  211. package/dist/chunks/{pluginFlagging-BFCtv3kY.js → pluginFlagging-Dh6rYOvj.js} +1 -1
  212. package/dist/chunks/{pluginOperations-C9XP-mko.js → pluginOperations-fdLcp72i.js} +2 -2
  213. package/dist/chunks/{pluginStartupCheck-RRcAbKfx.js → pluginStartupCheck-Dy7EckW4.js} +1 -1
  214. package/dist/chunks/pluginStartupCheck-fyqW-stg.js +1 -0
  215. package/dist/chunks/plugins-C3-iYKTp.js +4 -0
  216. package/dist/chunks/policyLimits-DUGrXcje.js +1 -0
  217. package/dist/chunks/{pollConfig-DTYIJ8lQ.js → pollConfig-BGXMaSla.js} +1 -1
  218. package/dist/chunks/{poor-Dw5dMZpM.js → poor-CxAil0Mi.js} +1 -1
  219. package/dist/chunks/poorMode-BkPHRLuG.js +1 -0
  220. package/dist/chunks/{poorMode-CsGLI_hm.js → poorMode-DFcYVnMT.js} +1 -1
  221. package/dist/chunks/print-Cog1o-Tw.js +39 -0
  222. package/dist/chunks/{privacy-settings-P2r-kg2i.js → privacy-settings-D6g7p6sB.js} +1 -1
  223. package/dist/chunks/{processBashCommand-a8W8aTRu.js → processBashCommand-DqgujTR4.js} +1 -1
  224. package/dist/chunks/processSlashCommand-DUPS9Xx3.js +6 -0
  225. package/dist/chunks/prompt-B-8CD-W_.js +1 -0
  226. package/dist/chunks/{prompt-BBg3jtfc.js → prompt-BmOnuQfF.js} +1 -1
  227. package/dist/chunks/prompt-Da3gIGA8.js +1 -0
  228. package/dist/chunks/{promptEditor-CvaugNTt.js → promptEditor-ClGwMkWl.js} +2 -2
  229. package/dist/chunks/{protocolHandler-DxBaHlaD.js → protocolHandler--b0d38gF.js} +1 -1
  230. package/dist/chunks/{rate-limit-options-Df_sgE0b.js → rate-limit-options-DD2ZRREl.js} +1 -1
  231. package/dist/chunks/{rcDebugLog-CPGWJbI4.js → rcDebugLog-fhwD4wm-.js} +1 -1
  232. package/dist/chunks/{referral-BKeCKnOJ.js → referral-rRvT6UDX.js} +1 -1
  233. package/dist/chunks/refresh-C7S_6LOQ.js +1 -0
  234. package/dist/chunks/{registerProtocol-DLuRm0mf.js → registerProtocol-Bu_tz5Au.js} +1 -1
  235. package/dist/chunks/{registry-DVSgtCq5.js → registry-Bk0vdx_8.js} +1 -1
  236. package/dist/chunks/{release-notes-CZcf8zB7.js → release-notes-BShc_V-B.js} +1 -1
  237. package/dist/chunks/{releaseNotes-CvfZb3fZ.js → releaseNotes-D3wZdQVZ.js} +2 -2
  238. package/dist/chunks/{reload-plugins-pSlDLk3b.js → reload-plugins-CpytFAAC.js} +1 -1
  239. package/dist/chunks/{remote-env-BH89NuwC.js → remote-env-B9Of1v31.js} +1 -1
  240. package/dist/chunks/{remoteBridgeCore-CrXlWEL1.js → remoteBridgeCore-BXp6nJ8q.js} +1 -1
  241. package/dist/chunks/{remoteControlServer-BSOnq4yY.js → remoteControlServer-BvlTaHu4.js} +2 -2
  242. package/dist/chunks/{rename-DNGvNQm2.js → rename-DhTddAd7.js} +1 -1
  243. package/dist/chunks/{resume-6UL38yL3.js → resume-DwVeFqnc.js} +2 -2
  244. package/dist/chunks/{runtimeObserver-Cp-DN8fP.js → runtimeObserver-BtgDP8Gz.js} +1 -1
  245. package/dist/chunks/{runtimeObserver-BhvHeiwD.js → runtimeObserver-dtT0QHYO.js} +4 -4
  246. package/dist/chunks/sandbox-adapter-Cm8kCM_U.js +1 -0
  247. package/dist/chunks/{sandbox-toggle-D19YbI5G.js → sandbox-toggle-CG2vZNAb.js} +1 -1
  248. package/dist/chunks/searchExtraTools-D-RZ9DId.js +1 -0
  249. package/dist/chunks/{sentry-BZmpC-iI.js → sentry-DFk8bzvt.js} +1 -1
  250. package/dist/chunks/{session-lLpGqp0B.js → session-DifFcUdR.js} +1 -1
  251. package/dist/chunks/{sessionDiscovery-BX3fjgzD.js → sessionDiscovery-CRbLIQv1.js} +1 -1
  252. package/dist/chunks/sessionFileAccessHooks-Bixkjai4.js +1 -0
  253. package/dist/chunks/sessionMemory-BdptRKL8.js +1 -0
  254. package/dist/chunks/sessionMemory-T1K_mJRE.js +1 -0
  255. package/dist/chunks/sessionMemoryUtils-q3xRtP-z.js +1 -0
  256. package/dist/chunks/{sessionObserver-CujNIWks.js → sessionObserver-D3vw6SJ_.js} +1 -1
  257. package/dist/chunks/sessionObserver-i_3day_6.js +1 -0
  258. package/dist/chunks/sessionStorage-CusaYoh0.js +1 -0
  259. package/dist/chunks/sessionStoragePortable-DJZ_6cL8.js +3 -0
  260. package/dist/chunks/{sessionTitle-QxXslbJY.js → sessionTitle-DnvlYJ-c.js} +2 -2
  261. package/dist/chunks/{sessionTracing-DognYcDf.js → sessionTracing-BkzKJi0v.js} +1 -1
  262. package/dist/chunks/{settingsSync-DEPET5O1.js → settingsSync-CHZVpM34.js} +1 -1
  263. package/dist/chunks/{setup-C6G0lasE.js → setup-BfecYO-n.js} +1 -1
  264. package/dist/chunks/setup-BpwYOhci.js +2 -0
  265. package/dist/chunks/{setup-BUBUidOg.js → setup-GxlEx1KG.js} +1 -1
  266. package/dist/chunks/{shadowedRuleDetection-CQayPrmM.js → shadowedRuleDetection-FNzEipG0.js} +1 -1
  267. package/dist/chunks/{sideQuestion-B9EE1vTM.js → sideQuestion-Bfa0SZn5.js} +1 -1
  268. package/dist/chunks/sink-BSwQ045N.js +1 -0
  269. package/dist/chunks/{sink-Cugto5We.js → sink-DpAjuilF.js} +1 -1
  270. package/dist/chunks/{sinks-B9A94oIj.js → sinks-C37Xl5c3.js} +2 -2
  271. package/dist/chunks/sinks-DHHmQJi-.js +1 -0
  272. package/dist/chunks/{skill-learning-CroDcatu.js → skill-learning-BSeEbCnP.js} +1 -1
  273. package/dist/chunks/skillChangeDetector-BEDBRGbY.js +1 -0
  274. package/dist/chunks/{skillGapStore-91Mb3xDY.js → skillGapStore-B4GmZRJ0.js} +2 -2
  275. package/dist/chunks/{skillGapStore-LKwap3o4.js → skillGapStore-BCO6YB3H.js} +1 -1
  276. package/dist/chunks/{skillGenerator-B9GM0LHk.js → skillGenerator-QgDWAvzK.js} +2 -2
  277. package/dist/chunks/skillLearning-CFYgFRPE.js +1 -0
  278. package/dist/chunks/skillLearning-en7AuVDZ.js +1 -0
  279. package/dist/chunks/{skillPanel-rIIYgnBE.js → skillPanel-srZjMIbC.js} +3 -3
  280. package/dist/chunks/{skillSearchPanel-xAL-6uJF.js → skillSearchPanel-DTvHcwNK.js} +4 -4
  281. package/dist/chunks/{skills-Doe47wxK.js → skills-BlVUkWg4.js} +1 -1
  282. package/dist/chunks/{sprites-D11F3i1M.js → sprites-QO9r_mXk.js} +1 -1
  283. package/dist/chunks/{stats-WNUyieG-.js → stats-DdXM-u7l.js} +1 -1
  284. package/dist/chunks/{status-CjBS9SkF.js → status-BIZWtZqI.js} +1 -1
  285. package/dist/chunks/{statusNoticeHelpers-cnI4TiGw.js → statusNoticeHelpers-9sIAjiE6.js} +1 -1
  286. package/dist/chunks/{tag-Gfb8vTAR.js → tag-DDJ8pAsl.js} +2 -2
  287. package/dist/chunks/{tasks-BwX1rzOD.js → tasks-DYt6udr3.js} +1 -1
  288. package/dist/chunks/{teamHelpers-DEgaCpta.js → teamHelpers-BJuKEuyS.js} +1 -1
  289. package/dist/chunks/teamHelpers-Cw5dPQor.js +1 -0
  290. package/dist/chunks/teammateModeSnapshot-BXC7ssXX.js +1 -0
  291. package/dist/chunks/{teammateModeSnapshot-Dyukgtp9.js → teammateModeSnapshot-Zp1weNIZ.js} +1 -1
  292. package/dist/chunks/teleport-DkoFG3EI.js +1 -0
  293. package/dist/chunks/{templateJobs-DQXuFnkl.js → templateJobs-V2-TVeGE.js} +1 -1
  294. package/dist/chunks/{terminalSetup-bSbq4LE7.js → terminalSetup-DMUDhXur.js} +1 -1
  295. package/dist/chunks/{terminalSetup-CTEIn08j.js → terminalSetup-l0Vv_v1c.js} +1 -1
  296. package/dist/chunks/{theme-DazaKPy8.js → theme-Dm1yCDce.js} +1 -1
  297. package/dist/chunks/thinkback-D1mk7cq1.js +1 -0
  298. package/dist/chunks/thinkback-DQAZE5SA.js +1 -0
  299. package/dist/chunks/thinkback-play-BJcGmc9X.js +1 -0
  300. package/dist/chunks/{toolEventObserver-Dfvv2trb.js → toolEventObserver-BgkqkNwy.js} +1 -1
  301. package/dist/chunks/{toolEventObserver-D4h-QqVP.js → toolEventObserver-C-BImvCz.js} +1 -1
  302. package/dist/chunks/toolPool-DNH5H4Jg.js +1 -0
  303. package/dist/chunks/toolPool-DYvz_Mjt.js +1 -0
  304. package/dist/chunks/{trustedDevice-CQ9PK-8m.js → trustedDevice-BDrK9AQ6.js} +1 -1
  305. package/dist/chunks/{trustedDevice-rdvUkS1W.js → trustedDevice-CXsk3eij.js} +1 -1
  306. package/dist/chunks/{ultrareviewCommand-Zf9hO4wr.js → ultrareviewCommand-Bc8hMzHz.js} +2 -2
  307. package/dist/chunks/undercover-DUrQYxYo.js +1 -0
  308. package/dist/chunks/{undercover-DLyKv5TE.js → undercover-kRoI_nlN.js} +1 -1
  309. package/dist/chunks/{updateCCB-7WQRz9lW.js → updateCCB-BPGNN7VA.js} +1 -1
  310. package/dist/chunks/upgrade-BTI562Ce.js +1 -0
  311. package/dist/chunks/{upgrade-ByIumMQe.js → upgrade-DmEGLk6v.js} +1 -1
  312. package/dist/chunks/{upload-CvOMbA9_.js → upload-49qk5TBL.js} +1 -1
  313. package/dist/chunks/{usage-DE4PSQiF.js → usage-DhJDFJVx.js} +1 -1
  314. package/dist/chunks/{usage-C_d-Z-eb.js → usage-sYgTL8wR.js} +1 -1
  315. package/dist/chunks/{useMainLoopModel-Os8Ao8-x.js → useMainLoopModel-CJaR_qEJ.js} +1 -1
  316. package/dist/chunks/{useManagePlugins-BYBubfHU.js → useManagePlugins-B1FpmxFo.js} +1 -1
  317. package/dist/chunks/{useMergedTools-BJAn2i-F.js → useMergedTools-eMPZ95TX.js} +1 -1
  318. package/dist/chunks/{useSearchInput-CF77X2OV.js → useSearchInput-CR-b0Qi6.js} +1 -1
  319. package/dist/chunks/useSettingsErrors-p-PFBeaC.js +1 -0
  320. package/dist/chunks/{useVoice-DwzMN0fq.js → useVoice-D3PqTfCK.js} +1 -1
  321. package/dist/chunks/{util-DD30Y4o8.js → util-BZ2fS3PR.js} +1 -1
  322. package/dist/chunks/utils-hhztcb0b.js +1 -0
  323. package/dist/chunks/validatePlugin-QtcXXmZu.js +1 -0
  324. package/dist/chunks/{vim-zc9EiMil.js → vim-LmepJftY.js} +1 -1
  325. package/dist/chunks/{voice-BRhZt4jW.js → voice-CNRTt4gH.js} +2 -2
  326. package/dist/chunks/voiceModeEnabled-B57V7REx.js +1 -0
  327. package/dist/chunks/{voiceModeEnabled-168-1Ocs.js → voiceModeEnabled-wWM929QG.js} +1 -1
  328. package/dist/chunks/{voiceStreamSTT-B80UegKG.js → voiceStreamSTT-CnK9GN6Q.js} +1 -1
  329. package/dist/chunks/voiceStreamSTT-Dp-1uSjP.js +1 -0
  330. package/dist/chunks/{workerRegistry-s8nnpmUO.js → workerRegistry-CrIpKIZe.js} +1 -1
  331. package/dist/chunks/worktree-YbEK6b36.js +1 -0
  332. package/dist/chunks/{xml-DTMvLcPg.js → xml-CMdTGiv6.js} +1 -1
  333. package/dist/cli.js +1 -1
  334. package/package.json +1 -1
  335. package/dist/chunks/ApproveApiKey-BhMr2Y5F.js +0 -1
  336. package/dist/chunks/BackgroundTasksDialog-BL_dfbZP.js +0 -2
  337. package/dist/chunks/ClaudeMdExternalIncludesDialog-DPki55Xa.js +0 -1
  338. package/dist/chunks/ConsoleOAuthFlow-D_j1NebK.js +0 -1
  339. package/dist/chunks/Doctor-2D5Wz58o.js +0 -1
  340. package/dist/chunks/Doctor-CDez_u_U.js +0 -3
  341. package/dist/chunks/Grove-Dwu_0zRw.js +0 -1
  342. package/dist/chunks/MessageSelector-BRkxpO1O.js +0 -3
  343. package/dist/chunks/Messages-wyMyMP7U.js +0 -11
  344. package/dist/chunks/PluginSettings-DGpIVGvV.js +0 -17
  345. package/dist/chunks/QueryEngine-I3Bqzbiz.js +0 -1
  346. package/dist/chunks/REPL-BxAsVlx3.js +0 -1
  347. package/dist/chunks/ResumeConversation-AdLtgdVB.js +0 -1
  348. package/dist/chunks/SearchExtraToolsTool-BJ8Nx_Nu.js +0 -1
  349. package/dist/chunks/SentryErrorBoundary-Bs7mtkPb.js +0 -1
  350. package/dist/chunks/Settings-PioHwsvg.js +0 -2
  351. package/dist/chunks/api-CFNGoLoL.js +0 -1
  352. package/dist/chunks/asciicast-aoKFhc7C.js +0 -1
  353. package/dist/chunks/assistant-BLd4y2FJ.js +0 -1
  354. package/dist/chunks/auth-DGfZCD_B.js +0 -1
  355. package/dist/chunks/backgroundHousekeeping-Ckj8W3RO.js +0 -1
  356. package/dist/chunks/backgroundHousekeeping-D2_Uopt7.js +0 -17
  357. package/dist/chunks/bridgeConfig-7c07tJm9.js +0 -1
  358. package/dist/chunks/bridgeEnabled-Z2S8lk0l.js +0 -1
  359. package/dist/chunks/bridgeMain-B7FZpvo0.js +0 -68
  360. package/dist/chunks/bridgeMain-C5UxF8ST.js +0 -1
  361. package/dist/chunks/caches-Dt52PedI.js +0 -1
  362. package/dist/chunks/changeDetector-uO9CBvut.js +0 -1
  363. package/dist/chunks/channelNotification-DzTzUrCe.js +0 -1
  364. package/dist/chunks/clear-B_cVk64B.js +0 -1
  365. package/dist/chunks/client-BcqXgcrx.js +0 -1
  366. package/dist/chunks/color-DEXUx7gE.js +0 -1
  367. package/dist/chunks/commands-BX0_wEGw.js +0 -1
  368. package/dist/chunks/commitAttribution-CSVDcgTO.js +0 -1
  369. package/dist/chunks/context-noninteractive-SBxqQ3iu.js +0 -1
  370. package/dist/chunks/conversation-CQBl9Yy2.js +0 -1
  371. package/dist/chunks/conversation-DVZplNag.js +0 -1
  372. package/dist/chunks/createSession-DfEQy2dZ.js +0 -1
  373. package/dist/chunks/datadog-Uj6FjEuU.js +0 -1
  374. package/dist/chunks/entry-CdfuWjKu.js +0 -14
  375. package/dist/chunks/envLessBridgeConfig-DOO9eX07.js +0 -1
  376. package/dist/chunks/extra-usage-CJcyfVCt.js +0 -1
  377. package/dist/chunks/extractMemories-C3SU-Osb.js +0 -1
  378. package/dist/chunks/fast-7iinMwk-.js +0 -1
  379. package/dist/chunks/gates-qgzva-fO.js +0 -1
  380. package/dist/chunks/grok-C4QFXJnR.js +0 -1
  381. package/dist/chunks/hooks-Ch2vPE8u.js +0 -1
  382. package/dist/chunks/inboundAttachments-C0rkLl2x.js +0 -1
  383. package/dist/chunks/initReplBridge-tXqkba08.js +0 -1
  384. package/dist/chunks/language-B1yHC1d6.js +0 -1
  385. package/dist/chunks/loadAgentsDir-DxPE2bIO.js +0 -1
  386. package/dist/chunks/loadPluginHooks-CL5aGDrb.js +0 -1
  387. package/dist/chunks/localSearch-iozuZZhZ.js +0 -1
  388. package/dist/chunks/login-Dxza_KNT.js +0 -1
  389. package/dist/chunks/logout-BeGQR78E.js +0 -1
  390. package/dist/chunks/mcp-UJZ22IDJ.js +0 -6
  391. package/dist/chunks/mcp-fHf8Uc7h.js +0 -1
  392. package/dist/chunks/model-D3g2QdU-.js +0 -1
  393. package/dist/chunks/openai-Bvo0Gcec.js +0 -10
  394. package/dist/chunks/openaiShared-D5lOejS1.js +0 -16
  395. package/dist/chunks/permissions-BDbIjTT6.js +0 -3
  396. package/dist/chunks/pluginStartupCheck-DZp0wnXP.js +0 -1
  397. package/dist/chunks/plugins-0SyID4Kx.js +0 -4
  398. package/dist/chunks/policyLimits-Cmmzuv-E.js +0 -1
  399. package/dist/chunks/poorMode-D_hB-rDf.js +0 -1
  400. package/dist/chunks/print-Ct8N4PYT.js +0 -39
  401. package/dist/chunks/processSlashCommand-BaUdUg3T.js +0 -6
  402. package/dist/chunks/prompt-B1Qy8mi4.js +0 -1
  403. package/dist/chunks/prompt-D4kWWEZC.js +0 -1
  404. package/dist/chunks/refresh-Cjv4jA6L.js +0 -1
  405. package/dist/chunks/sandbox-adapter-DGVtPPD0.js +0 -1
  406. package/dist/chunks/searchExtraTools-DXWkpOIg.js +0 -1
  407. package/dist/chunks/sessionFileAccessHooks-BeuS4m7a.js +0 -1
  408. package/dist/chunks/sessionMemory-LMOQk90c.js +0 -1
  409. package/dist/chunks/sessionMemory-UpILj5ww.js +0 -1
  410. package/dist/chunks/sessionMemoryUtils-DE7AezA0.js +0 -1
  411. package/dist/chunks/sessionObserver-HqvTXhs9.js +0 -1
  412. package/dist/chunks/sessionStorage-BN56DAAd.js +0 -1
  413. package/dist/chunks/sessionStoragePortable-BI9q2WcJ.js +0 -3
  414. package/dist/chunks/setup-BZMVuIIx.js +0 -2
  415. package/dist/chunks/sink-BRrEbL6h.js +0 -1
  416. package/dist/chunks/sinks-CKaSBvU8.js +0 -1
  417. package/dist/chunks/skillChangeDetector-DnyEQqe6.js +0 -1
  418. package/dist/chunks/skillLearning-D6latSKi.js +0 -1
  419. package/dist/chunks/skillLearning-DbOOqb6b.js +0 -1
  420. package/dist/chunks/teamHelpers-EJxTXoTV.js +0 -1
  421. package/dist/chunks/teammateModeSnapshot-BgUQ4Phz.js +0 -1
  422. package/dist/chunks/teleport-B4p8XlAv.js +0 -1
  423. package/dist/chunks/thinkback-BOfZP_QG.js +0 -1
  424. package/dist/chunks/thinkback-CxWZV2Oz.js +0 -1
  425. package/dist/chunks/thinkback-play-CHe1x2Hc.js +0 -1
  426. package/dist/chunks/toolPool-BHChMuLr.js +0 -1
  427. package/dist/chunks/toolPool-C5K43w4_.js +0 -1
  428. package/dist/chunks/undercover-DNS9V_JT.js +0 -1
  429. package/dist/chunks/upgrade-bK4x32Ma.js +0 -1
  430. package/dist/chunks/useSettingsErrors-DD7fQ-fU.js +0 -1
  431. package/dist/chunks/utils-D44M8obg.js +0 -1
  432. package/dist/chunks/validatePlugin-DpHiJRsT.js +0 -1
  433. package/dist/chunks/voiceModeEnabled-CTT25yFj.js +0 -1
  434. package/dist/chunks/voiceStreamSTT-BpYhKo2H.js +0 -1
  435. package/dist/chunks/worktree-CkB4jLXK.js +0 -1
@@ -0,0 +1 @@
1
+ import{Fv as e,Lv as t,Pv as n}from"./loadAgentsDir-Cl2w3uvH.js";n();export{e as loadPluginHooks,t as setupPluginHookHotReload};
@@ -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-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
+ 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-E0eNJ_XZ.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};
@@ -0,0 +1 @@
1
+ import{a as e,c as t,o as n,t as r}from"./localSearch-CpeqVibs.js";n();export{r as clearSkillIndexCache,e as getSkillIndex,t as searchSkills};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,t as n}from"./login-TVtq34WQ.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{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};
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-q1-Ni8Oh.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,Ra as le,Ua as y,VT as ue,Zo as b,_y as x,eC as de,tC as fe,vy as pe}from"./loadAgentsDir-Cl2w3uvH.js";import{a as me,r as he,t as S}from"./trustedDevice-CXsk3eij.js";import{n as C,t as w}from"./useMainLoopModel-CJaR_qEJ.js";import{n as T,r as E,t as D}from"./bypassPermissionsKillswitch-BxvX48jr.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(b),n){f(),ue(),y(),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)(de,{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)(x,{onDone:()=>t.onDone(!0,n),startingMessage:t.startingMessage})]})]})})}var Q,$,we=t((()=>{Q=n(i(),1),d(),me(),fe(),pe(),s(),w(),g(),le(),se(),ce(),T(),ne(),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{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};
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-q1-Ni8Oh.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-Cl2w3uvH.js";import{r as x,t as S}from"./semver-Tw0AFar5.js";import{c as C,s as w,u as T}from"./releaseNotes-D3wZdQVZ.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.9`,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{AT as e,MT as t,NT as n,jT as r}from"./loadAgentsDir-Cl2w3uvH.js";t();export{e as call,r 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,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.
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-q1-Ni8Oh.js";import{V as s,W as c,h as l,p as u}from"./debug-UI3T040K.js";import{Bc as d,Fo as f,Hc as p,Lo as m,ND as h,PD as g,Vc as _,ZA as v,bo as y,n_ as b,r_ as x,rj as S}from"./loadAgentsDir-Cl2w3uvH.js";import{On as C,jn as w}from"./prompt-BmOnuQfF.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: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};
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:v(s,void 0),CLAUDE_MODEL:s,CLAUDE_CWD:process.cwd()})}var M=e((()=>{n(),l(),S(),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:[y({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`&&(p((e,t)=>{P(t)&&F(e)}),g(H))}var z,B,V,H,U=e((()=>{b(),w(),_(),s(),E(),h(),m(),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`&&!f(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};